From 38b529c3e7a0fae336cb9ca975b1b1058b22711b Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 2 Oct 2019 09:46:30 -0400 Subject: [PATCH 001/529] fix a Guidebook.tex bit just noticed --- doc/Guidebook.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 9b52fb5cd..ab337531f 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -4794,7 +4794,7 @@ Percentages for ``{\it hitpoints\/}'' and ``{\it power\/}'' are straightforward; they're based on the corresponding maximum field. Percentage highlight rules are also allowed for ``{\it experience level\/}'' and ``{\it experience points\/}'' (valid when the -(\it showexp\/} +{\it showexp\/} option is enabled). For those, the percentage is based on the progress from the start of the current experience level to the start of the next level. From df7e6a0f2a5589dd58323a221c1654642fa8c5a3 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 2 Oct 2019 10:47:47 -0400 Subject: [PATCH 002/529] Guidebook.txt update --- doc/Guidebook.txt | 2776 ++++++++++++++++++++++----------------------- 1 file changed, 1388 insertions(+), 1388 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index c622c832d..5e533109e 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -91,32 +91,32 @@ them to move quickly and sneak up on the local nasties. They start equipped with the tools for a proper scientific expedition. - Barbarians are warriors out of the hinterland, hardened to + Barbarians are warriors out of the hinterland, hardened to battle. They begin their quests with naught but uncommon strength, a trusty hauberk, and a great two-handed sword. - Cavemen and Cavewomen start with exceptional strength but, + Cavemen and Cavewomen start with exceptional strength but, unfortunately, with neolithic weapons. - Healers are wise in medicine and apothecary. They know the - herbs and simples that can restore vitality, ease pain, anes- + Healers are wise in medicine and apothecary. They know the + herbs and simples that can restore vitality, ease pain, anes- thetize, and neutralize poisons; and with their instruments, they - can divine a being's state of health or sickness. Their medical + can divine a being's state of health or sickness. Their medical practice earns them quite reasonable amounts of money, with which they enter the dungeon. - Knights are distinguished from the common skirmisher by - their devotion to the ideals of chivalry and by the surpassing + Knights are distinguished from the common skirmisher by + their devotion to the ideals of chivalry and by the surpassing excellence of their armor. Monks are ascetics, who by rigorous practice of physical and mental disciplines have become capable of fighting as effectively - without weapons as with. They wear no armor but make up for it + without weapons as with. They wear no armor but make up for it with increased mobility. - Priests and Priestesses are clerics militant, crusaders ad- - vancing the cause of righteousness with arms, armor, and arts - thaumaturgic. Their ability to commune with deities via prayer + Priests and Priestesses are clerics militant, crusaders ad- + vancing the cause of righteousness with arms, armor, and arts + thaumaturgic. Their ability to commune with deities via prayer occasionally extricates them from peril, but can also put them in it. @@ -126,7 +126,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -136,63 +136,63 @@ - Rogues are agile and stealthy thieves, with knowledge of - locks, traps, and poisons. Their advantage lies in surprise, + Rogues are agile and stealthy thieves, with knowledge of + locks, traps, and poisons. Their advantage lies in surprise, which they employ to great advantage. - Samurai are the elite warriors of feudal Nippon. They are - lightly armored and quick, and wear the dai-sho, two swords of + Samurai are the elite warriors of feudal Nippon. They are + lightly armored and quick, and wear the dai-sho, two swords of the deadliest keenness. - Tourists start out with lots of gold (suitable for shopping - with), a credit card, lots of food, some maps, and an expensive + Tourists start out with lots of gold (suitable for shopping + with), a credit card, lots of food, some maps, and an expensive camera. Most monsters don't like being photographed. - Valkyries are hardy warrior women. Their upbringing in the - harsh Northlands makes them strong, inures them to extremes of + Valkyries are hardy warrior women. Their upbringing in the + harsh Northlands makes them strong, inures them to extremes of cold, and instills in them stealth and cunning. - Wizards start out with a knowledge of magic, a selection of - magical items, and a particular affinity for dweomercraft. Al- + Wizards start out with a knowledge of magic, a selection of + magical items, and a particular affinity for dweomercraft. Al- though seemingly weak and easy to overcome at first sight, an ex- perienced Wizard is a deadly foe. - You may also choose the race of your character (within lim- + You may also choose the race of your character (within lim- its; most roles have restrictions on which races are eligible for them): Dwarves are smaller than humans or elves, but are stocky and - solid individuals. Dwarves' most notable trait is their great - expertise in mining and metalwork. Dwarvish armor is said to be + solid individuals. Dwarves' most notable trait is their great + expertise in mining and metalwork. Dwarvish armor is said to be second in quality not even to the mithril armor of the Elves. - Elves are agile, quick, and perceptive; very little of what - goes on will escape an Elf. The quality of Elven craftsmanship + Elves are agile, quick, and perceptive; very little of what + goes on will escape an Elf. The quality of Elven craftsmanship often gives them an advantage in arms and armor. - Gnomes are smaller than but generally similar to dwarves. - Gnomes are known to be expert miners, and it is known that a se- - cret underground mine complex built by this race exists within + Gnomes are smaller than but generally similar to dwarves. + Gnomes are known to be expert miners, and it is known that a se- + cret underground mine complex built by this race exists within the Mazes of Menace, filled with both riches and danger. Humans are by far the most common race of the surface world, - and are thus the norm to which other races are often compared. - Although they have no special abilities, they can succeed in any + and are thus the norm to which other races are often compared. + Although they have no special abilities, they can succeed in any role. - Orcs are a cruel and barbaric race that hate every living - thing (including other orcs). Above all others, Orcs hate Elves - with a passion unequalled, and will go out of their way to kill - one at any opportunity. The armor and weapons fashioned by the + Orcs are a cruel and barbaric race that hate every living + thing (including other orcs). Above all others, Orcs hate Elves + with a passion unequalled, and will go out of their way to kill + one at any opportunity. The armor and weapons fashioned by the Orcs are typically of inferior quality. 3. What do all those things on the screen mean? - On the screen is kept a map of where you have been and what - you have seen on the current dungeon level; as you explore more + On the screen is kept a map of where you have been and what + you have seen on the current dungeon level; as you explore more - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -204,47 +204,47 @@ of the level, it appears on the screen in front of you. - When NetHack's ancestor rogue first appeared, its screen - orientation was almost unique among computer fantasy games. - Since then, screen orientation has become the norm rather than - the exception; NetHack continues this fine tradition. Unlike - text adventure games that accept commands in pseudo-English sen- + When NetHack's ancestor rogue first appeared, its screen + orientation was almost unique among computer fantasy games. + Since then, screen orientation has become the norm rather than + the exception; NetHack continues this fine tradition. Unlike + text adventure games that accept commands in pseudo-English sen- tences and explain the results in words, NetHack commands are all - one or two keystrokes and the results are displayed graphically - on the screen. A minimum screen size of 24 lines by 80 columns - is recommended; if the screen is larger, only a 21x80 section + one or two keystrokes and the results are displayed graphically + on the screen. A minimum screen size of 24 lines by 80 columns + is recommended; if the screen is larger, only a 21x80 section will be used for the map. NetHack can even be played by blind players, with the assis- - tance of Braille readers or speech synthesisers. Instructions - for configuring NetHack for the blind are included later in this + tance of Braille readers or speech synthesisers. Instructions + for configuring NetHack for the blind are included later in this document. NetHack generates a new dungeon every time you play it; even - the authors still find it an entertaining and exciting game de- + the authors still find it an entertaining and exciting game de- spite having won several times. - NetHack offers a variety of display options. The options - available to you will vary from port to port, depending on the - capabilities of your hardware and software, and whether various + NetHack offers a variety of display options. The options + available to you will vary from port to port, depending on the + capabilities of your hardware and software, and whether various compile-time options were enabled when your executable was creat- ed. The three possible display options are: a monochrome charac- - ter interface, a color character interface, and a graphical in- + ter interface, a color character interface, and a graphical in- terface using small pictures called tiles. The two character in- terfaces allow fonts with other characters to be substituted, but - the default assignments use standard ASCII characters to repre- + the default assignments use standard ASCII characters to repre- sent everything. There is no difference between the various dis- play options with respect to game play. Because we cannot repro- duce the tiles or colors in the Guidebook, and because it is com- - mon to all ports, we will use the default ASCII characters from - the monochrome character display when referring to things you + mon to all ports, we will use the default ASCII characters from + the monochrome character display when referring to things you might see on the screen during your game. - In order to understand what is going on in NetHack, first - you must understand what NetHack is doing with the screen. The - NetHack screen replaces the "You see ..." descriptions of text - adventure games. Figure 1 is a sample of what a NetHack screen - might look like. The way the screen looks for you depends on + In order to understand what is going on in NetHack, first + you must understand what NetHack is doing with the screen. The + NetHack screen replaces the "You see ..." descriptions of text + adventure games. Figure 1 is a sample of what a NetHack screen + might look like. The way the screen looks for you depends on your platform. @@ -258,7 +258,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -286,9 +286,9 @@ 3.1. The status lines (bottom) - The bottom two lines of the screen contain several cryptic - pieces of information describing your current status. If either - status line becomes longer than the width of the screen, you + The bottom two lines of the screen contain several cryptic + pieces of information describing your current status. If either + status line becomes longer than the width of the screen, you might not see all of it. Here are explanations of what the vari- ous status items mean (though your configuration may not have all the status items listed below): @@ -298,33 +298,33 @@ experience level, see below). Strength - A measure of your character's strength; one of your six ba- - sic attributes. A human character's attributes can range - from 3 to 18 inclusive; non-humans may exceed these limits + A measure of your character's strength; one of your six ba- + sic attributes. A human character's attributes can range + from 3 to 18 inclusive; non-humans may exceed these limits (occasionally you may get super-strengths of the form 18/xx, - and magic can also cause attributes to exceed the normal - limits). The higher your strength, the stronger you are. + and magic can also cause attributes to exceed the normal + limits). The higher your strength, the stronger you are. Strength affects how successfully you perform physical - tasks, how much damage you do in combat, and how much loot + tasks, how much damage you do in combat, and how much loot you can carry. Dexterity - Dexterity affects your chances to hit in combat, to avoid - traps, and do other tasks requiring agility or manipulation + Dexterity affects your chances to hit in combat, to avoid + traps, and do other tasks requiring agility or manipulation of objects. Constitution - Constitution affects your ability to recover from injuries - and other strains on your stamina. When strength is low or - modest, constitution also affects how much you can carry. - With sufficiently high strength, the contribution to carry- + Constitution affects your ability to recover from injuries + and other strains on your stamina. When strength is low or + modest, constitution also affects how much you can carry. + With sufficiently high strength, the contribution to carry- ing capacity from your constitution no longer matters. Intelligence - Intelligence affects your ability to cast spells and read + Intelligence affects your ability to cast spells and read - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -342,7 +342,7 @@ Charisma Charisma affects how certain creatures react toward you. In - particular, it can affect the prices shopkeepers offer you. + particular, it can affect the prices shopkeepers offer you. Alignment Lawful, Neutral, or Chaotic. Often, Lawful is taken as good @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -456,7 +456,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -533,62 +533,62 @@ I This marks the last known location of an invisible or other- - wise unseen monster. Note that the monster could have + wise unseen monster. Note that the monster could have moved. The `F' and `m' commands may be useful here. - You need not memorize all these symbols; you can ask the - game what any symbol represents with the `/' command (see the + You need not memorize all these symbols; you can ask the + game what any symbol represents with the `/' command (see the next section for more info). 4. Commands Commands can be initiated by typing one or two characters to - which the command is bound to, or typing the command name in the - extended commands entry. Some commands, like "search", do not + which the command is bound to, or typing the command name in the + extended commands entry. Some commands, like "search", do not require that any more information be collected by NetHack. Other - commands might require additional information, for example a di- - rection, or an object to be used. For those commands that re- - quire additional information, NetHack will present you with ei- - ther a menu of choices or with a command line prompt requesting + commands might require additional information, for example a di- + rection, or an object to be used. For those commands that re- + quire additional information, NetHack will present you with ei- + ther a menu of choices or with a command line prompt requesting information. Which you are presented with will depend chiefly on how you have set the menustyle option. - For example, a common question, in the form "What do you - want to use? [a-zA-Z ?*]", asks you to choose an object you are - carrying. Here, "a-zA-Z" are the inventory letters of your pos- - sible choices. Typing `?' gives you an inventory list of these - items, so you can see what each letter refers to. In this exam- + For example, a common question, in the form "What do you + want to use? [a-zA-Z ?*]", asks you to choose an object you are + carrying. Here, "a-zA-Z" are the inventory letters of your pos- + sible choices. Typing `?' gives you an inventory list of these + items, so you can see what each letter refers to. In this exam- ple, there is also a `*' indicating that you may choose an object not on the list, if you wanted to use something unexpected. Typ- - ing a `*' lists your entire inventory, so you can see the inven- - tory letters of every object you're carrying. Finally, if you + ing a `*' lists your entire inventory, so you can see the inven- + tory letters of every object you're carrying. Finally, if you change your mind and decide you don't want to do this command af- ter all, you can press the ESC key to abort the command. - You can put a number before some commands to repeat them - that many times; for example, "10s" will search ten times. If + You can put a number before some commands to repeat them + that many times; for example, "10s" will search ten times. If you have the number_pad option set, you must type `n' to prefix a - count, so the example above would be typed "n10s" instead. Com- - mands for which counts make no sense ignore them. In addition, - movement commands can be prefixed for greater control (see be- + count, so the example above would be typed "n10s" instead. Com- + mands for which counts make no sense ignore them. In addition, + movement commands can be prefixed for greater control (see be- low). To cancel a count or a prefix, press the ESC key. - The list of commands is rather long, but it can be read at - any time during the game through the `?' command, which accesses - a menu of helpful texts. Here are the default key bindings for + The list of commands is rather long, but it can be read at + any time during the game through the `?' command, which accesses + a menu of helpful texts. Here are the default key bindings for your reference: ? Help menu: display one of several help texts available. / The "whatis" command, to tell what a symbol represents. You may choose to specify a location or type a symbol (or even a - whole word) to explain. Specifying a location is done by - moving the cursor to a particular spot on the map and then + whole word) to explain. Specifying a location is done by + moving the cursor to a particular spot on the map and then pressing one of `.', `,', `;', or `:'. `.' will explain the symbol at the chosen location, conditionally check for "More - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -598,43 +598,43 @@ - info?" depending upon whether the help option is on, and - then you will be asked to pick another location; `,' will + info?" depending upon whether the help option is on, and + then you will be asked to pick another location; `,' will explain the symbol but skip any additional information, then let you pick another location; `;' will skip additional info and also not bother asking you to choose another location to examine; `:' will show additional info, if any, without ask- ing for confirmation. When picking a location, pressing the - ESC key will terminate this command, or pressing `?' will + ESC key will terminate this command, or pressing `?' will give a brief reminder about how it works. - If the autodescribe option is on, a short description of - what you see at each location is shown as you move the cur- - sor. Typing `#' while picking a location will toggle that - option on or off. The whatis_coord option controls whether + If the autodescribe option is on, a short description of + what you see at each location is shown as you move the cur- + sor. Typing `#' while picking a location will toggle that + option on or off. The whatis_coord option controls whether the short description includes map coordinates. - Specifying a name rather than a location always gives any + Specifying a name rather than a location always gives any additional information available about that name. - You may also request a description of nearby monsters, all - monsters currently displayed, nearby objects, or all ob- + You may also request a description of nearby monsters, all + monsters currently displayed, nearby objects, or all ob- jects. The whatis_coord option controls which format of map coordinate is included with their descriptions. & Tell what a command does. - < Go up to the previous level (if you are on a staircase or + < Go up to the previous level (if you are on a staircase or ladder). > Go down to the next level (if you are on a staircase or lad- der). [yuhjklbn] - Go one step in the direction indicated (see Figure 2). If - you sense or remember a monster there, you will fight the - monster instead. Only these one-step movement commands - cause you to fight monsters; the others (below) are "safe." + Go one step in the direction indicated (see Figure 2). If + you sense or remember a monster there, you will fight the + monster instead. Only these one-step movement commands + cause you to fight monsters; the others (below) are "safe." y k u 7 8 9 \ | / \ | / @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -720,7 +720,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -786,7 +786,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -822,7 +822,7 @@ i List your inventory (everything you're carrying). I List selected parts of your inventory, usually be specifying - the character for a particular set of objects, like `[' for + the character for a particular set of objects, like `[' for armor or `!' for potions. I* - list all gems in inventory; @@ -838,12 +838,12 @@ O Set options. - A menu showing the current option values will be displayed. - You can change most values simply by selecting the menu en- + A menu showing the current option values will be displayed. + You can change most values simply by selecting the menu en- try for the given option (ie, by typing its letter or click- - ing upon it, depending on your user interface). For the - non-boolean choices, a further menu or prompt will appear - once you've closed this menu. The available options are + ing upon it, depending on your user interface). For the + non-boolean choices, a further menu or prompt will appear + once you've closed this menu. The available options are listed later in this Guidebook. Options are usually set be- fore the game rather than with the `O' command; see the sec- tion on options below. @@ -852,7 +852,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -862,10 +862,10 @@ - Shortcut for "#overview": list interesting dungeon levels + Shortcut for "#overview": list interesting dungeon levels visited. - (Prior to 3.6.0, `^O' was a debug mode command which listed + (Prior to 3.6.0, `^O' was a debug mode command which listed the placement of all special levels. Use "#wizwhere" to run that command.) @@ -874,15 +874,15 @@ P Put on an accessory (ring, amulet, or blindfold). This command may also be used to wear armor. The prompt for - which inventory item to use will only list accessories, but - choosing an unlisted item of armor will attempt to wear it. + which inventory item to use will only list accessories, but + choosing an unlisted item of armor will attempt to wear it. (See the `W' command below. It lists armor as the inventory choices but will accept an accessory and attempt to put that on.) ^P Repeat previous message. - Subsequent `^P's repeat earlier messages. For some inter- + Subsequent `^P's repeat earlier messages. For some inter- faces, the behavior can be varied via the msg_window option. q Quaff (drink) something (potion, water, etc). @@ -918,7 +918,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -959,19 +959,19 @@ T Take off armor. - If you're wearing more than one piece, you'll be prompted - for which one to take off. (Note that this treats a cloak - covering a suit and/or a shirt, or a suit covering a shirt, + If you're wearing more than one piece, you'll be prompted + for which one to take off. (Note that this treats a cloak + covering a suit and/or a shirt, or a suit covering a shirt, as if the underlying items weren't there.) When you're only - wearing one, then by default it will be taken off without - asking, but you can set the paranoid_confirmation option to + wearing one, then by default it will be taken off without + asking, but you can set the paranoid_confirmation option to require a prompt. - This command may also be used to remove accessories. The - prompt for which inventory item to take off only lists worn - armor, but a worn accessory can be chosen. (See the `R' + This command may also be used to remove accessories. The + prompt for which inventory item to take off only lists worn + armor, but a worn accessory can be chosen. (See the `R' command above. It lists accessories as the inventory choic- - es but will accept an item of armor and attempt to take it + es but will accept an item of armor and attempt to take it off.) ^T Teleport, if you have the ability. @@ -984,7 +984,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -996,44 +996,44 @@ w- - wield nothing, use your bare (or gloved) hands. - Some characters can wield two weapons at once; use the `X' + Some characters can wield two weapons at once; use the `X' command (or the "#twoweapon" extended command) to do so. W Wear armor. - This command may also be used to put on an accessory (ring, - amulet, or blindfold). The prompt for which inventory item + This command may also be used to put on an accessory (ring, + amulet, or blindfold). The prompt for which inventory item to use will only list armor, but choosing an unlisted acces- sory will attempt to put it on. (See the `P' command above. - It lists accessories as the inventory choices but will ac- + It lists accessories as the inventory choices but will ac- cept an item of armor and attempt to wear it.) x Exchange your wielded weapon with the item in your alternate weapon slot. The latter is used as your secondary weapon when engaging in - two-weapon combat. Note that if one of these slots is emp- + two-weapon combat. Note that if one of these slots is emp- ty, the exchange still takes place. X Toggle two-weapon combat, if your character can do it. Also available via the "#twoweapon" extended command. - (In versions prior to 3.6 this was the command to switch + (In versions prior to 3.6 this was the command to switch from normal play to "explore mode", also known as "discovery mode", which has now been moved to "#exploremode".) ^X Display basic information about your character. - Displays name, role, race, gender (unless role name makes - that redundant, such as Caveman or Priestess), and align- - ment, along with your patron deity and his or her opposi- - tion. It also shows most of the various items of informa- + Displays name, role, race, gender (unless role name makes + that redundant, such as Caveman or Priestess), and align- + ment, along with your patron deity and his or her opposi- + tion. It also shows most of the various items of informa- tion from the status line(s) in a less terse form, including - several additional things which don't appear in the normal + several additional things which don't appear in the normal status display due to space considerations. - In normal play, that's all that `^X' displays. In explore - mode, the role and status feedback is augmented by the in- + In normal play, that's all that `^X' displays. In explore + mode, the role and status feedback is augmented by the in- formation provided by enlightenment magic. z Zap a wand. @@ -1050,7 +1050,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1116,7 +1116,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1243,12 +1243,12 @@ #exploremode Enter the explore mode. - #fire - Fire ammunition from quiver. Default key is `f'. + Requires confirmation; default response is n (no). To real- + ly switch to explore mode, respond with y. You can set the + paranoid_confirmation:quit option to require a response of - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1258,15 +1258,20 @@ + yes instead. + + #fire + Fire ammunition from quiver. Default key is `f'. + #force Force a lock. Autocompletes. Default key is `M-f'. #glance - Show what type of thing a map symbol corresponds to. De- + Show what type of thing a map symbol corresponds to. De- fault key is `;'. #help - Show the help menu. Default key is `?', and also `h' if + Show the help menu. Default key is `?', and also `h' if number_pad is on. #herecmdmenu @@ -1282,15 +1287,15 @@ Inventory specific item types. Default key is `I'. #invoke - Invoke an object's special powers. Autocompletes. Default + Invoke an object's special powers. Autocompletes. Default key is `M-i'. #jump - Jump to another location. Autocompletes. Default key is + Jump to another location. Autocompletes. Default key is `M-j', and also `j' if number_pad is on. #kick - Kick something. Default key is `^D', and `k' if number_pad + Kick something. Default key is `^D', and `k' if number_pad is on. #known @@ -1302,19 +1307,14 @@ is ``'. #levelchange - Change your experience level. Autocompletes. Debug mode + Change your experience level. Autocompletes. Debug mode only. #lightsources Show mobile light sources. Autocompletes. Debug mode only. - #look - Look at what is here, under you. Default key is `:'. - - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1324,6 +1324,9 @@ + #look + Look at what is here, under you. Default key is `:'. + #loot Loot a box or bag on the floor beneath you, or the saddle from a steed standing next to you. Autocompletes. Precede @@ -1371,16 +1374,13 @@ Test the panic routine. Terminates the current game. Auto- completes. Debug mode only. - #pay - Pay your shopping bill. Default key is `p'. - - #pickup - Pick up things at the current location. Default key is `,'. - The `m' prefix forces use of a menu. + Asks for confirmation; default is n (no); continue playing. + To really panic, respond with y. You can set the para- + noid_confirmation:quit option to require a response of yes + instead. - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1390,63 +1390,63 @@ + #pay + Pay your shopping bill. Default key is `p'. + + #pickup + Pick up things at the current location. Default key is `,'. + The `m' prefix forces use of a menu. + #polyself Polymorph self. Autocompletes. Debug mode only. #pray - Pray to the gods for help. Autocompletes. Default key is + Pray to the gods for help. Autocompletes. Default key is `M-p'. - Praying too soon after receiving prior help is a bad idea. - (Hint: entering the dungeon alive is treated as having re- + Praying too soon after receiving prior help is a bad idea. + (Hint: entering the dungeon alive is treated as having re- ceived help. You probably shouldn't start off a new game by - praying right away.) Since using this command by accident - can cause trouble, there is an option to make you confirm - your intent before praying. It is enabled by default, and - you can reset the paranoid_confirmation option to disable + praying right away.) Since using this command by accident + can cause trouble, there is an option to make you confirm + your intent before praying. It is enabled by default, and + you can reset the paranoid_confirmation option to disable it. #prevmsg - Show previously displayed game messages. Default key is + Show previously displayed game messages. Default key is `^P'. #puton - Put on an accessory (ring, amulet, etc). Default key is + Put on an accessory (ring, amulet, etc). Default key is `P'. #quaff Quaff (drink) something. Default key is `q'. #quit - Quit the program without saving your game. Autocompletes. + Quit the program without saving your game. Autocompletes. Default key is `M-q'. - Since using this command by accident would throw away the - current game, you are asked to confirm your intent before - quitting. By default a response of `y' acknowledges that - intent. You can set the paranoid_confirmation option to re- - quire a response of "yes" instead. + Since using this command by accident would throw away the + current game, you are asked to confirm your intent before + quitting. Default response is n (no); continue playing. To + really quit, respond with y. You can set the paranoid_con- + firmation:quit option to require a response of yes instead. #quiver Select ammunition for quiver. Default key is `Q'. #read - Read a scroll, a spellbook, or something else. Default key + Read a scroll, a spellbook, or something else. Default key is `r'. #redraw - Redraw the screen. Default key is `^R', and also `^L' if + Redraw the screen. Default key is `^R', and also `^L' if number_pad is on. - #remove - Remove an accessory (ring, amulet, etc). Default key is - `R'. - #ride - Ride (or stop riding) a saddled creature. Autocompletes. - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1456,17 +1456,23 @@ + #remove + Remove an accessory (ring, amulet, etc). Default key is + `R'. + + #ride + Ride (or stop riding) a saddled creature. Autocompletes. Default key is `M-R'. #rub - Rub a lamp or a stone. Autocompletes. Default key is `M- + Rub a lamp or a stone. Autocompletes. Default key is `M- r'. #save Save the game and exit the program. Default key is `S'. #search - Search for traps and secret doors around you. Default key + Search for traps and secret doors around you. Default key is `s'. #seeall @@ -1505,14 +1511,8 @@ #sit Sit down. Autocompletes. Default key is `M-s'. - #stats - Show memory usage statistics. Autocompletes. Debug mode - only. - - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1522,6 +1522,10 @@ + #stats + Show memory usage statistics. Autocompletes. Debug mode + only. + #suspend Suspend the game. Default key is `^Z'. @@ -1538,7 +1542,7 @@ Teleport around the level. Default key is `^T'. #terrain - Show bare map without displaying monsters, objects, or + Show bare map without displaying monsters, objects, or traps. Autocompletes. #therecmdmenu @@ -1573,12 +1577,8 @@ Note that you must use suitable weapons for this type of combat, or it will be automatically turned off. - #untrap - Untrap something (trap, door, or chest). Default key is `M- - u', and `u' if number_pad is on. - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1588,6 +1588,10 @@ + #untrap + Untrap something (trap, door, or chest). Default key is `M- + u', and `u' if number_pad is on. + In some circumstances it can also be used to rescue trapped monsters. @@ -1595,7 +1599,7 @@ Go up a staircase. Default key is `<'. #vanquished - List vanquished monsters. Autocompletes. Debug mode only. + List vanquished monsters. Autocompletes. Debug mode only. #version Print compile time options for this version of NetHack. Au- @@ -1608,7 +1612,7 @@ Show vision array. Autocompletes. Debug mode only. #wait - Rest one move while doing nothing. Default key is `.', and + Rest one move while doing nothing. Default key is `.', and also ` ' if rest_on_space is on. #wear @@ -1618,7 +1622,7 @@ Tell what a key does. Default key is `&'. #whatis - Show what type of thing a symbol corresponds to. Default + Show what type of thing a symbol corresponds to. Default key is `/'. #wield @@ -1628,23 +1632,19 @@ Wipe off your face. Autocompletes. Default key is `M-w'. #wizbury - Bury objects under and around you. Autocompletes. Debug + Bury objects under and around you. Autocompletes. Debug mode only. #wizdetect - Search for hidden things (secret doors or traps or unseen - monsters) within a modest radius. Autocompletes. Debug + Search for hidden things (secret doors or traps or unseen + monsters) within a modest radius. Autocompletes. Debug mode only. Default key is `^E'. #wizgenesis Create a monster. May be prefixed by a count to create more - than one. Autocompletes. Debug mode only. Default key is - `^G'. - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1654,6 +1654,9 @@ + than one. Autocompletes. Debug mode only. Default key is + `^G'. + #wizidentify Identify all items in inventory. Autocompletes. Debug mode only. Default key is `^I'. @@ -1667,7 +1670,7 @@ Default key is `^V'. #wizmap - Map the level. Autocompletes. Debug mode only. Default + Map the level. Autocompletes. Debug mode only. Default key is `^F'. #wizrumorcheck @@ -1677,11 +1680,11 @@ Smell monster. Autocompletes. Debug mode only. #wizwhere - Show locations of special levels. Autocompletes. Debug + Show locations of special levels. Autocompletes. Debug mode only. #wizwish - Wish for something. Autocompletes. Debug mode only. De- + Wish for something. Autocompletes. Debug mode only. De- fault key is `^W'. #wmode @@ -1696,21 +1699,18 @@ If your keyboard has a meta key (which, when pressed in com- - bination with another key, modifies it by setting the "meta" - [8th, or "high"] bit), you can invoke many extended commands by + bination with another key, modifies it by setting the "meta" + [8th, or "high"] bit), you can invoke many extended commands by meta-ing the first letter of the command. In NT, OS/2, PC and ST NetHack, the "Alt" key can be used in - this fashion; on the Amiga, set the altmeta option to get this - behavior. On other systems, if typing "Alt" plus another key - transmits a two character sequence consisting of an Escape fol- - lowed by the other key, you may set the altmeta option to have - NetHack combine them into meta+key. + this fashion; on the Amiga, set the altmeta option to get this + behavior. On other systems, if typing "Alt" plus another key + transmits a two character sequence consisting of an Escape fol- + lowed by the other key, you may set the altmeta option to have - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1720,6 +1720,8 @@ + NetHack combine them into meta+key. + M-? #? (not supported by all platforms) M-2 #twoweapon (unless the number_pad option is enabled) @@ -1774,9 +1776,7 @@ - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1786,7 +1786,9 @@ - If the number_pad option is on, some additional letter com- + + + If the number_pad option is on, some additional letter com- mands are available: h #help @@ -1803,9 +1805,9 @@ 5. Rooms and corridors - Rooms and corridors in the dungeon are either lit or dark. - Any lit areas within your line of sight will be displayed; dark - areas are only displayed if they are within one space of you. + Rooms and corridors in the dungeon are either lit or dark. + Any lit areas within your line of sight will be displayed; dark + areas are only displayed if they are within one space of you. Walls and corridors remain on the map as you explore them. Secret corridors are hidden. You can find them with the `s' @@ -1814,35 +1816,33 @@ 5.1. Doorways Doorways connect rooms and corridors. Some doorways have no - doors; you can walk right through. Others have doors in them, + doors; you can walk right through. Others have doors in them, which may be open, closed, or locked. To open a closed door, use - the `o' (open) command; to close it again, use the `c' (close) + the `o' (open) command; to close it again, use the `c' (close) command. - You can get through a locked door by using a tool to pick + You can get through a locked door by using a tool to pick the lock with the `a' (apply) command, or by kicking it open with the `^D' (kick) command. - Open doors cannot be entered diagonally; you must approach - them straight on, horizontally or vertically. Doorways without + Open doors cannot be entered diagonally; you must approach + them straight on, horizontally or vertically. Doorways without doors are not restricted in this fashion. - Doors can be useful for shutting out monsters. Most mon- - sters cannot open doors, although a few don't need to (for exam- + Doors can be useful for shutting out monsters. Most mon- + sters cannot open doors, although a few don't need to (for exam- ple, ghosts can walk through doors). - Secret doors are hidden. You can find them with the `s' - (search) command. Once found they are in all ways equivalent to + Secret doors are hidden. You can find them with the `s' + (search) command. Once found they are in all ways equivalent to normal doors. - 5.2. Traps (`^') - - There are traps throughout the dungeon to snare the unwary - delver. For example, you may suddenly fall into a pit and be - stuck for a few turns trying to climb out. Traps don't appear on - NetHack 3.6 May 7, 2019 + + + + NetHack 3.7 October 1, 2019 @@ -1852,63 +1852,63 @@ + 5.2. Traps (`^') + + There are traps throughout the dungeon to snare the unwary + delver. For example, you may suddenly fall into a pit and be + stuck for a few turns trying to climb out. Traps don't appear on your map until you see one triggered by moving onto it, see some- thing fall into it, or you discover it with the `s' (search) com- - mand. Monsters can fall prey to traps, too, which can be a very + mand. Monsters can fall prey to traps, too, which can be a very useful defensive strategy. There is a special pre-mapped branch of the dungeon based on - the classic computer game "Sokoban." The goal is to push the - boulders into the pits or holes. With careful foresight, it is - possible to complete all of the levels according to the tradi- - tional rules of Sokoban. Some allowances are permitted in case + the classic computer game "Sokoban." The goal is to push the + boulders into the pits or holes. With careful foresight, it is + possible to complete all of the levels according to the tradi- + tional rules of Sokoban. Some allowances are permitted in case the player gets stuck; however, they will lower your luck. 5.3. Stairs and ladders (`<', `>') - In general, each level in the dungeon will have a staircase + In general, each level in the dungeon will have a staircase going up (`<') to the previous level and another going down (`>') - to the next level. There are some exceptions though. For in- - stance, fairly early in the dungeon you will find a level with + to the next level. There are some exceptions though. For in- + stance, fairly early in the dungeon you will find a level with two down staircases, one continuing into the dungeon and the oth- - er branching into an area known as the Gnomish Mines. Those - mines eventually hit a dead end, so after exploring them (if you - choose to do so), you'll need to climb back up to the main dun- + er branching into an area known as the Gnomish Mines. Those + mines eventually hit a dead end, so after exploring them (if you + choose to do so), you'll need to climb back up to the main dun- geon. - When you traverse a set of stairs, or trigger a trap which - sends you to another level, the level you're leaving will be de- - activated and stored in a file on disk. If you're moving to a + When you traverse a set of stairs, or trigger a trap which + sends you to another level, the level you're leaving will be de- + activated and stored in a file on disk. If you're moving to a previously visited level, it will be loaded from its file on disk - and reactivated. If you're moving to a level which has not yet - been visited, it will be created (from scratch for most random + and reactivated. If you're moving to a level which has not yet + been visited, it will be created (from scratch for most random levels, from a template for some "special" levels, or loaded from the remains of an earlier game for a "bones" level as briefly de- - scribed below). Monsters are only active on the current level; + scribed below). Monsters are only active on the current level; those on other levels are essentially placed into stasis. - Ordinarily when you climb a set of stairs, you will arrive - on the corresponding staircase at your destination. However, - pets (see below) and some other monsters will follow along if + Ordinarily when you climb a set of stairs, you will arrive + on the corresponding staircase at your destination. However, + pets (see below) and some other monsters will follow along if they're close enough when you travel up or down stairs, and occa- - sionally one of these creatures will displace you during the + sionally one of these creatures will displace you during the climb. When that occurs, the pet or other monster will arrive on the staircase and you will end up nearby. - Ladders serve the same purpose as staircases, and the two - types of inter-level connections are nearly indistinguishable + Ladders serve the same purpose as staircases, and the two + types of inter-level connections are nearly indistinguishable during game play. - 5.4. Shops and shopping - - Occasionally you will run across a room with a shopkeeper - near the door and many items lying on the floor. You can buy - items by picking them up and then using the `p' command. You can - inquire about the price of an item prior to picking it up by us- - ing the "#chat" command while standing on it. Using an item - NetHack 3.6 May 7, 2019 + + + NetHack 3.7 October 1, 2019 @@ -1918,9 +1918,15 @@ - prior to paying for it will incur a charge, and the shopkeeper - won't allow you to leave the shop until you have paid any debt - you owe. + 5.4. Shops and shopping + + Occasionally you will run across a room with a shopkeeper + near the door and many items lying on the floor. You can buy + items by picking them up and then using the `p' command. You can + inquire about the price of an item prior to picking it up by us- + ing the "#chat" command while standing on it. Using an item pri- + or to paying for it will incur a charge, and the shopkeeper won't + allow you to leave the shop until you have paid any debt you owe. You can sell items to a shopkeeper by dropping them to the floor while inside a shop. You will either be offered an amount @@ -1955,26 +1961,20 @@ * The price of a given item can vary due to a variety of factors. - * A shopkeeper treats the spot immediately inside the door as if + * A shopkeeper treats the spot immediately inside the door as if it were outside the shop. * While the shopkeeper watches you like a hawk, he will generally ignore any other customers. - * If a shop is "closed for inventory," it will not open of its + * If a shop is "closed for inventory," it will not open of its own accord. * Shops do not get restocked with new items, regardless of inven- tory depletion. - 6. Monsters - Monsters you cannot see are not displayed on the screen. - Beware! You may suddenly come upon one in a dark place. Some - magic items can help you locate them before they locate you - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -1984,25 +1984,30 @@ + 6. Monsters + + Monsters you cannot see are not displayed on the screen. + Beware! You may suddenly come upon one in a dark place. Some + magic items can help you locate them before they locate you (which some monsters can do very well). - The commands `/' and `;' may be used to obtain information - about those monsters who are displayed on the screen. The com- - mand "#name" (by default bound to `C'), allows you to assign a - name to a monster, which may be useful to help distinguish one - from another when multiple monsters are present. Assigning a + The commands `/' and `;' may be used to obtain information + about those monsters who are displayed on the screen. The com- + mand "#name" (by default bound to `C'), allows you to assign a + name to a monster, which may be useful to help distinguish one + from another when multiple monsters are present. Assigning a name which is just a space will remove any prior name. The extended command "#chat" can be used to interact with an adjacent monster. There is no actual dialog (in other words, you don't get to choose what you'll say), but chatting with some mon- - sters such as a shopkeeper or the Oracle of Delphi can produce + sters such as a shopkeeper or the Oracle of Delphi can produce useful results. 6.1. Fighting - If you see a monster and you wish to fight it, just attempt - to walk into it. Many monsters you find will mind their own + If you see a monster and you wish to fight it, just attempt + to walk into it. Many monsters you find will mind their own business unless you attack them. Some of them are very dangerous when angered. Remember: discretion is the better part of valor. @@ -2034,13 +2039,8 @@ feed it, too, by throwing it food. A properly trained pet can be very useful under certain circumstances. - Your pet also gains experience from killing monsters, and - can grow over time, gaining hit points and doing more damage. - Initially, your pet may even be better at killing things than - you, which makes pets useful for low-level characters. - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2050,6 +2050,11 @@ + Your pet also gains experience from killing monsters, and + can grow over time, gaining hit points and doing more damage. + Initially, your pet may even be better at killing things than + you, which makes pets useful for low-level characters. + Your pet will follow you up and down staircases if it is next to you when you move. Otherwise your pet will be stranded and may become wild. Similarly, when you trigger certain types @@ -2076,37 +2081,32 @@ Use the `a' (apply) command and pick a saddle in your inven- tory to attempt to put that saddle on an adjacent creature. If - successful, it will be transferred to that creature's inventory. + successful, it will be transferred to that creature's inventory. Use the "#loot" command while adjacent to a saddled creature - to try to remove the saddle from that creature. If successful, + to try to remove the saddle from that creature. If successful, it will be transferred to your inventory. 6.4. Bones levels - You may encounter the shades and corpses of other adventur- + You may encounter the shades and corpses of other adventur- ers (or even former incarnations of yourself!) and their personal - effects. Ghosts are hard to kill, but easy to avoid, since - they're slow and do little damage. You can plunder the deceased - adventurer's possessions; however, they are likely to be cursed. + effects. Ghosts are hard to kill, but easy to avoid, since + they're slow and do little damage. You can plunder the deceased + adventurer's possessions; however, they are likely to be cursed. Beware of whatever killed the former player; it is probably still lurking around, gloating over its last victory. 6.5. Persistence of Monsters Monsters (a generic reference which also includes humans and - pets) are only shown while they can be seen or otherwise sensed. - Moving to a location where you can't see or sense a monster any - more will result in it disappearing from your map, similarly if + pets) are only shown while they can be seen or otherwise sensed. + Moving to a location where you can't see or sense a monster any + more will result in it disappearing from your map, similarly if it is the one who moved rather than you. - However, if you encounter a monster which you can't see or - sense -- perhaps it is invisible and has just tapped you on the - noggin -- a special "remembered, unseen monster" marker will be - displayed at the location where you think it is. That will - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2116,63 +2116,63 @@ - persist until you have proven that there is no monster there, - even if the unseen monster moves to another location or you move - to a spot where the marker's location ordinarily wouldn't be seen - any more. + However, if you encounter a monster which you can't see or + sense -- perhaps it is invisible and has just tapped you on the + noggin -- a special "remembered, unseen monster" marker will be + displayed at the location where you think it is. That will per- + sist until you have proven that there is no monster there, even + if the unseen monster moves to another location or you move to a + spot where the marker's location ordinarily wouldn't be seen any + more. 7. Objects When you find something in the dungeon, it is common to want to pick it up. In NetHack, this is accomplished automatically by - walking over the object (unless you turn off the autopickup op- - tion (see below), or move with the `m' prefix (see above)), or + walking over the object (unless you turn off the autopickup op- + tion (see below), or move with the `m' prefix (see above)), or manually by using the `,' command. - If you're carrying too many items, NetHack will tell you so - and you won't be able to pick up anything more. Otherwise, it - will add the object(s) to your pack and tell you what you just + If you're carrying too many items, NetHack will tell you so + and you won't be able to pick up anything more. Otherwise, it + will add the object(s) to your pack and tell you what you just picked up. - As you add items to your inventory, you also add the weight - of that object to your load. The amount that you can carry de- - pends on your strength and your constitution. The stronger and - sturdier you are, the less the additional load will affect you. + As you add items to your inventory, you also add the weight + of that object to your load. The amount that you can carry de- + pends on your strength and your constitution. The stronger and + sturdier you are, the less the additional load will affect you. There comes a point, though, when the weight of all of that stuff - you are carrying around with you through the dungeon will encum- + you are carrying around with you through the dungeon will encum- ber you. Your reactions will get slower and you'll burn calories - faster, requiring food more frequently to cope with it. Eventu- - ally, you'll be so overloaded that you'll either have to discard + faster, requiring food more frequently to cope with it. Eventu- + ally, you'll be so overloaded that you'll either have to discard some of what you're carrying or collapse under its weight. - NetHack will tell you how badly you have loaded yourself. - If you are encumbered, one of the conditions "Burdened", + NetHack will tell you how badly you have loaded yourself. + If you are encumbered, one of the conditions "Burdened", "Stressed", "Strained", "Overtaxed" or "Overloaded" will be shown on the bottom line status display. When you pick up an object, it is assigned an inventory let- - ter. Many commands that operate on objects must ask you to find - out which object you want to use. When NetHack asks you to + ter. Many commands that operate on objects must ask you to find + out which object you want to use. When NetHack asks you to choose a particular object you are carrying, you are usually pre- - sented with a list of inventory letters to choose from (see Com- + sented with a list of inventory letters to choose from (see Com- mands, above). - Some objects, such as weapons, are easily differentiated. - Others, like scrolls and potions, are given descriptions which - vary according to type. During a game, any two objects with the - same description are the same type. However, the descriptions + Some objects, such as weapons, are easily differentiated. + Others, like scrolls and potions, are given descriptions which + vary according to type. During a game, any two objects with the + same description are the same type. However, the descriptions will vary from game to game. When you use one of these objects, if its effect is obvious, - NetHack will remember what it is for you. If its effect isn't - extremely obvious, you will be asked what you want to call this - type of object so you will recognize it later. You can also use - the "#name" command, for the same purpose at any time, to name - all objects of a particular type or just an individual object. - When you use "#name" on an object which has already been named, + NetHack will remember what it is for you. If its effect isn't + extremely obvious, you will be asked what you want to call this - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2182,63 +2182,63 @@ - specifying a space as the value will remove the prior name in- + type of object so you will recognize it later. You can also use + the "#name" command, for the same purpose at any time, to name + all objects of a particular type or just an individual object. + When you use "#name" on an object which has already been named, + specifying a space as the value will remove the prior name in- stead of assigning a new one. 7.1. Curses and Blessings - Any object that you find may be cursed, even if the object + Any object that you find may be cursed, even if the object is otherwise helpful. The most common effect of a curse is being - stuck with (and to) the item. Cursed weapons weld themselves to - your hand when wielded, so you cannot unwield them. Any cursed - item you wear is not removable by ordinary means. In addition, - cursed arms and armor usually, but not always, bear negative en- + stuck with (and to) the item. Cursed weapons weld themselves to + your hand when wielded, so you cannot unwield them. Any cursed + item you wear is not removable by ordinary means. In addition, + cursed arms and armor usually, but not always, bear negative en- chantments that make them less effective in combat. Other cursed objects may act poorly or detrimentally in other ways. - Objects can also be blessed. Blessed items usually work - better or more beneficially than normal uncursed items. For ex- + Objects can also be blessed. Blessed items usually work + better or more beneficially than normal uncursed items. For ex- ample, a blessed weapon will do more damage against demons. Objects which are neither cursed nor blessed are referred to - as uncursed. They could just as easily have been described as - unblessed, but the uncursed designation is what you will see - within the game. A "glass half full versus glass half empty" + as uncursed. They could just as easily have been described as + unblessed, but the uncursed designation is what you will see + within the game. A "glass half full versus glass half empty" situation; make of that what you will. There are magical means of bestowing or removing curses upon - objects, so even if you are stuck with one, you can still have - the curse lifted and the item removed. Priests and Priestesses - have an innate sensitivity to this property in any object, so - they can more easily avoid cursed objects than other character + objects, so even if you are stuck with one, you can still have + the curse lifted and the item removed. Priests and Priestesses + have an innate sensitivity to this property in any object, so + they can more easily avoid cursed objects than other character roles. - An item with unknown status will be reported in your inven- + An item with unknown status will be reported in your inven- tory with no prefix. An item which you know the state of will be - distinguished in your inventory by the presence of the word + distinguished in your inventory by the presence of the word "cursed", "uncursed" or "blessed" in the description of the item. - In some cases "uncursed" will be omitted as being redundant when + In some cases "uncursed" will be omitted as being redundant when enough other information is displayed. The implicit_uncursed op- - tion can be used to control this; toggle it off to have "un- + tion can be used to control this; toggle it off to have "un- cursed" be displayed even when that can be deduced from other at- tributes. 7.2. Weapons (`)') - Given a chance, most monsters in the Mazes of Menace will - gratuitously try to kill you. You need weapons for self-defense - (killing them first). Without a weapon, you do only 1-2 hit - points of damage (plus bonuses, if any). Monk characters are an - exception; they normally do more damage with bare (or gloved) + Given a chance, most monsters in the Mazes of Menace will + gratuitously try to kill you. You need weapons for self-defense + (killing them first). Without a weapon, you do only 1-2 hit + points of damage (plus bonuses, if any). Monk characters are an + exception; they normally do more damage with bare (or gloved) hands than they do with weapons. - There are wielded weapons, like maces and swords, and thrown - weapons, like arrows and spears. To hit monsters with a weapon, - you must wield it and attack them, or throw it at them. You can - simply elect to throw a spear. To shoot an arrow, you should - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2248,63 +2248,63 @@ - first wield a bow, then throw the arrow. Crossbows shoot cross- + There are wielded weapons, like maces and swords, and thrown + weapons, like arrows and spears. To hit monsters with a weapon, + you must wield it and attack them, or throw it at them. You can + simply elect to throw a spear. To shoot an arrow, you should + first wield a bow, then throw the arrow. Crossbows shoot cross- bow bolts. Slings hurl rocks and (other) stones (like gems). - Enchanted weapons have a "plus" (or "to hit enhancement" - which can be either positive or negative) that adds to your - chance to hit and the damage you do to a monster. The only way + Enchanted weapons have a "plus" (or "to hit enhancement" + which can be either positive or negative) that adds to your + chance to hit and the damage you do to a monster. The only way to determine a weapon's enchantment is to have it magically iden- - tified somehow. Most weapons are subject to some type of damage + tified somehow. Most weapons are subject to some type of damage like rust. Such "erosion" damage can be repaired. - The chance that an attack will successfully hit a monster, - and the amount of damage such a hit will do, depends upon many - factors. Among them are: type of weapon, quality of weapon (en- + The chance that an attack will successfully hit a monster, + and the amount of damage such a hit will do, depends upon many + factors. Among them are: type of weapon, quality of weapon (en- chantment and/or erosion), experience level, strength, dexterity, - encumbrance, and proficiency (see below). The monster's armor + encumbrance, and proficiency (see below). The monster's armor class -- a general defense rating, not necessarily due to wearing of armor -- is a factor too; also, some monsters are particularly vulnerable to certain types of weapons. - Many weapons can be wielded in one hand; some require both - hands. When wielding a two-handed weapon, you can not wear a - shield, and vice versa. When wielding a one-handed weapon, you - can have another weapon ready to use by setting things up with - the `x' command, which exchanges your primary (the one being - wielded) and alternate weapons. And if you have proficiency in - the "two weapon combat" skill, you may wield both weapons simul- + Many weapons can be wielded in one hand; some require both + hands. When wielding a two-handed weapon, you can not wear a + shield, and vice versa. When wielding a one-handed weapon, you + can have another weapon ready to use by setting things up with + the `x' command, which exchanges your primary (the one being + wielded) and alternate weapons. And if you have proficiency in + the "two weapon combat" skill, you may wield both weapons simul- taneously as primary and secondary; use the `X' command to engage - or disengage that. Only some types of characters (barbarians, + or disengage that. Only some types of characters (barbarians, for instance) have the necessary skill available. Even with that - skill, using two weapons at once incurs a penalty in the chance + skill, using two weapons at once incurs a penalty in the chance to hit your target compared to using just one weapon at a time. - There might be times when you'd rather not wield any weapon - at all. To accomplish that, wield `-', or else use the `A' com- - mand which allows you to unwield the current weapon in addition + There might be times when you'd rather not wield any weapon + at all. To accomplish that, wield `-', or else use the `A' com- + mand which allows you to unwield the current weapon in addition to taking off other worn items. - Those of you in the audience who are AD&D players, be aware + Those of you in the audience who are AD&D players, be aware that each weapon which existed in AD&D does roughly the same dam- - age to monsters in NetHack. Some of the more obscure weapons + age to monsters in NetHack. Some of the more obscure weapons (such as the aklys, lucern hammer, and bec-de-corbin) are defined in an appendix to Unearthed Arcana, an AD&D supplement. - The commands to use weapons are `w' (wield), `t' (throw), - `f' (fire, an alternate way of throwing), `Q' (quiver), `x' (ex- + The commands to use weapons are `w' (wield), `t' (throw), + `f' (fire, an alternate way of throwing), `Q' (quiver), `x' (ex- change), `X' (twoweapon), and "#enhance" (see below). - 7.2.1. Throwing and shooting - - You can throw just about anything via the `t' command. It - will prompt for the item to throw; picking `?' will list things - in your inventory which are considered likely to be thrown, or - picking `*' will list your entire inventory. After you've chosen - what to throw, you will be prompted for a direction rather than - NetHack 3.6 May 7, 2019 + + + + NetHack 3.7 October 1, 2019 @@ -2314,35 +2314,42 @@ - for a specific target. The distance something can be thrown de- + 7.2.1. Throwing and shooting + + You can throw just about anything via the `t' command. It + will prompt for the item to throw; picking `?' will list things + in your inventory which are considered likely to be thrown, or + picking `*' will list your entire inventory. After you've chosen + what to throw, you will be prompted for a direction rather than + for a specific target. The distance something can be thrown de- pends mainly on the type of object and your strength. Arrows can - be thrown by hand, but can be thrown much farther and will be + be thrown by hand, but can be thrown much farther and will be more likely to hit when thrown while you are wielding a bow. - You can simplify the throwing operation by using the `Q' - command to select your preferred "missile", then using the `f' - command to throw it. You'll be prompted for a direction as - above, but you don't have to specify which item to throw each + You can simplify the throwing operation by using the `Q' + command to select your preferred "missile", then using the `f' + command to throw it. You'll be prompted for a direction as + above, but you don't have to specify which item to throw each time you use `f'. There is also an option, autoquiver, which has NetHack choose another item to automatically fill your quiver (or - quiver sack, or have at the ready) when the inventory slot used + quiver sack, or have at the ready) when the inventory slot used for `Q' runs out. - Some characters have the ability to fire a volley of multi- - ple items in a single turn. Knowing how to load several rounds + Some characters have the ability to fire a volley of multi- + ple items in a single turn. Knowing how to load several rounds of ammunition at once -- or hold several missiles in your hand -- - and still hit a target is not an easy task. Rangers are among - those who are adept at this task, as are those with a high level - of proficiency in the relevant weapon skill (in bow skill if - you're wielding one to shoot arrows, in crossbow skill if you're + and still hit a target is not an easy task. Rangers are among + those who are adept at this task, as are those with a high level + of proficiency in the relevant weapon skill (in bow skill if + you're wielding one to shoot arrows, in crossbow skill if you're wielding one to shoot bolts, or in sling skill if you're wielding one to shoot stones). The number of items that the character has - a chance to fire varies from turn to turn. You can explicitly - limit the number of shots by using a numeric prefix before the - `t' or `f' command. For example, "2f" (or "n2f" if using num- + a chance to fire varies from turn to turn. You can explicitly + limit the number of shots by using a numeric prefix before the + `t' or `f' command. For example, "2f" (or "n2f" if using num- ber_pad mode) would ensure that at most 2 arrows are shot even if - you could have fired 3. If you specify a larger number than - would have been shot ("4f" in this example), you'll just end up + you could have fired 3. If you specify a larger number than + would have been shot ("4f" in this example), you'll just end up shooting the same number (3, here) as if no limit had been speci- fied. Once the volley is in motion, all of the items will travel in the same direction; if the first ones kill a monster, the oth- @@ -2351,26 +2358,19 @@ 7.2.2. Weapon proficiency You will have varying degrees of skill in the weapons avail- - able. Weapon proficiency, or weapon skills, affect how well you - can use particular types of weapons, and you'll be able to im- - prove your skills as you progress through a game, depending on + able. Weapon proficiency, or weapon skills, affect how well you + can use particular types of weapons, and you'll be able to im- + prove your skills as you progress through a game, depending on your role, your experience level, and use of the weapons. - For the purposes of proficiency, weapons have been divided - up into various groups such as daggers, broadswords, and - polearms. Each role has a limit on what level of proficiency a - character can achieve for each group. For instance, wizards can - become highly skilled in daggers or staves but not in swords or - bows. - - The "#enhance" extended command is used to review current - weapons proficiency (also spell proficiency) and to choose which - skill(s) to improve when you've used one or more skills enough to - become eligible to do so. The skill rankings are "none" (some- - times also referred to as "restricted", because you won't be able + For the purposes of proficiency, weapons have been divided + up into various groups such as daggers, broadswords, and + polearms. Each role has a limit on what level of proficiency a + character can achieve for each group. For instance, wizards can + become highly skilled in daggers or staves but not in swords or - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2380,63 +2380,63 @@ - to advance), "unskilled", "basic", "skilled", and "expert". Re- + bows. + + The "#enhance" extended command is used to review current + weapons proficiency (also spell proficiency) and to choose which + skill(s) to improve when you've used one or more skills enough to + become eligible to do so. The skill rankings are "none" (some- + times also referred to as "restricted", because you won't be able + to advance), "unskilled", "basic", "skilled", and "expert". Re- stricted skills simply will not appear in the list shown by "#en- hance". (Divine intervention might unrestrict a particular skill, in which case it will start at unskilled and be limited to - basic.) Some characters can enhance their barehanded combat or + basic.) Some characters can enhance their barehanded combat or martial arts skill beyond expert to "master" or "grand master". Use of a weapon in which you're restricted or unskilled will incur a modest penalty in the chance to hit a monster and also in - the amount of damage done when you do hit; at basic level, there - is no penalty or bonus; at skilled level, you receive a modest - bonus in the chance to hit and amount of damage done; at expert - level, the bonus is higher. A successful hit has a chance to - boost your training towards the next skill level (unless you've - already reached the limit for this skill). Once such training - reaches the threshold for that next level, you'll be told that - you feel more confident in your skills. At that point you can - use "#enhance" to increase one or more skills. Such skills are - not increased automatically because there is a limit to your to- - tal overall skills, so you need to actively choose which skills + the amount of damage done when you do hit; at basic level, there + is no penalty or bonus; at skilled level, you receive a modest + bonus in the chance to hit and amount of damage done; at expert + level, the bonus is higher. A successful hit has a chance to + boost your training towards the next skill level (unless you've + already reached the limit for this skill). Once such training + reaches the threshold for that next level, you'll be told that + you feel more confident in your skills. At that point you can + use "#enhance" to increase one or more skills. Such skills are + not increased automatically because there is a limit to your to- + tal overall skills, so you need to actively choose which skills to enhance and which to ignore. 7.2.3. Two-Weapon combat Some characters can use two weapons at once. Setting things - up to do so can seem cumbersome but becomes second nature with + up to do so can seem cumbersome but becomes second nature with use. To wield two weapons, you need to use the "#twoweapon" com- - mand. But first you need to have a weapon in each hand. (Note - that your two weapons are not fully equal; the one in the hand - you normally wield with is considered primary and the other one + mand. But first you need to have a weapon in each hand. (Note + that your two weapons are not fully equal; the one in the hand + you normally wield with is considered primary and the other one is considered secondary. The most noticeable difference is after - you stop -- or before you begin, for that matter -- wielding two + you stop -- or before you begin, for that matter -- wielding two weapons at once. The primary is your wielded weapon and the sec- - ondary is just an item in your inventory that's been designated + ondary is just an item in your inventory that's been designated as alternate weapon.) If your primary weapon is wielded but your off hand is empty - or has the wrong weapon, use the sequence `x', `w', `x' to first - swap your primary into your off hand, wield whatever you want as - secondary weapon, then swap them both back into the intended + or has the wrong weapon, use the sequence `x', `w', `x' to first + swap your primary into your off hand, wield whatever you want as + secondary weapon, then swap them both back into the intended hands. If your secondary or alternate weapon is correct but your primary one is not, simply use `w' to wield the primary. Lastly, - if neither hand holds the correct weapon, use `w', `x', `w' to + if neither hand holds the correct weapon, use `w', `x', `w' to first wield the intended secondary, swap it to off hand, and then wield the primary. - The whole process can be simplified via use of the push- - weapon option. When it is enabled, then using `w' to wield some- - thing causes the currently wielded weapon to become your alter- - nate weapon. So the sequence `w', `w' can be used to first wield - the weapon you intend to be secondary, and then wield the one you - want as primary which will push the first into secondary posi- - tion. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2446,8 +2446,16 @@ - When in two-weapon combat mode, using the `X' command tog- - gles back to single-weapon mode. Throwing or dropping either of + The whole process can be simplified via use of the push- + weapon option. When it is enabled, then using `w' to wield some- + thing causes the currently wielded weapon to become your alter- + nate weapon. So the sequence `w', `w' can be used to first wield + the weapon you intend to be secondary, and then wield the one you + want as primary which will push the first into secondary posi- + tion. + + When in two-weapon combat mode, using the `X' command tog- + gles back to single-weapon mode. Throwing or dropping either of the weapons or having one of them be stolen or destroyed will al- so make you revert to single-weapon combat. @@ -2455,10 +2463,10 @@ Lots of unfriendly things lurk about; you need armor to pro- tect yourself from their blows. Some types of armor offer better - protection than others. Your armor class is a measure of this + protection than others. Your armor class is a measure of this protection. Armor class (AC) is measured as in AD&D, with 10 be- - ing the equivalent of no armor, and lower numbers meaning better - armor. Each suit of armor which exists in AD&D gives the same + ing the equivalent of no armor, and lower numbers meaning better + armor. Each suit of armor which exists in AD&D gives the same protection in NetHack. Here is an (incomplete) list of the armor classes provided by various suits of armor: dragon scale mail 1 @@ -2480,29 +2488,21 @@ leather jacket 9 no armor 10 - You can also wear other pieces of armor (for example hel- + You can also wear other pieces of armor (for example hel- mets, boots, shields, cloaks) to lower your armor class even fur- - ther, but you can only wear one item of each category (one suit - of armor, one cloak, one helmet, one shield, and so on) at a + ther, but you can only wear one item of each category (one suit + of armor, one cloak, one helmet, one shield, and so on) at a time. - If a piece of armor is enchanted, its armor protection will - be better (or worse) than normal, and its "plus" (or minus) will - subtract from your armor class. For example, a +1 chain mail + If a piece of armor is enchanted, its armor protection will + be better (or worse) than normal, and its "plus" (or minus) will + subtract from your armor class. For example, a +1 chain mail would give you better protection than normal chain mail, lowering - your armor class one unit further to 4. When you put on a piece - of armor, you immediately find out the armor class and any - "plusses" it provides. Cursed pieces of armor usually have nega- - tive enchantments (minuses) in addition to being unremovable. - - Many types of armor are subject to some kind of damage like - rust. Such damage can be repaired. Some types of armor may in- - hibit spell casting. + your armor class one unit further to 4. When you put on a piece + of armor, you immediately find out the armor class and any - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2512,63 +2512,63 @@ + "plusses" it provides. Cursed pieces of armor usually have nega- + tive enchantments (minuses) in addition to being unremovable. + + Many types of armor are subject to some kind of damage like + rust. Such damage can be repaired. Some types of armor may in- + hibit spell casting. + The commands to use armor are `W' (wear) and `T' (take off). - The `A' command can also be used to take off armor as well as + The `A' command can also be used to take off armor as well as other worn items. 7.4. Food (`%') - Food is necessary to survive. If you go too long without - eating you will faint, and eventually die of starvation. Some - types of food will spoil, and become unhealthy to eat, if not + Food is necessary to survive. If you go too long without + eating you will faint, and eventually die of starvation. Some + types of food will spoil, and become unhealthy to eat, if not protected. Food stored in ice boxes or tins ("cans") will usual- - ly stay fresh, but ice boxes are heavy, and tins take a while to + ly stay fresh, but ice boxes are heavy, and tins take a while to open. When you kill monsters, they usually leave corpses which are - also "food." Many, but not all, of these are edible; some also - give you special powers when you eat them. A good rule of thumb + also "food." Many, but not all, of these are edible; some also + give you special powers when you eat them. A good rule of thumb is "you are what you eat." Some character roles and some monsters are vegetarian. Veg- - etarian monsters will typically never eat animal corpses, while - vegetarian players can, but with some rather unpleasant side-ef- + etarian monsters will typically never eat animal corpses, while + vegetarian players can, but with some rather unpleasant side-ef- fects. - You can name one food item after something you like to eat + You can name one food item after something you like to eat with the fruit option. The command to eat food is `e'. 7.5. Scrolls (`?') - Scrolls are labeled with various titles, probably chosen by + Scrolls are labeled with various titles, probably chosen by ancient wizards for their amusement value (for example "READ ME," - or "THANX MAUD" backwards). Scrolls disappear after you read + or "THANX MAUD" backwards). Scrolls disappear after you read them (except for blank ones, without magic spells on them). - One of the most useful of these is the scroll of identify, + One of the most useful of these is the scroll of identify, which can be used to determine what another object is, whether it - is cursed or blessed, and how many uses it has left. Some ob- - jects of subtle enchantment are difficult to identify without + is cursed or blessed, and how many uses it has left. Some ob- + jects of subtle enchantment are difficult to identify without these. A mail daemon may run up and deliver mail to you as a scroll - of mail (on versions compiled with this feature). To use this - feature on versions where NetHack mail delivery is triggered by - electronic mail appearing in your system mailbox, you must let + of mail (on versions compiled with this feature). To use this + feature on versions where NetHack mail delivery is triggered by + electronic mail appearing in your system mailbox, you must let NetHack know where to look for new mail by setting the "MAIL" en- - vironment variable to the file name of your mailbox. You may al- - so want to set the "MAILREADER" environment variable to the file - name of your favorite reader, so NetHack can shell to it when you - read the scroll. On versions of NetHack where mail is randomly - generated internal to the game, these environment variables are - ignored. You can disable the mail daemon by turning off the mail - option. + vironment variable to the file name of your mailbox. You may - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2578,63 +2578,63 @@ + also want to set the "MAILREADER" environment variable to the + file name of your favorite reader, so NetHack can shell to it + when you read the scroll. On versions of NetHack where mail is + randomly generated internal to the game, these environment vari- + ables are ignored. You can disable the mail daemon by turning + off the mail option. + The command to read a scroll is `r'. 7.6. Potions (`!') - Potions are distinguished by the color of the liquid inside + Potions are distinguished by the color of the liquid inside the flask. They disappear after you quaff them. - Clear potions are potions of water. Sometimes these are + Clear potions are potions of water. Sometimes these are blessed or cursed, resulting in holy or unholy water. Holy water - is the bane of the undead, so potions of holy water are good - things to throw (`t') at them. It is also sometimes very useful + is the bane of the undead, so potions of holy water are good + things to throw (`t') at them. It is also sometimes very useful to dip ("#dip") an object into a potion. The command to drink a potion is `q' (quaff). 7.7. Wands (`/') - Wands usually have multiple magical charges. Some types of + Wands usually have multiple magical charges. Some types of wands require a direction in which to zap them. You can also zap - them at yourself (just give a `.' or `s' for the direction). Be - warned, however, for this is often unwise. Other types of wands - don't require a direction. The number of charges in a wand is + them at yourself (just give a `.' or `s' for the direction). Be + warned, however, for this is often unwise. Other types of wands + don't require a direction. The number of charges in a wand is random and decreases by one whenever you use it. - When the number of charges left in a wand becomes zero, at- - tempts to use the wand will usually result in nothing happening. + When the number of charges left in a wand becomes zero, at- + tempts to use the wand will usually result in nothing happening. Occasionally, however, it may be possible to squeeze the last few - mana points from an otherwise spent wand, destroying it in the - process. A wand may be recharged by using suitable magic, but - doing so runs the risk of causing it to explode. The chance for - such an explosion starts out very small and increases each time + mana points from an otherwise spent wand, destroying it in the + process. A wand may be recharged by using suitable magic, but + doing so runs the risk of causing it to explode. The chance for + such an explosion starts out very small and increases each time the wand is recharged. In a truly desperate situation, when your back is up against - the wall, you might decide to go for broke and break your wand. - This is not for the faint of heart. Doing so will almost cer- + the wall, you might decide to go for broke and break your wand. + This is not for the faint of heart. Doing so will almost cer- tainly cause a catastrophic release of magical energies. - When you have fully identified a particular wand, inventory - display will include additional information in parentheses: the - number of times it has been recharged followed by a colon and + When you have fully identified a particular wand, inventory + display will include additional information in parentheses: the + number of times it has been recharged followed by a colon and then by its current number of charges. A current charge count of -1 is a special case indicating that the wand has been cancelled. The command to use a wand is `z' (zap). To break one, use the `a' (apply) command. - 7.8. Rings (`=') - - Rings are very useful items, since they are relatively per- - manent magic, unlike the usually fleeting effects of potions, - scrolls, and wands. - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2644,6 +2644,12 @@ + 7.8. Rings (`=') + + Rings are very useful items, since they are relatively per- + manent magic, unlike the usually fleeting effects of potions, + scrolls, and wands. + Putting on a ring activates its magic. You can wear only two rings, one on each ring finger. @@ -2655,52 +2661,46 @@ 7.9. Spellbooks (`+') Spellbooks are tomes of mighty magic. When studied with the - `r' (read) command, they transfer to the reader the knowledge of - a spell (and therefore eventually become unreadable) -- unless - the attempt backfires. Reading a cursed spellbook or one with + `r' (read) command, they transfer to the reader the knowledge of + a spell (and therefore eventually become unreadable) -- unless + the attempt backfires. Reading a cursed spellbook or one with mystic runes beyond your ken can be harmful to your health! - A spell (even when learned) can also backfire when you cast - it. If you attempt to cast a spell well above your experience - level, or if you have little skill with the appropriate spell - type, or cast it at a time when your luck is particularly bad, - you can end up wasting both the energy and the time required in + A spell (even when learned) can also backfire when you cast + it. If you attempt to cast a spell well above your experience + level, or if you have little skill with the appropriate spell + type, or cast it at a time when your luck is particularly bad, + you can end up wasting both the energy and the time required in casting. - Casting a spell calls forth magical energies and focuses - them with your naked mind. Some of the magical energy released - comes from within you. Casting temporarily drains your magical + Casting a spell calls forth magical energies and focuses + them with your naked mind. Some of the magical energy released + comes from within you. Casting temporarily drains your magical power, which will slowly be recovered, and causes you to need ad- - ditional food. Casting of spells also requires practice. With - practice, your skill in each category of spell casting will im- - prove. Over time, however, your memory of each spell will dim, + ditional food. Casting of spells also requires practice. With + practice, your skill in each category of spell casting will im- + prove. Over time, however, your memory of each spell will dim, and you will need to relearn it. Some spells require a direction in which to cast them, simi- - lar to wands. To cast one at yourself, just give a `.' or `s' + lar to wands. To cast one at yourself, just give a `.' or `s' for the direction. A few spells require you to pick a target lo- - cation rather than just specify a particular direction. Other + cation rather than just specify a particular direction. Other spells don't require any direction or target. Just as weapons are divided into groups in which a character - can become proficient (to varying degrees), spells are similarly + can become proficient (to varying degrees), spells are similarly grouped. Successfully casting a spell exercises its skill group; - using the "#enhance" command to advance a sufficiently exercised - skill will affect all spells within the group. Advanced skill - may increase the potency of spells, reduce their risk of failure + using the "#enhance" command to advance a sufficiently exercised + skill will affect all spells within the group. Advanced skill + may increase the potency of spells, reduce their risk of failure during casting attempts, and improve the accuracy of the estimate - for how much longer they will be retained in your memory. Skill - slots are shared with weapons skills. (See also the section on + for how much longer they will be retained in your memory. Skill + slots are shared with weapons skills. (See also the section on "Weapon proficiency".) - Casting a spell also requires flexible movement, and wearing - various types of armor may interfere with that. - The command to read a spellbook is the same as for scrolls, - `r' (read). The `+' command lists each spell you know along with - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2710,29 +2710,34 @@ + Casting a spell also requires flexible movement, and wearing + various types of armor may interfere with that. + + The command to read a spellbook is the same as for scrolls, + `r' (read). The `+' command lists each spell you know along with its level, skill category, chance of failure when casting, and an - estimate of how strongly it is remembered. The `Z' (cast) com- + estimate of how strongly it is remembered. The `Z' (cast) com- mand casts a spell. 7.10. Tools (`(') Tools are miscellaneous objects with various purposes. Some - tools have a limited number of uses, akin to wand charges. For - example, lamps burn out after a while. Other tools are contain- + tools have a limited number of uses, akin to wand charges. For + example, lamps burn out after a while. Other tools are contain- ers, which objects can be placed into or taken out of. The command to use a tool is `a' (apply). 7.10.1. Containers - You may encounter bags, boxes, and chests in your travels. - A tool of this sort can be opened with the "#loot" extended com- - mand when you are standing on top of it (that is, on the same - floor spot), or with the `a' (apply) command when you are carry- - ing it. However, chests are often locked, and are in any case - unwieldy objects. You must set one down before unlocking it by + You may encounter bags, boxes, and chests in your travels. + A tool of this sort can be opened with the "#loot" extended com- + mand when you are standing on top of it (that is, on the same + floor spot), or with the `a' (apply) command when you are carry- + ing it. However, chests are often locked, and are in any case + unwieldy objects. You must set one down before unlocking it by using a key or lock-picking tool with the `a' (apply) command, by - kicking it with the `^D' command, or by using a weapon to force + kicking it with the `^D' command, or by using a weapon to force the lock with the "#force" extended command. Some chests are trapped, causing nasty things to happen when @@ -2741,32 +2746,27 @@ 7.11. Amulets (`"') - Amulets are very similar to rings, and often more powerful. + Amulets are very similar to rings, and often more powerful. Like rings, amulets have various magical properties, some benefi- cial, some harmful, which are activated by putting them on. Only one amulet may be worn at a time, around your neck. - The commands to use amulets are the same as for rings, `P' + The commands to use amulets are the same as for rings, `P' (put on) and `R' (remove). 7.12. Gems (`*') - Some gems are valuable, and can be sold for a lot of gold. - They are also a far more efficient way of carrying your riches. + Some gems are valuable, and can be sold for a lot of gold. + They are also a far more efficient way of carrying your riches. Valuable gems increase your score if you bring them with you when you exit. Other small rocks are also categorized as gems, but they are - much less valuable. All rocks, however, can be used as projec- - tile weapons (if you have a sling). In the most desperate of - cases, you can still throw them by hand. + much less valuable. All rocks, however, can be used as - - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2776,63 +2776,63 @@ + projectile weapons (if you have a sling). In the most desperate + of cases, you can still throw them by hand. + 7.13. Large rocks (``') - Statues and boulders are not particularly useful, and are - generally heavy. It is rumored that some statues are not what + Statues and boulders are not particularly useful, and are + generally heavy. It is rumored that some statues are not what they seem. - Very large humanoids (giants and their ilk) have been known + Very large humanoids (giants and their ilk) have been known to use boulders as weapons. - For some configurations of the program, statues are no - longer shown as ``' but by the letter representing the monster + For some configurations of the program, statues are no + longer shown as ``' but by the letter representing the monster they depict instead. 7.14. Gold (`$') - Gold adds to your score, and you can buy things in shops - with it. There are a number of monsters in the dungeon that may + Gold adds to your score, and you can buy things in shops + with it. There are a number of monsters in the dungeon that may be influenced by the amount of gold you are carrying (shopkeepers aside). 7.15. Persistence of Objects Normally, if you have seen an object at a particular map lo- - cation and move to another location where you can't directly see - that object any more, if will continue to be displayed on your - map. That remains the case even if it is not actually there any - more -- perhaps a monster has picked it up or it has rotted away - -- until you can see or feel that location again. One notable - exception is that if the object gets covered by the "remembered, - unseen monster" marker. When that marker is later removed after - you've verified that no monster is there, you will forget that - there was any object there regardless of whether the unseen mon- - ster actually took the object. If the object is still there, + cation and move to another location where you can't directly see + that object any more, if will continue to be displayed on your + map. That remains the case even if it is not actually there any + more -- perhaps a monster has picked it up or it has rotted away + -- until you can see or feel that location again. One notable + exception is that if the object gets covered by the "remembered, + unseen monster" marker. When that marker is later removed after + you've verified that no monster is there, you will forget that + there was any object there regardless of whether the unseen mon- + ster actually took the object. If the object is still there, then once you see or feel that location again you will re-discov- er the object and resume remembering it. The situation is the same for a pile of objects, except that - only the top item of the pile is displayed. The hilite_pile op- - tion can be enabled in order to show an item differently when it + only the top item of the pile is displayed. The hilite_pile op- + tion can be enabled in order to show an item differently when it is the top one of a pile. 8. Conduct - As if winning NetHack were not difficult enough, certain - players seek to challenge themselves by imposing restrictions on - the way they play the game. The game automatically tracks some - of these challenges, which can be checked at any time with the - #conduct command or at the end of the game. When you perform an - action which breaks a challenge, it will no longer be listed. - This gives players extra "bragging rights" for winning the game - with these challenges. Note that it is perfectly acceptable to - win the game without resorting to these restrictions and that it - is unusual for players to adhere to challenges the first time - they win the game. + As if winning NetHack were not difficult enough, certain + players seek to challenge themselves by imposing restrictions on + the way they play the game. The game automatically tracks some + of these challenges, which can be checked at any time with the + #conduct command or at the end of the game. When you perform an + action which breaks a challenge, it will no longer be listed. + This gives players extra "bragging rights" for winning the game + with these challenges. Note that it is perfectly acceptable to - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2842,63 +2842,63 @@ - Several of the challenges are related to eating behavior. - The most difficult of these is the foodless challenge. Although + win the game without resorting to these restrictions and that it + is unusual for players to adhere to challenges the first time + they win the game. + + Several of the challenges are related to eating behavior. + The most difficult of these is the foodless challenge. Although creatures can survive long periods of time without food, there is - a physiological need for water; thus there is no restriction on - drinking beverages, even if they provide some minor food bene- - fits. Calling upon your god for help with starvation does not + a physiological need for water; thus there is no restriction on + drinking beverages, even if they provide some minor food bene- + fits. Calling upon your god for help with starvation does not violate any food challenges either. - A strict vegan diet is one which avoids any food derived + A strict vegan diet is one which avoids any food derived from animals. The primary source of nutrition is fruits and veg- etables. The corpses and tins of blobs (`b'), jellies (`j'), and - fungi (`F') are also considered to be vegetable matter. Certain - human food is prepared without animal products; namely, lembas - wafers, cram rations, food rations (gunyoki), K-rations, and C- - rations. Metal or another normally indigestible material eaten + fungi (`F') are also considered to be vegetable matter. Certain + human food is prepared without animal products; namely, lembas + wafers, cram rations, food rations (gunyoki), K-rations, and C- + rations. Metal or another normally indigestible material eaten while polymorphed into a creature that can digest it is also con- - sidered vegan food. Note however that eating such items still + sidered vegan food. Note however that eating such items still counts against foodless conduct. - Vegetarians do not eat animals; however, they are less se- - lective about eating animal byproducts than vegans. In addition + Vegetarians do not eat animals; however, they are less se- + lective about eating animal byproducts than vegans. In addition to the vegan items listed above, they may eat any kind of pudding (`P') other than the black puddings, eggs and food made from eggs - (fortune cookies and pancakes), food made with milk (cream pies + (fortune cookies and pancakes), food made with milk (cream pies and candy bars), and lumps of royal jelly. Monks are expected to observe a vegetarian diet. - Eating any kind of meat violates the vegetarian, vegan, and - foodless conducts. This includes tripe rations, the corpses or - tins of any monsters not mentioned above, and the various other - chunks of meat found in the dungeon. Swallowing and digesting a + Eating any kind of meat violates the vegetarian, vegan, and + foodless conducts. This includes tripe rations, the corpses or + tins of any monsters not mentioned above, and the various other + chunks of meat found in the dungeon. Swallowing and digesting a monster while polymorphed is treated as if you ate the creature's - corpse. Eating leather, dragon hide, or bone items while poly- - morphed into a creature that can digest it, or eating monster + corpse. Eating leather, dragon hide, or bone items while poly- + morphed into a creature that can digest it, or eating monster brains while polymorphed into a mind flayer, is considered eating an animal, although wax is only an animal byproduct. - Regardless of conduct, there will be some items which are - indigestible, and others which are hazardous to eat. Using a + Regardless of conduct, there will be some items which are + indigestible, and others which are hazardous to eat. Using a swallow-and-digest attack against a monster is equivalent to eat- - ing the monster's corpse. Please note that the term "vegan" is - used here only in the context of diet. You are still free to - choose not to use or wear items derived from animals (e.g. - leather, dragon hide, bone, horns, coral), but the game will not - keep track of this for you. Also note that "milky" potions may + ing the monster's corpse. Please note that the term "vegan" is + used here only in the context of diet. You are still free to + choose not to use or wear items derived from animals (e.g. + leather, dragon hide, bone, horns, coral), but the game will not + keep track of this for you. Also note that "milky" potions may be a translucent white, but they do not contain milk, so they are - compatible with a vegan diet. Slime molds or player-defined - "fruits", although they could be anything from "cherries" to + compatible with a vegan diet. Slime molds or player-defined + "fruits", although they could be anything from "cherries" to "pork chops", are also assumed to be vegan. - An atheist is one who rejects religion. This means that you - cannot #pray, #offer sacrifices to any god, #turn undead, or - #chat with a priest. Particularly selective readers may argue - that playing Monk or Priest characters should violate this - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2908,63 +2908,63 @@ - conduct; that is a choice left to the player. Offering the - Amulet of Yendor to your god is necessary to win the game and is - not counted against this conduct. You are also not penalized for - being spoken to by an angry god, priest(ess), or other religious + An atheist is one who rejects religion. This means that you + cannot #pray, #offer sacrifices to any god, #turn undead, or + #chat with a priest. Particularly selective readers may argue + that playing Monk or Priest characters should violate this con- + duct; that is a choice left to the player. Offering the Amulet + of Yendor to your god is necessary to win the game and is not + counted against this conduct. You are also not penalized for be- + ing spoken to by an angry god, priest(ess), or other religious figure; a true atheist would hear the words but attach no special meaning to them. - Most players fight with a wielded weapon (or tool intended + Most players fight with a wielded weapon (or tool intended to be wielded as a weapon). Another challenge is to win the game - without using such a wielded weapon. You are still permitted to - throw, fire, and kick weapons; use a wand, spell, or other type + without using such a wielded weapon. You are still permitted to + throw, fire, and kick weapons; use a wand, spell, or other type of item; or fight with your hands and feet. - In NetHack, a pacifist refuses to cause the death of any - other monster (i.e. if you would get experience for the death). - This is a particularly difficult challenge, although it is still + In NetHack, a pacifist refuses to cause the death of any + other monster (i.e. if you would get experience for the death). + This is a particularly difficult challenge, although it is still possible to gain experience by other means. An illiterate character cannot read or write. This includes - reading a scroll, spellbook, fortune cookie message, or t-shirt; + reading a scroll, spellbook, fortune cookie message, or t-shirt; writing a scroll; or making an engraving of anything other than a - single "X" (the traditional signature of an illiterate person). + single "X" (the traditional signature of an illiterate person). Reading an engraving, or any item that is absolutely necessary to - win the game, is not counted against this conduct. The identity - of scrolls and spellbooks (and knowledge of spells) in your - starting inventory is assumed to be learned from your teachers + win the game, is not counted against this conduct. The identity + of scrolls and spellbooks (and knowledge of spells) in your + starting inventory is assumed to be learned from your teachers prior to the start of the game and isn't counted. - There are several other challenges tracked by the game. It + There are several other challenges tracked by the game. It is possible to eliminate one or more species of monsters by geno- - cide; playing without this feature is considered a challenge. + cide; playing without this feature is considered a challenge. When the game offers you an opportunity to genocide monsters, you - may respond with the monster type "none" if you want to decline. - You can change the form of an item into another item of the same - type ("polypiling") or the form of your own body into another - creature ("polyself") by wand, spell, or potion of polymorph; - avoiding these effects are each considered challenges. Polymor- - phing monsters, including pets, does not break either of these - challenges. Finally, you may sometimes receive wishes; a game - without an attempt to wish for any items is a challenge, as is a - game without wishing for an artifact (even if the artifact imme- - diately disappears). When the game offers you an opportunity to - make a wish for an item, you may choose "nothing" if you want to + may respond with the monster type "none" if you want to decline. + You can change the form of an item into another item of the same + type ("polypiling") or the form of your own body into another + creature ("polyself") by wand, spell, or potion of polymorph; + avoiding these effects are each considered challenges. Polymor- + phing monsters, including pets, does not break either of these + challenges. Finally, you may sometimes receive wishes; a game + without an attempt to wish for any items is a challenge, as is a + game without wishing for an artifact (even if the artifact imme- + diately disappears). When the game offers you an opportunity to + make a wish for an item, you may choose "nothing" if you want to decline. 9. Options - Due to variations in personal tastes and conceptions of how + Due to variations in personal tastes and conceptions of how NetHack should do things, there are options you can set to change how NetHack behaves. - - - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -2976,47 +2976,47 @@ 9.1. Setting the options - Options may be set in a number of ways. Within the game, + Options may be set in a number of ways. Within the game, the `O' command allows you to view all options and change most of - them. You can also set options automatically by placing them in - a configuration file, or in the NETHACKOPTIONS environment vari- + them. You can also set options automatically by placing them in + a configuration file, or in the NETHACKOPTIONS environment vari- able. Some versions of NetHack also have front-end programs that - allow you to set options before starting the game or a global + allow you to set options before starting the game or a global configuration for system administrators. 9.2. Using a configuration file The default name of the configuration file varies on differ- - ent operating systems. On MS-DOS and Windows, it is - "defaults.nh" in the same folder as nethack.exe or nethackW.exe. - On UNIX, Linux, and Mac OS X it is ".nethackrc" in the user's + ent operating systems. On MS-DOS and Windows, it is + "defaults.nh" in the same folder as nethack.exe or nethackW.exe. + On UNIX, Linux, and Mac OS X it is ".nethackrc" in the user's home directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor. - Any line in the configuration file starting with `#' is + Any line in the configuration file starting with `#' is treated as a comment. Empty lines are ignored. - Any line beginning with `[' and ending in `]' is considered - a section marker. The text between the square brackets is the - section name. Lines after a section marker belong to that sec- - tion, and are ignored unless a CHOOSE statement was used to se- + Any line beginning with `[' and ending in `]' is considered + a section marker. The text between the square brackets is the + section name. Lines after a section marker belong to that sec- + tion, and are ignored unless a CHOOSE statement was used to se- lect that section. Section names are case insensitive. - You can use different configuration statements in the file, + You can use different configuration statements in the file, some of which can be used multiple times. In general, the state- ments are written in capital letters, followed by an equals sign, - followed by settings particular to that statement. Here is a + followed by settings particular to that statement. Here is a list of allowed statements: OPTIONS - There are two types of options, boolean and compound options. - Boolean options toggle a setting on or off, while compound op- - tions take more diverse values. Prefix a boolean option with - "no" or `!' to turn it off. For compound options, the option + There are two types of options, boolean and compound options. + Boolean options toggle a setting on or off, while compound op- + tions take more diverse values. Prefix a boolean option with + "no" or `!' to turn it off. For compound options, the option name and value are separated by a colon. Some options are per- sistent, and apply only to new games. You can specify multiple OPTIONS statements, and multiple options separated by commas in - a single OPTIONS statement. (Comma separated options are pro- + a single OPTIONS statement. (Comma separated options are pro- cessed from right to left.) Example: @@ -3025,12 +3025,12 @@ OPTIONS=!legacy,autopickup,pickup_types:$"=/!?+ HACKDIR - Default location of files NetHack needs. On Windows HACKDIR - defaults to the location of the NetHack.exe or NetHackw.exe - file so setting HACKDIR to override that is not usually + Default location of files NetHack needs. On Windows HACKDIR + defaults to the location of the NetHack.exe or NetHackw.exe + file so setting HACKDIR to override that is not usually - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3043,15 +3043,15 @@ necessary or recommended. LEVELDIR - The location that in-progress level files are stored. Defaults + The location that in-progress level files are stored. Defaults to HACKDIR, must be writable. SAVEDIR - The location where saved games are kept. Defaults to HACKDIR, + The location where saved games are kept. Defaults to HACKDIR, must be writable. BONESDIR - The location that bones files are kept. Defaults to HACKDIR, + The location that bones files are kept. Defaults to HACKDIR, must be writable. LOCKDIR @@ -3059,14 +3059,14 @@ Defaults to HACKDIR, must be writable. TROUBLEDIR - The location that a record of game aborts and self-diagnosed + The location that a record of game aborts and self-diagnosed game problems is kept. Defaults to HACKDIR, must be writable. AUTOCOMPLETE Enable or disable an extended command autocompletion. Autocom- - pletion has no effect for the X11 windowport. You can specify - multiple autocompletions. To enable autocompletion, list the - extended command. Prefix the command with "!" to disable the + pletion has no effect for the X11 windowport. You can specify + multiple autocompletions. To enable autocompletion, list the + extended command. Prefix the command with "!" to disable the autocompletion for that command. Example: @@ -3074,13 +3074,13 @@ AUTOCOMPLETE=zap,!annotate AUTOPICKUP_EXCEPTION - Set exceptions to the pickup_types option. See the "Configur- + Set exceptions to the pickup_types option. See the "Configur- ing Autopickup Exceptions" section. BINDINGS - Change the key bindings of some special keys, menu accelera- + Change the key bindings of some special keys, menu accelera- tors, or extended commands. You can specify multiple bindings. - Format is key followed by the command, separated by a colon. + Format is key followed by the command, separated by a colon. See the "Changing Key Bindings" section for more information. Example: @@ -3088,7 +3088,7 @@ BIND=^X:getpos.autodescribe CHOOSE - Chooses at random one of the comma-separated parameters as an + Chooses at random one of the comma-separated parameters as an active section name. Lines in other sections are ignored. Example: @@ -3096,7 +3096,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3114,7 +3114,7 @@ OPTIONS=role:wiz,race:elf,align:cha,gender:mal MSGTYPE - Change the way messages are shown in the top status line. See + Change the way messages are shown in the top status line. See the "Configuring Message Types" section. MENUCOLOR @@ -3122,7 +3122,7 @@ ing Menu Colors" section. SYMBOLS - Override one or more symbols in the symbols files. See the + Override one or more symbols in the symbols files. See the "Modifying NetHack Symbols" section. Example: @@ -3130,9 +3130,9 @@ SYMBOLS=S_boulder:0 WIZKIT - Debug mode only: extra items to add to initial inventory. - Value is the name of a text file containing a list of item - names, one per line, up to a maximum of 128 lines. Each line + Debug mode only: extra items to add to initial inventory. + Value is the name of a text file containing a list of item + names, one per line, up to a maximum of 128 lines. Each line is processed by the function that handles wishing. Example: @@ -3140,7 +3140,7 @@ WIZKIT=~/wizkit.txt SOUNDDIR - Define the directory that contains the sound files. See the + Define the directory that contains the sound files. See the "Configuring User Sounds" section. SOUND @@ -3162,7 +3162,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3187,12 +3187,12 @@ 9.3. Using the NETHACKOPTIONS environment variable - The NETHACKOPTIONS variable is a comma-separated list of - initial values for the various options. Some can only be turned - on or off. You turn one of these on by adding the name of the - option to the list, and turn it off by typing a `!' or "no" be- - fore the name. Others take a character string as a value. You - can set string options by typing the option name, a colon or + The NETHACKOPTIONS variable is a comma-separated list of + initial values for the various options. Some can only be turned + on or off. You turn one of these on by adding the name of the + option to the list, and turn it off by typing a `!' or "no" be- + fore the name. Others take a character string as a value. You + can set string options by typing the option name, a colon or equals sign, and then the value of the string. The value is ter- minated by the next comma or the end of string. @@ -3202,7 +3202,7 @@ % setenv NETHACKOPTIONS "color,\!leg,name:Blue Meanie,fruit:lime" - in csh (note the need to escape the `!' since it's special to + in csh (note the need to escape the `!' since it's special to that shell), or the pair of commands $ NETHACKOPTIONS="color,!leg,name:Blue Meanie,fruit:lime" @@ -3212,15 +3212,15 @@ The NETHACKOPTIONS value is effectively the same as a single OPTIONS statement in a configuration file. The "OPTIONS=" prefix - is implied and comma separated options are processed from right + is implied and comma separated options are processed from right to left. Other types of configuration statements such as BIND or MSGTYPE are not allowed. Instead of a comma-separated list of options, NETHACKOPTIONS - can be set to the full name of a configuration file you want to - use. If that full name doesn't start with a slash, precede it - with `@' (at-sign) to let NetHack know that the rest is intended - as a file name. If it does start with `/', the at-sign is op- + can be set to the full name of a configuration file you want to + use. If that full name doesn't start with a slash, precede it + with `@' (at-sign) to let NetHack know that the rest is intended + as a file name. If it does start with `/', the at-sign is op- tional. @@ -3228,7 +3228,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3241,28 +3241,28 @@ 9.4. Customization options Here are explanations of what the various options do. Char- - acter strings that are too long may be truncated. Some of the + acter strings that are too long may be truncated. Some of the options listed may be inactive in your dungeon. - Some options are persistent, and are saved and reloaded + Some options are persistent, and are saved and reloaded along with the game. Changing a persistent option in the config- uration file applies only to new games. acoustics - Enable messages about what your character hears (default on). + Enable messages about what your character hears (default on). Note that this has nothing to do with your computer's audio ca- pabilities. Persistent. align - Your starting alignment (align:lawful, align:neutral, or - align:chaotic). You may specify just the first letter. The - default is to randomly pick an appropriate alignment. If you + Your starting alignment (align:lawful, align:neutral, or + align:chaotic). You may specify just the first letter. The + default is to randomly pick an appropriate alignment. If you prefix the value with `!' or "no", you will exclude that align- - ment from being picked randomly. Cannot be set with the `O' + ment from being picked randomly. Cannot be set with the `O' command. Persistent. autodescribe - Automatically describe the terrain under cursor when asked to + Automatically describe the terrain under cursor when asked to get a location on the map (default true). The whatis_coord op- tion controls whether the description includes map coordinates. @@ -3294,7 +3294,7 @@ tent. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3349,9 +3349,9 @@ Show out-of-sight areas of lit rooms (default on). Persistent. disclose - Controls what information the program reveals when the game - ends. Value is a space separated list of prompting/category - pairs (default is "ni na nv ng nc no", prompt with default re- + Controls what information the program reveals when the game + ends. Value is a space separated list of prompting/category + pairs (default is "ni na nv ng nc no", prompt with default re- sponse of `n' for each candidate). Persistent. The possibili- ties are: @@ -3360,7 +3360,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3377,8 +3377,8 @@ c - display your conduct; o - display dungeon overview. - Each disclosure possibility can optionally be preceded by a - prefix which lets you refine how it behaves. Here are the + Each disclosure possibility can optionally be preceded by a + prefix which lets you refine how it behaves. Here are the valid prefixes: y - prompt you and default to yes on the prompt; @@ -3386,27 +3386,27 @@ + - disclose it without prompting; - - do not disclose it and do not prompt. - The listing of vanquished monsters can be sorted, so there are + The listing of vanquished monsters can be sorted, so there are two additional choices for `v': ? - prompt you and default to ask on the prompt; # - disclose it without prompting, ask for sort order. Asking refers to picking one of the orderings from a menu. The - `+' disclose without prompting choice, or being prompted and + `+' disclose without prompting choice, or being prompted and answering `y' rather than `a', will default to showing monsters in the traditional order, from high level to low level. Omitted categories are implicitly added with `n' prefix. Spec- ified categories with omitted prefix implicitly use `+' prefix. - Order of the disclosure categories does not matter, program + Order of the disclosure categories does not matter, program display for end-of-game disclosure follows a set sequence. - (for example "disclose:yi na +v -g o") The example sets inven- + (for example "disclose:yi na +v -g o") The example sets inven- tory to prompt and default to yes, attributes to prompt and de- fault to no, vanquished to disclose without prompting, genocid- ed to not disclose and not prompt, conduct to implicitly prompt - and default to no, and overview to disclose without prompting. + and default to no, and overview to disclose without prompting. Note that the vanquished monsters list includes all monsters killed by traps and each other as well as by you. And the dun- @@ -3421,12 +3421,12 @@ Changes the extended commands interface to pop-up a menu of available commands. It is keystroke compatible with the tradi- tional interface except that it does not require that you hit - Enter. It is implemented for the tty interface (default off). + Enter. It is implemented for the tty interface (default off). - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3438,61 +3438,61 @@ For the X11 interface, which always uses a menu for choosing an extended command, it controls whether the menu shows all avail- - able commands (on) or just the subset of commands which have + able commands (on) or just the subset of commands which have traditionally been considered extended ones (off). female - An obsolete synonym for "gender:female". Cannot be set with + An obsolete synonym for "gender:female". Cannot be set with the `O' command. fixinv - An object's inventory letter sticks to it when it's dropped - (default on). If this is off, dropping an object shifts all + An object's inventory letter sticks to it when it's dropped + (default on). If this is off, dropping an object shifts all the remaining inventory letters. Persistent. force_invmenu - Commands asking for an inventory item show a menu instead of a + Commands asking for an inventory item show a menu instead of a text query with possible menu letters. Default is off. fruit - Name a fruit after something you enjoy eating (for example - "fruit:mango") (default "slime mold"). Basically a nostalgic - whimsy that NetHack uses from time to time. You should set - this to something you find more appetizing than slime mold. - Apples, oranges, pears, bananas, and melons already exist in + Name a fruit after something you enjoy eating (for example + "fruit:mango") (default "slime mold"). Basically a nostalgic + whimsy that NetHack uses from time to time. You should set + this to something you find more appetizing than slime mold. + Apples, oranges, pears, bananas, and melons already exist in NetHack, so don't use those. gender - Your starting gender (gender:male or gender:female). You may - specify just the first letter. Although you can still denote + Your starting gender (gender:male or gender:female). You may + specify just the first letter. Although you can still denote your gender using the "male" and "female" options, the "gender" - option will take precedence. The default is to randomly pick - an appropriate gender. If you prefix the value with `!' or - "no", you will exclude that gender from being picked randomly. + option will take precedence. The default is to randomly pick + an appropriate gender. If you prefix the value with `!' or + "no", you will exclude that gender from being picked randomly. Cannot be set with the `O' command. Persistent. goldX - When filtering objects based on bless/curse state (BUCX), - whether to treat gold pieces as X (unknown bless/curse state, - when "on") or U (known to be uncursed, when "off", the de- - fault). Gold is never blessed or cursed, but it is not de- + When filtering objects based on bless/curse state (BUCX), + whether to treat gold pieces as X (unknown bless/curse state, + when "on") or U (known to be uncursed, when "off", the de- + fault). Gold is never blessed or cursed, but it is not de- scribed as "uncursed" even when the implicit_uncursed option is "off". help - If more information is available for an object looked at with + If more information is available for an object looked at with the `/' command, ask if you want to see it (default on). Turn- - ing help off makes just looking at things faster, since you - aren't interrupted with the "More info?" prompt, but it also + ing help off makes just looking at things faster, since you + aren't interrupted with the "More info?" prompt, but it also means that you might miss some interesting and/or important in- formation. Persistent. herecmd_menu - When using a windowport that supports mouse and clicking on - yourself or next to you, show a menu of possible actions for + When using a windowport that supports mouse and clicking on + yourself or next to you, show a menu of possible actions for - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3502,34 +3502,34 @@ - the location. Same as "#herecmdmenu" and "#therecmdmenu" com- + the location. Same as "#herecmdmenu" and "#therecmdmenu" com- mands. hilite_pet - Visually distinguish pets from similar animals (default off). - The behavior of this option depends on the type of windowing + Visually distinguish pets from similar animals (default off). + The behavior of this option depends on the type of windowing you use. In text windowing, text highlighting or inverse video - is often used; with tiles, generally displays a heart symbol + is often used; with tiles, generally displays a heart symbol near pets. - With the curses interface, the petattr option controls how to - highlight pets and setting it will turn the hilite_pet option + With the curses interface, the petattr option controls how to + highlight pets and setting it will turn the hilite_pet option on or off as warranted. hilite_pile - Visually distinguish piles of objects from individual objects + Visually distinguish piles of objects from individual objects (default off). The behavior of this option depends on the type - of windowing you use. In text windowing, text highlighting or - inverse video is often used; with tiles, generally displays a + of windowing you use. In text windowing, text highlighting or + inverse video is often used; with tiles, generally displays a small plus-symbol beside the object on the top of the pile. hitpointbar - Show a hit point bar graph behind your name and title. Only - available for TTY and Windows GUI, and only when statushilites + Show a hit point bar graph behind your name and title. Only + available for TTY and Windows GUI, and only when statushilites is on. horsename - Name your starting horse (for example "horsename:Trigger"). + Name your starting horse (for example "horsename:Trigger"). Cannot be set with the `O' command. ignintr @@ -3558,7 +3558,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3569,34 +3569,34 @@ male - An obsolete synonym for "gender:male". Cannot be set with the + An obsolete synonym for "gender:male". Cannot be set with the `O' command. mention_walls Give feedback when walking against a wall (default off). menucolors - Enable coloring menu lines (default off). See "Configuring + Enable coloring menu lines (default off). See "Configuring Menu Colors" on how to configure the colors. menustyle Controls the interface used when you need to choose various ob- - jects (in response to the Drop command, for instance). The - value specified should be the first letter of one of the fol- - lowing: traditional, combination, full, or partial. Tradi- - tional was the only interface available for early versions; it - consists of a prompt for object class characters, followed by - an object-by-object prompt for all items matching the selected - object class(es). Combination starts with a prompt for object + jects (in response to the Drop command, for instance). The + value specified should be the first letter of one of the fol- + lowing: traditional, combination, full, or partial. Tradi- + tional was the only interface available for early versions; it + consists of a prompt for object class characters, followed by + an object-by-object prompt for all items matching the selected + object class(es). Combination starts with a prompt for object class(es) of interest, but then displays a menu of matching ob- - jects rather than prompting one-by-one. Full displays a menu - of object classes rather than a character prompt, and then a - menu of matching objects for selection. Partial skips the ob- + jects rather than prompting one-by-one. Full displays a menu + of object classes rather than a character prompt, and then a + menu of matching objects for selection. Partial skips the ob- ject class filtering and immediately displays a menu of all ob- jects. Persistent. menu_deselect_all - Menu character accelerator to deselect all items in a menu. + Menu character accelerator to deselect all items in a menu. Implemented by the Amiga, Gem, X11 and tty ports. Default `-'. menu_deselect_page @@ -3624,7 +3624,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3690,7 +3690,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3735,7 +3735,7 @@ Send padding nulls to the terminal (default on). Persistent. number_pad - Use digit keys instead of letters to move (default 0 or off). + Use digit keys instead of letters to move (default 0 or off). Valid settings are: 0 - move by letters; "yuhjklbn" @@ -3745,18 +3745,18 @@ 4 - combines 3 with 2; phone layout plus MS-DOS compatibility -1 - by letters but use `z' to go northwest, `y' to zap wands - For backward compatibility, omitting a value is the same as - specifying 1 and negating number_pad is the same as specifying - 0. (Settings 2 and 4 are for compatibility with MS-DOS or old + For backward compatibility, omitting a value is the same as + specifying 1 and negating number_pad is the same as specifying + 0. (Settings 2 and 4 are for compatibility with MS-DOS or old PC Hack; in addition to the different behavior for `5', `Alt-5' acts as `G' and `Alt-0' acts as `I'. Setting -1 is to accommo- - date some QWERTZ keyboards which have the location of the `y' - and `z' keys swapped.) When moving by numbers, to enter a + date some QWERTZ keyboards which have the location of the `y' + and `z' keys swapped.) When moving by numbers, to enter a count prefix for those commands which accept one (such as "12s" - to search twelve times), precede it with the letter `n' + to search twelve times), precede it with the letter `n' - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3769,60 +3769,60 @@ ("n12s"). packorder - Specify the order to list object types in (default + Specify the order to list object types in (default "")[%?+!=/(*`0_"). The value of this option should be a string containing the symbols for the various object types. Any omit- ted types are filled in at the end from the previous order. paranoid_confirmation - A space separated list of specific situations where alternate - prompting is desired. The default is paranoid_confirma- + A space separated list of specific situations where alternate + prompting is desired. The default is paranoid_confirma- tion:pray. - Confirm - for any prompts which are set to require "yes" - rather than `y', also require "no" to reject in- + Confirm - for any prompts which are set to require "yes" + rather than `y', also require "no" to reject in- stead of accepting any non-yes response as no quit - require "yes" rather than `y' to confirm quitting - the game or switching into non-scoring explore + the game or switching into non-scoring explore mode; - die - require "yes" rather than `y' to confirm dying - (not useful in normal play; applies to explore + die - require "yes" rather than `y' to confirm dying + (not useful in normal play; applies to explore mode); - bones - require "yes" rather than `y' to confirm saving + bones - require "yes" rather than `y' to confirm saving bones data when dying in debug mode; - attack - require "yes" rather than `y' to confirm attack- + attack - require "yes" rather than `y' to confirm attack- ing a peaceful monster; wand-break - require "yes" rather than `y' to confirm breaking a wand; Were-change - require "yes" rather than `y' to confirm changing - form due to lycanthropy when hero has polymorph + form due to lycanthropy when hero has polymorph control; - pray - require `y' to confirm an attempt to pray rather + pray - require `y' to confirm an attempt to pray rather than immediately praying; on by default; - Remove - require selection from inventory for `R' and `T' - commands even when wearing just one applicable + Remove - require selection from inventory for `R' and `T' + commands even when wearing just one applicable item. all - turn on all of the above. - By default, the pray choice is enabled, the others disabled. - To disable it without setting any of the other choices, use + By default, the pray choice is enabled, the others disabled. + To disable it without setting any of the other choices, use "paranoid_confirmation:none". To keep it enabled while setting - any of the others, include it in the list, such as "para- + any of the others, include it in the list, such as "para- noid_confirmation:attack pray Remove". perm_invent - If true, always display your current inventory in a window. - This only makes sense for windowing system interfaces that im- + If true, always display your current inventory in a window. + This only makes sense for windowing system interfaces that im- plement this feature. petattr - Specifies one or more text highlighting attributes to use when - showing pets on the map. Effectively a superset of the + Specifies one or more text highlighting attributes to use when + showing pets on the map. Effectively a superset of the hilite_pet boolean option. Curses interface only; value is one or more of the following letters. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3842,35 +3842,35 @@ l - Left line indicator r - Right line indicator - Some of those choices might not work, particularly the final - three, depending upon terminal hardware or terminal emulation + Some of those choices might not work, particularly the final + three, depending upon terminal hardware or terminal emulation software. - Currently multiple highlight-style letters can be combined by - simply stringing them together (for example, "bk"), but in the - future they might require being separated by plus signs (such - as "b+k", which works already). When using the `n' choice, it - should be specified on its own, not in combination with any of + Currently multiple highlight-style letters can be combined by + simply stringing them together (for example, "bk"), but in the + future they might require being separated by plus signs (such + as "b+k", which works already). When using the `n' choice, it + should be specified on its own, not in combination with any of the other letters. pettype - Specify the type of your initial pet, if you are playing a - character class that uses multiple types of pets; or choose to - have no initial pet at all. Possible values are "cat", "dog", + Specify the type of your initial pet, if you are playing a + character class that uses multiple types of pets; or choose to + have no initial pet at all. Possible values are "cat", "dog", "horse", and "none". If the choice is not allowed for the role - you are currently playing, it will be silently ignored. For - example, "horse" will only be honored when playing a knight. + you are currently playing, it will be silently ignored. For + example, "horse" will only be honored when playing a knight. Cannot be set with the `O' command. pickup_burden - When you pick up an item that would exceed this encumbrance - level (Unencumbered, Burdened, streSsed, straiNed, overTaxed, - or overLoaded), you will be asked if you want to continue. + When you pick up an item that would exceed this encumbrance + level (Unencumbered, Burdened, streSsed, straiNed, overTaxed, + or overLoaded), you will be asked if you want to continue. (Default `S'). Persistent. pickup_thrown - If this option is on and autopickup is also on, try to pick up - things that you threw, even if they aren't in pickup_types or + If this option is on and autopickup is also on, try to pick up + things that you threw, even if they aren't in pickup_types or match an autopickup exception. Default is on. Persistent. pickup_types @@ -3880,15 +3880,15 @@ sistent. pile_limit - When walking across a pile of objects on the floor, threshold - at which the message "there are few/several/many objects here" - is given instead of showing a popup list of those objects. A - value of 0 means "no limit" (always list the objects); a value - of 1 effectively means "never show the objects" since the pile - size will always be at least that big; default value is 5. + When walking across a pile of objects on the floor, threshold + at which the message "there are few/several/many objects here" + is given instead of showing a popup list of those objects. A + value of 0 means "no limit" (always list the objects); a value + of 1 effectively means "never show the objects" since the pile + size will always be at least that big; default value is 5. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3901,60 +3901,60 @@ Persistent. playmode - Values are "normal", "explore", or "debug". Allows selection - of explore mode (also known as discovery mode) or debug mode + Values are "normal", "explore", or "debug". Allows selection + of explore mode (also known as discovery mode) or debug mode (also known as wizard mode) instead of normal play. Debug mode - might only be allowed for someone logged in under a particular - user name (on multi-user systems) or specifying a particular + might only be allowed for someone logged in under a particular + user name (on multi-user systems) or specifying a particular character name (on single-user systems) or it might be disabled - entirely. Requesting it when not allowed or not possible re- + entirely. Requesting it when not allowed or not possible re- sults in explore mode instead. Default is normal play. pushweapon - Using the `w' (wield) command when already wielding something - pushes the old item into your alternate weapon slot (default - off). Likewise for the `a' (apply) command if it causes the + Using the `w' (wield) command when already wielding something + pushes the old item into your alternate weapon slot (default + off). Likewise for the `a' (apply) command if it causes the applied item to become wielded. Persistent. race Selects your race (for example, "race:human"). Default is ran- - dom. If you prefix the value with `!' or "no", you will ex- + dom. If you prefix the value with `!' or "no", you will ex- clude that race from being picked randomly. Cannot be set with the `O' command. Persistent. rest_on_space - Make the space bar a synonym for the `.' (#wait) command (de- + Make the space bar a synonym for the `.' (#wait) command (de- fault off). Persistent. role - Pick your type of character (for example "role:Samurai"); syn- - onym for "character". See "name" for an alternate method of - specifying your role. Normally only the first letter of the - value is examined; `r' is an exception with "Rogue", "Ranger", + Pick your type of character (for example "role:Samurai"); syn- + onym for "character". See "name" for an alternate method of + specifying your role. Normally only the first letter of the + value is examined; `r' is an exception with "Rogue", "Ranger", and "random" values. If you prefix the value with `!' or "no", - you will exclude that role from being picked randomly. Cannot + you will exclude that role from being picked randomly. Cannot be set with the `O' command. Persistent. roguesymset - This option may be used to select one of the named symbol sets - found within "symbols" to alter the symbols displayed on the + This option may be used to select one of the named symbol sets + found within "symbols" to alter the symbols displayed on the screen on the rogue level. rlecomp When writing out a save file, perform run length compression of - the map. Not all ports support run length compression. It has + the map. Not all ports support run length compression. It has no effect on reading an existing save file. runmode - Controls the amount of screen updating for the map window when - engaged in multi-turn movement (running via shift+direction or - control+direction and so forth, or via the travel command or + Controls the amount of screen updating for the map window when + engaged in multi-turn movement (running via shift+direction or + control+direction and so forth, or via the travel command or mouse click). The possible values are: teleport - update the map after movement has finished; - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -3969,13 +3969,13 @@ crawl - like walk, but pause briefly after each step. This option only affects the game's screen display, not the ac- - tual results of moving. The default is "run"; versions prior - to 3.4.1 used "teleport" only. Whether or not the effect is + tual results of moving. The default is "run"; versions prior + to 3.4.1 used "teleport" only. Whether or not the effect is noticeable will depend upon the window port used or on the type of terminal. Persistent. safe_pet - Prevent you from (knowingly) attacking your pets (default on). + Prevent you from (knowingly) attacking your pets (default on). Persistent. sanity_check @@ -3983,8 +3983,8 @@ off). Debug mode only. scores - Control what parts of the score list you are shown at the end - (for example "scores:5 top scores/4 around my score/own + Control what parts of the score list you are shown at the end + (for example "scores:5 top scores/4 around my score/own scores"). Only the first letter of each category (`t', `a', or `o') is necessary. Persistent. @@ -3993,9 +3993,9 @@ off). Persistent. showrace - Display yourself as the glyph for your race, rather than the - glyph for your role (default off). Note that this setting af- - fects only the appearance of the display, not the way the game + Display yourself as the glyph for your race, rather than the + glyph for your role (default off). Note that this setting af- + fects only the appearance of the display, not the way the game treats you. Persistent. showscore @@ -4007,20 +4007,20 @@ sortloot Controls the sorting behavior of the pickup lists for inventory - and #loot commands and some others. Persistent. The possible + and #loot commands and some others. Persistent. The possible values are: full - always sort the lists; - loot - only sort the lists that don't use inventory letters, + loot - only sort the lists that don't use inventory letters, like with the #loot and pickup commands; none - show lists the traditional way without sorting. sortpack - Sort the pack contents by type when displaying inventory (de- + Sort the pack contents by type when displaying inventory (de- fault on). Persistent. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4032,40 +4032,40 @@ sparkle Display a sparkly effect when a monster (including yourself) is - hit by an attack to which it is resistant (default on). Per- + hit by an attack to which it is resistant (default on). Per- sistent. standout Boldface monsters and "--More--" (default off). Persistent. statushilites - Controls how many turns status hilite behaviors highlight the - field. If negated or set to zero, disables status hiliting. + Controls how many turns status hilite behaviors highlight the + field. If negated or set to zero, disables status hiliting. See "Configuring Status Hilites" for further information. status_updates - Allow updates to the status lines at the bottom of the screen + Allow updates to the status lines at the bottom of the screen (default true). suppress_alert - This option may be set to a NetHack version level to suppress - alert notification messages about feature changes for that and + This option may be set to a NetHack version level to suppress + alert notification messages about feature changes for that and prior versions (for example "suppress_alert:3.3.1"). symset - This option may be used to select one of the named symbol sets - found within "symbols" to alter the symbols displayed on the - screen. Use "symset:default" to explicitly select the default + This option may be used to select one of the named symbol sets + found within "symbols" to alter the symbols displayed on the + screen. Use "symset:default" to explicitly select the default symbols. time - Show the elapsed game time in turns on bottom line (default + Show the elapsed game time in turns on bottom line (default off). Persistent. timed_delay - When pausing momentarily for display effect, such as with ex- - plosions and moving objects, use a timer rather than sending - extra characters to the screen. (Applies to "tty" interface + When pausing momentarily for display effect, such as with ex- + plosions and moving objects, use a timer rather than sending + extra characters to the screen. (Applies to "tty" interface only; "X11" interface always uses a timer based delay. The de- fault is on if configured into the program.) Persistent. @@ -4075,18 +4075,18 @@ toptenwin Put the ending display in a NetHack window instead of on stdout - (default off). Setting this option makes the score list visi- - ble when a windowing version of NetHack is started without a - parent window, but it no longer leaves the score list around + (default off). Setting this option makes the score list visi- + ble when a windowing version of NetHack is started without a + parent window, but it no longer leaves the score list around after game end on a terminal or emulating window. travel Allow the travel command (default on). Turning this option off - will prevent the game from attempting unintended moves if you + will prevent the game from attempting unintended moves if you make inadvertent mouse clicks on the map window. Persistent. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4097,13 +4097,13 @@ verbose - Provide more commentary during the game (default on). Persis- + Provide more commentary during the game (default on). Persis- tent. whatis_coord - When using the `/' or `;' commands to look around on the map - with autodescribe on, display coordinates after the descrip- - tion. Also works in other situations where you are asked to + When using the `/' or `;' commands to look around on the map + with autodescribe on, display coordinates after the descrip- + tion. Also works in other situations where you are asked to pick a location. The possible settings are: @@ -4120,39 +4120,39 @@ whatis_filter When getting a location on the map, and using the keys to cycle - through next and previous targets, allows filtering the possi- + through next and previous targets, allows filtering the possi- ble targets. n - no filtering [default] v - in view only a - in same area only - The area-filter tries to be slightly predictive -- if you're + The area-filter tries to be slightly predictive -- if you're standing on a doorway, it will consider the area on the side of the door you were last moving towards. - Filtering can also be changed when getting a location with the + Filtering can also be changed when getting a location with the "getpos.filter" key. whatis_menu - When getting a location on the map, and using a key to cycle + When getting a location on the map, and using a key to cycle through next and previous targets, use a menu instead to pick a target. (default off) whatis_moveskip - When getting a location on the map, and using shifted movement + When getting a location on the map, and using shifted movement keys or meta-digit keys to fast-move, instead of moving 8 units at a time, move by skipping the same glyphs. (default off) windowtype When the program has been built to support multiple interfaces, - select which one to use, such as "tty" or "X11" (default de- + select which one to use, such as "tty" or "X11" (default de- pends on build-time settings; use "#version" to check). Cannot be set with the `O' command. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4162,10 +4162,10 @@ - When used, it should be the first option set since its value - might enable or disable the availability of various other op- - tions. For multiple lines in a configuration file, that would - be the first non-comment line. For a comma-separated list in + When used, it should be the first option set since its value + might enable or disable the availability of various other op- + tions. For multiple lines in a configuration file, that would + be the first non-comment line. For a comma-separated list in NETHACKOPTIONS or an OPTIONS line in a configuration file, that would be the rightmost option in the list. @@ -4174,35 +4174,35 @@ off). Debug mode only. zerocomp - When writing out a save file, perform zero-comp compression of - the contents. Not all ports support zero-comp compression. It + When writing out a save file, perform zero-comp compression of + the contents. Not all ports support zero-comp compression. It has no effect on reading an existing save file. 9.5. Window Port Customization options - Here are explanations of the various options that are used - to customize and change the characteristics of the windowtype + Here are explanations of the various options that are used + to customize and change the characteristics of the windowtype that you have chosen. Character strings that are too long may be - truncated. Not all window ports will adjust for all settings - listed here. You can safely add any of these options to your - config file, and if the window port is capable of adjusting to - suit your preferences, it will attempt to do so. If it can't it - will silently ignore it. You can find out if an option is sup- - ported by the window port that you are currently using by check- - ing to see if it shows up in the Options list. Some options are - dynamic and can be specified during the game with the `O' com- + truncated. Not all window ports will adjust for all settings + listed here. You can safely add any of these options to your + config file, and if the window port is capable of adjusting to + suit your preferences, it will attempt to do so. If it can't it + will silently ignore it. You can find out if an option is sup- + ported by the window port that you are currently using by check- + ing to see if it shows up in the Options list. Some options are + dynamic and can be specified during the game with the `O' com- mand. align_message - Where to align or place the message window (top, bottom, left, + Where to align or place the message window (top, bottom, left, or right) align_status - Where to align or place the status window (top, bottom, left, + Where to align or place the status window (top, bottom, left, or right). ascii_map - If NetHack can, it should display an ascii character map if it + If NetHack can, it should display an ascii character map if it can. color @@ -4210,15 +4210,15 @@ monsters, objects, and dungeon features. eight_bit_tty - If NetHack can, it should pass eight-bit character values (for - example, specified with the traps option) straight through to + If NetHack can, it should pass eight-bit character values (for + example, specified with the traps option) straight through to your terminal (default off). font_map if NetHack can, it should use a font by the chosen name for the - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4231,7 +4231,7 @@ map window. font_menu - If NetHack can, it should use a font by the chosen name for + If NetHack can, it should use a font by the chosen name for menu windows. font_message @@ -4243,15 +4243,15 @@ status window. font_text - If NetHack can, it should use a font by the chosen name for + If NetHack can, it should use a font by the chosen name for text windows. font_size_map - If NetHack can, it should use this size font for the map win- + If NetHack can, it should use this size font for the map win- dow. font_size_menu - If NetHack can, it should use this size font for menu windows. + If NetHack can, it should use this size font for menu windows. font_size_message If NetHack can, it should use this size font for the message @@ -4262,29 +4262,29 @@ window. font_size_text - If NetHack can, it should use this size font for text windows. + If NetHack can, it should use this size font for text windows. fullscreen - If NetHack can, it should try and display on the entire screen + If NetHack can, it should try and display on the entire screen rather than in a window. guicolor - Use color text and/or highlighting attributes when displaying - some non-map data (such as menu selector letters). Curses in- + Use color text and/or highlighting attributes when displaying + some non-map data (such as menu selector letters). Curses in- terface only; default is on. large_font If NetHack can, it should use a large font. map_mode - If NetHack can, it should display the map in the manner speci- + If NetHack can, it should display the map in the manner speci- fied. player_selection - If NetHack can, it should pop up dialog boxes, or use prompts + If NetHack can, it should pop up dialog boxes, or use prompts - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4301,27 +4301,27 @@ preload_tiles If NetHack can, it should preload tiles into memory. For exam- - ple, in the protected mode MS-DOS version, control whether - tiles get pre-loaded into RAM at the start of the game. Doing - so enhances performance of the tile graphics, but uses more + ple, in the protected mode MS-DOS version, control whether + tiles get pre-loaded into RAM at the start of the game. Doing + so enhances performance of the tile graphics, but uses more memory. (default on). Cannot be set with the `O' command. scroll_amount - If NetHack can, it should scroll the display by this number of + If NetHack can, it should scroll the display by this number of cells when the hero reaches the scroll_margin. scroll_margin - If NetHack can, it should scroll the display when the hero or - cursor is this number of cells away from the edge of the win- + If NetHack can, it should scroll the display when the hero or + cursor is this number of cells away from the edge of the win- dow. selectsaved - If NetHack can, it should display a menu of existing saved + If NetHack can, it should display a menu of existing saved games for the player to choose from at game startup, if it can. Not all ports support this option. softkeyboard - Display an onscreen keyboard. Handhelds are most likely to + Display an onscreen keyboard. Handhelds are most likely to support this option. splash_screen @@ -4329,28 +4329,28 @@ it starts up (default yes). statuslines - Number of lines for traditional below-the-map status display. - Acceptable values are 2 and 3 (default is 2). Curses and tty + Number of lines for traditional below-the-map status display. + Acceptable values are 2 and 3 (default is 2). Curses and tty interfaces only. term_cols and term_rows - Curses interface only. Number of columns and rows to use for + Curses interface only. Number of columns and rows to use for the display. Curses will attempt to resize to the values spec- - ified but will settle for smaller sizes if they are too big. + ified but will settle for smaller sizes if they are too big. Default is the current window size. tiled_map If NetHack can, it should display a tiled map if it can. tile_file - Specify the name of an alternative tile file to override the + Specify the name of an alternative tile file to override the default. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4361,7 +4361,7 @@ tile_height - Specify the preferred height of each tile in a tile capable + Specify the preferred height of each tile in a tile capable port. tile_width @@ -4416,7 +4416,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4478,11 +4478,11 @@ Note: DEC Rainbows hang if this is turned on. Cannot be set with the `O' command. - soundcard - (default on, PC NetHack only). Cannot be set with the `O' + subkeyvalue + (Win32 tty NetHack only). May be used to alter the value of - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4492,45 +4492,41 @@ - command. - - subkeyvalue - (Win32 tty NetHack only). May be used to alter the value of keystrokes that the operating system returns to NetHack to help - compensate for international keyboard issues. OPTIONS=subkey- - value:171/92 will return 92 to NetHack, if 171 was originally - going to be returned. You can use multiple subkeyvalue state- + compensate for international keyboard issues. OPTIONS=subkey- + value:171/92 will return 92 to NetHack, if 171 was originally + going to be returned. You can use multiple subkeyvalue state- ments in the config file if needed. Cannot be set with the `O' command. video Set the video mode used (PC NetHack only). Values are "autode- - tect", "default", or "vga". Setting "vga" (or "autodetect" - with vga hardware present) will cause the game to display + tect", "default", or "vga". Setting "vga" (or "autodetect" + with vga hardware present) will cause the game to display tiles. Cannot be set with the `O' command. videocolors - Set the color palette for PC systems using NO_TERMS (default - 4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order - of colors is red, green, brown, blue, magenta, cyan, - bright.white, bright.red, bright.green, yellow, bright.blue, - bright.magenta, and bright.cyan. Cannot be set with the `O' + Set the color palette for PC systems using NO_TERMS (default + 4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order + of colors is red, green, brown, blue, magenta, cyan, + bright.white, bright.red, bright.green, yellow, bright.blue, + bright.magenta, and bright.cyan. Cannot be set with the `O' command. videoshades Set the intensity level of the three gray scales available (de- fault dark normal light, PC NetHack only). If the game display - is difficult to read, try adjusting these scales; if this does - not correct the problem, try !color. Cannot be set with the + is difficult to read, try adjusting these scales; if this does + not correct the problem, try !color. Cannot be set with the `O' command. 9.7. Regular Expressions - Regular expressions are normally POSIX extended regular ex- - pressions. It is possible to compile NetHack without regular ex- - pression support on a platform where there is no regular expres- - sion library. While this is not true of any modern platform, if - your NetHack was built this way, patterns are instead glob pat- + Regular expressions are normally POSIX extended regular ex- + pressions. It is possible to compile NetHack without regular ex- + pression support on a platform where there is no regular expres- + sion library. While this is not true of any modern platform, if + your NetHack was built this way, patterns are instead glob pat- terns. This applies to Autopickup exceptions, Message types, Menu colors, and User sounds. @@ -4539,16 +4535,20 @@ You can further refine the behavior of the autopickup option beyond what is available through the pickup_types option. - By placing autopickup_exception lines in your configuration - file, you can define patterns to be checked when the game is + By placing autopickup_exception lines in your configuration + file, you can define patterns to be checked when the game is about to autopickup something. autopickup_exception - Sets an exception to the pickup_types option. The autopick- - up_exception option should be followed by a regular expression + Sets an exception to the pickup_types option. The autopick- + up_exception option should be followed by a regular expression + to be used as a pattern to match against the singular form of + the description of an object at your location. - NetHack 3.6 May 7, 2019 + + + NetHack 3.7 October 1, 2019 @@ -4558,20 +4558,20 @@ - to be used as a pattern to match against the singular form of - the description of an object at your location. - - In addition, some characters are treated specially if they oc- + In addition, some characters are treated specially if they oc- cur as the first character in the pattern, specifically: < - always pickup an object that matches rest of pattern; > - never pickup an object that matches rest of pattern. - A "never pickup" rule takes precedence over an "always pickup" - rule if both match. + The autopickup_exception rules are processed in the order in + which they appear in your config file, thus allowing a later + rule to override an earlier rule. - Exceptions can be set with the `O' command, but ones set that - way will not be preserved across saves and restores. + Exceptions can be set with the `O' command, but because they + are not included in your config file, they won't be in effect + if you save and then restore your game. autopickup_exception + rules and not saved with the game. Here are some examples: @@ -4614,7 +4614,7 @@ Below are the special commands you can rebind. Some of them - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4680,7 +4680,7 @@ `?'. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4746,7 +4746,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4796,11 +4796,11 @@ Prefix key to run towards a direction. Default is `G'. run.nopickup - Prefix key to run towards a direction without picking up items + Prefix key to run towards a direction without picking up items on the way. Default is `M'. run.numpad - Prefix key to run towards a direction. With number_pad only. + Prefix key to run towards a direction. With number_pad only. Default is `5'. rush @@ -4812,7 +4812,7 @@ area, when the message matches a user-defined pattern. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4835,50 +4835,50 @@ show - show message normally; hide - never show the message; stop - wait for user with more-prompt; - norep - show the message once, but not again if no other mes- + norep - show the message once, but not again if no other mes- sage is shown in between. - Here's an example of message types using NetHack's internal + Here's an example of message types using NetHack's internal pattern matching facility: MSGTYPE=stop "You feel hungry." MSGTYPE=hide "You displaced *." - specifies that whenever a message "You feel hungry" is shown, - the user is prompted with more-prompt, and a message matching + specifies that whenever a message "You feel hungry" is shown, + the user is prompted with more-prompt, and a message matching "You displaced ." is not shown at all. - The order of the defined MSGTYPE-lines is important; the last - matching rule is used. Put the general case first, exceptions + The order of the defined MSGTYPE-lines is important; the last + matching rule is used. Put the general case first, exceptions below them. 9.11. Configuring Menu Colors Some platforms allow you to define colors used in menu lines - when the line matches a user-defined pattern. At this time the + when the line matches a user-defined pattern. At this time the tty, win32tty and win32gui support this. - In general, the config file entries to configure the menu + In general, the config file entries to configure the menu color mappings look like this: MENUCOLOR="pattern"=color&attribute pattern - the pattern to match; - color - the color to use for lines matching the pat- + color - the color to use for lines matching the pat- tern; - attribute - the attribute to use for lines matching the - pattern. The attribute is optional, and if + attribute - the attribute to use for lines matching the + pattern. The attribute is optional, and if left out, you must also leave out the preced- - ing ampersand. If no attribute is defined, + ing ampersand. If no attribute is defined, no attribute is used. The pattern should be a regular expression. - Allowed colors are black, red, green, brown, blue, magenta, - cyan, gray, orange, light-green, yellow, light-blue, light- + Allowed colors are black, red, green, brown, blue, magenta, + cyan, gray, orange, light-green, yellow, light-blue, light- - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -4888,53 +4888,53 @@ - magenta, light-cyan, and white. And no-color, the default - foreground color, which isn't necessarily the same as any of + magenta, light-cyan, and white. And no-color, the default + foreground color, which isn't necessarily the same as any of the other colors. - Allowed attributes are none, bold, dim, underline, blink, and - inverse. "Normal" is a synonym for "none". Note that the + Allowed attributes are none, bold, dim, underline, blink, and + inverse. "Normal" is a synonym for "none". Note that the platform used may interpret the attributes any way it wants. - Here's an example of menu colors using NetHack's internal pat- + Here's an example of menu colors using NetHack's internal pat- tern matching facility: MENUCOLOR="* blessed *"=green MENUCOLOR="* cursed *"=red MENUCOLOR="* cursed *(being worn)"=red&underline - specifies that any menu line with " blessed " contained in it - will be shown in green color, lines with " cursed " will be - shown in red, and lines with " cursed " followed by "(being - worn)" on the same line will be shown in red color and under- - lined. You can have multiple MENUCOLOR entries in your config - file, and the last MENUCOLOR-line in your config file that + specifies that any menu line with " blessed " contained in it + will be shown in green color, lines with " cursed " will be + shown in red, and lines with " cursed " followed by "(being + worn)" on the same line will be shown in red color and under- + lined. You can have multiple MENUCOLOR entries in your config + file, and the last MENUCOLOR-line in your config file that matches a menu line will be used for the line. Note that if you intend to have one or more color specifica- - tions match " uncursed ", you will probably want to turn the im- + tions match " uncursed ", you will probably want to turn the im- plicit_uncursed option off so that all items known to be uncursed are actually displayed with the "uncursed" description. 9.12. Configuring User Sounds - Some platforms allow you to define sound files to be played - when a message that matches a user-defined pattern is delivered + Some platforms allow you to define sound files to be played + when a message that matches a user-defined pattern is delivered to the message window. At this time the Qt port and the win32tty and win32gui ports support the use of user sounds. - The following config file entries are relevant to mapping + The following config file entries are relevant to mapping user sounds to messages: SOUNDDIR The directory that houses the sound files to be played. SOUND - An entry that maps a sound file to a user-specified message - pattern. Each SOUND entry is broken down into the following + An entry that maps a sound file to a user-specified message + pattern. Each SOUND entry is broken down into the following parts: - MESG - message window mapping (the only one supported in + MESG - message window mapping (the only one supported in 3.6); pattern - the pattern to match; sound file - the sound file to play; @@ -4944,7 +4944,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -5010,7 +5010,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -5047,36 +5047,36 @@ * "always" will set the default attributes for that field. - * "up" and "down" set the field attributes for when the - field value changes upwards or downwards. This attribute + * "up" and "down" set the field attributes for when the + field value changes upwards or downwards. This attribute times out after statushilites turns. * "changed" sets the field attribute for when the field val- - ue changes. This attribute times out after statushilites - turns. (If a field has both a "changed" rule and an "up" - or "down" rule which matches a change in the field's val- + ue changes. This attribute times out after statushilites + turns. (If a field has both a "changed" rule and an "up" + or "down" rule which matches a change in the field's val- ue, the "up" or "down" one takes precedence.) - * percentage sets the field attribute when the field value - matches the percentage. It is specified as a number be- - tween 0 and 100, followed by `%' (percent sign). If the - percentage is prefixed with `<=' or `>=', it also matches - when value is below or above the percentage. Use prefix - `<' or `>' to match when strictly below or above. (The - numeric limit is relaxed slightly for those: >-1% and - <101% are allowed.) Only valid for "hitpoints" and "pow- - er" fields. - - * absolute value sets the attribute when the field value - matches that number. The number must be 0 or higher, ex- - cept for "armor-class' which allows negative values, and - may optionally be preceded by `='. If the number is pre- - ceded by `<=' or `>=' instead, it also matches when value - is below or above. If the prefix is `<' or `>', only - match when strictly above or below. + * percentage sets the field attribute when the field value + matches the percentage. It is specified as a number be- + tween 0 and 100, followed by `%' (percent sign). If the + percentage is prefixed with `<=' or `>=', it also matches + when value is below or above the percentage. Use prefix + `<' or `>' to match when strictly below or above. (The + numeric limit is relaxed slightly for those: >-1% and + <101% are allowed.) Only four fields support percentage + rules. Percentages for "hitpoints" and "power" are + straightforward; they're based on the corresponding maxi- + mum field. Percentage highlight rules are also allowed + for "experience level" and "experience points" (valid when + the showexp option is enabled). For those, the percentage + is based on the progress from the start of the current ex- + perience level to the start of the next level. So if lev- + el 2 starts at 20 points and level 3 starts at 40 points, + having 30 points is 50% and 35 points is 75%. 100% is - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -5086,6 +5086,20 @@ + unattainable for experience because you'll gain a level + and the calculations will be reset for that new level, but + a rule for =100% is allowed and matches the special case + of being exactly 1 experience point short of the next lev- + el. + + * absolute value sets the attribute when the field value + matches that number. The number must be 0 or higher, ex- + cept for "armor-class' which allows negative values, and + may optionally be preceded by `='. If the number is pre- + ceded by `<=' or `>=' instead, it also matches when value + is below or above. If the prefix is `<' or `>', only + match when strictly above or below. + * text match sets the attribute when the field value matches the text. Text matches can only be used for "alignment", "carrying-capacity", "hunger", "dungeon-level", and "ti- @@ -5125,6 +5139,19 @@ Set the name of the symbol set that you want to load for dis- play on the rogue level. + + + + NetHack 3.7 October 1, 2019 + + + + + + NetHack Guidebook 79 + + + You can also override one or more symbols using the SYMBOLS config file option. Symbols are specified as name:value pairs. Note that NetHack escape-processes the value string in conven- @@ -5139,19 +5166,6 @@ ------------------------------------------------------------------------ S_air (air) _ S_altar (altar) - - - - NetHack 3.6 May 7, 2019 - - - - - - NetHack Guidebook 79 - - - " S_amulet (amulet) A S_angel (angelic being) a S_ant (ant or other insect) @@ -5191,6 +5205,19 @@ - S_explode2 (explosion top center) \ S_explode3 (explosion top right) | S_explode4 (explosion middle left) + + + + NetHack 3.7 October 1, 2019 + + + + + + NetHack Guidebook 80 + + + S_explode5 (explosion middle center) | S_explode6 (explosion middle right) \ S_explode7 (explosion bottom left) @@ -5205,19 +5232,6 @@ { S_fountain (fountain) F S_fungus (fungus or mold) * S_gem (gem or rock) - - - - NetHack 3.6 May 7, 2019 - - - - - - NetHack Guidebook 80 - - - S_ghost (ghost) H S_giant (giant humanoid) G S_gnome (gnome) @@ -5257,6 +5271,19 @@ N S_naga (naga) . S_ndoor (doorway without door) n S_nymph (nymph) + + + + NetHack 3.7 October 1, 2019 + + + + + + NetHack Guidebook 81 + + + O S_ogre (ogre) o S_orc (orc) p S_piercer (piercer) @@ -5271,19 +5298,6 @@ = S_ring (ring) ` S_rock (boulder or statue) r S_rodent (rodent) - - - - NetHack 3.6 May 7, 2019 - - - - - - NetHack Guidebook 81 - - - ^ S_rolling_boulder_trap (rolling boulder trap) . S_room (floor of a room) / S_rslant (diagonal beam [zap animation]) @@ -5323,6 +5337,19 @@ # S_tree (tree) T S_troll (troll) | S_trwall (wall) + + + + NetHack 3.7 October 1, 2019 + + + + + + NetHack Guidebook 82 + + + - S_tuwall (wall) U S_umber (umber hulk) u S_unicorn (unicorn or horse) @@ -5337,19 +5364,6 @@ . S_vodbridge (vertical lowered drawbridge) - S_vodoor (open door in vertical wall) v S_vortex (vortex) - - - - NetHack 3.6 May 7, 2019 - - - - - - NetHack Guidebook 82 - - - | S_vwall (vertical wall) / S_wand (wand) } S_water (water) @@ -5364,14 +5378,6 @@ Z S_zombie (zombie) z S_zruty (zruty) - There is one additional class of object, described as - "strange object", which will occasionally be the shape taken on - by mimics and shown as `]' for maps displayed as text characters. - Although the displayed character is the same as the default value - for "S_mimic_def", it is a different symbol and there is no cor- - responding "S_strange_object" symbol nor any way to assign an al- - ternate value for it. - 9.15. Configuring NetHack for Play by the Blind NetHack can be set up to use only standard ASCII characters @@ -5398,15 +5404,9 @@ program as a message handler", your NetHack has been compiled with the capability. When compiling NetHack from source on Linux and other POSIX systems, define MSGHANDLER to enable it. To use - the capability, set the environment variable NETHACK_MSGHANDLER - to an executable, which will be executed with the game message as - the program's only parameter. - - While it is not difficult for experienced users to edit the - defaults.nh file to accomplish this, novices may find this task - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -5416,6 +5416,12 @@ + the capability, set the environment variable NETHACK_MSGHANDLER + to an executable, which will be executed with the game message as + the program's only parameter. + + While it is not difficult for experienced users to edit the + defaults.nh file to accomplish this, novices may find this task somewhat daunting. Included within the "symbols" file of all of- ficial distributions of NetHack is a symset called NHAccess. Se- lecting that symset in your configuration file will cause the @@ -5464,15 +5470,9 @@ When targeting with cursor and using fast-move, skip the same glyphs instead of moving 8 units at a time. - nostatus_updates - Prevent updates to the status lines at the bottom of the - screen, if your screen-reader reads those lines. The same in- - formation can be seen via the #attributes command. - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -5482,6 +5482,11 @@ + nostatus_updates + Prevent updates to the status lines at the bottom of the + screen, if your screen-reader reads those lines. The same in- + formation can be seen via the #attributes command. + 9.16. Global Configuration for System Administrators If NetHack is compiled with the SYSCF option, a system ad- @@ -5507,6 +5512,22 @@ MAXPLAYERS = Limit the maximum number of games that can be run- ning at the same time. + SAVEFORMAT = A list of up to two save file formats separated by + space. The first format in the list will written as well as + read. The second format will be read only if no save file in + the first format exists. Valid choices are "historical" for + binary writing of entire structs, "lendian" for binary writing + of each field in little-endian order, "ascii" for writing the + save file content in ascii text. + + BONESFORMAT = A list of up to two bones file formats separated + by space. The first format in the list will written as well as + read. The second format will be read only if no bones files in + the first format exist. Valid choices are "historical" for bi- + nary writing of entire structs, "lendian" for binary writing of + each field in little-endian order, "ascii" for writing the + bones file content in ascii text. + SUPPORT = A string explaining how to get local support (no de- fault value). @@ -5514,31 +5535,10 @@ system (no default value). SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE - option. When disabled, incubi and succubi behave like nymphs. - - CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- - ARDS, and SHELLERS check for the player name instead of the us- - er's login name. - - CHECK_SAVE_UID = 0 or 1 to disable or enable, respectively, the - UID (used identification number) checking for save files (to - verify that the user who is restoring is the same one who - saved). - - The following options affect the score file: - - PERSMAX = Maximum number of entries for one person. - - ENTRYMAX = Maximum number of entries in the score file. - - POINTSMIN = Minimum number of points to get an entry in the - score file. - - PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- - spectively, to identify unique people for the score file. + option. When disabled, incubi and succubi behave like nymphs. - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -5548,11 +5548,32 @@ - MAX_STATUENAME_RANK = Maximum number of score file entries to + CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- + ARDS, and SHELLERS check for the player name instead of the us- + er's login name. + + CHECK_SAVE_UID = 0 or 1 to disable or enable, respectively, the + UID (used identification number) checking for save files (to + verify that the user who is restoring is the same one who + saved). + + The following options affect the score file: + + PERSMAX = Maximum number of entries for one person. + + ENTRYMAX = Maximum number of entries in the score file. + + POINTSMIN = Minimum number of points to get an entry in the + score file. + + PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- + spectively, to identify unique people for the score file. + + MAX_STATUENAME_RANK = Maximum number of score file entries to use for random statue names (default is 10). DUMPLOGFILE = A filename where the end-of-game dumplog is - saved. Not defining this will prevent dumplog from being cre- + saved. Not defining this will prevent dumplog from being cre- ated. Only available if your game is compiled with DUMPLOG. Al- lows the following placeholders: @@ -5568,43 +5589,22 @@ 10. Scoring - NetHack maintains a list of the top scores or scorers on + NetHack maintains a list of the top scores or scorers on your machine, depending on how it is set up. In the latter case, - each account on the machine can post only one non-winning score - on this list. If you score higher than someone else on this - list, or better your previous score, you will be inserted in the - proper place under your current name. How many scores are kept + each account on the machine can post only one non-winning score + on this list. If you score higher than someone else on this + list, or better your previous score, you will be inserted in the + proper place under your current name. How many scores are kept can also be set up when NetHack is compiled. - Your score is chiefly based upon how much experience you + Your score is chiefly based upon how much experience you gained, how much loot you accumulated, how deep you explored, and how the game ended. If you quit the game, you escape with all of - your gold intact. If, however, you get killed in the Mazes of + your gold intact. If, however, you get killed in the Mazes of Menace, the guild will only hear about 90% of your gold when your - corpse is discovered (adventurers have been known to collect - finder's fees). So, consider whether you want to take one last - hit at that monster and possibly live, or quit and stop with - whatever you have. If you quit, you keep all your gold, but if - you swing and live, you might find more. - - If you just want to see what the current top players/games - list is, you can type nethack -s all on most versions. - - 11. Explore mode - - NetHack is an intricate and difficult game. Novices might - falter in fear, aware of their ignorance of the means to survive. - Well, fear not. Your dungeon comes equipped with an "explore" or - "discovery" mode that enables you to keep old save files and - cheat death, at the paltry cost of not getting on the high score - list. - - There are two ways of enabling explore mode. One is to - start the game with the -X command-line switch or with the play- - mode:explore option. The other is to issue the "#exploremode" - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -5614,63 +5614,63 @@ - extended command while already playing the game. Starting a new + corpse is discovered (adventurers have been known to collect + finder's fees). So, consider whether you want to take one last + hit at that monster and possibly live, or quit and stop with + whatever you have. If you quit, you keep all your gold, but if + you swing and live, you might find more. + + If you just want to see what the current top players/games + list is, you can type nethack -s all on most versions. + + 11. Explore mode + + NetHack is an intricate and difficult game. Novices might + falter in fear, aware of their ignorance of the means to survive. + Well, fear not. Your dungeon comes equipped with an "explore" or + "discovery" mode that enables you to keep old save files and + cheat death, at the paltry cost of not getting on the high score + list. + + There are two ways of enabling explore mode. One is to + start the game with the -X command-line switch or with the play- + mode:explore option. The other is to issue the "#exploremode" + extended command while already playing the game. Starting a new game in explore mode provides your character with a wand of wish- - ing in initial inventory; switching during play does not. The - other benefits of explore mode are left for the trepid reader to + ing in initial inventory; switching during play does not. The + other benefits of explore mode are left for the trepid reader to discover. 11.1. Debug mode Debug mode, also known as wizard mode, is undocumented aside - from this brief description and the various "debug mode only" - commands listed among the command descriptions. It is intended + from this brief description and the various "debug mode only" + commands listed among the command descriptions. It is intended for tracking down problems within the program rather than to pro- - vide god-like powers to your character, and players who attempt - debugging are expected to figure out how to use it themselves. - It is initiated by starting the game with the -D command-line + vide god-like powers to your character, and players who attempt + debugging are expected to figure out how to use it themselves. + It is initiated by starting the game with the -D command-line switch or with the playmode:debug option. - For some systems, the player must be logged in under a par- - ticular user name to be allowed to use debug mode; for others, - the hero must be given a particular character name (but may be - any role; there's no connection between "wizard mode" and the - Wizard role). Attempting to start a game in debug mode when not - allowed or not available will result in falling back to explore + For some systems, the player must be logged in under a par- + ticular user name to be allowed to use debug mode; for others, + the hero must be given a particular character name (but may be + any role; there's no connection between "wizard mode" and the + Wizard role). Attempting to start a game in debug mode when not + allowed or not available will result in falling back to explore mode instead. 12. Credits - The original hack game was modeled on the Berkeley UNIX - rogue game. Large portions of this paper were shamelessly - cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy - and Kenneth C. R. C. Arnold. Small portions were adapted from + The original hack game was modeled on the Berkeley UNIX + rogue game. Large portions of this paper were shamelessly + cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy + and Kenneth C. R. C. Arnold. Small portions were adapted from Further Exploration of the Dungeons of Doom, by Ken Arromdee. - NetHack is the product of literally dozens of people's work. - Main events in the course of the game development are described - below: - - Jay Fenlason wrote the original Hack, with help from Kenny - Woodland, Mike Thome and Jon Payne. - - Andries Brouwer did a major re-write, transforming Hack into - a very different game, and published (at least) three versions - (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. - - Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, - producing PC HACK 1.01e, added support for DEC Rainbow graphics - in version 1.03g, and went on to produce at least four more ver- - sions (3.0, 3.2, 3.51, and 3.6). - - R. Black ported PC HACK 3.51 to Lattice C and the Atari - 520/1040ST, producing ST Hack 1.03. - - Mike Stephenson merged these various versions back together, - incorporating many of the added features, and produced NetHack - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 @@ -5680,8 +5680,29 @@ - 1.4. He then coordinated a cast of thousands in enhancing and - debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. + NetHack is the product of literally dozens of people's work. + Main events in the course of the game development are described + below: + + Jay Fenlason wrote the original Hack, with help from Kenny + Woodland, Mike Thome and Jon Payne. + + Andries Brouwer did a major re-write, transforming Hack into + a very different game, and published (at least) three versions + (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. + + Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, + producing PC HACK 1.01e, added support for DEC Rainbow graphics + in version 1.03g, and went on to produce at least four more ver- + sions (3.0, 3.2, 3.51, and 3.6). + + R. Black ported PC HACK 3.51 to Lattice C and the Atari + 520/1040ST, producing ST Hack 1.03. + + Mike Stephenson merged these various versions back together, + incorporating many of the added features, and produced NetHack + 1.4. He then coordinated a cast of thousands in enhancing and + debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. Later, Mike coordinated a major rewrite of the game, heading a team which included Ken Arromdee, Jean-Christophe Collet, Steve @@ -5714,6 +5735,17 @@ Richard Addison, Mike Passaretti, and Olaf Seibert, developed NetHack 3.1 for the Amiga. + + NetHack 3.7 October 1, 2019 + + + + + + NetHack Guidebook 88 + + + Norm Meluch and Kevin Smolkowski, with help from Carl Sche- lin, Stephen Spackman, Steve VanDevender, and Paul Winner, ported NetHack 3.1 to the PC. @@ -5735,17 +5767,6 @@ velopment Team and tile support was then added to other plat- forms. - - NetHack 3.6 May 7, 2019 - - - - - - NetHack Guidebook 88 - - - The 3.2 NetHack Development Team, comprised of Michael Alli- son, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Er- @@ -5779,6 +5800,18 @@ tures. Kevin later joined the NetHack Development Team and in- corporated the best of these ideas in NetHack 3.3. + + + NetHack 3.7 October 1, 2019 + + + + + + NetHack Guidebook 89 + + + The final update to 3.2 was the bug fix release 3.2.3, which was released simultaneously with 3.3.0 in December 1999 just in time for the Year 2000. @@ -5800,18 +5833,6 @@ first version to allow you to ride a steed, and was the first version to have a publicly available web-site listing all the bugs that had been discovered. Despite that constantly growing - - - NetHack 3.6 May 7, 2019 - - - - - - NetHack Guidebook 89 - - - bug list, 3.3 proved stable enough to last for more than a year and a half. @@ -5844,6 +5865,19 @@ stopped working in early 2006. A great many thanks to Ron for keeping NetHack alive on OS/2 all these years. + + + + NetHack 3.7 October 1, 2019 + + + + + + NetHack Guidebook 90 + + + Janne Salmijarvi and Teemu Suikki maintained and enhanced the Amiga port of 3.4 after Janne Salmijarvi resurrected it for 3.3.1. @@ -5866,18 +5900,6 @@ In September 2014, an interim snapshot of the code under de- velopment was released publicly by other parties. Since that code - - - NetHack 3.6 May 7, 2019 - - - - - - NetHack Guidebook 90 - - - was a work-in-progress and had not gone through the process of debugging it as a suitable release, it was decided that the ver- sion numbers present on that code snapshot would be retired and @@ -5911,6 +5933,17 @@ and Kevin Smolkowski, ensured that NetHack 3.6 continued to oper- ate on various UNIX flavors and maintained the X11 interface. + + NetHack 3.7 October 1, 2019 + + + + + + NetHack Guidebook 91 + + + Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- tained the port of NetHack 3.6 for Mac OSX. @@ -5932,18 +5965,6 @@ The NetHack Development Team at the time of release of 3.6.1 con- sisted of Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, - - - NetHack 3.6 May 7, 2019 - - - - - - NetHack Guidebook 91 - - - Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz, and Paul Winner. @@ -5962,20 +5983,33 @@ Andy Thomson for hardfought.org. Thanks to all those unnamed dun- geoneers who invest their time and effort into annual NetHack tournaments such as Junethack, The November NetHack Tournament - and in days past, devnull.net (gone for now, but not forgotten). + and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list + of the names of the worst of these miscreants in this, the list of Dungeoneers: Adam Aronow Janet Walz Nathan Eady Alex Kompel Janne Salmijarvi Norm Meluch Alex Smith Jean-Christophe Collet Olaf Seibert Andreas Dorn Jeff Bailey Pasi Kallinen Andy Church Jochen Erwied Pat Rankin + + + + NetHack 3.7 October 1, 2019 + + + + + + NetHack Guidebook 92 + + + Andy Swanson John Kallen Patric Mueller Ari Huttunen John Rupley Paul Winner Barton House John S. Bien Pierre Martineau @@ -5997,19 +6031,6 @@ Deron Meranda Lars Huttar Scott R. Turner Dion Nicolaas Leon Arnott Sean Hunt Dylan O'Donnell M. Drew Streib Stephen Spackman - - - - NetHack 3.6 May 7, 2019 - - - - - - NetHack Guidebook 92 - - - Eric Backus Malcolm Ryan Stefan Thielscher Eric Hendrickson Mark Gooderum Stephen White Eric R. Smith Mark Modrall Steve Creps @@ -6026,7 +6047,7 @@ Izchak Miller Mike Stephenson J. Ali Harlow Mikko Juola - Brand and product names are trademarks or registered trade- + Brand and product names are trademarks or registered trade- marks of their respective holders. @@ -6045,28 +6066,7 @@ - - - - - - - - - - - - - - - - - - - - - - NetHack 3.6 May 7, 2019 + NetHack 3.7 October 1, 2019 From 59effabd73740d6c5e3efda321a781d01dda7529 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 2 Oct 2019 10:50:04 -0400 Subject: [PATCH 003/529] Revert "Guidebook.txt update" This reverts commit df7e6a0f2a5589dd58323a221c1654642fa8c5a3. stamped with incorrect version --- doc/Guidebook.txt | 2780 ++++++++++++++++++++++----------------------- 1 file changed, 1390 insertions(+), 1390 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index 5e533109e..c622c832d 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -91,32 +91,32 @@ them to move quickly and sneak up on the local nasties. They start equipped with the tools for a proper scientific expedition. - Barbarians are warriors out of the hinterland, hardened to + Barbarians are warriors out of the hinterland, hardened to battle. They begin their quests with naught but uncommon strength, a trusty hauberk, and a great two-handed sword. - Cavemen and Cavewomen start with exceptional strength but, + Cavemen and Cavewomen start with exceptional strength but, unfortunately, with neolithic weapons. - Healers are wise in medicine and apothecary. They know the - herbs and simples that can restore vitality, ease pain, anes- + Healers are wise in medicine and apothecary. They know the + herbs and simples that can restore vitality, ease pain, anes- thetize, and neutralize poisons; and with their instruments, they - can divine a being's state of health or sickness. Their medical + can divine a being's state of health or sickness. Their medical practice earns them quite reasonable amounts of money, with which they enter the dungeon. - Knights are distinguished from the common skirmisher by - their devotion to the ideals of chivalry and by the surpassing + Knights are distinguished from the common skirmisher by + their devotion to the ideals of chivalry and by the surpassing excellence of their armor. Monks are ascetics, who by rigorous practice of physical and mental disciplines have become capable of fighting as effectively - without weapons as with. They wear no armor but make up for it + without weapons as with. They wear no armor but make up for it with increased mobility. - Priests and Priestesses are clerics militant, crusaders ad- - vancing the cause of righteousness with arms, armor, and arts - thaumaturgic. Their ability to commune with deities via prayer + Priests and Priestesses are clerics militant, crusaders ad- + vancing the cause of righteousness with arms, armor, and arts + thaumaturgic. Their ability to commune with deities via prayer occasionally extricates them from peril, but can also put them in it. @@ -126,7 +126,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -136,63 +136,63 @@ - Rogues are agile and stealthy thieves, with knowledge of - locks, traps, and poisons. Their advantage lies in surprise, + Rogues are agile and stealthy thieves, with knowledge of + locks, traps, and poisons. Their advantage lies in surprise, which they employ to great advantage. - Samurai are the elite warriors of feudal Nippon. They are - lightly armored and quick, and wear the dai-sho, two swords of + Samurai are the elite warriors of feudal Nippon. They are + lightly armored and quick, and wear the dai-sho, two swords of the deadliest keenness. - Tourists start out with lots of gold (suitable for shopping - with), a credit card, lots of food, some maps, and an expensive + Tourists start out with lots of gold (suitable for shopping + with), a credit card, lots of food, some maps, and an expensive camera. Most monsters don't like being photographed. - Valkyries are hardy warrior women. Their upbringing in the - harsh Northlands makes them strong, inures them to extremes of + Valkyries are hardy warrior women. Their upbringing in the + harsh Northlands makes them strong, inures them to extremes of cold, and instills in them stealth and cunning. - Wizards start out with a knowledge of magic, a selection of - magical items, and a particular affinity for dweomercraft. Al- + Wizards start out with a knowledge of magic, a selection of + magical items, and a particular affinity for dweomercraft. Al- though seemingly weak and easy to overcome at first sight, an ex- perienced Wizard is a deadly foe. - You may also choose the race of your character (within lim- + You may also choose the race of your character (within lim- its; most roles have restrictions on which races are eligible for them): Dwarves are smaller than humans or elves, but are stocky and - solid individuals. Dwarves' most notable trait is their great - expertise in mining and metalwork. Dwarvish armor is said to be + solid individuals. Dwarves' most notable trait is their great + expertise in mining and metalwork. Dwarvish armor is said to be second in quality not even to the mithril armor of the Elves. - Elves are agile, quick, and perceptive; very little of what - goes on will escape an Elf. The quality of Elven craftsmanship + Elves are agile, quick, and perceptive; very little of what + goes on will escape an Elf. The quality of Elven craftsmanship often gives them an advantage in arms and armor. - Gnomes are smaller than but generally similar to dwarves. - Gnomes are known to be expert miners, and it is known that a se- - cret underground mine complex built by this race exists within + Gnomes are smaller than but generally similar to dwarves. + Gnomes are known to be expert miners, and it is known that a se- + cret underground mine complex built by this race exists within the Mazes of Menace, filled with both riches and danger. Humans are by far the most common race of the surface world, - and are thus the norm to which other races are often compared. - Although they have no special abilities, they can succeed in any + and are thus the norm to which other races are often compared. + Although they have no special abilities, they can succeed in any role. - Orcs are a cruel and barbaric race that hate every living - thing (including other orcs). Above all others, Orcs hate Elves - with a passion unequalled, and will go out of their way to kill - one at any opportunity. The armor and weapons fashioned by the + Orcs are a cruel and barbaric race that hate every living + thing (including other orcs). Above all others, Orcs hate Elves + with a passion unequalled, and will go out of their way to kill + one at any opportunity. The armor and weapons fashioned by the Orcs are typically of inferior quality. 3. What do all those things on the screen mean? - On the screen is kept a map of where you have been and what - you have seen on the current dungeon level; as you explore more + On the screen is kept a map of where you have been and what + you have seen on the current dungeon level; as you explore more - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -204,47 +204,47 @@ of the level, it appears on the screen in front of you. - When NetHack's ancestor rogue first appeared, its screen - orientation was almost unique among computer fantasy games. - Since then, screen orientation has become the norm rather than - the exception; NetHack continues this fine tradition. Unlike - text adventure games that accept commands in pseudo-English sen- + When NetHack's ancestor rogue first appeared, its screen + orientation was almost unique among computer fantasy games. + Since then, screen orientation has become the norm rather than + the exception; NetHack continues this fine tradition. Unlike + text adventure games that accept commands in pseudo-English sen- tences and explain the results in words, NetHack commands are all - one or two keystrokes and the results are displayed graphically - on the screen. A minimum screen size of 24 lines by 80 columns - is recommended; if the screen is larger, only a 21x80 section + one or two keystrokes and the results are displayed graphically + on the screen. A minimum screen size of 24 lines by 80 columns + is recommended; if the screen is larger, only a 21x80 section will be used for the map. NetHack can even be played by blind players, with the assis- - tance of Braille readers or speech synthesisers. Instructions - for configuring NetHack for the blind are included later in this + tance of Braille readers or speech synthesisers. Instructions + for configuring NetHack for the blind are included later in this document. NetHack generates a new dungeon every time you play it; even - the authors still find it an entertaining and exciting game de- + the authors still find it an entertaining and exciting game de- spite having won several times. - NetHack offers a variety of display options. The options - available to you will vary from port to port, depending on the - capabilities of your hardware and software, and whether various + NetHack offers a variety of display options. The options + available to you will vary from port to port, depending on the + capabilities of your hardware and software, and whether various compile-time options were enabled when your executable was creat- ed. The three possible display options are: a monochrome charac- - ter interface, a color character interface, and a graphical in- + ter interface, a color character interface, and a graphical in- terface using small pictures called tiles. The two character in- terfaces allow fonts with other characters to be substituted, but - the default assignments use standard ASCII characters to repre- + the default assignments use standard ASCII characters to repre- sent everything. There is no difference between the various dis- play options with respect to game play. Because we cannot repro- duce the tiles or colors in the Guidebook, and because it is com- - mon to all ports, we will use the default ASCII characters from - the monochrome character display when referring to things you + mon to all ports, we will use the default ASCII characters from + the monochrome character display when referring to things you might see on the screen during your game. - In order to understand what is going on in NetHack, first - you must understand what NetHack is doing with the screen. The - NetHack screen replaces the "You see ..." descriptions of text - adventure games. Figure 1 is a sample of what a NetHack screen - might look like. The way the screen looks for you depends on + In order to understand what is going on in NetHack, first + you must understand what NetHack is doing with the screen. The + NetHack screen replaces the "You see ..." descriptions of text + adventure games. Figure 1 is a sample of what a NetHack screen + might look like. The way the screen looks for you depends on your platform. @@ -258,7 +258,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -286,9 +286,9 @@ 3.1. The status lines (bottom) - The bottom two lines of the screen contain several cryptic - pieces of information describing your current status. If either - status line becomes longer than the width of the screen, you + The bottom two lines of the screen contain several cryptic + pieces of information describing your current status. If either + status line becomes longer than the width of the screen, you might not see all of it. Here are explanations of what the vari- ous status items mean (though your configuration may not have all the status items listed below): @@ -298,33 +298,33 @@ experience level, see below). Strength - A measure of your character's strength; one of your six ba- - sic attributes. A human character's attributes can range - from 3 to 18 inclusive; non-humans may exceed these limits + A measure of your character's strength; one of your six ba- + sic attributes. A human character's attributes can range + from 3 to 18 inclusive; non-humans may exceed these limits (occasionally you may get super-strengths of the form 18/xx, - and magic can also cause attributes to exceed the normal - limits). The higher your strength, the stronger you are. + and magic can also cause attributes to exceed the normal + limits). The higher your strength, the stronger you are. Strength affects how successfully you perform physical - tasks, how much damage you do in combat, and how much loot + tasks, how much damage you do in combat, and how much loot you can carry. Dexterity - Dexterity affects your chances to hit in combat, to avoid - traps, and do other tasks requiring agility or manipulation + Dexterity affects your chances to hit in combat, to avoid + traps, and do other tasks requiring agility or manipulation of objects. Constitution - Constitution affects your ability to recover from injuries - and other strains on your stamina. When strength is low or - modest, constitution also affects how much you can carry. - With sufficiently high strength, the contribution to carry- + Constitution affects your ability to recover from injuries + and other strains on your stamina. When strength is low or + modest, constitution also affects how much you can carry. + With sufficiently high strength, the contribution to carry- ing capacity from your constitution no longer matters. Intelligence - Intelligence affects your ability to cast spells and read + Intelligence affects your ability to cast spells and read - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -342,7 +342,7 @@ Charisma Charisma affects how certain creatures react toward you. In - particular, it can affect the prices shopkeepers offer you. + particular, it can affect the prices shopkeepers offer you. Alignment Lawful, Neutral, or Chaotic. Often, Lawful is taken as good @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -456,7 +456,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -533,62 +533,62 @@ I This marks the last known location of an invisible or other- - wise unseen monster. Note that the monster could have + wise unseen monster. Note that the monster could have moved. The `F' and `m' commands may be useful here. - You need not memorize all these symbols; you can ask the - game what any symbol represents with the `/' command (see the + You need not memorize all these symbols; you can ask the + game what any symbol represents with the `/' command (see the next section for more info). 4. Commands Commands can be initiated by typing one or two characters to - which the command is bound to, or typing the command name in the - extended commands entry. Some commands, like "search", do not + which the command is bound to, or typing the command name in the + extended commands entry. Some commands, like "search", do not require that any more information be collected by NetHack. Other - commands might require additional information, for example a di- - rection, or an object to be used. For those commands that re- - quire additional information, NetHack will present you with ei- - ther a menu of choices or with a command line prompt requesting + commands might require additional information, for example a di- + rection, or an object to be used. For those commands that re- + quire additional information, NetHack will present you with ei- + ther a menu of choices or with a command line prompt requesting information. Which you are presented with will depend chiefly on how you have set the menustyle option. - For example, a common question, in the form "What do you - want to use? [a-zA-Z ?*]", asks you to choose an object you are - carrying. Here, "a-zA-Z" are the inventory letters of your pos- - sible choices. Typing `?' gives you an inventory list of these - items, so you can see what each letter refers to. In this exam- + For example, a common question, in the form "What do you + want to use? [a-zA-Z ?*]", asks you to choose an object you are + carrying. Here, "a-zA-Z" are the inventory letters of your pos- + sible choices. Typing `?' gives you an inventory list of these + items, so you can see what each letter refers to. In this exam- ple, there is also a `*' indicating that you may choose an object not on the list, if you wanted to use something unexpected. Typ- - ing a `*' lists your entire inventory, so you can see the inven- - tory letters of every object you're carrying. Finally, if you + ing a `*' lists your entire inventory, so you can see the inven- + tory letters of every object you're carrying. Finally, if you change your mind and decide you don't want to do this command af- ter all, you can press the ESC key to abort the command. - You can put a number before some commands to repeat them - that many times; for example, "10s" will search ten times. If + You can put a number before some commands to repeat them + that many times; for example, "10s" will search ten times. If you have the number_pad option set, you must type `n' to prefix a - count, so the example above would be typed "n10s" instead. Com- - mands for which counts make no sense ignore them. In addition, - movement commands can be prefixed for greater control (see be- + count, so the example above would be typed "n10s" instead. Com- + mands for which counts make no sense ignore them. In addition, + movement commands can be prefixed for greater control (see be- low). To cancel a count or a prefix, press the ESC key. - The list of commands is rather long, but it can be read at - any time during the game through the `?' command, which accesses - a menu of helpful texts. Here are the default key bindings for + The list of commands is rather long, but it can be read at + any time during the game through the `?' command, which accesses + a menu of helpful texts. Here are the default key bindings for your reference: ? Help menu: display one of several help texts available. / The "whatis" command, to tell what a symbol represents. You may choose to specify a location or type a symbol (or even a - whole word) to explain. Specifying a location is done by - moving the cursor to a particular spot on the map and then + whole word) to explain. Specifying a location is done by + moving the cursor to a particular spot on the map and then pressing one of `.', `,', `;', or `:'. `.' will explain the symbol at the chosen location, conditionally check for "More - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -598,43 +598,43 @@ - info?" depending upon whether the help option is on, and - then you will be asked to pick another location; `,' will + info?" depending upon whether the help option is on, and + then you will be asked to pick another location; `,' will explain the symbol but skip any additional information, then let you pick another location; `;' will skip additional info and also not bother asking you to choose another location to examine; `:' will show additional info, if any, without ask- ing for confirmation. When picking a location, pressing the - ESC key will terminate this command, or pressing `?' will + ESC key will terminate this command, or pressing `?' will give a brief reminder about how it works. - If the autodescribe option is on, a short description of - what you see at each location is shown as you move the cur- - sor. Typing `#' while picking a location will toggle that - option on or off. The whatis_coord option controls whether + If the autodescribe option is on, a short description of + what you see at each location is shown as you move the cur- + sor. Typing `#' while picking a location will toggle that + option on or off. The whatis_coord option controls whether the short description includes map coordinates. - Specifying a name rather than a location always gives any + Specifying a name rather than a location always gives any additional information available about that name. - You may also request a description of nearby monsters, all - monsters currently displayed, nearby objects, or all ob- + You may also request a description of nearby monsters, all + monsters currently displayed, nearby objects, or all ob- jects. The whatis_coord option controls which format of map coordinate is included with their descriptions. & Tell what a command does. - < Go up to the previous level (if you are on a staircase or + < Go up to the previous level (if you are on a staircase or ladder). > Go down to the next level (if you are on a staircase or lad- der). [yuhjklbn] - Go one step in the direction indicated (see Figure 2). If - you sense or remember a monster there, you will fight the - monster instead. Only these one-step movement commands - cause you to fight monsters; the others (below) are "safe." + Go one step in the direction indicated (see Figure 2). If + you sense or remember a monster there, you will fight the + monster instead. Only these one-step movement commands + cause you to fight monsters; the others (below) are "safe." y k u 7 8 9 \ | / \ | / @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -720,7 +720,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -786,7 +786,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -822,7 +822,7 @@ i List your inventory (everything you're carrying). I List selected parts of your inventory, usually be specifying - the character for a particular set of objects, like `[' for + the character for a particular set of objects, like `[' for armor or `!' for potions. I* - list all gems in inventory; @@ -838,12 +838,12 @@ O Set options. - A menu showing the current option values will be displayed. - You can change most values simply by selecting the menu en- + A menu showing the current option values will be displayed. + You can change most values simply by selecting the menu en- try for the given option (ie, by typing its letter or click- - ing upon it, depending on your user interface). For the - non-boolean choices, a further menu or prompt will appear - once you've closed this menu. The available options are + ing upon it, depending on your user interface). For the + non-boolean choices, a further menu or prompt will appear + once you've closed this menu. The available options are listed later in this Guidebook. Options are usually set be- fore the game rather than with the `O' command; see the sec- tion on options below. @@ -852,7 +852,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -862,10 +862,10 @@ - Shortcut for "#overview": list interesting dungeon levels + Shortcut for "#overview": list interesting dungeon levels visited. - (Prior to 3.6.0, `^O' was a debug mode command which listed + (Prior to 3.6.0, `^O' was a debug mode command which listed the placement of all special levels. Use "#wizwhere" to run that command.) @@ -874,15 +874,15 @@ P Put on an accessory (ring, amulet, or blindfold). This command may also be used to wear armor. The prompt for - which inventory item to use will only list accessories, but - choosing an unlisted item of armor will attempt to wear it. + which inventory item to use will only list accessories, but + choosing an unlisted item of armor will attempt to wear it. (See the `W' command below. It lists armor as the inventory choices but will accept an accessory and attempt to put that on.) ^P Repeat previous message. - Subsequent `^P's repeat earlier messages. For some inter- + Subsequent `^P's repeat earlier messages. For some inter- faces, the behavior can be varied via the msg_window option. q Quaff (drink) something (potion, water, etc). @@ -918,7 +918,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -959,19 +959,19 @@ T Take off armor. - If you're wearing more than one piece, you'll be prompted - for which one to take off. (Note that this treats a cloak - covering a suit and/or a shirt, or a suit covering a shirt, + If you're wearing more than one piece, you'll be prompted + for which one to take off. (Note that this treats a cloak + covering a suit and/or a shirt, or a suit covering a shirt, as if the underlying items weren't there.) When you're only - wearing one, then by default it will be taken off without - asking, but you can set the paranoid_confirmation option to + wearing one, then by default it will be taken off without + asking, but you can set the paranoid_confirmation option to require a prompt. - This command may also be used to remove accessories. The - prompt for which inventory item to take off only lists worn - armor, but a worn accessory can be chosen. (See the `R' + This command may also be used to remove accessories. The + prompt for which inventory item to take off only lists worn + armor, but a worn accessory can be chosen. (See the `R' command above. It lists accessories as the inventory choic- - es but will accept an item of armor and attempt to take it + es but will accept an item of armor and attempt to take it off.) ^T Teleport, if you have the ability. @@ -984,7 +984,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -996,44 +996,44 @@ w- - wield nothing, use your bare (or gloved) hands. - Some characters can wield two weapons at once; use the `X' + Some characters can wield two weapons at once; use the `X' command (or the "#twoweapon" extended command) to do so. W Wear armor. - This command may also be used to put on an accessory (ring, - amulet, or blindfold). The prompt for which inventory item + This command may also be used to put on an accessory (ring, + amulet, or blindfold). The prompt for which inventory item to use will only list armor, but choosing an unlisted acces- sory will attempt to put it on. (See the `P' command above. - It lists accessories as the inventory choices but will ac- + It lists accessories as the inventory choices but will ac- cept an item of armor and attempt to wear it.) x Exchange your wielded weapon with the item in your alternate weapon slot. The latter is used as your secondary weapon when engaging in - two-weapon combat. Note that if one of these slots is emp- + two-weapon combat. Note that if one of these slots is emp- ty, the exchange still takes place. X Toggle two-weapon combat, if your character can do it. Also available via the "#twoweapon" extended command. - (In versions prior to 3.6 this was the command to switch + (In versions prior to 3.6 this was the command to switch from normal play to "explore mode", also known as "discovery mode", which has now been moved to "#exploremode".) ^X Display basic information about your character. - Displays name, role, race, gender (unless role name makes - that redundant, such as Caveman or Priestess), and align- - ment, along with your patron deity and his or her opposi- - tion. It also shows most of the various items of informa- + Displays name, role, race, gender (unless role name makes + that redundant, such as Caveman or Priestess), and align- + ment, along with your patron deity and his or her opposi- + tion. It also shows most of the various items of informa- tion from the status line(s) in a less terse form, including - several additional things which don't appear in the normal + several additional things which don't appear in the normal status display due to space considerations. - In normal play, that's all that `^X' displays. In explore - mode, the role and status feedback is augmented by the in- + In normal play, that's all that `^X' displays. In explore + mode, the role and status feedback is augmented by the in- formation provided by enlightenment magic. z Zap a wand. @@ -1050,7 +1050,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -1116,7 +1116,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -1243,12 +1243,12 @@ #exploremode Enter the explore mode. - Requires confirmation; default response is n (no). To real- - ly switch to explore mode, respond with y. You can set the - paranoid_confirmation:quit option to require a response of + #fire + Fire ammunition from quiver. Default key is `f'. - NetHack 3.7 October 1, 2019 + + NetHack 3.6 May 7, 2019 @@ -1258,20 +1258,15 @@ - yes instead. - - #fire - Fire ammunition from quiver. Default key is `f'. - #force Force a lock. Autocompletes. Default key is `M-f'. #glance - Show what type of thing a map symbol corresponds to. De- + Show what type of thing a map symbol corresponds to. De- fault key is `;'. #help - Show the help menu. Default key is `?', and also `h' if + Show the help menu. Default key is `?', and also `h' if number_pad is on. #herecmdmenu @@ -1287,15 +1282,15 @@ Inventory specific item types. Default key is `I'. #invoke - Invoke an object's special powers. Autocompletes. Default + Invoke an object's special powers. Autocompletes. Default key is `M-i'. #jump - Jump to another location. Autocompletes. Default key is + Jump to another location. Autocompletes. Default key is `M-j', and also `j' if number_pad is on. #kick - Kick something. Default key is `^D', and `k' if number_pad + Kick something. Default key is `^D', and `k' if number_pad is on. #known @@ -1307,14 +1302,19 @@ is ``'. #levelchange - Change your experience level. Autocompletes. Debug mode + Change your experience level. Autocompletes. Debug mode only. #lightsources Show mobile light sources. Autocompletes. Debug mode only. + #look + Look at what is here, under you. Default key is `:'. - NetHack 3.7 October 1, 2019 + + + + NetHack 3.6 May 7, 2019 @@ -1324,9 +1324,6 @@ - #look - Look at what is here, under you. Default key is `:'. - #loot Loot a box or bag on the floor beneath you, or the saddle from a steed standing next to you. Autocompletes. Precede @@ -1374,13 +1371,16 @@ Test the panic routine. Terminates the current game. Auto- completes. Debug mode only. - Asks for confirmation; default is n (no); continue playing. - To really panic, respond with y. You can set the para- - noid_confirmation:quit option to require a response of yes - instead. + #pay + Pay your shopping bill. Default key is `p'. + + #pickup + Pick up things at the current location. Default key is `,'. + The `m' prefix forces use of a menu. - NetHack 3.7 October 1, 2019 + + NetHack 3.6 May 7, 2019 @@ -1390,63 +1390,63 @@ - #pay - Pay your shopping bill. Default key is `p'. - - #pickup - Pick up things at the current location. Default key is `,'. - The `m' prefix forces use of a menu. - #polyself Polymorph self. Autocompletes. Debug mode only. #pray - Pray to the gods for help. Autocompletes. Default key is + Pray to the gods for help. Autocompletes. Default key is `M-p'. - Praying too soon after receiving prior help is a bad idea. - (Hint: entering the dungeon alive is treated as having re- + Praying too soon after receiving prior help is a bad idea. + (Hint: entering the dungeon alive is treated as having re- ceived help. You probably shouldn't start off a new game by - praying right away.) Since using this command by accident - can cause trouble, there is an option to make you confirm - your intent before praying. It is enabled by default, and - you can reset the paranoid_confirmation option to disable + praying right away.) Since using this command by accident + can cause trouble, there is an option to make you confirm + your intent before praying. It is enabled by default, and + you can reset the paranoid_confirmation option to disable it. #prevmsg - Show previously displayed game messages. Default key is + Show previously displayed game messages. Default key is `^P'. #puton - Put on an accessory (ring, amulet, etc). Default key is + Put on an accessory (ring, amulet, etc). Default key is `P'. #quaff Quaff (drink) something. Default key is `q'. #quit - Quit the program without saving your game. Autocompletes. + Quit the program without saving your game. Autocompletes. Default key is `M-q'. - Since using this command by accident would throw away the - current game, you are asked to confirm your intent before - quitting. Default response is n (no); continue playing. To - really quit, respond with y. You can set the paranoid_con- - firmation:quit option to require a response of yes instead. + Since using this command by accident would throw away the + current game, you are asked to confirm your intent before + quitting. By default a response of `y' acknowledges that + intent. You can set the paranoid_confirmation option to re- + quire a response of "yes" instead. #quiver Select ammunition for quiver. Default key is `Q'. #read - Read a scroll, a spellbook, or something else. Default key + Read a scroll, a spellbook, or something else. Default key is `r'. #redraw - Redraw the screen. Default key is `^R', and also `^L' if + Redraw the screen. Default key is `^R', and also `^L' if number_pad is on. + #remove + Remove an accessory (ring, amulet, etc). Default key is + `R'. - NetHack 3.7 October 1, 2019 + #ride + Ride (or stop riding) a saddled creature. Autocompletes. + + + NetHack 3.6 May 7, 2019 @@ -1456,23 +1456,17 @@ - #remove - Remove an accessory (ring, amulet, etc). Default key is - `R'. - - #ride - Ride (or stop riding) a saddled creature. Autocompletes. Default key is `M-R'. #rub - Rub a lamp or a stone. Autocompletes. Default key is `M- + Rub a lamp or a stone. Autocompletes. Default key is `M- r'. #save Save the game and exit the program. Default key is `S'. #search - Search for traps and secret doors around you. Default key + Search for traps and secret doors around you. Default key is `s'. #seeall @@ -1511,8 +1505,14 @@ #sit Sit down. Autocompletes. Default key is `M-s'. + #stats + Show memory usage statistics. Autocompletes. Debug mode + only. - NetHack 3.7 October 1, 2019 + + + + NetHack 3.6 May 7, 2019 @@ -1522,10 +1522,6 @@ - #stats - Show memory usage statistics. Autocompletes. Debug mode - only. - #suspend Suspend the game. Default key is `^Z'. @@ -1542,7 +1538,7 @@ Teleport around the level. Default key is `^T'. #terrain - Show bare map without displaying monsters, objects, or + Show bare map without displaying monsters, objects, or traps. Autocompletes. #therecmdmenu @@ -1577,8 +1573,12 @@ Note that you must use suitable weapons for this type of combat, or it will be automatically turned off. + #untrap + Untrap something (trap, door, or chest). Default key is `M- + u', and `u' if number_pad is on. - NetHack 3.7 October 1, 2019 + + NetHack 3.6 May 7, 2019 @@ -1588,10 +1588,6 @@ - #untrap - Untrap something (trap, door, or chest). Default key is `M- - u', and `u' if number_pad is on. - In some circumstances it can also be used to rescue trapped monsters. @@ -1599,7 +1595,7 @@ Go up a staircase. Default key is `<'. #vanquished - List vanquished monsters. Autocompletes. Debug mode only. + List vanquished monsters. Autocompletes. Debug mode only. #version Print compile time options for this version of NetHack. Au- @@ -1612,7 +1608,7 @@ Show vision array. Autocompletes. Debug mode only. #wait - Rest one move while doing nothing. Default key is `.', and + Rest one move while doing nothing. Default key is `.', and also ` ' if rest_on_space is on. #wear @@ -1622,7 +1618,7 @@ Tell what a key does. Default key is `&'. #whatis - Show what type of thing a symbol corresponds to. Default + Show what type of thing a symbol corresponds to. Default key is `/'. #wield @@ -1632,19 +1628,23 @@ Wipe off your face. Autocompletes. Default key is `M-w'. #wizbury - Bury objects under and around you. Autocompletes. Debug + Bury objects under and around you. Autocompletes. Debug mode only. #wizdetect - Search for hidden things (secret doors or traps or unseen - monsters) within a modest radius. Autocompletes. Debug + Search for hidden things (secret doors or traps or unseen + monsters) within a modest radius. Autocompletes. Debug mode only. Default key is `^E'. #wizgenesis Create a monster. May be prefixed by a count to create more + than one. Autocompletes. Debug mode only. Default key is + `^G'. - NetHack 3.7 October 1, 2019 + + + NetHack 3.6 May 7, 2019 @@ -1654,9 +1654,6 @@ - than one. Autocompletes. Debug mode only. Default key is - `^G'. - #wizidentify Identify all items in inventory. Autocompletes. Debug mode only. Default key is `^I'. @@ -1670,7 +1667,7 @@ Default key is `^V'. #wizmap - Map the level. Autocompletes. Debug mode only. Default + Map the level. Autocompletes. Debug mode only. Default key is `^F'. #wizrumorcheck @@ -1680,11 +1677,11 @@ Smell monster. Autocompletes. Debug mode only. #wizwhere - Show locations of special levels. Autocompletes. Debug + Show locations of special levels. Autocompletes. Debug mode only. #wizwish - Wish for something. Autocompletes. Debug mode only. De- + Wish for something. Autocompletes. Debug mode only. De- fault key is `^W'. #wmode @@ -1699,18 +1696,21 @@ If your keyboard has a meta key (which, when pressed in com- - bination with another key, modifies it by setting the "meta" - [8th, or "high"] bit), you can invoke many extended commands by + bination with another key, modifies it by setting the "meta" + [8th, or "high"] bit), you can invoke many extended commands by meta-ing the first letter of the command. In NT, OS/2, PC and ST NetHack, the "Alt" key can be used in - this fashion; on the Amiga, set the altmeta option to get this - behavior. On other systems, if typing "Alt" plus another key - transmits a two character sequence consisting of an Escape fol- - lowed by the other key, you may set the altmeta option to have + this fashion; on the Amiga, set the altmeta option to get this + behavior. On other systems, if typing "Alt" plus another key + transmits a two character sequence consisting of an Escape fol- + lowed by the other key, you may set the altmeta option to have + NetHack combine them into meta+key. - NetHack 3.7 October 1, 2019 + + + NetHack 3.6 May 7, 2019 @@ -1720,8 +1720,6 @@ - NetHack combine them into meta+key. - M-? #? (not supported by all platforms) M-2 #twoweapon (unless the number_pad option is enabled) @@ -1776,7 +1774,9 @@ - NetHack 3.7 October 1, 2019 + + + NetHack 3.6 May 7, 2019 @@ -1786,9 +1786,7 @@ - - - If the number_pad option is on, some additional letter com- + If the number_pad option is on, some additional letter com- mands are available: h #help @@ -1805,9 +1803,9 @@ 5. Rooms and corridors - Rooms and corridors in the dungeon are either lit or dark. - Any lit areas within your line of sight will be displayed; dark - areas are only displayed if they are within one space of you. + Rooms and corridors in the dungeon are either lit or dark. + Any lit areas within your line of sight will be displayed; dark + areas are only displayed if they are within one space of you. Walls and corridors remain on the map as you explore them. Secret corridors are hidden. You can find them with the `s' @@ -1816,33 +1814,35 @@ 5.1. Doorways Doorways connect rooms and corridors. Some doorways have no - doors; you can walk right through. Others have doors in them, + doors; you can walk right through. Others have doors in them, which may be open, closed, or locked. To open a closed door, use - the `o' (open) command; to close it again, use the `c' (close) + the `o' (open) command; to close it again, use the `c' (close) command. - You can get through a locked door by using a tool to pick + You can get through a locked door by using a tool to pick the lock with the `a' (apply) command, or by kicking it open with the `^D' (kick) command. - Open doors cannot be entered diagonally; you must approach - them straight on, horizontally or vertically. Doorways without + Open doors cannot be entered diagonally; you must approach + them straight on, horizontally or vertically. Doorways without doors are not restricted in this fashion. - Doors can be useful for shutting out monsters. Most mon- - sters cannot open doors, although a few don't need to (for exam- + Doors can be useful for shutting out monsters. Most mon- + sters cannot open doors, although a few don't need to (for exam- ple, ghosts can walk through doors). - Secret doors are hidden. You can find them with the `s' - (search) command. Once found they are in all ways equivalent to + Secret doors are hidden. You can find them with the `s' + (search) command. Once found they are in all ways equivalent to normal doors. + 5.2. Traps (`^') + + There are traps throughout the dungeon to snare the unwary + delver. For example, you may suddenly fall into a pit and be + stuck for a few turns trying to climb out. Traps don't appear on - - - - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -1852,63 +1852,63 @@ - 5.2. Traps (`^') - - There are traps throughout the dungeon to snare the unwary - delver. For example, you may suddenly fall into a pit and be - stuck for a few turns trying to climb out. Traps don't appear on your map until you see one triggered by moving onto it, see some- thing fall into it, or you discover it with the `s' (search) com- - mand. Monsters can fall prey to traps, too, which can be a very + mand. Monsters can fall prey to traps, too, which can be a very useful defensive strategy. There is a special pre-mapped branch of the dungeon based on - the classic computer game "Sokoban." The goal is to push the - boulders into the pits or holes. With careful foresight, it is - possible to complete all of the levels according to the tradi- - tional rules of Sokoban. Some allowances are permitted in case + the classic computer game "Sokoban." The goal is to push the + boulders into the pits or holes. With careful foresight, it is + possible to complete all of the levels according to the tradi- + tional rules of Sokoban. Some allowances are permitted in case the player gets stuck; however, they will lower your luck. 5.3. Stairs and ladders (`<', `>') - In general, each level in the dungeon will have a staircase + In general, each level in the dungeon will have a staircase going up (`<') to the previous level and another going down (`>') - to the next level. There are some exceptions though. For in- - stance, fairly early in the dungeon you will find a level with + to the next level. There are some exceptions though. For in- + stance, fairly early in the dungeon you will find a level with two down staircases, one continuing into the dungeon and the oth- - er branching into an area known as the Gnomish Mines. Those - mines eventually hit a dead end, so after exploring them (if you - choose to do so), you'll need to climb back up to the main dun- + er branching into an area known as the Gnomish Mines. Those + mines eventually hit a dead end, so after exploring them (if you + choose to do so), you'll need to climb back up to the main dun- geon. - When you traverse a set of stairs, or trigger a trap which - sends you to another level, the level you're leaving will be de- - activated and stored in a file on disk. If you're moving to a + When you traverse a set of stairs, or trigger a trap which + sends you to another level, the level you're leaving will be de- + activated and stored in a file on disk. If you're moving to a previously visited level, it will be loaded from its file on disk - and reactivated. If you're moving to a level which has not yet - been visited, it will be created (from scratch for most random + and reactivated. If you're moving to a level which has not yet + been visited, it will be created (from scratch for most random levels, from a template for some "special" levels, or loaded from the remains of an earlier game for a "bones" level as briefly de- - scribed below). Monsters are only active on the current level; + scribed below). Monsters are only active on the current level; those on other levels are essentially placed into stasis. - Ordinarily when you climb a set of stairs, you will arrive - on the corresponding staircase at your destination. However, - pets (see below) and some other monsters will follow along if + Ordinarily when you climb a set of stairs, you will arrive + on the corresponding staircase at your destination. However, + pets (see below) and some other monsters will follow along if they're close enough when you travel up or down stairs, and occa- - sionally one of these creatures will displace you during the + sionally one of these creatures will displace you during the climb. When that occurs, the pet or other monster will arrive on the staircase and you will end up nearby. - Ladders serve the same purpose as staircases, and the two - types of inter-level connections are nearly indistinguishable + Ladders serve the same purpose as staircases, and the two + types of inter-level connections are nearly indistinguishable during game play. + 5.4. Shops and shopping + + Occasionally you will run across a room with a shopkeeper + near the door and many items lying on the floor. You can buy + items by picking them up and then using the `p' command. You can + inquire about the price of an item prior to picking it up by us- + ing the "#chat" command while standing on it. Using an item - - - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -1918,15 +1918,9 @@ - 5.4. Shops and shopping - - Occasionally you will run across a room with a shopkeeper - near the door and many items lying on the floor. You can buy - items by picking them up and then using the `p' command. You can - inquire about the price of an item prior to picking it up by us- - ing the "#chat" command while standing on it. Using an item pri- - or to paying for it will incur a charge, and the shopkeeper won't - allow you to leave the shop until you have paid any debt you owe. + prior to paying for it will incur a charge, and the shopkeeper + won't allow you to leave the shop until you have paid any debt + you owe. You can sell items to a shopkeeper by dropping them to the floor while inside a shop. You will either be offered an amount @@ -1961,20 +1955,26 @@ * The price of a given item can vary due to a variety of factors. - * A shopkeeper treats the spot immediately inside the door as if + * A shopkeeper treats the spot immediately inside the door as if it were outside the shop. * While the shopkeeper watches you like a hawk, he will generally ignore any other customers. - * If a shop is "closed for inventory," it will not open of its + * If a shop is "closed for inventory," it will not open of its own accord. * Shops do not get restocked with new items, regardless of inven- tory depletion. + 6. Monsters - NetHack 3.7 October 1, 2019 + Monsters you cannot see are not displayed on the screen. + Beware! You may suddenly come upon one in a dark place. Some + magic items can help you locate them before they locate you + + + NetHack 3.6 May 7, 2019 @@ -1984,30 +1984,25 @@ - 6. Monsters - - Monsters you cannot see are not displayed on the screen. - Beware! You may suddenly come upon one in a dark place. Some - magic items can help you locate them before they locate you (which some monsters can do very well). - The commands `/' and `;' may be used to obtain information - about those monsters who are displayed on the screen. The com- - mand "#name" (by default bound to `C'), allows you to assign a - name to a monster, which may be useful to help distinguish one - from another when multiple monsters are present. Assigning a + The commands `/' and `;' may be used to obtain information + about those monsters who are displayed on the screen. The com- + mand "#name" (by default bound to `C'), allows you to assign a + name to a monster, which may be useful to help distinguish one + from another when multiple monsters are present. Assigning a name which is just a space will remove any prior name. The extended command "#chat" can be used to interact with an adjacent monster. There is no actual dialog (in other words, you don't get to choose what you'll say), but chatting with some mon- - sters such as a shopkeeper or the Oracle of Delphi can produce + sters such as a shopkeeper or the Oracle of Delphi can produce useful results. 6.1. Fighting - If you see a monster and you wish to fight it, just attempt - to walk into it. Many monsters you find will mind their own + If you see a monster and you wish to fight it, just attempt + to walk into it. Many monsters you find will mind their own business unless you attack them. Some of them are very dangerous when angered. Remember: discretion is the better part of valor. @@ -2039,8 +2034,13 @@ feed it, too, by throwing it food. A properly trained pet can be very useful under certain circumstances. + Your pet also gains experience from killing monsters, and + can grow over time, gaining hit points and doing more damage. + Initially, your pet may even be better at killing things than + you, which makes pets useful for low-level characters. - NetHack 3.7 October 1, 2019 + + NetHack 3.6 May 7, 2019 @@ -2050,11 +2050,6 @@ - Your pet also gains experience from killing monsters, and - can grow over time, gaining hit points and doing more damage. - Initially, your pet may even be better at killing things than - you, which makes pets useful for low-level characters. - Your pet will follow you up and down staircases if it is next to you when you move. Otherwise your pet will be stranded and may become wild. Similarly, when you trigger certain types @@ -2081,32 +2076,37 @@ Use the `a' (apply) command and pick a saddle in your inven- tory to attempt to put that saddle on an adjacent creature. If - successful, it will be transferred to that creature's inventory. + successful, it will be transferred to that creature's inventory. Use the "#loot" command while adjacent to a saddled creature - to try to remove the saddle from that creature. If successful, + to try to remove the saddle from that creature. If successful, it will be transferred to your inventory. 6.4. Bones levels - You may encounter the shades and corpses of other adventur- + You may encounter the shades and corpses of other adventur- ers (or even former incarnations of yourself!) and their personal - effects. Ghosts are hard to kill, but easy to avoid, since - they're slow and do little damage. You can plunder the deceased - adventurer's possessions; however, they are likely to be cursed. + effects. Ghosts are hard to kill, but easy to avoid, since + they're slow and do little damage. You can plunder the deceased + adventurer's possessions; however, they are likely to be cursed. Beware of whatever killed the former player; it is probably still lurking around, gloating over its last victory. 6.5. Persistence of Monsters Monsters (a generic reference which also includes humans and - pets) are only shown while they can be seen or otherwise sensed. - Moving to a location where you can't see or sense a monster any - more will result in it disappearing from your map, similarly if + pets) are only shown while they can be seen or otherwise sensed. + Moving to a location where you can't see or sense a monster any + more will result in it disappearing from your map, similarly if it is the one who moved rather than you. + However, if you encounter a monster which you can't see or + sense -- perhaps it is invisible and has just tapped you on the + noggin -- a special "remembered, unseen monster" marker will be + displayed at the location where you think it is. That will - NetHack 3.7 October 1, 2019 + + NetHack 3.6 May 7, 2019 @@ -2116,63 +2116,63 @@ - However, if you encounter a monster which you can't see or - sense -- perhaps it is invisible and has just tapped you on the - noggin -- a special "remembered, unseen monster" marker will be - displayed at the location where you think it is. That will per- - sist until you have proven that there is no monster there, even - if the unseen monster moves to another location or you move to a - spot where the marker's location ordinarily wouldn't be seen any - more. + persist until you have proven that there is no monster there, + even if the unseen monster moves to another location or you move + to a spot where the marker's location ordinarily wouldn't be seen + any more. 7. Objects When you find something in the dungeon, it is common to want to pick it up. In NetHack, this is accomplished automatically by - walking over the object (unless you turn off the autopickup op- - tion (see below), or move with the `m' prefix (see above)), or + walking over the object (unless you turn off the autopickup op- + tion (see below), or move with the `m' prefix (see above)), or manually by using the `,' command. - If you're carrying too many items, NetHack will tell you so - and you won't be able to pick up anything more. Otherwise, it - will add the object(s) to your pack and tell you what you just + If you're carrying too many items, NetHack will tell you so + and you won't be able to pick up anything more. Otherwise, it + will add the object(s) to your pack and tell you what you just picked up. - As you add items to your inventory, you also add the weight - of that object to your load. The amount that you can carry de- - pends on your strength and your constitution. The stronger and - sturdier you are, the less the additional load will affect you. + As you add items to your inventory, you also add the weight + of that object to your load. The amount that you can carry de- + pends on your strength and your constitution. The stronger and + sturdier you are, the less the additional load will affect you. There comes a point, though, when the weight of all of that stuff - you are carrying around with you through the dungeon will encum- + you are carrying around with you through the dungeon will encum- ber you. Your reactions will get slower and you'll burn calories - faster, requiring food more frequently to cope with it. Eventu- - ally, you'll be so overloaded that you'll either have to discard + faster, requiring food more frequently to cope with it. Eventu- + ally, you'll be so overloaded that you'll either have to discard some of what you're carrying or collapse under its weight. - NetHack will tell you how badly you have loaded yourself. - If you are encumbered, one of the conditions "Burdened", + NetHack will tell you how badly you have loaded yourself. + If you are encumbered, one of the conditions "Burdened", "Stressed", "Strained", "Overtaxed" or "Overloaded" will be shown on the bottom line status display. When you pick up an object, it is assigned an inventory let- - ter. Many commands that operate on objects must ask you to find - out which object you want to use. When NetHack asks you to + ter. Many commands that operate on objects must ask you to find + out which object you want to use. When NetHack asks you to choose a particular object you are carrying, you are usually pre- - sented with a list of inventory letters to choose from (see Com- + sented with a list of inventory letters to choose from (see Com- mands, above). - Some objects, such as weapons, are easily differentiated. - Others, like scrolls and potions, are given descriptions which - vary according to type. During a game, any two objects with the - same description are the same type. However, the descriptions + Some objects, such as weapons, are easily differentiated. + Others, like scrolls and potions, are given descriptions which + vary according to type. During a game, any two objects with the + same description are the same type. However, the descriptions will vary from game to game. When you use one of these objects, if its effect is obvious, - NetHack will remember what it is for you. If its effect isn't - extremely obvious, you will be asked what you want to call this + NetHack will remember what it is for you. If its effect isn't + extremely obvious, you will be asked what you want to call this + type of object so you will recognize it later. You can also use + the "#name" command, for the same purpose at any time, to name + all objects of a particular type or just an individual object. + When you use "#name" on an object which has already been named, - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -2182,63 +2182,63 @@ - type of object so you will recognize it later. You can also use - the "#name" command, for the same purpose at any time, to name - all objects of a particular type or just an individual object. - When you use "#name" on an object which has already been named, - specifying a space as the value will remove the prior name in- + specifying a space as the value will remove the prior name in- stead of assigning a new one. 7.1. Curses and Blessings - Any object that you find may be cursed, even if the object + Any object that you find may be cursed, even if the object is otherwise helpful. The most common effect of a curse is being - stuck with (and to) the item. Cursed weapons weld themselves to - your hand when wielded, so you cannot unwield them. Any cursed - item you wear is not removable by ordinary means. In addition, - cursed arms and armor usually, but not always, bear negative en- + stuck with (and to) the item. Cursed weapons weld themselves to + your hand when wielded, so you cannot unwield them. Any cursed + item you wear is not removable by ordinary means. In addition, + cursed arms and armor usually, but not always, bear negative en- chantments that make them less effective in combat. Other cursed objects may act poorly or detrimentally in other ways. - Objects can also be blessed. Blessed items usually work - better or more beneficially than normal uncursed items. For ex- + Objects can also be blessed. Blessed items usually work + better or more beneficially than normal uncursed items. For ex- ample, a blessed weapon will do more damage against demons. Objects which are neither cursed nor blessed are referred to - as uncursed. They could just as easily have been described as - unblessed, but the uncursed designation is what you will see - within the game. A "glass half full versus glass half empty" + as uncursed. They could just as easily have been described as + unblessed, but the uncursed designation is what you will see + within the game. A "glass half full versus glass half empty" situation; make of that what you will. There are magical means of bestowing or removing curses upon - objects, so even if you are stuck with one, you can still have - the curse lifted and the item removed. Priests and Priestesses - have an innate sensitivity to this property in any object, so - they can more easily avoid cursed objects than other character + objects, so even if you are stuck with one, you can still have + the curse lifted and the item removed. Priests and Priestesses + have an innate sensitivity to this property in any object, so + they can more easily avoid cursed objects than other character roles. - An item with unknown status will be reported in your inven- + An item with unknown status will be reported in your inven- tory with no prefix. An item which you know the state of will be - distinguished in your inventory by the presence of the word + distinguished in your inventory by the presence of the word "cursed", "uncursed" or "blessed" in the description of the item. - In some cases "uncursed" will be omitted as being redundant when + In some cases "uncursed" will be omitted as being redundant when enough other information is displayed. The implicit_uncursed op- - tion can be used to control this; toggle it off to have "un- + tion can be used to control this; toggle it off to have "un- cursed" be displayed even when that can be deduced from other at- tributes. 7.2. Weapons (`)') - Given a chance, most monsters in the Mazes of Menace will - gratuitously try to kill you. You need weapons for self-defense - (killing them first). Without a weapon, you do only 1-2 hit - points of damage (plus bonuses, if any). Monk characters are an - exception; they normally do more damage with bare (or gloved) + Given a chance, most monsters in the Mazes of Menace will + gratuitously try to kill you. You need weapons for self-defense + (killing them first). Without a weapon, you do only 1-2 hit + points of damage (plus bonuses, if any). Monk characters are an + exception; they normally do more damage with bare (or gloved) hands than they do with weapons. + There are wielded weapons, like maces and swords, and thrown + weapons, like arrows and spears. To hit monsters with a weapon, + you must wield it and attack them, or throw it at them. You can + simply elect to throw a spear. To shoot an arrow, you should - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -2248,63 +2248,63 @@ - There are wielded weapons, like maces and swords, and thrown - weapons, like arrows and spears. To hit monsters with a weapon, - you must wield it and attack them, or throw it at them. You can - simply elect to throw a spear. To shoot an arrow, you should - first wield a bow, then throw the arrow. Crossbows shoot cross- + first wield a bow, then throw the arrow. Crossbows shoot cross- bow bolts. Slings hurl rocks and (other) stones (like gems). - Enchanted weapons have a "plus" (or "to hit enhancement" - which can be either positive or negative) that adds to your - chance to hit and the damage you do to a monster. The only way + Enchanted weapons have a "plus" (or "to hit enhancement" + which can be either positive or negative) that adds to your + chance to hit and the damage you do to a monster. The only way to determine a weapon's enchantment is to have it magically iden- - tified somehow. Most weapons are subject to some type of damage + tified somehow. Most weapons are subject to some type of damage like rust. Such "erosion" damage can be repaired. - The chance that an attack will successfully hit a monster, - and the amount of damage such a hit will do, depends upon many - factors. Among them are: type of weapon, quality of weapon (en- + The chance that an attack will successfully hit a monster, + and the amount of damage such a hit will do, depends upon many + factors. Among them are: type of weapon, quality of weapon (en- chantment and/or erosion), experience level, strength, dexterity, - encumbrance, and proficiency (see below). The monster's armor + encumbrance, and proficiency (see below). The monster's armor class -- a general defense rating, not necessarily due to wearing of armor -- is a factor too; also, some monsters are particularly vulnerable to certain types of weapons. - Many weapons can be wielded in one hand; some require both - hands. When wielding a two-handed weapon, you can not wear a - shield, and vice versa. When wielding a one-handed weapon, you - can have another weapon ready to use by setting things up with - the `x' command, which exchanges your primary (the one being - wielded) and alternate weapons. And if you have proficiency in - the "two weapon combat" skill, you may wield both weapons simul- + Many weapons can be wielded in one hand; some require both + hands. When wielding a two-handed weapon, you can not wear a + shield, and vice versa. When wielding a one-handed weapon, you + can have another weapon ready to use by setting things up with + the `x' command, which exchanges your primary (the one being + wielded) and alternate weapons. And if you have proficiency in + the "two weapon combat" skill, you may wield both weapons simul- taneously as primary and secondary; use the `X' command to engage - or disengage that. Only some types of characters (barbarians, + or disengage that. Only some types of characters (barbarians, for instance) have the necessary skill available. Even with that - skill, using two weapons at once incurs a penalty in the chance + skill, using two weapons at once incurs a penalty in the chance to hit your target compared to using just one weapon at a time. - There might be times when you'd rather not wield any weapon - at all. To accomplish that, wield `-', or else use the `A' com- - mand which allows you to unwield the current weapon in addition + There might be times when you'd rather not wield any weapon + at all. To accomplish that, wield `-', or else use the `A' com- + mand which allows you to unwield the current weapon in addition to taking off other worn items. - Those of you in the audience who are AD&D players, be aware + Those of you in the audience who are AD&D players, be aware that each weapon which existed in AD&D does roughly the same dam- - age to monsters in NetHack. Some of the more obscure weapons + age to monsters in NetHack. Some of the more obscure weapons (such as the aklys, lucern hammer, and bec-de-corbin) are defined in an appendix to Unearthed Arcana, an AD&D supplement. - The commands to use weapons are `w' (wield), `t' (throw), - `f' (fire, an alternate way of throwing), `Q' (quiver), `x' (ex- + The commands to use weapons are `w' (wield), `t' (throw), + `f' (fire, an alternate way of throwing), `Q' (quiver), `x' (ex- change), `X' (twoweapon), and "#enhance" (see below). + 7.2.1. Throwing and shooting + + You can throw just about anything via the `t' command. It + will prompt for the item to throw; picking `?' will list things + in your inventory which are considered likely to be thrown, or + picking `*' will list your entire inventory. After you've chosen + what to throw, you will be prompted for a direction rather than - - - - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -2314,42 +2314,35 @@ - 7.2.1. Throwing and shooting - - You can throw just about anything via the `t' command. It - will prompt for the item to throw; picking `?' will list things - in your inventory which are considered likely to be thrown, or - picking `*' will list your entire inventory. After you've chosen - what to throw, you will be prompted for a direction rather than - for a specific target. The distance something can be thrown de- + for a specific target. The distance something can be thrown de- pends mainly on the type of object and your strength. Arrows can - be thrown by hand, but can be thrown much farther and will be + be thrown by hand, but can be thrown much farther and will be more likely to hit when thrown while you are wielding a bow. - You can simplify the throwing operation by using the `Q' - command to select your preferred "missile", then using the `f' - command to throw it. You'll be prompted for a direction as - above, but you don't have to specify which item to throw each + You can simplify the throwing operation by using the `Q' + command to select your preferred "missile", then using the `f' + command to throw it. You'll be prompted for a direction as + above, but you don't have to specify which item to throw each time you use `f'. There is also an option, autoquiver, which has NetHack choose another item to automatically fill your quiver (or - quiver sack, or have at the ready) when the inventory slot used + quiver sack, or have at the ready) when the inventory slot used for `Q' runs out. - Some characters have the ability to fire a volley of multi- - ple items in a single turn. Knowing how to load several rounds + Some characters have the ability to fire a volley of multi- + ple items in a single turn. Knowing how to load several rounds of ammunition at once -- or hold several missiles in your hand -- - and still hit a target is not an easy task. Rangers are among - those who are adept at this task, as are those with a high level - of proficiency in the relevant weapon skill (in bow skill if - you're wielding one to shoot arrows, in crossbow skill if you're + and still hit a target is not an easy task. Rangers are among + those who are adept at this task, as are those with a high level + of proficiency in the relevant weapon skill (in bow skill if + you're wielding one to shoot arrows, in crossbow skill if you're wielding one to shoot bolts, or in sling skill if you're wielding one to shoot stones). The number of items that the character has - a chance to fire varies from turn to turn. You can explicitly - limit the number of shots by using a numeric prefix before the - `t' or `f' command. For example, "2f" (or "n2f" if using num- + a chance to fire varies from turn to turn. You can explicitly + limit the number of shots by using a numeric prefix before the + `t' or `f' command. For example, "2f" (or "n2f" if using num- ber_pad mode) would ensure that at most 2 arrows are shot even if - you could have fired 3. If you specify a larger number than - would have been shot ("4f" in this example), you'll just end up + you could have fired 3. If you specify a larger number than + would have been shot ("4f" in this example), you'll just end up shooting the same number (3, here) as if no limit had been speci- fied. Once the volley is in motion, all of the items will travel in the same direction; if the first ones kill a monster, the oth- @@ -2358,19 +2351,26 @@ 7.2.2. Weapon proficiency You will have varying degrees of skill in the weapons avail- - able. Weapon proficiency, or weapon skills, affect how well you - can use particular types of weapons, and you'll be able to im- - prove your skills as you progress through a game, depending on + able. Weapon proficiency, or weapon skills, affect how well you + can use particular types of weapons, and you'll be able to im- + prove your skills as you progress through a game, depending on your role, your experience level, and use of the weapons. - For the purposes of proficiency, weapons have been divided - up into various groups such as daggers, broadswords, and - polearms. Each role has a limit on what level of proficiency a - character can achieve for each group. For instance, wizards can - become highly skilled in daggers or staves but not in swords or + For the purposes of proficiency, weapons have been divided + up into various groups such as daggers, broadswords, and + polearms. Each role has a limit on what level of proficiency a + character can achieve for each group. For instance, wizards can + become highly skilled in daggers or staves but not in swords or + bows. + + The "#enhance" extended command is used to review current + weapons proficiency (also spell proficiency) and to choose which + skill(s) to improve when you've used one or more skills enough to + become eligible to do so. The skill rankings are "none" (some- + times also referred to as "restricted", because you won't be able - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -2380,63 +2380,63 @@ - bows. - - The "#enhance" extended command is used to review current - weapons proficiency (also spell proficiency) and to choose which - skill(s) to improve when you've used one or more skills enough to - become eligible to do so. The skill rankings are "none" (some- - times also referred to as "restricted", because you won't be able - to advance), "unskilled", "basic", "skilled", and "expert". Re- + to advance), "unskilled", "basic", "skilled", and "expert". Re- stricted skills simply will not appear in the list shown by "#en- hance". (Divine intervention might unrestrict a particular skill, in which case it will start at unskilled and be limited to - basic.) Some characters can enhance their barehanded combat or + basic.) Some characters can enhance their barehanded combat or martial arts skill beyond expert to "master" or "grand master". Use of a weapon in which you're restricted or unskilled will incur a modest penalty in the chance to hit a monster and also in - the amount of damage done when you do hit; at basic level, there - is no penalty or bonus; at skilled level, you receive a modest - bonus in the chance to hit and amount of damage done; at expert - level, the bonus is higher. A successful hit has a chance to - boost your training towards the next skill level (unless you've - already reached the limit for this skill). Once such training - reaches the threshold for that next level, you'll be told that - you feel more confident in your skills. At that point you can - use "#enhance" to increase one or more skills. Such skills are - not increased automatically because there is a limit to your to- - tal overall skills, so you need to actively choose which skills + the amount of damage done when you do hit; at basic level, there + is no penalty or bonus; at skilled level, you receive a modest + bonus in the chance to hit and amount of damage done; at expert + level, the bonus is higher. A successful hit has a chance to + boost your training towards the next skill level (unless you've + already reached the limit for this skill). Once such training + reaches the threshold for that next level, you'll be told that + you feel more confident in your skills. At that point you can + use "#enhance" to increase one or more skills. Such skills are + not increased automatically because there is a limit to your to- + tal overall skills, so you need to actively choose which skills to enhance and which to ignore. 7.2.3. Two-Weapon combat Some characters can use two weapons at once. Setting things - up to do so can seem cumbersome but becomes second nature with + up to do so can seem cumbersome but becomes second nature with use. To wield two weapons, you need to use the "#twoweapon" com- - mand. But first you need to have a weapon in each hand. (Note - that your two weapons are not fully equal; the one in the hand - you normally wield with is considered primary and the other one + mand. But first you need to have a weapon in each hand. (Note + that your two weapons are not fully equal; the one in the hand + you normally wield with is considered primary and the other one is considered secondary. The most noticeable difference is after - you stop -- or before you begin, for that matter -- wielding two + you stop -- or before you begin, for that matter -- wielding two weapons at once. The primary is your wielded weapon and the sec- - ondary is just an item in your inventory that's been designated + ondary is just an item in your inventory that's been designated as alternate weapon.) If your primary weapon is wielded but your off hand is empty - or has the wrong weapon, use the sequence `x', `w', `x' to first - swap your primary into your off hand, wield whatever you want as - secondary weapon, then swap them both back into the intended + or has the wrong weapon, use the sequence `x', `w', `x' to first + swap your primary into your off hand, wield whatever you want as + secondary weapon, then swap them both back into the intended hands. If your secondary or alternate weapon is correct but your primary one is not, simply use `w' to wield the primary. Lastly, - if neither hand holds the correct weapon, use `w', `x', `w' to + if neither hand holds the correct weapon, use `w', `x', `w' to first wield the intended secondary, swap it to off hand, and then wield the primary. + The whole process can be simplified via use of the push- + weapon option. When it is enabled, then using `w' to wield some- + thing causes the currently wielded weapon to become your alter- + nate weapon. So the sequence `w', `w' can be used to first wield + the weapon you intend to be secondary, and then wield the one you + want as primary which will push the first into secondary posi- + tion. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -2446,16 +2446,8 @@ - The whole process can be simplified via use of the push- - weapon option. When it is enabled, then using `w' to wield some- - thing causes the currently wielded weapon to become your alter- - nate weapon. So the sequence `w', `w' can be used to first wield - the weapon you intend to be secondary, and then wield the one you - want as primary which will push the first into secondary posi- - tion. - - When in two-weapon combat mode, using the `X' command tog- - gles back to single-weapon mode. Throwing or dropping either of + When in two-weapon combat mode, using the `X' command tog- + gles back to single-weapon mode. Throwing or dropping either of the weapons or having one of them be stolen or destroyed will al- so make you revert to single-weapon combat. @@ -2463,10 +2455,10 @@ Lots of unfriendly things lurk about; you need armor to pro- tect yourself from their blows. Some types of armor offer better - protection than others. Your armor class is a measure of this + protection than others. Your armor class is a measure of this protection. Armor class (AC) is measured as in AD&D, with 10 be- - ing the equivalent of no armor, and lower numbers meaning better - armor. Each suit of armor which exists in AD&D gives the same + ing the equivalent of no armor, and lower numbers meaning better + armor. Each suit of armor which exists in AD&D gives the same protection in NetHack. Here is an (incomplete) list of the armor classes provided by various suits of armor: dragon scale mail 1 @@ -2488,21 +2480,29 @@ leather jacket 9 no armor 10 - You can also wear other pieces of armor (for example hel- + You can also wear other pieces of armor (for example hel- mets, boots, shields, cloaks) to lower your armor class even fur- - ther, but you can only wear one item of each category (one suit - of armor, one cloak, one helmet, one shield, and so on) at a + ther, but you can only wear one item of each category (one suit + of armor, one cloak, one helmet, one shield, and so on) at a time. - If a piece of armor is enchanted, its armor protection will - be better (or worse) than normal, and its "plus" (or minus) will - subtract from your armor class. For example, a +1 chain mail + If a piece of armor is enchanted, its armor protection will + be better (or worse) than normal, and its "plus" (or minus) will + subtract from your armor class. For example, a +1 chain mail would give you better protection than normal chain mail, lowering - your armor class one unit further to 4. When you put on a piece - of armor, you immediately find out the armor class and any + your armor class one unit further to 4. When you put on a piece + of armor, you immediately find out the armor class and any + "plusses" it provides. Cursed pieces of armor usually have nega- + tive enchantments (minuses) in addition to being unremovable. + + Many types of armor are subject to some kind of damage like + rust. Such damage can be repaired. Some types of armor may in- + hibit spell casting. - NetHack 3.7 October 1, 2019 + + + NetHack 3.6 May 7, 2019 @@ -2512,63 +2512,63 @@ - "plusses" it provides. Cursed pieces of armor usually have nega- - tive enchantments (minuses) in addition to being unremovable. - - Many types of armor are subject to some kind of damage like - rust. Such damage can be repaired. Some types of armor may in- - hibit spell casting. - The commands to use armor are `W' (wear) and `T' (take off). - The `A' command can also be used to take off armor as well as + The `A' command can also be used to take off armor as well as other worn items. 7.4. Food (`%') - Food is necessary to survive. If you go too long without - eating you will faint, and eventually die of starvation. Some - types of food will spoil, and become unhealthy to eat, if not + Food is necessary to survive. If you go too long without + eating you will faint, and eventually die of starvation. Some + types of food will spoil, and become unhealthy to eat, if not protected. Food stored in ice boxes or tins ("cans") will usual- - ly stay fresh, but ice boxes are heavy, and tins take a while to + ly stay fresh, but ice boxes are heavy, and tins take a while to open. When you kill monsters, they usually leave corpses which are - also "food." Many, but not all, of these are edible; some also - give you special powers when you eat them. A good rule of thumb + also "food." Many, but not all, of these are edible; some also + give you special powers when you eat them. A good rule of thumb is "you are what you eat." Some character roles and some monsters are vegetarian. Veg- - etarian monsters will typically never eat animal corpses, while - vegetarian players can, but with some rather unpleasant side-ef- + etarian monsters will typically never eat animal corpses, while + vegetarian players can, but with some rather unpleasant side-ef- fects. - You can name one food item after something you like to eat + You can name one food item after something you like to eat with the fruit option. The command to eat food is `e'. 7.5. Scrolls (`?') - Scrolls are labeled with various titles, probably chosen by + Scrolls are labeled with various titles, probably chosen by ancient wizards for their amusement value (for example "READ ME," - or "THANX MAUD" backwards). Scrolls disappear after you read + or "THANX MAUD" backwards). Scrolls disappear after you read them (except for blank ones, without magic spells on them). - One of the most useful of these is the scroll of identify, + One of the most useful of these is the scroll of identify, which can be used to determine what another object is, whether it - is cursed or blessed, and how many uses it has left. Some ob- - jects of subtle enchantment are difficult to identify without + is cursed or blessed, and how many uses it has left. Some ob- + jects of subtle enchantment are difficult to identify without these. A mail daemon may run up and deliver mail to you as a scroll - of mail (on versions compiled with this feature). To use this - feature on versions where NetHack mail delivery is triggered by - electronic mail appearing in your system mailbox, you must let + of mail (on versions compiled with this feature). To use this + feature on versions where NetHack mail delivery is triggered by + electronic mail appearing in your system mailbox, you must let NetHack know where to look for new mail by setting the "MAIL" en- - vironment variable to the file name of your mailbox. You may + vironment variable to the file name of your mailbox. You may al- + so want to set the "MAILREADER" environment variable to the file + name of your favorite reader, so NetHack can shell to it when you + read the scroll. On versions of NetHack where mail is randomly + generated internal to the game, these environment variables are + ignored. You can disable the mail daemon by turning off the mail + option. - NetHack 3.7 October 1, 2019 + + NetHack 3.6 May 7, 2019 @@ -2578,63 +2578,63 @@ - also want to set the "MAILREADER" environment variable to the - file name of your favorite reader, so NetHack can shell to it - when you read the scroll. On versions of NetHack where mail is - randomly generated internal to the game, these environment vari- - ables are ignored. You can disable the mail daemon by turning - off the mail option. - The command to read a scroll is `r'. 7.6. Potions (`!') - Potions are distinguished by the color of the liquid inside + Potions are distinguished by the color of the liquid inside the flask. They disappear after you quaff them. - Clear potions are potions of water. Sometimes these are + Clear potions are potions of water. Sometimes these are blessed or cursed, resulting in holy or unholy water. Holy water - is the bane of the undead, so potions of holy water are good - things to throw (`t') at them. It is also sometimes very useful + is the bane of the undead, so potions of holy water are good + things to throw (`t') at them. It is also sometimes very useful to dip ("#dip") an object into a potion. The command to drink a potion is `q' (quaff). 7.7. Wands (`/') - Wands usually have multiple magical charges. Some types of + Wands usually have multiple magical charges. Some types of wands require a direction in which to zap them. You can also zap - them at yourself (just give a `.' or `s' for the direction). Be - warned, however, for this is often unwise. Other types of wands - don't require a direction. The number of charges in a wand is + them at yourself (just give a `.' or `s' for the direction). Be + warned, however, for this is often unwise. Other types of wands + don't require a direction. The number of charges in a wand is random and decreases by one whenever you use it. - When the number of charges left in a wand becomes zero, at- - tempts to use the wand will usually result in nothing happening. + When the number of charges left in a wand becomes zero, at- + tempts to use the wand will usually result in nothing happening. Occasionally, however, it may be possible to squeeze the last few - mana points from an otherwise spent wand, destroying it in the - process. A wand may be recharged by using suitable magic, but - doing so runs the risk of causing it to explode. The chance for - such an explosion starts out very small and increases each time + mana points from an otherwise spent wand, destroying it in the + process. A wand may be recharged by using suitable magic, but + doing so runs the risk of causing it to explode. The chance for + such an explosion starts out very small and increases each time the wand is recharged. In a truly desperate situation, when your back is up against - the wall, you might decide to go for broke and break your wand. - This is not for the faint of heart. Doing so will almost cer- + the wall, you might decide to go for broke and break your wand. + This is not for the faint of heart. Doing so will almost cer- tainly cause a catastrophic release of magical energies. - When you have fully identified a particular wand, inventory - display will include additional information in parentheses: the - number of times it has been recharged followed by a colon and + When you have fully identified a particular wand, inventory + display will include additional information in parentheses: the + number of times it has been recharged followed by a colon and then by its current number of charges. A current charge count of -1 is a special case indicating that the wand has been cancelled. The command to use a wand is `z' (zap). To break one, use the `a' (apply) command. + 7.8. Rings (`=') + + Rings are very useful items, since they are relatively per- + manent magic, unlike the usually fleeting effects of potions, + scrolls, and wands. - NetHack 3.7 October 1, 2019 + + + NetHack 3.6 May 7, 2019 @@ -2644,12 +2644,6 @@ - 7.8. Rings (`=') - - Rings are very useful items, since they are relatively per- - manent magic, unlike the usually fleeting effects of potions, - scrolls, and wands. - Putting on a ring activates its magic. You can wear only two rings, one on each ring finger. @@ -2661,46 +2655,52 @@ 7.9. Spellbooks (`+') Spellbooks are tomes of mighty magic. When studied with the - `r' (read) command, they transfer to the reader the knowledge of - a spell (and therefore eventually become unreadable) -- unless - the attempt backfires. Reading a cursed spellbook or one with + `r' (read) command, they transfer to the reader the knowledge of + a spell (and therefore eventually become unreadable) -- unless + the attempt backfires. Reading a cursed spellbook or one with mystic runes beyond your ken can be harmful to your health! - A spell (even when learned) can also backfire when you cast - it. If you attempt to cast a spell well above your experience - level, or if you have little skill with the appropriate spell - type, or cast it at a time when your luck is particularly bad, - you can end up wasting both the energy and the time required in + A spell (even when learned) can also backfire when you cast + it. If you attempt to cast a spell well above your experience + level, or if you have little skill with the appropriate spell + type, or cast it at a time when your luck is particularly bad, + you can end up wasting both the energy and the time required in casting. - Casting a spell calls forth magical energies and focuses - them with your naked mind. Some of the magical energy released - comes from within you. Casting temporarily drains your magical + Casting a spell calls forth magical energies and focuses + them with your naked mind. Some of the magical energy released + comes from within you. Casting temporarily drains your magical power, which will slowly be recovered, and causes you to need ad- - ditional food. Casting of spells also requires practice. With - practice, your skill in each category of spell casting will im- - prove. Over time, however, your memory of each spell will dim, + ditional food. Casting of spells also requires practice. With + practice, your skill in each category of spell casting will im- + prove. Over time, however, your memory of each spell will dim, and you will need to relearn it. Some spells require a direction in which to cast them, simi- - lar to wands. To cast one at yourself, just give a `.' or `s' + lar to wands. To cast one at yourself, just give a `.' or `s' for the direction. A few spells require you to pick a target lo- - cation rather than just specify a particular direction. Other + cation rather than just specify a particular direction. Other spells don't require any direction or target. Just as weapons are divided into groups in which a character - can become proficient (to varying degrees), spells are similarly + can become proficient (to varying degrees), spells are similarly grouped. Successfully casting a spell exercises its skill group; - using the "#enhance" command to advance a sufficiently exercised - skill will affect all spells within the group. Advanced skill - may increase the potency of spells, reduce their risk of failure + using the "#enhance" command to advance a sufficiently exercised + skill will affect all spells within the group. Advanced skill + may increase the potency of spells, reduce their risk of failure during casting attempts, and improve the accuracy of the estimate - for how much longer they will be retained in your memory. Skill - slots are shared with weapons skills. (See also the section on + for how much longer they will be retained in your memory. Skill + slots are shared with weapons skills. (See also the section on "Weapon proficiency".) + Casting a spell also requires flexible movement, and wearing + various types of armor may interfere with that. - NetHack 3.7 October 1, 2019 + The command to read a spellbook is the same as for scrolls, + `r' (read). The `+' command lists each spell you know along with + + + NetHack 3.6 May 7, 2019 @@ -2710,34 +2710,29 @@ - Casting a spell also requires flexible movement, and wearing - various types of armor may interfere with that. - - The command to read a spellbook is the same as for scrolls, - `r' (read). The `+' command lists each spell you know along with its level, skill category, chance of failure when casting, and an - estimate of how strongly it is remembered. The `Z' (cast) com- + estimate of how strongly it is remembered. The `Z' (cast) com- mand casts a spell. 7.10. Tools (`(') Tools are miscellaneous objects with various purposes. Some - tools have a limited number of uses, akin to wand charges. For - example, lamps burn out after a while. Other tools are contain- + tools have a limited number of uses, akin to wand charges. For + example, lamps burn out after a while. Other tools are contain- ers, which objects can be placed into or taken out of. The command to use a tool is `a' (apply). 7.10.1. Containers - You may encounter bags, boxes, and chests in your travels. - A tool of this sort can be opened with the "#loot" extended com- - mand when you are standing on top of it (that is, on the same - floor spot), or with the `a' (apply) command when you are carry- - ing it. However, chests are often locked, and are in any case - unwieldy objects. You must set one down before unlocking it by + You may encounter bags, boxes, and chests in your travels. + A tool of this sort can be opened with the "#loot" extended com- + mand when you are standing on top of it (that is, on the same + floor spot), or with the `a' (apply) command when you are carry- + ing it. However, chests are often locked, and are in any case + unwieldy objects. You must set one down before unlocking it by using a key or lock-picking tool with the `a' (apply) command, by - kicking it with the `^D' command, or by using a weapon to force + kicking it with the `^D' command, or by using a weapon to force the lock with the "#force" extended command. Some chests are trapped, causing nasty things to happen when @@ -2746,27 +2741,32 @@ 7.11. Amulets (`"') - Amulets are very similar to rings, and often more powerful. + Amulets are very similar to rings, and often more powerful. Like rings, amulets have various magical properties, some benefi- cial, some harmful, which are activated by putting them on. Only one amulet may be worn at a time, around your neck. - The commands to use amulets are the same as for rings, `P' + The commands to use amulets are the same as for rings, `P' (put on) and `R' (remove). 7.12. Gems (`*') - Some gems are valuable, and can be sold for a lot of gold. - They are also a far more efficient way of carrying your riches. + Some gems are valuable, and can be sold for a lot of gold. + They are also a far more efficient way of carrying your riches. Valuable gems increase your score if you bring them with you when you exit. Other small rocks are also categorized as gems, but they are - much less valuable. All rocks, however, can be used as + much less valuable. All rocks, however, can be used as projec- + tile weapons (if you have a sling). In the most desperate of + cases, you can still throw them by hand. - NetHack 3.7 October 1, 2019 + + + + NetHack 3.6 May 7, 2019 @@ -2776,63 +2776,63 @@ - projectile weapons (if you have a sling). In the most desperate - of cases, you can still throw them by hand. - 7.13. Large rocks (``') - Statues and boulders are not particularly useful, and are - generally heavy. It is rumored that some statues are not what + Statues and boulders are not particularly useful, and are + generally heavy. It is rumored that some statues are not what they seem. - Very large humanoids (giants and their ilk) have been known + Very large humanoids (giants and their ilk) have been known to use boulders as weapons. - For some configurations of the program, statues are no - longer shown as ``' but by the letter representing the monster + For some configurations of the program, statues are no + longer shown as ``' but by the letter representing the monster they depict instead. 7.14. Gold (`$') - Gold adds to your score, and you can buy things in shops - with it. There are a number of monsters in the dungeon that may + Gold adds to your score, and you can buy things in shops + with it. There are a number of monsters in the dungeon that may be influenced by the amount of gold you are carrying (shopkeepers aside). 7.15. Persistence of Objects Normally, if you have seen an object at a particular map lo- - cation and move to another location where you can't directly see - that object any more, if will continue to be displayed on your - map. That remains the case even if it is not actually there any - more -- perhaps a monster has picked it up or it has rotted away - -- until you can see or feel that location again. One notable - exception is that if the object gets covered by the "remembered, - unseen monster" marker. When that marker is later removed after - you've verified that no monster is there, you will forget that - there was any object there regardless of whether the unseen mon- - ster actually took the object. If the object is still there, + cation and move to another location where you can't directly see + that object any more, if will continue to be displayed on your + map. That remains the case even if it is not actually there any + more -- perhaps a monster has picked it up or it has rotted away + -- until you can see or feel that location again. One notable + exception is that if the object gets covered by the "remembered, + unseen monster" marker. When that marker is later removed after + you've verified that no monster is there, you will forget that + there was any object there regardless of whether the unseen mon- + ster actually took the object. If the object is still there, then once you see or feel that location again you will re-discov- er the object and resume remembering it. The situation is the same for a pile of objects, except that - only the top item of the pile is displayed. The hilite_pile op- - tion can be enabled in order to show an item differently when it + only the top item of the pile is displayed. The hilite_pile op- + tion can be enabled in order to show an item differently when it is the top one of a pile. 8. Conduct - As if winning NetHack were not difficult enough, certain - players seek to challenge themselves by imposing restrictions on - the way they play the game. The game automatically tracks some - of these challenges, which can be checked at any time with the - #conduct command or at the end of the game. When you perform an - action which breaks a challenge, it will no longer be listed. - This gives players extra "bragging rights" for winning the game - with these challenges. Note that it is perfectly acceptable to + As if winning NetHack were not difficult enough, certain + players seek to challenge themselves by imposing restrictions on + the way they play the game. The game automatically tracks some + of these challenges, which can be checked at any time with the + #conduct command or at the end of the game. When you perform an + action which breaks a challenge, it will no longer be listed. + This gives players extra "bragging rights" for winning the game + with these challenges. Note that it is perfectly acceptable to + win the game without resorting to these restrictions and that it + is unusual for players to adhere to challenges the first time + they win the game. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -2842,63 +2842,63 @@ - win the game without resorting to these restrictions and that it - is unusual for players to adhere to challenges the first time - they win the game. - - Several of the challenges are related to eating behavior. - The most difficult of these is the foodless challenge. Although + Several of the challenges are related to eating behavior. + The most difficult of these is the foodless challenge. Although creatures can survive long periods of time without food, there is - a physiological need for water; thus there is no restriction on - drinking beverages, even if they provide some minor food bene- - fits. Calling upon your god for help with starvation does not + a physiological need for water; thus there is no restriction on + drinking beverages, even if they provide some minor food bene- + fits. Calling upon your god for help with starvation does not violate any food challenges either. - A strict vegan diet is one which avoids any food derived + A strict vegan diet is one which avoids any food derived from animals. The primary source of nutrition is fruits and veg- etables. The corpses and tins of blobs (`b'), jellies (`j'), and - fungi (`F') are also considered to be vegetable matter. Certain - human food is prepared without animal products; namely, lembas - wafers, cram rations, food rations (gunyoki), K-rations, and C- - rations. Metal or another normally indigestible material eaten + fungi (`F') are also considered to be vegetable matter. Certain + human food is prepared without animal products; namely, lembas + wafers, cram rations, food rations (gunyoki), K-rations, and C- + rations. Metal or another normally indigestible material eaten while polymorphed into a creature that can digest it is also con- - sidered vegan food. Note however that eating such items still + sidered vegan food. Note however that eating such items still counts against foodless conduct. - Vegetarians do not eat animals; however, they are less se- - lective about eating animal byproducts than vegans. In addition + Vegetarians do not eat animals; however, they are less se- + lective about eating animal byproducts than vegans. In addition to the vegan items listed above, they may eat any kind of pudding (`P') other than the black puddings, eggs and food made from eggs - (fortune cookies and pancakes), food made with milk (cream pies + (fortune cookies and pancakes), food made with milk (cream pies and candy bars), and lumps of royal jelly. Monks are expected to observe a vegetarian diet. - Eating any kind of meat violates the vegetarian, vegan, and - foodless conducts. This includes tripe rations, the corpses or - tins of any monsters not mentioned above, and the various other - chunks of meat found in the dungeon. Swallowing and digesting a + Eating any kind of meat violates the vegetarian, vegan, and + foodless conducts. This includes tripe rations, the corpses or + tins of any monsters not mentioned above, and the various other + chunks of meat found in the dungeon. Swallowing and digesting a monster while polymorphed is treated as if you ate the creature's - corpse. Eating leather, dragon hide, or bone items while poly- - morphed into a creature that can digest it, or eating monster + corpse. Eating leather, dragon hide, or bone items while poly- + morphed into a creature that can digest it, or eating monster brains while polymorphed into a mind flayer, is considered eating an animal, although wax is only an animal byproduct. - Regardless of conduct, there will be some items which are - indigestible, and others which are hazardous to eat. Using a + Regardless of conduct, there will be some items which are + indigestible, and others which are hazardous to eat. Using a swallow-and-digest attack against a monster is equivalent to eat- - ing the monster's corpse. Please note that the term "vegan" is - used here only in the context of diet. You are still free to - choose not to use or wear items derived from animals (e.g. - leather, dragon hide, bone, horns, coral), but the game will not - keep track of this for you. Also note that "milky" potions may + ing the monster's corpse. Please note that the term "vegan" is + used here only in the context of diet. You are still free to + choose not to use or wear items derived from animals (e.g. + leather, dragon hide, bone, horns, coral), but the game will not + keep track of this for you. Also note that "milky" potions may be a translucent white, but they do not contain milk, so they are - compatible with a vegan diet. Slime molds or player-defined - "fruits", although they could be anything from "cherries" to + compatible with a vegan diet. Slime molds or player-defined + "fruits", although they could be anything from "cherries" to "pork chops", are also assumed to be vegan. + An atheist is one who rejects religion. This means that you + cannot #pray, #offer sacrifices to any god, #turn undead, or + #chat with a priest. Particularly selective readers may argue + that playing Monk or Priest characters should violate this - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -2908,63 +2908,63 @@ - An atheist is one who rejects religion. This means that you - cannot #pray, #offer sacrifices to any god, #turn undead, or - #chat with a priest. Particularly selective readers may argue - that playing Monk or Priest characters should violate this con- - duct; that is a choice left to the player. Offering the Amulet - of Yendor to your god is necessary to win the game and is not - counted against this conduct. You are also not penalized for be- - ing spoken to by an angry god, priest(ess), or other religious + conduct; that is a choice left to the player. Offering the + Amulet of Yendor to your god is necessary to win the game and is + not counted against this conduct. You are also not penalized for + being spoken to by an angry god, priest(ess), or other religious figure; a true atheist would hear the words but attach no special meaning to them. - Most players fight with a wielded weapon (or tool intended + Most players fight with a wielded weapon (or tool intended to be wielded as a weapon). Another challenge is to win the game - without using such a wielded weapon. You are still permitted to - throw, fire, and kick weapons; use a wand, spell, or other type + without using such a wielded weapon. You are still permitted to + throw, fire, and kick weapons; use a wand, spell, or other type of item; or fight with your hands and feet. - In NetHack, a pacifist refuses to cause the death of any - other monster (i.e. if you would get experience for the death). - This is a particularly difficult challenge, although it is still + In NetHack, a pacifist refuses to cause the death of any + other monster (i.e. if you would get experience for the death). + This is a particularly difficult challenge, although it is still possible to gain experience by other means. An illiterate character cannot read or write. This includes - reading a scroll, spellbook, fortune cookie message, or t-shirt; + reading a scroll, spellbook, fortune cookie message, or t-shirt; writing a scroll; or making an engraving of anything other than a - single "X" (the traditional signature of an illiterate person). + single "X" (the traditional signature of an illiterate person). Reading an engraving, or any item that is absolutely necessary to - win the game, is not counted against this conduct. The identity - of scrolls and spellbooks (and knowledge of spells) in your - starting inventory is assumed to be learned from your teachers + win the game, is not counted against this conduct. The identity + of scrolls and spellbooks (and knowledge of spells) in your + starting inventory is assumed to be learned from your teachers prior to the start of the game and isn't counted. - There are several other challenges tracked by the game. It + There are several other challenges tracked by the game. It is possible to eliminate one or more species of monsters by geno- - cide; playing without this feature is considered a challenge. + cide; playing without this feature is considered a challenge. When the game offers you an opportunity to genocide monsters, you - may respond with the monster type "none" if you want to decline. - You can change the form of an item into another item of the same - type ("polypiling") or the form of your own body into another - creature ("polyself") by wand, spell, or potion of polymorph; - avoiding these effects are each considered challenges. Polymor- - phing monsters, including pets, does not break either of these - challenges. Finally, you may sometimes receive wishes; a game - without an attempt to wish for any items is a challenge, as is a - game without wishing for an artifact (even if the artifact imme- - diately disappears). When the game offers you an opportunity to - make a wish for an item, you may choose "nothing" if you want to + may respond with the monster type "none" if you want to decline. + You can change the form of an item into another item of the same + type ("polypiling") or the form of your own body into another + creature ("polyself") by wand, spell, or potion of polymorph; + avoiding these effects are each considered challenges. Polymor- + phing monsters, including pets, does not break either of these + challenges. Finally, you may sometimes receive wishes; a game + without an attempt to wish for any items is a challenge, as is a + game without wishing for an artifact (even if the artifact imme- + diately disappears). When the game offers you an opportunity to + make a wish for an item, you may choose "nothing" if you want to decline. 9. Options - Due to variations in personal tastes and conceptions of how + Due to variations in personal tastes and conceptions of how NetHack should do things, there are options you can set to change how NetHack behaves. - NetHack 3.7 October 1, 2019 + + + + + NetHack 3.6 May 7, 2019 @@ -2976,47 +2976,47 @@ 9.1. Setting the options - Options may be set in a number of ways. Within the game, + Options may be set in a number of ways. Within the game, the `O' command allows you to view all options and change most of - them. You can also set options automatically by placing them in - a configuration file, or in the NETHACKOPTIONS environment vari- + them. You can also set options automatically by placing them in + a configuration file, or in the NETHACKOPTIONS environment vari- able. Some versions of NetHack also have front-end programs that - allow you to set options before starting the game or a global + allow you to set options before starting the game or a global configuration for system administrators. 9.2. Using a configuration file The default name of the configuration file varies on differ- - ent operating systems. On MS-DOS and Windows, it is - "defaults.nh" in the same folder as nethack.exe or nethackW.exe. - On UNIX, Linux, and Mac OS X it is ".nethackrc" in the user's + ent operating systems. On MS-DOS and Windows, it is + "defaults.nh" in the same folder as nethack.exe or nethackW.exe. + On UNIX, Linux, and Mac OS X it is ".nethackrc" in the user's home directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor. - Any line in the configuration file starting with `#' is + Any line in the configuration file starting with `#' is treated as a comment. Empty lines are ignored. - Any line beginning with `[' and ending in `]' is considered - a section marker. The text between the square brackets is the - section name. Lines after a section marker belong to that sec- - tion, and are ignored unless a CHOOSE statement was used to se- + Any line beginning with `[' and ending in `]' is considered + a section marker. The text between the square brackets is the + section name. Lines after a section marker belong to that sec- + tion, and are ignored unless a CHOOSE statement was used to se- lect that section. Section names are case insensitive. - You can use different configuration statements in the file, + You can use different configuration statements in the file, some of which can be used multiple times. In general, the state- ments are written in capital letters, followed by an equals sign, - followed by settings particular to that statement. Here is a + followed by settings particular to that statement. Here is a list of allowed statements: OPTIONS - There are two types of options, boolean and compound options. - Boolean options toggle a setting on or off, while compound op- - tions take more diverse values. Prefix a boolean option with - "no" or `!' to turn it off. For compound options, the option + There are two types of options, boolean and compound options. + Boolean options toggle a setting on or off, while compound op- + tions take more diverse values. Prefix a boolean option with + "no" or `!' to turn it off. For compound options, the option name and value are separated by a colon. Some options are per- sistent, and apply only to new games. You can specify multiple OPTIONS statements, and multiple options separated by commas in - a single OPTIONS statement. (Comma separated options are pro- + a single OPTIONS statement. (Comma separated options are pro- cessed from right to left.) Example: @@ -3025,12 +3025,12 @@ OPTIONS=!legacy,autopickup,pickup_types:$"=/!?+ HACKDIR - Default location of files NetHack needs. On Windows HACKDIR - defaults to the location of the NetHack.exe or NetHackw.exe - file so setting HACKDIR to override that is not usually + Default location of files NetHack needs. On Windows HACKDIR + defaults to the location of the NetHack.exe or NetHackw.exe + file so setting HACKDIR to override that is not usually - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3043,15 +3043,15 @@ necessary or recommended. LEVELDIR - The location that in-progress level files are stored. Defaults + The location that in-progress level files are stored. Defaults to HACKDIR, must be writable. SAVEDIR - The location where saved games are kept. Defaults to HACKDIR, + The location where saved games are kept. Defaults to HACKDIR, must be writable. BONESDIR - The location that bones files are kept. Defaults to HACKDIR, + The location that bones files are kept. Defaults to HACKDIR, must be writable. LOCKDIR @@ -3059,14 +3059,14 @@ Defaults to HACKDIR, must be writable. TROUBLEDIR - The location that a record of game aborts and self-diagnosed + The location that a record of game aborts and self-diagnosed game problems is kept. Defaults to HACKDIR, must be writable. AUTOCOMPLETE Enable or disable an extended command autocompletion. Autocom- - pletion has no effect for the X11 windowport. You can specify - multiple autocompletions. To enable autocompletion, list the - extended command. Prefix the command with "!" to disable the + pletion has no effect for the X11 windowport. You can specify + multiple autocompletions. To enable autocompletion, list the + extended command. Prefix the command with "!" to disable the autocompletion for that command. Example: @@ -3074,13 +3074,13 @@ AUTOCOMPLETE=zap,!annotate AUTOPICKUP_EXCEPTION - Set exceptions to the pickup_types option. See the "Configur- + Set exceptions to the pickup_types option. See the "Configur- ing Autopickup Exceptions" section. BINDINGS - Change the key bindings of some special keys, menu accelera- + Change the key bindings of some special keys, menu accelera- tors, or extended commands. You can specify multiple bindings. - Format is key followed by the command, separated by a colon. + Format is key followed by the command, separated by a colon. See the "Changing Key Bindings" section for more information. Example: @@ -3088,7 +3088,7 @@ BIND=^X:getpos.autodescribe CHOOSE - Chooses at random one of the comma-separated parameters as an + Chooses at random one of the comma-separated parameters as an active section name. Lines in other sections are ignored. Example: @@ -3096,7 +3096,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3114,7 +3114,7 @@ OPTIONS=role:wiz,race:elf,align:cha,gender:mal MSGTYPE - Change the way messages are shown in the top status line. See + Change the way messages are shown in the top status line. See the "Configuring Message Types" section. MENUCOLOR @@ -3122,7 +3122,7 @@ ing Menu Colors" section. SYMBOLS - Override one or more symbols in the symbols files. See the + Override one or more symbols in the symbols files. See the "Modifying NetHack Symbols" section. Example: @@ -3130,9 +3130,9 @@ SYMBOLS=S_boulder:0 WIZKIT - Debug mode only: extra items to add to initial inventory. - Value is the name of a text file containing a list of item - names, one per line, up to a maximum of 128 lines. Each line + Debug mode only: extra items to add to initial inventory. + Value is the name of a text file containing a list of item + names, one per line, up to a maximum of 128 lines. Each line is processed by the function that handles wishing. Example: @@ -3140,7 +3140,7 @@ WIZKIT=~/wizkit.txt SOUNDDIR - Define the directory that contains the sound files. See the + Define the directory that contains the sound files. See the "Configuring User Sounds" section. SOUND @@ -3162,7 +3162,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3187,12 +3187,12 @@ 9.3. Using the NETHACKOPTIONS environment variable - The NETHACKOPTIONS variable is a comma-separated list of - initial values for the various options. Some can only be turned - on or off. You turn one of these on by adding the name of the - option to the list, and turn it off by typing a `!' or "no" be- - fore the name. Others take a character string as a value. You - can set string options by typing the option name, a colon or + The NETHACKOPTIONS variable is a comma-separated list of + initial values for the various options. Some can only be turned + on or off. You turn one of these on by adding the name of the + option to the list, and turn it off by typing a `!' or "no" be- + fore the name. Others take a character string as a value. You + can set string options by typing the option name, a colon or equals sign, and then the value of the string. The value is ter- minated by the next comma or the end of string. @@ -3202,7 +3202,7 @@ % setenv NETHACKOPTIONS "color,\!leg,name:Blue Meanie,fruit:lime" - in csh (note the need to escape the `!' since it's special to + in csh (note the need to escape the `!' since it's special to that shell), or the pair of commands $ NETHACKOPTIONS="color,!leg,name:Blue Meanie,fruit:lime" @@ -3212,15 +3212,15 @@ The NETHACKOPTIONS value is effectively the same as a single OPTIONS statement in a configuration file. The "OPTIONS=" prefix - is implied and comma separated options are processed from right + is implied and comma separated options are processed from right to left. Other types of configuration statements such as BIND or MSGTYPE are not allowed. Instead of a comma-separated list of options, NETHACKOPTIONS - can be set to the full name of a configuration file you want to - use. If that full name doesn't start with a slash, precede it - with `@' (at-sign) to let NetHack know that the rest is intended - as a file name. If it does start with `/', the at-sign is op- + can be set to the full name of a configuration file you want to + use. If that full name doesn't start with a slash, precede it + with `@' (at-sign) to let NetHack know that the rest is intended + as a file name. If it does start with `/', the at-sign is op- tional. @@ -3228,7 +3228,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3241,28 +3241,28 @@ 9.4. Customization options Here are explanations of what the various options do. Char- - acter strings that are too long may be truncated. Some of the + acter strings that are too long may be truncated. Some of the options listed may be inactive in your dungeon. - Some options are persistent, and are saved and reloaded + Some options are persistent, and are saved and reloaded along with the game. Changing a persistent option in the config- uration file applies only to new games. acoustics - Enable messages about what your character hears (default on). + Enable messages about what your character hears (default on). Note that this has nothing to do with your computer's audio ca- pabilities. Persistent. align - Your starting alignment (align:lawful, align:neutral, or - align:chaotic). You may specify just the first letter. The - default is to randomly pick an appropriate alignment. If you + Your starting alignment (align:lawful, align:neutral, or + align:chaotic). You may specify just the first letter. The + default is to randomly pick an appropriate alignment. If you prefix the value with `!' or "no", you will exclude that align- - ment from being picked randomly. Cannot be set with the `O' + ment from being picked randomly. Cannot be set with the `O' command. Persistent. autodescribe - Automatically describe the terrain under cursor when asked to + Automatically describe the terrain under cursor when asked to get a location on the map (default true). The whatis_coord op- tion controls whether the description includes map coordinates. @@ -3294,7 +3294,7 @@ tent. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3349,9 +3349,9 @@ Show out-of-sight areas of lit rooms (default on). Persistent. disclose - Controls what information the program reveals when the game - ends. Value is a space separated list of prompting/category - pairs (default is "ni na nv ng nc no", prompt with default re- + Controls what information the program reveals when the game + ends. Value is a space separated list of prompting/category + pairs (default is "ni na nv ng nc no", prompt with default re- sponse of `n' for each candidate). Persistent. The possibili- ties are: @@ -3360,7 +3360,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3377,8 +3377,8 @@ c - display your conduct; o - display dungeon overview. - Each disclosure possibility can optionally be preceded by a - prefix which lets you refine how it behaves. Here are the + Each disclosure possibility can optionally be preceded by a + prefix which lets you refine how it behaves. Here are the valid prefixes: y - prompt you and default to yes on the prompt; @@ -3386,27 +3386,27 @@ + - disclose it without prompting; - - do not disclose it and do not prompt. - The listing of vanquished monsters can be sorted, so there are + The listing of vanquished monsters can be sorted, so there are two additional choices for `v': ? - prompt you and default to ask on the prompt; # - disclose it without prompting, ask for sort order. Asking refers to picking one of the orderings from a menu. The - `+' disclose without prompting choice, or being prompted and + `+' disclose without prompting choice, or being prompted and answering `y' rather than `a', will default to showing monsters in the traditional order, from high level to low level. Omitted categories are implicitly added with `n' prefix. Spec- ified categories with omitted prefix implicitly use `+' prefix. - Order of the disclosure categories does not matter, program + Order of the disclosure categories does not matter, program display for end-of-game disclosure follows a set sequence. - (for example "disclose:yi na +v -g o") The example sets inven- + (for example "disclose:yi na +v -g o") The example sets inven- tory to prompt and default to yes, attributes to prompt and de- fault to no, vanquished to disclose without prompting, genocid- ed to not disclose and not prompt, conduct to implicitly prompt - and default to no, and overview to disclose without prompting. + and default to no, and overview to disclose without prompting. Note that the vanquished monsters list includes all monsters killed by traps and each other as well as by you. And the dun- @@ -3421,12 +3421,12 @@ Changes the extended commands interface to pop-up a menu of available commands. It is keystroke compatible with the tradi- tional interface except that it does not require that you hit - Enter. It is implemented for the tty interface (default off). + Enter. It is implemented for the tty interface (default off). - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3438,61 +3438,61 @@ For the X11 interface, which always uses a menu for choosing an extended command, it controls whether the menu shows all avail- - able commands (on) or just the subset of commands which have + able commands (on) or just the subset of commands which have traditionally been considered extended ones (off). female - An obsolete synonym for "gender:female". Cannot be set with + An obsolete synonym for "gender:female". Cannot be set with the `O' command. fixinv - An object's inventory letter sticks to it when it's dropped - (default on). If this is off, dropping an object shifts all + An object's inventory letter sticks to it when it's dropped + (default on). If this is off, dropping an object shifts all the remaining inventory letters. Persistent. force_invmenu - Commands asking for an inventory item show a menu instead of a + Commands asking for an inventory item show a menu instead of a text query with possible menu letters. Default is off. fruit - Name a fruit after something you enjoy eating (for example - "fruit:mango") (default "slime mold"). Basically a nostalgic - whimsy that NetHack uses from time to time. You should set - this to something you find more appetizing than slime mold. - Apples, oranges, pears, bananas, and melons already exist in + Name a fruit after something you enjoy eating (for example + "fruit:mango") (default "slime mold"). Basically a nostalgic + whimsy that NetHack uses from time to time. You should set + this to something you find more appetizing than slime mold. + Apples, oranges, pears, bananas, and melons already exist in NetHack, so don't use those. gender - Your starting gender (gender:male or gender:female). You may - specify just the first letter. Although you can still denote + Your starting gender (gender:male or gender:female). You may + specify just the first letter. Although you can still denote your gender using the "male" and "female" options, the "gender" - option will take precedence. The default is to randomly pick - an appropriate gender. If you prefix the value with `!' or - "no", you will exclude that gender from being picked randomly. + option will take precedence. The default is to randomly pick + an appropriate gender. If you prefix the value with `!' or + "no", you will exclude that gender from being picked randomly. Cannot be set with the `O' command. Persistent. goldX - When filtering objects based on bless/curse state (BUCX), - whether to treat gold pieces as X (unknown bless/curse state, - when "on") or U (known to be uncursed, when "off", the de- - fault). Gold is never blessed or cursed, but it is not de- + When filtering objects based on bless/curse state (BUCX), + whether to treat gold pieces as X (unknown bless/curse state, + when "on") or U (known to be uncursed, when "off", the de- + fault). Gold is never blessed or cursed, but it is not de- scribed as "uncursed" even when the implicit_uncursed option is "off". help - If more information is available for an object looked at with + If more information is available for an object looked at with the `/' command, ask if you want to see it (default on). Turn- - ing help off makes just looking at things faster, since you - aren't interrupted with the "More info?" prompt, but it also + ing help off makes just looking at things faster, since you + aren't interrupted with the "More info?" prompt, but it also means that you might miss some interesting and/or important in- formation. Persistent. herecmd_menu - When using a windowport that supports mouse and clicking on - yourself or next to you, show a menu of possible actions for + When using a windowport that supports mouse and clicking on + yourself or next to you, show a menu of possible actions for - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3502,34 +3502,34 @@ - the location. Same as "#herecmdmenu" and "#therecmdmenu" com- + the location. Same as "#herecmdmenu" and "#therecmdmenu" com- mands. hilite_pet - Visually distinguish pets from similar animals (default off). - The behavior of this option depends on the type of windowing + Visually distinguish pets from similar animals (default off). + The behavior of this option depends on the type of windowing you use. In text windowing, text highlighting or inverse video - is often used; with tiles, generally displays a heart symbol + is often used; with tiles, generally displays a heart symbol near pets. - With the curses interface, the petattr option controls how to - highlight pets and setting it will turn the hilite_pet option + With the curses interface, the petattr option controls how to + highlight pets and setting it will turn the hilite_pet option on or off as warranted. hilite_pile - Visually distinguish piles of objects from individual objects + Visually distinguish piles of objects from individual objects (default off). The behavior of this option depends on the type - of windowing you use. In text windowing, text highlighting or - inverse video is often used; with tiles, generally displays a + of windowing you use. In text windowing, text highlighting or + inverse video is often used; with tiles, generally displays a small plus-symbol beside the object on the top of the pile. hitpointbar - Show a hit point bar graph behind your name and title. Only - available for TTY and Windows GUI, and only when statushilites + Show a hit point bar graph behind your name and title. Only + available for TTY and Windows GUI, and only when statushilites is on. horsename - Name your starting horse (for example "horsename:Trigger"). + Name your starting horse (for example "horsename:Trigger"). Cannot be set with the `O' command. ignintr @@ -3558,7 +3558,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3569,34 +3569,34 @@ male - An obsolete synonym for "gender:male". Cannot be set with the + An obsolete synonym for "gender:male". Cannot be set with the `O' command. mention_walls Give feedback when walking against a wall (default off). menucolors - Enable coloring menu lines (default off). See "Configuring + Enable coloring menu lines (default off). See "Configuring Menu Colors" on how to configure the colors. menustyle Controls the interface used when you need to choose various ob- - jects (in response to the Drop command, for instance). The - value specified should be the first letter of one of the fol- - lowing: traditional, combination, full, or partial. Tradi- - tional was the only interface available for early versions; it - consists of a prompt for object class characters, followed by - an object-by-object prompt for all items matching the selected - object class(es). Combination starts with a prompt for object + jects (in response to the Drop command, for instance). The + value specified should be the first letter of one of the fol- + lowing: traditional, combination, full, or partial. Tradi- + tional was the only interface available for early versions; it + consists of a prompt for object class characters, followed by + an object-by-object prompt for all items matching the selected + object class(es). Combination starts with a prompt for object class(es) of interest, but then displays a menu of matching ob- - jects rather than prompting one-by-one. Full displays a menu - of object classes rather than a character prompt, and then a - menu of matching objects for selection. Partial skips the ob- + jects rather than prompting one-by-one. Full displays a menu + of object classes rather than a character prompt, and then a + menu of matching objects for selection. Partial skips the ob- ject class filtering and immediately displays a menu of all ob- jects. Persistent. menu_deselect_all - Menu character accelerator to deselect all items in a menu. + Menu character accelerator to deselect all items in a menu. Implemented by the Amiga, Gem, X11 and tty ports. Default `-'. menu_deselect_page @@ -3624,7 +3624,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3690,7 +3690,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3735,7 +3735,7 @@ Send padding nulls to the terminal (default on). Persistent. number_pad - Use digit keys instead of letters to move (default 0 or off). + Use digit keys instead of letters to move (default 0 or off). Valid settings are: 0 - move by letters; "yuhjklbn" @@ -3745,18 +3745,18 @@ 4 - combines 3 with 2; phone layout plus MS-DOS compatibility -1 - by letters but use `z' to go northwest, `y' to zap wands - For backward compatibility, omitting a value is the same as - specifying 1 and negating number_pad is the same as specifying - 0. (Settings 2 and 4 are for compatibility with MS-DOS or old + For backward compatibility, omitting a value is the same as + specifying 1 and negating number_pad is the same as specifying + 0. (Settings 2 and 4 are for compatibility with MS-DOS or old PC Hack; in addition to the different behavior for `5', `Alt-5' acts as `G' and `Alt-0' acts as `I'. Setting -1 is to accommo- - date some QWERTZ keyboards which have the location of the `y' - and `z' keys swapped.) When moving by numbers, to enter a + date some QWERTZ keyboards which have the location of the `y' + and `z' keys swapped.) When moving by numbers, to enter a count prefix for those commands which accept one (such as "12s" - to search twelve times), precede it with the letter `n' + to search twelve times), precede it with the letter `n' - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3769,60 +3769,60 @@ ("n12s"). packorder - Specify the order to list object types in (default + Specify the order to list object types in (default "")[%?+!=/(*`0_"). The value of this option should be a string containing the symbols for the various object types. Any omit- ted types are filled in at the end from the previous order. paranoid_confirmation - A space separated list of specific situations where alternate - prompting is desired. The default is paranoid_confirma- + A space separated list of specific situations where alternate + prompting is desired. The default is paranoid_confirma- tion:pray. - Confirm - for any prompts which are set to require "yes" - rather than `y', also require "no" to reject in- + Confirm - for any prompts which are set to require "yes" + rather than `y', also require "no" to reject in- stead of accepting any non-yes response as no quit - require "yes" rather than `y' to confirm quitting - the game or switching into non-scoring explore + the game or switching into non-scoring explore mode; - die - require "yes" rather than `y' to confirm dying - (not useful in normal play; applies to explore + die - require "yes" rather than `y' to confirm dying + (not useful in normal play; applies to explore mode); - bones - require "yes" rather than `y' to confirm saving + bones - require "yes" rather than `y' to confirm saving bones data when dying in debug mode; - attack - require "yes" rather than `y' to confirm attack- + attack - require "yes" rather than `y' to confirm attack- ing a peaceful monster; wand-break - require "yes" rather than `y' to confirm breaking a wand; Were-change - require "yes" rather than `y' to confirm changing - form due to lycanthropy when hero has polymorph + form due to lycanthropy when hero has polymorph control; - pray - require `y' to confirm an attempt to pray rather + pray - require `y' to confirm an attempt to pray rather than immediately praying; on by default; - Remove - require selection from inventory for `R' and `T' - commands even when wearing just one applicable + Remove - require selection from inventory for `R' and `T' + commands even when wearing just one applicable item. all - turn on all of the above. - By default, the pray choice is enabled, the others disabled. - To disable it without setting any of the other choices, use + By default, the pray choice is enabled, the others disabled. + To disable it without setting any of the other choices, use "paranoid_confirmation:none". To keep it enabled while setting - any of the others, include it in the list, such as "para- + any of the others, include it in the list, such as "para- noid_confirmation:attack pray Remove". perm_invent - If true, always display your current inventory in a window. - This only makes sense for windowing system interfaces that im- + If true, always display your current inventory in a window. + This only makes sense for windowing system interfaces that im- plement this feature. petattr - Specifies one or more text highlighting attributes to use when - showing pets on the map. Effectively a superset of the + Specifies one or more text highlighting attributes to use when + showing pets on the map. Effectively a superset of the hilite_pet boolean option. Curses interface only; value is one or more of the following letters. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3842,35 +3842,35 @@ l - Left line indicator r - Right line indicator - Some of those choices might not work, particularly the final - three, depending upon terminal hardware or terminal emulation + Some of those choices might not work, particularly the final + three, depending upon terminal hardware or terminal emulation software. - Currently multiple highlight-style letters can be combined by - simply stringing them together (for example, "bk"), but in the - future they might require being separated by plus signs (such - as "b+k", which works already). When using the `n' choice, it - should be specified on its own, not in combination with any of + Currently multiple highlight-style letters can be combined by + simply stringing them together (for example, "bk"), but in the + future they might require being separated by plus signs (such + as "b+k", which works already). When using the `n' choice, it + should be specified on its own, not in combination with any of the other letters. pettype - Specify the type of your initial pet, if you are playing a - character class that uses multiple types of pets; or choose to - have no initial pet at all. Possible values are "cat", "dog", + Specify the type of your initial pet, if you are playing a + character class that uses multiple types of pets; or choose to + have no initial pet at all. Possible values are "cat", "dog", "horse", and "none". If the choice is not allowed for the role - you are currently playing, it will be silently ignored. For - example, "horse" will only be honored when playing a knight. + you are currently playing, it will be silently ignored. For + example, "horse" will only be honored when playing a knight. Cannot be set with the `O' command. pickup_burden - When you pick up an item that would exceed this encumbrance - level (Unencumbered, Burdened, streSsed, straiNed, overTaxed, - or overLoaded), you will be asked if you want to continue. + When you pick up an item that would exceed this encumbrance + level (Unencumbered, Burdened, streSsed, straiNed, overTaxed, + or overLoaded), you will be asked if you want to continue. (Default `S'). Persistent. pickup_thrown - If this option is on and autopickup is also on, try to pick up - things that you threw, even if they aren't in pickup_types or + If this option is on and autopickup is also on, try to pick up + things that you threw, even if they aren't in pickup_types or match an autopickup exception. Default is on. Persistent. pickup_types @@ -3880,15 +3880,15 @@ sistent. pile_limit - When walking across a pile of objects on the floor, threshold - at which the message "there are few/several/many objects here" - is given instead of showing a popup list of those objects. A - value of 0 means "no limit" (always list the objects); a value - of 1 effectively means "never show the objects" since the pile - size will always be at least that big; default value is 5. + When walking across a pile of objects on the floor, threshold + at which the message "there are few/several/many objects here" + is given instead of showing a popup list of those objects. A + value of 0 means "no limit" (always list the objects); a value + of 1 effectively means "never show the objects" since the pile + size will always be at least that big; default value is 5. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3901,60 +3901,60 @@ Persistent. playmode - Values are "normal", "explore", or "debug". Allows selection - of explore mode (also known as discovery mode) or debug mode + Values are "normal", "explore", or "debug". Allows selection + of explore mode (also known as discovery mode) or debug mode (also known as wizard mode) instead of normal play. Debug mode - might only be allowed for someone logged in under a particular - user name (on multi-user systems) or specifying a particular + might only be allowed for someone logged in under a particular + user name (on multi-user systems) or specifying a particular character name (on single-user systems) or it might be disabled - entirely. Requesting it when not allowed or not possible re- + entirely. Requesting it when not allowed or not possible re- sults in explore mode instead. Default is normal play. pushweapon - Using the `w' (wield) command when already wielding something - pushes the old item into your alternate weapon slot (default - off). Likewise for the `a' (apply) command if it causes the + Using the `w' (wield) command when already wielding something + pushes the old item into your alternate weapon slot (default + off). Likewise for the `a' (apply) command if it causes the applied item to become wielded. Persistent. race Selects your race (for example, "race:human"). Default is ran- - dom. If you prefix the value with `!' or "no", you will ex- + dom. If you prefix the value with `!' or "no", you will ex- clude that race from being picked randomly. Cannot be set with the `O' command. Persistent. rest_on_space - Make the space bar a synonym for the `.' (#wait) command (de- + Make the space bar a synonym for the `.' (#wait) command (de- fault off). Persistent. role - Pick your type of character (for example "role:Samurai"); syn- - onym for "character". See "name" for an alternate method of - specifying your role. Normally only the first letter of the - value is examined; `r' is an exception with "Rogue", "Ranger", + Pick your type of character (for example "role:Samurai"); syn- + onym for "character". See "name" for an alternate method of + specifying your role. Normally only the first letter of the + value is examined; `r' is an exception with "Rogue", "Ranger", and "random" values. If you prefix the value with `!' or "no", - you will exclude that role from being picked randomly. Cannot + you will exclude that role from being picked randomly. Cannot be set with the `O' command. Persistent. roguesymset - This option may be used to select one of the named symbol sets - found within "symbols" to alter the symbols displayed on the + This option may be used to select one of the named symbol sets + found within "symbols" to alter the symbols displayed on the screen on the rogue level. rlecomp When writing out a save file, perform run length compression of - the map. Not all ports support run length compression. It has + the map. Not all ports support run length compression. It has no effect on reading an existing save file. runmode - Controls the amount of screen updating for the map window when - engaged in multi-turn movement (running via shift+direction or - control+direction and so forth, or via the travel command or + Controls the amount of screen updating for the map window when + engaged in multi-turn movement (running via shift+direction or + control+direction and so forth, or via the travel command or mouse click). The possible values are: teleport - update the map after movement has finished; - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -3969,13 +3969,13 @@ crawl - like walk, but pause briefly after each step. This option only affects the game's screen display, not the ac- - tual results of moving. The default is "run"; versions prior - to 3.4.1 used "teleport" only. Whether or not the effect is + tual results of moving. The default is "run"; versions prior + to 3.4.1 used "teleport" only. Whether or not the effect is noticeable will depend upon the window port used or on the type of terminal. Persistent. safe_pet - Prevent you from (knowingly) attacking your pets (default on). + Prevent you from (knowingly) attacking your pets (default on). Persistent. sanity_check @@ -3983,8 +3983,8 @@ off). Debug mode only. scores - Control what parts of the score list you are shown at the end - (for example "scores:5 top scores/4 around my score/own + Control what parts of the score list you are shown at the end + (for example "scores:5 top scores/4 around my score/own scores"). Only the first letter of each category (`t', `a', or `o') is necessary. Persistent. @@ -3993,9 +3993,9 @@ off). Persistent. showrace - Display yourself as the glyph for your race, rather than the - glyph for your role (default off). Note that this setting af- - fects only the appearance of the display, not the way the game + Display yourself as the glyph for your race, rather than the + glyph for your role (default off). Note that this setting af- + fects only the appearance of the display, not the way the game treats you. Persistent. showscore @@ -4007,20 +4007,20 @@ sortloot Controls the sorting behavior of the pickup lists for inventory - and #loot commands and some others. Persistent. The possible + and #loot commands and some others. Persistent. The possible values are: full - always sort the lists; - loot - only sort the lists that don't use inventory letters, + loot - only sort the lists that don't use inventory letters, like with the #loot and pickup commands; none - show lists the traditional way without sorting. sortpack - Sort the pack contents by type when displaying inventory (de- + Sort the pack contents by type when displaying inventory (de- fault on). Persistent. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4032,40 +4032,40 @@ sparkle Display a sparkly effect when a monster (including yourself) is - hit by an attack to which it is resistant (default on). Per- + hit by an attack to which it is resistant (default on). Per- sistent. standout Boldface monsters and "--More--" (default off). Persistent. statushilites - Controls how many turns status hilite behaviors highlight the - field. If negated or set to zero, disables status hiliting. + Controls how many turns status hilite behaviors highlight the + field. If negated or set to zero, disables status hiliting. See "Configuring Status Hilites" for further information. status_updates - Allow updates to the status lines at the bottom of the screen + Allow updates to the status lines at the bottom of the screen (default true). suppress_alert - This option may be set to a NetHack version level to suppress - alert notification messages about feature changes for that and + This option may be set to a NetHack version level to suppress + alert notification messages about feature changes for that and prior versions (for example "suppress_alert:3.3.1"). symset - This option may be used to select one of the named symbol sets - found within "symbols" to alter the symbols displayed on the - screen. Use "symset:default" to explicitly select the default + This option may be used to select one of the named symbol sets + found within "symbols" to alter the symbols displayed on the + screen. Use "symset:default" to explicitly select the default symbols. time - Show the elapsed game time in turns on bottom line (default + Show the elapsed game time in turns on bottom line (default off). Persistent. timed_delay - When pausing momentarily for display effect, such as with ex- - plosions and moving objects, use a timer rather than sending - extra characters to the screen. (Applies to "tty" interface + When pausing momentarily for display effect, such as with ex- + plosions and moving objects, use a timer rather than sending + extra characters to the screen. (Applies to "tty" interface only; "X11" interface always uses a timer based delay. The de- fault is on if configured into the program.) Persistent. @@ -4075,18 +4075,18 @@ toptenwin Put the ending display in a NetHack window instead of on stdout - (default off). Setting this option makes the score list visi- - ble when a windowing version of NetHack is started without a - parent window, but it no longer leaves the score list around + (default off). Setting this option makes the score list visi- + ble when a windowing version of NetHack is started without a + parent window, but it no longer leaves the score list around after game end on a terminal or emulating window. travel Allow the travel command (default on). Turning this option off - will prevent the game from attempting unintended moves if you + will prevent the game from attempting unintended moves if you make inadvertent mouse clicks on the map window. Persistent. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4097,13 +4097,13 @@ verbose - Provide more commentary during the game (default on). Persis- + Provide more commentary during the game (default on). Persis- tent. whatis_coord - When using the `/' or `;' commands to look around on the map - with autodescribe on, display coordinates after the descrip- - tion. Also works in other situations where you are asked to + When using the `/' or `;' commands to look around on the map + with autodescribe on, display coordinates after the descrip- + tion. Also works in other situations where you are asked to pick a location. The possible settings are: @@ -4120,39 +4120,39 @@ whatis_filter When getting a location on the map, and using the keys to cycle - through next and previous targets, allows filtering the possi- + through next and previous targets, allows filtering the possi- ble targets. n - no filtering [default] v - in view only a - in same area only - The area-filter tries to be slightly predictive -- if you're + The area-filter tries to be slightly predictive -- if you're standing on a doorway, it will consider the area on the side of the door you were last moving towards. - Filtering can also be changed when getting a location with the + Filtering can also be changed when getting a location with the "getpos.filter" key. whatis_menu - When getting a location on the map, and using a key to cycle + When getting a location on the map, and using a key to cycle through next and previous targets, use a menu instead to pick a target. (default off) whatis_moveskip - When getting a location on the map, and using shifted movement + When getting a location on the map, and using shifted movement keys or meta-digit keys to fast-move, instead of moving 8 units at a time, move by skipping the same glyphs. (default off) windowtype When the program has been built to support multiple interfaces, - select which one to use, such as "tty" or "X11" (default de- + select which one to use, such as "tty" or "X11" (default de- pends on build-time settings; use "#version" to check). Cannot be set with the `O' command. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4162,10 +4162,10 @@ - When used, it should be the first option set since its value - might enable or disable the availability of various other op- - tions. For multiple lines in a configuration file, that would - be the first non-comment line. For a comma-separated list in + When used, it should be the first option set since its value + might enable or disable the availability of various other op- + tions. For multiple lines in a configuration file, that would + be the first non-comment line. For a comma-separated list in NETHACKOPTIONS or an OPTIONS line in a configuration file, that would be the rightmost option in the list. @@ -4174,35 +4174,35 @@ off). Debug mode only. zerocomp - When writing out a save file, perform zero-comp compression of - the contents. Not all ports support zero-comp compression. It + When writing out a save file, perform zero-comp compression of + the contents. Not all ports support zero-comp compression. It has no effect on reading an existing save file. 9.5. Window Port Customization options - Here are explanations of the various options that are used - to customize and change the characteristics of the windowtype + Here are explanations of the various options that are used + to customize and change the characteristics of the windowtype that you have chosen. Character strings that are too long may be - truncated. Not all window ports will adjust for all settings - listed here. You can safely add any of these options to your - config file, and if the window port is capable of adjusting to - suit your preferences, it will attempt to do so. If it can't it - will silently ignore it. You can find out if an option is sup- - ported by the window port that you are currently using by check- - ing to see if it shows up in the Options list. Some options are - dynamic and can be specified during the game with the `O' com- + truncated. Not all window ports will adjust for all settings + listed here. You can safely add any of these options to your + config file, and if the window port is capable of adjusting to + suit your preferences, it will attempt to do so. If it can't it + will silently ignore it. You can find out if an option is sup- + ported by the window port that you are currently using by check- + ing to see if it shows up in the Options list. Some options are + dynamic and can be specified during the game with the `O' com- mand. align_message - Where to align or place the message window (top, bottom, left, + Where to align or place the message window (top, bottom, left, or right) align_status - Where to align or place the status window (top, bottom, left, + Where to align or place the status window (top, bottom, left, or right). ascii_map - If NetHack can, it should display an ascii character map if it + If NetHack can, it should display an ascii character map if it can. color @@ -4210,15 +4210,15 @@ monsters, objects, and dungeon features. eight_bit_tty - If NetHack can, it should pass eight-bit character values (for - example, specified with the traps option) straight through to + If NetHack can, it should pass eight-bit character values (for + example, specified with the traps option) straight through to your terminal (default off). font_map if NetHack can, it should use a font by the chosen name for the - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4231,7 +4231,7 @@ map window. font_menu - If NetHack can, it should use a font by the chosen name for + If NetHack can, it should use a font by the chosen name for menu windows. font_message @@ -4243,15 +4243,15 @@ status window. font_text - If NetHack can, it should use a font by the chosen name for + If NetHack can, it should use a font by the chosen name for text windows. font_size_map - If NetHack can, it should use this size font for the map win- + If NetHack can, it should use this size font for the map win- dow. font_size_menu - If NetHack can, it should use this size font for menu windows. + If NetHack can, it should use this size font for menu windows. font_size_message If NetHack can, it should use this size font for the message @@ -4262,29 +4262,29 @@ window. font_size_text - If NetHack can, it should use this size font for text windows. + If NetHack can, it should use this size font for text windows. fullscreen - If NetHack can, it should try and display on the entire screen + If NetHack can, it should try and display on the entire screen rather than in a window. guicolor - Use color text and/or highlighting attributes when displaying - some non-map data (such as menu selector letters). Curses in- + Use color text and/or highlighting attributes when displaying + some non-map data (such as menu selector letters). Curses in- terface only; default is on. large_font If NetHack can, it should use a large font. map_mode - If NetHack can, it should display the map in the manner speci- + If NetHack can, it should display the map in the manner speci- fied. player_selection - If NetHack can, it should pop up dialog boxes, or use prompts + If NetHack can, it should pop up dialog boxes, or use prompts - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4301,27 +4301,27 @@ preload_tiles If NetHack can, it should preload tiles into memory. For exam- - ple, in the protected mode MS-DOS version, control whether - tiles get pre-loaded into RAM at the start of the game. Doing - so enhances performance of the tile graphics, but uses more + ple, in the protected mode MS-DOS version, control whether + tiles get pre-loaded into RAM at the start of the game. Doing + so enhances performance of the tile graphics, but uses more memory. (default on). Cannot be set with the `O' command. scroll_amount - If NetHack can, it should scroll the display by this number of + If NetHack can, it should scroll the display by this number of cells when the hero reaches the scroll_margin. scroll_margin - If NetHack can, it should scroll the display when the hero or - cursor is this number of cells away from the edge of the win- + If NetHack can, it should scroll the display when the hero or + cursor is this number of cells away from the edge of the win- dow. selectsaved - If NetHack can, it should display a menu of existing saved + If NetHack can, it should display a menu of existing saved games for the player to choose from at game startup, if it can. Not all ports support this option. softkeyboard - Display an onscreen keyboard. Handhelds are most likely to + Display an onscreen keyboard. Handhelds are most likely to support this option. splash_screen @@ -4329,28 +4329,28 @@ it starts up (default yes). statuslines - Number of lines for traditional below-the-map status display. - Acceptable values are 2 and 3 (default is 2). Curses and tty + Number of lines for traditional below-the-map status display. + Acceptable values are 2 and 3 (default is 2). Curses and tty interfaces only. term_cols and term_rows - Curses interface only. Number of columns and rows to use for + Curses interface only. Number of columns and rows to use for the display. Curses will attempt to resize to the values spec- - ified but will settle for smaller sizes if they are too big. + ified but will settle for smaller sizes if they are too big. Default is the current window size. tiled_map If NetHack can, it should display a tiled map if it can. tile_file - Specify the name of an alternative tile file to override the + Specify the name of an alternative tile file to override the default. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4361,7 +4361,7 @@ tile_height - Specify the preferred height of each tile in a tile capable + Specify the preferred height of each tile in a tile capable port. tile_width @@ -4416,7 +4416,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4478,11 +4478,11 @@ Note: DEC Rainbows hang if this is turned on. Cannot be set with the `O' command. - subkeyvalue - (Win32 tty NetHack only). May be used to alter the value of + soundcard + (default on, PC NetHack only). Cannot be set with the `O' - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4492,41 +4492,45 @@ + command. + + subkeyvalue + (Win32 tty NetHack only). May be used to alter the value of keystrokes that the operating system returns to NetHack to help - compensate for international keyboard issues. OPTIONS=subkey- - value:171/92 will return 92 to NetHack, if 171 was originally - going to be returned. You can use multiple subkeyvalue state- + compensate for international keyboard issues. OPTIONS=subkey- + value:171/92 will return 92 to NetHack, if 171 was originally + going to be returned. You can use multiple subkeyvalue state- ments in the config file if needed. Cannot be set with the `O' command. video Set the video mode used (PC NetHack only). Values are "autode- - tect", "default", or "vga". Setting "vga" (or "autodetect" - with vga hardware present) will cause the game to display + tect", "default", or "vga". Setting "vga" (or "autodetect" + with vga hardware present) will cause the game to display tiles. Cannot be set with the `O' command. videocolors - Set the color palette for PC systems using NO_TERMS (default - 4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order - of colors is red, green, brown, blue, magenta, cyan, - bright.white, bright.red, bright.green, yellow, bright.blue, - bright.magenta, and bright.cyan. Cannot be set with the `O' + Set the color palette for PC systems using NO_TERMS (default + 4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order + of colors is red, green, brown, blue, magenta, cyan, + bright.white, bright.red, bright.green, yellow, bright.blue, + bright.magenta, and bright.cyan. Cannot be set with the `O' command. videoshades Set the intensity level of the three gray scales available (de- fault dark normal light, PC NetHack only). If the game display - is difficult to read, try adjusting these scales; if this does - not correct the problem, try !color. Cannot be set with the + is difficult to read, try adjusting these scales; if this does + not correct the problem, try !color. Cannot be set with the `O' command. 9.7. Regular Expressions - Regular expressions are normally POSIX extended regular ex- - pressions. It is possible to compile NetHack without regular ex- - pression support on a platform where there is no regular expres- - sion library. While this is not true of any modern platform, if - your NetHack was built this way, patterns are instead glob pat- + Regular expressions are normally POSIX extended regular ex- + pressions. It is possible to compile NetHack without regular ex- + pression support on a platform where there is no regular expres- + sion library. While this is not true of any modern platform, if + your NetHack was built this way, patterns are instead glob pat- terns. This applies to Autopickup exceptions, Message types, Menu colors, and User sounds. @@ -4535,20 +4539,16 @@ You can further refine the behavior of the autopickup option beyond what is available through the pickup_types option. - By placing autopickup_exception lines in your configuration - file, you can define patterns to be checked when the game is + By placing autopickup_exception lines in your configuration + file, you can define patterns to be checked when the game is about to autopickup something. autopickup_exception - Sets an exception to the pickup_types option. The autopick- - up_exception option should be followed by a regular expression - to be used as a pattern to match against the singular form of - the description of an object at your location. + Sets an exception to the pickup_types option. The autopick- + up_exception option should be followed by a regular expression - - - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4558,20 +4558,20 @@ - In addition, some characters are treated specially if they oc- + to be used as a pattern to match against the singular form of + the description of an object at your location. + + In addition, some characters are treated specially if they oc- cur as the first character in the pattern, specifically: < - always pickup an object that matches rest of pattern; > - never pickup an object that matches rest of pattern. - The autopickup_exception rules are processed in the order in - which they appear in your config file, thus allowing a later - rule to override an earlier rule. + A "never pickup" rule takes precedence over an "always pickup" + rule if both match. - Exceptions can be set with the `O' command, but because they - are not included in your config file, they won't be in effect - if you save and then restore your game. autopickup_exception - rules and not saved with the game. + Exceptions can be set with the `O' command, but ones set that + way will not be preserved across saves and restores. Here are some examples: @@ -4614,7 +4614,7 @@ Below are the special commands you can rebind. Some of them - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4680,7 +4680,7 @@ `?'. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4746,7 +4746,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4796,11 +4796,11 @@ Prefix key to run towards a direction. Default is `G'. run.nopickup - Prefix key to run towards a direction without picking up items + Prefix key to run towards a direction without picking up items on the way. Default is `M'. run.numpad - Prefix key to run towards a direction. With number_pad only. + Prefix key to run towards a direction. With number_pad only. Default is `5'. rush @@ -4812,7 +4812,7 @@ area, when the message matches a user-defined pattern. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4835,50 +4835,50 @@ show - show message normally; hide - never show the message; stop - wait for user with more-prompt; - norep - show the message once, but not again if no other mes- + norep - show the message once, but not again if no other mes- sage is shown in between. - Here's an example of message types using NetHack's internal + Here's an example of message types using NetHack's internal pattern matching facility: MSGTYPE=stop "You feel hungry." MSGTYPE=hide "You displaced *." - specifies that whenever a message "You feel hungry" is shown, - the user is prompted with more-prompt, and a message matching + specifies that whenever a message "You feel hungry" is shown, + the user is prompted with more-prompt, and a message matching "You displaced ." is not shown at all. - The order of the defined MSGTYPE-lines is important; the last - matching rule is used. Put the general case first, exceptions + The order of the defined MSGTYPE-lines is important; the last + matching rule is used. Put the general case first, exceptions below them. 9.11. Configuring Menu Colors Some platforms allow you to define colors used in menu lines - when the line matches a user-defined pattern. At this time the + when the line matches a user-defined pattern. At this time the tty, win32tty and win32gui support this. - In general, the config file entries to configure the menu + In general, the config file entries to configure the menu color mappings look like this: MENUCOLOR="pattern"=color&attribute pattern - the pattern to match; - color - the color to use for lines matching the pat- + color - the color to use for lines matching the pat- tern; - attribute - the attribute to use for lines matching the - pattern. The attribute is optional, and if + attribute - the attribute to use for lines matching the + pattern. The attribute is optional, and if left out, you must also leave out the preced- - ing ampersand. If no attribute is defined, + ing ampersand. If no attribute is defined, no attribute is used. The pattern should be a regular expression. - Allowed colors are black, red, green, brown, blue, magenta, - cyan, gray, orange, light-green, yellow, light-blue, light- + Allowed colors are black, red, green, brown, blue, magenta, + cyan, gray, orange, light-green, yellow, light-blue, light- - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -4888,53 +4888,53 @@ - magenta, light-cyan, and white. And no-color, the default - foreground color, which isn't necessarily the same as any of + magenta, light-cyan, and white. And no-color, the default + foreground color, which isn't necessarily the same as any of the other colors. - Allowed attributes are none, bold, dim, underline, blink, and - inverse. "Normal" is a synonym for "none". Note that the + Allowed attributes are none, bold, dim, underline, blink, and + inverse. "Normal" is a synonym for "none". Note that the platform used may interpret the attributes any way it wants. - Here's an example of menu colors using NetHack's internal pat- + Here's an example of menu colors using NetHack's internal pat- tern matching facility: MENUCOLOR="* blessed *"=green MENUCOLOR="* cursed *"=red MENUCOLOR="* cursed *(being worn)"=red&underline - specifies that any menu line with " blessed " contained in it - will be shown in green color, lines with " cursed " will be - shown in red, and lines with " cursed " followed by "(being - worn)" on the same line will be shown in red color and under- - lined. You can have multiple MENUCOLOR entries in your config - file, and the last MENUCOLOR-line in your config file that + specifies that any menu line with " blessed " contained in it + will be shown in green color, lines with " cursed " will be + shown in red, and lines with " cursed " followed by "(being + worn)" on the same line will be shown in red color and under- + lined. You can have multiple MENUCOLOR entries in your config + file, and the last MENUCOLOR-line in your config file that matches a menu line will be used for the line. Note that if you intend to have one or more color specifica- - tions match " uncursed ", you will probably want to turn the im- + tions match " uncursed ", you will probably want to turn the im- plicit_uncursed option off so that all items known to be uncursed are actually displayed with the "uncursed" description. 9.12. Configuring User Sounds - Some platforms allow you to define sound files to be played - when a message that matches a user-defined pattern is delivered + Some platforms allow you to define sound files to be played + when a message that matches a user-defined pattern is delivered to the message window. At this time the Qt port and the win32tty and win32gui ports support the use of user sounds. - The following config file entries are relevant to mapping + The following config file entries are relevant to mapping user sounds to messages: SOUNDDIR The directory that houses the sound files to be played. SOUND - An entry that maps a sound file to a user-specified message - pattern. Each SOUND entry is broken down into the following + An entry that maps a sound file to a user-specified message + pattern. Each SOUND entry is broken down into the following parts: - MESG - message window mapping (the only one supported in + MESG - message window mapping (the only one supported in 3.6); pattern - the pattern to match; sound file - the sound file to play; @@ -4944,7 +4944,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -5010,7 +5010,7 @@ - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -5047,50 +5047,25 @@ * "always" will set the default attributes for that field. - * "up" and "down" set the field attributes for when the - field value changes upwards or downwards. This attribute + * "up" and "down" set the field attributes for when the + field value changes upwards or downwards. This attribute times out after statushilites turns. * "changed" sets the field attribute for when the field val- - ue changes. This attribute times out after statushilites - turns. (If a field has both a "changed" rule and an "up" - or "down" rule which matches a change in the field's val- + ue changes. This attribute times out after statushilites + turns. (If a field has both a "changed" rule and an "up" + or "down" rule which matches a change in the field's val- ue, the "up" or "down" one takes precedence.) - * percentage sets the field attribute when the field value - matches the percentage. It is specified as a number be- - tween 0 and 100, followed by `%' (percent sign). If the - percentage is prefixed with `<=' or `>=', it also matches - when value is below or above the percentage. Use prefix - `<' or `>' to match when strictly below or above. (The - numeric limit is relaxed slightly for those: >-1% and - <101% are allowed.) Only four fields support percentage - rules. Percentages for "hitpoints" and "power" are - straightforward; they're based on the corresponding maxi- - mum field. Percentage highlight rules are also allowed - for "experience level" and "experience points" (valid when - the showexp option is enabled). For those, the percentage - is based on the progress from the start of the current ex- - perience level to the start of the next level. So if lev- - el 2 starts at 20 points and level 3 starts at 40 points, - having 30 points is 50% and 35 points is 75%. 100% is - - - NetHack 3.7 October 1, 2019 - - - - - - NetHack Guidebook 78 - - - - unattainable for experience because you'll gain a level - and the calculations will be reset for that new level, but - a rule for =100% is allowed and matches the special case - of being exactly 1 experience point short of the next lev- - el. + * percentage sets the field attribute when the field value + matches the percentage. It is specified as a number be- + tween 0 and 100, followed by `%' (percent sign). If the + percentage is prefixed with `<=' or `>=', it also matches + when value is below or above the percentage. Use prefix + `<' or `>' to match when strictly below or above. (The + numeric limit is relaxed slightly for those: >-1% and + <101% are allowed.) Only valid for "hitpoints" and "pow- + er" fields. * absolute value sets the attribute when the field value matches that number. The number must be 0 or higher, ex- @@ -5100,6 +5075,17 @@ is below or above. If the prefix is `<' or `>', only match when strictly above or below. + + NetHack 3.6 May 7, 2019 + + + + + + NetHack Guidebook 78 + + + * text match sets the attribute when the field value matches the text. Text matches can only be used for "alignment", "carrying-capacity", "hunger", "dungeon-level", and "ti- @@ -5139,19 +5125,6 @@ Set the name of the symbol set that you want to load for dis- play on the rogue level. - - - - NetHack 3.7 October 1, 2019 - - - - - - NetHack Guidebook 79 - - - You can also override one or more symbols using the SYMBOLS config file option. Symbols are specified as name:value pairs. Note that NetHack escape-processes the value string in conven- @@ -5166,6 +5139,19 @@ ------------------------------------------------------------------------ S_air (air) _ S_altar (altar) + + + + NetHack 3.6 May 7, 2019 + + + + + + NetHack Guidebook 79 + + + " S_amulet (amulet) A S_angel (angelic being) a S_ant (ant or other insect) @@ -5205,19 +5191,6 @@ - S_explode2 (explosion top center) \ S_explode3 (explosion top right) | S_explode4 (explosion middle left) - - - - NetHack 3.7 October 1, 2019 - - - - - - NetHack Guidebook 80 - - - S_explode5 (explosion middle center) | S_explode6 (explosion middle right) \ S_explode7 (explosion bottom left) @@ -5232,6 +5205,19 @@ { S_fountain (fountain) F S_fungus (fungus or mold) * S_gem (gem or rock) + + + + NetHack 3.6 May 7, 2019 + + + + + + NetHack Guidebook 80 + + + S_ghost (ghost) H S_giant (giant humanoid) G S_gnome (gnome) @@ -5271,19 +5257,6 @@ N S_naga (naga) . S_ndoor (doorway without door) n S_nymph (nymph) - - - - NetHack 3.7 October 1, 2019 - - - - - - NetHack Guidebook 81 - - - O S_ogre (ogre) o S_orc (orc) p S_piercer (piercer) @@ -5298,6 +5271,19 @@ = S_ring (ring) ` S_rock (boulder or statue) r S_rodent (rodent) + + + + NetHack 3.6 May 7, 2019 + + + + + + NetHack Guidebook 81 + + + ^ S_rolling_boulder_trap (rolling boulder trap) . S_room (floor of a room) / S_rslant (diagonal beam [zap animation]) @@ -5337,19 +5323,6 @@ # S_tree (tree) T S_troll (troll) | S_trwall (wall) - - - - NetHack 3.7 October 1, 2019 - - - - - - NetHack Guidebook 82 - - - - S_tuwall (wall) U S_umber (umber hulk) u S_unicorn (unicorn or horse) @@ -5364,6 +5337,19 @@ . S_vodbridge (vertical lowered drawbridge) - S_vodoor (open door in vertical wall) v S_vortex (vortex) + + + + NetHack 3.6 May 7, 2019 + + + + + + NetHack Guidebook 82 + + + | S_vwall (vertical wall) / S_wand (wand) } S_water (water) @@ -5378,6 +5364,14 @@ Z S_zombie (zombie) z S_zruty (zruty) + There is one additional class of object, described as + "strange object", which will occasionally be the shape taken on + by mimics and shown as `]' for maps displayed as text characters. + Although the displayed character is the same as the default value + for "S_mimic_def", it is a different symbol and there is no cor- + responding "S_strange_object" symbol nor any way to assign an al- + ternate value for it. + 9.15. Configuring NetHack for Play by the Blind NetHack can be set up to use only standard ASCII characters @@ -5404,9 +5398,15 @@ program as a message handler", your NetHack has been compiled with the capability. When compiling NetHack from source on Linux and other POSIX systems, define MSGHANDLER to enable it. To use + the capability, set the environment variable NETHACK_MSGHANDLER + to an executable, which will be executed with the game message as + the program's only parameter. + + While it is not difficult for experienced users to edit the + defaults.nh file to accomplish this, novices may find this task - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -5416,12 +5416,6 @@ - the capability, set the environment variable NETHACK_MSGHANDLER - to an executable, which will be executed with the game message as - the program's only parameter. - - While it is not difficult for experienced users to edit the - defaults.nh file to accomplish this, novices may find this task somewhat daunting. Included within the "symbols" file of all of- ficial distributions of NetHack is a symset called NHAccess. Se- lecting that symset in your configuration file will cause the @@ -5470,9 +5464,15 @@ When targeting with cursor and using fast-move, skip the same glyphs instead of moving 8 units at a time. + nostatus_updates + Prevent updates to the status lines at the bottom of the + screen, if your screen-reader reads those lines. The same in- + formation can be seen via the #attributes command. - NetHack 3.7 October 1, 2019 + + + NetHack 3.6 May 7, 2019 @@ -5482,11 +5482,6 @@ - nostatus_updates - Prevent updates to the status lines at the bottom of the - screen, if your screen-reader reads those lines. The same in- - formation can be seen via the #attributes command. - 9.16. Global Configuration for System Administrators If NetHack is compiled with the SYSCF option, a system ad- @@ -5512,22 +5507,6 @@ MAXPLAYERS = Limit the maximum number of games that can be run- ning at the same time. - SAVEFORMAT = A list of up to two save file formats separated by - space. The first format in the list will written as well as - read. The second format will be read only if no save file in - the first format exists. Valid choices are "historical" for - binary writing of entire structs, "lendian" for binary writing - of each field in little-endian order, "ascii" for writing the - save file content in ascii text. - - BONESFORMAT = A list of up to two bones file formats separated - by space. The first format in the list will written as well as - read. The second format will be read only if no bones files in - the first format exist. Valid choices are "historical" for bi- - nary writing of entire structs, "lendian" for binary writing of - each field in little-endian order, "ascii" for writing the - bones file content in ascii text. - SUPPORT = A string explaining how to get local support (no de- fault value). @@ -5535,10 +5514,31 @@ system (no default value). SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE - option. When disabled, incubi and succubi behave like nymphs. + option. When disabled, incubi and succubi behave like nymphs. + + CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- + ARDS, and SHELLERS check for the player name instead of the us- + er's login name. + + CHECK_SAVE_UID = 0 or 1 to disable or enable, respectively, the + UID (used identification number) checking for save files (to + verify that the user who is restoring is the same one who + saved). + + The following options affect the score file: + + PERSMAX = Maximum number of entries for one person. + + ENTRYMAX = Maximum number of entries in the score file. + + POINTSMIN = Minimum number of points to get an entry in the + score file. + + PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- + spectively, to identify unique people for the score file. - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -5548,32 +5548,11 @@ - CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- - ARDS, and SHELLERS check for the player name instead of the us- - er's login name. - - CHECK_SAVE_UID = 0 or 1 to disable or enable, respectively, the - UID (used identification number) checking for save files (to - verify that the user who is restoring is the same one who - saved). - - The following options affect the score file: - - PERSMAX = Maximum number of entries for one person. - - ENTRYMAX = Maximum number of entries in the score file. - - POINTSMIN = Minimum number of points to get an entry in the - score file. - - PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- - spectively, to identify unique people for the score file. - - MAX_STATUENAME_RANK = Maximum number of score file entries to + MAX_STATUENAME_RANK = Maximum number of score file entries to use for random statue names (default is 10). DUMPLOGFILE = A filename where the end-of-game dumplog is - saved. Not defining this will prevent dumplog from being cre- + saved. Not defining this will prevent dumplog from being cre- ated. Only available if your game is compiled with DUMPLOG. Al- lows the following placeholders: @@ -5589,22 +5568,43 @@ 10. Scoring - NetHack maintains a list of the top scores or scorers on + NetHack maintains a list of the top scores or scorers on your machine, depending on how it is set up. In the latter case, - each account on the machine can post only one non-winning score - on this list. If you score higher than someone else on this - list, or better your previous score, you will be inserted in the - proper place under your current name. How many scores are kept + each account on the machine can post only one non-winning score + on this list. If you score higher than someone else on this + list, or better your previous score, you will be inserted in the + proper place under your current name. How many scores are kept can also be set up when NetHack is compiled. - Your score is chiefly based upon how much experience you + Your score is chiefly based upon how much experience you gained, how much loot you accumulated, how deep you explored, and how the game ended. If you quit the game, you escape with all of - your gold intact. If, however, you get killed in the Mazes of + your gold intact. If, however, you get killed in the Mazes of Menace, the guild will only hear about 90% of your gold when your + corpse is discovered (adventurers have been known to collect + finder's fees). So, consider whether you want to take one last + hit at that monster and possibly live, or quit and stop with + whatever you have. If you quit, you keep all your gold, but if + you swing and live, you might find more. + + If you just want to see what the current top players/games + list is, you can type nethack -s all on most versions. + + 11. Explore mode + + NetHack is an intricate and difficult game. Novices might + falter in fear, aware of their ignorance of the means to survive. + Well, fear not. Your dungeon comes equipped with an "explore" or + "discovery" mode that enables you to keep old save files and + cheat death, at the paltry cost of not getting on the high score + list. + + There are two ways of enabling explore mode. One is to + start the game with the -X command-line switch or with the play- + mode:explore option. The other is to issue the "#exploremode" - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -5614,63 +5614,63 @@ - corpse is discovered (adventurers have been known to collect - finder's fees). So, consider whether you want to take one last - hit at that monster and possibly live, or quit and stop with - whatever you have. If you quit, you keep all your gold, but if - you swing and live, you might find more. - - If you just want to see what the current top players/games - list is, you can type nethack -s all on most versions. - - 11. Explore mode - - NetHack is an intricate and difficult game. Novices might - falter in fear, aware of their ignorance of the means to survive. - Well, fear not. Your dungeon comes equipped with an "explore" or - "discovery" mode that enables you to keep old save files and - cheat death, at the paltry cost of not getting on the high score - list. - - There are two ways of enabling explore mode. One is to - start the game with the -X command-line switch or with the play- - mode:explore option. The other is to issue the "#exploremode" - extended command while already playing the game. Starting a new + extended command while already playing the game. Starting a new game in explore mode provides your character with a wand of wish- - ing in initial inventory; switching during play does not. The - other benefits of explore mode are left for the trepid reader to + ing in initial inventory; switching during play does not. The + other benefits of explore mode are left for the trepid reader to discover. 11.1. Debug mode Debug mode, also known as wizard mode, is undocumented aside - from this brief description and the various "debug mode only" - commands listed among the command descriptions. It is intended + from this brief description and the various "debug mode only" + commands listed among the command descriptions. It is intended for tracking down problems within the program rather than to pro- - vide god-like powers to your character, and players who attempt - debugging are expected to figure out how to use it themselves. - It is initiated by starting the game with the -D command-line + vide god-like powers to your character, and players who attempt + debugging are expected to figure out how to use it themselves. + It is initiated by starting the game with the -D command-line switch or with the playmode:debug option. - For some systems, the player must be logged in under a par- - ticular user name to be allowed to use debug mode; for others, - the hero must be given a particular character name (but may be - any role; there's no connection between "wizard mode" and the - Wizard role). Attempting to start a game in debug mode when not - allowed or not available will result in falling back to explore + For some systems, the player must be logged in under a par- + ticular user name to be allowed to use debug mode; for others, + the hero must be given a particular character name (but may be + any role; there's no connection between "wizard mode" and the + Wizard role). Attempting to start a game in debug mode when not + allowed or not available will result in falling back to explore mode instead. 12. Credits - The original hack game was modeled on the Berkeley UNIX - rogue game. Large portions of this paper were shamelessly - cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy - and Kenneth C. R. C. Arnold. Small portions were adapted from + The original hack game was modeled on the Berkeley UNIX + rogue game. Large portions of this paper were shamelessly + cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy + and Kenneth C. R. C. Arnold. Small portions were adapted from Further Exploration of the Dungeons of Doom, by Ken Arromdee. + NetHack is the product of literally dozens of people's work. + Main events in the course of the game development are described + below: + + Jay Fenlason wrote the original Hack, with help from Kenny + Woodland, Mike Thome and Jon Payne. + + Andries Brouwer did a major re-write, transforming Hack into + a very different game, and published (at least) three versions + (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. + + Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, + producing PC HACK 1.01e, added support for DEC Rainbow graphics + in version 1.03g, and went on to produce at least four more ver- + sions (3.0, 3.2, 3.51, and 3.6). + + R. Black ported PC HACK 3.51 to Lattice C and the Atari + 520/1040ST, producing ST Hack 1.03. + + Mike Stephenson merged these various versions back together, + incorporating many of the added features, and produced NetHack - NetHack 3.7 October 1, 2019 + NetHack 3.6 May 7, 2019 @@ -5680,29 +5680,8 @@ - NetHack is the product of literally dozens of people's work. - Main events in the course of the game development are described - below: - - Jay Fenlason wrote the original Hack, with help from Kenny - Woodland, Mike Thome and Jon Payne. - - Andries Brouwer did a major re-write, transforming Hack into - a very different game, and published (at least) three versions - (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. - - Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, - producing PC HACK 1.01e, added support for DEC Rainbow graphics - in version 1.03g, and went on to produce at least four more ver- - sions (3.0, 3.2, 3.51, and 3.6). - - R. Black ported PC HACK 3.51 to Lattice C and the Atari - 520/1040ST, producing ST Hack 1.03. - - Mike Stephenson merged these various versions back together, - incorporating many of the added features, and produced NetHack - 1.4. He then coordinated a cast of thousands in enhancing and - debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. + 1.4. He then coordinated a cast of thousands in enhancing and + debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. Later, Mike coordinated a major rewrite of the game, heading a team which included Ken Arromdee, Jean-Christophe Collet, Steve @@ -5735,17 +5714,6 @@ Richard Addison, Mike Passaretti, and Olaf Seibert, developed NetHack 3.1 for the Amiga. - - NetHack 3.7 October 1, 2019 - - - - - - NetHack Guidebook 88 - - - Norm Meluch and Kevin Smolkowski, with help from Carl Sche- lin, Stephen Spackman, Steve VanDevender, and Paul Winner, ported NetHack 3.1 to the PC. @@ -5767,6 +5735,17 @@ velopment Team and tile support was then added to other plat- forms. + + NetHack 3.6 May 7, 2019 + + + + + + NetHack Guidebook 88 + + + The 3.2 NetHack Development Team, comprised of Michael Alli- son, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Er- @@ -5800,18 +5779,6 @@ tures. Kevin later joined the NetHack Development Team and in- corporated the best of these ideas in NetHack 3.3. - - - NetHack 3.7 October 1, 2019 - - - - - - NetHack Guidebook 89 - - - The final update to 3.2 was the bug fix release 3.2.3, which was released simultaneously with 3.3.0 in December 1999 just in time for the Year 2000. @@ -5833,6 +5800,18 @@ first version to allow you to ride a steed, and was the first version to have a publicly available web-site listing all the bugs that had been discovered. Despite that constantly growing + + + NetHack 3.6 May 7, 2019 + + + + + + NetHack Guidebook 89 + + + bug list, 3.3 proved stable enough to last for more than a year and a half. @@ -5865,19 +5844,6 @@ stopped working in early 2006. A great many thanks to Ron for keeping NetHack alive on OS/2 all these years. - - - - NetHack 3.7 October 1, 2019 - - - - - - NetHack Guidebook 90 - - - Janne Salmijarvi and Teemu Suikki maintained and enhanced the Amiga port of 3.4 after Janne Salmijarvi resurrected it for 3.3.1. @@ -5900,6 +5866,18 @@ In September 2014, an interim snapshot of the code under de- velopment was released publicly by other parties. Since that code + + + NetHack 3.6 May 7, 2019 + + + + + + NetHack Guidebook 90 + + + was a work-in-progress and had not gone through the process of debugging it as a suitable release, it was decided that the ver- sion numbers present on that code snapshot would be retired and @@ -5933,17 +5911,6 @@ and Kevin Smolkowski, ensured that NetHack 3.6 continued to oper- ate on various UNIX flavors and maintained the X11 interface. - - NetHack 3.7 October 1, 2019 - - - - - - NetHack Guidebook 91 - - - Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- tained the port of NetHack 3.6 for Mac OSX. @@ -5965,6 +5932,18 @@ The NetHack Development Team at the time of release of 3.6.1 con- sisted of Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, + + + NetHack 3.6 May 7, 2019 + + + + + + NetHack Guidebook 91 + + + Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz, and Paul Winner. @@ -5983,33 +5962,20 @@ Andy Thomson for hardfought.org. Thanks to all those unnamed dun- geoneers who invest their time and effort into annual NetHack tournaments such as Junethack, The November NetHack Tournament - and in days past, devnull.net (gone for now, but not forgotten). + and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list + of the names of the worst of these miscreants in this, the list of Dungeoneers: Adam Aronow Janet Walz Nathan Eady Alex Kompel Janne Salmijarvi Norm Meluch Alex Smith Jean-Christophe Collet Olaf Seibert Andreas Dorn Jeff Bailey Pasi Kallinen Andy Church Jochen Erwied Pat Rankin - - - - NetHack 3.7 October 1, 2019 - - - - - - NetHack Guidebook 92 - - - Andy Swanson John Kallen Patric Mueller Ari Huttunen John Rupley Paul Winner Barton House John S. Bien Pierre Martineau @@ -6031,6 +5997,19 @@ Deron Meranda Lars Huttar Scott R. Turner Dion Nicolaas Leon Arnott Sean Hunt Dylan O'Donnell M. Drew Streib Stephen Spackman + + + + NetHack 3.6 May 7, 2019 + + + + + + NetHack Guidebook 92 + + + Eric Backus Malcolm Ryan Stefan Thielscher Eric Hendrickson Mark Gooderum Stephen White Eric R. Smith Mark Modrall Steve Creps @@ -6047,7 +6026,7 @@ Izchak Miller Mike Stephenson J. Ali Harlow Mikko Juola - Brand and product names are trademarks or registered trade- + Brand and product names are trademarks or registered trade- marks of their respective holders. @@ -6066,7 +6045,28 @@ - NetHack 3.7 October 1, 2019 + + + + + + + + + + + + + + + + + + + + + + NetHack 3.6 May 7, 2019 From acf45be50357137577c5473d646b813230cf7110 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 2 Oct 2019 10:56:39 -0400 Subject: [PATCH 004/529] Guidebook.txt update --- doc/Guidebook.txt | 2862 ++++++++++++++++++++++----------------------- 1 file changed, 1431 insertions(+), 1431 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index c622c832d..c1b1dc6c1 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -91,32 +91,32 @@ them to move quickly and sneak up on the local nasties. They start equipped with the tools for a proper scientific expedition. - Barbarians are warriors out of the hinterland, hardened to + Barbarians are warriors out of the hinterland, hardened to battle. They begin their quests with naught but uncommon strength, a trusty hauberk, and a great two-handed sword. - Cavemen and Cavewomen start with exceptional strength but, + Cavemen and Cavewomen start with exceptional strength but, unfortunately, with neolithic weapons. - Healers are wise in medicine and apothecary. They know the - herbs and simples that can restore vitality, ease pain, anes- + Healers are wise in medicine and apothecary. They know the + herbs and simples that can restore vitality, ease pain, anes- thetize, and neutralize poisons; and with their instruments, they - can divine a being's state of health or sickness. Their medical + can divine a being's state of health or sickness. Their medical practice earns them quite reasonable amounts of money, with which they enter the dungeon. - Knights are distinguished from the common skirmisher by - their devotion to the ideals of chivalry and by the surpassing + Knights are distinguished from the common skirmisher by + their devotion to the ideals of chivalry and by the surpassing excellence of their armor. Monks are ascetics, who by rigorous practice of physical and mental disciplines have become capable of fighting as effectively - without weapons as with. They wear no armor but make up for it + without weapons as with. They wear no armor but make up for it with increased mobility. - Priests and Priestesses are clerics militant, crusaders ad- - vancing the cause of righteousness with arms, armor, and arts - thaumaturgic. Their ability to commune with deities via prayer + Priests and Priestesses are clerics militant, crusaders ad- + vancing the cause of righteousness with arms, armor, and arts + thaumaturgic. Their ability to commune with deities via prayer occasionally extricates them from peril, but can also put them in it. @@ -126,7 +126,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -136,63 +136,63 @@ - Rogues are agile and stealthy thieves, with knowledge of - locks, traps, and poisons. Their advantage lies in surprise, + Rogues are agile and stealthy thieves, with knowledge of + locks, traps, and poisons. Their advantage lies in surprise, which they employ to great advantage. - Samurai are the elite warriors of feudal Nippon. They are - lightly armored and quick, and wear the dai-sho, two swords of + Samurai are the elite warriors of feudal Nippon. They are + lightly armored and quick, and wear the dai-sho, two swords of the deadliest keenness. - Tourists start out with lots of gold (suitable for shopping - with), a credit card, lots of food, some maps, and an expensive + Tourists start out with lots of gold (suitable for shopping + with), a credit card, lots of food, some maps, and an expensive camera. Most monsters don't like being photographed. - Valkyries are hardy warrior women. Their upbringing in the - harsh Northlands makes them strong, inures them to extremes of + Valkyries are hardy warrior women. Their upbringing in the + harsh Northlands makes them strong, inures them to extremes of cold, and instills in them stealth and cunning. - Wizards start out with a knowledge of magic, a selection of - magical items, and a particular affinity for dweomercraft. Al- + Wizards start out with a knowledge of magic, a selection of + magical items, and a particular affinity for dweomercraft. Al- though seemingly weak and easy to overcome at first sight, an ex- perienced Wizard is a deadly foe. - You may also choose the race of your character (within lim- + You may also choose the race of your character (within lim- its; most roles have restrictions on which races are eligible for them): Dwarves are smaller than humans or elves, but are stocky and - solid individuals. Dwarves' most notable trait is their great - expertise in mining and metalwork. Dwarvish armor is said to be + solid individuals. Dwarves' most notable trait is their great + expertise in mining and metalwork. Dwarvish armor is said to be second in quality not even to the mithril armor of the Elves. - Elves are agile, quick, and perceptive; very little of what - goes on will escape an Elf. The quality of Elven craftsmanship + Elves are agile, quick, and perceptive; very little of what + goes on will escape an Elf. The quality of Elven craftsmanship often gives them an advantage in arms and armor. - Gnomes are smaller than but generally similar to dwarves. - Gnomes are known to be expert miners, and it is known that a se- - cret underground mine complex built by this race exists within + Gnomes are smaller than but generally similar to dwarves. + Gnomes are known to be expert miners, and it is known that a se- + cret underground mine complex built by this race exists within the Mazes of Menace, filled with both riches and danger. Humans are by far the most common race of the surface world, - and are thus the norm to which other races are often compared. - Although they have no special abilities, they can succeed in any + and are thus the norm to which other races are often compared. + Although they have no special abilities, they can succeed in any role. - Orcs are a cruel and barbaric race that hate every living - thing (including other orcs). Above all others, Orcs hate Elves - with a passion unequalled, and will go out of their way to kill - one at any opportunity. The armor and weapons fashioned by the + Orcs are a cruel and barbaric race that hate every living + thing (including other orcs). Above all others, Orcs hate Elves + with a passion unequalled, and will go out of their way to kill + one at any opportunity. The armor and weapons fashioned by the Orcs are typically of inferior quality. 3. What do all those things on the screen mean? - On the screen is kept a map of where you have been and what - you have seen on the current dungeon level; as you explore more + On the screen is kept a map of where you have been and what + you have seen on the current dungeon level; as you explore more - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -204,47 +204,47 @@ of the level, it appears on the screen in front of you. - When NetHack's ancestor rogue first appeared, its screen - orientation was almost unique among computer fantasy games. - Since then, screen orientation has become the norm rather than - the exception; NetHack continues this fine tradition. Unlike - text adventure games that accept commands in pseudo-English sen- + When NetHack's ancestor rogue first appeared, its screen + orientation was almost unique among computer fantasy games. + Since then, screen orientation has become the norm rather than + the exception; NetHack continues this fine tradition. Unlike + text adventure games that accept commands in pseudo-English sen- tences and explain the results in words, NetHack commands are all - one or two keystrokes and the results are displayed graphically - on the screen. A minimum screen size of 24 lines by 80 columns - is recommended; if the screen is larger, only a 21x80 section + one or two keystrokes and the results are displayed graphically + on the screen. A minimum screen size of 24 lines by 80 columns + is recommended; if the screen is larger, only a 21x80 section will be used for the map. NetHack can even be played by blind players, with the assis- - tance of Braille readers or speech synthesisers. Instructions - for configuring NetHack for the blind are included later in this + tance of Braille readers or speech synthesisers. Instructions + for configuring NetHack for the blind are included later in this document. NetHack generates a new dungeon every time you play it; even - the authors still find it an entertaining and exciting game de- + the authors still find it an entertaining and exciting game de- spite having won several times. - NetHack offers a variety of display options. The options - available to you will vary from port to port, depending on the - capabilities of your hardware and software, and whether various + NetHack offers a variety of display options. The options + available to you will vary from port to port, depending on the + capabilities of your hardware and software, and whether various compile-time options were enabled when your executable was creat- ed. The three possible display options are: a monochrome charac- - ter interface, a color character interface, and a graphical in- + ter interface, a color character interface, and a graphical in- terface using small pictures called tiles. The two character in- terfaces allow fonts with other characters to be substituted, but - the default assignments use standard ASCII characters to repre- + the default assignments use standard ASCII characters to repre- sent everything. There is no difference between the various dis- play options with respect to game play. Because we cannot repro- duce the tiles or colors in the Guidebook, and because it is com- - mon to all ports, we will use the default ASCII characters from - the monochrome character display when referring to things you + mon to all ports, we will use the default ASCII characters from + the monochrome character display when referring to things you might see on the screen during your game. - In order to understand what is going on in NetHack, first - you must understand what NetHack is doing with the screen. The - NetHack screen replaces the "You see ..." descriptions of text - adventure games. Figure 1 is a sample of what a NetHack screen - might look like. The way the screen looks for you depends on + In order to understand what is going on in NetHack, first + you must understand what NetHack is doing with the screen. The + NetHack screen replaces the "You see ..." descriptions of text + adventure games. Figure 1 is a sample of what a NetHack screen + might look like. The way the screen looks for you depends on your platform. @@ -258,7 +258,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -286,9 +286,9 @@ 3.1. The status lines (bottom) - The bottom two lines of the screen contain several cryptic - pieces of information describing your current status. If either - status line becomes longer than the width of the screen, you + The bottom two lines of the screen contain several cryptic + pieces of information describing your current status. If either + status line becomes longer than the width of the screen, you might not see all of it. Here are explanations of what the vari- ous status items mean (though your configuration may not have all the status items listed below): @@ -298,33 +298,33 @@ experience level, see below). Strength - A measure of your character's strength; one of your six ba- - sic attributes. A human character's attributes can range - from 3 to 18 inclusive; non-humans may exceed these limits + A measure of your character's strength; one of your six ba- + sic attributes. A human character's attributes can range + from 3 to 18 inclusive; non-humans may exceed these limits (occasionally you may get super-strengths of the form 18/xx, - and magic can also cause attributes to exceed the normal - limits). The higher your strength, the stronger you are. + and magic can also cause attributes to exceed the normal + limits). The higher your strength, the stronger you are. Strength affects how successfully you perform physical - tasks, how much damage you do in combat, and how much loot + tasks, how much damage you do in combat, and how much loot you can carry. Dexterity - Dexterity affects your chances to hit in combat, to avoid - traps, and do other tasks requiring agility or manipulation + Dexterity affects your chances to hit in combat, to avoid + traps, and do other tasks requiring agility or manipulation of objects. Constitution - Constitution affects your ability to recover from injuries - and other strains on your stamina. When strength is low or - modest, constitution also affects how much you can carry. - With sufficiently high strength, the contribution to carry- + Constitution affects your ability to recover from injuries + and other strains on your stamina. When strength is low or + modest, constitution also affects how much you can carry. + With sufficiently high strength, the contribution to carry- ing capacity from your constitution no longer matters. Intelligence - Intelligence affects your ability to cast spells and read + Intelligence affects your ability to cast spells and read - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -342,7 +342,7 @@ Charisma Charisma affects how certain creatures react toward you. In - particular, it can affect the prices shopkeepers offer you. + particular, it can affect the prices shopkeepers offer you. Alignment Lawful, Neutral, or Chaotic. Often, Lawful is taken as good @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -456,7 +456,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -533,62 +533,62 @@ I This marks the last known location of an invisible or other- - wise unseen monster. Note that the monster could have + wise unseen monster. Note that the monster could have moved. The `F' and `m' commands may be useful here. - You need not memorize all these symbols; you can ask the - game what any symbol represents with the `/' command (see the + You need not memorize all these symbols; you can ask the + game what any symbol represents with the `/' command (see the next section for more info). 4. Commands Commands can be initiated by typing one or two characters to - which the command is bound to, or typing the command name in the - extended commands entry. Some commands, like "search", do not + which the command is bound to, or typing the command name in the + extended commands entry. Some commands, like "search", do not require that any more information be collected by NetHack. Other - commands might require additional information, for example a di- - rection, or an object to be used. For those commands that re- - quire additional information, NetHack will present you with ei- - ther a menu of choices or with a command line prompt requesting + commands might require additional information, for example a di- + rection, or an object to be used. For those commands that re- + quire additional information, NetHack will present you with ei- + ther a menu of choices or with a command line prompt requesting information. Which you are presented with will depend chiefly on how you have set the menustyle option. - For example, a common question, in the form "What do you - want to use? [a-zA-Z ?*]", asks you to choose an object you are - carrying. Here, "a-zA-Z" are the inventory letters of your pos- - sible choices. Typing `?' gives you an inventory list of these - items, so you can see what each letter refers to. In this exam- + For example, a common question, in the form "What do you + want to use? [a-zA-Z ?*]", asks you to choose an object you are + carrying. Here, "a-zA-Z" are the inventory letters of your pos- + sible choices. Typing `?' gives you an inventory list of these + items, so you can see what each letter refers to. In this exam- ple, there is also a `*' indicating that you may choose an object not on the list, if you wanted to use something unexpected. Typ- - ing a `*' lists your entire inventory, so you can see the inven- - tory letters of every object you're carrying. Finally, if you + ing a `*' lists your entire inventory, so you can see the inven- + tory letters of every object you're carrying. Finally, if you change your mind and decide you don't want to do this command af- ter all, you can press the ESC key to abort the command. - You can put a number before some commands to repeat them - that many times; for example, "10s" will search ten times. If + You can put a number before some commands to repeat them + that many times; for example, "10s" will search ten times. If you have the number_pad option set, you must type `n' to prefix a - count, so the example above would be typed "n10s" instead. Com- - mands for which counts make no sense ignore them. In addition, - movement commands can be prefixed for greater control (see be- + count, so the example above would be typed "n10s" instead. Com- + mands for which counts make no sense ignore them. In addition, + movement commands can be prefixed for greater control (see be- low). To cancel a count or a prefix, press the ESC key. - The list of commands is rather long, but it can be read at - any time during the game through the `?' command, which accesses - a menu of helpful texts. Here are the default key bindings for + The list of commands is rather long, but it can be read at + any time during the game through the `?' command, which accesses + a menu of helpful texts. Here are the default key bindings for your reference: ? Help menu: display one of several help texts available. / The "whatis" command, to tell what a symbol represents. You may choose to specify a location or type a symbol (or even a - whole word) to explain. Specifying a location is done by - moving the cursor to a particular spot on the map and then + whole word) to explain. Specifying a location is done by + moving the cursor to a particular spot on the map and then pressing one of `.', `,', `;', or `:'. `.' will explain the symbol at the chosen location, conditionally check for "More - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -598,43 +598,43 @@ - info?" depending upon whether the help option is on, and - then you will be asked to pick another location; `,' will + info?" depending upon whether the help option is on, and + then you will be asked to pick another location; `,' will explain the symbol but skip any additional information, then let you pick another location; `;' will skip additional info and also not bother asking you to choose another location to examine; `:' will show additional info, if any, without ask- ing for confirmation. When picking a location, pressing the - ESC key will terminate this command, or pressing `?' will + ESC key will terminate this command, or pressing `?' will give a brief reminder about how it works. - If the autodescribe option is on, a short description of - what you see at each location is shown as you move the cur- - sor. Typing `#' while picking a location will toggle that - option on or off. The whatis_coord option controls whether + If the autodescribe option is on, a short description of + what you see at each location is shown as you move the cur- + sor. Typing `#' while picking a location will toggle that + option on or off. The whatis_coord option controls whether the short description includes map coordinates. - Specifying a name rather than a location always gives any + Specifying a name rather than a location always gives any additional information available about that name. - You may also request a description of nearby monsters, all - monsters currently displayed, nearby objects, or all ob- + You may also request a description of nearby monsters, all + monsters currently displayed, nearby objects, or all ob- jects. The whatis_coord option controls which format of map coordinate is included with their descriptions. & Tell what a command does. - < Go up to the previous level (if you are on a staircase or + < Go up to the previous level (if you are on a staircase or ladder). > Go down to the next level (if you are on a staircase or lad- der). [yuhjklbn] - Go one step in the direction indicated (see Figure 2). If - you sense or remember a monster there, you will fight the - monster instead. Only these one-step movement commands - cause you to fight monsters; the others (below) are "safe." + Go one step in the direction indicated (see Figure 2). If + you sense or remember a monster there, you will fight the + monster instead. Only these one-step movement commands + cause you to fight monsters; the others (below) are "safe." y k u 7 8 9 \ | / \ | / @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -720,7 +720,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -786,7 +786,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -822,7 +822,7 @@ i List your inventory (everything you're carrying). I List selected parts of your inventory, usually be specifying - the character for a particular set of objects, like `[' for + the character for a particular set of objects, like `[' for armor or `!' for potions. I* - list all gems in inventory; @@ -838,12 +838,12 @@ O Set options. - A menu showing the current option values will be displayed. - You can change most values simply by selecting the menu en- + A menu showing the current option values will be displayed. + You can change most values simply by selecting the menu en- try for the given option (ie, by typing its letter or click- - ing upon it, depending on your user interface). For the - non-boolean choices, a further menu or prompt will appear - once you've closed this menu. The available options are + ing upon it, depending on your user interface). For the + non-boolean choices, a further menu or prompt will appear + once you've closed this menu. The available options are listed later in this Guidebook. Options are usually set be- fore the game rather than with the `O' command; see the sec- tion on options below. @@ -852,7 +852,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -862,10 +862,10 @@ - Shortcut for "#overview": list interesting dungeon levels + Shortcut for "#overview": list interesting dungeon levels visited. - (Prior to 3.6.0, `^O' was a debug mode command which listed + (Prior to 3.6.0, `^O' was a debug mode command which listed the placement of all special levels. Use "#wizwhere" to run that command.) @@ -874,15 +874,15 @@ P Put on an accessory (ring, amulet, or blindfold). This command may also be used to wear armor. The prompt for - which inventory item to use will only list accessories, but - choosing an unlisted item of armor will attempt to wear it. + which inventory item to use will only list accessories, but + choosing an unlisted item of armor will attempt to wear it. (See the `W' command below. It lists armor as the inventory choices but will accept an accessory and attempt to put that on.) ^P Repeat previous message. - Subsequent `^P's repeat earlier messages. For some inter- + Subsequent `^P's repeat earlier messages. For some inter- faces, the behavior can be varied via the msg_window option. q Quaff (drink) something (potion, water, etc). @@ -918,7 +918,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -959,19 +959,19 @@ T Take off armor. - If you're wearing more than one piece, you'll be prompted - for which one to take off. (Note that this treats a cloak - covering a suit and/or a shirt, or a suit covering a shirt, + If you're wearing more than one piece, you'll be prompted + for which one to take off. (Note that this treats a cloak + covering a suit and/or a shirt, or a suit covering a shirt, as if the underlying items weren't there.) When you're only - wearing one, then by default it will be taken off without - asking, but you can set the paranoid_confirmation option to + wearing one, then by default it will be taken off without + asking, but you can set the paranoid_confirmation option to require a prompt. - This command may also be used to remove accessories. The - prompt for which inventory item to take off only lists worn - armor, but a worn accessory can be chosen. (See the `R' + This command may also be used to remove accessories. The + prompt for which inventory item to take off only lists worn + armor, but a worn accessory can be chosen. (See the `R' command above. It lists accessories as the inventory choic- - es but will accept an item of armor and attempt to take it + es but will accept an item of armor and attempt to take it off.) ^T Teleport, if you have the ability. @@ -984,7 +984,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -996,44 +996,44 @@ w- - wield nothing, use your bare (or gloved) hands. - Some characters can wield two weapons at once; use the `X' + Some characters can wield two weapons at once; use the `X' command (or the "#twoweapon" extended command) to do so. W Wear armor. - This command may also be used to put on an accessory (ring, - amulet, or blindfold). The prompt for which inventory item + This command may also be used to put on an accessory (ring, + amulet, or blindfold). The prompt for which inventory item to use will only list armor, but choosing an unlisted acces- sory will attempt to put it on. (See the `P' command above. - It lists accessories as the inventory choices but will ac- + It lists accessories as the inventory choices but will ac- cept an item of armor and attempt to wear it.) x Exchange your wielded weapon with the item in your alternate weapon slot. The latter is used as your secondary weapon when engaging in - two-weapon combat. Note that if one of these slots is emp- + two-weapon combat. Note that if one of these slots is emp- ty, the exchange still takes place. X Toggle two-weapon combat, if your character can do it. Also available via the "#twoweapon" extended command. - (In versions prior to 3.6 this was the command to switch + (In versions prior to 3.6 this was the command to switch from normal play to "explore mode", also known as "discovery mode", which has now been moved to "#exploremode".) ^X Display basic information about your character. - Displays name, role, race, gender (unless role name makes - that redundant, such as Caveman or Priestess), and align- - ment, along with your patron deity and his or her opposi- - tion. It also shows most of the various items of informa- + Displays name, role, race, gender (unless role name makes + that redundant, such as Caveman or Priestess), and align- + ment, along with your patron deity and his or her opposi- + tion. It also shows most of the various items of informa- tion from the status line(s) in a less terse form, including - several additional things which don't appear in the normal + several additional things which don't appear in the normal status display due to space considerations. - In normal play, that's all that `^X' displays. In explore - mode, the role and status feedback is augmented by the in- + In normal play, that's all that `^X' displays. In explore + mode, the role and status feedback is augmented by the in- formation provided by enlightenment magic. z Zap a wand. @@ -1050,7 +1050,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1116,7 +1116,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1243,12 +1243,12 @@ #exploremode Enter the explore mode. - #fire - Fire ammunition from quiver. Default key is `f'. + Requires confirmation; default response is n (no). To real- + ly switch to explore mode, respond with y. You can set the + paranoid_confirmation:quit option to require a response of - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1258,15 +1258,20 @@ + yes instead. + + #fire + Fire ammunition from quiver. Default key is `f'. + #force Force a lock. Autocompletes. Default key is `M-f'. #glance - Show what type of thing a map symbol corresponds to. De- + Show what type of thing a map symbol corresponds to. De- fault key is `;'. #help - Show the help menu. Default key is `?', and also `h' if + Show the help menu. Default key is `?', and also `h' if number_pad is on. #herecmdmenu @@ -1282,15 +1287,15 @@ Inventory specific item types. Default key is `I'. #invoke - Invoke an object's special powers. Autocompletes. Default + Invoke an object's special powers. Autocompletes. Default key is `M-i'. #jump - Jump to another location. Autocompletes. Default key is + Jump to another location. Autocompletes. Default key is `M-j', and also `j' if number_pad is on. #kick - Kick something. Default key is `^D', and `k' if number_pad + Kick something. Default key is `^D', and `k' if number_pad is on. #known @@ -1302,19 +1307,14 @@ is ``'. #levelchange - Change your experience level. Autocompletes. Debug mode + Change your experience level. Autocompletes. Debug mode only. #lightsources Show mobile light sources. Autocompletes. Debug mode only. - #look - Look at what is here, under you. Default key is `:'. - - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1324,6 +1324,9 @@ + #look + Look at what is here, under you. Default key is `:'. + #loot Loot a box or bag on the floor beneath you, or the saddle from a steed standing next to you. Autocompletes. Precede @@ -1371,16 +1374,13 @@ Test the panic routine. Terminates the current game. Auto- completes. Debug mode only. - #pay - Pay your shopping bill. Default key is `p'. - - #pickup - Pick up things at the current location. Default key is `,'. - The `m' prefix forces use of a menu. + Asks for confirmation; default is n (no); continue playing. + To really panic, respond with y. You can set the para- + noid_confirmation:quit option to require a response of yes + instead. - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1390,63 +1390,63 @@ + #pay + Pay your shopping bill. Default key is `p'. + + #pickup + Pick up things at the current location. Default key is `,'. + The `m' prefix forces use of a menu. + #polyself Polymorph self. Autocompletes. Debug mode only. #pray - Pray to the gods for help. Autocompletes. Default key is + Pray to the gods for help. Autocompletes. Default key is `M-p'. - Praying too soon after receiving prior help is a bad idea. - (Hint: entering the dungeon alive is treated as having re- + Praying too soon after receiving prior help is a bad idea. + (Hint: entering the dungeon alive is treated as having re- ceived help. You probably shouldn't start off a new game by - praying right away.) Since using this command by accident - can cause trouble, there is an option to make you confirm - your intent before praying. It is enabled by default, and - you can reset the paranoid_confirmation option to disable + praying right away.) Since using this command by accident + can cause trouble, there is an option to make you confirm + your intent before praying. It is enabled by default, and + you can reset the paranoid_confirmation option to disable it. #prevmsg - Show previously displayed game messages. Default key is + Show previously displayed game messages. Default key is `^P'. #puton - Put on an accessory (ring, amulet, etc). Default key is + Put on an accessory (ring, amulet, etc). Default key is `P'. #quaff Quaff (drink) something. Default key is `q'. #quit - Quit the program without saving your game. Autocompletes. + Quit the program without saving your game. Autocompletes. Default key is `M-q'. - Since using this command by accident would throw away the - current game, you are asked to confirm your intent before - quitting. By default a response of `y' acknowledges that - intent. You can set the paranoid_confirmation option to re- - quire a response of "yes" instead. + Since using this command by accident would throw away the + current game, you are asked to confirm your intent before + quitting. Default response is n (no); continue playing. To + really quit, respond with y. You can set the paranoid_con- + firmation:quit option to require a response of yes instead. #quiver Select ammunition for quiver. Default key is `Q'. #read - Read a scroll, a spellbook, or something else. Default key + Read a scroll, a spellbook, or something else. Default key is `r'. #redraw - Redraw the screen. Default key is `^R', and also `^L' if + Redraw the screen. Default key is `^R', and also `^L' if number_pad is on. - #remove - Remove an accessory (ring, amulet, etc). Default key is - `R'. - #ride - Ride (or stop riding) a saddled creature. Autocompletes. - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1456,17 +1456,23 @@ + #remove + Remove an accessory (ring, amulet, etc). Default key is + `R'. + + #ride + Ride (or stop riding) a saddled creature. Autocompletes. Default key is `M-R'. #rub - Rub a lamp or a stone. Autocompletes. Default key is `M- + Rub a lamp or a stone. Autocompletes. Default key is `M- r'. #save Save the game and exit the program. Default key is `S'. #search - Search for traps and secret doors around you. Default key + Search for traps and secret doors around you. Default key is `s'. #seeall @@ -1505,14 +1511,8 @@ #sit Sit down. Autocompletes. Default key is `M-s'. - #stats - Show memory usage statistics. Autocompletes. Debug mode - only. - - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1522,6 +1522,10 @@ + #stats + Show memory usage statistics. Autocompletes. Debug mode + only. + #suspend Suspend the game. Default key is `^Z'. @@ -1538,7 +1542,7 @@ Teleport around the level. Default key is `^T'. #terrain - Show bare map without displaying monsters, objects, or + Show bare map without displaying monsters, objects, or traps. Autocompletes. #therecmdmenu @@ -1573,12 +1577,8 @@ Note that you must use suitable weapons for this type of combat, or it will be automatically turned off. - #untrap - Untrap something (trap, door, or chest). Default key is `M- - u', and `u' if number_pad is on. - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1588,6 +1588,10 @@ + #untrap + Untrap something (trap, door, or chest). Default key is `M- + u', and `u' if number_pad is on. + In some circumstances it can also be used to rescue trapped monsters. @@ -1595,7 +1599,7 @@ Go up a staircase. Default key is `<'. #vanquished - List vanquished monsters. Autocompletes. Debug mode only. + List vanquished monsters. Autocompletes. Debug mode only. #version Print compile time options for this version of NetHack. Au- @@ -1608,7 +1612,7 @@ Show vision array. Autocompletes. Debug mode only. #wait - Rest one move while doing nothing. Default key is `.', and + Rest one move while doing nothing. Default key is `.', and also ` ' if rest_on_space is on. #wear @@ -1618,7 +1622,7 @@ Tell what a key does. Default key is `&'. #whatis - Show what type of thing a symbol corresponds to. Default + Show what type of thing a symbol corresponds to. Default key is `/'. #wield @@ -1628,23 +1632,19 @@ Wipe off your face. Autocompletes. Default key is `M-w'. #wizbury - Bury objects under and around you. Autocompletes. Debug + Bury objects under and around you. Autocompletes. Debug mode only. #wizdetect - Search for hidden things (secret doors or traps or unseen - monsters) within a modest radius. Autocompletes. Debug + Search for hidden things (secret doors or traps or unseen + monsters) within a modest radius. Autocompletes. Debug mode only. Default key is `^E'. #wizgenesis Create a monster. May be prefixed by a count to create more - than one. Autocompletes. Debug mode only. Default key is - `^G'. - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1654,6 +1654,9 @@ + than one. Autocompletes. Debug mode only. Default key is + `^G'. + #wizidentify Identify all items in inventory. Autocompletes. Debug mode only. Default key is `^I'. @@ -1667,7 +1670,7 @@ Default key is `^V'. #wizmap - Map the level. Autocompletes. Debug mode only. Default + Map the level. Autocompletes. Debug mode only. Default key is `^F'. #wizrumorcheck @@ -1677,11 +1680,11 @@ Smell monster. Autocompletes. Debug mode only. #wizwhere - Show locations of special levels. Autocompletes. Debug + Show locations of special levels. Autocompletes. Debug mode only. #wizwish - Wish for something. Autocompletes. Debug mode only. De- + Wish for something. Autocompletes. Debug mode only. De- fault key is `^W'. #wmode @@ -1696,21 +1699,18 @@ If your keyboard has a meta key (which, when pressed in com- - bination with another key, modifies it by setting the "meta" - [8th, or "high"] bit), you can invoke many extended commands by + bination with another key, modifies it by setting the "meta" + [8th, or "high"] bit), you can invoke many extended commands by meta-ing the first letter of the command. In NT, OS/2, PC and ST NetHack, the "Alt" key can be used in - this fashion; on the Amiga, set the altmeta option to get this - behavior. On other systems, if typing "Alt" plus another key - transmits a two character sequence consisting of an Escape fol- - lowed by the other key, you may set the altmeta option to have - NetHack combine them into meta+key. + this fashion; on the Amiga, set the altmeta option to get this + behavior. On other systems, if typing "Alt" plus another key + transmits a two character sequence consisting of an Escape fol- + lowed by the other key, you may set the altmeta option to have - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1720,6 +1720,8 @@ + NetHack combine them into meta+key. + M-? #? (not supported by all platforms) M-2 #twoweapon (unless the number_pad option is enabled) @@ -1774,9 +1776,7 @@ - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1786,7 +1786,9 @@ - If the number_pad option is on, some additional letter com- + + + If the number_pad option is on, some additional letter com- mands are available: h #help @@ -1803,9 +1805,9 @@ 5. Rooms and corridors - Rooms and corridors in the dungeon are either lit or dark. - Any lit areas within your line of sight will be displayed; dark - areas are only displayed if they are within one space of you. + Rooms and corridors in the dungeon are either lit or dark. + Any lit areas within your line of sight will be displayed; dark + areas are only displayed if they are within one space of you. Walls and corridors remain on the map as you explore them. Secret corridors are hidden. You can find them with the `s' @@ -1814,35 +1816,33 @@ 5.1. Doorways Doorways connect rooms and corridors. Some doorways have no - doors; you can walk right through. Others have doors in them, + doors; you can walk right through. Others have doors in them, which may be open, closed, or locked. To open a closed door, use - the `o' (open) command; to close it again, use the `c' (close) + the `o' (open) command; to close it again, use the `c' (close) command. - You can get through a locked door by using a tool to pick + You can get through a locked door by using a tool to pick the lock with the `a' (apply) command, or by kicking it open with the `^D' (kick) command. - Open doors cannot be entered diagonally; you must approach - them straight on, horizontally or vertically. Doorways without + Open doors cannot be entered diagonally; you must approach + them straight on, horizontally or vertically. Doorways without doors are not restricted in this fashion. - Doors can be useful for shutting out monsters. Most mon- - sters cannot open doors, although a few don't need to (for exam- + Doors can be useful for shutting out monsters. Most mon- + sters cannot open doors, although a few don't need to (for exam- ple, ghosts can walk through doors). - Secret doors are hidden. You can find them with the `s' - (search) command. Once found they are in all ways equivalent to + Secret doors are hidden. You can find them with the `s' + (search) command. Once found they are in all ways equivalent to normal doors. - 5.2. Traps (`^') - - There are traps throughout the dungeon to snare the unwary - delver. For example, you may suddenly fall into a pit and be - stuck for a few turns trying to climb out. Traps don't appear on - NetHack 3.6 May 7, 2019 + + + + NetHack 3.6 October 1, 2019 @@ -1852,63 +1852,63 @@ + 5.2. Traps (`^') + + There are traps throughout the dungeon to snare the unwary + delver. For example, you may suddenly fall into a pit and be + stuck for a few turns trying to climb out. Traps don't appear on your map until you see one triggered by moving onto it, see some- thing fall into it, or you discover it with the `s' (search) com- - mand. Monsters can fall prey to traps, too, which can be a very + mand. Monsters can fall prey to traps, too, which can be a very useful defensive strategy. There is a special pre-mapped branch of the dungeon based on - the classic computer game "Sokoban." The goal is to push the - boulders into the pits or holes. With careful foresight, it is - possible to complete all of the levels according to the tradi- - tional rules of Sokoban. Some allowances are permitted in case + the classic computer game "Sokoban." The goal is to push the + boulders into the pits or holes. With careful foresight, it is + possible to complete all of the levels according to the tradi- + tional rules of Sokoban. Some allowances are permitted in case the player gets stuck; however, they will lower your luck. 5.3. Stairs and ladders (`<', `>') - In general, each level in the dungeon will have a staircase + In general, each level in the dungeon will have a staircase going up (`<') to the previous level and another going down (`>') - to the next level. There are some exceptions though. For in- - stance, fairly early in the dungeon you will find a level with + to the next level. There are some exceptions though. For in- + stance, fairly early in the dungeon you will find a level with two down staircases, one continuing into the dungeon and the oth- - er branching into an area known as the Gnomish Mines. Those - mines eventually hit a dead end, so after exploring them (if you - choose to do so), you'll need to climb back up to the main dun- + er branching into an area known as the Gnomish Mines. Those + mines eventually hit a dead end, so after exploring them (if you + choose to do so), you'll need to climb back up to the main dun- geon. - When you traverse a set of stairs, or trigger a trap which - sends you to another level, the level you're leaving will be de- - activated and stored in a file on disk. If you're moving to a + When you traverse a set of stairs, or trigger a trap which + sends you to another level, the level you're leaving will be de- + activated and stored in a file on disk. If you're moving to a previously visited level, it will be loaded from its file on disk - and reactivated. If you're moving to a level which has not yet - been visited, it will be created (from scratch for most random + and reactivated. If you're moving to a level which has not yet + been visited, it will be created (from scratch for most random levels, from a template for some "special" levels, or loaded from the remains of an earlier game for a "bones" level as briefly de- - scribed below). Monsters are only active on the current level; + scribed below). Monsters are only active on the current level; those on other levels are essentially placed into stasis. - Ordinarily when you climb a set of stairs, you will arrive - on the corresponding staircase at your destination. However, - pets (see below) and some other monsters will follow along if + Ordinarily when you climb a set of stairs, you will arrive + on the corresponding staircase at your destination. However, + pets (see below) and some other monsters will follow along if they're close enough when you travel up or down stairs, and occa- - sionally one of these creatures will displace you during the + sionally one of these creatures will displace you during the climb. When that occurs, the pet or other monster will arrive on the staircase and you will end up nearby. - Ladders serve the same purpose as staircases, and the two - types of inter-level connections are nearly indistinguishable + Ladders serve the same purpose as staircases, and the two + types of inter-level connections are nearly indistinguishable during game play. - 5.4. Shops and shopping - - Occasionally you will run across a room with a shopkeeper - near the door and many items lying on the floor. You can buy - items by picking them up and then using the `p' command. You can - inquire about the price of an item prior to picking it up by us- - ing the "#chat" command while standing on it. Using an item - NetHack 3.6 May 7, 2019 + + + NetHack 3.6 October 1, 2019 @@ -1918,9 +1918,15 @@ - prior to paying for it will incur a charge, and the shopkeeper - won't allow you to leave the shop until you have paid any debt - you owe. + 5.4. Shops and shopping + + Occasionally you will run across a room with a shopkeeper + near the door and many items lying on the floor. You can buy + items by picking them up and then using the `p' command. You can + inquire about the price of an item prior to picking it up by us- + ing the "#chat" command while standing on it. Using an item pri- + or to paying for it will incur a charge, and the shopkeeper won't + allow you to leave the shop until you have paid any debt you owe. You can sell items to a shopkeeper by dropping them to the floor while inside a shop. You will either be offered an amount @@ -1955,26 +1961,20 @@ * The price of a given item can vary due to a variety of factors. - * A shopkeeper treats the spot immediately inside the door as if + * A shopkeeper treats the spot immediately inside the door as if it were outside the shop. * While the shopkeeper watches you like a hawk, he will generally ignore any other customers. - * If a shop is "closed for inventory," it will not open of its + * If a shop is "closed for inventory," it will not open of its own accord. * Shops do not get restocked with new items, regardless of inven- tory depletion. - 6. Monsters - Monsters you cannot see are not displayed on the screen. - Beware! You may suddenly come upon one in a dark place. Some - magic items can help you locate them before they locate you - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -1984,25 +1984,30 @@ + 6. Monsters + + Monsters you cannot see are not displayed on the screen. + Beware! You may suddenly come upon one in a dark place. Some + magic items can help you locate them before they locate you (which some monsters can do very well). - The commands `/' and `;' may be used to obtain information - about those monsters who are displayed on the screen. The com- - mand "#name" (by default bound to `C'), allows you to assign a - name to a monster, which may be useful to help distinguish one - from another when multiple monsters are present. Assigning a + The commands `/' and `;' may be used to obtain information + about those monsters who are displayed on the screen. The com- + mand "#name" (by default bound to `C'), allows you to assign a + name to a monster, which may be useful to help distinguish one + from another when multiple monsters are present. Assigning a name which is just a space will remove any prior name. The extended command "#chat" can be used to interact with an adjacent monster. There is no actual dialog (in other words, you don't get to choose what you'll say), but chatting with some mon- - sters such as a shopkeeper or the Oracle of Delphi can produce + sters such as a shopkeeper or the Oracle of Delphi can produce useful results. 6.1. Fighting - If you see a monster and you wish to fight it, just attempt - to walk into it. Many monsters you find will mind their own + If you see a monster and you wish to fight it, just attempt + to walk into it. Many monsters you find will mind their own business unless you attack them. Some of them are very dangerous when angered. Remember: discretion is the better part of valor. @@ -2034,13 +2039,8 @@ feed it, too, by throwing it food. A properly trained pet can be very useful under certain circumstances. - Your pet also gains experience from killing monsters, and - can grow over time, gaining hit points and doing more damage. - Initially, your pet may even be better at killing things than - you, which makes pets useful for low-level characters. - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2050,6 +2050,11 @@ + Your pet also gains experience from killing monsters, and + can grow over time, gaining hit points and doing more damage. + Initially, your pet may even be better at killing things than + you, which makes pets useful for low-level characters. + Your pet will follow you up and down staircases if it is next to you when you move. Otherwise your pet will be stranded and may become wild. Similarly, when you trigger certain types @@ -2076,37 +2081,32 @@ Use the `a' (apply) command and pick a saddle in your inven- tory to attempt to put that saddle on an adjacent creature. If - successful, it will be transferred to that creature's inventory. + successful, it will be transferred to that creature's inventory. Use the "#loot" command while adjacent to a saddled creature - to try to remove the saddle from that creature. If successful, + to try to remove the saddle from that creature. If successful, it will be transferred to your inventory. 6.4. Bones levels - You may encounter the shades and corpses of other adventur- + You may encounter the shades and corpses of other adventur- ers (or even former incarnations of yourself!) and their personal - effects. Ghosts are hard to kill, but easy to avoid, since - they're slow and do little damage. You can plunder the deceased - adventurer's possessions; however, they are likely to be cursed. + effects. Ghosts are hard to kill, but easy to avoid, since + they're slow and do little damage. You can plunder the deceased + adventurer's possessions; however, they are likely to be cursed. Beware of whatever killed the former player; it is probably still lurking around, gloating over its last victory. 6.5. Persistence of Monsters Monsters (a generic reference which also includes humans and - pets) are only shown while they can be seen or otherwise sensed. - Moving to a location where you can't see or sense a monster any - more will result in it disappearing from your map, similarly if + pets) are only shown while they can be seen or otherwise sensed. + Moving to a location where you can't see or sense a monster any + more will result in it disappearing from your map, similarly if it is the one who moved rather than you. - However, if you encounter a monster which you can't see or - sense -- perhaps it is invisible and has just tapped you on the - noggin -- a special "remembered, unseen monster" marker will be - displayed at the location where you think it is. That will - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2116,63 +2116,63 @@ - persist until you have proven that there is no monster there, - even if the unseen monster moves to another location or you move - to a spot where the marker's location ordinarily wouldn't be seen - any more. + However, if you encounter a monster which you can't see or + sense -- perhaps it is invisible and has just tapped you on the + noggin -- a special "remembered, unseen monster" marker will be + displayed at the location where you think it is. That will per- + sist until you have proven that there is no monster there, even + if the unseen monster moves to another location or you move to a + spot where the marker's location ordinarily wouldn't be seen any + more. 7. Objects When you find something in the dungeon, it is common to want to pick it up. In NetHack, this is accomplished automatically by - walking over the object (unless you turn off the autopickup op- - tion (see below), or move with the `m' prefix (see above)), or + walking over the object (unless you turn off the autopickup op- + tion (see below), or move with the `m' prefix (see above)), or manually by using the `,' command. - If you're carrying too many items, NetHack will tell you so - and you won't be able to pick up anything more. Otherwise, it - will add the object(s) to your pack and tell you what you just + If you're carrying too many items, NetHack will tell you so + and you won't be able to pick up anything more. Otherwise, it + will add the object(s) to your pack and tell you what you just picked up. - As you add items to your inventory, you also add the weight - of that object to your load. The amount that you can carry de- - pends on your strength and your constitution. The stronger and - sturdier you are, the less the additional load will affect you. + As you add items to your inventory, you also add the weight + of that object to your load. The amount that you can carry de- + pends on your strength and your constitution. The stronger and + sturdier you are, the less the additional load will affect you. There comes a point, though, when the weight of all of that stuff - you are carrying around with you through the dungeon will encum- + you are carrying around with you through the dungeon will encum- ber you. Your reactions will get slower and you'll burn calories - faster, requiring food more frequently to cope with it. Eventu- - ally, you'll be so overloaded that you'll either have to discard + faster, requiring food more frequently to cope with it. Eventu- + ally, you'll be so overloaded that you'll either have to discard some of what you're carrying or collapse under its weight. - NetHack will tell you how badly you have loaded yourself. - If you are encumbered, one of the conditions "Burdened", + NetHack will tell you how badly you have loaded yourself. + If you are encumbered, one of the conditions "Burdened", "Stressed", "Strained", "Overtaxed" or "Overloaded" will be shown on the bottom line status display. When you pick up an object, it is assigned an inventory let- - ter. Many commands that operate on objects must ask you to find - out which object you want to use. When NetHack asks you to + ter. Many commands that operate on objects must ask you to find + out which object you want to use. When NetHack asks you to choose a particular object you are carrying, you are usually pre- - sented with a list of inventory letters to choose from (see Com- + sented with a list of inventory letters to choose from (see Com- mands, above). - Some objects, such as weapons, are easily differentiated. - Others, like scrolls and potions, are given descriptions which - vary according to type. During a game, any two objects with the - same description are the same type. However, the descriptions + Some objects, such as weapons, are easily differentiated. + Others, like scrolls and potions, are given descriptions which + vary according to type. During a game, any two objects with the + same description are the same type. However, the descriptions will vary from game to game. When you use one of these objects, if its effect is obvious, - NetHack will remember what it is for you. If its effect isn't - extremely obvious, you will be asked what you want to call this - type of object so you will recognize it later. You can also use - the "#name" command, for the same purpose at any time, to name - all objects of a particular type or just an individual object. - When you use "#name" on an object which has already been named, + NetHack will remember what it is for you. If its effect isn't + extremely obvious, you will be asked what you want to call this - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2182,63 +2182,63 @@ - specifying a space as the value will remove the prior name in- + type of object so you will recognize it later. You can also use + the "#name" command, for the same purpose at any time, to name + all objects of a particular type or just an individual object. + When you use "#name" on an object which has already been named, + specifying a space as the value will remove the prior name in- stead of assigning a new one. 7.1. Curses and Blessings - Any object that you find may be cursed, even if the object + Any object that you find may be cursed, even if the object is otherwise helpful. The most common effect of a curse is being - stuck with (and to) the item. Cursed weapons weld themselves to - your hand when wielded, so you cannot unwield them. Any cursed - item you wear is not removable by ordinary means. In addition, - cursed arms and armor usually, but not always, bear negative en- + stuck with (and to) the item. Cursed weapons weld themselves to + your hand when wielded, so you cannot unwield them. Any cursed + item you wear is not removable by ordinary means. In addition, + cursed arms and armor usually, but not always, bear negative en- chantments that make them less effective in combat. Other cursed objects may act poorly or detrimentally in other ways. - Objects can also be blessed. Blessed items usually work - better or more beneficially than normal uncursed items. For ex- + Objects can also be blessed. Blessed items usually work + better or more beneficially than normal uncursed items. For ex- ample, a blessed weapon will do more damage against demons. Objects which are neither cursed nor blessed are referred to - as uncursed. They could just as easily have been described as - unblessed, but the uncursed designation is what you will see - within the game. A "glass half full versus glass half empty" + as uncursed. They could just as easily have been described as + unblessed, but the uncursed designation is what you will see + within the game. A "glass half full versus glass half empty" situation; make of that what you will. There are magical means of bestowing or removing curses upon - objects, so even if you are stuck with one, you can still have - the curse lifted and the item removed. Priests and Priestesses - have an innate sensitivity to this property in any object, so - they can more easily avoid cursed objects than other character + objects, so even if you are stuck with one, you can still have + the curse lifted and the item removed. Priests and Priestesses + have an innate sensitivity to this property in any object, so + they can more easily avoid cursed objects than other character roles. - An item with unknown status will be reported in your inven- + An item with unknown status will be reported in your inven- tory with no prefix. An item which you know the state of will be - distinguished in your inventory by the presence of the word + distinguished in your inventory by the presence of the word "cursed", "uncursed" or "blessed" in the description of the item. - In some cases "uncursed" will be omitted as being redundant when + In some cases "uncursed" will be omitted as being redundant when enough other information is displayed. The implicit_uncursed op- - tion can be used to control this; toggle it off to have "un- + tion can be used to control this; toggle it off to have "un- cursed" be displayed even when that can be deduced from other at- tributes. 7.2. Weapons (`)') - Given a chance, most monsters in the Mazes of Menace will - gratuitously try to kill you. You need weapons for self-defense - (killing them first). Without a weapon, you do only 1-2 hit - points of damage (plus bonuses, if any). Monk characters are an - exception; they normally do more damage with bare (or gloved) + Given a chance, most monsters in the Mazes of Menace will + gratuitously try to kill you. You need weapons for self-defense + (killing them first). Without a weapon, you do only 1-2 hit + points of damage (plus bonuses, if any). Monk characters are an + exception; they normally do more damage with bare (or gloved) hands than they do with weapons. - There are wielded weapons, like maces and swords, and thrown - weapons, like arrows and spears. To hit monsters with a weapon, - you must wield it and attack them, or throw it at them. You can - simply elect to throw a spear. To shoot an arrow, you should - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2248,63 +2248,63 @@ - first wield a bow, then throw the arrow. Crossbows shoot cross- + There are wielded weapons, like maces and swords, and thrown + weapons, like arrows and spears. To hit monsters with a weapon, + you must wield it and attack them, or throw it at them. You can + simply elect to throw a spear. To shoot an arrow, you should + first wield a bow, then throw the arrow. Crossbows shoot cross- bow bolts. Slings hurl rocks and (other) stones (like gems). - Enchanted weapons have a "plus" (or "to hit enhancement" - which can be either positive or negative) that adds to your - chance to hit and the damage you do to a monster. The only way + Enchanted weapons have a "plus" (or "to hit enhancement" + which can be either positive or negative) that adds to your + chance to hit and the damage you do to a monster. The only way to determine a weapon's enchantment is to have it magically iden- - tified somehow. Most weapons are subject to some type of damage + tified somehow. Most weapons are subject to some type of damage like rust. Such "erosion" damage can be repaired. - The chance that an attack will successfully hit a monster, - and the amount of damage such a hit will do, depends upon many - factors. Among them are: type of weapon, quality of weapon (en- + The chance that an attack will successfully hit a monster, + and the amount of damage such a hit will do, depends upon many + factors. Among them are: type of weapon, quality of weapon (en- chantment and/or erosion), experience level, strength, dexterity, - encumbrance, and proficiency (see below). The monster's armor + encumbrance, and proficiency (see below). The monster's armor class -- a general defense rating, not necessarily due to wearing of armor -- is a factor too; also, some monsters are particularly vulnerable to certain types of weapons. - Many weapons can be wielded in one hand; some require both - hands. When wielding a two-handed weapon, you can not wear a - shield, and vice versa. When wielding a one-handed weapon, you - can have another weapon ready to use by setting things up with - the `x' command, which exchanges your primary (the one being - wielded) and alternate weapons. And if you have proficiency in - the "two weapon combat" skill, you may wield both weapons simul- + Many weapons can be wielded in one hand; some require both + hands. When wielding a two-handed weapon, you can not wear a + shield, and vice versa. When wielding a one-handed weapon, you + can have another weapon ready to use by setting things up with + the `x' command, which exchanges your primary (the one being + wielded) and alternate weapons. And if you have proficiency in + the "two weapon combat" skill, you may wield both weapons simul- taneously as primary and secondary; use the `X' command to engage - or disengage that. Only some types of characters (barbarians, + or disengage that. Only some types of characters (barbarians, for instance) have the necessary skill available. Even with that - skill, using two weapons at once incurs a penalty in the chance + skill, using two weapons at once incurs a penalty in the chance to hit your target compared to using just one weapon at a time. - There might be times when you'd rather not wield any weapon - at all. To accomplish that, wield `-', or else use the `A' com- - mand which allows you to unwield the current weapon in addition + There might be times when you'd rather not wield any weapon + at all. To accomplish that, wield `-', or else use the `A' com- + mand which allows you to unwield the current weapon in addition to taking off other worn items. - Those of you in the audience who are AD&D players, be aware + Those of you in the audience who are AD&D players, be aware that each weapon which existed in AD&D does roughly the same dam- - age to monsters in NetHack. Some of the more obscure weapons + age to monsters in NetHack. Some of the more obscure weapons (such as the aklys, lucern hammer, and bec-de-corbin) are defined in an appendix to Unearthed Arcana, an AD&D supplement. - The commands to use weapons are `w' (wield), `t' (throw), - `f' (fire, an alternate way of throwing), `Q' (quiver), `x' (ex- + The commands to use weapons are `w' (wield), `t' (throw), + `f' (fire, an alternate way of throwing), `Q' (quiver), `x' (ex- change), `X' (twoweapon), and "#enhance" (see below). - 7.2.1. Throwing and shooting - - You can throw just about anything via the `t' command. It - will prompt for the item to throw; picking `?' will list things - in your inventory which are considered likely to be thrown, or - picking `*' will list your entire inventory. After you've chosen - what to throw, you will be prompted for a direction rather than - NetHack 3.6 May 7, 2019 + + + + NetHack 3.6 October 1, 2019 @@ -2314,35 +2314,42 @@ - for a specific target. The distance something can be thrown de- + 7.2.1. Throwing and shooting + + You can throw just about anything via the `t' command. It + will prompt for the item to throw; picking `?' will list things + in your inventory which are considered likely to be thrown, or + picking `*' will list your entire inventory. After you've chosen + what to throw, you will be prompted for a direction rather than + for a specific target. The distance something can be thrown de- pends mainly on the type of object and your strength. Arrows can - be thrown by hand, but can be thrown much farther and will be + be thrown by hand, but can be thrown much farther and will be more likely to hit when thrown while you are wielding a bow. - You can simplify the throwing operation by using the `Q' - command to select your preferred "missile", then using the `f' - command to throw it. You'll be prompted for a direction as - above, but you don't have to specify which item to throw each + You can simplify the throwing operation by using the `Q' + command to select your preferred "missile", then using the `f' + command to throw it. You'll be prompted for a direction as + above, but you don't have to specify which item to throw each time you use `f'. There is also an option, autoquiver, which has NetHack choose another item to automatically fill your quiver (or - quiver sack, or have at the ready) when the inventory slot used + quiver sack, or have at the ready) when the inventory slot used for `Q' runs out. - Some characters have the ability to fire a volley of multi- - ple items in a single turn. Knowing how to load several rounds + Some characters have the ability to fire a volley of multi- + ple items in a single turn. Knowing how to load several rounds of ammunition at once -- or hold several missiles in your hand -- - and still hit a target is not an easy task. Rangers are among - those who are adept at this task, as are those with a high level - of proficiency in the relevant weapon skill (in bow skill if - you're wielding one to shoot arrows, in crossbow skill if you're + and still hit a target is not an easy task. Rangers are among + those who are adept at this task, as are those with a high level + of proficiency in the relevant weapon skill (in bow skill if + you're wielding one to shoot arrows, in crossbow skill if you're wielding one to shoot bolts, or in sling skill if you're wielding one to shoot stones). The number of items that the character has - a chance to fire varies from turn to turn. You can explicitly - limit the number of shots by using a numeric prefix before the - `t' or `f' command. For example, "2f" (or "n2f" if using num- + a chance to fire varies from turn to turn. You can explicitly + limit the number of shots by using a numeric prefix before the + `t' or `f' command. For example, "2f" (or "n2f" if using num- ber_pad mode) would ensure that at most 2 arrows are shot even if - you could have fired 3. If you specify a larger number than - would have been shot ("4f" in this example), you'll just end up + you could have fired 3. If you specify a larger number than + would have been shot ("4f" in this example), you'll just end up shooting the same number (3, here) as if no limit had been speci- fied. Once the volley is in motion, all of the items will travel in the same direction; if the first ones kill a monster, the oth- @@ -2351,26 +2358,19 @@ 7.2.2. Weapon proficiency You will have varying degrees of skill in the weapons avail- - able. Weapon proficiency, or weapon skills, affect how well you - can use particular types of weapons, and you'll be able to im- - prove your skills as you progress through a game, depending on + able. Weapon proficiency, or weapon skills, affect how well you + can use particular types of weapons, and you'll be able to im- + prove your skills as you progress through a game, depending on your role, your experience level, and use of the weapons. - For the purposes of proficiency, weapons have been divided - up into various groups such as daggers, broadswords, and - polearms. Each role has a limit on what level of proficiency a - character can achieve for each group. For instance, wizards can - become highly skilled in daggers or staves but not in swords or - bows. - - The "#enhance" extended command is used to review current - weapons proficiency (also spell proficiency) and to choose which - skill(s) to improve when you've used one or more skills enough to - become eligible to do so. The skill rankings are "none" (some- - times also referred to as "restricted", because you won't be able + For the purposes of proficiency, weapons have been divided + up into various groups such as daggers, broadswords, and + polearms. Each role has a limit on what level of proficiency a + character can achieve for each group. For instance, wizards can + become highly skilled in daggers or staves but not in swords or - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2380,63 +2380,63 @@ - to advance), "unskilled", "basic", "skilled", and "expert". Re- + bows. + + The "#enhance" extended command is used to review current + weapons proficiency (also spell proficiency) and to choose which + skill(s) to improve when you've used one or more skills enough to + become eligible to do so. The skill rankings are "none" (some- + times also referred to as "restricted", because you won't be able + to advance), "unskilled", "basic", "skilled", and "expert". Re- stricted skills simply will not appear in the list shown by "#en- hance". (Divine intervention might unrestrict a particular skill, in which case it will start at unskilled and be limited to - basic.) Some characters can enhance their barehanded combat or + basic.) Some characters can enhance their barehanded combat or martial arts skill beyond expert to "master" or "grand master". Use of a weapon in which you're restricted or unskilled will incur a modest penalty in the chance to hit a monster and also in - the amount of damage done when you do hit; at basic level, there - is no penalty or bonus; at skilled level, you receive a modest - bonus in the chance to hit and amount of damage done; at expert - level, the bonus is higher. A successful hit has a chance to - boost your training towards the next skill level (unless you've - already reached the limit for this skill). Once such training - reaches the threshold for that next level, you'll be told that - you feel more confident in your skills. At that point you can - use "#enhance" to increase one or more skills. Such skills are - not increased automatically because there is a limit to your to- - tal overall skills, so you need to actively choose which skills + the amount of damage done when you do hit; at basic level, there + is no penalty or bonus; at skilled level, you receive a modest + bonus in the chance to hit and amount of damage done; at expert + level, the bonus is higher. A successful hit has a chance to + boost your training towards the next skill level (unless you've + already reached the limit for this skill). Once such training + reaches the threshold for that next level, you'll be told that + you feel more confident in your skills. At that point you can + use "#enhance" to increase one or more skills. Such skills are + not increased automatically because there is a limit to your to- + tal overall skills, so you need to actively choose which skills to enhance and which to ignore. 7.2.3. Two-Weapon combat Some characters can use two weapons at once. Setting things - up to do so can seem cumbersome but becomes second nature with + up to do so can seem cumbersome but becomes second nature with use. To wield two weapons, you need to use the "#twoweapon" com- - mand. But first you need to have a weapon in each hand. (Note - that your two weapons are not fully equal; the one in the hand - you normally wield with is considered primary and the other one + mand. But first you need to have a weapon in each hand. (Note + that your two weapons are not fully equal; the one in the hand + you normally wield with is considered primary and the other one is considered secondary. The most noticeable difference is after - you stop -- or before you begin, for that matter -- wielding two + you stop -- or before you begin, for that matter -- wielding two weapons at once. The primary is your wielded weapon and the sec- - ondary is just an item in your inventory that's been designated + ondary is just an item in your inventory that's been designated as alternate weapon.) If your primary weapon is wielded but your off hand is empty - or has the wrong weapon, use the sequence `x', `w', `x' to first - swap your primary into your off hand, wield whatever you want as - secondary weapon, then swap them both back into the intended + or has the wrong weapon, use the sequence `x', `w', `x' to first + swap your primary into your off hand, wield whatever you want as + secondary weapon, then swap them both back into the intended hands. If your secondary or alternate weapon is correct but your primary one is not, simply use `w' to wield the primary. Lastly, - if neither hand holds the correct weapon, use `w', `x', `w' to + if neither hand holds the correct weapon, use `w', `x', `w' to first wield the intended secondary, swap it to off hand, and then wield the primary. - The whole process can be simplified via use of the push- - weapon option. When it is enabled, then using `w' to wield some- - thing causes the currently wielded weapon to become your alter- - nate weapon. So the sequence `w', `w' can be used to first wield - the weapon you intend to be secondary, and then wield the one you - want as primary which will push the first into secondary posi- - tion. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2446,8 +2446,16 @@ - When in two-weapon combat mode, using the `X' command tog- - gles back to single-weapon mode. Throwing or dropping either of + The whole process can be simplified via use of the push- + weapon option. When it is enabled, then using `w' to wield some- + thing causes the currently wielded weapon to become your alter- + nate weapon. So the sequence `w', `w' can be used to first wield + the weapon you intend to be secondary, and then wield the one you + want as primary which will push the first into secondary posi- + tion. + + When in two-weapon combat mode, using the `X' command tog- + gles back to single-weapon mode. Throwing or dropping either of the weapons or having one of them be stolen or destroyed will al- so make you revert to single-weapon combat. @@ -2455,10 +2463,10 @@ Lots of unfriendly things lurk about; you need armor to pro- tect yourself from their blows. Some types of armor offer better - protection than others. Your armor class is a measure of this + protection than others. Your armor class is a measure of this protection. Armor class (AC) is measured as in AD&D, with 10 be- - ing the equivalent of no armor, and lower numbers meaning better - armor. Each suit of armor which exists in AD&D gives the same + ing the equivalent of no armor, and lower numbers meaning better + armor. Each suit of armor which exists in AD&D gives the same protection in NetHack. Here is an (incomplete) list of the armor classes provided by various suits of armor: dragon scale mail 1 @@ -2480,29 +2488,21 @@ leather jacket 9 no armor 10 - You can also wear other pieces of armor (for example hel- + You can also wear other pieces of armor (for example hel- mets, boots, shields, cloaks) to lower your armor class even fur- - ther, but you can only wear one item of each category (one suit - of armor, one cloak, one helmet, one shield, and so on) at a + ther, but you can only wear one item of each category (one suit + of armor, one cloak, one helmet, one shield, and so on) at a time. - If a piece of armor is enchanted, its armor protection will - be better (or worse) than normal, and its "plus" (or minus) will - subtract from your armor class. For example, a +1 chain mail + If a piece of armor is enchanted, its armor protection will + be better (or worse) than normal, and its "plus" (or minus) will + subtract from your armor class. For example, a +1 chain mail would give you better protection than normal chain mail, lowering - your armor class one unit further to 4. When you put on a piece - of armor, you immediately find out the armor class and any - "plusses" it provides. Cursed pieces of armor usually have nega- - tive enchantments (minuses) in addition to being unremovable. - - Many types of armor are subject to some kind of damage like - rust. Such damage can be repaired. Some types of armor may in- - hibit spell casting. + your armor class one unit further to 4. When you put on a piece + of armor, you immediately find out the armor class and any - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2512,63 +2512,63 @@ + "plusses" it provides. Cursed pieces of armor usually have nega- + tive enchantments (minuses) in addition to being unremovable. + + Many types of armor are subject to some kind of damage like + rust. Such damage can be repaired. Some types of armor may in- + hibit spell casting. + The commands to use armor are `W' (wear) and `T' (take off). - The `A' command can also be used to take off armor as well as + The `A' command can also be used to take off armor as well as other worn items. 7.4. Food (`%') - Food is necessary to survive. If you go too long without - eating you will faint, and eventually die of starvation. Some - types of food will spoil, and become unhealthy to eat, if not + Food is necessary to survive. If you go too long without + eating you will faint, and eventually die of starvation. Some + types of food will spoil, and become unhealthy to eat, if not protected. Food stored in ice boxes or tins ("cans") will usual- - ly stay fresh, but ice boxes are heavy, and tins take a while to + ly stay fresh, but ice boxes are heavy, and tins take a while to open. When you kill monsters, they usually leave corpses which are - also "food." Many, but not all, of these are edible; some also - give you special powers when you eat them. A good rule of thumb + also "food." Many, but not all, of these are edible; some also + give you special powers when you eat them. A good rule of thumb is "you are what you eat." Some character roles and some monsters are vegetarian. Veg- - etarian monsters will typically never eat animal corpses, while - vegetarian players can, but with some rather unpleasant side-ef- + etarian monsters will typically never eat animal corpses, while + vegetarian players can, but with some rather unpleasant side-ef- fects. - You can name one food item after something you like to eat + You can name one food item after something you like to eat with the fruit option. The command to eat food is `e'. 7.5. Scrolls (`?') - Scrolls are labeled with various titles, probably chosen by + Scrolls are labeled with various titles, probably chosen by ancient wizards for their amusement value (for example "READ ME," - or "THANX MAUD" backwards). Scrolls disappear after you read + or "THANX MAUD" backwards). Scrolls disappear after you read them (except for blank ones, without magic spells on them). - One of the most useful of these is the scroll of identify, + One of the most useful of these is the scroll of identify, which can be used to determine what another object is, whether it - is cursed or blessed, and how many uses it has left. Some ob- - jects of subtle enchantment are difficult to identify without + is cursed or blessed, and how many uses it has left. Some ob- + jects of subtle enchantment are difficult to identify without these. A mail daemon may run up and deliver mail to you as a scroll - of mail (on versions compiled with this feature). To use this - feature on versions where NetHack mail delivery is triggered by - electronic mail appearing in your system mailbox, you must let + of mail (on versions compiled with this feature). To use this + feature on versions where NetHack mail delivery is triggered by + electronic mail appearing in your system mailbox, you must let NetHack know where to look for new mail by setting the "MAIL" en- - vironment variable to the file name of your mailbox. You may al- - so want to set the "MAILREADER" environment variable to the file - name of your favorite reader, so NetHack can shell to it when you - read the scroll. On versions of NetHack where mail is randomly - generated internal to the game, these environment variables are - ignored. You can disable the mail daemon by turning off the mail - option. + vironment variable to the file name of your mailbox. You may - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2578,63 +2578,63 @@ + also want to set the "MAILREADER" environment variable to the + file name of your favorite reader, so NetHack can shell to it + when you read the scroll. On versions of NetHack where mail is + randomly generated internal to the game, these environment vari- + ables are ignored. You can disable the mail daemon by turning + off the mail option. + The command to read a scroll is `r'. 7.6. Potions (`!') - Potions are distinguished by the color of the liquid inside + Potions are distinguished by the color of the liquid inside the flask. They disappear after you quaff them. - Clear potions are potions of water. Sometimes these are + Clear potions are potions of water. Sometimes these are blessed or cursed, resulting in holy or unholy water. Holy water - is the bane of the undead, so potions of holy water are good - things to throw (`t') at them. It is also sometimes very useful + is the bane of the undead, so potions of holy water are good + things to throw (`t') at them. It is also sometimes very useful to dip ("#dip") an object into a potion. The command to drink a potion is `q' (quaff). 7.7. Wands (`/') - Wands usually have multiple magical charges. Some types of + Wands usually have multiple magical charges. Some types of wands require a direction in which to zap them. You can also zap - them at yourself (just give a `.' or `s' for the direction). Be - warned, however, for this is often unwise. Other types of wands - don't require a direction. The number of charges in a wand is + them at yourself (just give a `.' or `s' for the direction). Be + warned, however, for this is often unwise. Other types of wands + don't require a direction. The number of charges in a wand is random and decreases by one whenever you use it. - When the number of charges left in a wand becomes zero, at- - tempts to use the wand will usually result in nothing happening. + When the number of charges left in a wand becomes zero, at- + tempts to use the wand will usually result in nothing happening. Occasionally, however, it may be possible to squeeze the last few - mana points from an otherwise spent wand, destroying it in the - process. A wand may be recharged by using suitable magic, but - doing so runs the risk of causing it to explode. The chance for - such an explosion starts out very small and increases each time + mana points from an otherwise spent wand, destroying it in the + process. A wand may be recharged by using suitable magic, but + doing so runs the risk of causing it to explode. The chance for + such an explosion starts out very small and increases each time the wand is recharged. In a truly desperate situation, when your back is up against - the wall, you might decide to go for broke and break your wand. - This is not for the faint of heart. Doing so will almost cer- + the wall, you might decide to go for broke and break your wand. + This is not for the faint of heart. Doing so will almost cer- tainly cause a catastrophic release of magical energies. - When you have fully identified a particular wand, inventory - display will include additional information in parentheses: the - number of times it has been recharged followed by a colon and + When you have fully identified a particular wand, inventory + display will include additional information in parentheses: the + number of times it has been recharged followed by a colon and then by its current number of charges. A current charge count of -1 is a special case indicating that the wand has been cancelled. The command to use a wand is `z' (zap). To break one, use the `a' (apply) command. - 7.8. Rings (`=') - - Rings are very useful items, since they are relatively per- - manent magic, unlike the usually fleeting effects of potions, - scrolls, and wands. - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2644,6 +2644,12 @@ + 7.8. Rings (`=') + + Rings are very useful items, since they are relatively per- + manent magic, unlike the usually fleeting effects of potions, + scrolls, and wands. + Putting on a ring activates its magic. You can wear only two rings, one on each ring finger. @@ -2655,52 +2661,46 @@ 7.9. Spellbooks (`+') Spellbooks are tomes of mighty magic. When studied with the - `r' (read) command, they transfer to the reader the knowledge of - a spell (and therefore eventually become unreadable) -- unless - the attempt backfires. Reading a cursed spellbook or one with + `r' (read) command, they transfer to the reader the knowledge of + a spell (and therefore eventually become unreadable) -- unless + the attempt backfires. Reading a cursed spellbook or one with mystic runes beyond your ken can be harmful to your health! - A spell (even when learned) can also backfire when you cast - it. If you attempt to cast a spell well above your experience - level, or if you have little skill with the appropriate spell - type, or cast it at a time when your luck is particularly bad, - you can end up wasting both the energy and the time required in + A spell (even when learned) can also backfire when you cast + it. If you attempt to cast a spell well above your experience + level, or if you have little skill with the appropriate spell + type, or cast it at a time when your luck is particularly bad, + you can end up wasting both the energy and the time required in casting. - Casting a spell calls forth magical energies and focuses - them with your naked mind. Some of the magical energy released - comes from within you. Casting temporarily drains your magical + Casting a spell calls forth magical energies and focuses + them with your naked mind. Some of the magical energy released + comes from within you. Casting temporarily drains your magical power, which will slowly be recovered, and causes you to need ad- - ditional food. Casting of spells also requires practice. With - practice, your skill in each category of spell casting will im- - prove. Over time, however, your memory of each spell will dim, + ditional food. Casting of spells also requires practice. With + practice, your skill in each category of spell casting will im- + prove. Over time, however, your memory of each spell will dim, and you will need to relearn it. Some spells require a direction in which to cast them, simi- - lar to wands. To cast one at yourself, just give a `.' or `s' + lar to wands. To cast one at yourself, just give a `.' or `s' for the direction. A few spells require you to pick a target lo- - cation rather than just specify a particular direction. Other + cation rather than just specify a particular direction. Other spells don't require any direction or target. Just as weapons are divided into groups in which a character - can become proficient (to varying degrees), spells are similarly + can become proficient (to varying degrees), spells are similarly grouped. Successfully casting a spell exercises its skill group; - using the "#enhance" command to advance a sufficiently exercised - skill will affect all spells within the group. Advanced skill - may increase the potency of spells, reduce their risk of failure + using the "#enhance" command to advance a sufficiently exercised + skill will affect all spells within the group. Advanced skill + may increase the potency of spells, reduce their risk of failure during casting attempts, and improve the accuracy of the estimate - for how much longer they will be retained in your memory. Skill - slots are shared with weapons skills. (See also the section on + for how much longer they will be retained in your memory. Skill + slots are shared with weapons skills. (See also the section on "Weapon proficiency".) - Casting a spell also requires flexible movement, and wearing - various types of armor may interfere with that. - The command to read a spellbook is the same as for scrolls, - `r' (read). The `+' command lists each spell you know along with - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2710,29 +2710,34 @@ + Casting a spell also requires flexible movement, and wearing + various types of armor may interfere with that. + + The command to read a spellbook is the same as for scrolls, + `r' (read). The `+' command lists each spell you know along with its level, skill category, chance of failure when casting, and an - estimate of how strongly it is remembered. The `Z' (cast) com- + estimate of how strongly it is remembered. The `Z' (cast) com- mand casts a spell. 7.10. Tools (`(') Tools are miscellaneous objects with various purposes. Some - tools have a limited number of uses, akin to wand charges. For - example, lamps burn out after a while. Other tools are contain- + tools have a limited number of uses, akin to wand charges. For + example, lamps burn out after a while. Other tools are contain- ers, which objects can be placed into or taken out of. The command to use a tool is `a' (apply). 7.10.1. Containers - You may encounter bags, boxes, and chests in your travels. - A tool of this sort can be opened with the "#loot" extended com- - mand when you are standing on top of it (that is, on the same - floor spot), or with the `a' (apply) command when you are carry- - ing it. However, chests are often locked, and are in any case - unwieldy objects. You must set one down before unlocking it by + You may encounter bags, boxes, and chests in your travels. + A tool of this sort can be opened with the "#loot" extended com- + mand when you are standing on top of it (that is, on the same + floor spot), or with the `a' (apply) command when you are carry- + ing it. However, chests are often locked, and are in any case + unwieldy objects. You must set one down before unlocking it by using a key or lock-picking tool with the `a' (apply) command, by - kicking it with the `^D' command, or by using a weapon to force + kicking it with the `^D' command, or by using a weapon to force the lock with the "#force" extended command. Some chests are trapped, causing nasty things to happen when @@ -2741,32 +2746,27 @@ 7.11. Amulets (`"') - Amulets are very similar to rings, and often more powerful. + Amulets are very similar to rings, and often more powerful. Like rings, amulets have various magical properties, some benefi- cial, some harmful, which are activated by putting them on. Only one amulet may be worn at a time, around your neck. - The commands to use amulets are the same as for rings, `P' + The commands to use amulets are the same as for rings, `P' (put on) and `R' (remove). 7.12. Gems (`*') - Some gems are valuable, and can be sold for a lot of gold. - They are also a far more efficient way of carrying your riches. + Some gems are valuable, and can be sold for a lot of gold. + They are also a far more efficient way of carrying your riches. Valuable gems increase your score if you bring them with you when you exit. Other small rocks are also categorized as gems, but they are - much less valuable. All rocks, however, can be used as projec- - tile weapons (if you have a sling). In the most desperate of - cases, you can still throw them by hand. + much less valuable. All rocks, however, can be used as - - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2776,63 +2776,63 @@ + projectile weapons (if you have a sling). In the most desperate + of cases, you can still throw them by hand. + 7.13. Large rocks (``') - Statues and boulders are not particularly useful, and are - generally heavy. It is rumored that some statues are not what + Statues and boulders are not particularly useful, and are + generally heavy. It is rumored that some statues are not what they seem. - Very large humanoids (giants and their ilk) have been known + Very large humanoids (giants and their ilk) have been known to use boulders as weapons. - For some configurations of the program, statues are no - longer shown as ``' but by the letter representing the monster + For some configurations of the program, statues are no + longer shown as ``' but by the letter representing the monster they depict instead. 7.14. Gold (`$') - Gold adds to your score, and you can buy things in shops - with it. There are a number of monsters in the dungeon that may + Gold adds to your score, and you can buy things in shops + with it. There are a number of monsters in the dungeon that may be influenced by the amount of gold you are carrying (shopkeepers aside). 7.15. Persistence of Objects Normally, if you have seen an object at a particular map lo- - cation and move to another location where you can't directly see - that object any more, if will continue to be displayed on your - map. That remains the case even if it is not actually there any - more -- perhaps a monster has picked it up or it has rotted away - -- until you can see or feel that location again. One notable - exception is that if the object gets covered by the "remembered, - unseen monster" marker. When that marker is later removed after - you've verified that no monster is there, you will forget that - there was any object there regardless of whether the unseen mon- - ster actually took the object. If the object is still there, + cation and move to another location where you can't directly see + that object any more, if will continue to be displayed on your + map. That remains the case even if it is not actually there any + more -- perhaps a monster has picked it up or it has rotted away + -- until you can see or feel that location again. One notable + exception is that if the object gets covered by the "remembered, + unseen monster" marker. When that marker is later removed after + you've verified that no monster is there, you will forget that + there was any object there regardless of whether the unseen mon- + ster actually took the object. If the object is still there, then once you see or feel that location again you will re-discov- er the object and resume remembering it. The situation is the same for a pile of objects, except that - only the top item of the pile is displayed. The hilite_pile op- - tion can be enabled in order to show an item differently when it + only the top item of the pile is displayed. The hilite_pile op- + tion can be enabled in order to show an item differently when it is the top one of a pile. 8. Conduct - As if winning NetHack were not difficult enough, certain - players seek to challenge themselves by imposing restrictions on - the way they play the game. The game automatically tracks some - of these challenges, which can be checked at any time with the - #conduct command or at the end of the game. When you perform an - action which breaks a challenge, it will no longer be listed. - This gives players extra "bragging rights" for winning the game - with these challenges. Note that it is perfectly acceptable to - win the game without resorting to these restrictions and that it - is unusual for players to adhere to challenges the first time - they win the game. + As if winning NetHack were not difficult enough, certain + players seek to challenge themselves by imposing restrictions on + the way they play the game. The game automatically tracks some + of these challenges, which can be checked at any time with the + #conduct command or at the end of the game. When you perform an + action which breaks a challenge, it will no longer be listed. + This gives players extra "bragging rights" for winning the game + with these challenges. Note that it is perfectly acceptable to - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2842,63 +2842,63 @@ - Several of the challenges are related to eating behavior. - The most difficult of these is the foodless challenge. Although + win the game without resorting to these restrictions and that it + is unusual for players to adhere to challenges the first time + they win the game. + + Several of the challenges are related to eating behavior. + The most difficult of these is the foodless challenge. Although creatures can survive long periods of time without food, there is - a physiological need for water; thus there is no restriction on - drinking beverages, even if they provide some minor food bene- - fits. Calling upon your god for help with starvation does not + a physiological need for water; thus there is no restriction on + drinking beverages, even if they provide some minor food bene- + fits. Calling upon your god for help with starvation does not violate any food challenges either. - A strict vegan diet is one which avoids any food derived + A strict vegan diet is one which avoids any food derived from animals. The primary source of nutrition is fruits and veg- etables. The corpses and tins of blobs (`b'), jellies (`j'), and - fungi (`F') are also considered to be vegetable matter. Certain - human food is prepared without animal products; namely, lembas - wafers, cram rations, food rations (gunyoki), K-rations, and C- - rations. Metal or another normally indigestible material eaten + fungi (`F') are also considered to be vegetable matter. Certain + human food is prepared without animal products; namely, lembas + wafers, cram rations, food rations (gunyoki), K-rations, and C- + rations. Metal or another normally indigestible material eaten while polymorphed into a creature that can digest it is also con- - sidered vegan food. Note however that eating such items still + sidered vegan food. Note however that eating such items still counts against foodless conduct. - Vegetarians do not eat animals; however, they are less se- - lective about eating animal byproducts than vegans. In addition + Vegetarians do not eat animals; however, they are less se- + lective about eating animal byproducts than vegans. In addition to the vegan items listed above, they may eat any kind of pudding (`P') other than the black puddings, eggs and food made from eggs - (fortune cookies and pancakes), food made with milk (cream pies + (fortune cookies and pancakes), food made with milk (cream pies and candy bars), and lumps of royal jelly. Monks are expected to observe a vegetarian diet. - Eating any kind of meat violates the vegetarian, vegan, and - foodless conducts. This includes tripe rations, the corpses or - tins of any monsters not mentioned above, and the various other - chunks of meat found in the dungeon. Swallowing and digesting a + Eating any kind of meat violates the vegetarian, vegan, and + foodless conducts. This includes tripe rations, the corpses or + tins of any monsters not mentioned above, and the various other + chunks of meat found in the dungeon. Swallowing and digesting a monster while polymorphed is treated as if you ate the creature's - corpse. Eating leather, dragon hide, or bone items while poly- - morphed into a creature that can digest it, or eating monster + corpse. Eating leather, dragon hide, or bone items while poly- + morphed into a creature that can digest it, or eating monster brains while polymorphed into a mind flayer, is considered eating an animal, although wax is only an animal byproduct. - Regardless of conduct, there will be some items which are - indigestible, and others which are hazardous to eat. Using a + Regardless of conduct, there will be some items which are + indigestible, and others which are hazardous to eat. Using a swallow-and-digest attack against a monster is equivalent to eat- - ing the monster's corpse. Please note that the term "vegan" is - used here only in the context of diet. You are still free to - choose not to use or wear items derived from animals (e.g. - leather, dragon hide, bone, horns, coral), but the game will not - keep track of this for you. Also note that "milky" potions may + ing the monster's corpse. Please note that the term "vegan" is + used here only in the context of diet. You are still free to + choose not to use or wear items derived from animals (e.g. + leather, dragon hide, bone, horns, coral), but the game will not + keep track of this for you. Also note that "milky" potions may be a translucent white, but they do not contain milk, so they are - compatible with a vegan diet. Slime molds or player-defined - "fruits", although they could be anything from "cherries" to + compatible with a vegan diet. Slime molds or player-defined + "fruits", although they could be anything from "cherries" to "pork chops", are also assumed to be vegan. - An atheist is one who rejects religion. This means that you - cannot #pray, #offer sacrifices to any god, #turn undead, or - #chat with a priest. Particularly selective readers may argue - that playing Monk or Priest characters should violate this - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2908,63 +2908,63 @@ - conduct; that is a choice left to the player. Offering the - Amulet of Yendor to your god is necessary to win the game and is - not counted against this conduct. You are also not penalized for - being spoken to by an angry god, priest(ess), or other religious + An atheist is one who rejects religion. This means that you + cannot #pray, #offer sacrifices to any god, #turn undead, or + #chat with a priest. Particularly selective readers may argue + that playing Monk or Priest characters should violate this con- + duct; that is a choice left to the player. Offering the Amulet + of Yendor to your god is necessary to win the game and is not + counted against this conduct. You are also not penalized for be- + ing spoken to by an angry god, priest(ess), or other religious figure; a true atheist would hear the words but attach no special meaning to them. - Most players fight with a wielded weapon (or tool intended + Most players fight with a wielded weapon (or tool intended to be wielded as a weapon). Another challenge is to win the game - without using such a wielded weapon. You are still permitted to - throw, fire, and kick weapons; use a wand, spell, or other type + without using such a wielded weapon. You are still permitted to + throw, fire, and kick weapons; use a wand, spell, or other type of item; or fight with your hands and feet. - In NetHack, a pacifist refuses to cause the death of any - other monster (i.e. if you would get experience for the death). - This is a particularly difficult challenge, although it is still + In NetHack, a pacifist refuses to cause the death of any + other monster (i.e. if you would get experience for the death). + This is a particularly difficult challenge, although it is still possible to gain experience by other means. An illiterate character cannot read or write. This includes - reading a scroll, spellbook, fortune cookie message, or t-shirt; + reading a scroll, spellbook, fortune cookie message, or t-shirt; writing a scroll; or making an engraving of anything other than a - single "X" (the traditional signature of an illiterate person). + single "X" (the traditional signature of an illiterate person). Reading an engraving, or any item that is absolutely necessary to - win the game, is not counted against this conduct. The identity - of scrolls and spellbooks (and knowledge of spells) in your - starting inventory is assumed to be learned from your teachers + win the game, is not counted against this conduct. The identity + of scrolls and spellbooks (and knowledge of spells) in your + starting inventory is assumed to be learned from your teachers prior to the start of the game and isn't counted. - There are several other challenges tracked by the game. It + There are several other challenges tracked by the game. It is possible to eliminate one or more species of monsters by geno- - cide; playing without this feature is considered a challenge. + cide; playing without this feature is considered a challenge. When the game offers you an opportunity to genocide monsters, you - may respond with the monster type "none" if you want to decline. - You can change the form of an item into another item of the same - type ("polypiling") or the form of your own body into another - creature ("polyself") by wand, spell, or potion of polymorph; - avoiding these effects are each considered challenges. Polymor- - phing monsters, including pets, does not break either of these - challenges. Finally, you may sometimes receive wishes; a game - without an attempt to wish for any items is a challenge, as is a - game without wishing for an artifact (even if the artifact imme- - diately disappears). When the game offers you an opportunity to - make a wish for an item, you may choose "nothing" if you want to + may respond with the monster type "none" if you want to decline. + You can change the form of an item into another item of the same + type ("polypiling") or the form of your own body into another + creature ("polyself") by wand, spell, or potion of polymorph; + avoiding these effects are each considered challenges. Polymor- + phing monsters, including pets, does not break either of these + challenges. Finally, you may sometimes receive wishes; a game + without an attempt to wish for any items is a challenge, as is a + game without wishing for an artifact (even if the artifact imme- + diately disappears). When the game offers you an opportunity to + make a wish for an item, you may choose "nothing" if you want to decline. 9. Options - Due to variations in personal tastes and conceptions of how + Due to variations in personal tastes and conceptions of how NetHack should do things, there are options you can set to change how NetHack behaves. - - - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -2976,47 +2976,47 @@ 9.1. Setting the options - Options may be set in a number of ways. Within the game, + Options may be set in a number of ways. Within the game, the `O' command allows you to view all options and change most of - them. You can also set options automatically by placing them in - a configuration file, or in the NETHACKOPTIONS environment vari- + them. You can also set options automatically by placing them in + a configuration file, or in the NETHACKOPTIONS environment vari- able. Some versions of NetHack also have front-end programs that - allow you to set options before starting the game or a global + allow you to set options before starting the game or a global configuration for system administrators. 9.2. Using a configuration file The default name of the configuration file varies on differ- - ent operating systems. On MS-DOS and Windows, it is - "defaults.nh" in the same folder as nethack.exe or nethackW.exe. - On UNIX, Linux, and Mac OS X it is ".nethackrc" in the user's + ent operating systems. On MS-DOS and Windows, it is + "defaults.nh" in the same folder as nethack.exe or nethackW.exe. + On UNIX, Linux, and Mac OS X it is ".nethackrc" in the user's home directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor. - Any line in the configuration file starting with `#' is + Any line in the configuration file starting with `#' is treated as a comment. Empty lines are ignored. - Any line beginning with `[' and ending in `]' is considered - a section marker. The text between the square brackets is the - section name. Lines after a section marker belong to that sec- - tion, and are ignored unless a CHOOSE statement was used to se- + Any line beginning with `[' and ending in `]' is considered + a section marker. The text between the square brackets is the + section name. Lines after a section marker belong to that sec- + tion, and are ignored unless a CHOOSE statement was used to se- lect that section. Section names are case insensitive. - You can use different configuration statements in the file, + You can use different configuration statements in the file, some of which can be used multiple times. In general, the state- ments are written in capital letters, followed by an equals sign, - followed by settings particular to that statement. Here is a + followed by settings particular to that statement. Here is a list of allowed statements: OPTIONS - There are two types of options, boolean and compound options. - Boolean options toggle a setting on or off, while compound op- - tions take more diverse values. Prefix a boolean option with - "no" or `!' to turn it off. For compound options, the option + There are two types of options, boolean and compound options. + Boolean options toggle a setting on or off, while compound op- + tions take more diverse values. Prefix a boolean option with + "no" or `!' to turn it off. For compound options, the option name and value are separated by a colon. Some options are per- sistent, and apply only to new games. You can specify multiple OPTIONS statements, and multiple options separated by commas in - a single OPTIONS statement. (Comma separated options are pro- + a single OPTIONS statement. (Comma separated options are pro- cessed from right to left.) Example: @@ -3025,12 +3025,12 @@ OPTIONS=!legacy,autopickup,pickup_types:$"=/!?+ HACKDIR - Default location of files NetHack needs. On Windows HACKDIR - defaults to the location of the NetHack.exe or NetHackw.exe - file so setting HACKDIR to override that is not usually + Default location of files NetHack needs. On Windows HACKDIR + defaults to the location of the NetHack.exe or NetHackw.exe + file so setting HACKDIR to override that is not usually - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3043,15 +3043,15 @@ necessary or recommended. LEVELDIR - The location that in-progress level files are stored. Defaults + The location that in-progress level files are stored. Defaults to HACKDIR, must be writable. SAVEDIR - The location where saved games are kept. Defaults to HACKDIR, + The location where saved games are kept. Defaults to HACKDIR, must be writable. BONESDIR - The location that bones files are kept. Defaults to HACKDIR, + The location that bones files are kept. Defaults to HACKDIR, must be writable. LOCKDIR @@ -3059,14 +3059,14 @@ Defaults to HACKDIR, must be writable. TROUBLEDIR - The location that a record of game aborts and self-diagnosed + The location that a record of game aborts and self-diagnosed game problems is kept. Defaults to HACKDIR, must be writable. AUTOCOMPLETE Enable or disable an extended command autocompletion. Autocom- - pletion has no effect for the X11 windowport. You can specify - multiple autocompletions. To enable autocompletion, list the - extended command. Prefix the command with "!" to disable the + pletion has no effect for the X11 windowport. You can specify + multiple autocompletions. To enable autocompletion, list the + extended command. Prefix the command with "!" to disable the autocompletion for that command. Example: @@ -3074,13 +3074,13 @@ AUTOCOMPLETE=zap,!annotate AUTOPICKUP_EXCEPTION - Set exceptions to the pickup_types option. See the "Configur- + Set exceptions to the pickup_types option. See the "Configur- ing Autopickup Exceptions" section. BINDINGS - Change the key bindings of some special keys, menu accelera- + Change the key bindings of some special keys, menu accelera- tors, or extended commands. You can specify multiple bindings. - Format is key followed by the command, separated by a colon. + Format is key followed by the command, separated by a colon. See the "Changing Key Bindings" section for more information. Example: @@ -3088,7 +3088,7 @@ BIND=^X:getpos.autodescribe CHOOSE - Chooses at random one of the comma-separated parameters as an + Chooses at random one of the comma-separated parameters as an active section name. Lines in other sections are ignored. Example: @@ -3096,7 +3096,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3114,7 +3114,7 @@ OPTIONS=role:wiz,race:elf,align:cha,gender:mal MSGTYPE - Change the way messages are shown in the top status line. See + Change the way messages are shown in the top status line. See the "Configuring Message Types" section. MENUCOLOR @@ -3122,7 +3122,7 @@ ing Menu Colors" section. SYMBOLS - Override one or more symbols in the symbols files. See the + Override one or more symbols in the symbols files. See the "Modifying NetHack Symbols" section. Example: @@ -3130,9 +3130,9 @@ SYMBOLS=S_boulder:0 WIZKIT - Debug mode only: extra items to add to initial inventory. - Value is the name of a text file containing a list of item - names, one per line, up to a maximum of 128 lines. Each line + Debug mode only: extra items to add to initial inventory. + Value is the name of a text file containing a list of item + names, one per line, up to a maximum of 128 lines. Each line is processed by the function that handles wishing. Example: @@ -3140,7 +3140,7 @@ WIZKIT=~/wizkit.txt SOUNDDIR - Define the directory that contains the sound files. See the + Define the directory that contains the sound files. See the "Configuring User Sounds" section. SOUND @@ -3162,7 +3162,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3187,12 +3187,12 @@ 9.3. Using the NETHACKOPTIONS environment variable - The NETHACKOPTIONS variable is a comma-separated list of - initial values for the various options. Some can only be turned - on or off. You turn one of these on by adding the name of the - option to the list, and turn it off by typing a `!' or "no" be- - fore the name. Others take a character string as a value. You - can set string options by typing the option name, a colon or + The NETHACKOPTIONS variable is a comma-separated list of + initial values for the various options. Some can only be turned + on or off. You turn one of these on by adding the name of the + option to the list, and turn it off by typing a `!' or "no" be- + fore the name. Others take a character string as a value. You + can set string options by typing the option name, a colon or equals sign, and then the value of the string. The value is ter- minated by the next comma or the end of string. @@ -3202,7 +3202,7 @@ % setenv NETHACKOPTIONS "color,\!leg,name:Blue Meanie,fruit:lime" - in csh (note the need to escape the `!' since it's special to + in csh (note the need to escape the `!' since it's special to that shell), or the pair of commands $ NETHACKOPTIONS="color,!leg,name:Blue Meanie,fruit:lime" @@ -3212,15 +3212,15 @@ The NETHACKOPTIONS value is effectively the same as a single OPTIONS statement in a configuration file. The "OPTIONS=" prefix - is implied and comma separated options are processed from right + is implied and comma separated options are processed from right to left. Other types of configuration statements such as BIND or MSGTYPE are not allowed. Instead of a comma-separated list of options, NETHACKOPTIONS - can be set to the full name of a configuration file you want to - use. If that full name doesn't start with a slash, precede it - with `@' (at-sign) to let NetHack know that the rest is intended - as a file name. If it does start with `/', the at-sign is op- + can be set to the full name of a configuration file you want to + use. If that full name doesn't start with a slash, precede it + with `@' (at-sign) to let NetHack know that the rest is intended + as a file name. If it does start with `/', the at-sign is op- tional. @@ -3228,7 +3228,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3241,28 +3241,28 @@ 9.4. Customization options Here are explanations of what the various options do. Char- - acter strings that are too long may be truncated. Some of the + acter strings that are too long may be truncated. Some of the options listed may be inactive in your dungeon. - Some options are persistent, and are saved and reloaded + Some options are persistent, and are saved and reloaded along with the game. Changing a persistent option in the config- uration file applies only to new games. acoustics - Enable messages about what your character hears (default on). + Enable messages about what your character hears (default on). Note that this has nothing to do with your computer's audio ca- pabilities. Persistent. align - Your starting alignment (align:lawful, align:neutral, or - align:chaotic). You may specify just the first letter. The - default is to randomly pick an appropriate alignment. If you + Your starting alignment (align:lawful, align:neutral, or + align:chaotic). You may specify just the first letter. The + default is to randomly pick an appropriate alignment. If you prefix the value with `!' or "no", you will exclude that align- - ment from being picked randomly. Cannot be set with the `O' + ment from being picked randomly. Cannot be set with the `O' command. Persistent. autodescribe - Automatically describe the terrain under cursor when asked to + Automatically describe the terrain under cursor when asked to get a location on the map (default true). The whatis_coord op- tion controls whether the description includes map coordinates. @@ -3294,7 +3294,7 @@ tent. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3349,9 +3349,9 @@ Show out-of-sight areas of lit rooms (default on). Persistent. disclose - Controls what information the program reveals when the game - ends. Value is a space separated list of prompting/category - pairs (default is "ni na nv ng nc no", prompt with default re- + Controls what information the program reveals when the game + ends. Value is a space separated list of prompting/category + pairs (default is "ni na nv ng nc no", prompt with default re- sponse of `n' for each candidate). Persistent. The possibili- ties are: @@ -3360,7 +3360,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3377,8 +3377,8 @@ c - display your conduct; o - display dungeon overview. - Each disclosure possibility can optionally be preceded by a - prefix which lets you refine how it behaves. Here are the + Each disclosure possibility can optionally be preceded by a + prefix which lets you refine how it behaves. Here are the valid prefixes: y - prompt you and default to yes on the prompt; @@ -3386,27 +3386,27 @@ + - disclose it without prompting; - - do not disclose it and do not prompt. - The listing of vanquished monsters can be sorted, so there are + The listing of vanquished monsters can be sorted, so there are two additional choices for `v': ? - prompt you and default to ask on the prompt; # - disclose it without prompting, ask for sort order. Asking refers to picking one of the orderings from a menu. The - `+' disclose without prompting choice, or being prompted and + `+' disclose without prompting choice, or being prompted and answering `y' rather than `a', will default to showing monsters in the traditional order, from high level to low level. Omitted categories are implicitly added with `n' prefix. Spec- ified categories with omitted prefix implicitly use `+' prefix. - Order of the disclosure categories does not matter, program + Order of the disclosure categories does not matter, program display for end-of-game disclosure follows a set sequence. - (for example "disclose:yi na +v -g o") The example sets inven- + (for example "disclose:yi na +v -g o") The example sets inven- tory to prompt and default to yes, attributes to prompt and de- fault to no, vanquished to disclose without prompting, genocid- ed to not disclose and not prompt, conduct to implicitly prompt - and default to no, and overview to disclose without prompting. + and default to no, and overview to disclose without prompting. Note that the vanquished monsters list includes all monsters killed by traps and each other as well as by you. And the dun- @@ -3421,12 +3421,12 @@ Changes the extended commands interface to pop-up a menu of available commands. It is keystroke compatible with the tradi- tional interface except that it does not require that you hit - Enter. It is implemented for the tty interface (default off). + Enter. It is implemented for the tty interface (default off). - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3438,61 +3438,61 @@ For the X11 interface, which always uses a menu for choosing an extended command, it controls whether the menu shows all avail- - able commands (on) or just the subset of commands which have + able commands (on) or just the subset of commands which have traditionally been considered extended ones (off). female - An obsolete synonym for "gender:female". Cannot be set with + An obsolete synonym for "gender:female". Cannot be set with the `O' command. fixinv - An object's inventory letter sticks to it when it's dropped - (default on). If this is off, dropping an object shifts all + An object's inventory letter sticks to it when it's dropped + (default on). If this is off, dropping an object shifts all the remaining inventory letters. Persistent. force_invmenu - Commands asking for an inventory item show a menu instead of a + Commands asking for an inventory item show a menu instead of a text query with possible menu letters. Default is off. fruit - Name a fruit after something you enjoy eating (for example - "fruit:mango") (default "slime mold"). Basically a nostalgic - whimsy that NetHack uses from time to time. You should set - this to something you find more appetizing than slime mold. - Apples, oranges, pears, bananas, and melons already exist in + Name a fruit after something you enjoy eating (for example + "fruit:mango") (default "slime mold"). Basically a nostalgic + whimsy that NetHack uses from time to time. You should set + this to something you find more appetizing than slime mold. + Apples, oranges, pears, bananas, and melons already exist in NetHack, so don't use those. gender - Your starting gender (gender:male or gender:female). You may - specify just the first letter. Although you can still denote + Your starting gender (gender:male or gender:female). You may + specify just the first letter. Although you can still denote your gender using the "male" and "female" options, the "gender" - option will take precedence. The default is to randomly pick - an appropriate gender. If you prefix the value with `!' or - "no", you will exclude that gender from being picked randomly. + option will take precedence. The default is to randomly pick + an appropriate gender. If you prefix the value with `!' or + "no", you will exclude that gender from being picked randomly. Cannot be set with the `O' command. Persistent. goldX - When filtering objects based on bless/curse state (BUCX), - whether to treat gold pieces as X (unknown bless/curse state, - when "on") or U (known to be uncursed, when "off", the de- - fault). Gold is never blessed or cursed, but it is not de- + When filtering objects based on bless/curse state (BUCX), + whether to treat gold pieces as X (unknown bless/curse state, + when "on") or U (known to be uncursed, when "off", the de- + fault). Gold is never blessed or cursed, but it is not de- scribed as "uncursed" even when the implicit_uncursed option is "off". help - If more information is available for an object looked at with + If more information is available for an object looked at with the `/' command, ask if you want to see it (default on). Turn- - ing help off makes just looking at things faster, since you - aren't interrupted with the "More info?" prompt, but it also + ing help off makes just looking at things faster, since you + aren't interrupted with the "More info?" prompt, but it also means that you might miss some interesting and/or important in- formation. Persistent. herecmd_menu - When using a windowport that supports mouse and clicking on - yourself or next to you, show a menu of possible actions for + When using a windowport that supports mouse and clicking on + yourself or next to you, show a menu of possible actions for - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3502,34 +3502,34 @@ - the location. Same as "#herecmdmenu" and "#therecmdmenu" com- + the location. Same as "#herecmdmenu" and "#therecmdmenu" com- mands. hilite_pet - Visually distinguish pets from similar animals (default off). - The behavior of this option depends on the type of windowing + Visually distinguish pets from similar animals (default off). + The behavior of this option depends on the type of windowing you use. In text windowing, text highlighting or inverse video - is often used; with tiles, generally displays a heart symbol + is often used; with tiles, generally displays a heart symbol near pets. - With the curses interface, the petattr option controls how to - highlight pets and setting it will turn the hilite_pet option + With the curses interface, the petattr option controls how to + highlight pets and setting it will turn the hilite_pet option on or off as warranted. hilite_pile - Visually distinguish piles of objects from individual objects + Visually distinguish piles of objects from individual objects (default off). The behavior of this option depends on the type - of windowing you use. In text windowing, text highlighting or - inverse video is often used; with tiles, generally displays a + of windowing you use. In text windowing, text highlighting or + inverse video is often used; with tiles, generally displays a small plus-symbol beside the object on the top of the pile. hitpointbar - Show a hit point bar graph behind your name and title. Only - available for TTY and Windows GUI, and only when statushilites + Show a hit point bar graph behind your name and title. Only + available for TTY and Windows GUI, and only when statushilites is on. horsename - Name your starting horse (for example "horsename:Trigger"). + Name your starting horse (for example "horsename:Trigger"). Cannot be set with the `O' command. ignintr @@ -3558,7 +3558,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3569,34 +3569,34 @@ male - An obsolete synonym for "gender:male". Cannot be set with the + An obsolete synonym for "gender:male". Cannot be set with the `O' command. mention_walls Give feedback when walking against a wall (default off). menucolors - Enable coloring menu lines (default off). See "Configuring + Enable coloring menu lines (default off). See "Configuring Menu Colors" on how to configure the colors. menustyle Controls the interface used when you need to choose various ob- - jects (in response to the Drop command, for instance). The - value specified should be the first letter of one of the fol- - lowing: traditional, combination, full, or partial. Tradi- - tional was the only interface available for early versions; it - consists of a prompt for object class characters, followed by - an object-by-object prompt for all items matching the selected - object class(es). Combination starts with a prompt for object + jects (in response to the Drop command, for instance). The + value specified should be the first letter of one of the fol- + lowing: traditional, combination, full, or partial. Tradi- + tional was the only interface available for early versions; it + consists of a prompt for object class characters, followed by + an object-by-object prompt for all items matching the selected + object class(es). Combination starts with a prompt for object class(es) of interest, but then displays a menu of matching ob- - jects rather than prompting one-by-one. Full displays a menu - of object classes rather than a character prompt, and then a - menu of matching objects for selection. Partial skips the ob- + jects rather than prompting one-by-one. Full displays a menu + of object classes rather than a character prompt, and then a + menu of matching objects for selection. Partial skips the ob- ject class filtering and immediately displays a menu of all ob- jects. Persistent. menu_deselect_all - Menu character accelerator to deselect all items in a menu. + Menu character accelerator to deselect all items in a menu. Implemented by the Amiga, Gem, X11 and tty ports. Default `-'. menu_deselect_page @@ -3624,7 +3624,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3690,7 +3690,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3735,7 +3735,7 @@ Send padding nulls to the terminal (default on). Persistent. number_pad - Use digit keys instead of letters to move (default 0 or off). + Use digit keys instead of letters to move (default 0 or off). Valid settings are: 0 - move by letters; "yuhjklbn" @@ -3745,18 +3745,18 @@ 4 - combines 3 with 2; phone layout plus MS-DOS compatibility -1 - by letters but use `z' to go northwest, `y' to zap wands - For backward compatibility, omitting a value is the same as - specifying 1 and negating number_pad is the same as specifying - 0. (Settings 2 and 4 are for compatibility with MS-DOS or old + For backward compatibility, omitting a value is the same as + specifying 1 and negating number_pad is the same as specifying + 0. (Settings 2 and 4 are for compatibility with MS-DOS or old PC Hack; in addition to the different behavior for `5', `Alt-5' acts as `G' and `Alt-0' acts as `I'. Setting -1 is to accommo- - date some QWERTZ keyboards which have the location of the `y' - and `z' keys swapped.) When moving by numbers, to enter a + date some QWERTZ keyboards which have the location of the `y' + and `z' keys swapped.) When moving by numbers, to enter a count prefix for those commands which accept one (such as "12s" - to search twelve times), precede it with the letter `n' + to search twelve times), precede it with the letter `n' - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3769,60 +3769,60 @@ ("n12s"). packorder - Specify the order to list object types in (default + Specify the order to list object types in (default "")[%?+!=/(*`0_"). The value of this option should be a string containing the symbols for the various object types. Any omit- ted types are filled in at the end from the previous order. paranoid_confirmation - A space separated list of specific situations where alternate - prompting is desired. The default is paranoid_confirma- + A space separated list of specific situations where alternate + prompting is desired. The default is paranoid_confirma- tion:pray. - Confirm - for any prompts which are set to require "yes" - rather than `y', also require "no" to reject in- + Confirm - for any prompts which are set to require "yes" + rather than `y', also require "no" to reject in- stead of accepting any non-yes response as no quit - require "yes" rather than `y' to confirm quitting - the game or switching into non-scoring explore + the game or switching into non-scoring explore mode; - die - require "yes" rather than `y' to confirm dying - (not useful in normal play; applies to explore + die - require "yes" rather than `y' to confirm dying + (not useful in normal play; applies to explore mode); - bones - require "yes" rather than `y' to confirm saving + bones - require "yes" rather than `y' to confirm saving bones data when dying in debug mode; - attack - require "yes" rather than `y' to confirm attack- + attack - require "yes" rather than `y' to confirm attack- ing a peaceful monster; wand-break - require "yes" rather than `y' to confirm breaking a wand; Were-change - require "yes" rather than `y' to confirm changing - form due to lycanthropy when hero has polymorph + form due to lycanthropy when hero has polymorph control; - pray - require `y' to confirm an attempt to pray rather + pray - require `y' to confirm an attempt to pray rather than immediately praying; on by default; - Remove - require selection from inventory for `R' and `T' - commands even when wearing just one applicable + Remove - require selection from inventory for `R' and `T' + commands even when wearing just one applicable item. all - turn on all of the above. - By default, the pray choice is enabled, the others disabled. - To disable it without setting any of the other choices, use + By default, the pray choice is enabled, the others disabled. + To disable it without setting any of the other choices, use "paranoid_confirmation:none". To keep it enabled while setting - any of the others, include it in the list, such as "para- + any of the others, include it in the list, such as "para- noid_confirmation:attack pray Remove". perm_invent - If true, always display your current inventory in a window. - This only makes sense for windowing system interfaces that im- + If true, always display your current inventory in a window. + This only makes sense for windowing system interfaces that im- plement this feature. petattr - Specifies one or more text highlighting attributes to use when - showing pets on the map. Effectively a superset of the + Specifies one or more text highlighting attributes to use when + showing pets on the map. Effectively a superset of the hilite_pet boolean option. Curses interface only; value is one or more of the following letters. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3842,35 +3842,35 @@ l - Left line indicator r - Right line indicator - Some of those choices might not work, particularly the final - three, depending upon terminal hardware or terminal emulation + Some of those choices might not work, particularly the final + three, depending upon terminal hardware or terminal emulation software. - Currently multiple highlight-style letters can be combined by - simply stringing them together (for example, "bk"), but in the - future they might require being separated by plus signs (such - as "b+k", which works already). When using the `n' choice, it - should be specified on its own, not in combination with any of + Currently multiple highlight-style letters can be combined by + simply stringing them together (for example, "bk"), but in the + future they might require being separated by plus signs (such + as "b+k", which works already). When using the `n' choice, it + should be specified on its own, not in combination with any of the other letters. pettype - Specify the type of your initial pet, if you are playing a - character class that uses multiple types of pets; or choose to - have no initial pet at all. Possible values are "cat", "dog", + Specify the type of your initial pet, if you are playing a + character class that uses multiple types of pets; or choose to + have no initial pet at all. Possible values are "cat", "dog", "horse", and "none". If the choice is not allowed for the role - you are currently playing, it will be silently ignored. For - example, "horse" will only be honored when playing a knight. + you are currently playing, it will be silently ignored. For + example, "horse" will only be honored when playing a knight. Cannot be set with the `O' command. pickup_burden - When you pick up an item that would exceed this encumbrance - level (Unencumbered, Burdened, streSsed, straiNed, overTaxed, - or overLoaded), you will be asked if you want to continue. + When you pick up an item that would exceed this encumbrance + level (Unencumbered, Burdened, streSsed, straiNed, overTaxed, + or overLoaded), you will be asked if you want to continue. (Default `S'). Persistent. pickup_thrown - If this option is on and autopickup is also on, try to pick up - things that you threw, even if they aren't in pickup_types or + If this option is on and autopickup is also on, try to pick up + things that you threw, even if they aren't in pickup_types or match an autopickup exception. Default is on. Persistent. pickup_types @@ -3880,15 +3880,15 @@ sistent. pile_limit - When walking across a pile of objects on the floor, threshold - at which the message "there are few/several/many objects here" - is given instead of showing a popup list of those objects. A - value of 0 means "no limit" (always list the objects); a value - of 1 effectively means "never show the objects" since the pile - size will always be at least that big; default value is 5. + When walking across a pile of objects on the floor, threshold + at which the message "there are few/several/many objects here" + is given instead of showing a popup list of those objects. A + value of 0 means "no limit" (always list the objects); a value + of 1 effectively means "never show the objects" since the pile + size will always be at least that big; default value is 5. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3901,60 +3901,60 @@ Persistent. playmode - Values are "normal", "explore", or "debug". Allows selection - of explore mode (also known as discovery mode) or debug mode + Values are "normal", "explore", or "debug". Allows selection + of explore mode (also known as discovery mode) or debug mode (also known as wizard mode) instead of normal play. Debug mode - might only be allowed for someone logged in under a particular - user name (on multi-user systems) or specifying a particular + might only be allowed for someone logged in under a particular + user name (on multi-user systems) or specifying a particular character name (on single-user systems) or it might be disabled - entirely. Requesting it when not allowed or not possible re- + entirely. Requesting it when not allowed or not possible re- sults in explore mode instead. Default is normal play. pushweapon - Using the `w' (wield) command when already wielding something - pushes the old item into your alternate weapon slot (default - off). Likewise for the `a' (apply) command if it causes the + Using the `w' (wield) command when already wielding something + pushes the old item into your alternate weapon slot (default + off). Likewise for the `a' (apply) command if it causes the applied item to become wielded. Persistent. race Selects your race (for example, "race:human"). Default is ran- - dom. If you prefix the value with `!' or "no", you will ex- + dom. If you prefix the value with `!' or "no", you will ex- clude that race from being picked randomly. Cannot be set with the `O' command. Persistent. rest_on_space - Make the space bar a synonym for the `.' (#wait) command (de- + Make the space bar a synonym for the `.' (#wait) command (de- fault off). Persistent. role - Pick your type of character (for example "role:Samurai"); syn- - onym for "character". See "name" for an alternate method of - specifying your role. Normally only the first letter of the - value is examined; `r' is an exception with "Rogue", "Ranger", + Pick your type of character (for example "role:Samurai"); syn- + onym for "character". See "name" for an alternate method of + specifying your role. Normally only the first letter of the + value is examined; `r' is an exception with "Rogue", "Ranger", and "random" values. If you prefix the value with `!' or "no", - you will exclude that role from being picked randomly. Cannot + you will exclude that role from being picked randomly. Cannot be set with the `O' command. Persistent. roguesymset - This option may be used to select one of the named symbol sets - found within "symbols" to alter the symbols displayed on the + This option may be used to select one of the named symbol sets + found within "symbols" to alter the symbols displayed on the screen on the rogue level. rlecomp When writing out a save file, perform run length compression of - the map. Not all ports support run length compression. It has + the map. Not all ports support run length compression. It has no effect on reading an existing save file. runmode - Controls the amount of screen updating for the map window when - engaged in multi-turn movement (running via shift+direction or - control+direction and so forth, or via the travel command or + Controls the amount of screen updating for the map window when + engaged in multi-turn movement (running via shift+direction or + control+direction and so forth, or via the travel command or mouse click). The possible values are: teleport - update the map after movement has finished; - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -3969,13 +3969,13 @@ crawl - like walk, but pause briefly after each step. This option only affects the game's screen display, not the ac- - tual results of moving. The default is "run"; versions prior - to 3.4.1 used "teleport" only. Whether or not the effect is + tual results of moving. The default is "run"; versions prior + to 3.4.1 used "teleport" only. Whether or not the effect is noticeable will depend upon the window port used or on the type of terminal. Persistent. safe_pet - Prevent you from (knowingly) attacking your pets (default on). + Prevent you from (knowingly) attacking your pets (default on). Persistent. sanity_check @@ -3983,8 +3983,8 @@ off). Debug mode only. scores - Control what parts of the score list you are shown at the end - (for example "scores:5 top scores/4 around my score/own + Control what parts of the score list you are shown at the end + (for example "scores:5 top scores/4 around my score/own scores"). Only the first letter of each category (`t', `a', or `o') is necessary. Persistent. @@ -3993,9 +3993,9 @@ off). Persistent. showrace - Display yourself as the glyph for your race, rather than the - glyph for your role (default off). Note that this setting af- - fects only the appearance of the display, not the way the game + Display yourself as the glyph for your race, rather than the + glyph for your role (default off). Note that this setting af- + fects only the appearance of the display, not the way the game treats you. Persistent. showscore @@ -4007,20 +4007,20 @@ sortloot Controls the sorting behavior of the pickup lists for inventory - and #loot commands and some others. Persistent. The possible + and #loot commands and some others. Persistent. The possible values are: full - always sort the lists; - loot - only sort the lists that don't use inventory letters, + loot - only sort the lists that don't use inventory letters, like with the #loot and pickup commands; none - show lists the traditional way without sorting. sortpack - Sort the pack contents by type when displaying inventory (de- + Sort the pack contents by type when displaying inventory (de- fault on). Persistent. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4032,40 +4032,40 @@ sparkle Display a sparkly effect when a monster (including yourself) is - hit by an attack to which it is resistant (default on). Per- + hit by an attack to which it is resistant (default on). Per- sistent. standout Boldface monsters and "--More--" (default off). Persistent. statushilites - Controls how many turns status hilite behaviors highlight the - field. If negated or set to zero, disables status hiliting. + Controls how many turns status hilite behaviors highlight the + field. If negated or set to zero, disables status hiliting. See "Configuring Status Hilites" for further information. status_updates - Allow updates to the status lines at the bottom of the screen + Allow updates to the status lines at the bottom of the screen (default true). suppress_alert - This option may be set to a NetHack version level to suppress - alert notification messages about feature changes for that and + This option may be set to a NetHack version level to suppress + alert notification messages about feature changes for that and prior versions (for example "suppress_alert:3.3.1"). symset - This option may be used to select one of the named symbol sets - found within "symbols" to alter the symbols displayed on the - screen. Use "symset:default" to explicitly select the default + This option may be used to select one of the named symbol sets + found within "symbols" to alter the symbols displayed on the + screen. Use "symset:default" to explicitly select the default symbols. time - Show the elapsed game time in turns on bottom line (default + Show the elapsed game time in turns on bottom line (default off). Persistent. timed_delay - When pausing momentarily for display effect, such as with ex- - plosions and moving objects, use a timer rather than sending - extra characters to the screen. (Applies to "tty" interface + When pausing momentarily for display effect, such as with ex- + plosions and moving objects, use a timer rather than sending + extra characters to the screen. (Applies to "tty" interface only; "X11" interface always uses a timer based delay. The de- fault is on if configured into the program.) Persistent. @@ -4075,18 +4075,18 @@ toptenwin Put the ending display in a NetHack window instead of on stdout - (default off). Setting this option makes the score list visi- - ble when a windowing version of NetHack is started without a - parent window, but it no longer leaves the score list around + (default off). Setting this option makes the score list visi- + ble when a windowing version of NetHack is started without a + parent window, but it no longer leaves the score list around after game end on a terminal or emulating window. travel Allow the travel command (default on). Turning this option off - will prevent the game from attempting unintended moves if you + will prevent the game from attempting unintended moves if you make inadvertent mouse clicks on the map window. Persistent. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4097,13 +4097,13 @@ verbose - Provide more commentary during the game (default on). Persis- + Provide more commentary during the game (default on). Persis- tent. whatis_coord - When using the `/' or `;' commands to look around on the map - with autodescribe on, display coordinates after the descrip- - tion. Also works in other situations where you are asked to + When using the `/' or `;' commands to look around on the map + with autodescribe on, display coordinates after the descrip- + tion. Also works in other situations where you are asked to pick a location. The possible settings are: @@ -4120,39 +4120,39 @@ whatis_filter When getting a location on the map, and using the keys to cycle - through next and previous targets, allows filtering the possi- + through next and previous targets, allows filtering the possi- ble targets. n - no filtering [default] v - in view only a - in same area only - The area-filter tries to be slightly predictive -- if you're + The area-filter tries to be slightly predictive -- if you're standing on a doorway, it will consider the area on the side of the door you were last moving towards. - Filtering can also be changed when getting a location with the + Filtering can also be changed when getting a location with the "getpos.filter" key. whatis_menu - When getting a location on the map, and using a key to cycle + When getting a location on the map, and using a key to cycle through next and previous targets, use a menu instead to pick a target. (default off) whatis_moveskip - When getting a location on the map, and using shifted movement + When getting a location on the map, and using shifted movement keys or meta-digit keys to fast-move, instead of moving 8 units at a time, move by skipping the same glyphs. (default off) windowtype When the program has been built to support multiple interfaces, - select which one to use, such as "tty" or "X11" (default de- + select which one to use, such as "tty" or "X11" (default de- pends on build-time settings; use "#version" to check). Cannot be set with the `O' command. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4162,10 +4162,10 @@ - When used, it should be the first option set since its value - might enable or disable the availability of various other op- - tions. For multiple lines in a configuration file, that would - be the first non-comment line. For a comma-separated list in + When used, it should be the first option set since its value + might enable or disable the availability of various other op- + tions. For multiple lines in a configuration file, that would + be the first non-comment line. For a comma-separated list in NETHACKOPTIONS or an OPTIONS line in a configuration file, that would be the rightmost option in the list. @@ -4174,35 +4174,35 @@ off). Debug mode only. zerocomp - When writing out a save file, perform zero-comp compression of - the contents. Not all ports support zero-comp compression. It + When writing out a save file, perform zero-comp compression of + the contents. Not all ports support zero-comp compression. It has no effect on reading an existing save file. 9.5. Window Port Customization options - Here are explanations of the various options that are used - to customize and change the characteristics of the windowtype + Here are explanations of the various options that are used + to customize and change the characteristics of the windowtype that you have chosen. Character strings that are too long may be - truncated. Not all window ports will adjust for all settings - listed here. You can safely add any of these options to your - config file, and if the window port is capable of adjusting to - suit your preferences, it will attempt to do so. If it can't it - will silently ignore it. You can find out if an option is sup- - ported by the window port that you are currently using by check- - ing to see if it shows up in the Options list. Some options are - dynamic and can be specified during the game with the `O' com- + truncated. Not all window ports will adjust for all settings + listed here. You can safely add any of these options to your + config file, and if the window port is capable of adjusting to + suit your preferences, it will attempt to do so. If it can't it + will silently ignore it. You can find out if an option is sup- + ported by the window port that you are currently using by check- + ing to see if it shows up in the Options list. Some options are + dynamic and can be specified during the game with the `O' com- mand. align_message - Where to align or place the message window (top, bottom, left, + Where to align or place the message window (top, bottom, left, or right) align_status - Where to align or place the status window (top, bottom, left, + Where to align or place the status window (top, bottom, left, or right). ascii_map - If NetHack can, it should display an ascii character map if it + If NetHack can, it should display an ascii character map if it can. color @@ -4210,15 +4210,15 @@ monsters, objects, and dungeon features. eight_bit_tty - If NetHack can, it should pass eight-bit character values (for - example, specified with the traps option) straight through to + If NetHack can, it should pass eight-bit character values (for + example, specified with the traps option) straight through to your terminal (default off). font_map if NetHack can, it should use a font by the chosen name for the - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4231,7 +4231,7 @@ map window. font_menu - If NetHack can, it should use a font by the chosen name for + If NetHack can, it should use a font by the chosen name for menu windows. font_message @@ -4243,15 +4243,15 @@ status window. font_text - If NetHack can, it should use a font by the chosen name for + If NetHack can, it should use a font by the chosen name for text windows. font_size_map - If NetHack can, it should use this size font for the map win- + If NetHack can, it should use this size font for the map win- dow. font_size_menu - If NetHack can, it should use this size font for menu windows. + If NetHack can, it should use this size font for menu windows. font_size_message If NetHack can, it should use this size font for the message @@ -4262,29 +4262,29 @@ window. font_size_text - If NetHack can, it should use this size font for text windows. + If NetHack can, it should use this size font for text windows. fullscreen - If NetHack can, it should try and display on the entire screen + If NetHack can, it should try and display on the entire screen rather than in a window. guicolor - Use color text and/or highlighting attributes when displaying - some non-map data (such as menu selector letters). Curses in- + Use color text and/or highlighting attributes when displaying + some non-map data (such as menu selector letters). Curses in- terface only; default is on. large_font If NetHack can, it should use a large font. map_mode - If NetHack can, it should display the map in the manner speci- + If NetHack can, it should display the map in the manner speci- fied. player_selection - If NetHack can, it should pop up dialog boxes, or use prompts + If NetHack can, it should pop up dialog boxes, or use prompts - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4301,27 +4301,27 @@ preload_tiles If NetHack can, it should preload tiles into memory. For exam- - ple, in the protected mode MS-DOS version, control whether - tiles get pre-loaded into RAM at the start of the game. Doing - so enhances performance of the tile graphics, but uses more + ple, in the protected mode MS-DOS version, control whether + tiles get pre-loaded into RAM at the start of the game. Doing + so enhances performance of the tile graphics, but uses more memory. (default on). Cannot be set with the `O' command. scroll_amount - If NetHack can, it should scroll the display by this number of + If NetHack can, it should scroll the display by this number of cells when the hero reaches the scroll_margin. scroll_margin - If NetHack can, it should scroll the display when the hero or - cursor is this number of cells away from the edge of the win- + If NetHack can, it should scroll the display when the hero or + cursor is this number of cells away from the edge of the win- dow. selectsaved - If NetHack can, it should display a menu of existing saved + If NetHack can, it should display a menu of existing saved games for the player to choose from at game startup, if it can. Not all ports support this option. softkeyboard - Display an onscreen keyboard. Handhelds are most likely to + Display an onscreen keyboard. Handhelds are most likely to support this option. splash_screen @@ -4329,28 +4329,28 @@ it starts up (default yes). statuslines - Number of lines for traditional below-the-map status display. - Acceptable values are 2 and 3 (default is 2). Curses and tty + Number of lines for traditional below-the-map status display. + Acceptable values are 2 and 3 (default is 2). Curses and tty interfaces only. term_cols and term_rows - Curses interface only. Number of columns and rows to use for + Curses interface only. Number of columns and rows to use for the display. Curses will attempt to resize to the values spec- - ified but will settle for smaller sizes if they are too big. + ified but will settle for smaller sizes if they are too big. Default is the current window size. tiled_map If NetHack can, it should display a tiled map if it can. tile_file - Specify the name of an alternative tile file to override the + Specify the name of an alternative tile file to override the default. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4361,7 +4361,7 @@ tile_height - Specify the preferred height of each tile in a tile capable + Specify the preferred height of each tile in a tile capable port. tile_width @@ -4416,7 +4416,7 @@ - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4482,7 +4482,7 @@ (default on, PC NetHack only). Cannot be set with the `O' - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4548,7 +4548,7 @@ up_exception option should be followed by a regular expression - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4567,11 +4567,14 @@ < - always pickup an object that matches rest of pattern; > - never pickup an object that matches rest of pattern. - A "never pickup" rule takes precedence over an "always pickup" - rule if both match. + The autopickup_exception rules are processed in the order in + which they appear in your config file, thus allowing a later + rule to override an earlier rule. - Exceptions can be set with the `O' command, but ones set that - way will not be preserved across saves and restores. + Exceptions can be set with the `O' command, but because they + are not included in your config file, they won't be in effect + if you save and then restore your game. autopickup_exception + rules and not saved with the game. Here are some examples: @@ -4579,17 +4582,17 @@ autopickup_exception=">*corpse" autopickup_exception=">* cursed*" - The first example above will result in autopickup of any - type of arrow. The second example results in the exclusion of - any corpse from autopickup. The last example results in the ex- + The first example above will result in autopickup of any + type of arrow. The second example results in the exclusion of + any corpse from autopickup. The last example results in the ex- clusion of items known to be cursed from autopickup. 9.9. Changing Key Bindings - It is possible to change the default key bindings of some - special commands, menu accelerator keys, and extended commands, - by using BIND stanzas in the configuration file. Format is key, - followed by the command to bind to, separated by a colon. The + It is possible to change the default key bindings of some + special commands, menu accelerator keys, and extended commands, + by using BIND stanzas in the configuration file. Format is key, + followed by the command to bind to, separated by a colon. The key can be a single character ("x"), a control key ("^X", "C-x"), a meta key ("M-x"), or a three-digit decimal ASCII code. @@ -4600,21 +4603,18 @@ BIND=v:loot Extended command keys - You can bind multiple keys to the same extended command. Un- - bind a key by using "nothing" as the extended command to bind - to. You can also bind the "", "", and "" + You can bind multiple keys to the same extended command. Un- + bind a key by using "nothing" as the extended command to bind + to. You can also bind the "", "", and "" keys. Menu accelerator keys - The menu control or accelerator keys can also be rebound via - OPTIONS-lines in the config file. You cannot bind object sym- + The menu control or accelerator keys can also be rebound via + OPTIONS-lines in the config file. You cannot bind object sym- bols into menu accelerators. - Special command keys - Below are the special commands you can rebind. Some of them - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4624,13 +4624,15 @@ - can be bound to same keys with no problems, others are in the - same "context", and if bound to same keys, only one of those - commands will be available. Special command can only be bound + Special command keys + Below are the special commands you can rebind. Some of them + can be bound to same keys with no problems, others are in the + same "context", and if bound to same keys, only one of those + commands will be available. Special command can only be bound to a single key. count - Prefix key to start a count, to repeat a command this many + Prefix key to start a count, to repeat a command this many times. With number_pad only. Default is `n'. doinv @@ -4640,19 +4642,19 @@ Prefix key to force fight a direction. Default is `F'. fight.numpad - Prefix key to force fight a direction. With number_pad only. + Prefix key to force fight a direction. With number_pad only. Default is `-'. getdir.help - When asked for a direction, the key to show the help. Default + When asked for a direction, the key to show the help. Default is `?'. getdir.self - When asked for a direction, the key to target yourself. De- + When asked for a direction, the key to target yourself. De- fault is `.'. getdir.self2 - When asked for a direction, the key to target yourself. De- + When asked for a direction, the key to target yourself. De- fault is `s'. getpos.autodescribe @@ -4664,23 +4666,21 @@ esting thing. Default is `a'. getpos.all.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest interesting thing. Default is `A'. getpos.door.next - When asked for a location, the key to go to next closest door + When asked for a location, the key to go to next closest door or doorway. Default is `d'. getpos.door.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest door or doorway. Default is `D'. - getpos.help - When asked for a location, the key to show help. Default is - `?'. - NetHack 3.6 May 7, 2019 + + NetHack 3.6 October 1, 2019 @@ -4690,63 +4690,63 @@ + getpos.help + When asked for a location, the key to show help. Default is + `?'. + getpos.mon.next - When asked for a location, the key to go to next closest mon- + When asked for a location, the key to go to next closest mon- ster. Default is `m'. getpos.mon.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest monster. Default is `M'. getpos.obj.next - When asked for a location, the key to go to next closest ob- + When asked for a location, the key to go to next closest ob- ject. Default is `o'. getpos.obj.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest object. Default is `O'. getpos.menu - When asked for a location, and using one of the next or previ- - ous keys to cycle through targets, toggle showing a menu in- + When asked for a location, and using one of the next or previ- + ous keys to cycle through targets, toggle showing a menu in- stead. Default is `!'. getpos.moveskip - When asked for a location, and using the shifted movement keys - or meta-digit keys to fast-move around, move by skipping the + When asked for a location, and using the shifted movement keys + or meta-digit keys to fast-move around, move by skipping the same glyphs instead of by 8 units. Default is `*'. getpos.filter When asked for a location, change the filtering mode when using - one of the next or previous keys to cycle through targets. - Toggles between no filtering, in view only, and in the same + one of the next or previous keys to cycle through targets. + Toggles between no filtering, in view only, and in the same area only. Default is `"'. getpos.pick - When asked for a location, the key to choose the location, and + When asked for a location, the key to choose the location, and possibly ask for more info. Default is `.'. getpos.pick.once - When asked for a location, the key to choose the location, and + When asked for a location, the key to choose the location, and skip asking for more info. Default is `,'. getpos.pick.quick When asked for a location, the key to choose the location, skip - asking for more info, and exit the location asking loop. De- + asking for more info, and exit the location asking loop. De- fault is `;'. getpos.pick.verbose - When asked for a location, the key to choose the location, and + When asked for a location, the key to choose the location, and show more info without asking. Default is `:'. - getpos.self - When asked for a location, the key to go to your location. De- - fault is `@'. - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4756,24 +4756,28 @@ + getpos.self + When asked for a location, the key to go to your location. De- + fault is `@'. + getpos.unexplored.next - When asked for a location, the key to go to next closest unex- + When asked for a location, the key to go to next closest unex- plored location. Default is `x'. getpos.unexplored.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest unexplored location. Default is `X'. getpos.valid - When asked for a location, the key to go to show valid target + When asked for a location, the key to go to show valid target locations. Default is `$'. getpos.valid.next - When asked for a location, the key to go to next closest valid + When asked for a location, the key to go to next closest valid location. Default is `z'. getpos.valid.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest valid location. Default is `Z'. nopickup @@ -4783,7 +4787,7 @@ Key to redraw the screen. Default is `^R'. redraw.numpad - Key to redraw the screen. With number_pad only. Default is + Key to redraw the screen. With number_pad only. Default is `^L'. repeat @@ -4806,13 +4810,9 @@ rush Prefix key to rush towards a direction. Default is `g'. - 9.10. Configuring Message Types - - You can change the way the messages are shown in the message - area, when the message matches a user-defined pattern. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4822,6 +4822,11 @@ + 9.10. Configuring Message Types + + You can change the way the messages are shown in the message + area, when the message matches a user-defined pattern. + In general, the config file entries to configure the message types look like this: MSGTYPE=type "pattern" @@ -4872,13 +4877,8 @@ ing ampersand. If no attribute is defined, no attribute is used. - The pattern should be a regular expression. - Allowed colors are black, red, green, brown, blue, magenta, - cyan, gray, orange, light-green, yellow, light-blue, light- - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4888,9 +4888,13 @@ - magenta, light-cyan, and white. And no-color, the default - foreground color, which isn't necessarily the same as any of - the other colors. + The pattern should be a regular expression. + + Allowed colors are black, red, green, brown, blue, magenta, + cyan, gray, orange, light-green, yellow, light-blue, light-ma- + genta, light-cyan, and white. And no-color, the default fore- + ground color, which isn't necessarily the same as any of the + other colors. Allowed attributes are none, bold, dim, underline, blink, and inverse. "Normal" is a synonym for "none". Note that the @@ -4938,13 +4942,9 @@ 3.6); pattern - the pattern to match; sound file - the sound file to play; - volume - the volume to be set while playing the sound file. - - The pattern should be a POSIX extended regular expression. - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -4954,10 +4954,14 @@ + volume - the volume to be set while playing the sound file. + + The pattern should be a POSIX extended regular expression. + 9.13. Configuring Status Hilites Your copy of NetHack may have been compiled with support for - "Status Hilites". If so, you can customize your game display by + "Status Hilites". If so, you can customize your game display by setting thresholds to change the color or appearance of fields in the status display. @@ -4965,8 +4969,8 @@ OPTION=hilite_status:field-name/behavior/color&attributes - For example, the following line in your configuration file - will cause the hitpoints field to display in the color red if + For example, the following line in your configuration file + will cause the hitpoints field to display in the color red if your hitpoints drop to or below a threshold of 30%: OPTION=hilite_status:hitpoints/<=30%/red/normal @@ -4974,43 +4978,39 @@ (That example is actually specifying red&normal for <=30% and no- color&normal for >30%.) - For another example, the following line in your configura- - tion file will cause wisdom to be displayed red if it drops and + For another example, the following line in your configura- + tion file will cause wisdom to be displayed red if it drops and green if it rises: OPTION=hilite_status:wisdom/down/red/up/green - Allowed colors are black, red, green, brown, blue, magenta, + Allowed colors are black, red, green, brown, blue, magenta, cyan, gray, orange, light-green, yellow, light-blue, light-magen- - ta, light-cyan, and white. And "no-color", the default fore- + ta, light-cyan, and white. And "no-color", the default fore- ground color on the display, which is not necessarily the same as black or white or any of the other colors. - Allowed attributes are none, bold, dim, underline, blink, - and inverse. "Normal" is a synonym for "none"; they should not + Allowed attributes are none, bold, dim, underline, blink, + and inverse. "Normal" is a synonym for "none"; they should not be used in combination with any of the other attributes. To specify both a color and an attribute, use `&' to combine - them. To specify multiple attributes, use `+' to combine those. + them. To specify multiple attributes, use `+' to combine those. For example: "magenta&inverse+dim". - Note that the display may substitute or ignore particular - attributes depending upon its capabilities, and in general may - interpret the attributes any way it wants. For example, on some + Note that the display may substitute or ignore particular + attributes depending upon its capabilities, and in general may + interpret the attributes any way it wants. For example, on some display systems a request for bold might yield blink or vice ver- sa. On others, issuing an attribute request while another is al- - ready set up will replace the earlier attribute rather than com- - bine with it. Since NetHack issues attribute requests sequen- + ready set up will replace the earlier attribute rather than com- + bine with it. Since NetHack issues attribute requests sequen- tially (at least with the tty interface) rather than all at once, the only way a situation like that can be controlled is to speci- fy just one attribute. - You can adjust the appearance of the following status - fields: - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -5020,6 +5020,8 @@ + You can adjust the appearance of the following status + fields: title dungeon-level experience-level strength gold experience dexterity hitpoints HD @@ -5029,16 +5031,16 @@ charisma armor-class condition alignment score - The pseudo-field "characteristics" can be used to set all six - of Str, Dex, Con, Int, Wis, and Cha at once. "HD" is "hit - dice", an approximation of experience level displayed when - polymorphed. "experience", "time", and "score" are condition- + The pseudo-field "characteristics" can be used to set all six + of Str, Dex, Con, Int, Wis, and Cha at once. "HD" is "hit + dice", an approximation of experience level displayed when + polymorphed. "experience", "time", and "score" are condition- ally displayed depending upon your other option settings. - Instead of a behavior, "condition" takes the following condi- - tion flags: stone, slime, strngl, foodpois, termill, blind, - deaf, stun, conf, hallu, lev, fly, and ride. You can use "ma- - jor_troubles" as an alias for stone through termill, "mi- + Instead of a behavior, "condition" takes the following condi- + tion flags: stone, slime, strngl, foodpois, termill, blind, + deaf, stun, conf, hallu, lev, fly, and ride. You can use "ma- + jor_troubles" as an alias for stone through termill, "mi- nor_troubles" for blind through hallu, "movement" for lev, fly, and ride, and "all" for every condition. @@ -5064,19 +5066,17 @@ when value is below or above the percentage. Use prefix `<' or `>' to match when strictly below or above. (The numeric limit is relaxed slightly for those: >-1% and - <101% are allowed.) Only valid for "hitpoints" and "pow- - er" fields. - - * absolute value sets the attribute when the field value - matches that number. The number must be 0 or higher, ex- - cept for "armor-class' which allows negative values, and - may optionally be preceded by `='. If the number is pre- - ceded by `<=' or `>=' instead, it also matches when value - is below or above. If the prefix is `<' or `>', only - match when strictly above or below. + <101% are allowed.) Only four fields support percentage + rules. Percentages for "hitpoints" and "power" are + straightforward; they're based on the corresponding maxi- + mum field. Percentage highlight rules are also allowed + for "experience level" and "experience points" (valid when + the showexp option is enabled). For those, the percentage + is based on the progress from the start of the current ex- + perience level to the start of the next level. So if - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -5086,16 +5086,32 @@ + level 2 starts at 20 points and level 3 starts at 40 + points, having 30 points is 50% and 35 points is 75%. + 100% is unattainable for experience because you'll gain a + level and the calculations will be reset for that new lev- + el, but a rule for =100% is allowed and matches the spe- + cial case of being exactly 1 experience point short of the + next level. + + * absolute value sets the attribute when the field value + matches that number. The number must be 0 or higher, ex- + cept for "armor-class' which allows negative values, and + may optionally be preceded by `='. If the number is pre- + ceded by `<=' or `>=' instead, it also matches when value + is below or above. If the prefix is `<' or `>', only + match when strictly above or below. + * text match sets the attribute when the field value matches - the text. Text matches can only be used for "alignment", - "carrying-capacity", "hunger", "dungeon-level", and "ti- - tle". For title, only the role's rank title is tested; + the text. Text matches can only be used for "alignment", + "carrying-capacity", "hunger", "dungeon-level", and "ti- + tle". For title, only the role's rank title is tested; the character's name is ignored. - The in-game options menu can help you determine the correct + The in-game options menu can help you determine the correct syntax for a config file. - The whole feature can be disabled by setting option sta- + The whole feature can be disabled by setting option sta- tushilites to 0. Example hilites: @@ -5115,34 +5131,18 @@ NetHack can load entire symbol sets from the symbol file. - The options that are used to select a particular symbol set + The options that are used to select a particular symbol set from the symbol file are: symset Set the name of the symbol set that you want to load. roguesymset - Set the name of the symbol set that you want to load for dis- + Set the name of the symbol set that you want to load for dis- play on the rogue level. - You can also override one or more symbols using the SYMBOLS - config file option. Symbols are specified as name:value pairs. - Note that NetHack escape-processes the value string in conven- - tional C fashion. This means that \ is a prefix to take the fol- - lowing character literally. Thus \ needs to be represented as - \\. The special prefix form \m switches on the meta bit in the - symbol value, and the ^ prefix causes the following character to - be treated as a control character. - NetHack Symbols - Default Symbol Name Description - ------------------------------------------------------------------------ - S_air (air) - _ S_altar (altar) - - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -5152,6 +5152,20 @@ + You can also override one or more symbols using the SYMBOLS + config file option. Symbols are specified as name:value pairs. + Note that NetHack escape-processes the value string in conven- + tional C fashion. This means that \ is a prefix to take the fol- + lowing character literally. Thus \ needs to be represented as + \\. The special prefix form \m switches on the meta bit in the + symbol value, and the ^ prefix causes the following character to + be treated as a control character. + + NetHack Symbols + Default Symbol Name Description + ------------------------------------------------------------------------ + S_air (air) + _ S_altar (altar) " S_amulet (amulet) A S_angel (angelic being) a S_ant (ant or other insect) @@ -5191,6 +5205,19 @@ - S_explode2 (explosion top center) \ S_explode3 (explosion top right) | S_explode4 (explosion middle left) + + + + NetHack 3.6 October 1, 2019 + + + + + + NetHack Guidebook 80 + + + S_explode5 (explosion middle center) | S_explode6 (explosion middle right) \ S_explode7 (explosion bottom left) @@ -5205,19 +5232,6 @@ { S_fountain (fountain) F S_fungus (fungus or mold) * S_gem (gem or rock) - - - - NetHack 3.6 May 7, 2019 - - - - - - NetHack Guidebook 80 - - - S_ghost (ghost) H S_giant (giant humanoid) G S_gnome (gnome) @@ -5257,6 +5271,19 @@ N S_naga (naga) . S_ndoor (doorway without door) n S_nymph (nymph) + + + + NetHack 3.6 October 1, 2019 + + + + + + NetHack Guidebook 81 + + + O S_ogre (ogre) o S_orc (orc) p S_piercer (piercer) @@ -5271,19 +5298,6 @@ = S_ring (ring) ` S_rock (boulder or statue) r S_rodent (rodent) - - - - NetHack 3.6 May 7, 2019 - - - - - - NetHack Guidebook 81 - - - ^ S_rolling_boulder_trap (rolling boulder trap) . S_room (floor of a room) / S_rslant (diagonal beam [zap animation]) @@ -5323,6 +5337,19 @@ # S_tree (tree) T S_troll (troll) | S_trwall (wall) + + + + NetHack 3.6 October 1, 2019 + + + + + + NetHack Guidebook 82 + + + - S_tuwall (wall) U S_umber (umber hulk) u S_unicorn (unicorn or horse) @@ -5337,19 +5364,6 @@ . S_vodbridge (vertical lowered drawbridge) - S_vodoor (open door in vertical wall) v S_vortex (vortex) - - - - NetHack 3.6 May 7, 2019 - - - - - - NetHack Guidebook 82 - - - | S_vwall (vertical wall) / S_wand (wand) } S_water (water) @@ -5364,49 +5378,35 @@ Z S_zombie (zombie) z S_zruty (zruty) - There is one additional class of object, described as - "strange object", which will occasionally be the shape taken on - by mimics and shown as `]' for maps displayed as text characters. - Although the displayed character is the same as the default value - for "S_mimic_def", it is a different symbol and there is no cor- - responding "S_strange_object" symbol nor any way to assign an al- - ternate value for it. - 9.15. Configuring NetHack for Play by the Blind - NetHack can be set up to use only standard ASCII characters - for making maps of the dungeons. This makes the MS-DOS versions - of NetHack completely accessible to the blind who use speech - and/or Braille access technologies. Players will require a good - working knowledge of their screen-reader's review features, and - will have to know how to navigate horizontally and vertically - character by character. They will also find the search capabili- - ties of their screen-readers to be quite valuable. Be certain to - examine this Guidebook before playing so you have an idea what - the screen layout is like. You'll also need to be able to locate - the PC cursor. It is always where your character is located. - Merely searching for an @-sign will not always find your charac- + NetHack can be set up to use only standard ASCII characters + for making maps of the dungeons. This makes the MS-DOS versions + of NetHack completely accessible to the blind who use speech + and/or Braille access technologies. Players will require a good + working knowledge of their screen-reader's review features, and + will have to know how to navigate horizontally and vertically + character by character. They will also find the search capabili- + ties of their screen-readers to be quite valuable. Be certain to + examine this Guidebook before playing so you have an idea what + the screen layout is like. You'll also need to be able to locate + the PC cursor. It is always where your character is located. + Merely searching for an @-sign will not always find your charac- ter since there are other humanoids represented by the same sign. - Your screen-reader should also have a function which gives you - the row and column of your review cursor and the PC cursor. - These co-ordinates are often useful in giving players a better + Your screen-reader should also have a function which gives you + the row and column of your review cursor and the PC cursor. + These co-ordinates are often useful in giving players a better sense of the overall location of items on the screen. - NetHack can also be compiled with support for sending the - game messages to an external program, such as a text-to-speech - synthesizer. If the "#version" extended command shows "external - program as a message handler", your NetHack has been compiled + NetHack can also be compiled with support for sending the + game messages to an external program, such as a text-to-speech + synthesizer. If the "#version" extended command shows "external + program as a message handler", your NetHack has been compiled with the capability. When compiling NetHack from source on Linux - and other POSIX systems, define MSGHANDLER to enable it. To use - the capability, set the environment variable NETHACK_MSGHANDLER - to an executable, which will be executed with the game message as - the program's only parameter. - - While it is not difficult for experienced users to edit the - defaults.nh file to accomplish this, novices may find this task + and other POSIX systems, define MSGHANDLER to enable it. To use - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -5416,20 +5416,26 @@ + the capability, set the environment variable NETHACK_MSGHANDLER + to an executable, which will be executed with the game message as + the program's only parameter. + + While it is not difficult for experienced users to edit the + defaults.nh file to accomplish this, novices may find this task somewhat daunting. Included within the "symbols" file of all of- ficial distributions of NetHack is a symset called NHAccess. Se- - lecting that symset in your configuration file will cause the - game to run in a manner accessible to the blind. After you have - gained some experience with the game and with editing files, you - may want to alter settings via SYMBOLS= in your configuration - file to better suit your preferences. The most crucial settings + lecting that symset in your configuration file will cause the + game to run in a manner accessible to the blind. After you have + gained some experience with the game and with editing files, you + may want to alter settings via SYMBOLS= in your configuration + file to better suit your preferences. The most crucial settings to make the game accessible are: symset:NHAccess Load a symbol set appropriate for use by blind players. roguesymset:NHAccess - Load a symbol set for the rogue level that is appropriate for + Load a symbol set for the rogue level that is appropriate for use by blind players. menustyle:traditional @@ -5439,40 +5445,34 @@ Show menus on a cleared screen and aligned to the left edge. number_pad - A lot of speech access programs use the number-pad to review + A lot of speech access programs use the number-pad to review the screen. If this is the case, disable the number_pad option and use the traditional Rogue-like commands. autodescribe - Automatically describe the terrain under the cursor when tar- + Automatically describe the terrain under the cursor when tar- geting. mention_walls - Give feedback messages when walking towards a wall or when + Give feedback messages when walking towards a wall or when travel command was interrupted. whatis_coord:compass - When targeting with cursor, describe the cursor position with + When targeting with cursor, describe the cursor position with coordinates relative to your character. whatis_filter:area - When targeting with cursor, filter possible locations so only - those in the same area (eg. same room, or same corridor) are + When targeting with cursor, filter possible locations so only + those in the same area (eg. same room, or same corridor) are considered. whatis_moveskip - When targeting with cursor and using fast-move, skip the same + When targeting with cursor and using fast-move, skip the same glyphs instead of moving 8 units at a time. - nostatus_updates - Prevent updates to the status lines at the bottom of the - screen, if your screen-reader reads those lines. The same in- - formation can be seen via the #attributes command. - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -5482,18 +5482,23 @@ + nostatus_updates + Prevent updates to the status lines at the bottom of the + screen, if your screen-reader reads those lines. The same in- + formation can be seen via the #attributes command. + 9.16. Global Configuration for System Administrators - If NetHack is compiled with the SYSCF option, a system ad- - ministrator should set up a global configuration; this is a file + If NetHack is compiled with the SYSCF option, a system ad- + ministrator should set up a global configuration; this is a file in the same format as the traditional per-user configuration file (see above). This file should be named sysconf and placed in the - same directory as the other NetHack support files. The options + same directory as the other NetHack support files. The options recognized in this file are listed below. Any option not set us- - es a compiled-in default (which may not be appropriate for your + es a compiled-in default (which may not be appropriate for your system). - WIZARDS = A space-separated list of user names who are allowed + WIZARDS = A space-separated list of user names who are allowed to play in debug mode (commonly referred to as wizard mode). A value of a single asterisk (*) allows anyone to start a game in debug mode. @@ -5501,20 +5506,20 @@ SHELLERS = A list of users who are allowed to use the shell es- cape command (!). The syntax is the same as WIZARDS. - EXPLORERS = A list of users who are allowed to use the explore + EXPLORERS = A list of users who are allowed to use the explore mode. The syntax is the same as WIZARDS. MAXPLAYERS = Limit the maximum number of games that can be run- ning at the same time. - SUPPORT = A string explaining how to get local support (no de- + SUPPORT = A string explaining how to get local support (no de- fault value). - RECOVER = A string explaining how to recover a game on this + RECOVER = A string explaining how to recover a game on this system (no default value). - SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE - option. When disabled, incubi and succubi behave like nymphs. + SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE + option. When disabled, incubi and succubi behave like nymphs. CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- ARDS, and SHELLERS check for the player name instead of the us- @@ -5531,14 +5536,9 @@ ENTRYMAX = Maximum number of entries in the score file. - POINTSMIN = Minimum number of points to get an entry in the - score file. - - PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- - spectively, to identify unique people for the score file. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -5548,6 +5548,12 @@ + POINTSMIN = Minimum number of points to get an entry in the + score file. + + PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- + spectively, to identify unique people for the score file. + MAX_STATUENAME_RANK = Maximum number of score file entries to use for random statue names (default is 10). @@ -5596,15 +5602,9 @@ falter in fear, aware of their ignorance of the means to survive. Well, fear not. Your dungeon comes equipped with an "explore" or "discovery" mode that enables you to keep old save files and - cheat death, at the paltry cost of not getting on the high score - list. - - There are two ways of enabling explore mode. One is to - start the game with the -X command-line switch or with the play- - mode:explore option. The other is to issue the "#exploremode" - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -5614,6 +5614,12 @@ + cheat death, at the paltry cost of not getting on the high score + list. + + There are two ways of enabling explore mode. One is to + start the game with the -X command-line switch or with the play- + mode:explore option. The other is to issue the "#exploremode" extended command while already playing the game. Starting a new game in explore mode provides your character with a wand of wish- ing in initial inventory; switching during play does not. The @@ -5663,14 +5669,8 @@ in version 1.03g, and went on to produce at least four more ver- sions (3.0, 3.2, 3.51, and 3.6). - R. Black ported PC HACK 3.51 to Lattice C and the Atari - 520/1040ST, producing ST Hack 1.03. - Mike Stephenson merged these various versions back together, - incorporating many of the added features, and produced NetHack - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -5680,63 +5680,63 @@ + R. Black ported PC HACK 3.51 to Lattice C and the Atari + 520/1040ST, producing ST Hack 1.03. + + Mike Stephenson merged these various versions back together, + incorporating many of the added features, and produced NetHack 1.4. He then coordinated a cast of thousands in enhancing and - debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. + debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. Later, Mike coordinated a major rewrite of the game, heading a team which included Ken Arromdee, Jean-Christophe Collet, Steve Creps, Eric Hendrickson, Izchak Miller, John Rupley, Mike Threep- oint, and Janet Walz, to produce NetHack 3.0c. - NetHack 3.0 was ported to the Atari by Eric R. Smith, to - OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three + NetHack 3.0 was ported to the Atari by Eric R. Smith, to + OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three of them and Kevin Darcy later joined the main NetHack Development Team to produce subsequent revisions of 3.0. - Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm - Meluch, Stephen Spackman and Pierre Martineau designed overlay - code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the - Macintosh. Along with various other Dungeoneers, they continued - to enhance the PC, Macintosh, and Amiga ports through the later + Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm + Meluch, Stephen Spackman and Pierre Martineau designed overlay + code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the + Macintosh. Along with various other Dungeoneers, they continued + to enhance the PC, Macintosh, and Amiga ports through the later revisions of 3.0. - Headed by Mike Stephenson and coordinated by Izchak Miller - and Janet Walz, the NetHack Development Team which now included - Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, - Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, + Headed by Mike Stephenson and coordinated by Izchak Miller + and Janet Walz, the NetHack Development Team which now included + Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, + Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Eric Raymond, and Eric Smith undertook a radical revision of 3.0. They re-structured the game's design, and re-wrote major parts of - the code. They added multiple dungeons, a new display, special - individual character quests, a new endgame and many other new + the code. They added multiple dungeons, a new display, special + individual character quests, a new endgame and many other new features, and produced NetHack 3.1. - Ken Lorber, Gregg Wonderly and Greg Olson, with help from - Richard Addison, Mike Passaretti, and Olaf Seibert, developed + Ken Lorber, Gregg Wonderly and Greg Olson, with help from + Richard Addison, Mike Passaretti, and Olaf Seibert, developed NetHack 3.1 for the Amiga. - Norm Meluch and Kevin Smolkowski, with help from Carl Sche- + Norm Meluch and Kevin Smolkowski, with help from Carl Sche- lin, Stephen Spackman, Steve VanDevender, and Paul Winner, ported NetHack 3.1 to the PC. Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike - Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny - Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack + Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny + Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack 3.1 for the Macintosh, porting it for MPW. Building on their de- velopment, Barton House added a Think C port. Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith port- - ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua - Delahunty, was responsible for the VMS version of NetHack 3.1. + ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua + Delahunty, was responsible for the VMS version of NetHack 3.1. Michael Allison ported NetHack 3.1 to Windows NT. - Dean Luick, with help from David Cohrs, developed NetHack - 3.1 for X11. Warwick Allison wrote a tiled version of NetHack - for the Atari; he later contributed the tiles to the NetHack De- - velopment Team and tile support was then added to other plat- - forms. - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -5746,63 +5746,63 @@ + Dean Luick, with help from David Cohrs, developed NetHack + 3.1 for X11. Warwick Allison wrote a tiled version of NetHack + for the Atari; he later contributed the tiles to the NetHack De- + velopment Team and tile support was then added to other plat- + forms. + The 3.2 NetHack Development Team, comprised of Michael Alli- son, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Er- - ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released + ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released version 3.2 in April of 1996. Version 3.2 marked the tenth anniversary of the formation of - the development team. In a testament to their dedication to the - game, all thirteen members of the original NetHack Development - Team remained on the team at the start of work on that release. - During the interval between the release of 3.1.3 and 3.2, one of - the founding members of the NetHack Development Team, Dr. Izchak - Miller, was diagnosed with cancer and passed away. That release - of the game was dedicated to him by the development and porting + the development team. In a testament to their dedication to the + game, all thirteen members of the original NetHack Development + Team remained on the team at the start of work on that release. + During the interval between the release of 3.1.3 and 3.2, one of + the founding members of the NetHack Development Team, Dr. Izchak + Miller, was diagnosed with cancer and passed away. That release + of the game was dedicated to him by the development and porting teams. During the lifespan of NetHack 3.1 and 3.2, several enthusi- - asts of the game added their own modifications to the game and + asts of the game added their own modifications to the game and made these "variants" publicly available: - Tom Proudfoot and Yuval Oren created NetHack++, which was - quickly renamed NetHack--. Working independently, Stephen White - wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and + Tom Proudfoot and Yuval Oren created NetHack++, which was + quickly renamed NetHack--. Working independently, Stephen White + wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and his own NetHack-- to produce SLASH. Larry Stewart-Zerba and War- - wick Allison improved the spell casting system with the Wizard - Patch. Warwick Allison also ported NetHack to use the Qt inter- + wick Allison improved the spell casting system with the Wizard + Patch. Warwick Allison also ported NetHack to use the Qt inter- face. - Warren Cheung combined SLASH with the Wizard Patch to pro- - duce Slash'EM, and with the help of Kevin Hugo, added more fea- - tures. Kevin later joined the NetHack Development Team and in- + Warren Cheung combined SLASH with the Wizard Patch to pro- + duce Slash'EM, and with the help of Kevin Hugo, added more fea- + tures. Kevin later joined the NetHack Development Team and in- corporated the best of these ideas in NetHack 3.3. The final update to 3.2 was the bug fix release 3.2.3, which - was released simultaneously with 3.3.0 in December 1999 just in + was released simultaneously with 3.3.0 in December 1999 just in time for the Year 2000. - The 3.3 NetHack Development Team, consisting of Michael Al- - lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, - Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- - ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet - Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 + The 3.3 NetHack Development Team, consisting of Michael Al- + lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, + Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- + ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet + Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 in August of 2000. Version 3.3 offered many firsts. It was the first version to - separate race and profession. The Elf class was removed in pref- + separate race and profession. The Elf class was removed in pref- erence to an elf race, and the races of dwarves, gnomes, and orcs - made their first appearance in the game alongside the familiar - human race. Monk and Ranger roles joined Archeologists, Barbar- - ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, - Tourists, Valkyries and of course, Wizards. It was also the - first version to allow you to ride a steed, and was the first - version to have a publicly available web-site listing all the - bugs that had been discovered. Despite that constantly growing + made their first appearance in the game alongside the familiar - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -5812,40 +5812,46 @@ - bug list, 3.3 proved stable enough to last for more than a year + human race. Monk and Ranger roles joined Archeologists, Barbar- + ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, + Tourists, Valkyries and of course, Wizards. It was also the + first version to allow you to ride a steed, and was the first + version to have a publicly available web-site listing all the + bugs that had been discovered. Despite that constantly growing + bug list, 3.3 proved stable enough to last for more than a year and a half. - The 3.4 NetHack Development Team initially consisted of - Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin - Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet - Walz, and Paul Winner, with Warwick Allison joining just before + The 3.4 NetHack Development Team initially consisted of + Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin + Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet + Walz, and Paul Winner, with Warwick Allison joining just before the release of NetHack 3.4.0 in March 2002. - As with version 3.3, various people contributed to the game + As with version 3.3, various people contributed to the game as a whole as well as supporting ports on the different platforms that NetHack runs on: Pat Rankin maintained 3.4 for VMS. - Michael Allison maintained NetHack 3.4 for the MS-DOS plat- + Michael Allison maintained NetHack 3.4 for the MS-DOS plat- form. Paul Winner and Yitzhak Sapir provided encouragement. - Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- + Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- hanced the Macintosh port of 3.4. - Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, - and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft + Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, + and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft Windows platform. Alex Kompel contributed a new graphical inter- - face for the Windows port. Alex Kompel also contributed a Win- + face for the Windows port. Alex Kompel also contributed a Win- dows CE port for 3.4.1. Ron Van Iwaarden was the sole maintainer of NetHack for OS/2 - the past several releases. Unfortunately Ron's last OS/2 machine - stopped working in early 2006. A great many thanks to Ron for + the past several releases. Unfortunately Ron's last OS/2 machine + stopped working in early 2006. A great many thanks to Ron for keeping NetHack alive on OS/2 all these years. - Janne Salmijarvi and Teemu Suikki maintained and enhanced - the Amiga port of 3.4 after Janne Salmijarvi resurrected it for + Janne Salmijarvi and Teemu Suikki maintained and enhanced + the Amiga port of 3.4 after Janne Salmijarvi resurrected it for 3.3.1. Christian "Marvin" Bressler maintained 3.4 for the Atari af- @@ -5854,21 +5860,15 @@ The release of NetHack 3.4.3 in December 2003 marked the be- ginning of a long release hiatus. 3.4.3 proved to be a remarkably stable version that provided continued enjoyment by the community - for more than a decade. The NetHack Development Team 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 + for more than a decade. The NetHack Development Team slowly and + quietly continued to work on the game behind the scenes during + the tenure of 3.4.3. It was during that same period that several new variants emerged within the NetHack community. Notably sporkhack by Derek S. Ray, unnethack by Patric Mueller, nitrohack - and its successors originally by Daniel Thaler and then by Alex - Smith, and Dynahack by Tung Nguyen. Some of those variants con- - tinue to be developed, maintained, and enjoyed by the community - to this day. - - In September 2014, an interim snapshot of the code under de- - velopment was released publicly by other parties. Since that code + and its successors originally by Daniel Thaler and then by Alex - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -5878,63 +5878,63 @@ - was a work-in-progress and had not gone through the process of - debugging it as a suitable release, it was decided that the ver- - sion numbers present on that code snapshot would be retired and - never used in an official NetHack release. An announcement was - posted on the NetHack Development Team's official nethack.org - website to that effect, stating that there would never be a + Smith, and Dynahack by Tung Nguyen. Some of those variants con- + tinue to be developed, maintained, and enjoyed by the community + to this day. + + In September 2014, an interim snapshot of the code under de- + velopment was released publicly by other parties. Since that code + was a work-in-progress and had not gone through the process of + debugging it as a suitable release, it was decided that the ver- + sion numbers present on that code snapshot would be retired and + never used in an official NetHack release. An announcement was + posted on the NetHack Development Team's official nethack.org + website to that effect, stating that there would never be a 3.4.4, 3.5, or 3.5.0 official release version. - In January 2015, preparation began for the release of + In January 2015, preparation began for the release of NetHack 3.6. - At the beginning of development for what would eventually - get released as 3.6.0, the NetHack Development Team consisted of - Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, - Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- - son, Janet Walz, and Paul Winner. In early 2015, ahead of the + At the beginning of development for what would eventually + get released as 3.6.0, the NetHack Development Team consisted of + Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, + Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- + son, Janet Walz, and Paul Winner. In early 2015, ahead of the release of 3.6.0, new members Sean Hunt, Pasi Kallinen, and Derek S. Ray joined the NetHack Development Team. Near the end of the development of 3.6.0, one of the signif- - icant inspirations for many of the humorous and fun features - found in the game, author Terry Pratchett, passed away. NetHack + icant inspirations for many of the humorous and fun features + found in the game, author Terry Pratchett, passed away. NetHack 3.6.0 introduced a tribute to him. 3.6.0 was released in December 2015, and merged work done by - the development team since the release of 3.4.3 with some of the + the development team since the release of 3.4.3 with some of the beloved community patches. Many bugs were fixed and some code was restructured. - The NetHack Development Team, as well as Steve VanDevender + The NetHack Development Team, as well as Steve VanDevender and Kevin Smolkowski, ensured that NetHack 3.6 continued to oper- ate on various UNIX flavors and maintained the X11 interface. - Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- + Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- tained the port of NetHack 3.6 for Mac OSX. - Michael Allison, David Cohrs, Barton House, Pasi Kallinen, - Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- + Michael Allison, David Cohrs, Barton House, Pasi Kallinen, + Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- tained the port of NetHack 3.6 for Microsoft Windows. - Pat Rankin attempted to keep the VMS port running for + Pat Rankin attempted to keep the VMS port running for NetHack 3.6, hindered by limited access. Kevin Smolkowski has up- - dated and tested it for the most recent version of OpenVMS (V8.4 + dated 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. - Ray Chason resurrected the msdos port for 3.6 and contrib- + Ray Chason resurrected the msdos port for 3.6 and contrib- uted the necessary updates to the community at large. - In late April 2018, several hundred bug fixes for 3.6.0 and - some new features were assembled and released as NetHack 3.6.1. - The NetHack Development Team at the time of release of 3.6.1 con- - sisted of Warwick Allison, Michael Allison, Ken Arromdee, David - Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -5944,11 +5944,16 @@ - Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike + In late April 2018, several hundred bug fixes for 3.6.0 and + some new features were assembled and released as NetHack 3.6.1. + The NetHack Development Team at the time of release of 3.6.1 con- + sisted of Warwick Allison, Michael Allison, Ken Arromdee, David + Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, + Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz, and Paul Winner. In early May 2019, another 320 bug fixes along with some en- - hancements and the adopted curses window port, were released as + hancements and the adopted curses window port, were released as 3.6.2. The official NetHack web site is maintained by Ken Lorber at @@ -5957,12 +5962,12 @@ 12.1. SPECIAL THANKS On behalf of the NetHack community, thank you very much once - again to M. Drew Streib and Pasi Kallinen for providing a public - NetHack server at nethack.alt.org. Thanks to Keith Simpson and + again to M. Drew Streib and Pasi Kallinen for providing a public + NetHack server at nethack.alt.org. Thanks to Keith Simpson and Andy Thomson for hardfought.org. Thanks to all those unnamed dun- - geoneers who invest their time and effort into annual NetHack - tournaments such as Junethack, The November NetHack Tournament - and in days past, devnull.net (gone for now, but not forgotten). + geoneers who invest their time and effort into annual NetHack + tournaments such as Junethack, The November NetHack Tournament + and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - @@ -5992,15 +5997,10 @@ David Gentzel Kevin Darcy Ron Van Iwaarden David Hairston Kevin Hugo Ronnen Miller Dean Luick Kevin Sitze Ross Brown - Del Lamb Kevin Smolkowski Sascha Wostmann - Derek S. Ray Kevin Sweet Scott Bigham - Deron Meranda Lars Huttar Scott R. Turner - Dion Nicolaas Leon Arnott Sean Hunt - Dylan O'Donnell M. Drew Streib Stephen Spackman - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 @@ -6010,6 +6010,11 @@ + Del Lamb Kevin Smolkowski Sascha Wostmann + Derek S. Ray Kevin Sweet Scott Bigham + Deron Meranda Lars Huttar Scott R. Turner + Dion Nicolaas Leon Arnott Sean Hunt + Dylan O'Donnell M. Drew Streib Stephen Spackman Eric Backus Malcolm Ryan Stefan Thielscher Eric Hendrickson Mark Gooderum Stephen White Eric R. Smith Mark Modrall Steve Creps @@ -6061,12 +6066,7 @@ - - - - - - NetHack 3.6 May 7, 2019 + NetHack 3.6 October 1, 2019 From c10bd97e1a9b21b91f48b60f274d68048edd6d2f Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 2 Oct 2019 14:55:28 -0400 Subject: [PATCH 005/529] more orc obj init --- src/mkmaze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mkmaze.c b/src/mkmaze.c index cd7b52369..5d8b1e5e8 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -675,7 +675,7 @@ struct monst *mtmp; goldprob = is_captain ? 600 : 300; gemprob = goldprob / 4; if (rn2(1000) < goldprob) { - if ((otmp = mksobj(GOLD_PIECE, FALSE, FALSE)) != 0) { + if ((otmp = mksobj(GOLD_PIECE, TRUE, FALSE)) != 0) { otmp->quan = 1L + rnd(goldprob); otmp->owt = weight(otmp); add_to_minv(mtmp, otmp); From 5400c6796ac3e7bde8210098a427082241c344bb Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 2 Oct 2019 14:58:21 -0400 Subject: [PATCH 006/529] yet more orc obj init --- src/mkmaze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mkmaze.c b/src/mkmaze.c index 5d8b1e5e8..999d5af9d 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -691,7 +691,7 @@ struct monst *mtmp; } if (is_captain || !rn2(8)) { otyp = shiny_obj(RING_CLASS); - if (otyp != STRANGE_OBJECT && (otmp = mksobj(otyp, FALSE, FALSE)) != 0) + if (otyp != STRANGE_OBJECT && (otmp = mksobj(otyp, TRUE, FALSE)) != 0) add_to_minv(mtmp, otmp); } } From 455c3fbf620b497c3fd1622fa01d0fc55875f1e2 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 2 Oct 2019 15:22:14 -0400 Subject: [PATCH 007/529] update README.linux closes #118 --- sys/unix/README.linux | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/unix/README.linux b/sys/unix/README.linux index ec28d1000..64c73674c 100644 --- a/sys/unix/README.linux +++ b/sys/unix/README.linux @@ -61,7 +61,15 @@ If you have problems, send us some email. nethack-bugs@nethack.org +Recommended steps: +1. cd sys/unix +2. sh setup.sh hints/linux +3. cd ../.. +4. make all; su; make install + + +The older instructions are retained below... Steps used to build this binary release, in addition to the basic instructions found in sys/unix/Install.unx. The step numbers below @@ -69,7 +77,7 @@ correspond to the step numbers in sys/unix/Install.unx. System: gcc-3.2, XFree86-libs-4.2.1, ncurses-5.2, glibc-2.3.2 (GLIBC_2.3) -3. Edit include/config.h and include/unixconf.h +1. Edit include/config.h and include/unixconf.h config.h: define X11_GRAPHICS window support. define USE_XPM support. define COMPRESS as /bin/gzip as that is where it @@ -80,12 +88,12 @@ System: gcc-3.2, XFree86-libs-4.2.1, ncurses-5.2, glibc-2.3.2 (GLIBC_2.3) unixconf.h: define LINUX define TIMED_DELAY -6. Makefile.src: define modern, non-BSD Linux and linux options throughout +2. Makefile.src: define modern, non-BSD Linux and linux options throughout CC = gcc LFLAGS = -L/usr/X11R6/lib WINSRC = $(WINTTYSRC) $(WINX11SRC) WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) - WINTTYLIB = /usr/lib/libncurses.a + WINTTYLIB = -lncurses WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 WINLIB = $(WINTTYLIB) $(WINX11LIB) @@ -96,7 +104,7 @@ System: gcc-3.2, XFree86-libs-4.2.1, ncurses-5.2, glibc-2.3.2 (GLIBC_2.3) YACC = bison -y LEX = flex -7. Makefile.top: GAMEGRP = games +3. Makefile.top: GAMEGRP = games GAMEPERM = 02755 FILEPERM = 0664 EXEPERM = 0755 @@ -105,5 +113,5 @@ System: gcc-3.2, XFree86-libs-4.2.1, ncurses-5.2, glibc-2.3.2 (GLIBC_2.3) make all; su; make install -9. Additional step: As discussed in win/X11/Install.X11, convert nh10.bdf +4. Additional step: As discussed in win/X11/Install.X11, convert nh10.bdf and ibm.bdf to proper font files and place in font path. From d9a1bbb2030035463f740a277acfc9faa29e1eae Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 3 Oct 2019 15:45:43 -0700 Subject: [PATCH 008/529] fix #H9269 - potential panic due to window slots A couple of early returns could result in temporary windows getting left around instead of being released for re-use, which in turn might lead to a panic due to lack of available window slots. The first one is accompanied by an 'impossible' warning which no one has ever reported and the second one could only happen if data file 'keyhelp' was missing, so panic due to either of these is hypothetical as far as released versions go. Somebody making modifications could run afoul of either of them though. query_category() - switch from early return to 'goto' so that the temporary window used for a menu will always be destroyed; whatdoes_help() - defer creating the display window until after the data file has been successfully opened so that early return won't need any window cleanup. --- doc/fixes36.3 | 8 +++++++- src/pager.c | 5 +++-- src/pickup.c | 12 ++++++++---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 55d8d28a9..4c3bd945e 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.116 $ $NHDT-Date: 1569276988 2019/09/23 22:16:28 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.121 $ $NHDT-Date: 1570142734 2019/10/03 22:45:34 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -157,6 +157,12 @@ uarmh null pointer dereference if a helm of opposite alignment came off due verb tense was inappropriate in some messages when a mon/pet had a name ending in 's' orctown booty items should have been initialized in mksobj() +query_category() and whatdoes_help() had early returns which could each leave + a temporary window around, which in turn might eventually lead to a + panic due to lack of window slots [probably moot for unmodified 3.6.x; + the query one couldn't happen unless there is a coding error for + object classes somewhere and the help one couldn't happen unless the + installed data files left 'keyhelp' missing] Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/pager.c b/src/pager.c index 96abfef26..86dad4414 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pager.c $NHDT-Date: 1562632673 2019/07/09 00:37:53 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.154 $ */ +/* NetHack 3.6 pager.c $NHDT-Date: 1570142734 2019/10/03 22:45:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.156 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1575,7 +1575,7 @@ whatdoes_help() { dlb *fp; char *p, buf[BUFSZ]; - winid tmpwin = create_nhwindow(NHW_TEXT); + winid tmpwin; fp = dlb_fopen(KEYHELP, "r"); if (!fp) { @@ -1583,6 +1583,7 @@ whatdoes_help() display_nhwindow(WIN_MESSAGE, TRUE); return; } + tmpwin = create_nhwindow(NHW_TEXT); while (dlb_fgets(buf, (int) sizeof buf, fp)) { if (*buf == '#') continue; diff --git a/src/pickup.c b/src/pickup.c index ab8d5f069..16473747e 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pickup.c $NHDT-Date: 1562203851 2019/07/04 01:30:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.229 $ */ +/* NetHack 3.6 pickup.c $NHDT-Date: 1570142736 2019/10/03 22:45:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.234 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1063,11 +1063,13 @@ int how; /* type of query */ if (curr) { *pick_list = (menu_item *) alloc(sizeof(menu_item)); (*pick_list)->item.a_int = curr->oclass; - return 1; + n = 1; } else { debugpline0("query_category: no single object match"); + n = 0; } - return 0; + /* early return is ok; there's no temp window yet */ + return n; } win = create_nhwindow(NHW_MENU); @@ -1120,7 +1122,8 @@ int how; /* type of query */ pack++; if (invlet >= 'u') { impossible("query_category: too many categories"); - return 0; + n = 0; + goto query_done; } } while (*pack); @@ -1180,6 +1183,7 @@ int how; /* type of query */ } end_menu(win, qstr); n = select_menu(win, how, pick_list); + query_done: destroy_nhwindow(win); if (n < 0) n = 0; /* caller's don't expect -1 */ From 8fa38ec8fb2b9c26cc3b95c46ae7748f60f14540 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 4 Oct 2019 15:16:51 -0700 Subject: [PATCH 009/529] fix 'b&c distance' sanity check warning when attempting to crawl out of water fails and hero is life-saved or wizard-/explore-mode player declines to die. If the hero is saved by positioning him/her one step further away from ball and chain, teleds() tries to drag them, but if 'emergency disrobe' left the hero stressed or worse, dragging fails. Ball and chain were being left where they were, with chain no longer being adjacent to hero. If drag_ball() fails, have teleds() teleport ball and chain to hero's new spot, same as when that isn't within range of a one step drag. --- doc/fixes36.3 | 9 +++++++-- src/teleport.c | 13 +++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 4c3bd945e..ea0ebba13 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.121 $ $NHDT-Date: 1570142734 2019/10/03 22:45:34 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.122 $ $NHDT-Date: 1570227405 2019/10/04 22:16:45 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -163,6 +163,11 @@ query_category() and whatdoes_help() had early returns which could each leave the query one couldn't happen unless there is a coding error for object classes somewhere and the help one couldn't happen unless the installed data files left 'keyhelp' missing] +ball and chain could end up too far from punished hero (triggering b&c warning + for wizard mode with sanity checking active) when crawling out of + water failed because dropping stuff left hero overly encumbered and + hero was life saved--or player declined to die--if the hero got + teleported one step further from ball and chain's current location Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository @@ -170,7 +175,7 @@ Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository elemental_clog() loop needed to guard against obliteration of the monster that was trying to be placed using ^G to create "hidden mimic" shouldn't have marked it as undetected since - mimics 'hide' be appearing to be something else; honor "hidden" for + mimics 'hide' by appearing to be something else; honor "hidden" for 'hides_under' creatures if/when created at location with object(s), also for eels and other fish if/when created at water location for wizard mode 'wizweight' option, glob weight wasn't shown unless glob had diff --git a/src/teleport.c b/src/teleport.c index 9c2bd66f5..1e51ab1be 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 teleport.c $NHDT-Date: 1564771880 2019/08/02 18:51:20 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.92 $ */ +/* NetHack 3.6 teleport.c $NHDT-Date: 1570227405 2019/10/04 22:16:45 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.93 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -305,9 +305,9 @@ boolean allow_drag; * rock in the way), in which case it teleports the ball on its own. */ if (ball_active) { - if (!carried(uball) && distmin(nux, nuy, uball->ox, uball->oy) <= 2) + if (!carried(uball) && distmin(nux, nuy, uball->ox, uball->oy) <= 2) { ball_still_in_range = TRUE; /* don't have to move the ball */ - else { + } else { /* have to move the ball */ if (!allow_drag || distmin(u.ux, u.uy, nux, nuy) > 1) { /* we should not have dist > 1 and allow_drag at the same @@ -344,8 +344,13 @@ boolean allow_drag; boolean cause_delay; if (drag_ball(nux, nuy, &bc_control, &ballx, &bally, &chainx, - &chainy, &cause_delay, allow_drag)) + &chainy, &cause_delay, allow_drag)) { move_bc(0, bc_control, ballx, bally, chainx, chainy); + } else { + /* dragging fails if hero is encumbered beyond 'burdened' */ + allow_drag = FALSE; /* teleport b&c to hero's new spot */ + unplacebc(); /* to match placebc() below */ + } } } /* must set u.ux, u.uy after drag_ball(), which may need to know From f3bc5e5c78b67064551137091f5c41703aa4fb03 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 4 Oct 2019 16:12:08 -0700 Subject: [PATCH 010/529] fix #H9272 - "object lost" panic when polymorph causes loss of levitation boots or water walking boots while over water. If discarding stuff while trying to crawl out got rid of the taken-off boots, they wouldn't be in inventory any more when break_armor() tried to drop them after taking them off. --- doc/fixes36.3 | 5 ++++- src/polyself.c | 52 ++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index ea0ebba13..d39eff5c6 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.122 $ $NHDT-Date: 1570227405 2019/10/04 22:16:45 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.123 $ $NHDT-Date: 1570230710 2019/10/04 23:11:50 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -168,6 +168,9 @@ ball and chain could end up too far from punished hero (triggering b&c warning water failed because dropping stuff left hero overly encumbered and hero was life saved--or player declined to die--if the hero got teleported one step further from ball and chain's current location +avoid 'object lost' panic when polymorph causes loss of levitation boots or + water walking boots which dumps hero into water where emergency + disrobing/dropping in order to crawl out chooses to drop those boots Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/polyself.c b/src/polyself.c index 3f33c8e9b..ab84a7e18 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 polyself.c $NHDT-Date: 1559664952 2019/06/04 16:15:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.133 $ */ +/* NetHack 3.6 polyself.c $NHDT-Date: 1570230710 2019/10/04 23:11:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.134 $ */ /* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ @@ -23,6 +23,7 @@ STATIC_DCL void FDECL(check_strangling, (BOOLEAN_P)); STATIC_DCL void FDECL(polyman, (const char *, const char *)); +STATIC_DCL void FDECL(dropp, (struct obj *)); STATIC_DCL void NDECL(break_armor); STATIC_DCL void FDECL(drop_weapon, (int)); STATIC_DCL int FDECL(armor_to_dragon, (int)); @@ -858,6 +859,33 @@ int mntmp; return 1; } +/* dropx() jacket for break_armor() */ +STATIC_OVL void +dropp(obj) +struct obj *obj; +{ + struct obj *otmp; + + /* + * Dropping worn armor while polymorphing might put hero into water + * (loss of levitation boots or water walking boots that the new + * form can't wear), where emergency_disrobe() could remove it from + * inventory. Without this, dropx() could trigger an 'object lost' + * panic. Right now, boots are the only armor which might encounter + * this situation, but handle it for all armor. + * + * Hypothetically, 'obj' could have merged with something (not + * applicable for armor) and no longer be a valid pointer, so scan + * inventory for it instead of trusting obj->where. + */ + for (otmp = invent; otmp; otmp = otmp->nobj) { + if (otmp == obj) { + dropx(obj); + break; + } + } +} + STATIC_OVL void break_armor() { @@ -876,7 +904,7 @@ break_armor() if (otmp->oartifact) { Your("%s falls off!", cloak_simple_name(otmp)); (void) Cloak_off(); - dropx(otmp); + dropp(otmp); } else { Your("%s tears apart!", cloak_simple_name(otmp)); (void) Cloak_off(); @@ -893,7 +921,7 @@ break_armor() cancel_don(); Your("armor falls around you!"); (void) Armor_gone(); - dropx(otmp); + dropp(otmp); } if ((otmp = uarmc) != 0) { if (is_whirly(youmonst.data)) @@ -901,7 +929,7 @@ break_armor() else You("shrink out of your %s!", cloak_simple_name(otmp)); (void) Cloak_off(); - dropx(otmp); + dropp(otmp); } if ((otmp = uarmu) != 0) { if (is_whirly(youmonst.data)) @@ -909,7 +937,7 @@ break_armor() else You("become much too small for your shirt!"); setworn((struct obj *) 0, otmp->owornmask & W_ARMU); - dropx(otmp); + dropp(otmp); } } if (has_horns(youmonst.data)) { @@ -927,7 +955,7 @@ break_armor() Your("%s falls to the %s!", helm_simple_name(otmp), surface(u.ux, u.uy)); (void) Helmet_off(); - dropx(otmp); + dropp(otmp); } } } @@ -939,12 +967,12 @@ break_armor() You("drop your gloves%s!", uwep ? " and weapon" : ""); drop_weapon(0); (void) Gloves_off(); - dropx(otmp); + dropp(otmp); } if ((otmp = uarms) != 0) { You("can no longer hold your shield!"); (void) Shield_off(); - dropx(otmp); + dropp(otmp); } if ((otmp = uarmh) != 0) { if (donning(otmp)) @@ -952,7 +980,7 @@ break_armor() Your("%s falls to the %s!", helm_simple_name(otmp), surface(u.ux, u.uy)); (void) Helmet_off(); - dropx(otmp); + dropp(otmp); } } if (nohands(youmonst.data) || verysmall(youmonst.data) @@ -966,7 +994,7 @@ break_armor() Your("boots %s off your feet!", verysmall(youmonst.data) ? "slide" : "are pushed"); (void) Boots_off(); - dropx(otmp); + dropp(otmp); } } } @@ -1019,6 +1047,10 @@ int alone; updateinv = FALSE; else if (candropwep) dropx(otmp); + /* [note: dropp vs dropx -- if heart of ahriman is wielded, we + might be losing levitation by dropping it; but that won't + happen until the drop, unlike Boots_off() dumping hero into + water and triggering emergency_disrobe() before dropx()] */ if (updateinv) update_inventory(); From f11f4de057d0aca3c843825e55a1d783c90705c2 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 4 Oct 2019 16:37:14 -0700 Subject: [PATCH 011/529] sortloot of tools Fix the first part of github issue 229. sortloot_classify() tries to group musical instruments separately from other tools, but missing 'break' in a 'switch' prevented that from happening--they were mixed together. Since that grouping isn't documented anywhere, only source divers would ever notice that it wasn't working as intended. --- doc/fixes36.3 | 4 +++- src/invent.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index d39eff5c6..5ea4594cc 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.123 $ $NHDT-Date: 1570230710 2019/10/04 23:11:50 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.124 $ $NHDT-Date: 1570232224 2019/10/04 23:37:04 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -171,6 +171,8 @@ ball and chain could end up too far from punished hero (triggering b&c warning avoid 'object lost' panic when polymorph causes loss of levitation boots or water walking boots which dumps hero into water where emergency disrobing/dropping in order to crawl out chooses to drop those boots +'sortloot's attempt to group musical instruments separately from other tools + didn't work as intended due to missing 'break' in sortloot_classify() Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/invent.c b/src/invent.c index 1f8bae8c4..01c252b89 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 invent.c $NHDT-Date: 1567213892 2019/08/31 01:11:32 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.262 $ */ +/* NetHack 3.6 invent.c $NHDT-Date: 1570232224 2019/10/04 23:37:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.263 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -141,8 +141,10 @@ struct obj *obj; case DRUM_OF_EARTHQUAKE: case HORN_OF_PLENTY: /* not a musical instrument */ k = 3; /* instrument or unknown horn of plenty */ + break; default: k = 4; /* 'other' tool */ + break; } break; case FOOD_CLASS: From c6b7540712edfde8495bd3a41b018aa0d8a1eecc Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 4 Oct 2019 17:28:32 -0700 Subject: [PATCH 012/529] potion mixing - healing vs "bad" potions Another part of github issue 229, mixtype() didn't have either 'break' or '/*FALLTHRU*/' separating healing from extra healing, extra healing from full healing, and full healing from unicorn horn. So dipping "bad" potions (sickness, confusion, blindness, hallucination) into healing/extra healing/full healing or vice versa operated the same as dipping a unicorn horn into the bad potion (producing fruit juice for sickness and water for the others). It wasn't clear from the code whether or not that was intentional. It actually seems reasonable (albeit suboptimal use of {plain, extra, full} healing), so continue to allow it and make the code clear that it's intentional. --- src/potion.c | 54 ++++++++++++++++++++++------------------------------ 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/src/potion.c b/src/potion.c index 18c6b584f..728fdc9e4 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 potion.c $NHDT-Date: 1560850774 2019/06/18 09:39:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.162 $ */ +/* NetHack 3.6 potion.c $NHDT-Date: 1570235292 2019/10/05 00:28:12 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.163 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1769,41 +1769,33 @@ STATIC_OVL short mixtype(o1, o2) register struct obj *o1, *o2; { + int o1typ = o1->otyp, o2typ = o2->otyp; + /* cut down on the number of cases below */ if (o1->oclass == POTION_CLASS - && (o2->otyp == POT_GAIN_LEVEL || o2->otyp == POT_GAIN_ENERGY - || o2->otyp == POT_HEALING || o2->otyp == POT_EXTRA_HEALING - || o2->otyp == POT_FULL_HEALING || o2->otyp == POT_ENLIGHTENMENT - || o2->otyp == POT_FRUIT_JUICE)) { - struct obj *swp; - - swp = o1; - o1 = o2; - o2 = swp; + && (o2typ == POT_GAIN_LEVEL || o2typ == POT_GAIN_ENERGY + || o2typ == POT_HEALING || o2typ == POT_EXTRA_HEALING + || o2typ == POT_FULL_HEALING || o2typ == POT_ENLIGHTENMENT + || o2typ == POT_FRUIT_JUICE)) { + /* swap o1 and o2 */ + o1typ = o2->otyp; + o2typ = o1->otyp; } - switch (o1->otyp) { + switch (o1typ) { case POT_HEALING: - switch (o2->otyp) { - case POT_SPEED: - case POT_GAIN_LEVEL: - case POT_GAIN_ENERGY: + if (o2typ == POT_SPEED) return POT_EXTRA_HEALING; - } + /*FALLTHRU*/ case POT_EXTRA_HEALING: - switch (o2->otyp) { - case POT_GAIN_LEVEL: - case POT_GAIN_ENERGY: - return POT_FULL_HEALING; - } case POT_FULL_HEALING: - switch (o2->otyp) { - case POT_GAIN_LEVEL: - case POT_GAIN_ENERGY: - return POT_GAIN_ABILITY; - } + if (o2typ == POT_GAIN_LEVEL || o2typ == POT_GAIN_ENERGY) + return (o1typ == POT_HEALING) ? POT_EXTRA_HEALING + : (o1typ == POT_EXTRA_HEALING) ? POT_FULL_HEALING + : POT_GAIN_ABILITY; + /*FALLTHRU*/ case UNICORN_HORN: - switch (o2->otyp) { + switch (o2typ) { case POT_SICKNESS: return POT_FRUIT_JUICE; case POT_HALLUCINATION: @@ -1813,12 +1805,12 @@ register struct obj *o1, *o2; } break; case AMETHYST: /* "a-methyst" == "not intoxicated" */ - if (o2->otyp == POT_BOOZE) + if (o2typ == POT_BOOZE) return POT_FRUIT_JUICE; break; case POT_GAIN_LEVEL: case POT_GAIN_ENERGY: - switch (o2->otyp) { + switch (o2typ) { case POT_CONFUSION: return (rn2(3) ? POT_BOOZE : POT_ENLIGHTENMENT); case POT_HEALING: @@ -1834,7 +1826,7 @@ register struct obj *o1, *o2; } break; case POT_FRUIT_JUICE: - switch (o2->otyp) { + switch (o2typ) { case POT_SICKNESS: return POT_SICKNESS; case POT_ENLIGHTENMENT: @@ -1846,7 +1838,7 @@ register struct obj *o1, *o2; } break; case POT_ENLIGHTENMENT: - switch (o2->otyp) { + switch (o2typ) { case POT_LEVITATION: if (rn2(3)) return POT_GAIN_LEVEL; From 8443f73265c296c551ae26610c5e61ac794021e6 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 4 Oct 2019 17:53:01 -0700 Subject: [PATCH 013/529] glob pricing get_pricing_units() returns a long, so use long for intermediate steps of the calculation. Part of github issue 229, about mixing signed and unsigned. --- src/shk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shk.c b/src/shk.c index f5c42bacd..5fcc70c99 100644 --- a/src/shk.c +++ b/src/shk.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 shk.c $NHDT-Date: 1558124088 2019/05/17 20:14:48 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.163 $ */ +/* NetHack 3.6 shk.c $NHDT-Date: 1570236762 2019/10/05 00:52:42 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.168 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2035,11 +2035,11 @@ struct obj *obj; if (obj->globby) { /* globs must be sold by weight not by volume */ - int unit_weight = (int) objects[obj->otyp].oc_weight, - wt = (obj->owt > 0) ? obj->owt : weight(obj); + long unit_weight = (long) objects[obj->otyp].oc_weight, + wt = (obj->owt > 0) ? (long) obj->owt : (long) weight(obj); if (unit_weight) - units = wt / unit_weight; + units = (wt + unit_weight - 1L) / unit_weight; } return units; } From a9e8348dfad8b1a70c42ff10c49231bd91967476 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 4 Oct 2019 23:55:49 -0700 Subject: [PATCH 014/529] no-return usage in dlb_main.c More from github issue 229: mark routines in util/dlb_main.c which don't return as such and add some 'break' statements for compilers that don't have support for that. --- util/dlb_main.c | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/util/dlb_main.c b/util/dlb_main.c index 2af5bbe92..120de616c 100644 --- a/util/dlb_main.c +++ b/util/dlb_main.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 dlb_main.c $NHDT-Date: 1432512785 2015/05/25 00:13:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */ +/* NetHack 3.6 dlb_main.c $NHDT-Date: 1570258542 2019/10/05 06:55:42 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.13 $ */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1993. */ /* NetHack may be freely redistributed. See license for details. */ @@ -15,7 +15,7 @@ #endif static void FDECL(grow_ld, (libdir **, int *, int)); -static void FDECL(xexit, (int)); +static void FDECL(xexit, (int)) NORETURN; #ifdef DLB #ifdef DLBLIB @@ -31,10 +31,9 @@ char *FDECL(eos, (char *)); /* also used by dlb.c */ FILE *FDECL(fopen_datafile, (const char *, const char *)); static void FDECL(Write, (int, char *, long)); -static void NDECL(usage); -static void NDECL(verbose_help); -static void FDECL(write_dlb_directory, - (int, int, libdir *, long, long, long)); +static void NDECL(usage) NORETURN; +static void NDECL(verbose_help) NORETURN; +static void FDECL(write_dlb_directory, (int, int, libdir *, long, long, long)); static char default_progname[] = "dlb"; static char *progname = default_progname; @@ -84,12 +83,13 @@ usage() (void) printf(" default library is %s\n", library_file); (void) printf(" default list file is %s\n", list_file); xexit(EXIT_FAILURE); + /*NOTREACHED*/ } static void verbose_help() { - static const char *long_help[] = { + static const char *const long_help[] = { "", "dlb COMMANDoptions args... files...", " commands:", " dlb ? print this text", " dlb h ditto", " dlb x extract all files", " dlb c create the archive", @@ -100,11 +100,12 @@ verbose_help() " C dir change directory before processing any files", "", (char *) 0 }; - const char **str; + const char *const *str; for (str = long_help; *str; str++) (void) printf("%s\n", *str); usage(); + /*NOTREACHED*/ } static void @@ -180,11 +181,14 @@ char **argv; switch (argv[1][cp]) { default: usage(); /* doesn't return */ + /*NOTREACHED*/ + break; case '-': /* silently ignore */ break; case '?': case 'h': verbose_help(); + /*NOTREACHED*/ break; case 'I': if (ap == argc) @@ -243,7 +247,9 @@ char **argv; default: printf("Internal error - action.\n"); xexit(EXIT_FAILURE); + /*NOTREACHED*/ break; + case 't': /* list archive */ if (!open_library(library_file, &lib)) { printf("Can't open dlb file\n"); @@ -263,7 +269,8 @@ char **argv; lib.nentries, lib.strsize); close_library(&lib); - xexit(EXIT_SUCCESS); + /* xexit(EXIT_SUCCESS); */ + break; case 'x': { /* extract archive contents */ int f, n; @@ -331,7 +338,8 @@ char **argv; } close_library(&lib); - xexit(EXIT_SUCCESS); + /* xexit(EXIT_SUCCESS); */ + break; } case 'c': /* create archive */ @@ -403,8 +411,8 @@ char **argv; } /* open output file */ - out = - open(library_file, O_RDWR | O_TRUNC | O_BINARY | O_CREAT, FCMASK); + out = open(library_file, + O_RDWR | O_TRUNC | O_BINARY | O_CREAT, FCMASK); if (out < 0) { printf("Can't open %s for output\n", library_file); xexit(EXIT_FAILURE); @@ -462,9 +470,10 @@ char **argv; free((genericptr_t) ld), ldlimit = 0; (void) close(out); - xexit(EXIT_SUCCESS); - } - } + /* xexit(EXIT_SUCCESS); */ + break; + } /* case 'c' */ + } /* switch */ #endif /* DLBLIB */ #endif /* DLB */ @@ -540,6 +549,7 @@ int retcd; #endif #endif exit(retcd); + /*NOTREACHED*/ } #ifdef AMIGA From f7bf56555e56e05dd62893b62f70ada90595a865 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 5 Oct 2019 16:42:13 -0700 Subject: [PATCH 015/529] fix pull request #227 - running over engravings Fixes #227 Travel, , all stop on engravings, but told the player what the engraving said and kept going. The message output is buffered until map update or another message, so player couldn't tell where hero was at the time the engraving got shown. Make running stop on engravings. --- doc/fixes36.3 | 6 +++++- src/engrave.c | 20 ++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 5ea4594cc..0ca806da6 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.124 $ $NHDT-Date: 1570232224 2019/10/04 23:37:04 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.125 $ $NHDT-Date: 1570318925 2019/10/05 23:42:05 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -173,6 +173,10 @@ avoid 'object lost' panic when polymorph causes loss of levitation boots or disrobing/dropping in order to crawl out chooses to drop those boots 'sortloot's attempt to group musical instruments separately from other tools didn't work as intended due to missing 'break' in sortloot_classify() + running told player about engravings as they were being moved + over but buffered output didn't show it until hero stopped, so it + wasn't possible to tell where they were, unlike all other forms of + multiple movement; stop running if/when an engraving is reached Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/engrave.c b/src/engrave.c index d127c4495..a1fa986e4 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 engrave.c $NHDT-Date: 1456304550 2016/02/24 09:02:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.61 $ */ +/* NetHack 3.6 engrave.c $NHDT-Date: 1570318925 2019/10/05 23:42:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.75 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -314,7 +314,6 @@ int x, y; { register struct engr *ep = engr_at(x, y); int sensed = 0; - char buf[BUFSZ]; /* Sensing an engraving does not require sight, * nor does it necessarily imply comprehension (literacy). @@ -363,17 +362,22 @@ int x, y; impossible("%s is written in a very strange way.", Something); sensed = 1; } + if (sensed) { - char *et; - unsigned maxelen = BUFSZ - sizeof("You feel the words: \"\". "); - if (strlen(ep->engr_txt) > maxelen) { - (void) strncpy(buf, ep->engr_txt, (int) maxelen); + char *et, buf[BUFSZ]; + int maxelen = (int) (sizeof buf + /* sizeof "literal" counts terminating \0 */ + - sizeof "You feel the words: \"\"."); + + if ((int) strlen(ep->engr_txt) > maxelen) { + (void) strncpy(buf, ep->engr_txt, maxelen); buf[maxelen] = '\0'; et = buf; - } else + } else { et = ep->engr_txt; + } You("%s: \"%s\".", (Blind) ? "feel the words" : "read", et); - if (context.run > 1) + if (context.run > 0) nomul(0); } } From 0d76f68f2c233c18eebf16d6e5f2afce2f7c0726 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 5 Oct 2019 16:49:34 -0700 Subject: [PATCH 016/529] tty xputc() Another part of github issue 227. Casting a function pointer when passing it to another function is iffy when lying about the return type. tputs() expects a routine which returns int, so give it one. Other xputc() usage is equivalent to putchar(), so define xputc() with the same function signature as that has. The tputs() declarations in system.h should probably be changed (third argument is a function which takes an int rather than unspecified parameters) but I've left them alone. I made that change to tputs() in sys/share/tclib.c though. NT and MSDOS changes are untested. tclib.c compiles ok with clang- as-gcc on OSX but hasn't been tested with the port that uses it (VMS). --- include/wintty.h | 11 +------- sys/msdos/video.c | 13 ++++++---- sys/share/tclib.c | 9 ++++--- sys/winnt/nttty.c | 10 +++++--- sys/winnt/stubs.c | 6 ++--- win/tty/termcap.c | 64 +++++++++++++++++++++++------------------------ 6 files changed, 54 insertions(+), 59 deletions(-) diff --git a/include/wintty.h b/include/wintty.h index 4863d6e10..a42ed22d4 100644 --- a/include/wintty.h +++ b/include/wintty.h @@ -114,16 +114,7 @@ E void FDECL(tty_startup, (int *, int *)); #ifndef NO_TERMS E void NDECL(tty_shutdown); #endif -#if defined(apollo) -/* Apollos don't widen old-style function definitions properly -- they try to - * be smart and use the prototype, or some such strangeness. So we have to - * define UNWIDENDED_PROTOTYPES (in tradstdc.h), which makes CHAR_P below a - * char. But the tputs termcap call was compiled as if xputc's argument - * actually would be expanded. So here, we have to make an exception. */ -E void FDECL(xputc, (int)); -#else -E void FDECL(xputc, (CHAR_P)); -#endif +E int FDECL(xputc, (int)); E void FDECL(xputs, (const char *)); #if defined(SCREEN_VGA) || defined(SCREEN_8514) E void FDECL(xputg, (int, int, unsigned)); diff --git a/sys/msdos/video.c b/sys/msdos/video.c index 76002cdf6..1429ade16 100644 --- a/sys/msdos/video.c +++ b/sys/msdos/video.c @@ -571,8 +571,10 @@ const char *s; } } -void xputc(ch) /* write out character (and attribute) */ -char ch; +/* same signature as 'putchar()' with potential failure result ignored */ +int +xputc(ch) /* write out character (and attribute) */ +int ch; { int i; char attribute; @@ -591,16 +593,17 @@ char ch; vesa_xputc(ch, attribute); #endif /*SCREEN_VESA*/ } + return 0; } -void xputg(glyphnum, ch, - special) /* write out a glyph picture at current location */ +/* write out a glyph picture at current location */ +void xputg(glyphnum, ch, special) int glyphnum; int ch; unsigned special; { if (!iflags.grmode || !iflags.tile_view) { - xputc((char) ch); + (void) xputc((char) ch); #ifdef SCREEN_VGA } else if (iflags.grmode && iflags.usevga) { vga_xputg(glyphnum, ch, special); diff --git a/sys/share/tclib.c b/sys/share/tclib.c index c158741e5..b47f41815 100644 --- a/sys/share/tclib.c +++ b/sys/share/tclib.c @@ -27,7 +27,7 @@ int FDECL(tgetnum, (const char *)); char *FDECL(tgetstr, (const char *, char **)); char *FDECL(tgoto, (const char *, int, int)); char *FDECL(tparam, (const char *, char *, int, int, int, int, int)); -void FDECL(tputs, (const char *, int, int (*)())); +void FDECL(tputs, (const char *, int, int (*)(int))); /* local support data */ static char *tc_entry; @@ -502,9 +502,10 @@ int row, col, row2, col2; /* send a string to the terminal, possibly padded with trailing NULs */ void tputs(string, range, output_func) -const char *string; /* characters to output */ -int range; /* number of lines affected, used for `*' delays */ -int (*output_func)(); /* actual output routine; return value ignored */ +const char *string; /* characters to output */ +int range; /* number of lines affected, used for `*' delays */ +int FDECL((*output_func),(int)); /* actual output routine; + * return value ignored */ { register int c, num = 0; register const char *p = string; diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 3233dc9cb..60d9db128 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -530,12 +530,14 @@ int x, y; set_console_cursor(x, y); } -void +/* same signature as 'putchar()' with potential failure result ignored */ +int xputc(ch) -char ch; +int ch; { set_console_cursor(ttyDisplay->curx, ttyDisplay->cury); - xputc_core(ch); + xputc_core((char) ch); + return 0; } void @@ -543,7 +545,7 @@ xputs(s) const char *s; { int k; - int slen = strlen(s); + int slen = (int) strlen(s); if (ttyDisplay) set_console_cursor(ttyDisplay->curx, ttyDisplay->cury); diff --git a/sys/winnt/stubs.c b/sys/winnt/stubs.c index ca7313b5b..fa4a9361c 100644 --- a/sys/winnt/stubs.c +++ b/sys/winnt/stubs.c @@ -82,11 +82,11 @@ int mode; return; } -void +int xputc(ch) -char ch; +int ch; { - return; + return 0; } void diff --git a/win/tty/termcap.c b/win/tty/termcap.c index 9e0a76eb9..0e256ee91 100644 --- a/win/tty/termcap.c +++ b/win/tty/termcap.c @@ -495,12 +495,10 @@ tty_end_screen() /* Cursor movements */ /* Note to overlay tinkerers. The placement of this overlay controls the - location - of the function xputc(). This function is not currently in trampoli.[ch] - files for what is deemed to be performance reasons. If this define is - moved - and or xputc() is taken out of the ROOT overlay, then action must be taken - in trampoli.[ch]. */ + location of the function xputc(). This function is not currently in + trampoli.[ch] files for what is deemed to be performance reasons. If + this define is moved and or xputc() is taken out of the ROOT overlay, + then action must be taken in trampoli.[ch]. */ void nocmov(x, y) @@ -528,7 +526,7 @@ int x, y; cmov(x, y); } else { while ((int) ttyDisplay->cury < y) { - xputc('\n'); + (void) xputc('\n'); ttyDisplay->curx = 0; ttyDisplay->cury++; } @@ -561,16 +559,27 @@ register int x, y; ttyDisplay->curx = x; } -/* See note above. xputc() is a special function. */ -void +/* See note above. xputc() is a special function for overlays. */ +int xputc(c) -#if defined(apollo) - int c; -#else - char c; -#endif +int c; /* actually char, but explicitly specify its widened type */ { - (void) putchar(c); + /* + * Note: xputc() as a direct all to putchar() doesn't make any + * sense _if_ putchar() is a function. But if it is a macro, an + * overlay configuration would want to avoid hidden code bloat + * from multiple putchar() expansions. And it gets passed as an + * argument to tputs() so we have to guarantee an actual function + * (while possibly lacking ANSI's (func) syntax to override macro). + * + * xputc() used to be declared as 'void xputc(c) char c; {}' but + * avoiding the proper type 'int' just to avoid (void) casts when + * ignoring the result can't have been sufficent reason to add it. + * It also had '#if apollo' conditional to have the arg be int. + * Matching putchar()'s declaration and using explicit casts where + * warranted is more robust, so we're just a jacket around that. + */ + return putchar(c); } void @@ -579,13 +588,9 @@ const char *s; { #ifndef TERMLIB (void) fputs(s, stdout); -#else -#if defined(NHSTDC) || defined(ULTRIX_PROTO) - tputs(s, 1, (int (*) ()) xputc); #else tputs(s, 1, xputc); #endif -#endif } void @@ -599,7 +604,7 @@ cl_end() /* this looks terrible, especially on a slow terminal but is better than nothing */ while (cx < CO) { - xputc(' '); + (void) xputc(' '); cx++; } tty_curs(BASE_WINDOW, (int) ttyDisplay->curx + 1, @@ -754,25 +759,18 @@ tty_delay_output() /* BUG: if the padding character is visible, as it is on the 5620 then this looks terrible. */ if (flags.null) { + tputs( #ifdef TERMINFO -/* cbosgd!cbcephus!pds for SYS V R2 */ -#ifdef NHSTDC - tputs("$<50>", 1, (int (*) ()) xputc); + "$<50>", #else - tputs("$<50>", 1, xputc); -#endif -#else -#if defined(NHSTDC) || defined(ULTRIX_PROTO) - tputs("50", 1, (int (*) ()) xputc); -#else - tputs("50", 1, xputc); -#endif + "50", #endif + 1, xputc); } else if (ospeed > 0 && ospeed < SIZE(tmspc10) && nh_CM) { /* delay by sending cm(here) an appropriate number of times */ register int cmlen = - strlen(tgoto(nh_CM, ttyDisplay->curx, ttyDisplay->cury)); + (int) strlen(tgoto(nh_CM, ttyDisplay->curx, ttyDisplay->cury)); register int i = 500 + tmspc10[ospeed] / 2; while (i > 0) { @@ -794,7 +792,7 @@ cl_eos() /* free after Robert Viduya */ while (cy <= LI - 2) { cl_end(); - xputc('\n'); + (void) xputc('\n'); cy++; } cl_end(); From 57d87db92cf6a9ccde7717889661adb01bff59c6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 5 Oct 2019 22:17:48 -0400 Subject: [PATCH 017/529] tty condition_size() name and return value the return value from condition_size() was unused so eliminate an unused variable warning and rename the function to better reflect that it updates tty_status[NOW][BL_CONDITION].lth --- win/tty/wintty.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 85c1ca59d..09fe76470 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -206,7 +206,7 @@ STATIC_DCL boolean FDECL(check_fields, (BOOLEAN_P, int *)); STATIC_DCL void NDECL(render_status); STATIC_DCL void FDECL(tty_putstatusfield, (const char *, int, int)); STATIC_DCL boolean NDECL(check_windowdata); -STATIC_DCL int NDECL(condition_size); +STATIC_DCL void NDECL(set_condition_length); STATIC_DCL int FDECL(make_things_fit, (BOOLEAN_P)); STATIC_DCL void FDECL(shrink_enc, (int)); STATIC_DCL void FDECL(shrink_dlvl, (int)); @@ -3615,7 +3615,7 @@ char *posbar; * and tries a few different ways to squish a representation * of the status window values onto the 80 column tty display. * ->check_fields() - * ->condition_size() - get the width of all conditions + * ->set_condition_length() - update the width of conditions * ->shrink_enc() - shrink encumbrance message word * ->shrink_dlvl() - reduce the width of Dlvl:42 * @@ -3969,7 +3969,7 @@ STATIC_OVL int make_things_fit(force_update) boolean force_update; { - int trycnt, fitting = 0, condsz, requirement; + int trycnt, fitting = 0, requirement; int rowsz[3], num_rows, condrow, otheroptions = 0; num_rows = (iflags.wc2_statuslines < 3) ? 2 : 3; @@ -3979,7 +3979,7 @@ boolean force_update; shrink_enc(0); if (dlvl_shrinklvl > 0) shrink_dlvl(0); - condsz = condition_size(); + set_condition_length(); for (trycnt = 0; trycnt < 6 && !fitting; ++trycnt) { /* FIXME: this remeasures each line every time even though it is only attempting to shrink one of them and the other one @@ -3997,7 +3997,7 @@ boolean force_update; if (trycnt < 2) { if (cond_shrinklvl < trycnt + 1) { cond_shrinklvl = trycnt + 1; - condsz = condition_size(); + set_condition_length(); } continue; } @@ -4219,13 +4219,12 @@ int x, y; } /* caller must set cond_shrinklvl (0..2) before calling us */ -STATIC_OVL int -condition_size() +STATIC_OVL void +set_condition_length() { long mask; - int c, lth; + int c, lth = 0; - lth = 0; if (tty_condition_bits) { for (c = 0; c < SIZE(conditions); ++c) { mask = conditions[c].mask; @@ -4234,7 +4233,6 @@ condition_size() } } tty_status[NOW][BL_CONDITION].lth = lth; - return lth; } STATIC_OVL void From 193f8c39bd84f77555d4414ace84a2b210849765 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 6 Oct 2019 09:07:49 -0400 Subject: [PATCH 018/529] clear up some reported curses warnings --- win/curses/cursdial.c | 1 + win/curses/cursinit.c | 2 +- win/curses/cursmesg.c | 2 +- win/curses/cursmisc.c | 13 ++++++------- win/curses/cursstat.c | 3 +++ 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/win/curses/cursdial.c b/win/curses/cursdial.c index 0df4921fb..0dea1d26e 100644 --- a/win/curses/cursdial.c +++ b/win/curses/cursdial.c @@ -392,6 +392,7 @@ curses_ext_cmd() extwin = newwin(1, w - 2, y0 + 1, x0 + 1); if (w - 4 < maxlen) maxlen = w - 4; + nhUse(h); /* needed only to give getmaxyx three arguments */ } else { curses_get_window_xy(MESSAGE_WIN, &winx, &winy); curses_get_window_size(MESSAGE_WIN, &messageh, &messagew); diff --git a/win/curses/cursinit.c b/win/curses/cursinit.c index de8730fb5..594849ae2 100644 --- a/win/curses/cursinit.c +++ b/win/curses/cursinit.c @@ -462,7 +462,7 @@ curses_choose_character() tmpchoice[count] = toupper(tmpchoice[count]); } - sprintf(choice, "%s%s", choice, tmpchoice); + strcat(choice, tmpchoice); /* prevent an unnecessary prompt */ rigid_role_checks(); diff --git a/win/curses/cursmesg.c b/win/curses/cursmesg.c index dfca09397..f55085c8a 100644 --- a/win/curses/cursmesg.c +++ b/win/curses/cursmesg.c @@ -202,7 +202,7 @@ curses_block(boolean noscroll) /* noscroll - blocking because of msgtype prev_x = mx, prev_y = my; blink = 0; } - moreattr = !iflags.wc2_guicolor ? A_REVERSE : NONE; + moreattr = !iflags.wc2_guicolor ? (int) A_REVERSE : NONE; curses_toggle_color_attr(win, MORECOLOR, moreattr, ON); if (blink) { wattron(win, A_BLINK); diff --git a/win/curses/cursmisc.c b/win/curses/cursmisc.c index 1eb42fa1e..80ff91c65 100644 --- a/win/curses/cursmisc.c +++ b/win/curses/cursmisc.c @@ -40,13 +40,18 @@ static int parse_escape_sequence(void); int curses_read_char() { - int ch, tmpch; + int ch; +#if defined(ALT_0) || defined(ALT_9) || defined(ALT_A) || defined(ALT_Z) + int tmpch; +#endif /* cancel message suppression; all messages have had a chance to be read */ curses_got_input(); ch = getch(); +#if defined(ALT_0) || defined(ALT_9) || defined(ALT_A) || defined(ALT_Z) tmpch = ch; +#endif ch = curses_convert_keys(ch); if (ch == 0) { @@ -372,7 +377,6 @@ curses_str_remainder(const char *str, int width, int line_num) int strsize = strlen(str) + 1; #if __STDC_VERSION__ >= 199901L char substr[strsize]; - char curstr[strsize]; char tmpstr[strsize]; strcpy(substr, str); @@ -381,7 +385,6 @@ curses_str_remainder(const char *str, int width, int line_num) #define BUFSZ 256 #endif char substr[BUFSZ * 2]; - char curstr[BUFSZ * 2]; char tmpstr[BUFSZ * 2]; if (strsize > (BUFSZ * 2) - 1) { @@ -409,10 +412,6 @@ curses_str_remainder(const char *str, int width, int line_num) if (last_space == 0) { /* No spaces found */ last_space = count - 1; } - for (count = 0; count < last_space; count++) { - curstr[count] = substr[count]; - } - curstr[count] = '\0'; if (substr[count] == '\0') { break; } diff --git a/win/curses/cursstat.c b/win/curses/cursstat.c index 664b9e31e..69f0f758c 100644 --- a/win/curses/cursstat.c +++ b/win/curses/cursstat.c @@ -228,6 +228,7 @@ draw_status() curs_reset_windows(TRUE, TRUE); win = curses_get_nhwin(STATUS_WIN); } + nhUse(ax); /* getmaxyx macro isn't sufficient */ } werase(win); @@ -513,6 +514,7 @@ boolean border; conditions would go if they were on this line */ condstart += (cap_and_hunger == 2) ? spacing[BL_CAP] : (cap_and_hunger == 0) ? 1 : 0; + nhUse(conddummy); /* getyx needed 3 args */ } if (!(cap_and_hunger & 1)) continue; @@ -533,6 +535,7 @@ boolean border; t = (width - (border ? 0 : 1)) - (ex - 1); ebuf[max(t, 2)] = '\0'; /* might still wrap... */ } + nhUse(ey); /* getyx needed 3 args */ } break; case BL_SCORE: From 80d3abcf00a4d521f9c02a39860cd2aa7a2f9374 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 6 Oct 2019 17:30:18 -0700 Subject: [PATCH 019/529] fix github pull request #26 - validating #explore Fixes #26 Report stated that the attempt to look up the player's username (on Unix) failed (reason unknown) and nethack refused to allow the player to execute the #explore command even though sysconf was set to use character names (CHECK_PLNAME=1) instead of user names. Setting EXPLORERS to "*" overcomes this glitch, but the fix moves a bit of code around to honor CHECK_PLNAME before fetching username so that that isn't necessary. I ended up doing some formattng clean up (replace tabs with spaces, whitespace cleanup in 'port_insert_pastebuf()'). The actual change to fix #26 is only a few lines. --- doc/fixes36.3 | 4 +++- sys/unix/unixmain.c | 49 +++++++++++++++++++++++---------------------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 0ca806da6..f9781a9a8 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.125 $ $NHDT-Date: 1570318925 2019/10/05 23:42:05 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.126 $ $NHDT-Date: 1570408209 2019/10/07 00:30:09 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -209,6 +209,8 @@ tty: revert the attempt to fix "message line anomaly: if autodecribe feedback wrapped to second line, the wrapped portion wasn't erased when a shorter line was shown or getpos was dismissed" because it disrupted prompts that spanned more than one line, a more significant issue +unix: sysconf CHECK_PLNAME=1 wouldn't work if attempt to obtain unix username + failed even though it didn't need that username Platform- and/or Interface-Specific Fixes or Features diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index 50610d43c..92cf02863 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 unixmain.c $NHDT-Date: 1432512788 2015/05/25 00:13:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.52 $ */ +/* NetHack 3.6 unixmain.c $NHDT-Date: 1570408210 2019/10/07 00:30:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.70 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -117,7 +117,7 @@ char *argv[]; if (argcheck(argc, argv, ARG_DEBUG) == 1) { argc--; argv++; - } + } if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') { /* avoid matching "-dec" for DECgraphics; since the man page @@ -262,7 +262,7 @@ char *argv[]; * First, try to find and restore a save file for specified character. * We'll return here if new game player_selection() renames the hero. */ -attempt_restore: + attempt_restore: /* * getlock() complains and quits if there is already a game @@ -531,8 +531,8 @@ whoami() { /* * Who am i? Algorithm: 1. Use name as specified in NETHACKOPTIONS - * 2. Use $USER or $LOGNAME (if 1. fails) - * 3. Use getlogin() (if 2. fails) + * 2. Use $USER or $LOGNAME (if 1. fails) + * 3. Use getlogin() (if 2. fails) * The resulting name is overridden by command line options. * If everything fails, or if the resulting name is some generic * account like "games", "play", "player", "hack" then eventually @@ -654,17 +654,17 @@ char *optstr; struct passwd *pw = get_unix_pw(); int pwlen; char *eop, *w; - char *pwname; + char *pwname = 0; if (optstr[0] == '*') return TRUE; /* allow any user */ - if (!pw) - return FALSE; if (sysopt.check_plname) pwname = plname; - else + else if ((pw = get_unix_pw()) != 0) pwname = pw->pw_name; - pwlen = strlen(pwname); + if (!pwname || !*pwname) + return FALSE; + pwlen = (int) strlen(pwname); eop = eos(optstr); w = optstr; while (w + pwlen <= eop) { @@ -722,7 +722,6 @@ get_login_name() struct passwd *pw = get_unix_pw(); buf[0] = '\0'; - if (pw) (void)strcpy(buf, pw->pw_name); @@ -739,31 +738,33 @@ char *buf; /* This should be replaced when there is a Cocoa port. */ const char *errfmt; size_t len; - FILE *PB = popen("/usr/bin/pbcopy","w"); - if(!PB){ - errfmt = "Unable to start pbcopy (%d)\n"; - goto error; + FILE *PB = popen("/usr/bin/pbcopy", "w"); + + if (!PB) { + errfmt = "Unable to start pbcopy (%d)\n"; + goto error; } len = strlen(buf); /* Remove the trailing \n, carefully. */ - if(buf[len-1] == '\n') len--; + if (buf[len - 1] == '\n') + len--; /* XXX Sorry, I'm too lazy to write a loop for output this short. */ - if(len!=fwrite(buf,1,len,PB)){ - errfmt = "Error sending data to pbcopy (%d)\n"; - goto error; + if (len != fwrite(buf, 1, len, PB)) { + errfmt = "Error sending data to pbcopy (%d)\n"; + goto error; } - if(pclose(PB)!=-1){ - return; + if (pclose(PB) != -1) { + return; } errfmt = "Error finishing pbcopy (%d)\n"; -error: - raw_printf(errfmt,strerror(errno)); + error: + raw_printf(errfmt, strerror(errno)); } -#endif +#endif /* __APPLE__ */ unsigned long sys_random_seed() From 659b3ce9a732fcabb6a1397a82dfdbed1ae9a570 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 7 Oct 2019 14:44:32 -0700 Subject: [PATCH 020/529] more unix username (#26 - validating #explore) I had this in place at one point but must have accidentally undone it before deciding that yesterday's patch was finished. Defer fetching 'pw' until it's needed. --- sys/unix/unixmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index 92cf02863..7e0fcd94a 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -651,7 +651,7 @@ boolean check_user_string(optstr) char *optstr; { - struct passwd *pw = get_unix_pw(); + struct passwd *pw; int pwlen; char *eop, *w; char *pwname = 0; From 2172c5e7ff40ea073e2749a0f7034db9e6a7f835 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 7 Oct 2019 22:02:26 -0400 Subject: [PATCH 021/529] more github 229 warning --- win/tty/wintty.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 09fe76470..c7e7e290a 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -4211,11 +4211,15 @@ int x, y; text++; } } - } else { - /* Now we're truncating */ - if (truncation_expected) - ; /* but we knew in advance */ } +#if 0 + else { + if (truncation_expected) { + /* Now we're truncating */ + ; /* but we knew in advance */ + } + } +#endif } /* caller must set cond_shrinklvl (0..2) before calling us */ From e92445810f7ec8b9d5afc7730e2cf3d26e209b43 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 8 Oct 2019 19:44:51 +0300 Subject: [PATCH 022/529] Fix ball and chain sanity Scatter did not consider the ball or chain, and moved them around, causing ball and chain sanity error. One way to trigger was being punished, with chain on a land mine and having a monster trigger the mine. Now the chain will shatter, unpunishing the hero. --- doc/fixes36.3 | 1 + src/explode.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index f9781a9a8..71572a441 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -177,6 +177,7 @@ avoid 'object lost' panic when polymorph causes loss of levitation boots or over but buffered output didn't show it until hero stopped, so it wasn't possible to tell where they were, unlike all other forms of multiple movement; stop running if/when an engraving is reached +fix exploding land mine moving ball or chain and causing a sanity error Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/explode.c b/src/explode.c index 941d22201..2c46178fd 100644 --- a/src/explode.c +++ b/src/explode.c @@ -621,6 +621,13 @@ struct obj *obj; /* only scatter this obj */ obj->ox, obj->oy, sx, sy); while ((otmp = (individual_object ? obj : level.objects[sx][sy])) != 0) { + if (otmp == uball || otmp == uchain) { + boolean waschain = (otmp == uchain); + pline_The("chain shatters!"); + unpunish(); + if (waschain) + continue; + } if (otmp->quan > 1L) { qtmp = otmp->quan - 1L; if (qtmp > LARGEST_INT) From ba3004d6e2ded6de9f16439ab3847dafbc543284 Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 8 Oct 2019 13:26:39 -0700 Subject: [PATCH 023/529] W_WEAPON -> W_WEAPONS Report #H9243 misinterpreted W_WEAPON as W_WEP and attributed a hypothetical ball and chain sanity checking problem to that. Rename the former to W_WEAPONS to emphasize that it includes alternate/secondary weapon and quivered stack as well as wielded weapon. --- include/prop.h | 4 ++-- src/ball.c | 4 ++-- src/do_wear.c | 8 ++++---- src/invent.c | 4 ++-- src/mkobj.c | 6 +++--- src/pickup.c | 5 +++-- src/steal.c | 4 ++-- 7 files changed, 18 insertions(+), 17 deletions(-) diff --git a/include/prop.h b/include/prop.h index ba0dc0863..570f3f2fa 100644 --- a/include/prop.h +++ b/include/prop.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 prop.h $NHDT-Date: 1547514641 2019/01/15 01:10:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.20 $ */ +/* NetHack 3.6 prop.h $NHDT-Date: 1570566360 2019/10/08 20:26:00 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.21 $ */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ @@ -106,7 +106,7 @@ struct prop { #define W_WEP 0x00000100L /* Wielded weapon */ #define W_QUIVER 0x00000200L /* Quiver for (f)iring ammo */ #define W_SWAPWEP 0x00000400L /* Secondary weapon */ -#define W_WEAPON (W_WEP | W_SWAPWEP | W_QUIVER) +#define W_WEAPONS (W_WEP | W_SWAPWEP | W_QUIVER) #define W_ART 0x00001000L /* Carrying artifact (not really worn) */ #define W_ARTI 0x00002000L /* Invoked artifact (not really worn) */ /* Amulets, rings, tools, and other items */ diff --git a/src/ball.c b/src/ball.c index 81e2d6dd2..9a309676a 100644 --- a/src/ball.c +++ b/src/ball.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 ball.c $NHDT-Date: 1559601027 2019/06/03 22:30:27 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.40 $ */ +/* NetHack 3.6 ball.c $NHDT-Date: 1570566373 2019/10/08 20:26:13 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.43 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) David Cohrs, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1074,7 +1074,7 @@ bc_sanity_check() && uball->where != OBJ_FREE) || (freeball ^ freechain) || (uball->owornmask & W_BALL) == 0L - || (uball->owornmask & ~(W_BALL | W_WEAPON)) != 0L)) { + || (uball->owornmask & ~(W_BALL | W_WEAPONS)) != 0L)) { otyp = uball->otyp; onam = safe_typename(otyp); impossible("uball: type %d (%s), where %d, wornmask=0x%08lx", diff --git a/src/do_wear.c b/src/do_wear.c index 78262cba0..edf4d6faf 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_wear.c $NHDT-Date: 1559670603 2019/06/04 17:50:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.109 $ */ +/* NetHack 3.6 do_wear.c $NHDT-Date: 1570566377 2019/10/08 20:26:17 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.111 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1101,7 +1101,7 @@ struct obj *otmp; boolean already_blind = Blind, changed = FALSE; /* blindfold might be wielded; release it for wearing */ - if (otmp->owornmask & W_WEAPON) + if (otmp->owornmask & W_WEAPONS) remove_worn_item(otmp, FALSE); setworn(otmp, W_TOOL); on_msg(otmp); @@ -1919,7 +1919,7 @@ struct obj *obj; /* if the armor is wielded, release it for wearing (won't be welded even if cursed; that only happens for weapons/weptools) */ - if (obj->owornmask & W_WEAPON) + if (obj->owornmask & W_WEAPONS) remove_worn_item(obj, FALSE); /* * Setting obj->known=1 is done because setworn() causes hero's AC @@ -2545,7 +2545,7 @@ doddoremarm() possibly combined with weapons */ (void) strncpy(context.takeoff.disrobing, "disrobing", CONTEXTVERBSZ); /* specific activity when handling weapons only */ - if (!(context.takeoff.mask & ~W_WEAPON)) + if (!(context.takeoff.mask & ~W_WEAPONS)) (void) strncpy(context.takeoff.disrobing, "disarming", CONTEXTVERBSZ); (void) take_off(); diff --git a/src/invent.c b/src/invent.c index 01c252b89..be2a24497 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 invent.c $NHDT-Date: 1570232224 2019/10/04 23:37:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.263 $ */ +/* NetHack 3.6 invent.c $NHDT-Date: 1570566378 2019/10/08 20:26:18 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.264 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1889,7 +1889,7 @@ boolean is_worn(otmp) struct obj *otmp; { - return (otmp->owornmask & (W_ARMOR | W_ACCESSORY | W_SADDLE | W_WEAPON)) + return (otmp->owornmask & (W_ARMOR | W_ACCESSORY | W_SADDLE | W_WEAPONS)) ? TRUE : FALSE; } diff --git a/src/mkobj.c b/src/mkobj.c index 4a5e7f0dc..d3cede639 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mkobj.c $NHDT-Date: 1561588627 2019/06/26 22:37:07 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.151 $ */ +/* NetHack 3.6 mkobj.c $NHDT-Date: 1570566379 2019/10/08 20:26:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.152 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2572,7 +2572,7 @@ struct obj *obj; } if (n == 2 && carried(obj) && obj == uball && (owornmask & W_BALL) != 0L - && (owornmask & W_WEAPON) != 0L) { + && (owornmask & W_WEAPONS) != 0L) { /* chained ball can be wielded/alt-wielded/quivered; if so, pretend it's not chained in order to check the weapon pointer (we've already verified the ball pointer by successfully passing @@ -2681,7 +2681,7 @@ struct obj *obj; becoming embedded in poly'd hero's skin */ if (embedded && !Is_dragon_scales(obj)) what = "skin"; - } else if (owornmask & W_WEAPON) { + } else if (owornmask & W_WEAPONS) { /* monsters don't maintain alternate weapon or quiver */ if (mcarried(obj) && (owornmask & (W_SWAPWEP | W_QUIVER)) != 0L) what = (owornmask & W_SWAPWEP) != 0L ? "monst alt weapon?" diff --git a/src/pickup.c b/src/pickup.c index 16473747e..4c789f38a 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pickup.c $NHDT-Date: 1570142736 2019/10/03 22:45:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.234 $ */ +/* NetHack 3.6 pickup.c $NHDT-Date: 1570566381 2019/10/08 20:26:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.235 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1206,7 +1206,8 @@ int qflags; for (curr = olist; curr; curr = FOLLOW(curr, qflags)) { if (curr->oclass == *pack) { if ((qflags & WORN_TYPES) - && !(curr->owornmask & (W_ARMOR | W_ACCESSORY | W_WEAPON))) + && !(curr->owornmask & (W_ARMOR | W_ACCESSORY + | W_WEAPONS))) continue; if (!counted_category) { ccount++; diff --git a/src/steal.c b/src/steal.c index 2686a5392..86933c73a 100644 --- a/src/steal.c +++ b/src/steal.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 steal.c $NHDT-Date: 1562806584 2019/07/11 00:56:24 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.74 $ */ +/* NetHack 3.6 steal.c $NHDT-Date: 1570566382 2019/10/08 20:26:22 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.75 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -218,7 +218,7 @@ boolean unchain_ball; /* whether to unpunish or just unwield */ Ring_gone(obj); } else if (obj->owornmask & W_TOOL) { Blindf_off(obj); - } else if (obj->owornmask & W_WEAPON) { + } else if (obj->owornmask & W_WEAPONS) { if (obj == uwep) uwepgone(); if (obj == uswapwep) From 3c6303b34e43faf2f8044d84fbc22b418ce8d89f Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 8 Oct 2019 14:23:27 -0700 Subject: [PATCH 024/529] fix #H9266 - redundant obj init Sword given to angels used obj->spe = max(obj->spe, rn2(4)) [except using a temporary to sanely work with max() macro]. But the obj was explicitly created as no-init, so obj->spe was always 0 and the max() was pointless. Shield given to angels was manipulating bless/curse state directly instead of using the functions intended for that, a no-no and also pointless to be clearing 'cursed' for a no-init item. Mace for priests had useless handling for object creation failure. Object creation failure could only happen if the mksobj() call had a valid entry in objects[] (or out of bounds access that didn't crash) for an object class that it doesn't know how to handle. That can't happen unless somebody screws up big time. If it ever did happen, it would have produced a memory leak. --- src/makemon.c | 19 ++++++++----------- src/mkobj.c | 3 ++- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/makemon.c b/src/makemon.c index 2350e77a0..6d3635cd2 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 makemon.c $NHDT-Date: 1561236435 2019/06/22 20:47:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.138 $ */ +/* NetHack 3.6 makemon.c $NHDT-Date: 1570569787 2019/10/08 21:23:07 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.140 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -166,7 +166,7 @@ register struct monst *mtmp; register struct permonst *ptr = mtmp->data; register int mm = monsndx(ptr); struct obj *otmp; - int bias, spe2, w1, w2; + int bias, w1, w2; if (Is_rogue_level(&u.uz)) return; @@ -259,12 +259,10 @@ register struct monst *mtmp; } else if (ptr->msound == MS_PRIEST || quest_mon_represents_role(ptr, PM_PRIEST)) { otmp = mksobj(MACE, FALSE, FALSE); - if (otmp) { - otmp->spe = rnd(3); - if (!rn2(2)) - curse(otmp); - (void) mpickobj(mtmp, otmp); - } + otmp->spe = rnd(3); + if (!rn2(2)) + curse(otmp); + (void) mpickobj(mtmp, otmp); } else if (mm == PM_NINJA) { /* extra quest villains */ (void) mongets(mtmp, rn2(4) ? SHURIKEN : DART); (void) mongets(mtmp, rn2(4) ? SHORT_SWORD : AXE); @@ -336,14 +334,13 @@ register struct monst *mtmp; artiname(rn2(2) ? ART_DEMONBANE : ART_SUNSWORD)); bless(otmp); otmp->oerodeproof = TRUE; - spe2 = rn2(4); - otmp->spe = max(otmp->spe, spe2); + otmp->spe = rn2(4); (void) mpickobj(mtmp, otmp); otmp = mksobj(!rn2(4) || is_lord(ptr) ? SHIELD_OF_REFLECTION : LARGE_SHIELD, FALSE, FALSE); - otmp->cursed = FALSE; + /* uncurse(otmp); -- mksobj(,FALSE,) item is always uncursed */ otmp->oerodeproof = TRUE; otmp->spe = 0; (void) mpickobj(mtmp, otmp); diff --git a/src/mkobj.c b/src/mkobj.c index d3cede639..24124f706 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mkobj.c $NHDT-Date: 1570566379 2019/10/08 20:26:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.152 $ */ +/* NetHack 3.6 mkobj.c $NHDT-Date: 1570569798 2019/10/08 21:23:18 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.153 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1064,6 +1064,7 @@ boolean artif; default: impossible("impossible mkobj %d, sym '%c'.", otmp->otyp, objects[otmp->otyp].oc_class); + dealloc_obj(otmp); /* free() would suffice here */ return (struct obj *) 0; } } From bab05ea680c289c0b79228b643a5dd49fbc17cf8 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 8 Oct 2019 20:17:01 -0400 Subject: [PATCH 025/529] remove one band from a recent attempted warning correction --- win/curses/cursmisc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/win/curses/cursmisc.c b/win/curses/cursmisc.c index 80ff91c65..e435f2211 100644 --- a/win/curses/cursmisc.c +++ b/win/curses/cursmisc.c @@ -377,6 +377,7 @@ curses_str_remainder(const char *str, int width, int line_num) int strsize = strlen(str) + 1; #if __STDC_VERSION__ >= 199901L char substr[strsize]; + char curstr[strsize]; char tmpstr[strsize]; strcpy(substr, str); @@ -385,6 +386,7 @@ curses_str_remainder(const char *str, int width, int line_num) #define BUFSZ 256 #endif char substr[BUFSZ * 2]; + char curstr[BUFSZ * 2]; char tmpstr[BUFSZ * 2]; if (strsize > (BUFSZ * 2) - 1) { @@ -412,6 +414,10 @@ curses_str_remainder(const char *str, int width, int line_num) if (last_space == 0) { /* No spaces found */ last_space = count - 1; } + for (count = 0; count < last_space; count++) { + curstr[count] = substr[count]; + } + curstr[count] = '\0'; if (substr[count] == '\0') { break; } From e4f3559acc2e56eec552ce635f486888364d7e25 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 9 Oct 2019 13:18:34 -0700 Subject: [PATCH 026/529] curses on unix - terminal reset needed after abort Noticed while investigating the message loop. If I had level files from an interrupted game and was asked "Destroy old game?" when starting a new one, answering 'n' left the terminal in an unusable state. Executing 'stty sane' (invisibly since input echo was off) repaired things but the user shouldn't have to do that. Change unixtty.c's error() to shut down windowing if that has been initialized. This might need some tweaking for tty, which will now clear the screen before showing the startup error message. Other systems besides unix use unixtty.c so are affected, but I think the change doesn't introduce anything that should cause trouble (aside from the potential screen erasure). --- doc/fixes36.3 | 8 +++++--- sys/share/unixtty.c | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 71572a441..49c49674c 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.126 $ $NHDT-Date: 1570408209 2019/10/07 00:30:09 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.128 $ $NHDT-Date: 1570652307 2019/10/09 20:18:27 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -210,8 +210,6 @@ tty: revert the attempt to fix "message line anomaly: if autodecribe feedback wrapped to second line, the wrapped portion wasn't erased when a shorter line was shown or getpos was dismissed" because it disrupted prompts that spanned more than one line, a more significant issue -unix: sysconf CHECK_PLNAME=1 wouldn't work if attempt to obtain unix username - failed even though it didn't need that username Platform- and/or Interface-Specific Fixes or Features @@ -302,6 +300,10 @@ tty: take two, if/when autodecribe feedback wraps past top line, clear ['exposed by git' section has an entry for reversal of 'take one'] tty: video attributes (bold, inverse, &c) for status highlighting sometimes were scrambled +unix: sysconf CHECK_PLNAME=1 wouldn't work if attempt to obtain unix username + failed even though it didn't need that username +unix+curses: startup error only reset terminal for tty; one noticeable + example was answering 'n' to "Destroy old game?" Windows: some startup error messages were not being delivered successfully diff --git a/sys/share/unixtty.c b/sys/share/unixtty.c index dafbc8f44..3196f3b3d 100644 --- a/sys/share/unixtty.c +++ b/sys/share/unixtty.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 unixtty.c $NHDT-Date: 1548372343 2019/01/24 23:25:43 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.25 $ */ +/* NetHack 3.6 unixtty.c $NHDT-Date: 1570652308 2019/10/09 20:18:28 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.26 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -243,6 +243,7 @@ const char *s; iflags.cbreak = (CBRKON(inittyb.cbrkflgs & CBRKMASK)) ? ON : OFF; curttyb.inputflags |= STRIPHI; setioctls(); + settty_needed = FALSE; } void @@ -471,6 +472,9 @@ VA_DECL(const char *, s) { VA_START(s); VA_INIT(s, const char *); + + if (iflags.window_inited) + exit_nhwindows((char *) 0); /* for tty, will call settty() */ if (settty_needed) settty((char *) 0); Vprintf(s, VA_ARGS); From ad302fb8a99a5795c4d206870ea6573349b2d92a Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 10 Oct 2019 17:43:31 -0700 Subject: [PATCH 027/529] mksobj failure If mksobj() was told to initialize the object it's creating and the object class was something it didn't understand, it would issue a warning and return Null. But an unknown object class is a severe internal error and very few callers were prepared to deal with a Null result, so change mksobj() to panic instead. Also eliminate the few attempts to deal with Null result that are present in mkobj.c; I didn't go looking elsewhere. --- src/mkobj.c | 126 +++++++++++++++++++++++++++------------------------- 1 file changed, 65 insertions(+), 61 deletions(-) diff --git a/src/mkobj.c b/src/mkobj.c index 24124f706..a92deceb6 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mkobj.c $NHDT-Date: 1570569798 2019/10/08 21:23:18 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.153 $ */ +/* NetHack 3.6 mkobj.c $NHDT-Date: 1570754586 2019/10/11 00:43:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.154 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -235,15 +235,14 @@ boolean init, artif; struct obj *otmp; otmp = mksobj(otyp, init, artif); - if (otmp) { - add_to_migration(otmp); - otmp->owornmask = (long) MIGR_TO_SPECIES; - otmp->corpsenm = mflags2; - } + add_to_migration(otmp); + otmp->owornmask = (long) MIGR_TO_SPECIES; + otmp->corpsenm = mflags2; return otmp; } -/* mkobj(): select a type of item from a class, use mksobj() to create it */ +/* mkobj(): select a type of item from a class, use mksobj() to create it; + result is always non-Null */ struct obj * mkobj(oclass, artif) char oclass; @@ -309,8 +308,7 @@ struct obj *box; for (n = rn2(n + 1); n > 0; n--) { if (box->otyp == ICE_BOX) { - if (!(otmp = mksobj(CORPSE, TRUE, TRUE))) - continue; + otmp = mksobj(CORPSE, TRUE, TRUE); /* Note: setting age to 0 is correct. Age has a different * from usual meaning for objects stored in ice boxes. -KAA */ @@ -768,7 +766,7 @@ static const char dknowns[] = { WAND_CLASS, RING_CLASS, POTION_CLASS, SCROLL_CLASS, GEM_CLASS, SPBOOK_CLASS, WEAPON_CLASS, TOOL_CLASS, 0 }; -/* mksobj(): create a specific type of object */ +/* mksobj(): create a specific type of object; result it always non-Null */ struct obj * mksobj(otyp, init, artif) int otyp; @@ -1062,10 +1060,12 @@ boolean artif; case COIN_CLASS: break; /* do nothing */ default: - impossible("impossible mkobj %d, sym '%c'.", otmp->otyp, - objects[otmp->otyp].oc_class); - dealloc_obj(otmp); /* free() would suffice here */ - return (struct obj *) 0; + /* 3.6.3: this used to be impossible() followed by return 0 + but most callers aren't prepared to deal with Null result + and cluttering them up to do so is pointless */ + panic("mksobj tried to make type %d, class %d.", + (int) otmp->otyp, (int) objects[otmp->otyp].oc_class); + /*NOTREACHED*/ } } @@ -1473,6 +1473,7 @@ register struct obj *obj; static int treefruits[] = { APPLE, ORANGE, PEAR, BANANA, EUCALYPTUS_LEAF }; +/* called when a tree is kicked; never returns Null */ struct obj * rnd_treefruit_at(x, y) int x, y; @@ -1480,15 +1481,17 @@ int x, y; return mksobj_at(treefruits[rn2(SIZE(treefruits))], x, y, TRUE, FALSE); } +/* create a stack of N gold pieces; never returns Null */ struct obj * mkgold(amount, x, y) long amount; int x, y; { - register struct obj *gold = g_at(x, y); + struct obj *gold = g_at(x, y); if (amount <= 0L) { long mul = rnd(30 / max(12-depth(&u.uz), 2)); + amount = (long) (1 + rnd(level_difficulty() + 2) * mul); } if (gold) { @@ -1501,12 +1504,14 @@ int x, y; return gold; } -/* return TRUE if the corpse has special timing */ -#define special_corpse(num) \ - (((num) == PM_LIZARD) || ((num) == PM_LICHEN) || (is_rider(&mons[num])) \ - || (mons[num].mlet == S_TROLL)) +/* return TRUE if the corpse has special timing; + lizards and lichen don't rot, trolls and Riders auto-revive */ +#define special_corpse(num) \ + (((num) == PM_LIZARD || (num) == PM_LICHEN) \ + || (mons[num].mlet == S_TROLL || is_rider(&mons[num]))) -/* +/* mkcorpstat: make a corpse or statue; never returns Null. + * * OEXTRA note: Passing mtmp causes mtraits to be saved * even if ptr passed as well, but ptr is always used for * the corpse type (corpsenm). That allows the corpse type @@ -1523,40 +1528,37 @@ struct permonst *ptr; int x, y; unsigned corpstatflags; { - register struct obj *otmp; + struct obj *otmp; boolean init = ((corpstatflags & CORPSTAT_INIT) != 0); if (objtype != CORPSE && objtype != STATUE) impossible("making corpstat type %d", objtype); if (x == 0 && y == 0) { /* special case - random placement */ otmp = mksobj(objtype, init, FALSE); - if (otmp) - (void) rloco(otmp); - } else + (void) rloco(otmp); + } else { otmp = mksobj_at(objtype, x, y, init, FALSE); - if (otmp) { - if (mtmp) { - struct obj *otmp2; + } - if (!ptr) - ptr = mtmp->data; - /* save_mtraits frees original data pointed to by otmp */ - otmp2 = save_mtraits(otmp, mtmp); - if (otmp2) - otmp = otmp2; - } - /* use the corpse or statue produced by mksobj() as-is - unless `ptr' is non-null */ - if (ptr) { - int old_corpsenm = otmp->corpsenm; + /* when 'mtmp' is non-null make a corpse or statue of that monster, + otherwise keep the random type chosen by mksobj() */ + if (mtmp) { + int old_corpsenm = otmp->corpsenm; - otmp->corpsenm = monsndx(ptr); - otmp->owt = weight(otmp); - if (otmp->otyp == CORPSE && (special_corpse(old_corpsenm) - || special_corpse(otmp->corpsenm))) { - obj_stop_timers(otmp); - start_corpse_timeout(otmp); - } + /* save_mtraits updates otmp->oextra->omonst in place */ + (void) save_mtraits(otmp, mtmp); + + /* when 'ptr' is non-null use the type specified by our caller, + otherwise use the monster's species for the corpse */ + if (!ptr) + ptr = mtmp->data; + + otmp->corpsenm = monsndx(ptr); + otmp->owt = weight(otmp); + if (otmp->otyp == CORPSE && (special_corpse(old_corpsenm) + || special_corpse(otmp->corpsenm))) { + obj_stop_timers(otmp); + start_corpse_timeout(otmp); } } return otmp; @@ -1574,15 +1576,14 @@ int corpse_revive_type(obj) struct obj *obj; { - int revivetype; + int revivetype = obj->corpsenm; struct monst *mtmp; - if (has_omonst(obj) - && ((mtmp = get_mtraits(obj, FALSE)) != (struct monst *) 0)) { + + if (has_omonst(obj) && ((mtmp = get_mtraits(obj, FALSE)) != 0)) { /* mtmp is a temporary pointer to a monster's stored attributes, not a real monster */ revivetype = mtmp->mnum; - } else - revivetype = obj->corpsenm; + } return revivetype; } @@ -1658,26 +1659,29 @@ boolean copyof; return mnew; } -/* make an object named after someone listed in the scoreboard file */ +/* make an object named after someone listed in the scoreboard file; + never returns Null */ struct obj * mk_tt_object(objtype, x, y) int objtype; /* CORPSE or STATUE */ -register int x, y; +int x, y; { - register struct obj *otmp, *otmp2; + struct obj *otmp; boolean initialize_it; /* player statues never contain books */ initialize_it = (objtype != STATUE); - if ((otmp = mksobj_at(objtype, x, y, initialize_it, FALSE)) != 0) { - /* tt_oname will return null if the scoreboard is empty */ - if ((otmp2 = tt_oname(otmp)) != 0) - otmp = otmp2; - } + otmp = mksobj_at(objtype, x, y, initialize_it, FALSE); + /* tt_oname() will return null if the scoreboard is empty; + assigning an object name used to allocate a new obj but + doesn't any more so we can safely ignore the return value */ + (void) tt_oname(otmp); + return otmp; } -/* make a new corpse or statue, uninitialized if a statue (i.e. no books) */ +/* make a new corpse or statue, uninitialized if a statue (i.e. no books); + never returns Null */ struct obj * mk_named_object(objtype, ptr, x, y, nm) int objtype; /* CORPSE or STATUE */ @@ -1686,8 +1690,8 @@ int x, y; const char *nm; { struct obj *otmp; - unsigned corpstatflags = - (objtype != STATUE) ? CORPSTAT_INIT : CORPSTAT_NONE; + unsigned corpstatflags = (objtype != STATUE) ? CORPSTAT_INIT + : CORPSTAT_NONE; otmp = mkcorpstat(objtype, (struct monst *) 0, ptr, x, y, corpstatflags); if (nm) From 02b9368dbaab631466fcb3f5aba5c1691cc15aa7 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 11 Oct 2019 20:00:17 +0300 Subject: [PATCH 028/529] Fix fired iron ball sanity error When hero was punished and swallowed, and fired the attached iron ball from a quiver, thrownobj was not cleared. --- doc/fixes36.3 | 1 + src/dothrow.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 49c49674c..c62dfc1d1 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -178,6 +178,7 @@ avoid 'object lost' panic when polymorph causes loss of levitation boots or wasn't possible to tell where they were, unlike all other forms of multiple movement; stop running if/when an engraving is reached fix exploding land mine moving ball or chain and causing a sanity error +fix firing attached iron ball when swallowed causing a sanity error Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/dothrow.c b/src/dothrow.c index a2d12c93a..1b2a80184 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -1294,7 +1294,7 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */ || !index(in_rooms(mon->mx, mon->my, SHOPBASE), *u.ushops))) hot_pursuit(mon); - if (obj_gone) + if (obj_gone || obj == uball) thrownobj = (struct obj *) 0; } From ab30c3d79d7ba7b058f5ce68663bdb561060e4d5 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 11 Oct 2019 20:11:24 +0300 Subject: [PATCH 029/529] Fix vault guard impossible ... when the guard is angry, and he's in the vault or in his corridor, you're not in the vault nor in his corridor, and the level is full so the guard cannot relocate. --- doc/fixes36.3 | 1 + src/vault.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index c62dfc1d1..32a45e720 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -179,6 +179,7 @@ avoid 'object lost' panic when polymorph causes loss of levitation boots or multiple movement; stop running if/when an engraving is reached fix exploding land mine moving ball or chain and causing a sanity error fix firing attached iron ball when swallowed causing a sanity error +fix vault guard impossible when he could not relocate in certain situation Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/vault.c b/src/vault.c index 6ff80fa76..00369fd61 100644 --- a/src/vault.c +++ b/src/vault.c @@ -775,9 +775,10 @@ register struct monst *grd; if (!u_in_vault && (grd_in_vault || (in_fcorridor(grd, grd->mx, grd->my) && !in_fcorridor(grd, u.ux, u.uy)))) { - (void) rloc(grd, FALSE); + (void) rloc(grd, TRUE); wallify_vault(grd); - (void) clear_fcorr(grd, TRUE); + if (!in_fcorridor(grd, grd->mx, grd->my)) + (void) clear_fcorr(grd, TRUE); goto letknow; } if (!in_fcorridor(grd, grd->mx, grd->my)) From 46adb312e748d3ede72a134f763ba5b4f3d62b52 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 11 Oct 2019 20:24:17 +0300 Subject: [PATCH 030/529] Fix priests and shopkeepers moving on other monsters --- doc/fixes36.3 | 1 + src/priest.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 32a45e720..2fdd04027 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -180,6 +180,7 @@ avoid 'object lost' panic when polymorph causes loss of levitation boots or fix exploding land mine moving ball or chain and causing a sanity error fix firing attached iron ball when swallowed causing a sanity error fix vault guard impossible when he could not relocate in certain situation +fix temple priests or shopkeepers moving over other monsters Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/priest.c b/src/priest.c index d97886c73..ab20a8d7a 100644 --- a/src/priest.c +++ b/src/priest.c @@ -118,6 +118,8 @@ pick_move: } if (nix != omx || niy != omy) { + if (MON_AT(nix, niy)) + return 0; remove_monster(omx, omy); place_monster(mtmp, nix, niy); newsym(nix, niy); From 6cbf10d97447970daa3e1e75a1ccece11bd5a2ed Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 11 Oct 2019 18:33:32 -0700 Subject: [PATCH 031/529] South Park reference - gnomes' business plan If you chat with a peaceful gnome while hallucinating, you might get a silly message from the TV show South Park. To make it work for non-gnome characters, I changed the speech of monsters who normally just grunt (gnomes, orcs, ogres, a couple of other groups) to full humanoid when the hero is hallucinating. (It already does that for orcs if the hero--hallucinating or not-- is an orc and for gnomes when the hero is a gnome.) --- src/sounds.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/sounds.c b/src/sounds.c index 505a10e56..1bf77165f 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 sounds.c $NHDT-Date: 1542765362 2018/11/21 01:56:02 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.81 $ */ +/* NetHack 3.6 sounds.c $NHDT-Date: 1570844005 2019/10/12 01:33:25 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.83 $ */ /* Copyright (c) 1989 Janet Walz, Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ @@ -496,7 +496,7 @@ register struct monst *mtmp; *verbl_msg = 0, /* verbalize() */ *verbl_msg_mcan = 0; /* verbalize() if cancelled */ struct permonst *ptr = mtmp->data; - int msound = ptr->msound; + int msound = ptr->msound, gnomeplan = 0; /* presumably nearness and sleep checks have already been made */ if (Deaf) @@ -512,8 +512,9 @@ register struct monst *mtmp; msound = mons[genus(monsndx(ptr), 1)].msound; /* some normally non-speaking types can/will speak if hero is similar */ else if (msound == MS_ORC /* note: MS_ORC is same as MS_GRUNT */ - && (same_race(ptr, youmonst.data) /* current form, */ - || same_race(ptr, &mons[Race_switch]))) /* unpoly'd form */ + && ((same_race(ptr, youmonst.data) /* current form, */ + || same_race(ptr, &mons[Race_switch])) /* unpoly'd form */ + || Hallucination)) msound = MS_HUMANOID; /* silliness, with slight chance to interfere with shopping */ else if (Hallucination && mon_is_gecko(mtmp)) @@ -588,13 +589,14 @@ register struct monst *mtmp; } else verbl_msg = "I only drink... potions."; } else { - int vampindex; static const char *const vampmsg[] = { /* These first two (0 and 1) are specially handled below */ "I vant to suck your %s!", "I vill come after %s without regret!", /* other famous vampire quotes can follow here if desired */ }; + int vampindex; + if (kindred) verbl_msg = "This is my hunting ground that you dare to prowl!"; @@ -803,6 +805,18 @@ register struct monst *mtmp; pline_msg = "talks about spellcraft."; else if (ptr->mlet == S_CENTAUR) pline_msg = "discusses hunting."; + else if (is_gnome(ptr) && Hallucination && (gnomeplan = rn2(4)) % 2) + /* skipped for rn2(4) result of 0 or 2; + gag from an early episode of South Park called "Gnomes"; + initially, Tweek (introduced in that episode) is the only + one aware of the tiny gnomes after spotting them sneaking + about; they are embarked upon a three-step business plan; + a diagram of the plan shows: + Phase 1 Phase 2 Phase 3 + Collect underpants ? Profit + and they never verbalize step 2 so we don't either */ + verbl_msg = (gnomeplan == 1) ? "Phase one, collect underpants." + : "Phase three, profit!"; else switch (monsndx(ptr)) { case PM_HOBBIT: From 1fc8d7528ced1f519f67e6365530deda390ffeca Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 12 Oct 2019 02:31:47 -0700 Subject: [PATCH 032/529] fix #H9298 - corpse mismatch Corpses for dying monsters were being created with the wrong type, caused by incorrect block nesting for 'if (ptr)' from commit ad302fb8a99a5795c4d206870ea6573349b2d92a (Oct 10). --- doc/fixes36.3 | 3 ++- src/mkobj.c | 16 +++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 2fdd04027..a2467729c 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.128 $ $NHDT-Date: 1570652307 2019/10/09 20:18:27 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.132 $ $NHDT-Date: 1570872701 2019/10/12 09:31:41 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -201,6 +201,7 @@ monster throwing from stack of missiles (darts, daggers, spears) would cause crash if it wasn't wielding a weapon (bug in multi-shot shooting fix) surviving death while polymorphed would yield "You are a " without terminating period +'mksobj failure' commit resulted in wrong corpse types for dying monsters curses: sometimes the message window would show a blank line after a prompt curses: the change to show map in columns 1..79 instead of 2..80 made the highlight for '@' show up in the wrong place if clipped map had been diff --git a/src/mkobj.c b/src/mkobj.c index a92deceb6..6975ca966 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mkobj.c $NHDT-Date: 1570754586 2019/10/11 00:43:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.154 $ */ +/* NetHack 3.6 mkobj.c $NHDT-Date: 1570872702 2019/10/12 09:31:42 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.155 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1540,18 +1540,20 @@ unsigned corpstatflags; otmp = mksobj_at(objtype, x, y, init, FALSE); } - /* when 'mtmp' is non-null make a corpse or statue of that monster, - otherwise keep the random type chosen by mksobj() */ + /* when 'mtmp' is non-null save the monster's details with the + corpse or statue; it will also force the 'ptr' override below */ if (mtmp) { - int old_corpsenm = otmp->corpsenm; - /* save_mtraits updates otmp->oextra->omonst in place */ (void) save_mtraits(otmp, mtmp); - /* when 'ptr' is non-null use the type specified by our caller, - otherwise use the monster's species for the corpse */ if (!ptr) ptr = mtmp->data; + } + + /* when 'ptr' is non-null it comes from our caller or from 'mtmp'; + override mkobjs()'s initialization of a random monster type */ + if (ptr) { + int old_corpsenm = otmp->corpsenm; otmp->corpsenm = monsndx(ptr); otmp->owt = weight(otmp); From d058b9679c043b42c880f2b70138d1e9be0cc983 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 12 Oct 2019 15:33:57 -0700 Subject: [PATCH 033/529] fix part of #H9299 - DECgraphics symset comments For the DECgraphics symbol set, down ladder is the greater-than-or- equal-to character as intended and up ladder is less-than-or-equal-to, but comments in dat/symbols had their descriptions transposed. --- dat/symbols | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dat/symbols b/dat/symbols index d9e1ecef6..be27dad5d 100644 --- a/dat/symbols +++ b/dat/symbols @@ -1,4 +1,4 @@ -# NetHack 3.6 symbols $NHDT-Date: 1524689580 2018/04/25 20:53:00 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.16 $ +# NetHack 3.6 symbols $NHDT-Date: 1570919632 2019/10/12 22:33:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.17 $ # Copyright (c) 2006 by Michael Allison # NetHack may be freely redistributed. See license for details. # @@ -35,8 +35,8 @@ start: DECgraphics S_bars: \xfb # meta-{, small pi S_tree: \xe7 # meta-g, plus-or-minus S_room: \xfe # meta-~, centered dot - S_upladder: \xf9 # meta-y, greater-than-or-equals - S_dnladder: \xfa # meta-z, less-than-or-equals + S_upladder: \xf9 # meta-y, less-than-or-equals + S_dnladder: \xfa # meta-z, greater-than-or-equals S_pool: \xe0 # meta-\, diamond S_ice: \xfe # meta-~, centered dot S_lava: \xe0 # meta-\, diamond From 9e9ee59ca7f8652702554ddb3cec23bd90be50cc Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 13 Oct 2019 19:16:38 +0300 Subject: [PATCH 034/529] Fix hero hiding under a statue shattered by land mine Trigger a land mine while being polymorphed into a monster that automatically hides (eg. scorpion). Have the statue on the land mine shatter and all items on that square scatter away. Avoid falling into the pit left by the land mine. --- doc/fixes36.3 | 1 + src/explode.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index a2467729c..8182bfea8 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -181,6 +181,7 @@ fix exploding land mine moving ball or chain and causing a sanity error fix firing attached iron ball when swallowed causing a sanity error fix vault guard impossible when he could not relocate in certain situation fix temple priests or shopkeepers moving over other monsters +fix hero still hiding under a statue shattered by a land mine Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/explode.c b/src/explode.c index 2c46178fd..31ba7c763 100644 --- a/src/explode.c +++ b/src/explode.c @@ -771,6 +771,9 @@ struct obj *obj; /* only scatter this obj */ newsym(x, y); } newsym(sx, sy); + if (sx == u.ux && sy == u.uy && u.uundetected + && hides_under(youmonst.data)) + (void) hideunder(&youmonst); return total; } From 1f7095e226c96fcdf1e06a52a7ff86ced76b0f12 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 13 Oct 2019 19:57:05 +0300 Subject: [PATCH 035/529] Fix addressing deleted trap when helping monster out of a pit Move reward_untrap before fill_pit, as the trap may get deleted. --- doc/fixes36.3 | 1 + src/trap.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 8182bfea8..e87280bdd 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -182,6 +182,7 @@ fix firing attached iron ball when swallowed causing a sanity error fix vault guard impossible when he could not relocate in certain situation fix temple priests or shopkeepers moving over other monsters fix hero still hiding under a statue shattered by a land mine +fix helping a monster out of a pit addressing a deleted trap Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/trap.c b/src/trap.c index 994cbede0..8d0dddb6a 100644 --- a/src/trap.c +++ b/src/trap.c @@ -4346,8 +4346,8 @@ struct trap *ttmp; You("pull %s out of the pit.", mon_nam(mtmp)); mtmp->mtrapped = 0; - fill_pit(mtmp->mx, mtmp->my); reward_untrap(ttmp, mtmp); + fill_pit(mtmp->mx, mtmp->my); return 1; } From 346ebbce10854ba70e28778ac4852936a68e5967 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 13 Oct 2019 20:40:54 +0300 Subject: [PATCH 036/529] Fix launched object accessing a deleted trap In launch_obj, the code first got the trap, then called ohitmon (which can delete the trap by doing mondied -> fill_pit -> flooreffects -> deltrap), then after that used the trap variable. --- doc/fixes36.3 | 1 + src/trap.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index e87280bdd..94af43996 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -183,6 +183,7 @@ fix vault guard impossible when he could not relocate in certain situation fix temple priests or shopkeepers moving over other monsters fix hero still hiding under a statue shattered by a land mine fix helping a monster out of a pit addressing a deleted trap +fix launched rolling boulder code accessing deleted trap Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/trap.c b/src/trap.c index 8d0dddb6a..6b9884ea6 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1840,7 +1840,6 @@ int style; bhitpos.x += dx; bhitpos.y += dy; - t = t_at(bhitpos.x, bhitpos.y); if ((mtmp = m_at(bhitpos.x, bhitpos.y)) != 0) { if (otyp == BOULDER && throws_rocks(mtmp->data)) { @@ -1875,7 +1874,7 @@ int style; break; } } - if (t && otyp == BOULDER) { + if ((t = t_at(bhitpos.x, bhitpos.y)) != 0 && otyp == BOULDER) { switch (t->ttyp) { case LANDMINE: if (rn2(10) > 2) { From f200397689fbd31c65346c19e1ac646c6d9c4ed7 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 13 Oct 2019 20:52:34 +0300 Subject: [PATCH 037/529] Fix monster triggering land mine accessing deleted trap mintrap -> thitm -> mondied -> relobj -> mdrop_obj -> flooreffects -> deltrap after calling thitm, the mintrap code was trying to access the trap. --- doc/fixes36.3 | 1 + src/trap.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 94af43996..ee3964155 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -184,6 +184,7 @@ fix temple priests or shopkeepers moving over other monsters fix hero still hiding under a statue shattered by a land mine fix helping a monster out of a pit addressing a deleted trap fix launched rolling boulder code accessing deleted trap +fix monster stepping on a land mine code accessing deleted trap Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/trap.c b/src/trap.c index 6b9884ea6..cb025e514 100644 --- a/src/trap.c +++ b/src/trap.c @@ -2167,6 +2167,7 @@ register struct monst *mtmp; inescapable = force_mintrap || ((tt == HOLE || tt == PIT) && Sokoban && !trap->madeby_u); const char *fallverb; + xchar tx = trap->tx, ty = trap->ty; /* true when called from dotrap, inescapable is not an option */ if (mtmp == u.usteed) @@ -2649,7 +2650,7 @@ register struct monst *mtmp; trapkilled = TRUE; } /* a boulder may fill the new pit, crushing monster */ - fill_pit(trap->tx, trap->ty); + fill_pit(tx, ty); /* thitm may have already destroyed the trap */ if (DEADMONSTER(mtmp)) trapkilled = TRUE; if (unconscious()) { From 027ce7c8b9c04f2ad64632a107536cd173dfb07f Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 13 Oct 2019 17:41:24 -0700 Subject: [PATCH 038/529] pull request 229/#H9299 - DECgraphics for curses Fixes #230 Incorporate github pull request #230, support for DECgraphics-style line drawing in the curses interface. I've rewritten the curses_convert_glyph() part so that it doesn't require C99 and doesn't reinitialize its pair of arrays for every character written to the map. The DECgraphics conversion is now a straight char for char one, DEC line drawing code to ACS, without regard to what map symbol is intended or what 'cursesgraphics' uses for that symbol. --- include/wincurs.h | 2 +- win/curses/cursinit.c | 9 -- win/curses/cursmain.c | 8 +- win/curses/cursmisc.c | 186 ++++++++++++++++++++++++++++++++---------- win/curses/cursmisc.h | 2 +- 5 files changed, 150 insertions(+), 57 deletions(-) diff --git a/include/wincurs.h b/include/wincurs.h index 8ae45e10e..c7d16f9e5 100644 --- a/include/wincurs.h +++ b/include/wincurs.h @@ -152,7 +152,7 @@ extern char *curses_break_str(const char *str, int width, int line_num); extern char *curses_str_remainder(const char *str, int width, int line_num); extern boolean curses_is_menu(winid wid); extern boolean curses_is_text(winid wid); -extern int curses_convert_glyph(int ch, int glyph); +extern int curses_convert_glyph(boolean decgraphics, int ch, int glyph); extern void curses_move_cursor(winid wid, int x, int y); extern void curses_prehousekeeping(void); extern void curses_posthousekeeping(void); diff --git a/win/curses/cursinit.c b/win/curses/cursinit.c index 594849ae2..2555e71de 100644 --- a/win/curses/cursinit.c +++ b/win/curses/cursinit.c @@ -782,17 +782,8 @@ curses_init_options() set_wc_option_mod_status(WC_ALIGN_MESSAGE | WC_ALIGN_STATUS, SET_IN_GAME); /* Remove a few options that are irrelevant to this windowport */ - /*set_option_mod_status("DECgraphics", SET_IN_FILE); */ set_option_mod_status("eight_bit_tty", SET_IN_FILE); - /* Make sure that DECgraphics is not set to true via the config - file, as this will cause display issues. We can't disable it in - options.c in case the game is compiled with both tty and curses. */ - if (!symset[PRIMARY].name - || !strcmpi(symset[PRIMARY].name, "DECgraphics")) { - load_symset("curses", PRIMARY); - load_symset("default", ROGUESET); - } #ifdef PDCURSES /* PDCurses for SDL, win32 and OS/2 has the ability to set the terminal size programatically. If the user does not specify a diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index c87f68a89..91a5ffac1 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -658,9 +658,11 @@ curses_print_glyph(winid wid, XCHAR_P x, XCHAR_P y, int glyph, if ((special & MG_DETECT) && iflags.use_inverse) { attr = A_REVERSE; } - if (!symset[PRIMARY].name || !strcmpi(symset[PRIMARY].name, "curses")) { - ch = curses_convert_glyph(ch, glyph); - } + if (SYMHANDLING(H_DEC)) + ch = curses_convert_glyph(TRUE, ch, glyph); + else if (!symset[PRIMARY].name || !strcmpi(symset[PRIMARY].name, "curses")) + ch = curses_convert_glyph(FALSE, ch, glyph); + if (wid == NHW_MAP) { /* hilite stairs not in 3.6, yet if ((special & MG_STAIRS) && iflags.hilite_hidden_stairs) { diff --git a/win/curses/cursmisc.c b/win/curses/cursmisc.c index e435f2211..aed91e84c 100644 --- a/win/curses/cursmisc.c +++ b/win/curses/cursmisc.c @@ -463,65 +463,165 @@ curses_is_text(winid wid) } } - /* Replace certain characters with portable drawing characters if -cursesgraphics option is enabled */ - + cursesgraphics option is enabled, or special curses handling for + DECgraphics */ int -curses_convert_glyph(int ch, int glyph) +curses_convert_glyph(boolean decgraphics, int ch, int glyph) { - int symbol; + static int cursesglyphs[MAXPCHARS], cursesglyphsinited = 0; + int retch, symbol; - if (Is_rogue_level(&u.uz)) { + /* FIXME? we don't support any special characters in roguesymset */ + if (Is_rogue_level(&u.uz)) return ch; - } /* Save some processing time by returning if the glyph represents an object that we don't have custom characters for */ - if (!glyph_is_cmap(glyph)) { + if (!glyph_is_cmap(glyph)) return ch; - } symbol = glyph_to_cmap(glyph); - /* If user selected a custom character for this object, don't - override this. */ - if (((glyph_is_cmap(glyph)) && (ch != showsyms[symbol]))) { + /* + * FIXME: + * 'cursesgraphics' should be a symbol set so that users can + * modify it without having to edit this source file and rebuild + * the program. Unfortunately these ACS values are 32-bit ones + * and not user-friendly. + */ + if (!cursesglyphsinited) { /* one-time initialization */ + cursesglyphsinited = 1; + cursesglyphs[S_vwall] = ACS_VLINE; + cursesglyphs[S_hwall] = ACS_HLINE; + cursesglyphs[S_tlcorn] = ACS_ULCORNER; + cursesglyphs[S_trcorn] = ACS_URCORNER; + cursesglyphs[S_blcorn] = ACS_LLCORNER; + cursesglyphs[S_brcorn] = ACS_LRCORNER; + cursesglyphs[S_crwall] = ACS_PLUS; + cursesglyphs[S_tuwall] = ACS_BTEE; + cursesglyphs[S_tdwall] = ACS_TTEE; + /* yes, the left/right Ts are inverted nethack vs curses */ + cursesglyphs[S_tlwall] = ACS_RTEE; + cursesglyphs[S_trwall] = ACS_LTEE; + cursesglyphs[S_tree] = ACS_PLMINUS; + cursesglyphs[S_corr] = ACS_CKBOARD; + cursesglyphs[S_litcorr] = ACS_CKBOARD; + } + + /* Curses has complete access to all characters that DECgraphics uses. + However, their character value isn't consistent between terminals + and implementations. For actual DEC terminals and faithful emulators, + line-drawing characters are specified as lowercase letters (mostly) + and a control code is sent to the terminal telling it to switch + character sets (that's how the tty interface handles them). + Curses remaps the characters instead. */ + if (decgraphics) { + /* the DEC line drawing characters use 0x5f through 0x7e instead + of the much more straightforward 0x60 though 0x7f, possibly + because 0x7f is effectively a control character (Rubout); + nethack ORs 0x80 to flag line drawing--that's stripped below */ + static int decchars[33]; /* for chars 0x5f through 0x7f (95..127) */ + + /* one-time initialization; some ACS_x aren't compile-time constant */ + if (!decchars[0]) { + /* [0] is non-breakable space; irrelevant to nethack */ + decchars[0x5f - 0x5f] = ' '; /* NBSP */ + decchars[0x60 - 0x5f] = ACS_DIAMOND; /* [1] solid diamond */ + decchars[0x61 - 0x5f] = ACS_CKBOARD; /* [2] checkerboard */ + /* several "line drawing" characters are two-letter glyphs + which could be substituted for invisible control codes; + nethack's DECgraphics doesn't use any of them so we're + satisfied with conversion to a simple letter; + [3] "HT" as one char, with small raised upper case H over + and/or preceding small lowered upper case T */ + decchars[0x62 - 0x5f] = 'H'; /* "HT" (horizontal tab) */ + decchars[0x63 - 0x5f] = 'F'; /* "FF" as one char (form feed) */ + decchars[0x64 - 0x5f] = 'C'; /* "CR" as one (carriage return) */ + decchars[0x65 - 0x5f] = 'L'; /* [6] "LF" as one (line feed) */ + decchars[0x66 - 0x5f] = ACS_DEGREE; /* small raised circle */ + /* [8] plus or minus sign, '+' with horizontal line below */ + decchars[0x67 - 0x5f] = ACS_PLMINUS; + decchars[0x68 - 0x5f] = 'N'; /* [9] "NL" as one char (new line) */ + decchars[0x69 - 0x5f] = 'V'; /* [10] "VT" as one (vertical tab) */ + decchars[0x6a - 0x5f] = ACS_LRCORNER; /* lower right corner */ + decchars[0x6b - 0x5f] = ACS_URCORNER; /* upper right corner */ + decchars[0x6c - 0x5f] = ACS_ULCORNER; /* upper left corner */ + decchars[0x6d - 0x5f] = ACS_LLCORNER; /* lower left corner, 'L' */ + /* [15] center cross, like big '+' sign */ + decchars[0x6e - 0x5f] = ACS_PLUS; + decchars[0x6f - 0x5f] = ACS_S1; /* very high horizontal line */ + decchars[0x70 - 0x5f] = ACS_S3; /* medium high horizontal line */ + decchars[0x71 - 0x5f] = ACS_HLINE; /* centered horizontal line */ + decchars[0x72 - 0x5f] = ACS_S7; /* medium low horizontal line */ + decchars[0x73 - 0x5f] = ACS_S9; /* very low horizontal line */ + /* [21] left tee, 'H' with right-hand vertical stroke removed; + note on left vs right: the ACS name (also DEC's terminal + documentation) refers to vertical bar rather than cross stroke, + nethack's left/right refers to direction of the cross stroke */ + decchars[0x74 - 0x5f] = ACS_LTEE; /* ACS left tee, NH right tee */ + /* [22] right tee, 'H' with left-hand vertical stroke removed */ + decchars[0x75 - 0x5f] = ACS_RTEE; /* ACS right tee, NH left tee */ + /* [23] bottom tee, '+' with lower half of vertical stroke + removed and remaining stroke pointed up (unside-down 'T'); + nethack is inconsistent here--unlike with left/right, its + bottom/top directions agree with ACS */ + decchars[0x76 - 0x5f] = ACS_BTEE; /* bottom tee, stroke up */ + /* [24] top tee, '+' with upper half of vertical stroke removed */ + decchars[0x77 - 0x5f] = ACS_TTEE; /* top tee, stroke down, 'T' */ + decchars[0x78 - 0x5f] = ACS_VLINE; /* centered vertical line */ + decchars[0x79 - 0x5f] = ACS_LEQUAL; /* less than or equal to */ + /* [27] greater than or equal to, '>' with underscore */ + decchars[0x7a - 0x5f] = ACS_GEQUAL; + /* [28] Greek pi ('n'-like; case is ambiguous: small size + suggests lower case but flat top suggests upper case) */ + decchars[0x7b - 0x5f] = ACS_PI; + /* [29] not equal sign, combination of '=' and '/' */ + decchars[0x7c - 0x5f] = ACS_NEQUAL; + /* [30] British pound sign (curly 'L' with embellishments) */ + decchars[0x7d - 0x5f] = ACS_STERLING; + decchars[0x7e - 0x5f] = ACS_BULLET; /* [31] centered dot */ + /* [32] is not used for DEC line drawing but is a potential + value for someone who assumes that 0x60..0x7f is the valid + range, so we're prepared to accept--and sanitize--it */ + decchars[0x7f - 0x5f] = '?'; + } + + /* high bit set means special handling */ + if (ch & 0x80) { + int convindx; + + ch &= ~0x80; /* force plain ASCII for last resort */ + convindx = ch - 0x5f; + /* if it's in the lower case block of ASCII (which includes + a few punctuation characters), use the conversion table */ + if (convindx >= 0 && convindx <= SIZE(decchars)) { + ch = decchars[convindx]; + /* in case ACS_foo maps to 0 when current terminal is unable + to handle a particular character; if so, revert to default + rather than using DECgr value with high bit stripped */ + if (!ch) + ch = (int) defsyms[symbol].sym; + } + } return ch; } - switch (symbol) { - case S_vwall: - return ACS_VLINE; - case S_hwall: - return ACS_HLINE; - case S_tlcorn: - return ACS_ULCORNER; - case S_trcorn: - return ACS_URCORNER; - case S_blcorn: - return ACS_LLCORNER; - case S_brcorn: - return ACS_LRCORNER; - case S_crwall: - return ACS_PLUS; - case S_tuwall: - return ACS_BTEE; - case S_tdwall: - return ACS_TTEE; - case S_tlwall: - return ACS_RTEE; - case S_trwall: - return ACS_LTEE; - case S_tree: - return ACS_PLMINUS; - case S_corr: - return ACS_CKBOARD; - case S_litcorr: - return ACS_CKBOARD; + /* + * [Is this correct? How did mapglyph() supply the value if it + * isn't coming from showsyms[]? glyph_is_cmap() test commented + * out because of the nothing-else-gets-here optimization above.] + */ + /* If user selected a custom character for this object, don't + override this. */ + if (/*glyph_is_cmap(glyph) &&*/ ch != showsyms[symbol]) { + retch = ch; + } else { + retch = (symbol >= 0 && symbol < MAXPCHARS) ? cursesglyphs[symbol] : 0; + if (!retch) + retch = ch; } - - return ch; + return retch; } diff --git a/win/curses/cursmisc.h b/win/curses/cursmisc.h index d76346184..9a5b8033b 100644 --- a/win/curses/cursmisc.h +++ b/win/curses/cursmisc.h @@ -19,7 +19,7 @@ char *curses_break_str(const char *str, int width, int line_num); char *curses_str_remainder(const char *str, int width, int line_num); boolean curses_is_menu(winid wid); boolean curses_is_text(winid wid); -int curses_convert_glyph(int ch, int glyph); +int curses_convert_glyph(boolean decgraphics, int ch, int glyph); void curses_move_cursor(winid wid, int x, int y); void curses_prehousekeeping(void); void curses_posthousekeeping(void); From 32e2d7cfc5ec367fcf12b3e6aff10bc08298d74c Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 14 Oct 2019 02:28:27 -0700 Subject: [PATCH 039/529] fix use_inverse (aka wc_inverse) for curses Highlighting for monsters shown due to extended monster detection and for lava shown in black and white didn't work because that keys off of 'iflags.use_inverse' (actually a macro for 'iflags.wc_inverse') and curses wasn't enabling that window-capability option. To be fair, it was probably unconditional at the time the curses interface was first developed. It checked for whether a monster was supposed to be drawn with inverse highlighting but wouldn't draw it that way because the flag was always false. Inverse b&w lava is relatively new and curses hadn't been taught about it. Various other things such as pets (if hilite_pet is on) and object piles (if hilite_pile is on) get highlighted with inverse video when use_color is off, regardless of whether use_inverse is on or off. That's probably a bug. --- doc/fixes36.3 | 6 +++++- src/options.c | 5 +++-- win/curses/cursinit.c | 3 +++ win/curses/cursmain.c | 8 +++++++- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index ee3964155..2cc6a5b6e 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.132 $ $NHDT-Date: 1570872701 2019/10/12 09:31:41 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.137 $ $NHDT-Date: 1571045295 2019/10/14 09:28:15 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -276,6 +276,10 @@ curses: disable the attempt to support Ctrl+Left_click as an alternate way OSX 10.11) documentation and things didn't work as intended curses: menu coloring required that both 'menucolors' and 'guicolor' be On; for menus, override guicolor with more-specific menucolors +curses: support symset:DECgraphics for map display +curses: enable the 'use_inverse' boolean option (via wincap WC_INVERSE flag) + for extended monster detection and black&white lava; forced to True + to override default of False (for tty's benefit) curses+'perm_invent': entries were wrapping without any control; usually not noticeable because next entry overwrote, but visible for final entry when whole inventory fit within the available height; looked ok with diff --git a/src/options.c b/src/options.c index 2e494948a..cc39f585b 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1567240693 2019/08/31 08:38:13 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.369 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1571045295 2019/10/14 09:28:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.376 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -826,8 +826,9 @@ initoptions_init() iflags.wc_align_message = ALIGN_TOP; iflags.wc_align_status = ALIGN_BOTTOM; - /* these are currently only used by curses */ + /* used by tty and curses */ iflags.wc2_statuslines = 2; + /* only used by curses */ iflags.wc2_windowborders = 2; /* 'Auto' */ /* since this is done before init_objects(), do partial init here */ diff --git a/win/curses/cursinit.c b/win/curses/cursinit.c index 2555e71de..7c5ac185b 100644 --- a/win/curses/cursinit.c +++ b/win/curses/cursinit.c @@ -810,6 +810,9 @@ curses_init_options() */ #endif /* PDCURSES */ + /* FIXME: this overrides explicit OPTIONS=!use_inverse */ + iflags.wc_inverse = TRUE; /* aka iflags.use_inverse; default is False */ + /* fix up pet highlighting */ if (iflags.wc2_petattr == -1) /* shouldn't happen */ iflags.wc2_petattr = A_NORMAL; diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index 91a5ffac1..d252b5b6d 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -29,7 +29,8 @@ extern long curs_mesg_suppress_turn; /* from cursmesg.c */ /* Interface definition, for windows.c */ struct window_procs curses_procs = { "curses", - (WC_ALIGN_MESSAGE | WC_ALIGN_STATUS | WC_COLOR | WC_HILITE_PET + (WC_ALIGN_MESSAGE | WC_ALIGN_STATUS | WC_COLOR | WC_INVERSE + | WC_HILITE_PET #ifdef NCURSES_MOUSE_VERSION /* (this macro name works for PDCURSES too) */ | WC_MOUSE_SUPPORT #endif @@ -675,6 +676,11 @@ curses_print_glyph(winid wid, XCHAR_P x, XCHAR_P y, int glyph, else attr = A_REVERSE; } + /* water and lava look the same except for color; when color is off, + render lava in inverse video so that they look different */ + if ((special & MG_BW_LAVA) && iflags.use_inverse) { + attr = A_REVERSE; /* mapglyph() only sets this if color is off */ + } } curses_putch(wid, x, y, ch, color, attr); From d550a33167d9b1bf841d58a2f7ce7427e3d30595 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 14 Oct 2019 02:53:19 -0700 Subject: [PATCH 040/529] curses decgraphics bit Array bounds error; thinko rather than typo. --- win/curses/cursmisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/curses/cursmisc.c b/win/curses/cursmisc.c index aed91e84c..ba3ff1bc8 100644 --- a/win/curses/cursmisc.c +++ b/win/curses/cursmisc.c @@ -595,7 +595,7 @@ curses_convert_glyph(boolean decgraphics, int ch, int glyph) convindx = ch - 0x5f; /* if it's in the lower case block of ASCII (which includes a few punctuation characters), use the conversion table */ - if (convindx >= 0 && convindx <= SIZE(decchars)) { + if (convindx >= 0 && convindx < SIZE(decchars)) { ch = decchars[convindx]; /* in case ACS_foo maps to 0 when current terminal is unable to handle a particular character; if so, revert to default From 7c53077eb7777dbd16d194287c23c186a36bc9e6 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 14 Oct 2019 16:02:30 -0700 Subject: [PATCH 041/529] comment typo --- win/curses/cursmisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/curses/cursmisc.c b/win/curses/cursmisc.c index ba3ff1bc8..2a2dd8a7b 100644 --- a/win/curses/cursmisc.c +++ b/win/curses/cursmisc.c @@ -518,7 +518,7 @@ curses_convert_glyph(boolean decgraphics, int ch, int glyph) Curses remaps the characters instead. */ if (decgraphics) { /* the DEC line drawing characters use 0x5f through 0x7e instead - of the much more straightforward 0x60 though 0x7f, possibly + of the much more straightforward 0x60 through 0x7f, possibly because 0x7f is effectively a control character (Rubout); nethack ORs 0x80 to flag line drawing--that's stripped below */ static int decchars[33]; /* for chars 0x5f through 0x7f (95..127) */ From d0c4d27a507b390cc13d85a49d5876c3f2428109 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 16 Oct 2019 15:52:00 -0700 Subject: [PATCH 042/529] githib pull request #232 - curses symset This time I'm putting things in as-is before making a few tweaks. The pull request was three or four separate changes. I used the patch instead so they've been collected into one commit. --- dat/symbols | 34 +++++++ include/rm.h | 3 +- include/wincurs.h | 2 +- src/drawing.c | 1 + src/options.c | 4 + win/curses/cursinit.c | 5 + win/curses/cursmain.c | 4 +- win/curses/cursmisc.c | 224 +++++++++++++++++------------------------- win/curses/cursmisc.h | 2 +- 9 files changed, 137 insertions(+), 142 deletions(-) diff --git a/dat/symbols b/dat/symbols index be27dad5d..364c6db21 100644 --- a/dat/symbols +++ b/dat/symbols @@ -15,6 +15,11 @@ # NetHack encodes the request to use the alternate font here by # having the high bit set (in hexadecimal, \x80 is combined with # a character code between \x60 and \x7f). +# +# curses is an approximation of IBMgraphics which relies on DEC +# mode of operation, with a few characters missing. It is based +# on an old graphics mode for the Curses mode and is the default +# on that windowport if no symset is specified. start: DECgraphics Handling: DEC @@ -55,6 +60,35 @@ start: DECgraphics S_explode8: \xf3 # meta-s, low horizontal line finish +start: curses + Handling: DEC + S_vwall: \xf8 # meta-x, vertical rule + S_hwall: \xf1 # meta-q, horizontal rule + S_tlcorn: \xec # meta-l, top left corner + S_trcorn: \xeb # meta-k, top right corner + S_blcorn: \xed # meta-m, bottom left + S_brcorn: \xea # meta-j, bottom right + S_crwall: \xee # meta-n, cross + S_tuwall: \xf6 # meta-v, T up + S_tdwall: \xf7 # meta-w, T down + S_tlwall: \xf5 # meta-u, T left + S_trwall: \xf4 # meta-t, T right + S_ndoor: \xfe # meta-z, centered dot + S_tree: \xf1 # plus or minus symbol + S_room: \xfe # meta-z, centered dot + S_corr: \xe1 # meta-a, solid block + S_litcorr: \xe1 # meta-a, solid block + S_ice: \xfe # meta-z, centered dot + S_vodbridge: \xfe # meta-z, centered dot + S_hodbridge: \xfe # meta-z, centered dot + S_vbeam: \xf8 # meta-3, vertical rule + S_hbeam: \xf1 # meta-D, horizontal rule + S_sw_ml: \xf8 # meta-3, vertical rule + S_sw_mr: \xf8 # meta-3, vertical rule + S_explode4: \xf8 # meta-3, vertical rule + S_explode6: \xf8 # meta-3, vertical rule +finish + start: IBMgraphics Handling: IBM S_vwall: \xb3 # meta-3, vertical rule diff --git a/include/rm.h b/include/rm.h index 1190a355b..becdd21a0 100644 --- a/include/rm.h +++ b/include/rm.h @@ -278,7 +278,8 @@ struct symsetentry { Bitfield(nocolor, 1); /* don't use color if set */ Bitfield(primary, 1); /* restricted for use as primary set */ Bitfield(rogue, 1); /* restricted for use as rogue lev set */ - /* 5 free bits */ + Bitfield(fallback, 1); /* no explicit symset set */ + /* 4 free bits */ }; /* diff --git a/include/wincurs.h b/include/wincurs.h index c7d16f9e5..8ae45e10e 100644 --- a/include/wincurs.h +++ b/include/wincurs.h @@ -152,7 +152,7 @@ extern char *curses_break_str(const char *str, int width, int line_num); extern char *curses_str_remainder(const char *str, int width, int line_num); extern boolean curses_is_menu(winid wid); extern boolean curses_is_text(winid wid); -extern int curses_convert_glyph(boolean decgraphics, int ch, int glyph); +extern int curses_convert_glyph(int ch, int glyph); extern void curses_move_cursor(winid wid, int x, int y); extern void curses_prehousekeeping(void); extern void curses_posthousekeeping(void); diff --git a/src/drawing.c b/src/drawing.c index e9a1e08e1..f29dbf3a2 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -543,6 +543,7 @@ boolean name_too; /* initialize restriction bits */ symset[which_set].primary = 0; symset[which_set].rogue = 0; + symset[which_set].fallback = TRUE; if (name_too) { if (symset[which_set].name) diff --git a/src/options.c b/src/options.c index cc39f585b..220f8f483 100644 --- a/src/options.c +++ b/src/options.c @@ -2315,6 +2315,7 @@ boolean tinitial, tfrom_file; } else { if (!initial && Is_rogue_level(&u.uz)) assign_graphics(ROGUESET); + symset[ROGUESET].fallback = FALSE; need_redraw = TRUE; } } else @@ -2339,6 +2340,7 @@ boolean tinitial, tfrom_file; return FALSE; } else { switch_symbols(symset[PRIMARY].name != (char *) 0); + symset[PRIMARY].fallback = FALSE; need_redraw = TRUE; } } else @@ -6008,8 +6010,10 @@ int which_set; if (read_sym_file(which_set)) { switch_symbols(TRUE); + symset[which_set].fallback = FALSE; } else { clear_symsetentry(which_set, TRUE); + symset[which_set].fallback = TRUE; return 0; } return 1; diff --git a/win/curses/cursinit.c b/win/curses/cursinit.c index 7c5ac185b..773334855 100644 --- a/win/curses/cursinit.c +++ b/win/curses/cursinit.c @@ -784,6 +784,11 @@ curses_init_options() /* Remove a few options that are irrelevant to this windowport */ set_option_mod_status("eight_bit_tty", SET_IN_FILE); + /* If we don't have a symset defined, load the curses symset by default */ + if (symset[PRIMARY].fallback) { + load_symset("curses", PRIMARY); + load_symset("default", ROGUESET); + } #ifdef PDCURSES /* PDCurses for SDL, win32 and OS/2 has the ability to set the terminal size programatically. If the user does not specify a diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index d252b5b6d..e0b69b42c 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -660,9 +660,7 @@ curses_print_glyph(winid wid, XCHAR_P x, XCHAR_P y, int glyph, attr = A_REVERSE; } if (SYMHANDLING(H_DEC)) - ch = curses_convert_glyph(TRUE, ch, glyph); - else if (!symset[PRIMARY].name || !strcmpi(symset[PRIMARY].name, "curses")) - ch = curses_convert_glyph(FALSE, ch, glyph); + ch = curses_convert_glyph(ch, glyph); if (wid == NHW_MAP) { /* hilite stairs not in 3.6, yet diff --git a/win/curses/cursmisc.c b/win/curses/cursmisc.c index 2a2dd8a7b..df3316679 100644 --- a/win/curses/cursmisc.c +++ b/win/curses/cursmisc.c @@ -74,7 +74,7 @@ curses_read_char() #ifdef KEY_RESIZE /* Handle resize events via get_nh_event, not this code */ if (ch == KEY_RESIZE) { - ch = '\033'; /* NetHack doesn't know what to do with KEY_RESIZE */ + ch = C('r'); /* NetHack doesn't know what to do with KEY_RESIZE */ } #endif @@ -467,161 +467,113 @@ curses_is_text(winid wid) cursesgraphics option is enabled, or special curses handling for DECgraphics */ int -curses_convert_glyph(boolean decgraphics, int ch, int glyph) +curses_convert_glyph(int ch, int glyph) { - static int cursesglyphs[MAXPCHARS], cursesglyphsinited = 0; int retch, symbol; /* FIXME? we don't support any special characters in roguesymset */ if (Is_rogue_level(&u.uz)) return ch; - /* Save some processing time by returning if the glyph represents - an object that we don't have custom characters for */ - if (!glyph_is_cmap(glyph)) - return ch; - symbol = glyph_to_cmap(glyph); - /* - * FIXME: - * 'cursesgraphics' should be a symbol set so that users can - * modify it without having to edit this source file and rebuild - * the program. Unfortunately these ACS values are 32-bit ones - * and not user-friendly. - */ - if (!cursesglyphsinited) { /* one-time initialization */ - cursesglyphsinited = 1; - cursesglyphs[S_vwall] = ACS_VLINE; - cursesglyphs[S_hwall] = ACS_HLINE; - cursesglyphs[S_tlcorn] = ACS_ULCORNER; - cursesglyphs[S_trcorn] = ACS_URCORNER; - cursesglyphs[S_blcorn] = ACS_LLCORNER; - cursesglyphs[S_brcorn] = ACS_LRCORNER; - cursesglyphs[S_crwall] = ACS_PLUS; - cursesglyphs[S_tuwall] = ACS_BTEE; - cursesglyphs[S_tdwall] = ACS_TTEE; - /* yes, the left/right Ts are inverted nethack vs curses */ - cursesglyphs[S_tlwall] = ACS_RTEE; - cursesglyphs[S_trwall] = ACS_LTEE; - cursesglyphs[S_tree] = ACS_PLMINUS; - cursesglyphs[S_corr] = ACS_CKBOARD; - cursesglyphs[S_litcorr] = ACS_CKBOARD; - } - /* Curses has complete access to all characters that DECgraphics uses. However, their character value isn't consistent between terminals and implementations. For actual DEC terminals and faithful emulators, line-drawing characters are specified as lowercase letters (mostly) and a control code is sent to the terminal telling it to switch character sets (that's how the tty interface handles them). - Curses remaps the characters instead. */ - if (decgraphics) { - /* the DEC line drawing characters use 0x5f through 0x7e instead - of the much more straightforward 0x60 through 0x7f, possibly - because 0x7f is effectively a control character (Rubout); - nethack ORs 0x80 to flag line drawing--that's stripped below */ - static int decchars[33]; /* for chars 0x5f through 0x7f (95..127) */ + Curses remaps the characters instead. - /* one-time initialization; some ACS_x aren't compile-time constant */ - if (!decchars[0]) { - /* [0] is non-breakable space; irrelevant to nethack */ - decchars[0x5f - 0x5f] = ' '; /* NBSP */ - decchars[0x60 - 0x5f] = ACS_DIAMOND; /* [1] solid diamond */ - decchars[0x61 - 0x5f] = ACS_CKBOARD; /* [2] checkerboard */ - /* several "line drawing" characters are two-letter glyphs - which could be substituted for invisible control codes; - nethack's DECgraphics doesn't use any of them so we're - satisfied with conversion to a simple letter; - [3] "HT" as one char, with small raised upper case H over - and/or preceding small lowered upper case T */ - decchars[0x62 - 0x5f] = 'H'; /* "HT" (horizontal tab) */ - decchars[0x63 - 0x5f] = 'F'; /* "FF" as one char (form feed) */ - decchars[0x64 - 0x5f] = 'C'; /* "CR" as one (carriage return) */ - decchars[0x65 - 0x5f] = 'L'; /* [6] "LF" as one (line feed) */ - decchars[0x66 - 0x5f] = ACS_DEGREE; /* small raised circle */ - /* [8] plus or minus sign, '+' with horizontal line below */ - decchars[0x67 - 0x5f] = ACS_PLMINUS; - decchars[0x68 - 0x5f] = 'N'; /* [9] "NL" as one char (new line) */ - decchars[0x69 - 0x5f] = 'V'; /* [10] "VT" as one (vertical tab) */ - decchars[0x6a - 0x5f] = ACS_LRCORNER; /* lower right corner */ - decchars[0x6b - 0x5f] = ACS_URCORNER; /* upper right corner */ - decchars[0x6c - 0x5f] = ACS_ULCORNER; /* upper left corner */ - decchars[0x6d - 0x5f] = ACS_LLCORNER; /* lower left corner, 'L' */ - /* [15] center cross, like big '+' sign */ - decchars[0x6e - 0x5f] = ACS_PLUS; - decchars[0x6f - 0x5f] = ACS_S1; /* very high horizontal line */ - decchars[0x70 - 0x5f] = ACS_S3; /* medium high horizontal line */ - decchars[0x71 - 0x5f] = ACS_HLINE; /* centered horizontal line */ - decchars[0x72 - 0x5f] = ACS_S7; /* medium low horizontal line */ - decchars[0x73 - 0x5f] = ACS_S9; /* very low horizontal line */ - /* [21] left tee, 'H' with right-hand vertical stroke removed; - note on left vs right: the ACS name (also DEC's terminal - documentation) refers to vertical bar rather than cross stroke, - nethack's left/right refers to direction of the cross stroke */ - decchars[0x74 - 0x5f] = ACS_LTEE; /* ACS left tee, NH right tee */ - /* [22] right tee, 'H' with left-hand vertical stroke removed */ - decchars[0x75 - 0x5f] = ACS_RTEE; /* ACS right tee, NH left tee */ - /* [23] bottom tee, '+' with lower half of vertical stroke - removed and remaining stroke pointed up (unside-down 'T'); - nethack is inconsistent here--unlike with left/right, its - bottom/top directions agree with ACS */ - decchars[0x76 - 0x5f] = ACS_BTEE; /* bottom tee, stroke up */ - /* [24] top tee, '+' with upper half of vertical stroke removed */ - decchars[0x77 - 0x5f] = ACS_TTEE; /* top tee, stroke down, 'T' */ - decchars[0x78 - 0x5f] = ACS_VLINE; /* centered vertical line */ - decchars[0x79 - 0x5f] = ACS_LEQUAL; /* less than or equal to */ - /* [27] greater than or equal to, '>' with underscore */ - decchars[0x7a - 0x5f] = ACS_GEQUAL; - /* [28] Greek pi ('n'-like; case is ambiguous: small size - suggests lower case but flat top suggests upper case) */ - decchars[0x7b - 0x5f] = ACS_PI; - /* [29] not equal sign, combination of '=' and '/' */ - decchars[0x7c - 0x5f] = ACS_NEQUAL; - /* [30] British pound sign (curly 'L' with embellishments) */ - decchars[0x7d - 0x5f] = ACS_STERLING; - decchars[0x7e - 0x5f] = ACS_BULLET; /* [31] centered dot */ - /* [32] is not used for DEC line drawing but is a potential - value for someone who assumes that 0x60..0x7f is the valid - range, so we're prepared to accept--and sanitize--it */ - decchars[0x7f - 0x5f] = '?'; - } + The DEC line drawing characters use 0x5f through 0x7e instead + of the much more straightforward 0x60 through 0x7f, possibly + because 0x7f is effectively a control character (Rubout); + nethack ORs 0x80 to flag line drawing--that's stripped below */ + static int decchars[33]; /* for chars 0x5f through 0x7f (95..127) */ - /* high bit set means special handling */ - if (ch & 0x80) { - int convindx; - - ch &= ~0x80; /* force plain ASCII for last resort */ - convindx = ch - 0x5f; - /* if it's in the lower case block of ASCII (which includes - a few punctuation characters), use the conversion table */ - if (convindx >= 0 && convindx < SIZE(decchars)) { - ch = decchars[convindx]; - /* in case ACS_foo maps to 0 when current terminal is unable - to handle a particular character; if so, revert to default - rather than using DECgr value with high bit stripped */ - if (!ch) - ch = (int) defsyms[symbol].sym; - } - } - return ch; + /* one-time initialization; some ACS_x aren't compile-time constant */ + if (!decchars[0]) { + /* [0] is non-breakable space; irrelevant to nethack */ + decchars[0x5f - 0x5f] = ' '; /* NBSP */ + decchars[0x60 - 0x5f] = ACS_DIAMOND; /* [1] solid diamond */ + decchars[0x61 - 0x5f] = ACS_CKBOARD; /* [2] checkerboard */ + /* several "line drawing" characters are two-letter glyphs + which could be substituted for invisible control codes; + nethack's DECgraphics doesn't use any of them so we're + satisfied with conversion to a simple letter; + [3] "HT" as one char, with small raised upper case H over + and/or preceding small lowered upper case T */ + decchars[0x62 - 0x5f] = 'H'; /* "HT" (horizontal tab) */ + decchars[0x63 - 0x5f] = 'F'; /* "FF" as one char (form feed) */ + decchars[0x64 - 0x5f] = 'C'; /* "CR" as one (carriage return) */ + decchars[0x65 - 0x5f] = 'L'; /* [6] "LF" as one (line feed) */ + decchars[0x66 - 0x5f] = ACS_DEGREE; /* small raised circle */ + /* [8] plus or minus sign, '+' with horizontal line below */ + decchars[0x67 - 0x5f] = ACS_PLMINUS; + decchars[0x68 - 0x5f] = 'N'; /* [9] "NL" as one char (new line) */ + decchars[0x69 - 0x5f] = 'V'; /* [10] "VT" as one (vertical tab) */ + decchars[0x6a - 0x5f] = ACS_LRCORNER; /* lower right corner */ + decchars[0x6b - 0x5f] = ACS_URCORNER; /* upper right corner */ + decchars[0x6c - 0x5f] = ACS_ULCORNER; /* upper left corner */ + decchars[0x6d - 0x5f] = ACS_LLCORNER; /* lower left corner, 'L' */ + /* [15] center cross, like big '+' sign */ + decchars[0x6e - 0x5f] = ACS_PLUS; + decchars[0x6f - 0x5f] = ACS_S1; /* very high horizontal line */ + decchars[0x70 - 0x5f] = ACS_S3; /* medium high horizontal line */ + decchars[0x71 - 0x5f] = ACS_HLINE; /* centered horizontal line */ + decchars[0x72 - 0x5f] = ACS_S7; /* medium low horizontal line */ + decchars[0x73 - 0x5f] = ACS_S9; /* very low horizontal line */ + /* [21] left tee, 'H' with right-hand vertical stroke removed; + note on left vs right: the ACS name (also DEC's terminal + documentation) refers to vertical bar rather than cross stroke, + nethack's left/right refers to direction of the cross stroke */ + decchars[0x74 - 0x5f] = ACS_LTEE; /* ACS left tee, NH right tee */ + /* [22] right tee, 'H' with left-hand vertical stroke removed */ + decchars[0x75 - 0x5f] = ACS_RTEE; /* ACS right tee, NH left tee */ + /* [23] bottom tee, '+' with lower half of vertical stroke + removed and remaining stroke pointed up (unside-down 'T'); + nethack is inconsistent here--unlike with left/right, its + bottom/top directions agree with ACS */ + decchars[0x76 - 0x5f] = ACS_BTEE; /* bottom tee, stroke up */ + /* [24] top tee, '+' with upper half of vertical stroke removed */ + decchars[0x77 - 0x5f] = ACS_TTEE; /* top tee, stroke down, 'T' */ + decchars[0x78 - 0x5f] = ACS_VLINE; /* centered vertical line */ + decchars[0x79 - 0x5f] = ACS_LEQUAL; /* less than or equal to */ + /* [27] greater than or equal to, '>' with underscore */ + decchars[0x7a - 0x5f] = ACS_GEQUAL; + /* [28] Greek pi ('n'-like; case is ambiguous: small size + suggests lower case but flat top suggests upper case) */ + decchars[0x7b - 0x5f] = ACS_PI; + /* [29] not equal sign, combination of '=' and '/' */ + decchars[0x7c - 0x5f] = ACS_NEQUAL; + /* [30] British pound sign (curly 'L' with embellishments) */ + decchars[0x7d - 0x5f] = ACS_STERLING; + decchars[0x7e - 0x5f] = ACS_BULLET; /* [31] centered dot */ + /* [32] is not used for DEC line drawing but is a potential + value for someone who assumes that 0x60..0x7f is the valid + range, so we're prepared to accept--and sanitize--it */ + decchars[0x7f - 0x5f] = '?'; } - /* - * [Is this correct? How did mapglyph() supply the value if it - * isn't coming from showsyms[]? glyph_is_cmap() test commented - * out because of the nothing-else-gets-here optimization above.] - */ - /* If user selected a custom character for this object, don't - override this. */ - if (/*glyph_is_cmap(glyph) &&*/ ch != showsyms[symbol]) { - retch = ch; - } else { - retch = (symbol >= 0 && symbol < MAXPCHARS) ? cursesglyphs[symbol] : 0; - if (!retch) - retch = ch; + /* high bit set means special handling */ + if (ch & 0x80) { + int convindx; + + ch &= ~0x80; /* force plain ASCII for last resort */ + convindx = ch - 0x5f; + /* if it's in the lower case block of ASCII (which includes + a few punctuation characters), use the conversion table */ + if (convindx >= 0 && convindx < SIZE(decchars)) { + ch = decchars[convindx]; + /* in case ACS_foo maps to 0 when current terminal is unable + to handle a particular character; if so, revert to default + rather than using DECgr value with high bit stripped */ + if (!ch) + ch = (int) defsyms[symbol].sym; + } } - return retch; + + return ch; } diff --git a/win/curses/cursmisc.h b/win/curses/cursmisc.h index 9a5b8033b..d76346184 100644 --- a/win/curses/cursmisc.h +++ b/win/curses/cursmisc.h @@ -19,7 +19,7 @@ char *curses_break_str(const char *str, int width, int line_num); char *curses_str_remainder(const char *str, int width, int line_num); boolean curses_is_menu(winid wid); boolean curses_is_text(winid wid); -int curses_convert_glyph(boolean decgraphics, int ch, int glyph); +int curses_convert_glyph(int ch, int glyph); void curses_move_cursor(winid wid, int x, int y); void curses_prehousekeeping(void); void curses_posthousekeeping(void); From 33d33fcf193ec0a187df7c25a3c717d044cf737b Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 16 Oct 2019 16:19:51 -0700 Subject: [PATCH 043/529] fix curses build warning and update fixes36.3 Move a declaration that became mid-block when a preceding 'if () {' got removed to top of block suppress warning about C99 feature. Add new entry for the curses symset change to fixes36.3. --- doc/fixes36.3 | 5 ++++- win/curses/cursmisc.c | 19 ++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 2cc6a5b6e..809ddab65 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.137 $ $NHDT-Date: 1571045295 2019/10/14 09:28:15 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.138 $ $NHDT-Date: 1571267989 2019/10/16 23:19:49 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -346,6 +346,9 @@ curses: give menus and text windows a minimum size of 5x25 since tiny ones can curses+'perm_invent': since persistent inventory is narrow, strip off "a", "an", or "the" prefix on inventory entries shown there so that a tiny bit more of the interesting portion is visible +curses+'curses': change the curses map display to use new symbol set 'curses' + instead of hard-coded values; it attempts to show IBMgraphics-style + map using DECgraphics characters; DECgraphics can also be used as-is NetHack Community Patches (or Variation) Included diff --git a/win/curses/cursmisc.c b/win/curses/cursmisc.c index df3316679..ab6a3bd45 100644 --- a/win/curses/cursmisc.c +++ b/win/curses/cursmisc.c @@ -463,13 +463,16 @@ curses_is_text(winid wid) } } -/* Replace certain characters with portable drawing characters if - cursesgraphics option is enabled, or special curses handling for - DECgraphics */ +/* convert nethack's DECgraphics encoding into curses' ACS encoding */ int curses_convert_glyph(int ch, int glyph) { - int retch, symbol; + /* The DEC line drawing characters use 0x5f through 0x7e instead + of the much more straightforward 0x60 through 0x7f, possibly + because 0x7f is effectively a control character (Rubout); + nethack ORs 0x80 to flag line drawing--that's stripped below */ + static int decchars[33]; /* for chars 0x5f through 0x7f (95..127) */ + int symbol; /* FIXME? we don't support any special characters in roguesymset */ if (Is_rogue_level(&u.uz)) @@ -483,13 +486,7 @@ curses_convert_glyph(int ch, int glyph) line-drawing characters are specified as lowercase letters (mostly) and a control code is sent to the terminal telling it to switch character sets (that's how the tty interface handles them). - Curses remaps the characters instead. - - The DEC line drawing characters use 0x5f through 0x7e instead - of the much more straightforward 0x60 through 0x7f, possibly - because 0x7f is effectively a control character (Rubout); - nethack ORs 0x80 to flag line drawing--that's stripped below */ - static int decchars[33]; /* for chars 0x5f through 0x7f (95..127) */ + Curses remaps the characters instead. */ /* one-time initialization; some ACS_x aren't compile-time constant */ if (!decchars[0]) { From 3e368b9a51c496ab2ae35c247fa7d0e23aeafe66 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 17 Oct 2019 05:00:58 -0700 Subject: [PATCH 044/529] symbol set reorganization Change the way symbol sets are loaded to make them have the same order as they appear in the symbols file rather than being reversed. Revise dat/symbols so that the new ordering yields a result similar to the old ordering, more or less. I've added a few set descriptions. The only substantive change is marking DECgraphics as primary-only (not available on rogue level) and adding new set DECgraphics_2 which is commented out near the end. Define symbol handling H_MAC since one of the sets specifies 'handling: MAC'. All H_MAC is used for now is to avoid showing MACgraphics as a symset when compiled without MAC_GRAPHICS_ENV (which was used for pre-OSX Mac by the old code in sys/mac/), so it will be hidden for everyone. I left handling H_CURS even though curses doesn't implement anything for it. It could do something when rendering the map or assign a function to 'cursesgraphics_mode_callback' for special init or both but hasn't needed to. Since curses is now supporting DECgraphics, define 'decgraphics_mode_callback' for it. No value is being assigned so that doesn't do anything; curses seems to be setting up the primary character set as text and secondary one as line-drawing without the need for that hook. With the added set descriptions, 'O's symset menu looked horrible for curses due to the way curses decides to set the width of menus and the resulting line wrapping which took place because of a too-narrow menu. I've added a chunk of code to the options handling code which shouldn't really be there but makes the menu much easier to read. Lastly, do some formatting cleanup in files.c. --- dat/symbols | 712 ++++++++++++++++++++++++++------------------------ doc/fixes36.3 | 6 +- include/rm.h | 4 +- src/drawing.c | 18 +- src/files.c | 37 ++- src/options.c | 61 ++++- 6 files changed, 474 insertions(+), 364 deletions(-) diff --git a/dat/symbols b/dat/symbols index 364c6db21..8e8a6349f 100644 --- a/dat/symbols +++ b/dat/symbols @@ -1,4 +1,4 @@ -# NetHack 3.6 symbols $NHDT-Date: 1570919632 2019/10/12 22:33:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.17 $ +# NetHack 3.6 symbols $NHDT-Date: 1571313649 2019/10/17 12:00:49 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.19 $ # Copyright (c) 2006 by Michael Allison # NetHack may be freely redistributed. See license for details. # @@ -14,325 +14,35 @@ # of ordinary printable characters in the lowercase letter range. # NetHack encodes the request to use the alternate font here by # having the high bit set (in hexadecimal, \x80 is combined with -# a character code between \x60 and \x7f). +# a character code between \x5f and \x7e) (not 0x60 to 0x7f as was +# previously claimed). # # curses is an approximation of IBMgraphics which relies on DEC -# mode of operation, with a few characters missing. It is based -# on an old graphics mode for the Curses mode and is the default -# on that windowport if no symset is specified. +# mode of operation, with a few characters missing. It is based +# on an old graphics mode for the Curses interface and is the default +# on that windowport if no symset is specified. The Curses interface +# can also use DECgraphics as-is; IBMgraphics probably won't work. -start: DECgraphics - Handling: DEC - S_vwall: \xf8 # meta-x, vertical rule - S_hwall: \xf1 # meta-q, horizontal rule - S_tlcorn: \xec # meta-l, top left corner - S_trcorn: \xeb # meta-k, top right corner - S_blcorn: \xed # meta-m, bottom left - S_brcorn: \xea # meta-j, bottom right - S_crwall: \xee # meta-n, cross - S_tuwall: \xf6 # meta-v, T up - S_tdwall: \xf7 # meta-w, T down - S_tlwall: \xf5 # meta-u, T left - S_trwall: \xf4 # meta-t, T right - S_ndoor: \xfe # meta-~, centered dot - S_vodoor: \xe1 # meta-a, solid block - S_hodoor: \xe1 # meta-a, solid block - S_bars: \xfb # meta-{, small pi - S_tree: \xe7 # meta-g, plus-or-minus - S_room: \xfe # meta-~, centered dot - S_upladder: \xf9 # meta-y, less-than-or-equals - S_dnladder: \xfa # meta-z, greater-than-or-equals - S_pool: \xe0 # meta-\, diamond - S_ice: \xfe # meta-~, centered dot - S_lava: \xe0 # meta-\, diamond - S_vodbridge: \xfe # meta-~, centered dot - S_hodbridge: \xfe # meta-~, centered dot - S_water: \xe0 # meta-\, diamond - S_vbeam: \xf8 # meta-x, vertical rule - S_hbeam: \xf1 # meta-q, horizontal rule - S_sw_tc: \xef # meta-o, high horizontal line - S_sw_ml: \xf8 # meta-x, vertical rule - S_sw_mr: \xf8 # meta-x, vertical rule - S_sw_bc: \xf3 # meta-s, low horizontal line - S_explode2: \xef # meta-o, high horizontal line - S_explode4: \xf8 # meta-x, vertical rule - S_explode6: \xf8 # meta-x, vertical rule - S_explode8: \xf3 # meta-s, low horizontal line -finish +# plain looks decent for wall+corridor levels where there aren't a lot +# of room corners and ones present tend to be spread out, but it looks +# awful for wallified mazes +start: plain + Description: same as default symbols, except '+' for corner walls + S_tlcorn: '+' + S_trcorn: '+' + S_blcorn: '+' + S_brcorn: '+' + S_crwall: '+' + S_tuwall: '+' + S_tdwall: '+' + S_tlwall: '+' + S_trwall: '+' +finish #plain -- other symbols implicitly retain their default values -start: curses - Handling: DEC - S_vwall: \xf8 # meta-x, vertical rule - S_hwall: \xf1 # meta-q, horizontal rule - S_tlcorn: \xec # meta-l, top left corner - S_trcorn: \xeb # meta-k, top right corner - S_blcorn: \xed # meta-m, bottom left - S_brcorn: \xea # meta-j, bottom right - S_crwall: \xee # meta-n, cross - S_tuwall: \xf6 # meta-v, T up - S_tdwall: \xf7 # meta-w, T down - S_tlwall: \xf5 # meta-u, T left - S_trwall: \xf4 # meta-t, T right - S_ndoor: \xfe # meta-z, centered dot - S_tree: \xf1 # plus or minus symbol - S_room: \xfe # meta-z, centered dot - S_corr: \xe1 # meta-a, solid block - S_litcorr: \xe1 # meta-a, solid block - S_ice: \xfe # meta-z, centered dot - S_vodbridge: \xfe # meta-z, centered dot - S_hodbridge: \xfe # meta-z, centered dot - S_vbeam: \xf8 # meta-3, vertical rule - S_hbeam: \xf1 # meta-D, horizontal rule - S_sw_ml: \xf8 # meta-3, vertical rule - S_sw_mr: \xf8 # meta-3, vertical rule - S_explode4: \xf8 # meta-3, vertical rule - S_explode6: \xf8 # meta-3, vertical rule -finish - -start: IBMgraphics - Handling: IBM - S_vwall: \xb3 # meta-3, vertical rule - S_hwall: \xc4 # meta-D, horizontal rule - S_tlcorn: \xda # meta-Z, top left corner - S_trcorn: \xbf # meta-?, top right corner - S_blcorn: \xc0 # meta-@, bottom left - S_brcorn: \xd9 # meta-Y, bottom right - S_crwall: \xc5 # meta-E, cross - S_tuwall: \xc1 # meta-A, T up - S_tdwall: \xc2 # meta-B, T down - S_tlwall: \xb4 # meta-4, T left - S_trwall: \xc3 # meta-C, T right - S_ndoor: \xfa # meta-z, centered dot - S_vodoor: \xfe # meta-~, small centered square - S_hodoor: \xfe # meta-~, small centered square - S_bars: \xf0 # equivalence symbol - S_tree: \xf1 # plus or minus symbol - S_room: \xfa # meta-z, centered dot - S_corr: \xb0 # meta-0, light shading - S_litcorr: \xb1 # meta-1, medium shading - S_fountain: \xf4 # meta-t, integral top half - S_pool: \xf7 # meta-w, approx. equals - S_ice: \xfa # meta-z, centered dot - S_lava: \xf7 # meta-w, approx. equals - S_vodbridge: \xfa # meta-z, centered dot - S_hodbridge: \xfa # meta-z, centered dot - S_water: \xf7 # meta-w, approx. equals - S_vbeam: \xb3 # meta-3, vertical rule - S_hbeam: \xc4 # meta-D, horizontal rule - S_sw_ml: \xb3 # meta-3, vertical rule - S_sw_mr: \xb3 # meta-3, vertical rule - S_explode4: \xb3 # meta-3, vertical rule - S_explode6: \xb3 # meta-3, vertical rule -finish - -start: IBMGraphics_1 - Handling: IBM - S_vwall: \xb3 # meta-3, vertical rule - S_hwall: \xc4 # meta-D, horizontal rule - S_tlcorn: \xda # meta-Z, top left corner - S_trcorn: \xbf # meta-?, top right corner - S_blcorn: \xc0 # meta-@, bottom left - S_brcorn: \xd9 # meta-Y, bottom right - S_crwall: \xc5 # meta-E, cross - S_tuwall: \xc1 # meta-A, T up - S_tdwall: \xc2 # meta-B, T down - S_tlwall: \xb4 # meta-4, T left - S_trwall: \xc3 # meta-C, T right - S_vbeam: \xb3 # meta-3, vertical rule - S_hbeam: \xc4 # meta-D, horizontal rule - S_sw_ml: \xb3 # meta-3, vertical rule - S_sw_mr: \xb3 # meta-3, vertical rule - S_explode4: \xb3 # meta-3, vertical rule - S_explode6: \xb3 # meta-3, vertical rule -finish - -start: IBMGraphics_2 - Handling: IBM - S_vwall: \xb3 # meta-3, vertical rule - S_hwall: \xc4 # meta-D, horizontal rule - S_tlcorn: \xda # meta-Z, top left corner - S_trcorn: \xbf # meta-?, top right corner - S_blcorn: \xc0 # meta-@, bottom left - S_brcorn: \xd9 # meta-Y, bottom right - S_crwall: \xc5 # meta-E, cross - S_tuwall: \xc1 # meta-A, T up - S_tdwall: \xc2 # meta-B, T down - S_tlwall: \xb4 # meta-4, T left - S_trwall: \xc3 # meta-C, T right - S_vodoor: \xfe # meta-~, small centered square - S_hodoor: \xfe # meta-~, small centered square - S_corr: \xb0 # meta-0, light shading - S_litcorr: \xb1 # meta-1, medium shading - S_vbeam: \xb3 # meta-3, vertical rule - S_hbeam: \xc4 # meta-D, horizontal rule - S_sw_ml: \xb3 # meta-3, vertical rule - S_sw_mr: \xb3 # meta-3, vertical rule - S_explode4: \xb3 # meta-3, vertical rule - S_explode6: \xb3 # meta-3, vertical rule -finish - -start: MACgraphics - Handling: MAC - S_vwall: \xba - S_hwall: \xcd - S_tlcorn: \xc9 - S_trcorn: \xbb - S_blcorn: \xc8 - S_brcorn: \xbc - S_crwall: \xce - S_tuwall: \xca - S_tdwall: \xcb - S_tlwall: \xb9 - S_trwall: \xcc - S_ndoor: \xb0 - S_vodoor: \xee - S_hodoor: \xee - S_vcdoor: \xef - S_hcdoor: \xef - S_bars: \xf0 # equivalency symbol - S_tree: \xf1 # plus-or-minus - S_corr: \xb0 - S_grave: \xef # same as open door - S_pool: \xe0 -finish - -start: RogueIBM - Handling: IBM - Restrictions: rogue - S_weapon: \x29 - S_amulet: \x2c - S_food: \x3a - S_potion: \xad - S_scroll: \x3f - S_book: \x2b - S_wand: \xe7 - S_vwall: \xba # all walls now use - S_hwall: \xcd # double line graphics - S_tlcorn: \xc9 - S_trcorn: \xbb - S_blcorn: \xc8 - S_brcorn: \xbc - S_crwall: \xce - S_tuwall: \xca - S_tdwall: \xcb - S_tlwall: \xb9 - S_trwall: \xcc - S_ndoor: \xce - S_vodoor: \xce - S_hodoor: \xce - S_room: \xfa # centered dot - S_corr: \xb1 - S_litcorr: \xb2 - S_upstair: \xf0 # Greek Xi - S_dnstair: \xf0 -finish - -start: RogueEpyx - Description: Rogue level color symbol set like Epyx Rogue - Restrictions: rogue - Handling: IBM - Color: Yes - S_vwall: \xba # all walls now use - S_hwall: \xcd # double line graphics - S_tlcorn: \xc9 - S_trcorn: \xbb - S_blcorn: \xc8 - S_brcorn: \xbc - S_crwall: \xce - S_tuwall: \xca - S_tdwall: \xcb - S_tlwall: \xb9 - S_trwall: \xcc - S_ndoor: \xce - S_vodoor: \xce - S_hodoor: \xce - S_room: \xfa # centered dot - S_corr: \xb1 - S_litcorr: \xb2 - S_upstair: \xf0 # Greek Xi - S_dnstair: \xf0 - S_arrow_trap: \x04 # diamond (cards) - S_dart_trap: \x04 - S_falling_rock_trap: \x04 - S_squeaky_board: \x04 - S_bear_trap: \x04 - S_land_mine: \x04 - S_rolling_boulder_trap: \x04 - S_sleeping_gas_trap: \x04 - S_rust_trap: \x04 - S_fire_trap: \x04 - S_pit: \x04 - S_spiked_pit: \x04 - S_hole: \x04 - S_trap_door: \x04 - S_teleportation_trap: \x04 - S_level_teleporter: \x04 - S_magic_portal: \x04 - S_web: \x04 - S_statue_trap: \x04 - S_magic_trap: \x04 - S_anti_magic_trap: \x04 - S_polymorph_trap: \x04 - S_weapon: \x18 # up arrow -# ^J S_armor: \x0a # Vert rect with o - S_armor: \x5b # default: '[' -# ^I S_ring: \x09 # circle with arrow - S_ring: \x3d # default: '=' - S_amulet: \x0c # "female" symbol - S_tool: \x28 # default: '(' - S_food: \x05 # club (as in cards) - S_potion: \xad # upside down '!' - S_scroll: \x0e # musical note - S_book: \x2b # default: '+' - S_wand: \xe7 # greek tau - S_coin: \x0f # yes it's the same as gems - S_gem: \x0f # fancy '*' - S_rock: \x60 - S_ball: \x30 - S_chain: \x5f - S_venom: \x2e - S_rock: \x60 - S_ball: \x30 - S_chain: \x5f - S_venom: \x2e - S_human: \x01 -finish - -start: RogueWindows - Restrictions: rogue - Handling: IBM - S_weapon: \x29 - S_amulet: \x2c - S_food: \x3a - S_potion: \xad - S_scroll: \x3f - S_book: \x2b - S_wand: \xe7 - S_vwall: \xba # all walls now use - S_hwall: \xcd # double line graphics - S_tlcorn: \xc9 - S_trcorn: \xbb - S_blcorn: \xc8 - S_brcorn: \xbc - S_crwall: \xce - S_tuwall: \xca - S_tdwall: \xcb - S_tlwall: \xb9 - S_trwall: \xcc - S_ndoor: \xce - S_vodoor: \xce - S_hodoor: \xce - S_room: \xfa # centered dot - S_corr: \xb1 - S_litcorr: \xb2 - S_upstair: \xf0 # Greek Xi - S_dnstair: \xf0 -finish - -# Recommended symset for blind players +# Recommended symset for blind players # courtesy Michael Feir start: NHAccess - Description: Recommended for blind players + Description: recommended for blind players S_stone: \032 S_vwall: \124 S_hwall: \045 @@ -342,7 +52,7 @@ start: NHAccess S_brcorn: \124 S_crwall: \045 S_tuwall: \045 - S_tdwall: \045 + S_tdwall: \045 S_tlwall: \124 S_trwall: \124 S_ndoor: \046 @@ -354,7 +64,7 @@ start: NHAccess S_tree: \035 S_room: \035 S_corr: \060 - S_litcorr: \062 + S_litcorr: \062 S_upstair: \060 S_dnstair: \062 S_upladder: \095 @@ -363,35 +73,35 @@ start: NHAccess S_grave: \126 S_throne: \126 S_sink: \126 - S_fountain: \126 + S_fountain: \126 S_pool: \042 S_ice: \042 S_lava: \035 S_vodbridge: \035 - S_hodbridge: \032 + S_hodbridge: \032 S_vcdbridge: \035 S_hcdbridge: \126 S_arrow_trap: \094 S_dart_trap: \094 - S_falling_rock_trap: \094 + S_falling_rock_trap: \094 S_squeaky_board: \094 S_bear_trap: \094 S_land_mine: \094 - S_rolling_boulder_trap: \094 + S_rolling_boulder_trap: \094 S_sleeping_gas_trap: \094 S_rust_trap: \094 S_fire_trap: \094 S_pit: \094 S_spiked_pit: \094 S_hole: \094 - S_trap_door: \094 + S_trap_door: \094 S_teleportation_trap: \094 S_level_teleporter: \094 S_magic_portal: \094 S_web: \094 - S_statue_trap: \094 + S_statue_trap: \094 S_magic_trap: \094 - S_anti_magic_trap: \094 + S_anti_magic_trap: \094 S_polymorph_trap: \094 S_vbeam: \124 S_hbeam: \095 @@ -413,7 +123,7 @@ start: NHAccess S_sw_bl: \092 S_sw_bc: \045 S_sw_br: \047 - S_explode1: \047 + S_explode1: \047 S_explode2: \045 S_explode3: \092 S_explode4: \058 @@ -426,7 +136,7 @@ finish # All symbols are spaces start: Blank - Description: Completely blank symbols + Description: completely blank symbols S_air: \032 S_altar: \032 S_amulet: \032 @@ -603,15 +313,343 @@ start: Blank S_zruty: \032 finish -start: plain - Description: Same as Default symbols, except '+' for corner walls - S_tlcorn: '+' - S_trcorn: '+' - S_blcorn: '+' - S_brcorn: '+' - S_crwall: '+' - S_tuwall: '+' - S_tdwall: '+' - S_tlwall: '+' - S_trwall: '+' -finish #plain -- other symbols implicitly retain their default values +start: IBMgraphics + Description: special line-drawing characters used for walls +# Restrictions: primary + Handling: IBM + S_vwall: \xb3 # meta-3, vertical rule + S_hwall: \xc4 # meta-D, horizontal rule + S_tlcorn: \xda # meta-Z, top left corner + S_trcorn: \xbf # meta-?, top right corner + S_blcorn: \xc0 # meta-@, bottom left + S_brcorn: \xd9 # meta-Y, bottom right + S_crwall: \xc5 # meta-E, cross + S_tuwall: \xc1 # meta-A, T up + S_tdwall: \xc2 # meta-B, T down + S_tlwall: \xb4 # meta-4, T left + S_trwall: \xc3 # meta-C, T right + S_ndoor: \xfa # meta-z, centered dot + S_vodoor: \xfe # meta-~, small centered square + S_hodoor: \xfe # meta-~, small centered square + S_bars: \xf0 # equivalence symbol + S_tree: \xf1 # plus or minus symbol + S_room: \xfa # meta-z, centered dot + S_corr: \xb0 # meta-0, light shading + S_litcorr: \xb1 # meta-1, medium shading + S_fountain: \xf4 # meta-t, integral top half + S_pool: \xf7 # meta-w, approx. equals + S_ice: \xfa # meta-z, centered dot + S_lava: \xf7 # meta-w, approx. equals + S_vodbridge: \xfa # meta-z, centered dot + S_hodbridge: \xfa # meta-z, centered dot + S_water: \xf7 # meta-w, approx. equals + S_vbeam: \xb3 # meta-3, vertical rule + S_hbeam: \xc4 # meta-D, horizontal rule + S_sw_ml: \xb3 # meta-3, vertical rule + S_sw_mr: \xb3 # meta-3, vertical rule + S_explode4: \xb3 # meta-3, vertical rule + S_explode6: \xb3 # meta-3, vertical rule +finish + +start: IBMGraphics_1 +# Restrictions: primary + Handling: IBM + S_vwall: \xb3 # meta-3, vertical rule + S_hwall: \xc4 # meta-D, horizontal rule + S_tlcorn: \xda # meta-Z, top left corner + S_trcorn: \xbf # meta-?, top right corner + S_blcorn: \xc0 # meta-@, bottom left + S_brcorn: \xd9 # meta-Y, bottom right + S_crwall: \xc5 # meta-E, cross + S_tuwall: \xc1 # meta-A, T up + S_tdwall: \xc2 # meta-B, T down + S_tlwall: \xb4 # meta-4, T left + S_trwall: \xc3 # meta-C, T right + S_vbeam: \xb3 # meta-3, vertical rule + S_hbeam: \xc4 # meta-D, horizontal rule + S_sw_ml: \xb3 # meta-3, vertical rule + S_sw_mr: \xb3 # meta-3, vertical rule + S_explode4: \xb3 # meta-3, vertical rule + S_explode6: \xb3 # meta-3, vertical rule +finish + +start: IBMGraphics_2 +# Restrictions: primary + Handling: IBM + S_vwall: \xb3 # meta-3, vertical rule + S_hwall: \xc4 # meta-D, horizontal rule + S_tlcorn: \xda # meta-Z, top left corner + S_trcorn: \xbf # meta-?, top right corner + S_blcorn: \xc0 # meta-@, bottom left + S_brcorn: \xd9 # meta-Y, bottom right + S_crwall: \xc5 # meta-E, cross + S_tuwall: \xc1 # meta-A, T up + S_tdwall: \xc2 # meta-B, T down + S_tlwall: \xb4 # meta-4, T left + S_trwall: \xc3 # meta-C, T right + S_vodoor: \xfe # meta-~, small centered square + S_hodoor: \xfe # meta-~, small centered square + S_corr: \xb0 # meta-0, light shading + S_litcorr: \xb1 # meta-1, medium shading + S_vbeam: \xb3 # meta-3, vertical rule + S_hbeam: \xc4 # meta-D, horizontal rule + S_sw_ml: \xb3 # meta-3, vertical rule + S_sw_mr: \xb3 # meta-3, vertical rule + S_explode4: \xb3 # meta-3, vertical rule + S_explode6: \xb3 # meta-3, vertical rule +finish + +start: RogueIBM + Handling: IBM + Restrictions: rogue + S_weapon: \x29 + S_amulet: \x2c + S_food: \x3a + S_potion: \xad + S_scroll: \x3f + S_book: \x2b + S_wand: \xe7 + S_vwall: \xba # all walls now use + S_hwall: \xcd # double line graphics + S_tlcorn: \xc9 + S_trcorn: \xbb + S_blcorn: \xc8 + S_brcorn: \xbc + S_crwall: \xce + S_tuwall: \xca + S_tdwall: \xcb + S_tlwall: \xb9 + S_trwall: \xcc + S_ndoor: \xce + S_vodoor: \xce + S_hodoor: \xce + S_room: \xfa # centered dot + S_corr: \xb1 + S_litcorr: \xb2 + S_upstair: \xf0 # Greek Xi + S_dnstair: \xf0 +finish + +start: RogueEpyx + Description: rogue level color symbol set like Epyx Rogue + Restrictions: rogue + Handling: IBM + Color: Yes + S_vwall: \xba # all walls now use + S_hwall: \xcd # double line graphics + S_tlcorn: \xc9 + S_trcorn: \xbb + S_blcorn: \xc8 + S_brcorn: \xbc + S_crwall: \xce + S_tuwall: \xca + S_tdwall: \xcb + S_tlwall: \xb9 + S_trwall: \xcc + S_ndoor: \xce + S_vodoor: \xce + S_hodoor: \xce + S_room: \xfa # centered dot + S_corr: \xb1 + S_litcorr: \xb2 + S_upstair: \xf0 # Greek Xi + S_dnstair: \xf0 + S_arrow_trap: \x04 # diamond (cards) + S_dart_trap: \x04 + S_falling_rock_trap: \x04 + S_squeaky_board: \x04 + S_bear_trap: \x04 + S_land_mine: \x04 + S_rolling_boulder_trap: \x04 + S_sleeping_gas_trap: \x04 + S_rust_trap: \x04 + S_fire_trap: \x04 + S_pit: \x04 + S_spiked_pit: \x04 + S_hole: \x04 + S_trap_door: \x04 + S_teleportation_trap: \x04 + S_level_teleporter: \x04 + S_magic_portal: \x04 + S_web: \x04 + S_statue_trap: \x04 + S_magic_trap: \x04 + S_anti_magic_trap: \x04 + S_polymorph_trap: \x04 + S_weapon: \x18 # up arrow +# ^J S_armor: \x0a # Vert rect with o + S_armor: \x5b # default: '[' +# ^I S_ring: \x09 # circle with arrow + S_ring: \x3d # default: '=' + S_amulet: \x0c # "female" symbol + S_tool: \x28 # default: '(' + S_food: \x05 # club (as in cards) + S_potion: \xad # upside down '!' + S_scroll: \x0e # musical note + S_book: \x2b # default: '+' + S_wand: \xe7 # greek tau + S_coin: \x0f # yes it's the same as gems + S_gem: \x0f # fancy '*' + S_rock: \x60 + S_ball: \x30 + S_chain: \x5f + S_venom: \x2e + S_rock: \x60 + S_ball: \x30 + S_chain: \x5f + S_venom: \x2e + S_human: \x01 +finish + +start: RogueWindows + Restrictions: rogue + Handling: IBM + S_weapon: \x29 + S_amulet: \x2c + S_food: \x3a + S_potion: \xad + S_scroll: \x3f + S_book: \x2b + S_wand: \xe7 + S_vwall: \xba # all walls now use + S_hwall: \xcd # double line graphics + S_tlcorn: \xc9 + S_trcorn: \xbb + S_blcorn: \xc8 + S_brcorn: \xbc + S_crwall: \xce + S_tuwall: \xca + S_tdwall: \xcb + S_tlwall: \xb9 + S_trwall: \xcc + S_ndoor: \xce + S_vodoor: \xce + S_hodoor: \xce + S_room: \xfa # centered dot + S_corr: \xb1 + S_litcorr: \xb2 + S_upstair: \xf0 # Greek Xi + S_dnstair: \xf0 +finish + +start: curses + Description: approximation of IBMgraphics using DECgraphics + Restrictions: primary + Handling: DEC + S_vwall: \xf8 # meta-x, vertical rule + S_hwall: \xf1 # meta-q, horizontal rule + S_tlcorn: \xec # meta-l, top left corner + S_trcorn: \xeb # meta-k, top right corner + S_blcorn: \xed # meta-m, bottom left + S_brcorn: \xea # meta-j, bottom right + S_crwall: \xee # meta-n, cross + S_tuwall: \xf6 # meta-v, T up + S_tdwall: \xf7 # meta-w, T down + S_tlwall: \xf5 # meta-u, T left + S_trwall: \xf4 # meta-t, T right + S_ndoor: \xfe # meta-z, centered dot + S_tree: \xf1 # plus or minus symbol + S_room: \xfe # meta-z, centered dot + S_corr: \xe1 # meta-a, solid block + S_litcorr: \xe1 # meta-a, solid block + S_ice: \xfe # meta-z, centered dot + S_vodbridge: \xfe # meta-z, centered dot + S_hodbridge: \xfe # meta-z, centered dot + S_vbeam: \xf8 # meta-3, vertical rule + S_hbeam: \xf1 # meta-D, horizontal rule + S_sw_ml: \xf8 # meta-3, vertical rule + S_sw_mr: \xf8 # meta-3, vertical rule + S_explode4: \xf8 # meta-3, vertical rule + S_explode6: \xf8 # meta-3, vertical rule +finish + +start: DECgraphics + Description: special line-drawing characters used for walls + Restrictions: primary + Handling: DEC + S_vwall: \xf8 # meta-x, vertical rule + S_hwall: \xf1 # meta-q, horizontal rule + S_tlcorn: \xec # meta-l, top left corner + S_trcorn: \xeb # meta-k, top right corner + S_blcorn: \xed # meta-m, bottom left + S_brcorn: \xea # meta-j, bottom right + S_crwall: \xee # meta-n, cross + S_tuwall: \xf6 # meta-v, T up + S_tdwall: \xf7 # meta-w, T down + S_tlwall: \xf5 # meta-u, T left + S_trwall: \xf4 # meta-t, T right + S_ndoor: \xfe # meta-~, centered dot + S_vodoor: \xe1 # meta-a, solid block + S_hodoor: \xe1 # meta-a, solid block + S_bars: \xfb # meta-{, small pi + S_tree: \xe7 # meta-g, plus-or-minus + S_room: \xfe # meta-~, centered dot + S_upladder: \xf9 # meta-y, less-than-or-equals + S_dnladder: \xfa # meta-z, greater-than-or-equals + S_pool: \xe0 # meta-\, diamond + S_ice: \xfe # meta-~, centered dot + S_lava: \xe0 # meta-\, diamond + S_vodbridge: \xfe # meta-~, centered dot + S_hodbridge: \xfe # meta-~, centered dot + S_water: \xe0 # meta-\, diamond + S_vbeam: \xf8 # meta-x, vertical rule + S_hbeam: \xf1 # meta-q, horizontal rule + S_sw_tc: \xef # meta-o, high horizontal line + S_sw_ml: \xf8 # meta-x, vertical rule + S_sw_mr: \xf8 # meta-x, vertical rule + S_sw_bc: \xf3 # meta-s, low horizontal line + S_explode2: \xef # meta-o, high horizontal line + S_explode4: \xf8 # meta-x, vertical rule + S_explode6: \xf8 # meta-x, vertical rule + S_explode8: \xf3 # meta-s, low horizontal line +finish + +# +# This is commented out because specifying alternate default set isn't +# implemented. +# +# DECgraphics_2: underscore (default for altar) can be hard to see if +# hero or highlighted pet is on the spot below (south of) it, making +# it look like part of slightly bigger block cursor. Bars are usually +# within walls and we have something else for doorless doorway so '#' +# for bars shouldn't be mistaken for the corridor symbol even by someone +# used to DECgraphics, at least not often enough to pose a problem. +# The pi symbol is small like lowercase but flat-topped like uppercase +# so could represent a side view of a raised platform or table. +# +# start: DECgraphics_2 +# Defaults: DECgraphics # includes 'Handling: DEC' +# Description: variation of DECgraphics (iron bars:#, altar:pi) +# S_bars: '#' # (switch from pi to plain '#') +# S_altar: \xfb # meta-{, pi (switch from underscore) +# finish +# + +start: MACgraphics +# Description: (pre-OSX: obsolete?) +# Restrictions: primary + Handling: MAC + S_vwall: \xba + S_hwall: \xcd + S_tlcorn: \xc9 + S_trcorn: \xbb + S_blcorn: \xc8 + S_brcorn: \xbc + S_crwall: \xce + S_tuwall: \xca + S_tdwall: \xcb + S_tlwall: \xb9 + S_trwall: \xcc + S_ndoor: \xb0 + S_vodoor: \xee + S_hodoor: \xee + S_vcdoor: \xef + S_hcdoor: \xef + S_bars: \xf0 # equivalency symbol + S_tree: \xf1 # plus-or-minus + S_corr: \xb0 + S_grave: \xef # same as open door + S_pool: \xe0 +finish + +# symbols EOF diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 809ddab65..50d7d97c8 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.138 $ $NHDT-Date: 1571267989 2019/10/16 23:19:49 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.139 $ $NHDT-Date: 1571313651 2019/10/17 12:00:51 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -185,6 +185,8 @@ fix hero still hiding under a statue shattered by a land mine fix helping a monster out of a pit addressing a deleted trap fix launched rolling boulder code accessing deleted trap fix monster stepping on a land mine code accessing deleted trap +revise 'O' to show symbol sets in the same order they appear in the symbols + file and order the sets in dat/symbols to yield a sensible symset menu Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository @@ -280,6 +282,8 @@ curses: support symset:DECgraphics for map display curses: enable the 'use_inverse' boolean option (via wincap WC_INVERSE flag) for extended monster detection and black&white lava; forced to True to override default of False (for tty's benefit) +curses: force 'O' command's menus for 'symset' and 'roguesymset' options to + be wider so that fewer entries with set descriptions will wrap curses+'perm_invent': entries were wrapping without any control; usually not noticeable because next entry overwrote, but visible for final entry when whole inventory fit within the available height; looked ok with diff --git a/include/rm.h b/include/rm.h index becdd21a0..de1c8cfda 100644 --- a/include/rm.h +++ b/include/rm.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 rm.h $NHDT-Date: 1559994624 2019/06/08 11:50:24 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.61 $ */ +/* NetHack 3.6 rm.h $NHDT-Date: 1571313651 2019/10/17 12:00:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.63 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2017. */ /* NetHack may be freely redistributed. See license for details. */ @@ -299,6 +299,8 @@ struct symsetentry { #define H_IBM 1 #define H_DEC 2 #define H_CURS 3 +#define H_MAC 4 /* obsolete; needed so that the listing of available + * symsets by 'O' can skip it for !MAC_GRAPHICS_ENV */ extern const struct symdef defsyms[MAXPCHARS]; /* defaults */ extern const struct symdef def_warnsyms[WARNCOUNT]; diff --git a/src/drawing.c b/src/drawing.c index f29dbf3a2..2ac8ad28e 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 drawing.c $NHDT-Date: 1546656404 2019/01/05 02:46:44 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.59 $ */ +/* NetHack 3.6 drawing.c $NHDT-Date: 1571313651 2019/10/17 12:00:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.61 $ */ /* Copyright (c) NetHack Development Team 1992. */ /* NetHack may be freely redistributed. See license for details. */ @@ -255,9 +255,9 @@ static const uchar def_r_oc_syms[MAXOCLASSES] = { #undef C -#ifdef TERMLIB +#if defined(TERMLIB) || defined(CURSES_GRAPHICS) void NDECL((*decgraphics_mode_callback)) = 0; /* set in tty_start_screen() */ -#endif /* TERMLIB */ +#endif /* TERMLIB || CURSES */ #ifdef PC9800 void NDECL((*ibmgraphics_mode_callback)) = 0; /* set in tty_start_screen() */ @@ -496,17 +496,22 @@ int nondefault; #ifdef PC9800 if (SYMHANDLING(H_IBM) && ibmgraphics_mode_callback) (*ibmgraphics_mode_callback)(); - else if (!symset[currentgraphics].name && ascgraphics_mode_callback) + else if (SYMHANDLING(H_UNK) && ascgraphics_mode_callback) (*ascgraphics_mode_callback)(); #endif -#ifdef TERMLIB +#if defined(TERMLIB) || defined(CURSES_GRAPHICS) + /* curses doesn't assign any routine to dec..._callback but + probably does the expected initialization under the hood + for terminals capable of rendering DECgraphics */ if (SYMHANDLING(H_DEC) && decgraphics_mode_callback) (*decgraphics_mode_callback)(); -#endif # ifdef CURSES_GRAPHICS + /* there aren't any symbol sets with CURS handling, and the + curses interface never assigns a routine to curses..._callback */ if (SYMHANDLING(H_CURS) && cursesgraphics_mode_callback) (*cursesgraphics_mode_callback)(); # endif +#endif } else { init_l_symbols(); init_showsyms(); @@ -563,6 +568,7 @@ const char *known_handling[] = { "IBM", /* H_IBM */ "DEC", /* H_DEC */ "CURS", /* H_CURS */ + "MAC", /* H_MAC -- pre-OSX MACgraphics */ (const char *) 0, }; diff --git a/src/files.c b/src/files.c index 930d36ea2..f9d2dee8e 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 files.c $NHDT-Date: 1562719337 2019/07/10 00:42:17 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.252 $ */ +/* NetHack 3.6 files.c $NHDT-Date: 1571313652 2019/10/17 12:00:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.253 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2111,7 +2111,7 @@ const char *name; /* name of option for error message */ break; default: - gi_error: + gi_error: raw_printf("Syntax error in %s", name); wait_synch(); return count; @@ -3063,9 +3063,10 @@ boolean FDECL((*proc), (char *)); } ep = inbuf; - while (*ep == ' ' || *ep == '\t') ep++; + while (*ep == ' ' || *ep == '\t') + ++ep; - /* lines beginning with '#' are comments. ignore empty lines. */ + /* ingore empty lines and full-line comment lines */ if (!*ep || *ep == '#') ignoreline = TRUE; @@ -3074,9 +3075,9 @@ boolean FDECL((*proc), (char *)); /* merge now read line with previous ones, if necessary */ if (!ignoreline) { - len = strlen(inbuf) + 1; + len = (int) strlen(inbuf) + 1; if (buf) - len += strlen(buf); + len += (int) strlen(buf); tmpbuf = (char *) alloc(len); if (buf) { Sprintf(tmpbuf, "%s %s", buf, inbuf); @@ -3100,6 +3101,7 @@ boolean FDECL((*proc), (char *)); if (match_varname(buf, "CHOOSE", 6)) { char *section; char *bufp = find_optparam(buf); + if (!bufp) { config_error_add( "Format is CHOOSE=section1,section2,..."); @@ -3259,13 +3261,19 @@ int which_set; building a pick-list of possible symset values from the file, so only do that */ if (symp->range == SYM_CONTROL) { - struct symsetentry *tmpsp; + struct symsetentry *tmpsp, *lastsp; + for (lastsp = symset_list; lastsp; lastsp = lastsp->next) + if (!lastsp->next) + break; switch (symp->idx) { case 0: tmpsp = (struct symsetentry *) alloc(sizeof *tmpsp); - tmpsp->next = symset_list; - symset_list = tmpsp; + tmpsp->next = (struct symsetentry *) 0; + if (!lastsp) + symset_list = tmpsp; + else + lastsp->next = tmpsp; tmpsp->idx = symset_count++; tmpsp->name = dupstr(bufp); tmpsp->desc = (char *) 0; @@ -3277,21 +3285,22 @@ int which_set; break; case 2: /* handler type identified */ - tmpsp = symset_list; /* most recent symset */ + tmpsp = lastsp; /* most recent symset */ for (i = 0; known_handling[i]; ++i) if (!strcmpi(known_handling[i], bufp)) { tmpsp->handling = i; break; /* for loop */ } break; - case 3: /* description:something */ - tmpsp = symset_list; /* most recent symset */ + case 3: + /* description:something */ + tmpsp = lastsp; /* most recent symset */ if (tmpsp && !tmpsp->desc) tmpsp->desc = dupstr(bufp); break; case 5: /* restrictions: xxxx*/ - tmpsp = symset_list; /* most recent symset */ + tmpsp = lastsp; /* most recent symset */ for (i = 0; known_restrictions[i]; ++i) { if (!strcmpi(known_restrictions[i], bufp)) { switch (i) { @@ -4103,7 +4112,7 @@ unsigned oid; /* book identifier */ } } -cleanup: + cleanup: (void) dlb_fclose(fp); if (nowin_buf) { /* one-line buffer */ diff --git a/src/options.c b/src/options.c index 220f8f483..019a4544f 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1571045295 2019/10/14 09:28:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.376 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1571313653 2019/10/17 12:00:53 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.378 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -5336,8 +5336,8 @@ boolean setinitial, setfromfile; MENU_UNSELECTED); for (i = 0; i < numapes && ape; i++) { any.a_void = (opt_idx == 1) ? 0 : ape; - /* length of pattern plus quotes (plus '<'/'>') is less than - BUFSZ */ + /* length of pattern plus quotes (plus '<'/'>') is + less than BUFSZ */ Sprintf(apebuf, "\"%c%s\"", ape->grab ? '<' : '>', ape->pattern); add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, apebuf, @@ -5383,18 +5383,27 @@ boolean setinitial, setfromfile; symset[which_set].name = symset_name; if (res && symset_list) { - int thissize, biggest = 0; + int thissize, + biggest = (int) (sizeof "Default Symbols" - sizeof ""), + big_desc = 0; for (sl = symset_list; sl; sl = sl->next) { /* check restrictions */ if (rogueflag ? sl->primary : sl->rogue) continue; +#ifndef MAC_GRAPHICS_ENV + if (sl->handling == H_MAC) + continue; +#endif setcount++; /* find biggest name */ thissize = sl->name ? (int) strlen(sl->name) : 0; if (thissize > biggest) biggest = thissize; + thissize = sl->desc ? (int) strlen(sl->desc) : 0; + if (thissize > big_desc) + big_desc = thissize; } if (!setcount) { pline("There are no appropriate %s symbol sets available.", @@ -5402,10 +5411,48 @@ boolean setinitial, setfromfile; return TRUE; } - Sprintf(fmtstr, "%%-%ds %%s", biggest + 5); + Sprintf(fmtstr, "%%-%ds %%s", biggest + 2); tmpwin = create_nhwindow(NHW_MENU); start_menu(tmpwin); any = zeroany; +#ifdef CURSES_GRAPHICS /* this ought to be handled within curses... */ + /* + * Symbol sets are formatted in two columns, "name description", + * on selectable lines. curses bases menu width on the length + * of non-selectable lines (main header, separators if present, + * with trailing spaces ignored) and defaults to half the map. + * Without something like this separator (shown after the menu + * title and a blank line which follows that) to force a wider + * menu, entries with long descriptions wrap. That would be + * ok if wrapping operated on the same two columns, but the + * menu doesn't know anything about those and the description + * is wrapping into the next line's name column, making long + * descriptions--and menus containing them--hard to read. + */ + if (WINDOWPORT("curses")) { + char tmp1[BUFSZ], tmp2[BUFSZ], bigbuf[BUFSZ + 1 + BUFSZ]; + + /* 4: room for space+letter+paren+space, fake selector; + 2: added to 'biggest' when constructing 'fmtstr'; + 1: space between symset name+2 and symset description */ + if (4 + biggest + 2 + 1 > (int) sizeof tmp1 - 1) + biggest = (int) sizeof tmp1 - 1 - (4 + 2 + 1); + (void) memset((genericptr_t) tmp1, '-', biggest); + tmp1[biggest] = '\0'; + if (big_desc > (int) sizeof tmp2 - 1) + big_desc = (int) sizeof tmp2 - 1; + (void) memset((genericptr_t) tmp2, '-', big_desc); + tmp2[big_desc] = '\0'; + Sprintf(bigbuf, "%4s", ""); + Sprintf(eos(bigbuf), fmtstr, tmp1, tmp2); + bigbuf[BUFSZ - 1] = '\0'; + any.a_int = 0; + add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, + bigbuf, MENU_UNSELECTED); + } +#else + nhUse(big_desc); +#endif any.a_int = 1; add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, "Default Symbols", MENU_UNSELECTED); @@ -5414,6 +5461,10 @@ boolean setinitial, setfromfile; /* check restrictions */ if (rogueflag ? sl->primary : sl->rogue) continue; +#ifndef MAC_GRAPHICS_ENV + if (sl->handling == H_MAC) + continue; +#endif if (sl->name) { any.a_int = sl->idx + 2; From 61b976e0d57a5b818b4264f149b06e3119b95ae3 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 17 Oct 2019 05:07:03 -0700 Subject: [PATCH 045/529] couple of curses symbol handling bits Primary and rogue symbols were being set to default if primary hadn't been given a value, possibly clobbering rogue symbols if those had been given a value. Initialize them independenly. Return early from curses_convert_glyph() if the value doesn't have the 8th bit set since it now deals exclusively with DECgraphics handling. Force a sane value for returning early on rogue level. --- win/curses/cursinit.c | 5 +++-- win/curses/cursmisc.c | 40 +++++++++++++++++++++++++--------------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/win/curses/cursinit.c b/win/curses/cursinit.c index 773334855..e5a74128b 100644 --- a/win/curses/cursinit.c +++ b/win/curses/cursinit.c @@ -785,10 +785,11 @@ curses_init_options() set_option_mod_status("eight_bit_tty", SET_IN_FILE); /* If we don't have a symset defined, load the curses symset by default */ - if (symset[PRIMARY].fallback) { + if (symset[PRIMARY].fallback) load_symset("curses", PRIMARY); + if (symset[ROGUESET].fallback) load_symset("default", ROGUESET); - } + #ifdef PDCURSES /* PDCurses for SDL, win32 and OS/2 has the ability to set the terminal size programatically. If the user does not specify a diff --git a/win/curses/cursmisc.c b/win/curses/cursmisc.c index ab6a3bd45..75e127332 100644 --- a/win/curses/cursmisc.c +++ b/win/curses/cursmisc.c @@ -472,21 +472,29 @@ curses_convert_glyph(int ch, int glyph) because 0x7f is effectively a control character (Rubout); nethack ORs 0x80 to flag line drawing--that's stripped below */ static int decchars[33]; /* for chars 0x5f through 0x7f (95..127) */ - int symbol; - /* FIXME? we don't support any special characters in roguesymset */ - if (Is_rogue_level(&u.uz)) + ch &= 0xff; /* 0..255 only */ + if (!(ch & 0x80)) + return ch; /* no conversion needed */ + + /* this conversion routine is only called for SYMHANDLING(H_DEC) and + we decline to support special graphics symbols on the rogue level */ + if (Is_rogue_level(&u.uz)) { + /* attempting to use line drawing characters will end up being + rendered as lowercase gibberish */ + ch &= ~0x80; return ch; + } - symbol = glyph_to_cmap(glyph); - - /* Curses has complete access to all characters that DECgraphics uses. - However, their character value isn't consistent between terminals - and implementations. For actual DEC terminals and faithful emulators, - line-drawing characters are specified as lowercase letters (mostly) - and a control code is sent to the terminal telling it to switch - character sets (that's how the tty interface handles them). - Curses remaps the characters instead. */ + /* + * Curses has complete access to all characters that DECgraphics uses. + * However, their character value isn't consistent between terminals + * and implementations. For actual DEC terminals and faithful emulators, + * line-drawing characters are specified as lowercase letters (mostly) + * and a control code is sent to the terminal telling it to switch + * character sets (that's how the tty interface handles them). + * Curses remaps the characters instead. + */ /* one-time initialization; some ACS_x aren't compile-time constant */ if (!decchars[0]) { @@ -510,7 +518,7 @@ curses_convert_glyph(int ch, int glyph) decchars[0x68 - 0x5f] = 'N'; /* [9] "NL" as one char (new line) */ decchars[0x69 - 0x5f] = 'V'; /* [10] "VT" as one (vertical tab) */ decchars[0x6a - 0x5f] = ACS_LRCORNER; /* lower right corner */ - decchars[0x6b - 0x5f] = ACS_URCORNER; /* upper right corner */ + decchars[0x6b - 0x5f] = ACS_URCORNER; /* upper right corner, 7-ish */ decchars[0x6c - 0x5f] = ACS_ULCORNER; /* upper left corner */ decchars[0x6d - 0x5f] = ACS_LLCORNER; /* lower left corner, 'L' */ /* [15] center cross, like big '+' sign */ @@ -554,7 +562,7 @@ curses_convert_glyph(int ch, int glyph) /* high bit set means special handling */ if (ch & 0x80) { - int convindx; + int convindx, symbol; ch &= ~0x80; /* force plain ASCII for last resort */ convindx = ch - 0x5f; @@ -565,8 +573,10 @@ curses_convert_glyph(int ch, int glyph) /* in case ACS_foo maps to 0 when current terminal is unable to handle a particular character; if so, revert to default rather than using DECgr value with high bit stripped */ - if (!ch) + if (!ch) { + symbol = glyph_to_cmap(glyph); ch = (int) defsyms[symbol].sym; + } } } From 0c86965d5e7b3dd3ed950114c869406491357364 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 17 Oct 2019 05:17:08 -0700 Subject: [PATCH 046/529] another thinko --- dat/symbols | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dat/symbols b/dat/symbols index 8e8a6349f..ae22419c5 100644 --- a/dat/symbols +++ b/dat/symbols @@ -1,4 +1,4 @@ -# NetHack 3.6 symbols $NHDT-Date: 1571313649 2019/10/17 12:00:49 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.19 $ +# NetHack 3.6 symbols $NHDT-Date: 1571314611 2019/10/17 12:16:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.20 $ # Copyright (c) 2006 by Michael Allison # NetHack may be freely redistributed. See license for details. # @@ -23,8 +23,8 @@ # on that windowport if no symset is specified. The Curses interface # can also use DECgraphics as-is; IBMgraphics probably won't work. -# plain looks decent for wall+corridor levels where there aren't a lot -# of room corners and ones present tend to be spread out, but it looks +# plain looks decent for room+corridor levels where there aren't a lot +# of wall corners and ones present tend to be spread out, but it looks # awful for wallified mazes start: plain Description: same as default symbols, except '+' for corner walls From 6182b014ca6f69a3b8e2f133a912719ed3810b6b Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 17 Oct 2019 14:38:45 -0700 Subject: [PATCH 047/529] github pull request #235 - curses symbol set init Fixes #235 For initial options under curses, specifying 'DECgraphics' as a boolean rather than as 'symset:DECgraphics' wasn't overriding the new default 'symset:curses'. Since previously DECgraphics was rejected for curses, it's possible that no one noticed. --- include/rm.h | 4 ++-- src/drawing.c | 3 +-- src/files.c | 13 +++++++++++-- src/options.c | 6 +----- win/curses/cursinit.c | 4 ++-- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/include/rm.h b/include/rm.h index de1c8cfda..87d7566a2 100644 --- a/include/rm.h +++ b/include/rm.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 rm.h $NHDT-Date: 1571313651 2019/10/17 12:00:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.63 $ */ +/* NetHack 3.6 rm.h $NHDT-Date: 1571347960 2019/10/17 21:32:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.64 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2017. */ /* NetHack may be freely redistributed. See license for details. */ @@ -278,7 +278,7 @@ struct symsetentry { Bitfield(nocolor, 1); /* don't use color if set */ Bitfield(primary, 1); /* restricted for use as primary set */ Bitfield(rogue, 1); /* restricted for use as rogue lev set */ - Bitfield(fallback, 1); /* no explicit symset set */ + Bitfield(explicitly, 1); /* explicit symset set */ /* 4 free bits */ }; diff --git a/src/drawing.c b/src/drawing.c index 2ac8ad28e..072485fb6 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 drawing.c $NHDT-Date: 1571313651 2019/10/17 12:00:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.61 $ */ +/* NetHack 3.6 drawing.c $NHDT-Date: 1571347973 2019/10/17 21:32:53 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.62 $ */ /* Copyright (c) NetHack Development Team 1992. */ /* NetHack may be freely redistributed. See license for details. */ @@ -548,7 +548,6 @@ boolean name_too; /* initialize restriction bits */ symset[which_set].primary = 0; symset[which_set].rogue = 0; - symset[which_set].fallback = TRUE; if (name_too) { if (symset[which_set].name) diff --git a/src/files.c b/src/files.c index f9d2dee8e..77b279077 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 files.c $NHDT-Date: 1571313652 2019/10/17 12:00:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.253 $ */ +/* NetHack 3.6 files.c $NHDT-Date: 1571347976 2019/10/17 21:32:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.254 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3168,9 +3168,11 @@ int which_set; { FILE *fp; + symset[which_set].explicitly = FALSE; if (!(fp = fopen_sym_file())) return 0; + symset[which_set].explicitly = TRUE; symset_count = 0; chosen_symset_start = chosen_symset_end = FALSE; symset_which_set = which_set; @@ -3190,7 +3192,14 @@ int which_set; || !strcmpi(symset[which_set].name, "default"))) clear_symsetentry(which_set, TRUE); config_error_done(); - return (symset[which_set].name == 0) ? 1 : 0; + + /* If name was defined, it was invalid... Then we're loading fallback */ + if (symset[which_set].name) { + symset[which_set].explicitly = FALSE; + return 0; + } + + return 1; } if (!chosen_symset_end) config_error_add("Missing finish for symset \"%s\"", diff --git a/src/options.c b/src/options.c index 019a4544f..ddbe794f8 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1571313653 2019/10/17 12:00:53 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.378 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1571347977 2019/10/17 21:32:57 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.379 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2315,7 +2315,6 @@ boolean tinitial, tfrom_file; } else { if (!initial && Is_rogue_level(&u.uz)) assign_graphics(ROGUESET); - symset[ROGUESET].fallback = FALSE; need_redraw = TRUE; } } else @@ -2340,7 +2339,6 @@ boolean tinitial, tfrom_file; return FALSE; } else { switch_symbols(symset[PRIMARY].name != (char *) 0); - symset[PRIMARY].fallback = FALSE; need_redraw = TRUE; } } else @@ -6061,10 +6059,8 @@ int which_set; if (read_sym_file(which_set)) { switch_symbols(TRUE); - symset[which_set].fallback = FALSE; } else { clear_symsetentry(which_set, TRUE); - symset[which_set].fallback = TRUE; return 0; } return 1; diff --git a/win/curses/cursinit.c b/win/curses/cursinit.c index e5a74128b..3d4f977d6 100644 --- a/win/curses/cursinit.c +++ b/win/curses/cursinit.c @@ -785,9 +785,9 @@ curses_init_options() set_option_mod_status("eight_bit_tty", SET_IN_FILE); /* If we don't have a symset defined, load the curses symset by default */ - if (symset[PRIMARY].fallback) + if (!symset[PRIMARY].explicitly) load_symset("curses", PRIMARY); - if (symset[ROGUESET].fallback) + if (!symset[ROGUESET].explicitly) load_symset("default", ROGUESET); #ifdef PDCURSES From 70c9b801bd8eb0e73623bc1cbf5ef4119d940e8a Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 17 Oct 2019 14:58:16 -0700 Subject: [PATCH 048/529] github pull request #233 - plural of Nazgul Fixes #233 makeplural() and makesingular() know that the plural of Nazgul is Nazgul, but one of the hard-coded rumors didn't. --- dat/rumors.tru | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dat/rumors.tru b/dat/rumors.tru index 8181c5abc..0a6ff45b0 100644 --- a/dat/rumors.tru +++ b/dat/rumors.tru @@ -299,7 +299,7 @@ They say that the Leprechaun King is rich as Croesus. They say that the Wizard of Yendor is schizophrenic and suicidal. They say that the experienced character knows how to convert an altar. They say that the gods are happy when they drop objects at your feet. -They say that the idea of invisible Nazguls has a certain ring to it. +They say that the idea of invisible Nazgul has a certain ring to it. They say that the lady of the lake now lives in a fountain somewhere. They say that the local shopkeeper frowns upon the rude tourist. They say that the only door to the vampire's tower is on its lowest level. From 389c4960552442ceebd415fe4b2a48a026aa975c Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 17 Oct 2019 15:50:33 -0700 Subject: [PATCH 049/529] zap colors One of the comments for pull request #234 mentions that the colors for sleep and poison are backwards. Yellow dragons had green breath. Green dragons would have had yellow breath if they used the normal zap symbols, but they use the poison cloud one which is green so they had green breath. I rarely have color enabled and had never noticed. (At the moment I can't find where the switch from zap to cloud is being done.) Pull request #234 is based on #231, about control of the shield effect animation when resisting. But it changes struct flags so would break 3.6.x save file compatibility. --- doc/fixes36.3 | 3 ++- src/decl.c | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 50d7d97c8..b1b3b3e2c 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.139 $ $NHDT-Date: 1571313651 2019/10/17 12:00:51 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.140 $ $NHDT-Date: 1571352531 2019/10/17 22:48:51 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -187,6 +187,7 @@ fix launched rolling boulder code accessing deleted trap fix monster stepping on a land mine code accessing deleted trap revise 'O' to show symbol sets in the same order they appear in the symbols file and order the sets in dat/symbols to yield a sensible symset menu +yellow dragons had green breath Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/decl.c b/src/decl.c index c6e6c6039..a42cad2a0 100644 --- a/src/decl.c +++ b/src/decl.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 decl.c $NHDT-Date: 1547025164 2019/01/09 09:12:44 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.141 $ */ +/* NetHack 3.6 decl.c $NHDT-Date: 1571352532 2019/10/17 22:48:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.146 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2009. */ /* NetHack may be freely redistributed. See license for details. */ @@ -168,6 +168,7 @@ NEARDATA struct obj #ifdef TEXTCOLOR /* * This must be the same order as used for buzz() in zap.c. + * (They're only used in mapglyph.c so probably shouldn't be here.) */ const int zapcolors[NUM_ZAP] = { HI_ZAP, /* 0 - missile */ @@ -176,8 +177,10 @@ const int zapcolors[NUM_ZAP] = { HI_ZAP, /* 3 - sleep */ CLR_BLACK, /* 4 - death */ CLR_WHITE, /* 5 - lightning */ - CLR_YELLOW, /* 6 - poison gas */ - CLR_GREEN, /* 7 - acid */ + /* 3.6.3: poison gas zap used to be yellow and acid zap was green, + which conflicted with the corresponding dragon colors */ + CLR_GREEN, /* 6 - poison gas */ + CLR_YELLOW, /* 7 - acid */ }; #endif /* text color */ From 74dc97866b102f650c06436569b2a207927f96ce Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 17 Oct 2019 21:26:59 -0400 Subject: [PATCH 050/529] spelling mistake in comment in recent commit --- src/files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/files.c b/src/files.c index 77b279077..f9d5be795 100644 --- a/src/files.c +++ b/src/files.c @@ -3066,7 +3066,7 @@ boolean FDECL((*proc), (char *)); while (*ep == ' ' || *ep == '\t') ++ep; - /* ingore empty lines and full-line comment lines */ + /* ignore empty lines and full-line comment lines */ if (!*ep || *ep == '#') ignoreline = TRUE; From 4b87e858aa422beff83020f6fa00bee451d1d85e Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 17 Oct 2019 18:45:56 -0700 Subject: [PATCH 051/529] fix #H9312 - partly eaten food in bones shop Dying in a shop while carrying partly eaten food would place that food on the floor without marking it no_charge. But marking it that way wouldn't have helped because as bones data gets saved, every object on the level has its no_charge flag cleared. So 'no_charge' needs to be explicitly set for partly eaten food in tended shops as a bones level gets loaded. Most of the shk.c diff is reformatting, but it does change the get_pricing_units() routine to lie that the quantity is zero for partly eaten food so that when multiplying with price it won't matter whether the price has been forced to zero or been left non-zero. --- doc/fixes36.3 | 5 ++++- src/bones.c | 20 +++++++++++++++++++- src/shk.c | 28 +++++++++++++--------------- 3 files changed, 36 insertions(+), 17 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index b1b3b3e2c..756d69da9 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.140 $ $NHDT-Date: 1571352531 2019/10/17 22:48:51 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.141 $ $NHDT-Date: 1571363147 2019/10/18 01:45:47 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -188,6 +188,9 @@ fix monster stepping on a land mine code accessing deleted trap revise 'O' to show symbol sets in the same order they appear in the symbols file and order the sets in dat/symbols to yield a sensible symset menu yellow dragons had green breath +partly eaten food in a bones level shop would show a non-zero sale price + while on the floor but not be placed on shop bill if picked up; + sale price should have been "no charge" Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/bones.c b/src/bones.c index 0a7b81793..d5623fcde 100644 --- a/src/bones.c +++ b/src/bones.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 bones.c $NHDT-Date: 1557092711 2019/05/05 21:45:11 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.75 $ */ +/* NetHack 3.6 bones.c $NHDT-Date: 1571363147 2019/10/18 01:45:47 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.76 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -85,6 +85,24 @@ boolean restore; } else if (has_oname(otmp)) { sanitize_name(ONAME(otmp)); } + /* 3.6.3: set no_charge for partly eaten food in shop; + all other items become goods for sale if in a shop */ + if (otmp->oclass == FOOD_CLASS && otmp->oeaten) { + struct obj *top; + char *p; + xchar ox, oy; + + for (top = otmp; top->where == OBJ_CONTAINED; + top = top->ocontainer) + continue; + otmp->no_charge = (top->where == OBJ_FLOOR + && get_obj_location(top, &ox, &oy, 0) + /* can't use costly_spot() since its + result depends upon hero's location */ + && inside_shop(ox, oy) + && *(p = in_rooms(ox, oy, SHOPBASE)) + && tended_shop(&rooms[*p - ROOMOFFSET])); + } } else { /* saving */ /* do not zero out o_ids for ghost levels anymore */ diff --git a/src/shk.c b/src/shk.c index 5fcc70c99..a3a84d64b 100644 --- a/src/shk.c +++ b/src/shk.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 shk.c $NHDT-Date: 1570236762 2019/10/05 00:52:42 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.168 $ */ +/* NetHack 3.6 shk.c $NHDT-Date: 1571363148 2019/10/18 01:45:48 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.169 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -55,9 +55,10 @@ STATIC_DCL long FDECL(stolen_container, (struct obj *, struct monst *, STATIC_DCL long FDECL(getprice, (struct obj *, BOOLEAN_P)); STATIC_DCL void FDECL(shk_names_obj, (struct monst *, struct obj *, const char *, long, const char *)); -STATIC_DCL struct obj *FDECL(bp_to_obj, (struct bill_x *)); STATIC_DCL boolean FDECL(inherits, (struct monst *, int, int, BOOLEAN_P)); STATIC_DCL void FDECL(set_repo_loc, (struct monst *)); +STATIC_DCL struct obj *FDECL(bp_to_obj, (struct bill_x *)); +STATIC_DCL long FDECL(get_pricing_units, (struct obj *)); STATIC_DCL boolean NDECL(angry_shk_exists); STATIC_DCL void FDECL(rile_shk, (struct monst *)); STATIC_DCL void FDECL(rouse_shk, (struct monst *, BOOLEAN_P)); @@ -75,7 +76,6 @@ STATIC_DCL void FDECL(deserted_shop, (char *)); STATIC_DCL boolean FDECL(special_stock, (struct obj *, struct monst *, BOOLEAN_P)); STATIC_DCL const char *FDECL(cad, (BOOLEAN_P)); -STATIC_DCL long FDECL(get_pricing_units, (struct obj *obj)); /* invariants: obj->unpaid iff onbill(obj) [unless bp->useup] @@ -2033,7 +2033,9 @@ struct obj *obj; { long units = obj->quan; - if (obj->globby) { + if (obj->oclass == FOOD_CLASS && obj->oeaten) { + units = 0L; + } else if (obj->globby) { /* globs must be sold by weight not by volume */ long unit_weight = (long) objects[obj->otyp].oc_weight, wt = (obj->owt > 0) ? (long) obj->owt : (long) weight(obj); @@ -4866,7 +4868,7 @@ struct obj *obj_absorber, *obj_absorbed; * Scenario 1. Shop-owned glob absorbing into shop-owned glob **************************************************************/ if (bp && (!obj_absorber->no_charge - || billable(&shkp, obj_absorber, eshkp->shoproom, FALSE))) { + || billable(&shkp, obj_absorber, eshkp->shoproom, FALSE))) { /* the glob being absorbed has a billing record */ amount = bp->price; eshkp->billct--; @@ -4939,18 +4941,14 @@ struct obj *obj_absorber, *obj_absorbed; /************************************************************** * Scenario 3. shop_owned glob merging into player_owned glob **************************************************************/ - if (bp && - (obj_absorber->no_charge - || (floor_absorber && !costly_spot(x, y)))) { + if (bp && (obj_absorber->no_charge + || (floor_absorber && !costly_spot(x, y)))) { amount = bp->price; bill_dummy_object(obj_absorbed); - verbalize( - "You owe me %ld %s for my %s that you %s with your%s", - amount, currency(amount), obj_typename(obj_absorbed->otyp), - ANGRY(shkp) ? "had the audacity to mix" : - "just mixed", - ANGRY(shkp) ? " stinking batch!" : - "s."); + verbalize("You owe me %ld %s for my %s that you %s with your%s", + amount, currency(amount), obj_typename(obj_absorbed->otyp), + ANGRY(shkp) ? "had the audacity to mix" : "just mixed", + ANGRY(shkp) ? " stinking batch!" : "s."); return; } /************************************************************** From 1086f137de278979e6eb7cb8806b60c036d53846 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 17 Oct 2019 18:55:35 -0700 Subject: [PATCH 052/529] revert part of 4b87e858aa - partly eaten food Partly eaten globs is seems to be can'o'worms and the hack I just added to get_pricing_units() made things worse, so back that out. --- src/shk.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/shk.c b/src/shk.c index a3a84d64b..0cb7e2ab1 100644 --- a/src/shk.c +++ b/src/shk.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 shk.c $NHDT-Date: 1571363148 2019/10/18 01:45:48 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.169 $ */ +/* NetHack 3.6 shk.c $NHDT-Date: 1571363715 2019/10/18 01:55:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.170 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2033,9 +2033,7 @@ struct obj *obj; { long units = obj->quan; - if (obj->oclass == FOOD_CLASS && obj->oeaten) { - units = 0L; - } else if (obj->globby) { + if (obj->globby) { /* globs must be sold by weight not by volume */ long unit_weight = (long) objects[obj->otyp].oc_weight, wt = (obj->owt > 0) ? (long) obj->owt : (long) weight(obj); From a0d57d0a74449c47ea149360f572e37ede06ea27 Mon Sep 17 00:00:00 2001 From: k21971 Date: Thu, 17 Oct 2019 08:49:22 -0400 Subject: [PATCH 053/529] curses - remove unused variable in curses_str_remainder() and remove incorrect use of 'count' which could result in messages being repeated indefiitely. --- win/curses/cursmisc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/win/curses/cursmisc.c b/win/curses/cursmisc.c index 75e127332..a158b221c 100644 --- a/win/curses/cursmisc.c +++ b/win/curses/cursmisc.c @@ -377,7 +377,6 @@ curses_str_remainder(const char *str, int width, int line_num) int strsize = strlen(str) + 1; #if __STDC_VERSION__ >= 199901L char substr[strsize]; - char curstr[strsize]; char tmpstr[strsize]; strcpy(substr, str); @@ -386,7 +385,6 @@ curses_str_remainder(const char *str, int width, int line_num) #define BUFSZ 256 #endif char substr[BUFSZ * 2]; - char curstr[BUFSZ * 2]; char tmpstr[BUFSZ * 2]; if (strsize > (BUFSZ * 2) - 1) { @@ -414,11 +412,7 @@ curses_str_remainder(const char *str, int width, int line_num) if (last_space == 0) { /* No spaces found */ last_space = count - 1; } - for (count = 0; count < last_space; count++) { - curstr[count] = substr[count]; - } - curstr[count] = '\0'; - if (substr[count] == '\0') { + if (substr[last_space] == '\0') { break; } for (count = (last_space + 1); count < (int) strlen(substr); count++) { From f1146757393a1401730fe4d6c03a30245efb3c7b Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 18 Oct 2019 15:00:16 -0700 Subject: [PATCH 054/529] containers in shops Fix a couple of bugs I stumbled across while testing something else. The sell prompt for a container dropped in a shop had phrasing issues. This fixes a couple but there are more. The message composition assumes that contents fall into two categories: those already owned by the shop and those the shopkeeper is offering to buy from the hero. But there is a third: stuff the shopkeeper doesn't care about so won't buy. The count_contents() routine can supply total contents or shop-owned contents. Subtracting one from the other yields combined hero-owned without any way to separate out shk-cares and don't-care. --- doc/fixes36.3 | 11 ++++++++++- include/extern.h | 5 +++-- src/invent.c | 22 ++++++++++++---------- src/objnam.c | 4 ++-- src/shk.c | 27 ++++++++++++++++++++------- 5 files changed, 47 insertions(+), 22 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 756d69da9..b3c2dcead 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.141 $ $NHDT-Date: 1571363147 2019/10/18 01:45:47 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.142 $ $NHDT-Date: 1571435999 2019/10/18 21:59:59 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -191,6 +191,15 @@ yellow dragons had green breath partly eaten food in a bones level shop would show a non-zero sale price while on the floor but not be placed on shop bill if picked up; sale price should have been "no charge" +when non-empty container is dropped in shop and hero is asked whether to sell, + counting the subset of contents owned by hero vs those owned by shk + could obtain wrong answer because the container had been placed on + the floor but the 'unpaid' and 'no_charge' flags of its contents + hadn't been updated yet, they were still set for when it was carried +in a shop which doesn't care about tools: You drop a containing 1 item. + offers you for your items in your . Sell them? + [plural 'items' and 'them' were including the box along with the one + item in it even though shk was only offering to buy its contents] Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/include/extern.h b/include/extern.h index d4e255744..e2fd85dca 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1567213888 2019/08/31 01:11:28 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.728 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1571436000 2019/10/18 22:00:00 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.730 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1047,7 +1047,8 @@ E int FDECL(count_unpaid, (struct obj *)); E int FDECL(count_buc, (struct obj *, int, boolean (*)(OBJ_P))); E void FDECL(tally_BUCX, (struct obj *, BOOLEAN_P, int *, int *, int *, int *, int *)); -E long FDECL(count_contents, (struct obj *, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P)); +E long FDECL(count_contents, (struct obj *, + BOOLEAN_P, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P)); E void FDECL(carry_obj_effects, (struct obj *)); E const char *FDECL(currency, (long)); E void FDECL(silly_thing, (const char *, struct obj *)); diff --git a/src/invent.c b/src/invent.c index be2a24497..0e11e52f4 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 invent.c $NHDT-Date: 1570566378 2019/10/08 20:26:18 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.264 $ */ +/* NetHack 3.6 invent.c $NHDT-Date: 1571436003 2019/10/18 22:00:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.265 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2961,30 +2961,32 @@ int *bcp, *ucp, *ccp, *xcp, *ocp; /* count everything inside a container, or just shop-owned items inside */ long -count_contents(container, nested, quantity, everything) +count_contents(container, nested, quantity, everything, newdrop) struct obj *container; boolean nested, /* include contents of any nested containers */ quantity, /* count all vs count separate stacks */ - everything; /* all objects vs only unpaid objects */ + everything, /* all objects vs only unpaid objects */ + newdrop; /* on floor, but hero-owned items haven't been marked + * no_charge yet and shop-owned items are still marked + * unpaid -- used when asking the player whether to sell */ { struct obj *otmp, *topc; boolean shoppy = FALSE; long count = 0L; - if (!everything) { + if (!everything && !newdrop) { + xchar x, y; + for (topc = container; topc->where == OBJ_CONTAINED; topc = topc->ocontainer) continue; - if (topc->where == OBJ_FLOOR) { - xchar x, y; - - (void) get_obj_location(topc, &x, &y, CONTAINED_TOO); + if (topc->where == OBJ_FLOOR && get_obj_location(topc, &x, &y, 0)) shoppy = costly_spot(x, y); - } } for (otmp = container->cobj; otmp; otmp = otmp->nobj) { if (nested && Has_contents(otmp)) - count += count_contents(otmp, nested, quantity, everything); + count += count_contents(otmp, nested, quantity, everything, + newdrop); if (everything || otmp->unpaid || (shoppy && !otmp->no_charge)) count += quantity ? otmp->quan : 1L; } diff --git a/src/objnam.c b/src/objnam.c index 59b6397cd..5903e3b9b 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 objnam.c $NHDT-Date: 1562186589 2019/07/03 20:43:09 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.245 $ */ +/* NetHack 3.6 objnam.c $NHDT-Date: 1571436005 2019/10/18 22:00:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.247 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1047,7 +1047,7 @@ unsigned doname_flags; /* we count the number of separate stacks, which corresponds to the number of inventory slots needed to be able to take everything out if no merges occur */ - long itemcount = count_contents(obj, FALSE, FALSE, TRUE); + long itemcount = count_contents(obj, FALSE, FALSE, TRUE, FALSE); Sprintf(eos(bp), " containing %ld item%s", itemcount, plur(itemcount)); diff --git a/src/shk.c b/src/shk.c index 0cb7e2ab1..f111b3dcc 100644 --- a/src/shk.c +++ b/src/shk.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 shk.c $NHDT-Date: 1571363715 2019/10/18 01:55:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.170 $ */ +/* NetHack 3.6 shk.c $NHDT-Date: 1571436007 2019/10/18 22:00:07 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.171 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2904,8 +2904,8 @@ boolean peaceful, silent; /* gather information for message(s) prior to manipulating bill */ was_unpaid = obj->unpaid ? TRUE : FALSE; if (Has_contents(obj)) { - c_count = count_contents(obj, TRUE, FALSE, TRUE); - u_count = count_contents(obj, TRUE, FALSE, FALSE); + c_count = count_contents(obj, TRUE, FALSE, TRUE, FALSE); + u_count = count_contents(obj, TRUE, FALSE, FALSE, FALSE); } if (!billable(&shkp, obj, roomno, FALSE)) { @@ -3209,9 +3209,9 @@ xchar x, y; if (container) { /* number of items owned by shk */ - shksc = count_contents(obj, TRUE, TRUE, FALSE); + shksc = count_contents(obj, TRUE, TRUE, FALSE, TRUE); /* number of items owned by you (total - shksc) */ - yourc = count_contents(obj, TRUE, TRUE, TRUE) - shksc; + yourc = count_contents(obj, TRUE, TRUE, TRUE, TRUE) - shksc; only_partially_your_contents = shksc && yourc; } /* @@ -3227,14 +3227,27 @@ xchar x, y; (The case where it has contents already entirely owned by the shk is treated the same was if it were empty since the hero isn't selling any of those contents.) - Your container: + Your container and shk is willing to buy it: "... your . Sell it?" "... your and its contents. Sell them?" "... your and item inside. Sell them?" "... your and items inside. Sell them?" + Your container but shk only cares about the contents: + "... your item in your . Sell it?" + "... your items in your . Sell them?" Shk's container: "... your item in the . Sell it?" "... your items in the . Sell them?" + FIXME: + "your items" should sometimes be "some of your items" + (when container has some stuff the shk is willing to buy + and other stuff he or she doesn't care about); likewise, + "your item" should sometimes be "one of your items". + That would make the prompting even more verbose so + living without it might be a good thing. + FIXME too: + when container's contents are unknown, plural "items" + should be used to not give away information. */ Sprintf(qbuf, "%s offers%s %ld gold piece%s for %s%s ", Shknam(shkp), short_funds ? " only" : "", offer, @@ -3243,7 +3256,7 @@ xchar x, y; ? ((yourc == 1L) ? "your item in " : "your items in ") : "", obj->unpaid ? "the" : "your"); - one = obj->unpaid ? (yourc == 1L) : (obj->quan == 1L && !cltmp); + one = !ltmp ? (yourc == 1L) : (obj->quan == 1L && !cltmp); Sprintf(qsfx, "%s. Sell %s?", (cltmp && ltmp) ? (only_partially_your_contents From 46225955bc98afeac51d2cfbfe47aac6be140f2a Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 18 Oct 2019 18:23:47 -0700 Subject: [PATCH 055/529] symset and roguesymset options For 'O's menu, make the current symbol set be pre-selected so that the set in use is clearly marked while contemplating changing it. Using Return or Enter will pick it again; Escape is now needed to deliberately not make any selection. Also, change several symbol set initializations to use the new method of deciding whether the default symbols are still in place. --- doc/fixes36.3 | 3 ++- src/options.c | 50 +++++++++++++++++++++++++++++++++----------------- 2 files changed, 35 insertions(+), 18 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index b3c2dcead..b787a3c1e 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.142 $ $NHDT-Date: 1571435999 2019/10/18 21:59:59 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.143 $ $NHDT-Date: 1571448220 2019/10/19 01:23:40 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -357,6 +357,7 @@ status highlighting using percentage rules now supported for experience level the start of the current Xp level to the start of the next Xp level; 100% isn't possible so used as special case for next_Xp_lvl - 1 Exp_pt wizard-mode: display effect to show where an unseen wished-for monster landed +for 'O's symset and roguesymset menus, mark current symbol set as preselected curses: enable latent mouse support curses: give menus and text windows a minimum size of 5x25 since tiny ones can sometimes be overlooked when shown over old messages rather than map diff --git a/src/options.c b/src/options.c index ddbe794f8..f4975688a 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1571347977 2019/10/17 21:32:57 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.379 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1571448220 2019/10/19 01:23:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.380 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -784,9 +784,9 @@ initoptions_init() */ /* this detects the IBM-compatible console on most 386 boxes */ if ((opts = nh_getenv("TERM")) && !strncmp(opts, "AT", 2)) { - if (!symset[PRIMARY].name) + if (!symset[PRIMARY].explicitly) load_symset("IBMGraphics", PRIMARY); - if (!symset[ROGUESET].name) + if (!symset[ROGUESET].explicitly) load_symset("RogueIBM", ROGUESET); switch_symbols(TRUE); #ifdef TEXTCOLOR @@ -801,7 +801,7 @@ initoptions_init() /* [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].explicitly) load_symset("DECGraphics", PRIMARY); switch_symbols(TRUE); } @@ -810,15 +810,13 @@ initoptions_init() #if defined(MSDOS) || defined(WIN32) /* Use IBM defaults. Can be overridden via config file */ - if (!symset[PRIMARY].name) { + if (!symset[PRIMARY].explicitly) load_symset("IBMGraphics_2", PRIMARY); - } - if (!symset[ROGUESET].name) { + if (!symset[ROGUESET].explicitly) load_symset("RogueEpyx", ROGUESET); - } #endif #ifdef MAC_GRAPHICS_ENV - if (!symset[PRIMARY].name) + if (!symset[PRIMARY].explicitly) load_symset("MACGraphics", PRIMARY); switch_symbols(TRUE); #endif /* MAC_GRAPHICS_ENV */ @@ -5368,7 +5366,7 @@ boolean setinitial, setfromfile; nothing_to_do = FALSE; char *symset_name, fmtstr[20]; struct symsetentry *sl; - int res, which_set, setcount = 0, chosen = -2; + int res, which_set, setcount = 0, chosen = -2, defindx = 0; which_set = rogueflag ? ROGUESET : PRIMARY; symset_list = (struct symsetentry *) 0; @@ -5451,9 +5449,13 @@ boolean setinitial, setfromfile; #else nhUse(big_desc); #endif - any.a_int = 1; + any.a_int = 1; /* -1 + 2 [see 'if (sl->name) {' below]*/ + if (!symset_name) + defindx = any.a_int; add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, - "Default Symbols", MENU_UNSELECTED); + "Default Symbols", + (any.a_int == defindx) ? MENU_SELECTED + : MENU_UNSELECTED); for (sl = symset_list; sl; sl = sl->next) { /* check restrictions */ @@ -5463,20 +5465,34 @@ boolean setinitial, setfromfile; if (sl->handling == H_MAC) continue; #endif - if (sl->name) { + /* +2: sl->idx runs from 0 to N-1 for N symsets; + +1 because Defaults are implicitly in slot [0]; + +1 again so that valid data is never 0 */ any.a_int = sl->idx + 2; + if (symset_name && !strcmpi(sl->name, symset_name)) + defindx = any.a_int; Sprintf(buf, fmtstr, sl->name, sl->desc ? sl->desc : ""); - add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, - buf, MENU_UNSELECTED); + add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, + (any.a_int == defindx) ? MENU_SELECTED + : MENU_UNSELECTED); } } Sprintf(buf, "Select %ssymbol set:", rogueflag ? "rogue level " : ""); end_menu(tmpwin, buf); - if (select_menu(tmpwin, PICK_ONE, &symset_pick) > 0) { - chosen = symset_pick->item.a_int - 2; + n = select_menu(tmpwin, PICK_ONE, &symset_pick); + if (n > 0) { + chosen = symset_pick[0].item.a_int; + /* if picking non-preselected entry yields 2, make sure + that we're going with the non-preselected one */ + if (n == 2 && chosen == defindx) + chosen = symset_pick[1].item.a_int; + chosen -= 2; /* convert menu index to symset index; + * "Default symbols" have index -1 */ free((genericptr_t) symset_pick); + } else if (n == 0 && defindx > 0) { + chosen = defindx - 2; } destroy_nhwindow(tmpwin); From c099e0a1ffbd16de41860cfa7dc10681d829d69f Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 19 Oct 2019 12:05:33 -0400 Subject: [PATCH 056/529] grammar fix for "That walking shoes is really a small mimic" --- doc/fixes36.3 | 2 ++ include/extern.h | 1 + src/apply.c | 11 +++++++++-- src/mkobj.c | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index b787a3c1e..dee5b5b40 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -200,6 +200,8 @@ in a shop which doesn't care about tools: You drop a containing 1 item. offers you for your items in your . Sell them? [plural 'items' and 'them' were including the box along with the one item in it even though shk was only offering to buy its contents] +grammar correction for "That walking shoes is really a small mimic" when + applying a stethoscope Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/include/extern.h b/include/extern.h index e2fd85dca..8552e195f 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1379,6 +1379,7 @@ E struct obj *FDECL(obj_nexto_xy, (struct obj *, int, int, BOOLEAN_P)); E struct obj *FDECL(obj_absorb, (struct obj **, struct obj **)); E struct obj *FDECL(obj_meld, (struct obj **, struct obj **)); E void FDECL(pudding_merge_message, (struct obj *, struct obj *)); +E struct obj *FDECL(init_dummyobj, (struct obj *, SHORT_P, long)); /* ### mkroom.c ### */ diff --git a/src/apply.c b/src/apply.c index 11bd09d03..3c11c6114 100644 --- a/src/apply.c +++ b/src/apply.c @@ -383,10 +383,15 @@ register struct obj *obj; newsym(mtmp->mx, mtmp->my); } else if (mtmp->mappearance) { const char *what = "thing"; + boolean use_plural = FALSE; + struct obj dummyobj, *odummy; switch (M_AP_TYPE(mtmp)) { case M_AP_OBJECT: - what = simple_typename(mtmp->mappearance); + odummy = init_dummyobj(&dummyobj, mtmp->mappearance, 1L); + what = simple_typename(odummy->otyp); + use_plural = (is_boots(odummy) || is_gloves(odummy) + || odummy->otyp == LENSES); break; case M_AP_MONSTER: /* ignore Hallucination here */ what = mons[mtmp->mappearance].mname; @@ -396,7 +401,9 @@ register struct obj *obj; break; } seemimic(mtmp); - pline("That %s is really %s.", what, mnm); + pline("%s %s %s really %s.", + use_plural ? "Those" : "That", what, + use_plural ? "are" : "is", mnm); } else if (flags.verbose && !canspotmon(mtmp)) { There("is %s there.", mnm); } diff --git a/src/mkobj.c b/src/mkobj.c index 6975ca966..6f5abbcc0 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -2470,6 +2470,38 @@ struct monst *mon; } } +/* + * Initialize a dummy obj with just enough info + * to allow some of the tests in obj.h that + * take an obj pointer to work. + * + */ +struct obj * +init_dummyobj(obj, otyp, oquan) +struct obj *obj; +short otyp; +long oquan; +{ + if (obj) { + *obj = zeroobj; + obj->otyp = otyp; + obj->oclass = objects[otyp].oc_class; + /* obj->dknown = 0; */ + /* suppress known except for amulets (needed for fakes and real A-of-Y) */ + obj->known = (obj->oclass == AMULET_CLASS) + ? obj->known + /* default is "on" for types which don't use it */ + : !objects[otyp].oc_uses_known; + obj->quan = oquan ? oquan : 1L; + obj->corpsenm = NON_PM; /* suppress statue and figurine details */ + /* but suppressing fruit details leads to "bad fruit #0" + [perhaps we should force "slime mold" rather than use xname?] */ + if (obj->otyp == SLIME_MOLD) + obj->spe = 1; + } + return obj; +} + /* obj sanity check: check objects inside container */ STATIC_OVL void check_contained(container, mesg) From bf7e95564599034254e98f0ef9ee811bfcc7d219 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 19 Oct 2019 17:38:27 -0700 Subject: [PATCH 057/529] mimicking slime molds Mimic-as-slime_mold needs to keep track of the fruit index the same way that mimic-as-corpse keeps track of corpse's monster type. The mimic description was changing (for '/' and ';' feedback) whenever the player assiged a new fruit name. That wasn't noticeable when applying a stethoscope because mimic-as-slime_mold always yielded "that fruit is really a mimic". Change it to report the fruit's type instead of generic "fruit". --- doc/fixes36.3 | 4 +++- include/mextra.h | 5 +++-- src/apply.c | 16 ++++++++++++++-- src/makemon.c | 14 +++++++++++++- src/mkobj.c | 10 ++++------ src/pager.c | 17 ++++++++++++----- 6 files changed, 49 insertions(+), 17 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index dee5b5b40..b8ba97c9b 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.143 $ $NHDT-Date: 1571448220 2019/10/19 01:23:40 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.145 $ $NHDT-Date: 1571531885 2019/10/20 00:38:05 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -202,6 +202,8 @@ in a shop which doesn't care about tools: You drop a containing 1 item. item in it even though shk was only offering to buy its contents] grammar correction for "That walking shoes is really a small mimic" when applying a stethoscope +mimic immitating a slime mold would change fruit type when player assigned new + named fruit Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/include/mextra.h b/include/mextra.h index e942c9554..6879a16ac 100644 --- a/include/mextra.h +++ b/include/mextra.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 mextra.h $NHDT-Date: 1547428759 2019/01/14 01:19:19 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.22 $ */ +/* NetHack 3.6 mextra.h $NHDT-Date: 1571531885 2019/10/20 00:38:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.23 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -179,7 +179,8 @@ struct mextra { struct eshk *eshk; struct emin *emin; struct edog *edog; - int mcorpsenm; /* obj->corpsenm for mimic posing as statue or corpse */ + int mcorpsenm; /* obj->corpsenm for mimic posing as statue or corpse, or + * obj->spe (fruit index) for one posing as a slime mold */ }; #define MNAME(mon) ((mon)->mextra->mname) diff --git a/src/apply.c b/src/apply.c index 3c11c6114..63ffe9e6f 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 apply.c $NHDT-Date: 1568922511 2019/09/19 19:48:31 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.277 $ */ +/* NetHack 3.6 apply.c $NHDT-Date: 1571531886 2019/10/20 00:38:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.279 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -388,8 +388,20 @@ register struct obj *obj; switch (M_AP_TYPE(mtmp)) { case M_AP_OBJECT: + /* FIXME? + * we should probably be using object_from_map() here + */ odummy = init_dummyobj(&dummyobj, mtmp->mappearance, 1L); - what = simple_typename(odummy->otyp); + /* simple_typename() yields "fruit" for any named fruit; + we want the same thing '//' or ';' shows: "slime mold" + or "grape" or "slice of pizza" */ + if (odummy->otyp == SLIME_MOLD + && has_mcorpsenm(mtmp) && MCORPSENM(mtmp) != NON_PM) { + odummy->spe = MCORPSENM(mtmp); + what = simpleonames(odummy); + } else { + what = simple_typename(odummy->otyp); + } use_plural = (is_boots(odummy) || is_gloves(odummy) || odummy->otyp == LENSES); break; diff --git a/src/makemon.c b/src/makemon.c index 6d3635cd2..2ec04698c 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 makemon.c $NHDT-Date: 1570569787 2019/10/08 21:23:07 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.140 $ */ +/* NetHack 3.6 makemon.c $NHDT-Date: 1571531888 2019/10/20 00:38:08 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.141 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2245,6 +2245,18 @@ register struct monst *mtmp; newmcorpsenm(mtmp); MCORPSENM(mtmp) = mndx; + } else if (ap_type == M_AP_OBJECT && appear == SLIME_MOLD) { + newmcorpsenm(mtmp); + MCORPSENM(mtmp) = context.current_fruit; + /* if no objects of this fruit type have been created yet, + context.current_fruit is available for re-use when the player + assigns a new fruit name; override that--having a mimic as the + current_fruit is equivalent to creating an instance of that + fruit (no-op if a fruit of this type has actually been made) */ + flags.made_fruit = TRUE; + } else if (has_mcorpsenm(mtmp)) { + /* don't retain stale value from a previously mimicked shape */ + MCORPSENM(mtmp) = NON_PM; } if (does_block(mx, my, &levl[mx][my])) diff --git a/src/mkobj.c b/src/mkobj.c index 6f5abbcc0..17265ff89 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mkobj.c $NHDT-Date: 1570872702 2019/10/12 09:31:42 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.155 $ */ +/* NetHack 3.6 mkobj.c $NHDT-Date: 1571531889 2019/10/20 00:38:09 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.157 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2474,7 +2474,6 @@ struct monst *mon; * Initialize a dummy obj with just enough info * to allow some of the tests in obj.h that * take an obj pointer to work. - * */ struct obj * init_dummyobj(obj, otyp, oquan) @@ -2487,17 +2486,16 @@ long oquan; obj->otyp = otyp; obj->oclass = objects[otyp].oc_class; /* obj->dknown = 0; */ - /* suppress known except for amulets (needed for fakes and real A-of-Y) */ + /* suppress known except for amulets (needed for fakes & real AoY) */ obj->known = (obj->oclass == AMULET_CLASS) ? obj->known /* default is "on" for types which don't use it */ : !objects[otyp].oc_uses_known; obj->quan = oquan ? oquan : 1L; obj->corpsenm = NON_PM; /* suppress statue and figurine details */ - /* but suppressing fruit details leads to "bad fruit #0" - [perhaps we should force "slime mold" rather than use xname?] */ + /* but suppressing fruit details leads to "bad fruit #0" */ if (obj->otyp == SLIME_MOLD) - obj->spe = 1; + obj->spe = context.current_fruit; } return obj; } diff --git a/src/pager.c b/src/pager.c index 86dad4414..31c97d7c7 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pager.c $NHDT-Date: 1570142734 2019/10/03 22:45:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.156 $ */ +/* NetHack 3.6 pager.c $NHDT-Date: 1571531890 2019/10/20 00:38:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.157 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -190,12 +190,19 @@ struct obj **obj_p; otmp->quan = 2L; /* to force pluralization */ else if (otmp->otyp == SLIME_MOLD) otmp->spe = context.current_fruit; /* give it a type */ - if (mtmp && has_mcorpsenm(mtmp)) /* mimic as corpse/statue */ - otmp->corpsenm = MCORPSENM(mtmp); - else if (otmp->otyp == CORPSE && glyph_is_body(glyph)) + if (mtmp && has_mcorpsenm(mtmp)) { /* mimic as corpse/statue */ + if (otmp->otyp == SLIME_MOLD) + /* override context.current_fruit to avoid + look, use 'O' to make new named fruit, look again + giving different results when current_fruit changes */ + otmp->spe = MCORPSENM(mtmp); + else + otmp->corpsenm = MCORPSENM(mtmp); + } else if (otmp->otyp == CORPSE && glyph_is_body(glyph)) { otmp->corpsenm = glyph - GLYPH_BODY_OFF; - else if (otmp->otyp == STATUE && glyph_is_statue(glyph)) + } else if (otmp->otyp == STATUE && glyph_is_statue(glyph)) { otmp->corpsenm = glyph - GLYPH_STATUE_OFF; + } if (otmp->otyp == LEASH) otmp->leashmon = 0; /* extra fields needed for shop price with doname() formatting */ From 5690cce584c81c82770f699cd4895d643408eb1c Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 20 Oct 2019 11:21:47 -0400 Subject: [PATCH 058/529] one new rumor --- dat/rumors.tru | 1 + 1 file changed, 1 insertion(+) diff --git a/dat/rumors.tru b/dat/rumors.tru index 0a6ff45b0..464ee8c3a 100644 --- a/dat/rumors.tru +++ b/dat/rumors.tru @@ -151,6 +151,7 @@ Someone once said that what goes up < might come down >. Someone's been spiking the pits! Sometimes monsters are more likely to fight each other than attack you. Spinach, carrot, and jelly -- a meal fit for a nurse! +Surviving the full extent of the mines could mean that your luck is changing. Tainted meat is even more sickening than poison! Telepathy is just a trick: once you know how to do it, it's easy. The Leprechaun Gold Tru$t is no division of the Magic Memory Vault. From 15d5942b2a95c748a65954a3bc5913f4921d7386 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 22 Oct 2019 09:40:10 -0400 Subject: [PATCH 059/529] fix recent bypass of obj placement --- src/dothrow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dothrow.c b/src/dothrow.c index 1b2a80184..827cdca73 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -1294,7 +1294,7 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */ || !index(in_rooms(mon->mx, mon->my, SHOPBASE), *u.ushops))) hot_pursuit(mon); - if (obj_gone || obj == uball) + if (obj_gone) thrownobj = (struct obj *) 0; } @@ -1306,6 +1306,8 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */ swallowit: if (obj != uball) (void) mpickobj(u.ustuck, obj); /* clears 'thrownobj' */ + else + clear_thrownobj = TRUE; goto throwit_return; } else { /* Mjollnir must we wielded to be thrown--caller verifies this; From b8effef5e402207f8f53209a812cfdf2b5ad826a Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 22 Oct 2019 10:02:53 -0400 Subject: [PATCH 060/529] fix H9344: remove_object: obj not on floor (heavy iron ball & chain) --- doc/fixes36.3 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index b8ba97c9b..c8461fcc6 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -225,6 +225,8 @@ monster throwing from stack of missiles (darts, daggers, spears) would cause surviving death while polymorphed would yield "You are a " without terminating period 'mksobj failure' commit resulted in wrong corpse types for dying monsters +a recent intended sanity check fix inadvertently bypassed placing + a thrown chained ball back onto the floor curses: sometimes the message window would show a blank line after a prompt curses: the change to show map in columns 1..79 instead of 2..80 made the highlight for '@' show up in the wrong place if clipped map had been From b7ca0b4cc6502a92e3cb5485d8e075e1fde227b8 Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 22 Oct 2019 16:31:25 -0700 Subject: [PATCH 061/529] pull request #236 - tty's 'maxwin' 'maxwin' was not being get up to date. Just get rid of it. --- win/tty/wintty.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/win/tty/wintty.c b/win/tty/wintty.c index c7e7e290a..c4deaa151 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 wintty.c $NHDT-Date: 1558400902 2019/05/21 01:08:22 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.209 $ */ +/* NetHack 3.6 wintty.c $NHDT-Date: 1571787079 2019/10/22 23:31:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.223 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -135,7 +135,6 @@ struct window_procs tty_procs = { genl_can_suspend_yes, }; -static int maxwin = 0; /* number of windows in use */ winid BASE_WINDOW; struct WinDesc *wins[MAXWIN]; struct DisplayDesc *ttyDisplay; /* the tty display descriptor */ @@ -1420,10 +1419,18 @@ int type; int i, rowoffset; int newid; - if (maxwin == MAXWIN) + for (newid = 0; newid < MAXWIN; ++newid) + if (wins[newid] == 0) + break; + if (newid == MAXWIN) { + panic("No window slots!"); + /*NOTREACHED*/ return WIN_ERR; + } + + newwin = (struct WinDesc *) alloc(sizeof (struct WinDesc)); + wins[newid] = newwin; - newwin = (struct WinDesc *) alloc(sizeof(struct WinDesc)); newwin->type = type; newwin->flags = 0; newwin->active = FALSE; @@ -1490,17 +1497,7 @@ int type; break; default: panic("Tried to create window type %d\n", (int) type); - return WIN_ERR; - } - - for (newid = 0; newid < MAXWIN; newid++) { - if (wins[newid] == 0) { - wins[newid] = newwin; - break; - } - } - if (newid == MAXWIN) { - panic("No window slots!"); + /*NOTREACHED*/ return WIN_ERR; } @@ -2447,7 +2444,7 @@ winid window; free_window_info(cw, TRUE); free((genericptr_t) cw); - wins[window] = 0; + wins[window] = 0; /* available for re-use */ } void From 757eca7fd98d8f72be798cde7ee0a5dc9d280826 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 25 Oct 2019 23:11:06 -0700 Subject: [PATCH 062/529] fix github issue #238 - 'scores' option Fixes #238 For the three fields in the 'scores' option's argument: top, around, and own, if any was separated from preceding one by space(s) rather than slash and lacked a count prefix, the argument parsing skipped over it. So "10t/3a/o" and "10t 3a 1o" worked but "10t 3a o" ignored the 'o'. The issue report was about 'own' but there's nothing special about 'own' itself; just that it doesn't warrant a count prefix and is usually last (in other words, normally preceded by one or both of the other two) so more likely to trip over this. [I thought there was another report about 'scores' misbehaving (from quite a while ago) but couldn't find one. If it exists, it might have been about the same thing.] --- doc/fixes36.3 | 5 ++++- src/options.c | 10 +++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index c8461fcc6..c767a776f 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.145 $ $NHDT-Date: 1571531885 2019/10/20 00:38:05 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.147 $ $NHDT-Date: 1572070254 2019/10/26 06:10:54 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -204,6 +204,9 @@ grammar correction for "That walking shoes is really a small mimic" when applying a stethoscope mimic immitating a slime mold would change fruit type when player assigned new named fruit +parsing for the argument to 'scores' option was sloppy; "3a/o" (slash) and + "3a 1o" (space and digit one, not lowercase L) both worked but "3a o" + (just space) was supposed to but didn't Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/options.c b/src/options.c index f4975688a..64ab1a9ba 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1571448220 2019/10/19 01:23:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.380 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1572070255 2019/10/26 06:10:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.381 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3262,8 +3262,12 @@ boolean tinitial, tfrom_file; config_error_add("Unknown %s parameter '%s'", fullname, op); return FALSE; } - while (letter(*++op) || *op == ' ') - continue; + /* "3a" is sufficient but accept "3around" (or "3abracadabra") */ + while (letter(*op)) + op++; + /* t, a, and o can be separated by space(s) or slash or both */ + while (*op == ' ') + op++; if (*op == '/') op++; } From d201d302b7a95f1e0e03957a36a5737c228c20f8 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 26 Oct 2019 19:56:03 +0300 Subject: [PATCH 063/529] Fix wizmakemap leaving genocided monsters on map If a genocided monster was in "limbo" (migrating to the same level), wizmakemap put it back on map. --- doc/fixes36.3 | 1 + src/cmd.c | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index c767a776f..3b9997702 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -207,6 +207,7 @@ mimic immitating a slime mold would change fruit type when player assigned new parsing for the argument to 'scores' option was sloppy; "3a/o" (slash) and "3a 1o" (space and digit one, not lowercase L) both worked but "3a o" (just space) was supposed to but didn't +wizmakemap could leave genocided monsters on map Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/cmd.c b/src/cmd.c index e6c4049b1..e739172d5 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -861,6 +861,7 @@ wiz_makemap(VOID_ARGS) u_on_rndspot((u.uhave.amulet ? 1 : 0) /* 'going up' flag */ | (was_in_W_tower ? 2 : 0)); losedogs(); + kill_genocided_monsters(); /* u_on_rndspot() might pick a spot that has a monster, or losedogs() might pick the hero's spot (only if there isn't already a monster there), so we might have to move hero or the co-located monster */ From d834ebb0ec1ea3e8c6a7399ab7d3af3cf99d784c Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 26 Oct 2019 19:01:49 -0700 Subject: [PATCH 064/529] paranoid_query bulletproofing Make paranoid_query() (yn question requiring explicit "yes" answer) protect itself from overly long prompt strings. I'm not aware of any specific overflowing queries so I temporary reduced QBUFSZ within paranoid_query() in order to test. For EDIT_GETLIN, don't use previous response as default if we loop after neither "yes" nor "no" was given for paranoid confirm. --- doc/fixes36.3 | 4 +++- src/cmd.c | 22 +++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 3b9997702..1f8077ee2 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.147 $ $NHDT-Date: 1572070254 2019/10/26 06:10:54 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.149 $ $NHDT-Date: 1572141706 2019/10/27 02:01:46 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -255,6 +255,8 @@ EDIT_GETLIN: when naming an object or a monster use the existing name, if EDIT_GETLIN: using 'O' to set message types or menu colors was overloading the answer buffer with other stuff, resulting in bogus default response during repeat prompting +EDIT_GETLIN: for paranoid confirmation, if answer was neither "yes" nor "no", + don't supply the rejected answer as the default when retrying curses: very tall menus tried to use selector characters a-z, A-Z, and 0-9, but 0-9 should be reserved for counts and if the display was tall enough for more than 62 entries, arbitrary ASCII punctuation got used diff --git a/src/cmd.c b/src/cmd.c index e739172d5..0d65bb022 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1565574994 2019/08/12 01:56:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.343 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1572141702 2019/10/27 02:01:42 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.347 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -6045,19 +6045,27 @@ const char *prompt; to give the go-ahead for this query; default is "no" unless the ParanoidConfirm flag is set in which case there's no default */ if (be_paranoid) { - char qbuf[QBUFSZ], ans[BUFSZ] = DUMMY; - const char *promptprefix = "", *responsetype = ParanoidConfirm - ? "(yes|no)" - : "(yes) [no]"; - int trylimit = 6; /* 1 normal, 5 more with "Yes or No:" prefix */ + char pbuf[BUFSZ], qbuf[QBUFSZ], ans[BUFSZ]; + const char *promptprefix = "", + *responsetype = ParanoidConfirm ? "(yes|no)" : "(yes) [no]"; + int k, trylimit = 6; /* 1 normal, 5 more with "Yes or No:" prefix */ + copynchars(pbuf, prompt, BUFSZ - 1); /* in addition to being paranoid about this particular query, we might be even more paranoid about all paranoia responses (ie, ParanoidConfirm is set) in which case we require "no" to reject in addition to "yes" to confirm (except we won't loop if response is ESC; it means no) */ do { - Sprintf(qbuf, "%s%s %s", promptprefix, prompt, responsetype); + /* make sure we won't overflow a QBUFSZ sized buffer */ + k = (int) (strlen(promptprefix) + 1 + strlen(responsetype)); + if ((int) strlen(pbuf) + k > QBUFSZ - 1) { + /* chop off some at the end */ + Strcpy(pbuf + (QBUFSZ - 1) - k - 4, "...?"); /* -4: "...?" */ + } + + Sprintf(qbuf, "%s%s %s", promptprefix, pbuf, responsetype); + *ans = '\0'; getlin(qbuf, ans); (void) mungspaces(ans); confirmed_ok = !strcmpi(ans, "yes"); From eef880214becc22d5710562c8dbb568e2c4ad24f Mon Sep 17 00:00:00 2001 From: Bart House Date: Sat, 26 Oct 2019 20:09:14 -0700 Subject: [PATCH 065/529] Modified travis builds to deploy the x86 windows build to github if tagged. Moved the travis visual studio build bash script to live outside of the travis YML file. Updated the script to use powershell to generate ZIP file form the binary results. Deploy Windows build ZIP file to github releases if build has commit has been tagged. Build will be marked pre-release. --- .travis.yml | 50 +++++++++++------------------------- win/win32/vs2017/travisci.sh | 33 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 35 deletions(-) create mode 100644 win/win32/vs2017/travisci.sh diff --git a/.travis.yml b/.travis.yml index 67d05077d..b8750491b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,40 +73,7 @@ matrix: env: DESCR=windows-visualstudio language: shell script: -# - find /c/Program\ Files\ \(x86\) -iname 'rc.exe' -print -# - export - - export VSVER=2017 - - export MSVER=14.16.27023 - - export SDKVER=10.0.17763.0 - - export FRAMEVER=4.0.30319 - - export NETFXVER=4.6.1 - - export WKITVER=10.0.17134.0 -# - export TOOLSVER=Community - - export TOOLSVER=BuildTools - - export PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/Common7/IDE/VC/VCPackages:$PATH - - export PATH=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/bin/$WKITVER/x64:$PATH - - export PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/bin/HostX64/x64:$PATH - - export PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/bin/HostX64/x86:$PATH - - export PATH=$PATH:/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/Common7/IDE/CommonExtensions/Microsoft/TestWindow - - export PATH=$PATH:/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/MSBuild/Current/bin/Roslyn - - export INCLUDE=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/$TOOLSVER/VC/Tools/MSVC/$MSVER/include - - export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/Include/$WKITVER/ucrt - - export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/ucrt - - export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/shared - - export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/um - - export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/winrt - - export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/cppwinrt - - export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/ATLMFC/lib/x86 - - export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/lib/x86:$LIB - - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/ucrt/x86:$LIB - - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB -# - export - - git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses - - export ADD_CURSES=Y - - export PDCURSES_TOP=../../pdcurses - - cd src - - cp ../sys/winnt/Makefile.msc ./Makefile - - nmake install + - ./win/win32/vs2017/travisci.sh - os: windows # install: choco install mingw env: DESCR=windows-mingw @@ -128,4 +95,17 @@ sudo: false notifications: email: recipients: - - devteam@nethack.org + - bart@barthouse.com +# +deploy: + provider: releases + api_key: + secure: "U0Dt2CXrcG8Yi4taUCT/6AnM+0IJtdCv6IVG/2rGooUY3pZjNWE9XDM6X9ZeAmbI79aN6FPTppjUf3KbB/upYeJt+8mrjnxEk/ZTO1xXDDW8iL/DiqnczoFsMGmPsTM+Fkeak8bu0SifI7Qkx9i1N+zOyl2VdlaxGjchPfl/OJw2jcQs7rOGRfr23/rapZKTcFq+BFlxMiIHa0dXbCJ9vagdlyAeclOCtPjw1VoH/Cb/+0/Xlx2MFPncw4/1P+bO/fPantHyehh3/WCDVCnI4M7ftONpsTVRrQ+Hml89teUH9/1xXUOpbCeVghWr1rumLcQzMqLKNj2lP/gm9co2/DKpxiUPUzBfO/9Jvl1CNoEwPYQBRNb38kggDvAT4vKX38Oi5sZvumFEO4L0y7o4cW6SA4/CYIykfxOdkrryt8ltfWwopdy3I/DothYw31vJ9GsZOCAShFRAy3hJxYUbHhT+7SDUBadVSEkb4UqxQ+7zntAVT+Lp4DXLAfvsWxZGrQoP/IrWAgNOLRKILubpzh+YpadMH3Ygha2JRAeJAEZ3DnXf3vOOAucWnk4mNXDbW35GTDTAJDWMvddZCfsrUI/uHxgaRjFs9fLX1X5tqhGnsr27sKLWyX+zrIPVV0TPl3AzYPAf6Bc8Okeu+JEGQERvvgSasCuYcmhgYznBVJI=" + file: + - "NetHack.zip" + skip_cleanup: true + on: + tags: true + prerelease: true + name: "Pre-release build of NetHack 3.6.3" + body: "This is auto generated pre-release build of NetHack 3.6.3 and as such has not been tested." diff --git a/win/win32/vs2017/travisci.sh b/win/win32/vs2017/travisci.sh new file mode 100644 index 000000000..6b21a45d4 --- /dev/null +++ b/win/win32/vs2017/travisci.sh @@ -0,0 +1,33 @@ +export VSVER=2017 +export MSVER=14.16.27023 +export SDKVER=10.0.17763.0 +export FRAMEVER=4.0.30319 +export NETFXVER=4.6.1 +export WKITVER=10.0.17134.0 +#export TOOLSVER=Enterprise +export TOOLSVER=BuildTools +export PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/Common7/IDE/VC/VCPackages:$PATH +export PATH=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/bin/$WKITVER/x64:$PATH +export PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/bin/HostX64/x64:$PATH +export PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/bin/HostX64/x86:$PATH +export PATH=$PATH:/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/Common7/IDE/CommonExtensions/Microsoft/TestWindow +export PATH=$PATH:/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/MSBuild/Current/bin/Roslyn +export INCLUDE=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/$TOOLSVER/VC/Tools/MSVC/$MSVER/include +export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/Include/$WKITVER/ucrt +export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/ucrt +export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/shared +export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/um +export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/winrt +export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/cppwinrt +export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/ATLMFC/lib/x86 +export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/lib/x86:$LIB +export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/ucrt/x86:$LIB +export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB +git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses +export ADD_CURSES=Y +export PDCURSES_TOP=../../pdcurses +cd src +cp ../sys/winnt/Makefile.msc ./Makefile +nmake install +cd .. +powershell -Command "Compress-Archive -U -LiteralPath binary -DestinationPath NetHack.zip" From 91f783daf611504ba4f84ecd983cc75ee6649ba6 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sat, 26 Oct 2019 20:11:21 -0700 Subject: [PATCH 066/529] Changed travis email to once again send to devteam. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b8750491b..501c0f7df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -95,7 +95,7 @@ sudo: false notifications: email: recipients: - - bart@barthouse.com + - devteam@nethack.org # deploy: provider: releases From 2d7901372e7f731f22ed8bb2bf9ca0997ade8c1d Mon Sep 17 00:00:00 2001 From: Bart House Date: Sat, 26 Oct 2019 20:39:24 -0700 Subject: [PATCH 067/529] Change ZIP file layout to be flat. --- win/win32/vs2017/travisci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/win32/vs2017/travisci.sh b/win/win32/vs2017/travisci.sh index 6b21a45d4..09b4b9822 100644 --- a/win/win32/vs2017/travisci.sh +++ b/win/win32/vs2017/travisci.sh @@ -30,4 +30,4 @@ cd src cp ../sys/winnt/Makefile.msc ./Makefile nmake install cd .. -powershell -Command "Compress-Archive -U -LiteralPath binary -DestinationPath NetHack.zip" +powershell -Command "Compress-Archive -U -Path binary/*.* -DestinationPath NetHack.zip" From faf795b014774d58fdc34db73d6268594971aaf9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 27 Oct 2019 20:36:03 -0400 Subject: [PATCH 068/529] travis updates for Windows deploy travis updates for Windows deploy Change zip file name from NetHack.zip to NetHack-x86-beta$TRAVIS_TAG.zip where $TRAVIS_TAG represents the tag info. Also, log the commands from the sh script in win/win32/vs2017 to the build log. --- .travis.yml | 7 ++++--- win/win32/vs2017/travisci.sh | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 501c0f7df..d13ff931d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -101,11 +101,12 @@ deploy: provider: releases api_key: secure: "U0Dt2CXrcG8Yi4taUCT/6AnM+0IJtdCv6IVG/2rGooUY3pZjNWE9XDM6X9ZeAmbI79aN6FPTppjUf3KbB/upYeJt+8mrjnxEk/ZTO1xXDDW8iL/DiqnczoFsMGmPsTM+Fkeak8bu0SifI7Qkx9i1N+zOyl2VdlaxGjchPfl/OJw2jcQs7rOGRfr23/rapZKTcFq+BFlxMiIHa0dXbCJ9vagdlyAeclOCtPjw1VoH/Cb/+0/Xlx2MFPncw4/1P+bO/fPantHyehh3/WCDVCnI4M7ftONpsTVRrQ+Hml89teUH9/1xXUOpbCeVghWr1rumLcQzMqLKNj2lP/gm9co2/DKpxiUPUzBfO/9Jvl1CNoEwPYQBRNb38kggDvAT4vKX38Oi5sZvumFEO4L0y7o4cW6SA4/CYIykfxOdkrryt8ltfWwopdy3I/DothYw31vJ9GsZOCAShFRAy3hJxYUbHhT+7SDUBadVSEkb4UqxQ+7zntAVT+Lp4DXLAfvsWxZGrQoP/IrWAgNOLRKILubpzh+YpadMH3Ygha2JRAeJAEZ3DnXf3vOOAucWnk4mNXDbW35GTDTAJDWMvddZCfsrUI/uHxgaRjFs9fLX1X5tqhGnsr27sKLWyX+zrIPVV0TPl3AzYPAf6Bc8Okeu+JEGQERvvgSasCuYcmhgYznBVJI=" + file_glob: true file: - - "NetHack.zip" + - "NetHack-x86-beta$TRAVIS_TAG.zip" skip_cleanup: true on: tags: true prerelease: true - name: "Pre-release build of NetHack 3.6.3" - body: "This is auto generated pre-release build of NetHack 3.6.3 and as such has not been tested." + name: "Pre-release travis_test of NetHack 3.6.3" + body: "This is auto generated pre-release travis_test build of NetHack 3.6.3." diff --git a/win/win32/vs2017/travisci.sh b/win/win32/vs2017/travisci.sh index 09b4b9822..819de56a9 100644 --- a/win/win32/vs2017/travisci.sh +++ b/win/win32/vs2017/travisci.sh @@ -1,3 +1,4 @@ +set -x export VSVER=2017 export MSVER=14.16.27023 export SDKVER=10.0.17763.0 @@ -26,8 +27,11 @@ export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses export ADD_CURSES=Y export PDCURSES_TOP=../../pdcurses +export cd src cp ../sys/winnt/Makefile.msc ./Makefile nmake install cd .. -powershell -Command "Compress-Archive -U -Path binary/*.* -DestinationPath NetHack.zip" +powershell -Command "Compress-Archive -U -Path binary/*.* -DestinationPath NetHack-x86-beta$TRAVIS_TAG.zip" + + From 4f94bcaa8bf485fdc7b58cffa60ffbed755dbc44 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 27 Oct 2019 20:42:22 -0400 Subject: [PATCH 069/529] travis bits --- .travis.yml | 4 ++-- win/win32/vs2017/travisci.sh | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d13ff931d..00a6c1153 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,5 +108,5 @@ deploy: on: tags: true prerelease: true - name: "Pre-release travis_test of NetHack 3.6.3" - body: "This is auto generated pre-release travis_test build of NetHack 3.6.3." + name: "Pre-release build of NetHack 3.6.3" + body: "This is auto generated pre-release build of NetHack 3.6.3 and as such has not been tested." diff --git a/win/win32/vs2017/travisci.sh b/win/win32/vs2017/travisci.sh index 819de56a9..e17de0efa 100644 --- a/win/win32/vs2017/travisci.sh +++ b/win/win32/vs2017/travisci.sh @@ -34,4 +34,3 @@ nmake install cd .. powershell -Command "Compress-Archive -U -Path binary/*.* -DestinationPath NetHack-x86-beta$TRAVIS_TAG.zip" - From a399151d0195910fac7f7b5b08ce437b6cfc4136 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 27 Oct 2019 23:12:11 -0400 Subject: [PATCH 070/529] some symbol tweaks A few symbol-related modifications: - fulfill a request from a blind player to allow them to specify a unique/recognizable character for all pets and/or the player in the config file for use when using a screen reader (S_player_override, S_pet_override). Requires sysconf setting ACCESSIBILITY to be set to have an effect, although they can still be specified in the config file. - Config file SYMBOLS entries were not working properly on the rogue level. Allow ROGUESYMBOLS as well as SYMBOLS to be specified in the config file independently. - When values are moved into showsyms[], the overriding SYMBOLS or ROGUESYMBOLS entry from the config file is used if there is one; if there is no overriding value for a particular symbol, the loaded symset value is used; if there is no symset entry loaded for the symbol then a default symbol is used. --- doc/Guidebook.mn | 15 +++- doc/Guidebook.tex | 24 ++++-- doc/fixes36.3 | 3 + include/extern.h | 16 ++-- include/rm.h | 10 ++- include/sys.h | 3 + src/detect.c | 7 +- src/drawing.c | 188 +++++++++++++++++++++++++++++----------------- src/files.c | 26 +++++-- src/mapglyph.c | 26 +++++-- src/options.c | 47 ++++++++---- src/pager.c | 53 ++++++++++++- src/sys.c | 1 + sys/unix/sysconf | 5 ++ sys/winnt/nttty.c | 4 +- sys/winnt/sysconf | 5 ++ 16 files changed, 306 insertions(+), 127 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 9fb47b12e..ec60a55ce 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "October 1, 2019 +.ds f2 "October 27, 2019 . .\" A note on some special characters: .\" \(lq = left double quote @@ -2731,7 +2731,7 @@ See the \(lqConfiguring Message Types\(rq section. .lp MENUCOLOR Highlight menu lines with different colors. See the \(lqConfiguring Menu Colors\(rq section. -.lp SYMBOLS +.lp SYMBOLS, ROGUESYMBOLS Override one or more symbols in the symbols files. See the \(lqModifying NetHack Symbols\(rq section. .pg @@ -4375,8 +4375,8 @@ Set the name of the symbol set that you want to load. Set the name of the symbol set that you want to load for display on the rogue level. .pg -You can also override one or more symbols using the SYMBOLS config -file option. Symbols are specified as name:value pairs. +You can also override one or more symbols using the SYMBOLS and +ROGUESYMBOLS config file options. Symbols are specified as name:value pairs. Note that NetHack escape-processes the value string in conventional C fashion. This means that \\ is a prefix to take the following character literally. @@ -4570,6 +4570,8 @@ X S_xorn (xorn) Y S_yeti (apelike creature) Z S_zombie (zombie) z S_zruty (zruty) + S_pet_override (pet override if sysconf accessibility is set) + S_player_override (player override if sysconf accessibility is set) .\"TABLE_END Do not delete this line. .TE .pg @@ -4612,7 +4614,12 @@ configuration file will cause the game to run in a manner accessible to the blind. After you have gained some experience with the game and with editing files, you may want to alter settings via \fBSYMBOLS=\fP +and \fBROGUESYMBOLS=\fP in your configuration file to better suit your preferences. +See the previous section for the special symbols S_pet_override +to force a consistent symbol for all pets and and +S_player_override to force a unique symbol for the player character +if \fBaccessibility\fP is enabled in the sysconf file. The most crucial settings to make the game accessible are: .pg .lp symset:NHAccess diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index ab337531f..b049a9cfa 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{October 1, 2019} +\date{October 22, 2019} \maketitle @@ -3000,7 +3000,7 @@ See the ``Configuring Message Types`` section. Highlight menu lines with different colors. See the ``Configuring Menu Colors`` section. %.lp -\item[\bb{SYMBOLS}] +\item[\bb{SYMBOLS},\bb{ROGUESYMBOLS}] Override one or more symbols in the symbols files. See the ``Modifying {\it NetHack\/} Symbols'' section. %.pg @@ -4870,11 +4870,12 @@ Set the name of the symbol set that you want to load for display on the rogue level. \elist -You can also override one or more symbols using the {\it SYMBOLS\/} config -file option. Symbols are specified as {\it name:value\/} pairs. Note that -{\it NetHack\/} escape-processes the {\it value\/} string in conventional C -fashion. This means that `\verb+\+' is a prefix to take the following -character literally. Thus `\verb+\+' needs to be represented as `\verb+\\+'. +You can also override one or more symbols using the {\it SYMBOLS\/} and +{\it ROGUESYMBOLS\/} config file options. Symbols are specified as +{\it name:value\/} pairs. Note that {\it NetHack\/} escape-processes +the {\it value\/} string in conventional C fashion. This means that `\verb+\+' +is a prefix to take the following character literally. Thus `\verb+\+' needs +to be represented as `\verb+\\+'. The special prefix `\verb+\m+' switches on the meta bit in the symbol value, and the `{\tt \^{}}' prefix causes the following character to be treated as a control @@ -5060,7 +5061,9 @@ Default & Symbol Name & Description\\ \verb@X@ & S\verb+_+xorn & (xorn)\\ \verb@Y@ & S\verb+_+yeti & (apelike creature)\\ \verb@Z@ & S\verb+_+zombie & (zombie)\\ -\verb@z@ & S\verb+_+zruty & (zruty) +\verb@z@ & S\verb+_+zruty & (zruty)\\ +\verb@ @ & S\verb+_+pet\verb+_+override & (pet override if sysconf accessibility is set)\\ +\verb@ @ & S\verb+_+player\verb+_+override & (player override if sysconf accessibility is set) \end{longtable}% } @@ -5105,7 +5108,12 @@ is a symset called {\it NHAccess\/}. Selecting that symset in your configuration file will cause the game to run in a manner accessible to the blind. After you have gained some experience with the game and with editing files, you may want to alter settings via {\it SYMBOLS=\/} +and {\it ROGUESYMBOLS=\/} in your configuration file to better suit your preferences. +See the previous section for the special symbols S\verb+_+pet\verb+_+override +to force a consistent symbol for all pets and S\verb+_+player\verb+_+override +to force a unique symbol for the player character if {\it accessibility\/} +is enabled in the {\it sysconf\/} file. The most crucial settings to make the game accessible are: %.pg \blist{} diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 1f8077ee2..5940e16aa 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -379,6 +379,9 @@ curses+'perm_invent': since persistent inventory is narrow, strip off "a", curses+'curses': change the curses map display to use new symbol set 'curses' instead of hard-coded values; it attempts to show IBMgraphics-style map using DECgraphics characters; DECgraphics can also be used as-is +fulfill a request from a blind player to have a unique overriding SYMBOL for pets + and for the player +ROGUESYMBOLS can be overridden in config files like SYMBOLS can NetHack Community Patches (or Variation) Included diff --git a/include/extern.h b/include/extern.h index 8552e195f..6dc781e1d 100644 --- a/include/extern.h +++ b/include/extern.h @@ -584,15 +584,19 @@ E int FDECL(def_char_to_monclass, (CHAR_P)); #if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C) E void FDECL(switch_symbols, (int)); E void FDECL(assign_graphics, (int)); -E void NDECL(init_r_symbols); E void NDECL(init_symbols); -E void NDECL(update_bouldersym); E void NDECL(init_showsyms); -E void NDECL(init_l_symbols); +E void NDECL(init_primary_symbols); +E void NDECL(init_rogue_symbols); +E void NDECL(init_ov_primary_symbols); +E void NDECL(init_ov_rogue_symbols); E void FDECL(clear_symsetentry, (int, BOOLEAN_P)); -E void FDECL(update_l_symset, (struct symparse *, int)); -E void FDECL(update_r_symset, (struct symparse *, int)); +E void FDECL(update_primary_symset, (struct symparse *, int)); +E void FDECL(update_rogue_symset, (struct symparse *, int)); +E void FDECL(update_ov_primary_symset, (struct symparse *, int)); +E void FDECL(update_ov_rogue_symset, (struct symparse *, int)); E boolean FDECL(cursed_object_at, (int, int)); +E nhsym FDECL(get_othersym, (int, int)); /* ### dungeon.c ### */ @@ -1781,7 +1785,7 @@ E int FDECL(add_autopickup_exception, (const char *)); E void NDECL(free_autopickup_exceptions); E int FDECL(load_symset, (const char *, int)); E void NDECL(free_symsets); -E boolean FDECL(parsesymbols, (char *)); +E boolean FDECL(parsesymbols, (char *, int)); E struct symparse *FDECL(match_sym, (char *)); E void NDECL(set_playmode); E int FDECL(sym_val, (const char *)); diff --git a/include/rm.h b/include/rm.h index 87d7566a2..1d27c95e9 100644 --- a/include/rm.h +++ b/include/rm.h @@ -266,7 +266,9 @@ struct symparse { /* misc symbol definitions */ #define SYM_BOULDER 0 #define SYM_INVISIBLE 1 -#define MAXOTHER 2 +#define SYM_PET_OVERRIDE 2 +#define SYM_PLAYER_OVERRIDE 3 +#define MAXOTHER 4 /* linked list of symsets and their characteristics */ struct symsetentry { @@ -306,8 +308,10 @@ extern const struct symdef defsyms[MAXPCHARS]; /* defaults */ extern const struct symdef def_warnsyms[WARNCOUNT]; extern int currentgraphics; /* from drawing.c */ extern nhsym showsyms[]; -extern nhsym l_syms[]; -extern nhsym r_syms[]; +extern nhsym primary_syms[]; +extern nhsym rogue_syms[]; +extern nhsym ov_primary_syms[]; +extern nhsym ov_rogue_syms[]; extern struct symsetentry symset[NUM_GRAPHICS]; /* from drawing.c */ #define SYMHANDLING(ht) (symset[currentgraphics].handling == (ht)) diff --git a/include/sys.h b/include/sys.h index 17bbadb85..bf039cf77 100644 --- a/include/sys.h +++ b/include/sys.h @@ -41,6 +41,9 @@ struct sysopt { char *greppath; int panictrace_gdb; int panictrace_libc; + + /* enable accessibility options */ + int accessibility; }; extern struct sysopt sysopt; diff --git a/src/detect.c b/src/detect.c index e7da0f85a..0afaa9373 100644 --- a/src/detect.c +++ b/src/detect.c @@ -600,13 +600,13 @@ int class; /* an object class, 0 for all */ } /* Special boulder symbol check - does the class symbol happen - * to match iflags.bouldersym which is a user-defined? + * to match showsyms[SYM_BOULDER + SYM_OFF_X] which is user-defined. * If so, that means we aren't sure what they really wanted to * detect. Rather than trump anything, show both possibilities. * We can exclude checking the buried obj chain for boulders below. */ sym = class ? def_oc_syms[class].sym : 0; - if (sym && iflags.bouldersym && sym == iflags.bouldersym) + if (sym && showsyms[SYM_BOULDER + SYM_OFF_X] && sym == showsyms[SYM_BOULDER + SYM_OFF_X]) boulder = ROCK_CLASS; if (Hallucination || (Confusion && class == SCROLL_CLASS)) @@ -1208,7 +1208,8 @@ struct obj **optr; ret = object_detect((struct obj *) 0, class); else if ((class = def_char_to_monclass(ch)) != MAXMCLASSES) ret = monster_detect((struct obj *) 0, class); - else if (iflags.bouldersym && (ch == iflags.bouldersym)) + else if (showsyms[SYM_BOULDER + SYM_OFF_X] + && (ch == showsyms[SYM_BOULDER + SYM_OFF_X])) ret = object_detect((struct obj *) 0, ROCK_CLASS); else switch (ch) { diff --git a/src/drawing.c b/src/drawing.c index 072485fb6..91bd3d3b4 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -22,13 +22,14 @@ struct symsetentry symset[NUM_GRAPHICS]; int currentgraphics = 0; nhsym showsyms[SYM_MAX] = DUMMY; /* symbols to be displayed */ -nhsym l_syms[SYM_MAX] = DUMMY; /* loaded symbols */ -nhsym r_syms[SYM_MAX] = DUMMY; /* rogue symbols */ - +nhsym primary_syms[SYM_MAX] = DUMMY; /* primary symbols */ +nhsym rogue_syms[SYM_MAX] = DUMMY; /* rogue symbols */ +nhsym ov_primary_syms[SYM_MAX] = DUMMY; /* overides via config SYMBOL */ +nhsym ov_rogue_syms[SYM_MAX] = DUMMY; /* overides via config ROGUESYMBOL */ nhsym warnsyms[WARNCOUNT] = DUMMY; /* the current warning display symbols */ const char invisexplain[] = "remembered, unseen, creature", altinvisexplain[] = "unseen creature"; /* for clairvoyance */ - + /* Default object class symbols. See objclass.h. * {symbol, name, explain} * name: used in object_detect(). @@ -306,7 +307,7 @@ char ch; * init_symbols() * Sets the current display symbols, the * loadable symbols to the default NetHack - * symbols, including the r_syms rogue level + * symbols, including the rogue_syms rogue level * symbols. This would typically be done * immediately after execution begins. Any * previously loaded external symbol sets are @@ -322,8 +323,8 @@ char ch; * * If (arg != 0), which is the normal expected * usage, then showsyms are taken from the - * adjustable display symbols found in l_syms. - * l_syms may have been loaded from an external + * adjustable display symbols found in primary_syms. + * primary_syms may have been loaded from an external * symbol file by config file options or interactively * in the Options menu. * @@ -333,37 +334,33 @@ char ch; * out of other {rogue} level display modes. * * If arg is ROGUESET, this places the rogue level - * symbols from r_syms into showsyms. + * symbols from rogue_syms into showsyms. * * If arg is PRIMARY, this places the symbols * from l_monsyms into showsyms. * - * update_l_symset() - * Update a member of the loadable (l_*) symbol set. + * update_primary_symset() + * Update a member of the primary(primary_*) symbol set. * - * update_r_symset() - * Update a member of the rogue (r_*) symbol set. + * update_rogue_symset() + * Update a member of the rogue (rogue_*) symbol set. + * + * update_ov_primary_symset() + * Update a member of the overrides for primary symbol set. + * + * update_ov_rogue_symset() + * Update a member of the overrides for rogue symbol set. * */ void init_symbols() { - init_l_symbols(); + init_ov_primary_symbols(); + init_ov_rogue_symbols(); + init_primary_symbols(); init_showsyms(); - init_r_symbols(); -} - -void -update_bouldersym() -{ - nhsym boulder = (nhsym) iflags.bouldersym; - - if (!boulder) - boulder = def_oc_syms[ROCK_CLASS].sym; /* (nhsym) ROCK_SYM */ - showsyms[SYM_BOULDER + SYM_OFF_X] = boulder; - l_syms[SYM_BOULDER + SYM_OFF_X] = boulder; - r_syms[SYM_BOULDER + SYM_OFF_X] = boulder; + init_rogue_symbols(); } void @@ -379,44 +376,78 @@ init_showsyms() showsyms[i + SYM_OFF_M] = def_monsyms[i].sym; for (i = 0; i < WARNCOUNT; i++) showsyms[i + SYM_OFF_W] = def_warnsyms[i].sym; - for (i = 0; i < MAXOTHER; i++) { - if (i == SYM_BOULDER) - showsyms[i + SYM_OFF_X] = iflags.bouldersym - ? iflags.bouldersym - : def_oc_syms[ROCK_CLASS].sym; - else if (i == SYM_INVISIBLE) - showsyms[i + SYM_OFF_X] = DEF_INVISIBLE; - } + for (i = 0; i < MAXOTHER; i++) + showsyms[i + SYM_OFF_X] = get_othersym(i, PRIMARY); } -/* initialize defaults for the loadable symset */ +/* initialize defaults for the overrides to the rogue symset */ void -init_l_symbols() +init_ov_rogue_symbols() +{ + register int i; + + for (i = 0; i < SYM_MAX; i++) + ov_rogue_syms[i] = (nhsym) 0; +} +/* initialize defaults for the overrides to the primary symset */ +void +init_ov_primary_symbols() +{ + register int i; + + for (i = 0; i < SYM_MAX; i++) + ov_primary_syms[i] = (nhsym) 0; +} + +nhsym +get_othersym(idx, which_set) +int idx, which_set; +{ + nhsym sym = (nhsym) 0; + int oidx = idx + SYM_OFF_X; + + if (which_set == ROGUESET) + sym = ov_rogue_syms[oidx] ? ov_rogue_syms[oidx] + : rogue_syms[oidx]; + else + sym = ov_primary_syms[oidx] ? ov_primary_syms[oidx] + : primary_syms[oidx]; + if (!sym) { + switch(idx) { + case SYM_BOULDER: + sym = def_oc_syms[ROCK_CLASS].sym; + break; + case SYM_INVISIBLE: + sym = DEF_INVISIBLE; + break; + } + } + return sym; +} + +/* initialize defaults for the primary symset */ +void +init_primary_symbols() { register int i; for (i = 0; i < MAXPCHARS; i++) - l_syms[i + SYM_OFF_P] = defsyms[i].sym; + primary_syms[i + SYM_OFF_P] = defsyms[i].sym; for (i = 0; i < MAXOCLASSES; i++) - l_syms[i + SYM_OFF_O] = def_oc_syms[i].sym; + primary_syms[i + SYM_OFF_O] = def_oc_syms[i].sym; for (i = 0; i < MAXMCLASSES; i++) - l_syms[i + SYM_OFF_M] = def_monsyms[i].sym; + primary_syms[i + SYM_OFF_M] = def_monsyms[i].sym; for (i = 0; i < WARNCOUNT; i++) - l_syms[i + SYM_OFF_W] = def_warnsyms[i].sym; - for (i = 0; i < MAXOTHER; i++) { - if (i == SYM_BOULDER) - l_syms[i + SYM_OFF_X] = iflags.bouldersym - ? iflags.bouldersym - : def_oc_syms[ROCK_CLASS].sym; - else if (i == SYM_INVISIBLE) - l_syms[i + SYM_OFF_X] = DEF_INVISIBLE; - } + primary_syms[i + SYM_OFF_W] = def_warnsyms[i].sym; + for (i = 0; i < MAXOTHER; i++) + primary_syms[i + SYM_OFF_X] = get_othersym(i, PRIMARY); clear_symsetentry(PRIMARY, FALSE); } +/* initialize defaults for the rogue symset */ void -init_r_symbols() +init_rogue_symbols() { register int i; @@ -424,24 +455,18 @@ init_r_symbols() later by the roguesymbols option */ for (i = 0; i < MAXPCHARS; i++) - r_syms[i + SYM_OFF_P] = defsyms[i].sym; - r_syms[S_vodoor] = r_syms[S_hodoor] = r_syms[S_ndoor] = '+'; - r_syms[S_upstair] = r_syms[S_dnstair] = '%'; + rogue_syms[i + SYM_OFF_P] = defsyms[i].sym; + rogue_syms[S_vodoor] = rogue_syms[S_hodoor] = rogue_syms[S_ndoor] = '+'; + rogue_syms[S_upstair] = rogue_syms[S_dnstair] = '%'; for (i = 0; i < MAXOCLASSES; i++) - r_syms[i + SYM_OFF_O] = def_r_oc_syms[i]; + rogue_syms[i + SYM_OFF_O] = def_r_oc_syms[i]; for (i = 0; i < MAXMCLASSES; i++) - r_syms[i + SYM_OFF_M] = def_monsyms[i].sym; + rogue_syms[i + SYM_OFF_M] = def_monsyms[i].sym; for (i = 0; i < WARNCOUNT; i++) - r_syms[i + SYM_OFF_W] = def_warnsyms[i].sym; - for (i = 0; i < MAXOTHER; i++) { - if (i == SYM_BOULDER) - r_syms[i + SYM_OFF_X] = iflags.bouldersym - ? iflags.bouldersym - : def_oc_syms[ROCK_CLASS].sym; - else if (i == SYM_INVISIBLE) - r_syms[i + SYM_OFF_X] = DEF_INVISIBLE; - } + rogue_syms[i + SYM_OFF_W] = def_warnsyms[i].sym; + for (i = 0; i < MAXOTHER; i++) + rogue_syms[i + SYM_OFF_X] = get_othersym(i, ROGUESET); clear_symsetentry(ROGUESET, FALSE); /* default on Rogue level is no color @@ -461,7 +486,8 @@ int whichset; /* Adjust graphics display characters on Rogue levels */ for (i = 0; i < SYM_MAX; i++) - showsyms[i] = r_syms[i]; + showsyms[i] = ov_rogue_syms[i] ? ov_rogue_syms[i] + : rogue_syms[i]; #if defined(MSDOS) && defined(USE_TILES) if (iflags.grmode) @@ -473,7 +499,8 @@ int whichset; case PRIMARY: default: for (i = 0; i < SYM_MAX; i++) - showsyms[i] = l_syms[i]; + showsyms[i] = ov_primary_syms[i] ? ov_primary_syms[i] + : primary_syms[i]; #if defined(MSDOS) && defined(USE_TILES) if (iflags.grmode) @@ -492,7 +519,8 @@ int nondefault; if (nondefault) { for (i = 0; i < SYM_MAX; i++) - showsyms[i] = l_syms[i]; + showsyms[i] = ov_primary_syms[i] ? ov_primary_syms[i] + : primary_syms[i]; #ifdef PC9800 if (SYMHANDLING(H_IBM) && ibmgraphics_mode_callback) (*ibmgraphics_mode_callback)(); @@ -513,25 +541,41 @@ int nondefault; # endif #endif } else { - init_l_symbols(); + init_primary_symbols(); init_showsyms(); } } void -update_l_symset(symp, val) +update_ov_primary_symset(symp, val) struct symparse *symp; int val; { - l_syms[symp->idx] = val; + ov_primary_syms[symp->idx] = val; } void -update_r_symset(symp, val) +update_ov_rogue_symset(symp, val) struct symparse *symp; int val; { - r_syms[symp->idx] = val; + ov_rogue_syms[symp->idx] = val; +} + +void +update_primary_symset(symp, val) +struct symparse *symp; +int val; +{ + primary_syms[symp->idx] = val; +} + +void +update_rogue_symset(symp, val) +struct symparse *symp; +int val; +{ + rogue_syms[symp->idx] = val; } void @@ -772,6 +816,8 @@ struct symparse loadsyms[] = { { SYM_MON, S_MIMIC_DEF + SYM_OFF_M, "S_mimic_def" }, { SYM_OTH, SYM_BOULDER + SYM_OFF_X, "S_boulder" }, { SYM_OTH, SYM_INVISIBLE + SYM_OFF_X, "S_invisible" }, + { SYM_OTH, SYM_PET_OVERRIDE + SYM_OFF_X, "S_pet_override" }, + { SYM_OTH, SYM_PLAYER_OVERRIDE + SYM_OFF_X, "S_player_override" }, { 0, 0, (const char *) 0 } /* fence post */ }; diff --git a/src/files.c b/src/files.c index f9d5be795..8f44de414 100644 --- a/src/files.c +++ b/src/files.c @@ -2540,10 +2540,18 @@ char *origbuf; if (sysopt.greppath) free((genericptr_t) sysopt.greppath); sysopt.greppath = dupstr(bufp); + } else if (src == SET_IN_SYS + && match_varname(buf, "ACCESSIBILITY", 19)) { + n = atoi(bufp); + if (n < 0 || n > 1) { + config_error_add("Illegal value in ACCESSIBILITY (not 0,1)."); + return FALSE; + } + sysopt.accessibility = n; #endif /* SYSCF */ } else if (match_varname(buf, "BOULDER", 3)) { - (void) get_uchars(bufp, &iflags.bouldersym, TRUE, 1, + (void) get_uchars(bufp, &ov_primary_syms[SYM_BOULDER + SYM_OFF_X], TRUE, 1, "BOULDER"); } else if (match_varname(buf, "MENUCOLOR", 9)) { if (!add_menu_coloring(bufp)) @@ -2557,8 +2565,14 @@ char *origbuf; (void) get_uchars(bufp, translate, FALSE, WARNCOUNT, "WARNINGS"); assign_warnings(translate); + } else if (match_varname(buf, "ROGUESYMBOLS", 4)) { + if (!parsesymbols(bufp, ROGUESET)) { + config_error_add("Error in ROGUESYMBOLS definition '%s'", bufp); + retval = FALSE; + } + switch_symbols(TRUE); } else if (match_varname(buf, "SYMBOLS", 4)) { - if (!parsesymbols(bufp)) { + if (!parsesymbols(bufp, PRIMARY)) { config_error_add("Error in SYMBOLS definition '%s'", bufp); retval = FALSE; } @@ -3338,9 +3352,9 @@ int which_set; chosen_symset_start = TRUE; /* these init_*() functions clear symset fields too */ if (which_set == ROGUESET) - init_r_symbols(); + init_rogue_symbols(); else if (which_set == PRIMARY) - init_l_symbols(); + init_primary_symbols(); } break; case 1: @@ -3393,9 +3407,9 @@ int which_set; val = sym_val(bufp); if (chosen_symset_start) { if (which_set == PRIMARY) { - update_l_symset(symp, val); + update_primary_symset(symp, val); } else if (which_set == ROGUESET) { - update_r_symset(symp, val); + update_rogue_symset(symp, val); } } } diff --git a/src/mapglyph.c b/src/mapglyph.c index 347ff25a2..6245a4847 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -66,11 +66,12 @@ unsigned *ospecial; { register int offset, idx; int color = NO_COLOR; - nhsym ch; + nhsym ch, ovsym; unsigned special = 0; /* condense multiple tests in macro version down to single */ - boolean has_rogue_ibm_graphics = HAS_ROGUE_IBM_GRAPHICS; - boolean has_rogue_color = (has_rogue_ibm_graphics + boolean has_rogue_ibm_graphics = HAS_ROGUE_IBM_GRAPHICS, + is_you = (x == u.ux && y == u.uy), + has_rogue_color = (has_rogue_ibm_graphics && symset[currentgraphics].nocolor == 0); /* @@ -206,7 +207,7 @@ unsigned *ospecial; } else { /* a monster */ idx = mons[glyph].mlet + SYM_OFF_M; if (has_rogue_color && iflags.use_color) { - if (x == u.ux && y == u.uy) + if (is_you) /* actually player should be yellow-on-gray if in corridor */ color = CLR_YELLOW; else @@ -215,13 +216,26 @@ unsigned *ospecial; mon_color(glyph); #ifdef TEXTCOLOR /* special case the hero for `showrace' option */ - if (iflags.use_color && x == u.ux && y == u.uy - && flags.showrace && !Upolyd) + if (iflags.use_color && is_you && flags.showrace && !Upolyd) color = HI_DOMESTIC; #endif } } + /* These were requested by a blind player to enhance screen reader use */ + if (sysopt.accessibility == 1) { + ovsym = Is_rogue_level(&u.uz) + ? ov_rogue_syms[SYM_PET_OVERRIDE + SYM_OFF_X] + : ov_primary_syms[SYM_PET_OVERRIDE + SYM_OFF_X]; + if (ovsym && (special & MG_PET)) + idx = SYM_PET_OVERRIDE + SYM_OFF_X; + ovsym = Is_rogue_level(&u.uz) + ? ov_rogue_syms[SYM_PLAYER_OVERRIDE + SYM_OFF_X] + : ov_primary_syms[SYM_PLAYER_OVERRIDE + SYM_OFF_X]; + if (ovsym && is_you) + idx = SYM_PLAYER_OVERRIDE + SYM_OFF_X; + } + ch = showsyms[idx]; #ifdef TEXTCOLOR /* Turn off color if no color defined, or rogue level w/o PC graphics. */ diff --git a/src/options.c b/src/options.c index 64ab1a9ba..6c1abf617 100644 --- a/src/options.c +++ b/src/options.c @@ -751,11 +751,12 @@ initoptions_init() flags.initrole = flags.initrace = flags.initgend = flags.initalign = ROLE_NONE; + init_ov_primary_symbols(); + init_ov_rogue_symbols(); /* Set the default monster and object class symbols. */ init_symbols(); for (i = 0; i < WARNCOUNT; i++) warnsyms[i] = def_warnsyms[i].sym; - iflags.bouldersym = 0; /* for "special achievement" tracking (see obj.h, create_object(sp_lev.c), addinv_core1(invent.c) */ @@ -773,7 +774,7 @@ initoptions_init() for (i = 0; i < NUM_DISCLOSURE_OPTIONS; i++) flags.end_disclose[i] = DISCLOSE_PROMPT_DEFAULT_NO; switch_symbols(FALSE); /* set default characters */ - init_r_symbols(); + init_rogue_symbols(); #if defined(UNIX) && defined(TTY_GRAPHICS) /* * Set defaults for some options depending on what we can @@ -837,6 +838,7 @@ initoptions_init() void initoptions_finish() { + nhsym sym = 0; #ifndef MAC char *opts = getenv("NETHACKOPTIONS"); @@ -880,8 +882,10 @@ initoptions_finish() */ obj_descr[SLIME_MOLD].oc_name = "fruit"; - if (iflags.bouldersym) - update_bouldersym(); + sym = get_othersym(SYM_BOULDER, + Is_rogue_level(&u.uz) ? ROGUESET : PRIMARY); + if (sym) + showsyms[SYM_BOULDER + SYM_OFF_X] = sym; reglyph_darkroom(); #ifdef STATUS_HILITES @@ -2754,12 +2758,16 @@ boolean tinitial, tfrom_file; /* * Override the default boulder symbol. */ - iflags.bouldersym = (uchar) opts[0]; - /* for 'initial', update_bouldersym() is done in + ov_primary_syms[SYM_BOULDER + SYM_OFF_X] = (nhsym) opts[0]; + ov_rogue_syms[SYM_BOULDER + SYM_OFF_X] = (nhsym) opts[0]; + /* for 'initial', update of BOULDER symbol is done in initoptions_finish(), after all symset options have been processed */ if (!initial) { - update_bouldersym(); + nhsym sym = get_othersym(SYM_BOULDER, + Is_rogue_level(&u.uz) ? ROGUESET : PRIMARY); + if (sym) + showsyms[SYM_BOULDER + SYM_OFF_X] = sym; need_redraw = TRUE; } } @@ -4119,12 +4127,14 @@ boolean tinitial, tfrom_file; } } +#if 0 /* Is it a symbol? */ - if (strstr(opts, "S_") == opts && parsesymbols(opts)) { + if (strstr(opts, "S_") == opts && parsesymbols(opts, PRIMARY)) { switch_symbols(TRUE); check_gold_symbol(); return retval; } +#endif /* out of valid options */ config_error_add("Unknown option '%s'", opts); @@ -5544,9 +5554,9 @@ boolean setinitial, setfromfile; /* Set default symbols and clear the handling value */ if (rogueflag) - init_r_symbols(); + init_rogue_symbols(); else - init_l_symbols(); + init_primary_symbols(); if (symset[which_set].name) { /* non-default symbols */ @@ -5613,8 +5623,8 @@ char *buf; #ifdef BACKWARD_COMPAT else if (!strcmp(optname, "boulder")) Sprintf(buf, "%c", - iflags.bouldersym - ? iflags.bouldersym + ov_primary_syms[SYM_BOULDER + SYM_OFF_X] + ? ov_primary_syms[SYM_BOULDER + SYM_OFF_X] : showsyms[(int) objects[BOULDER].oc_class + SYM_OFF_O]); #endif else if (!strcmp(optname, "catname")) @@ -6099,16 +6109,20 @@ free_symsets() /* Parse the value of a SYMBOLS line from a config file */ boolean -parsesymbols(opts) +parsesymbols(opts, which_set) register char *opts; +int which_set; { int val; char *op, *symname, *strval; struct symparse *symp; +#ifdef DEBUG + int sym_max = SYM_MAX; +#endif if ((op = index(opts, ',')) != 0) { *op++ = 0; - if (!parsesymbols(op)) + if (!parsesymbols(op, which_set)) return FALSE; } @@ -6131,7 +6145,10 @@ register char *opts; if (symp->range && symp->range != SYM_CONTROL) { val = sym_val(strval); - update_l_symset(symp, val); + if (which_set == ROGUESET) + update_ov_rogue_symset(symp, val); + else + update_ov_primary_symset(symp, val); } return TRUE; } diff --git a/src/pager.c b/src/pager.c index 31c97d7c7..531ca122b 100644 --- a/src/pager.c +++ b/src/pager.c @@ -813,11 +813,12 @@ struct permonst **for_supplement; unreconnoitered[] = "unreconnoitered"; static char look_buf[BUFSZ]; char prefix[BUFSZ]; - int i, alt_i, glyph = NO_GLYPH, + int i, alt_i, j, glyph = NO_GLYPH, skipped_venom = 0, found = 0; /* count of matching syms found */ boolean hit_trap, need_to_look = FALSE, submerged = (Underwater && !Is_waterlevel(&u.uz)); const char *x_str; + nhsym tmpsym; if (looked) { int oc; @@ -881,7 +882,7 @@ struct permonst **for_supplement; if (x_str == unreconnoitered) goto didlook; } - + check_monsters: /* Check for monsters */ if (!iflags.terrainmode || (iflags.terrainmode & TER_MON) != 0) { for (i = 1; i < MAXMCLASSES; i++) { @@ -1034,8 +1035,53 @@ struct permonst **for_supplement; } } + /* Finally, handle some optional overriding symbols */ + for (j = SYM_OFF_X; j < SYM_MAX; ++j) { + if (j == (SYM_INVISIBLE + SYM_OFF_X)) + continue; /* already handled above */ + tmpsym = Is_rogue_level(&u.uz) ? ov_rogue_syms[j] : ov_primary_syms[j]; + if (tmpsym && sym == tmpsym) { + switch(j) { + case SYM_BOULDER + SYM_OFF_X: + if (!found) { + *firstmatch = "boulder"; + Sprintf(out_str, "%s%s", prefix, an(*firstmatch)); + found++; + } else { + found += append_str(out_str, "boulder"); + } + break; + case SYM_PET_OVERRIDE + SYM_OFF_X: + if (looked) { + int oc = 0; + unsigned os = 0; + nhsym save_override; + + if (Is_rogue_level(&u.uz)) { + save_override = ov_rogue_syms[SYM_PET_OVERRIDE + SYM_OFF_X]; + ov_rogue_syms[SYM_PET_OVERRIDE + SYM_OFF_X] = 0; + } else { + save_override = ov_primary_syms[SYM_PET_OVERRIDE + SYM_OFF_X]; + ov_primary_syms[SYM_PET_OVERRIDE + SYM_OFF_X] = 0; + } + /* convert to symbol without the override in effect */ + (void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y); + if (Is_rogue_level(&u.uz)) + ov_rogue_syms[SYM_PET_OVERRIDE + SYM_OFF_X] = save_override; + else + ov_primary_syms[SYM_PET_OVERRIDE + SYM_OFF_X] = save_override; + goto check_monsters; + } + break; + case SYM_PLAYER_OVERRIDE + SYM_OFF_X: + sym = showsyms[S_HUMAN + SYM_OFF_M]; + goto check_monsters; + } + } + } +#if 0 /* handle optional boulder symbol as a special case */ - if (iflags.bouldersym && sym == iflags.bouldersym) { + if (o_syms[SYM_BOULDER + SYM_OFF_X] && sym == o_syms[SYM_BOULDER + SYM_OFF_X]) { if (!found) { *firstmatch = "boulder"; Sprintf(out_str, "%s%s", prefix, an(*firstmatch)); @@ -1044,6 +1090,7 @@ struct permonst **for_supplement; found += append_str(out_str, "boulder"); } } +#endif /* * If we are looking at the screen, follow multiple possibilities or diff --git a/src/sys.c b/src/sys.c index d8aafbe9b..8c5fb428b 100644 --- a/src/sys.c +++ b/src/sys.c @@ -80,6 +80,7 @@ sys_early_init() sysopt.check_plname = 0; sysopt.seduce = 1; /* if it's compiled in, default to on */ sysopt_seduce_set(sysopt.seduce); + sysopt.accessibility = 0; return; } diff --git a/sys/unix/sysconf b/sys/unix/sysconf index 5986f54a5..66df42c63 100644 --- a/sys/unix/sysconf +++ b/sys/unix/sysconf @@ -61,6 +61,11 @@ MAXPLAYERS=10 # incubi to use nymphs' charm behavior rather than their own seduce behavior. #SEDUCE=0 +# Uncomment the next line to enable some accessibility features such +# as S_player_override and S_pet_override symbols for screen readers +# in the user config file. +#ACCESSIBILITY=1 + # Uncomment to disable savefile UID checking. #CHECK_SAVE_UID=0 diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 60d9db128..cd79c1d82 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -1599,8 +1599,8 @@ check_font_widths() boolean used[256]; memset(used, 0, sizeof(used)); for (int i = 0; i < SYM_MAX; i++) { - used[l_syms[i]] = TRUE; - used[r_syms[i]] = TRUE; + used[primary_syms[i]] = TRUE; + used[rogue_syms[i]] = TRUE; } int wcUsedCount = 0; diff --git a/sys/winnt/sysconf b/sys/winnt/sysconf index 283a55df4..93aaa1ddc 100644 --- a/sys/winnt/sysconf +++ b/sys/winnt/sysconf @@ -52,6 +52,11 @@ WIZARDS=* # Uncomment the next line to disable the SEDUCE option. #SEDUCE=0 +# Uncomment the next line to enable some accessibility features such +# as S_player_override and S_pet_override symbols for screen readers +# in the user config file. +#ACCESSIBILITY=1 + # Record (high score) file options. # CAUTION: changing these after people have started playing games can # lead to lost high scores! From f487083ab44d3c595feffbdd2c4d9eb14319bc2d Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 27 Oct 2019 23:37:16 -0400 Subject: [PATCH 071/529] fix parse character count typo --- src/files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/files.c b/src/files.c index 8f44de414..41382c1ce 100644 --- a/src/files.c +++ b/src/files.c @@ -2541,7 +2541,7 @@ char *origbuf; free((genericptr_t) sysopt.greppath); sysopt.greppath = dupstr(bufp); } else if (src == SET_IN_SYS - && match_varname(buf, "ACCESSIBILITY", 19)) { + && match_varname(buf, "ACCESSIBILITY", 13)) { n = atoi(bufp); if (n < 0 || n > 1) { config_error_add("Illegal value in ACCESSIBILITY (not 0,1)."); From 6213c37d0b27c0f3afb2ba9538c56783c58fbaf5 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 28 Oct 2019 00:59:44 -0400 Subject: [PATCH 072/529] Merge branch 'NetHack-3.6' part 2 --- include/rm.h | 4 --- src/drawing.c | 68 ++++++++++++++++++++++++--------------------------- 2 files changed, 32 insertions(+), 40 deletions(-) diff --git a/include/rm.h b/include/rm.h index c5ae88d8e..e8abbd71c 100644 --- a/include/rm.h +++ b/include/rm.h @@ -308,10 +308,6 @@ extern const struct symdef defsyms[MAXPCHARS]; /* defaults */ #define WARNCOUNT 6 /* number of different warning levels */ extern const struct symdef def_warnsyms[WARNCOUNT]; #define SYMHANDLING(ht) (g.symset[g.currentgraphics].handling == (ht)) -extern nhsym primary_syms[]; -extern nhsym rogue_syms[]; -extern nhsym ov_primary_syms[]; -extern nhsym ov_rogue_syms[]; /* * The 5 possible states of doors diff --git a/src/drawing.c b/src/drawing.c index 0c00de2f5..d78158db9 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -17,10 +17,6 @@ #define C(n) #endif -nhsym primary_syms[SYM_MAX] = DUMMY; /* primary symbols */ -nhsym rogue_syms[SYM_MAX] = DUMMY; /* rogue symbols */ -nhsym ov_primary_syms[SYM_MAX] = DUMMY; /* overides via config SYMBOL */ -nhsym ov_rogue_syms[SYM_MAX] = DUMMY; /* overides via config ROGUESYMBOL */ const char invisexplain[] = "remembered, unseen, creature", altinvisexplain[] = "unseen creature"; /* for clairvoyance */ @@ -317,8 +313,8 @@ char ch; * * If (arg != 0), which is the normal expected * usage, then showsyms are taken from the - * adjustable display symbols found in primary_syms. - * primary_syms may have been loaded from an external + * adjustable display symbols found in g.primary_syms. + * g.primary_syms may have been loaded from an external * symbol file by config file options or interactively * in the Options menu. * @@ -328,10 +324,10 @@ char ch; * out of other {rogue} level display modes. * * If arg is ROGUESET, this places the rogue level - * symbols from rogue_syms into showsyms. + * symbols from g.rogue_syms into g.showsyms. * * If arg is PRIMARY, this places the symbols - * from l_monsyms into showsyms. + * from g.primary_syms into g.showsyms. * * update_primary_symset() * Update a member of the primary(primary_*) symbol set. @@ -381,7 +377,7 @@ init_ov_rogue_symbols() register int i; for (i = 0; i < SYM_MAX; i++) - ov_rogue_syms[i] = (nhsym) 0; + g.ov_rogue_syms[i] = (nhsym) 0; } /* initialize defaults for the overrides to the primary symset */ void @@ -390,7 +386,7 @@ init_ov_primary_symbols() register int i; for (i = 0; i < SYM_MAX; i++) - ov_primary_syms[i] = (nhsym) 0; + g.ov_primary_syms[i] = (nhsym) 0; } nhsym @@ -401,11 +397,11 @@ int idx, which_set; int oidx = idx + SYM_OFF_X; if (which_set == ROGUESET) - sym = ov_rogue_syms[oidx] ? ov_rogue_syms[oidx] - : rogue_syms[oidx]; + sym = g.ov_rogue_syms[oidx] ? g.ov_rogue_syms[oidx] + : g.rogue_syms[oidx]; else - sym = ov_primary_syms[oidx] ? ov_primary_syms[oidx] - : primary_syms[oidx]; + sym = g.ov_primary_syms[oidx] ? g.ov_primary_syms[oidx] + : g.primary_syms[oidx]; if (!sym) { switch(idx) { case SYM_BOULDER: @@ -426,15 +422,15 @@ init_primary_symbols() register int i; for (i = 0; i < MAXPCHARS; i++) - primary_syms[i + SYM_OFF_P] = defsyms[i].sym; + g.primary_syms[i + SYM_OFF_P] = defsyms[i].sym; for (i = 0; i < MAXOCLASSES; i++) - primary_syms[i + SYM_OFF_O] = def_oc_syms[i].sym; + g.primary_syms[i + SYM_OFF_O] = def_oc_syms[i].sym; for (i = 0; i < MAXMCLASSES; i++) - primary_syms[i + SYM_OFF_M] = def_monsyms[i].sym; + g.primary_syms[i + SYM_OFF_M] = def_monsyms[i].sym; for (i = 0; i < WARNCOUNT; i++) - primary_syms[i + SYM_OFF_W] = def_warnsyms[i].sym; + g.primary_syms[i + SYM_OFF_W] = def_warnsyms[i].sym; for (i = 0; i < MAXOTHER; i++) - primary_syms[i + SYM_OFF_X] = get_othersym(i, PRIMARY); + g.primary_syms[i + SYM_OFF_X] = get_othersym(i, PRIMARY); clear_symsetentry(PRIMARY, FALSE); } @@ -449,18 +445,18 @@ init_rogue_symbols() later by the roguesymbols option */ for (i = 0; i < MAXPCHARS; i++) - rogue_syms[i + SYM_OFF_P] = defsyms[i].sym; - rogue_syms[S_vodoor] = rogue_syms[S_hodoor] = rogue_syms[S_ndoor] = '+'; - rogue_syms[S_upstair] = rogue_syms[S_dnstair] = '%'; + g.rogue_syms[i + SYM_OFF_P] = defsyms[i].sym; + g.rogue_syms[S_vodoor] = g.rogue_syms[S_hodoor] = g.rogue_syms[S_ndoor] = '+'; + g.rogue_syms[S_upstair] = g.rogue_syms[S_dnstair] = '%'; for (i = 0; i < MAXOCLASSES; i++) - rogue_syms[i + SYM_OFF_O] = def_r_oc_syms[i]; + g.rogue_syms[i + SYM_OFF_O] = def_r_oc_syms[i]; for (i = 0; i < MAXMCLASSES; i++) - rogue_syms[i + SYM_OFF_M] = def_monsyms[i].sym; + g.rogue_syms[i + SYM_OFF_M] = def_monsyms[i].sym; for (i = 0; i < WARNCOUNT; i++) - rogue_syms[i + SYM_OFF_W] = def_warnsyms[i].sym; + g.rogue_syms[i + SYM_OFF_W] = def_warnsyms[i].sym; for (i = 0; i < MAXOTHER; i++) - rogue_syms[i + SYM_OFF_X] = get_othersym(i, ROGUESET); + g.rogue_syms[i + SYM_OFF_X] = get_othersym(i, ROGUESET); clear_symsetentry(ROGUESET, FALSE); /* default on Rogue level is no color @@ -480,8 +476,8 @@ int whichset; /* Adjust graphics display characters on Rogue levels */ for (i = 0; i < SYM_MAX; i++) - g.showsyms[i] = ov_rogue_syms[i] ? ov_rogue_syms[i] - : rogue_syms[i]; + g.showsyms[i] = g.ov_rogue_syms[i] ? g.ov_rogue_syms[i] + : g.rogue_syms[i]; #if defined(MSDOS) && defined(USE_TILES) if (iflags.grmode) @@ -493,8 +489,8 @@ int whichset; case PRIMARY: default: for (i = 0; i < SYM_MAX; i++) - g.showsyms[i] = ov_primary_syms[i] ? ov_primary_syms[i] - : primary_syms[i]; + g.showsyms[i] = g.ov_primary_syms[i] ? g.ov_primary_syms[i] + : g.primary_syms[i]; #if defined(MSDOS) && defined(USE_TILES) if (iflags.grmode) @@ -513,8 +509,8 @@ int nondefault; if (nondefault) { for (i = 0; i < SYM_MAX; i++) - g.showsyms[i] = ov_primary_syms[i] ? ov_primary_syms[i] - : primary_syms[i]; + g.showsyms[i] = g.ov_primary_syms[i] ? g.ov_primary_syms[i] + : g.primary_syms[i]; #ifdef PC9800 if (SYMHANDLING(H_IBM) && ibmgraphics_mode_callback) (*ibmgraphics_mode_callback)(); @@ -545,7 +541,7 @@ update_ov_primary_symset(symp, val) struct symparse *symp; int val; { - ov_primary_syms[symp->idx] = val; + g.ov_primary_syms[symp->idx] = val; } void @@ -553,7 +549,7 @@ update_ov_rogue_symset(symp, val) struct symparse *symp; int val; { - ov_rogue_syms[symp->idx] = val; + g.ov_rogue_syms[symp->idx] = val; } void @@ -561,7 +557,7 @@ update_primary_symset(symp, val) struct symparse *symp; int val; { - primary_syms[symp->idx] = val; + g.primary_syms[symp->idx] = val; } void @@ -569,7 +565,7 @@ update_rogue_symset(symp, val) struct symparse *symp; int val; { - rogue_syms[symp->idx] = val; + g.rogue_syms[symp->idx] = val; } void From 6ec0c0ee5c1d651079036c14d157f998353d4307 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 28 Oct 2019 12:59:00 -0400 Subject: [PATCH 073/529] .travis.yml update --- .travis.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 00a6c1153..3cc2f5849 100644 --- a/.travis.yml +++ b/.travis.yml @@ -85,6 +85,11 @@ matrix: - cp ../sys/winnt/Makefile.gcc ./Makefile - mingw32-make install exclude: +# - os: osx +# osx_image: xcode10.3 +# env: DESCR=osx-xcode10.3-x11 HINTS=macosx10.14 WANT_WIN_CURSES=1 WANT_WIN_X11=1 USE_XPM=1 +# compiler: clang +# script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make install" - os: osx osx_image: xcode10.2 env: HINTS=macosx10.14 @@ -108,5 +113,6 @@ deploy: on: tags: true prerelease: true - name: "Pre-release build of NetHack 3.6.3" - body: "This is auto generated pre-release build of NetHack 3.6.3 and as such has not been tested." + name: "Pre-release build of NetHack 3.6.3" + body: "This is auto generated pre-release build of NetHack 3.6.3." + From b1e0b6b17bc58ac790d9d725cdfddc32f5c17e2c Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 28 Oct 2019 16:02:16 -0700 Subject: [PATCH 074/529] avoid warning and check whether pushing commits has been straightened out. --- src/options.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/options.c b/src/options.c index 6c1abf617..28de184c3 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1572070255 2019/10/26 06:10:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.381 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1572303730 2019/10/28 23:02:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.383 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -6116,9 +6116,6 @@ int which_set; int val; char *op, *symname, *strval; struct symparse *symp; -#ifdef DEBUG - int sym_max = SYM_MAX; -#endif if ((op = index(opts, ',')) != 0) { *op++ = 0; From 5a95c0372dec63a7e8e7e3d451f2e4aee126b136 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 28 Oct 2019 20:34:36 -0400 Subject: [PATCH 075/529] README update for 3.6.3 work-in-progress --- README | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/README b/README index 0592a5efc..2caae21f9 100644 --- a/README +++ b/README @@ -1,24 +1,24 @@ - NetHack 3.6.2 -- General information + NetHack 3.6.3 work-in-progress -- General information NetHack 3.6 is an enhancement to the dungeon exploration game NetHack, which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.4 as there was no NetHack 3.5 release. -NetHack 3.6.2 contains a collection of about 320 bug fixes to NetHack 3.6.1 -and more than 20 enhancements. The file doc/fixes36.2 in the source -distribution has a full list of them. The text in there was written for the -development team's own use and is provided "as is", so please do not ask us -to further explain the entries in that file. Some entries might be considered -"spoilers", particularly in the "new features" section. +NetHack 3.6.3 work-in-progress is not an official release of NetHack. It +currently contains a collection of over 140 bug fixes to NetHack 3.6.3 +and more than 16 enhancements and community contributions. The file +doc/fixes36.3 in the source distribution has a full list of them. +The text in there was written for the development team's own use and is +provided "as is", so please do not ask us to further explain the entries +in that file. Some entries might be considered "spoilers", particularly in +the "new features" section. Below you will find some other general notes that were not considered spoilers: -* Performance optimizations with tty including the ability to do per field - updating -* sys/winnt/nttty performance improvements mainly through the introduction - of a back buffer approach -* a couple of windows crash bug fixes -* adoption of the curses window port that was in use in the community + +* Over 30 refinements to the curses window port. +* Some refinements to status highlights. +* A couple of fixes to prevent potential game crashes. - - - - - - - - - - - @@ -125,8 +125,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. If you have problems building the game, or you find bugs in it, we recommend filing a bug report from our "Contact Us" web page at: - https://www.nethack.org/common/contact.html or - http://www.nethack.org/common/contact.html + https://www.nethack.org/common/contact.html Please include the version information from #version or the command line option --version in the appropriate field. @@ -167,6 +166,6 @@ In our own patches, we will assume that your code is synchronized with ours. -- Good luck, and happy Hacking -- -# $NHDT-Date: 1557077369 2019/05/05 17:29:29 $ $NHDT-Branch: NetHack-3.6.2 $:$NHDT-Revision: 1.55 $ +# $NHDT-Date: 1572309271 2019/10/29 00:34:31 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.57 $ # Copyright (c) 2012 by Michael Allison # NetHack may be freely redistributed. See license for details. From 81e39e3bffa606711f4329046b9cc629010c84c2 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 28 Oct 2019 20:36:32 -0400 Subject: [PATCH 076/529] typo in README --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 2caae21f9..d7698ffd4 100644 --- a/README +++ b/README @@ -5,7 +5,7 @@ which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.4 as there was no NetHack 3.5 release. NetHack 3.6.3 work-in-progress is not an official release of NetHack. It -currently contains a collection of over 140 bug fixes to NetHack 3.6.3 +currently contains a collection of over 140 bug fixes to NetHack 3.6.2 and more than 16 enhancements and community contributions. The file doc/fixes36.3 in the source distribution has a full list of them. The text in there was written for the development team's own use and is From fff4ceebdd3b139065a904bf26c1266d3891580e Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 29 Oct 2019 09:34:21 -0400 Subject: [PATCH 077/529] travis deploy zip file name refinement --- .travis.yml | 2 +- win/win32/vs2017/travisci.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3cc2f5849..b93ed982c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,7 +108,7 @@ deploy: secure: "U0Dt2CXrcG8Yi4taUCT/6AnM+0IJtdCv6IVG/2rGooUY3pZjNWE9XDM6X9ZeAmbI79aN6FPTppjUf3KbB/upYeJt+8mrjnxEk/ZTO1xXDDW8iL/DiqnczoFsMGmPsTM+Fkeak8bu0SifI7Qkx9i1N+zOyl2VdlaxGjchPfl/OJw2jcQs7rOGRfr23/rapZKTcFq+BFlxMiIHa0dXbCJ9vagdlyAeclOCtPjw1VoH/Cb/+0/Xlx2MFPncw4/1P+bO/fPantHyehh3/WCDVCnI4M7ftONpsTVRrQ+Hml89teUH9/1xXUOpbCeVghWr1rumLcQzMqLKNj2lP/gm9co2/DKpxiUPUzBfO/9Jvl1CNoEwPYQBRNb38kggDvAT4vKX38Oi5sZvumFEO4L0y7o4cW6SA4/CYIykfxOdkrryt8ltfWwopdy3I/DothYw31vJ9GsZOCAShFRAy3hJxYUbHhT+7SDUBadVSEkb4UqxQ+7zntAVT+Lp4DXLAfvsWxZGrQoP/IrWAgNOLRKILubpzh+YpadMH3Ygha2JRAeJAEZ3DnXf3vOOAucWnk4mNXDbW35GTDTAJDWMvddZCfsrUI/uHxgaRjFs9fLX1X5tqhGnsr27sKLWyX+zrIPVV0TPl3AzYPAf6Bc8Okeu+JEGQERvvgSasCuYcmhgYznBVJI=" file_glob: true file: - - "NetHack-x86-beta$TRAVIS_TAG.zip" + - "$TRAVIS_TAG.x86.zip" skip_cleanup: true on: tags: true diff --git a/win/win32/vs2017/travisci.sh b/win/win32/vs2017/travisci.sh index e17de0efa..ff5ccf2af 100644 --- a/win/win32/vs2017/travisci.sh +++ b/win/win32/vs2017/travisci.sh @@ -32,5 +32,4 @@ cd src cp ../sys/winnt/Makefile.msc ./Makefile nmake install cd .. -powershell -Command "Compress-Archive -U -Path binary/*.* -DestinationPath NetHack-x86-beta$TRAVIS_TAG.zip" - +powershell -Command "Compress-Archive -U -Path binary/*.* -DestinationPath $TRAVIS_TAG.x86.zip" From 76dadab56897a1732f3cf1a3b5699c8069a40e46 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 29 Oct 2019 13:19:41 -0400 Subject: [PATCH 078/529] whitespace bit --- doc/Guidebook.mn | 4 ++-- doc/Guidebook.tex | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index ec60a55ce..0d9075e80 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -4616,8 +4616,8 @@ After you have gained some experience with the game and with editing files, you may want to alter settings via \fBSYMBOLS=\fP and \fBROGUESYMBOLS=\fP in your configuration file to better suit your preferences. -See the previous section for the special symbols S_pet_override -to force a consistent symbol for all pets and and +See the previous section for the special symbols S_pet_override +to force a consistent symbol for all pets and and S_player_override to force a unique symbol for the player character if \fBaccessibility\fP is enabled in the sysconf file. The most crucial settings to make the game accessible are: diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index b049a9cfa..75a67551d 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -4871,10 +4871,10 @@ on the rogue level. \elist You can also override one or more symbols using the {\it SYMBOLS\/} and -{\it ROGUESYMBOLS\/} config file options. Symbols are specified as -{\it name:value\/} pairs. Note that {\it NetHack\/} escape-processes -the {\it value\/} string in conventional C fashion. This means that `\verb+\+' -is a prefix to take the following character literally. Thus `\verb+\+' needs +{\it ROGUESYMBOLS\/} config file options. Symbols are specified as +{\it name:value\/} pairs. Note that {\it NetHack\/} escape-processes +the {\it value\/} string in conventional C fashion. This means that `\verb+\+' +is a prefix to take the following character literally. Thus `\verb+\+' needs to be represented as `\verb+\\+'. The special prefix `\verb+\m+' switches on the meta bit in the symbol value, and the From feaaa934513b2f93ae5b6533fc4ea4e952fb04fa Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 29 Oct 2019 17:54:58 -0400 Subject: [PATCH 079/529] try travis pre-release zip build again with update powershell command --- win/win32/vs2017/travisci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/win32/vs2017/travisci.sh b/win/win32/vs2017/travisci.sh index ff5ccf2af..812f4cdd8 100644 --- a/win/win32/vs2017/travisci.sh +++ b/win/win32/vs2017/travisci.sh @@ -32,4 +32,4 @@ cd src cp ../sys/winnt/Makefile.msc ./Makefile nmake install cd .. -powershell -Command "Compress-Archive -U -Path binary/*.* -DestinationPath $TRAVIS_TAG.x86.zip" +powershell -Command "Compress-Archive -U -Path binary/* -DestinationPath $TRAVIS_TAG.x86.zip" From 9258cb99e6e8b10370b98398255c6b70fda645ca Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 29 Oct 2019 23:02:37 -0400 Subject: [PATCH 080/529] "and and" bit --- doc/Guidebook.mn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 0d9075e80..429ec0a98 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -4617,7 +4617,7 @@ and with editing files, you may want to alter settings via \fBSYMBOLS=\fP and \fBROGUESYMBOLS=\fP in your configuration file to better suit your preferences. See the previous section for the special symbols S_pet_override -to force a consistent symbol for all pets and and +to force a consistent symbol for all pets and S_player_override to force a unique symbol for the player character if \fBaccessibility\fP is enabled in the sysconf file. The most crucial settings to make the game accessible are: From 43ef5ef7fa35e841b3210b494caeb5cea9656fab Mon Sep 17 00:00:00 2001 From: Bart House Date: Tue, 29 Oct 2019 21:28:39 -0700 Subject: [PATCH 081/529] Windows Store support for NetHack 3.6. --- doc/Guidebook.tex | 13 +- include/extern.h | 2 + include/ntconf.h | 1 + src/files.c | 47 +- sys/winnt/windmain.c | 444 +++++++++++++----- sys/winnt/winnt.c | 20 +- win/win32/mhsplash.c | 1 + win/win32/mswproc.c | 1 + win/win32/vs2017/.gitignore | 8 + .../vs2017/Images/BadgeLogo.scale-100.png | Bin 0 -> 238 bytes .../vs2017/Images/BadgeLogo.scale-125.png | Bin 0 -> 300 bytes .../vs2017/Images/BadgeLogo.scale-150.png | Bin 0 -> 370 bytes .../vs2017/Images/BadgeLogo.scale-200.png | Bin 0 -> 520 bytes .../vs2017/Images/BadgeLogo.scale-400.png | Bin 0 -> 770 bytes .../vs2017/Images/LargeTile.scale-100.png | Bin 0 -> 14026 bytes .../vs2017/Images/LargeTile.scale-125.png | Bin 0 -> 12160 bytes .../vs2017/Images/LargeTile.scale-150.png | Bin 0 -> 20205 bytes .../vs2017/Images/LargeTile.scale-200.png | Bin 0 -> 22405 bytes .../vs2017/Images/LargeTile.scale-400.png | Bin 0 -> 47542 bytes .../Images/LockScreenLogo.scale-200.png | Bin 0 -> 1430 bytes .../vs2017/Images/SmallTile.scale-100.png | Bin 0 -> 3398 bytes .../vs2017/Images/SmallTile.scale-125.png | Bin 0 -> 4849 bytes .../vs2017/Images/SmallTile.scale-150.png | Bin 0 -> 6150 bytes .../vs2017/Images/SmallTile.scale-200.png | Bin 0 -> 8762 bytes .../vs2017/Images/SmallTile.scale-400.png | Bin 0 -> 17677 bytes .../vs2017/Images/SplashScreen.scale-100.png | Bin 0 -> 14643 bytes .../vs2017/Images/SplashScreen.scale-125.png | Bin 0 -> 18974 bytes .../vs2017/Images/SplashScreen.scale-150.png | Bin 0 -> 21466 bytes .../vs2017/Images/SplashScreen.scale-200.png | Bin 0 -> 24791 bytes .../vs2017/Images/SplashScreen.scale-400.png | Bin 0 -> 51259 bytes .../Images/Square150x150Logo.scale-100.png | Bin 0 -> 6073 bytes .../Images/Square150x150Logo.scale-125.png | Bin 0 -> 8121 bytes .../Images/Square150x150Logo.scale-150.png | Bin 0 -> 10238 bytes .../Images/Square150x150Logo.scale-200.png | Bin 0 -> 13515 bytes .../Images/Square150x150Logo.scale-400.png | Bin 0 -> 22300 bytes ...x44Logo.altform-unplated_targetsize-16.png | Bin 0 -> 954 bytes ...44Logo.altform-unplated_targetsize-256.png | Bin 0 -> 2032 bytes ...x44Logo.altform-unplated_targetsize-32.png | Bin 0 -> 2762 bytes ...x44Logo.altform-unplated_targetsize-48.png | Bin 0 -> 4827 bytes .../Images/Square44x44Logo.scale-100.png | Bin 0 -> 2891 bytes .../Images/Square44x44Logo.scale-125.png | Bin 0 -> 4018 bytes .../Images/Square44x44Logo.scale-150.png | Bin 0 -> 5410 bytes .../Images/Square44x44Logo.scale-200.png | Bin 0 -> 7723 bytes .../Images/Square44x44Logo.scale-400.png | Bin 0 -> 15306 bytes .../Images/Square44x44Logo.targetsize-16.png | Bin 0 -> 667 bytes .../Images/Square44x44Logo.targetsize-24.png | Bin 0 -> 1201 bytes ...x44Logo.targetsize-24_altform-unplated.png | Bin 0 -> 1730 bytes .../Images/Square44x44Logo.targetsize-256.png | Bin 0 -> 13141 bytes .../Images/Square44x44Logo.targetsize-32.png | Bin 0 -> 1823 bytes .../Images/Square44x44Logo.targetsize-48.png | Bin 0 -> 3319 bytes win/win32/vs2017/Images/StoreLogo.backup.png | Bin 0 -> 1451 bytes .../vs2017/Images/StoreLogo.scale-100.png | Bin 0 -> 5183 bytes .../vs2017/Images/StoreLogo.scale-125.png | Bin 0 -> 7210 bytes .../vs2017/Images/StoreLogo.scale-150.png | Bin 0 -> 8680 bytes .../vs2017/Images/StoreLogo.scale-200.png | Bin 0 -> 11264 bytes .../vs2017/Images/StoreLogo.scale-400.png | Bin 0 -> 17413 bytes .../Images/Wide310x150Logo.scale-100.png | Bin 0 -> 6416 bytes .../Images/Wide310x150Logo.scale-125.png | Bin 0 -> 8725 bytes .../Images/Wide310x150Logo.scale-150.png | Bin 0 -> 10932 bytes .../Images/Wide310x150Logo.scale-200.png | Bin 0 -> 40080 bytes .../Images/Wide310x150Logo.scale-400.png | Bin 0 -> 24791 bytes win/win32/vs2017/NetHack.sln | 15 +- win/win32/vs2017/NetHackPackage.appxmanifest | 29 ++ win/win32/vs2017/NetHackPackage.wapproj | 145 ++++++ win/win32/vs2017/Package.StoreAssociation.xml | 373 +++++++++++++++ win/win32/vs2017/ScreenShot.PNG | Bin 0 -> 54099 bytes 66 files changed, 963 insertions(+), 136 deletions(-) create mode 100644 win/win32/vs2017/Images/BadgeLogo.scale-100.png create mode 100644 win/win32/vs2017/Images/BadgeLogo.scale-125.png create mode 100644 win/win32/vs2017/Images/BadgeLogo.scale-150.png create mode 100644 win/win32/vs2017/Images/BadgeLogo.scale-200.png create mode 100644 win/win32/vs2017/Images/BadgeLogo.scale-400.png create mode 100644 win/win32/vs2017/Images/LargeTile.scale-100.png create mode 100644 win/win32/vs2017/Images/LargeTile.scale-125.png create mode 100644 win/win32/vs2017/Images/LargeTile.scale-150.png create mode 100644 win/win32/vs2017/Images/LargeTile.scale-200.png create mode 100644 win/win32/vs2017/Images/LargeTile.scale-400.png create mode 100644 win/win32/vs2017/Images/LockScreenLogo.scale-200.png create mode 100644 win/win32/vs2017/Images/SmallTile.scale-100.png create mode 100644 win/win32/vs2017/Images/SmallTile.scale-125.png create mode 100644 win/win32/vs2017/Images/SmallTile.scale-150.png create mode 100644 win/win32/vs2017/Images/SmallTile.scale-200.png create mode 100644 win/win32/vs2017/Images/SmallTile.scale-400.png create mode 100644 win/win32/vs2017/Images/SplashScreen.scale-100.png create mode 100644 win/win32/vs2017/Images/SplashScreen.scale-125.png create mode 100644 win/win32/vs2017/Images/SplashScreen.scale-150.png create mode 100644 win/win32/vs2017/Images/SplashScreen.scale-200.png create mode 100644 win/win32/vs2017/Images/SplashScreen.scale-400.png create mode 100644 win/win32/vs2017/Images/Square150x150Logo.scale-100.png create mode 100644 win/win32/vs2017/Images/Square150x150Logo.scale-125.png create mode 100644 win/win32/vs2017/Images/Square150x150Logo.scale-150.png create mode 100644 win/win32/vs2017/Images/Square150x150Logo.scale-200.png create mode 100644 win/win32/vs2017/Images/Square150x150Logo.scale-400.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-16.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-256.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-32.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-48.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.scale-100.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.scale-125.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.scale-150.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.scale-200.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.scale-400.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.targetsize-16.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.targetsize-24.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.targetsize-24_altform-unplated.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.targetsize-256.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.targetsize-32.png create mode 100644 win/win32/vs2017/Images/Square44x44Logo.targetsize-48.png create mode 100644 win/win32/vs2017/Images/StoreLogo.backup.png create mode 100644 win/win32/vs2017/Images/StoreLogo.scale-100.png create mode 100644 win/win32/vs2017/Images/StoreLogo.scale-125.png create mode 100644 win/win32/vs2017/Images/StoreLogo.scale-150.png create mode 100644 win/win32/vs2017/Images/StoreLogo.scale-200.png create mode 100644 win/win32/vs2017/Images/StoreLogo.scale-400.png create mode 100644 win/win32/vs2017/Images/Wide310x150Logo.scale-100.png create mode 100644 win/win32/vs2017/Images/Wide310x150Logo.scale-125.png create mode 100644 win/win32/vs2017/Images/Wide310x150Logo.scale-150.png create mode 100644 win/win32/vs2017/Images/Wide310x150Logo.scale-200.png create mode 100644 win/win32/vs2017/Images/Wide310x150Logo.scale-400.png create mode 100644 win/win32/vs2017/NetHackPackage.appxmanifest create mode 100644 win/win32/vs2017/NetHackPackage.wapproj create mode 100644 win/win32/vs2017/Package.StoreAssociation.xml create mode 100644 win/win32/vs2017/ScreenShot.PNG diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 75a67551d..4b9357e52 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2866,13 +2866,22 @@ for system administrators. \subsection*{Using a configuration file} %.pg -The default name of the configuration file varies on different -operating systems. On MS-DOS and Windows, it is \mbox{``defaults.nh''} in +The default name and location of the configuration file varies on different +operating systems. If you manually installed on MS-DOS and Windows, +it is \mbox{``defaults.nh''} in the same folder as \mbox{{\it nethack.exe\/}} or \mbox{{\it nethackW.exe\/}}. +If you installed using the Microsoft Store, it is \mbox{``defaults.nh''} in +the folder \mbox{{``\%USERPROFILE\%\textbackslash NetHack''}}. On Unix, Linux and Mac OS X it is \mbox{``.nethackrc''} in the user's home directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor. +%.pg +If you installed using the Microsoft Store, you will find that we provide +a starting template for you to use to create your \mbox{``defaults.nh''} +configuration file. It is \mbox{``defaults.tmp''} also in the folder +\mbox{{``\%USERPROFILE\%\textbackslash NetHack''}}. + %.pg Any line in the configuration file starting with `{\tt \#}' is treated as a comment. Empty lines are ignored. diff --git a/include/extern.h b/include/extern.h index 6dc781e1d..50d25cc1e 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1825,6 +1825,8 @@ E int NDECL(dohistory); E void FDECL(chdirx, (char *, BOOLEAN_P)); #endif /* CHDIR */ E boolean NDECL(authorize_wizard_mode); +E boolean NDECL(is_desktop_bridge_application); + #endif /* MICRO || WIN32 */ /* ### pcsys.c ### */ diff --git a/include/ntconf.h b/include/ntconf.h index eb106090f..c38770e17 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -285,4 +285,5 @@ extern void FDECL(nhassert_failed, (const char * exp, const char * file, #define nethack_enter(argc, argv) nethack_enter_winnt() extern void FDECL(nethack_exit, (int)) NORETURN; extern boolean FDECL(file_exists, (const char *)); +extern boolean FDECL(file_newer, (const char *, const char *)); #endif /* NTCONF_H */ diff --git a/src/files.c b/src/files.c index 41382c1ce..7228cd7e8 100644 --- a/src/files.c +++ b/src/files.c @@ -944,7 +944,7 @@ boolean regularize_it; /* Obtain the name of the logged on user and incorporate * it into the name. */ - Sprintf(fnamebuf, "%s-%s", get_username(0), plname); + Sprintf(fnamebuf, "%s", plname); if (regularize_it) ++legal; /* skip '*' wildcard character */ (void) fname_encode(legal, '%', fnamebuf, encodedfnamebuf, BUFSZ); @@ -1138,6 +1138,10 @@ get_saved_games() { char *foundfile; const char *fq_save; + const char *fq_new_save; + const char *fq_old_save; + char **files = 0; + int i; Strcpy(plname, "*"); set_savefile_name(FALSE); @@ -1153,20 +1157,44 @@ get_saved_games() ++n; } while (findnext()); } + if (n > 0) { - result = (char **) alloc((n + 1) * sizeof(char *)); /* at most */ - (void) memset((genericptr_t) result, 0, (n + 1) * sizeof(char *)); + files = (char **) alloc((n + 1) * sizeof(char *)); /* at most */ + (void) memset((genericptr_t) files, 0, (n + 1) * sizeof(char *)); if (findfirst((char *) fq_save)) { - j = n = 0; + i = 0; do { - char *r; - r = plname_from_file(foundfile); - if (r) - result[j++] = r; - ++n; + files[i++] = strdup(foundfile); } while (findnext()); } } + + if (n > 0) { + result = (char **) alloc((n + 1) * sizeof(char *)); /* at most */ + (void) memset((genericptr_t) result, 0, (n + 1) * sizeof(char *)); + for(i = 0; i < n; i++) { + char *r; + r = plname_from_file(files[i]); + + if (r) { + + /* rename file if it is not named as expected */ + Strcpy(plname, r); + set_savefile_name(FALSE); + fq_new_save = fqname(SAVEF, SAVEPREFIX, 0); + fq_old_save = fqname(files[i], SAVEPREFIX, 1); + + if(strcmp(fq_old_save, fq_new_save) != 0 && + !file_exists(fq_new_save)) + rename(fq_old_save, fq_new_save); + + result[j++] = r; + } + } + } + + free_saved_games(files); + } #endif #if defined(UNIX) && defined(QT_GRAPHICS) @@ -3169,6 +3197,7 @@ fopen_sym_file() FILE *fp; fp = fopen_datafile(SYMBOLS, "r", HACKPREFIX); + return fp; } diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index b2bb18e79..14734900b 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -8,8 +8,11 @@ #include "hack.h" #include "dlb.h" #include +#include #include #include +#include +#include #if 0 #include "wintty.h" @@ -22,7 +25,7 @@ #define E extern static void FDECL(process_options, (int argc, char **argv)); static void NDECL(nhusage); -static char *FDECL(exepath, (char *)); +static char *NDECL(get_executable_path); char *NDECL(exename); boolean NDECL(fakeconsole); void NDECL(freefakeconsole); @@ -50,7 +53,6 @@ extern int NDECL(windows_console_custom_nhgetch); void NDECL(safe_routines); char orgdir[PATHLEN]; -char *dir; boolean getreturn_enabled; extern int redirect_stdout; /* from sys/share/pcsys.c */ extern int GUILaunched; @@ -67,6 +69,279 @@ static struct stat hbuf; extern char orgdir[]; +boolean +is_desktop_bridge_application() +{ + UINT32 length = 0; + LONG rc = GetCurrentPackageFullName(&length, NULL); + + return (rc == ERROR_INSUFFICIENT_BUFFER); +} + +void +get_known_folder_path( + const KNOWNFOLDERID * folder_id, + char * path + , size_t path_size) +{ + PWSTR wide_path; + if (FAILED(SHGetKnownFolderPath(folder_id, 0, NULL, &wide_path))) + error("Unable to get known folder path"); + + size_t converted; + errno_t err; + + err = wcstombs_s(&converted, path, path_size, wide_path, path_size - 1); + + CoTaskMemFree(wide_path); + + if (err != 0) error("Failed folder path string conversion"); +} + +void +create_directory(const char * path) +{ + HRESULT hr = CreateDirectoryA(path, NULL); + + if (FAILED(hr) && hr != ERROR_ALREADY_EXISTS) + error("Unable to create directory '%s'", path); +} + +void +build_known_folder_path( + const KNOWNFOLDERID * folder_id, + char * path, + size_t path_size) +{ + get_known_folder_path(folder_id, path, path_size); + strcat(path, "\\NetHack\\"); + create_directory(path); + strcat(path, "3.6\\"); + create_directory(path); +} + +void +build_environment_path( + const char * env_str, + const char * folder, + char * path, + size_t path_size) +{ + path[0] = '\0'; + + const char * root_path = nh_getenv(env_str); + + if (root_path == NULL) return; + + strcpy_s(path, path_size, root_path); + + char * colon = index(path, ';'); + if (colon != NULL) path[0] = '\0'; + + if (strlen(path) == 0) return; + + append_slash(path); + + if (folder != NULL) { + strcat_s(path, path_size, folder); + strcat_s(path, path_size, "\\"); + } +} + +boolean +folder_file_exists(const char * folder, const char * file_name) +{ + char path[MAX_PATH]; + + if (folder[0] == '\0') return FALSE; + + strcpy(path, folder); + strcat(path, file_name); + return file_exists(path); +} + +/* + * Rules for setting prefix locations + * + * COMMON_NETHACK_PATH = %COMMONPROGRAMFILES%\NetHack\3.6\ + * PROFILE_PATH = %SystemDrive%\Users\%USERNAME%\ + * + * NETHACK_PROFILE_PATH = PROFILE_PATH\NetHack\3.6\ + * NETHACK_PER_USER_DATA_PATH = PROFILE_PATH\AppData\Local\NetHack\3.6\ + * NETHACK_GLOBAL_DATA_PATH = %SystemDrive%\ProgramData\NetHack\3.6\ + * EXECUTABLE_PATH = path to where .exe lives + * + * HACKPREFIX: + * - use environment variable NETHACKDIR if variable is defined + * - otherwise use environment variable HACKDIR if variable is defined + * - otherwise if store install use NETHACK_PROFILE_PATH + * - otherwise if manual install use EXECUTABLE_PATH + * + * LEVELPREFIX, SAVEPREFIX: + * - if store install use NETHACK_PER_USER_DATA_PATH + * - if manual install use HACKPREFIX + * + * BONESPREFIX, SCOREPREFIX, LOCKPREFIX: + * - if store install use NETHACK_GLOBAL_DATA_PATH + * - if manual install use HACKPREFIX + * + * DATAPREFIX + * - if store install use EXECUTABLE_PATH + * - if manual install use HACKPREFIX + * + * SYSCONFPREFIX + * - use COMMON_NETHACK_PATH if sysconf present + * - otherwise use HACKPREFIX + * + * CONFIGPREFIX + * - if manual install use PROFILE_PATH + * - if store install use NETHACK_PROFILE_PATH + */ + +void +set_default_prefix_locations(const char *programPath) +{ + char *envp = NULL; + char *sptr = NULL; + + static char hack_path[MAX_PATH]; + static char executable_path[MAX_PATH]; + static char nethack_profile_path[MAX_PATH]; + static char nethack_per_user_data_path[MAX_PATH]; + static char nethack_global_data_path[MAX_PATH]; + static char sysconf_path[MAX_PATH]; + + strcpy(executable_path, get_executable_path()); + append_slash(executable_path); + + build_environment_path("NETHACKDIR", NULL, hack_path, sizeof(hack_path)); + + if (hack_path[0] == '\0') + build_environment_path("HACKDIR", NULL, hack_path, sizeof(hack_path)); + + build_known_folder_path(&FOLDERID_Profile, nethack_profile_path, + sizeof(nethack_profile_path)); + + build_known_folder_path(&FOLDERID_LocalAppData, + nethack_per_user_data_path, sizeof(nethack_per_user_data_path)); + + build_known_folder_path(&FOLDERID_ProgramData, + nethack_global_data_path, sizeof(nethack_global_data_path)); + + if (hack_path[0] == '\0') + strcpy(hack_path, nethack_profile_path); + + fqn_prefix[LEVELPREFIX] = nethack_per_user_data_path; + fqn_prefix[SAVEPREFIX] = nethack_per_user_data_path; + fqn_prefix[BONESPREFIX] = nethack_global_data_path; + fqn_prefix[DATAPREFIX] = executable_path; + fqn_prefix[SCOREPREFIX] = nethack_global_data_path; + fqn_prefix[LOCKPREFIX] = nethack_global_data_path; + fqn_prefix[CONFIGPREFIX] = nethack_profile_path; + + fqn_prefix[HACKPREFIX] = hack_path; + fqn_prefix[TROUBLEPREFIX] = hack_path; + + build_environment_path("COMMONPROGRAMFILES", "NetHack\\3.6", sysconf_path, + sizeof(sysconf_path)); + + if(!folder_file_exists(sysconf_path, SYSCF_FILE)) + strcpy(sysconf_path, hack_path); + + fqn_prefix[SYSCONFPREFIX] = sysconf_path; + +} + +/* copy file if destination does not exist */ +void +copy_file( + const char * dst_folder, + const char * dst_name, + const char * src_folder, + const char * src_name) +{ + char dst_path[MAX_PATH]; + strcpy(dst_path, dst_folder); + strcat(dst_path, dst_name); + + char src_path[MAX_PATH]; + strcpy(src_path, src_folder); + strcat(src_path, src_name); + + if(!file_exists(src_path)) + error("Unable to copy file '%s' as it does not exist", src_path); + + if(file_exists(dst_path)) + return; + + BOOL success = CopyFileA(src_path, dst_path, TRUE); + if(!success) error("Failed to copy '%s' to '%s'", src_path, dst_path); +} + +/* update file copying if it does not exist or src is newer then dst */ +void +update_file( + const char * dst_folder, + const char * dst_name, + const char * src_folder, + const char * src_name) +{ + char dst_path[MAX_PATH]; + strcpy(dst_path, dst_folder); + strcat(dst_path, dst_name); + + char src_path[MAX_PATH]; + strcpy(src_path, src_folder); + strcat(src_path, src_name); + + if(!file_exists(src_path)) + error("Unable to copy file '%s' as it does not exist", src_path); + + if (!file_newer(src_path, dst_path)) + return; + + BOOL success = CopyFileA(src_path, dst_path, FALSE); + if(!success) error("Failed to update '%s' to '%s'", src_path, dst_path); + +} + +void copy_config_content() +{ + /* Keep templates up to date */ + update_file(fqn_prefix[CONFIGPREFIX], "defaults.tmp", + fqn_prefix[DATAPREFIX], "defaults.nh"); + update_file(fqn_prefix[SYSCONFPREFIX], "sysconf.tmp", + fqn_prefix[DATAPREFIX], SYSCF_FILE); + + /* If the required early game file does not exist, copy it */ + copy_file(fqn_prefix[CONFIGPREFIX], "defaults.nh", + fqn_prefix[DATAPREFIX], "defaults.nh"); + copy_file(fqn_prefix[SYSCONFPREFIX], SYSCF_FILE, + fqn_prefix[DATAPREFIX], SYSCF_FILE); + + /* If a required game file does not exist, copy it */ + /* TODO: Can't HACKDIR be changed during option parsing + causing us to perhaps be checking options against the wrong + symbols file? */ + copy_file(fqn_prefix[HACKPREFIX], SYMBOLS, + fqn_prefix[DATAPREFIX], SYMBOLS); +} + +void +copy_hack_content() +{ + /* Keep Guidebook and opthelp up to date */ + update_file(fqn_prefix[HACKPREFIX], "Guidebook.txt", + fqn_prefix[DATAPREFIX], "Guidebook.txt"); + update_file(fqn_prefix[HACKPREFIX], "opthelp", + fqn_prefix[DATAPREFIX], "opthelp"); + + /* Keep templates up to date */ + update_file(fqn_prefix[HACKPREFIX], "symbols.tmp", + fqn_prefix[DATAPREFIX], "symbols"); + +} + /* * __MINGW32__ Note * If the graphics version is built, we don't need a main; it is skipped @@ -120,110 +395,25 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ #endif hname = "NetHack"; /* used for syntax messages */ + +#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS) /* Save current directory and make sure it gets restored when * the game is exited. */ if (getcwd(orgdir, sizeof orgdir) == (char *) 0) error("NetHack: current directory path too long"); - dir = nh_getenv("NETHACKDIR"); - if (dir == (char *) 0) - dir = nh_getenv("HACKDIR"); - if (dir == (char *) 0) - dir = exepath(argv[0]); -#ifdef _MSC_VER - if (IsDebuggerPresent()) { - static char exepath[_MAX_PATH]; - /* check if we're running under the debugger so we can get to the right folder anyway */ - if (dir != (char *)0) { - char *top = (char *)0; - - if (strlen(dir) < (_MAX_PATH - 1)) - strcpy(exepath, dir); - top = strstr(exepath, "\\build\\.\\Debug"); - if (!top) top = strstr(exepath, "\\build\\.\\Release"); - if (top) { - *top = '\0'; - if (strlen(exepath) < (_MAX_PATH - (strlen("\\binary\\") + 1))) { - Strcat(exepath, "\\binary\\"); - if (strlen(exepath) < (PATHLEN - 1)) { - dir = exepath; - } - } - } - } - } #endif - if (dir != (char *)0) { - int prefcnt; - int fd; - boolean have_syscf = FALSE; - (void) strncpy(hackdir, dir, PATHLEN - 1); - hackdir[PATHLEN - 1] = '\0'; - fqn_prefix[0] = (char *) alloc(strlen(hackdir) + 2); - Strcpy(fqn_prefix[0], hackdir); - append_slash(fqn_prefix[0]); - for (prefcnt = 1; prefcnt < PREFIX_COUNT; prefcnt++) - fqn_prefix[prefcnt] = fqn_prefix[0]; - /* sysconf should be searched for in this location */ - envp = nh_getenv("COMMONPROGRAMFILES"); - if (envp) { - if ((sptr = index(envp, ';')) != 0) - *sptr = '\0'; - if (strlen(envp) > 0) { - fqn_prefix[SYSCONFPREFIX] = - (char *) alloc(strlen(envp) + 10); - Strcpy(fqn_prefix[SYSCONFPREFIX], envp); - append_slash(fqn_prefix[SYSCONFPREFIX]); - Strcat(fqn_prefix[SYSCONFPREFIX], "NetHack\\"); - } - } + set_default_prefix_locations(argv[0]); - /* okay so we have the overriding and definitive locaton - for sysconf, but only in the event that there is not a - sysconf file there (for whatever reason), check a secondary - location rather than abort. */ +#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS) + chdir(fqn_prefix[HACKPREFIX]); +#endif - /* Is there a SYSCF_FILE there? */ - fd = open(fqname(SYSCF_FILE, SYSCONFPREFIX, 0), O_RDONLY); - if (fd >= 0) { - /* readable */ - close(fd); - have_syscf = TRUE; - } + copy_config_content(); - if (!have_syscf) { - /* No SYSCF_FILE where there should be one, and - without an installer, a user may not be able - to place one there. So, let's try somewhere else... */ - fqn_prefix[SYSCONFPREFIX] = fqn_prefix[0]; - - /* Is there a SYSCF_FILE there? */ - fd = open(fqname(SYSCF_FILE, SYSCONFPREFIX, 0), O_RDONLY); - if (fd >= 0) { - /* readable */ - close(fd); - have_syscf = TRUE; - } - } - - /* user's home directory should default to this - unless - * overridden */ - envp = nh_getenv("USERPROFILE"); - if (envp) { - if ((sptr = index(envp, ';')) != 0) - *sptr = '\0'; - if (strlen(envp) > 0) { - fqn_prefix[CONFIGPREFIX] = - (char *) alloc(strlen(envp) + 2); - Strcpy(fqn_prefix[CONFIGPREFIX], envp); - append_slash(fqn_prefix[CONFIGPREFIX]); - } - } - } - if (GUILaunched || IsDebuggerPresent()) { + if (GUILaunched || IsDebuggerPresent()) getreturn_enabled = TRUE; - } check_recordfile((char *) 0); iflags.windowtype_deferred = TRUE; @@ -233,10 +423,11 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ failbuf); nethack_exit(EXIT_FAILURE); } - if (!hackdir[0]) - Strcpy(hackdir, orgdir); + process_options(argc, argv); - + + copy_hack_content(); + /* * It seems you really want to play. */ @@ -294,7 +485,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ iflags.renameallowed = FALSE; /* Obtain the name of the logged on user and incorporate * it into the name. */ - Sprintf(fnamebuf, "%s-%s", get_username(0), plname); + Sprintf(fnamebuf, "%s", plname); (void) fname_encode( "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-.", '%', fnamebuf, encodedfnamebuf, BUFSZ); @@ -401,7 +592,7 @@ char *argv[]; */ argc--; argv++; - dir = argv[0] + 2; + const char * dir = argv[0] + 2; if (*dir == '=' || *dir == ':') dir++; if (!*dir && argc > 1) { @@ -664,33 +855,28 @@ void freefakeconsole() } #endif -#define EXEPATHBUFSZ 256 -char exepathbuf[EXEPATHBUFSZ]; - char * -exepath(str) -char *str; +get_executable_path() { - char *tmp, *tmp2; - int bsize; + static char path_buffer[MAX_PATH]; - if (!str) - return (char *) 0; - bsize = EXEPATHBUFSZ; - tmp = exepathbuf; #ifdef UNICODE { TCHAR wbuf[BUFSZ]; GetModuleFileName((HANDLE) 0, wbuf, BUFSZ); - WideCharToMultiByte(CP_ACP, 0, wbuf, -1, tmp, bsize, NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, wbuf, -1, path_buffer, sizeof(path_buffer), NULL, NULL); } #else - *(tmp + GetModuleFileName((HANDLE) 0, tmp, bsize)) = '\0'; + DWORD length = GetModuleFileName((HANDLE) 0, path_buffer, MAX_PATH); + if (length == ERROR_INSUFFICIENT_BUFFER) error("Unable to get module name"); + path_buffer[length] = '\0'; #endif - tmp2 = strrchr(tmp, PATH_SEPARATOR); - if (tmp2) - *tmp2 = '\0'; - return tmp; + + char * seperator = strrchr(path_buffer, PATH_SEPARATOR); + if (seperator) + *seperator = '\0'; + + return path_buffer; } /*ARGSUSED*/ @@ -943,4 +1129,28 @@ const char *path; return TRUE; } +/* + file_newer returns TRUE if the file at a_path is newer then the file + at b_path. If a_path does not exist, it returns FALSE. If b_path + does not exist, it returns TRUE. + */ +boolean +file_newer(a_path, b_path) +const char * a_path; +const char * b_path; +{ + struct stat a_sb; + struct stat b_sb; + + if (stat(a_path, &a_sb)) + return FALSE; + + if (stat(b_path, &b_sb)) + return TRUE; + + if(difftime(a_sb.st_mtime, b_sb.st_mtime) < 0) + return TRUE; + return FALSE; +} + /*windmain.c*/ diff --git a/sys/winnt/winnt.c b/sys/winnt/winnt.c index f6a9aa791..37edbbcbf 100644 --- a/sys/winnt/winnt.c +++ b/sys/winnt/winnt.c @@ -188,15 +188,21 @@ get_username(lan_username_size) int *lan_username_size; { static TCHAR username_buffer[BUFSZ]; - unsigned int status; DWORD i = BUFSZ - 1; - /* i gets updated with actual size */ - status = GetUserName(username_buffer, &i); - if (status) - username_buffer[i] = '\0'; - else - Strcpy(username_buffer, "NetHack"); + Strcpy(username_buffer, "NetHack"); + + /* Our privacy policy for the windows store version of nethack makes + * a promise about not collecting any personally identifiable information. + * Do not allow getting user name if we being run from windows store + * version of nethack. In 3.7, we should remove use of username. + */ + if (!is_desktop_bridge_application()) { + /* i gets updated with actual size */ + if (GetUserName(username_buffer, &i)) + username_buffer[i] = '\0'; + } + if (lan_username_size) *lan_username_size = strlen(username_buffer); return username_buffer; diff --git a/win/win32/mhsplash.c b/win/win32/mhsplash.c index 0271c8081..8dcfd1b39 100644 --- a/win/win32/mhsplash.c +++ b/win/win32/mhsplash.c @@ -170,6 +170,7 @@ mswin_display_splash_window(BOOL show_ver) FILE *nf; iflags.news = 0; /* prevent newgame() from re-displaying news */ + /* BUG: this relies on current working directory */ nf = fopen(NEWS, "r"); if (nf != NULL) { char line[LLEN + 1]; diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index b637c463f..38b4b0b29 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -142,6 +142,7 @@ mswin_init_nhwindows(int *argc, char **argv) # ifdef _DEBUG if (showdebug(NHTRACE_LOG) && !_s_debugfp) { /* truncate trace file */ + /* BUG: this relies on current working directory */ _s_debugfp = fopen(NHTRACE_LOG, "w"); } # endif diff --git a/win/win32/vs2017/.gitignore b/win/win32/vs2017/.gitignore index f87237325..c4775b3c5 100644 --- a/win/win32/vs2017/.gitignore +++ b/win/win32/vs2017/.gitignore @@ -2,3 +2,11 @@ *.db-shm *.db-wal paniclog +_pkginfo.txt +AppPackages +BundleArtifacts +report.xml +*.cer +*.appxbundle +NetHackPackage_StoreKey.pfx +NetHackPackage_TemporaryKey.pfx diff --git a/win/win32/vs2017/Images/BadgeLogo.scale-100.png b/win/win32/vs2017/Images/BadgeLogo.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..0c1dff1b40ec5e449939e5c77ef5bfc0f0c7fea8 GIT binary patch literal 238 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjoCO|{#S9F5he4R}c>anMpx^>e z7srr_IajB6^EDW7xR}oT9Upm{l{2Vr+lsg_q%HZkh=d#Wzp$Py{$yk;E literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/BadgeLogo.scale-125.png b/win/win32/vs2017/Images/BadgeLogo.scale-125.png new file mode 100644 index 0000000000000000000000000000000000000000..45aa7773cd1fdb11e163b92f654c9a76815d38f3 GIT binary patch literal 300 zcmV+{0n`48P)pF-bqA3RCt`-mfH@5FbG6<6aN2~)tZnrvrw2yb>lp!X$z+ay~u~u zcIbPEwL^*JxV_Q2w&OR-v%_}LPRl^sMj&hA89UKVYY+pB?E1DgF=>xkz!m-E_;p~+ z`)y!M=X1aMiNZR;TGcaamXVp`iY<_xKv|C2{h$oYrs(|}NC;lBcU#5#KM^-oM(r(C z6I}VLy{nRY^{JEv7aULp!*n5B`i?57=dXv0H)vK-VJbXzEM}{mIc(DFID)e$9JPUX y@R?&ZyxyWy9B)B0sToG>MUsgyf-k*+jQs9B0=#L?40h%K0000pGBuPX;RCt`#mrD)mg~|Fr9pH^vWmS>>n6w65p%a3Nbs^|J(8VVO z8P0o$cFQ)P=xyBslzBR~0F~dNj>pjRr`_x`PUx2IQ{ukUKxo(v0}&%3DR zW#|~a6Nu`}zzjegsjGIM)88_w|L$moLqJxbC`773TbY6=)X?PbnmoKXUq4SQc<1o5 QcK`qY07*qoM6N<$f+OstcK`qY literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/BadgeLogo.scale-200.png b/win/win32/vs2017/Images/BadgeLogo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..21e20fb67f98bef8cbde97e0f1fab2deb0279d47 GIT binary patch literal 520 zcmV+j0{8uiP)pGx=BPqRCt`-S?zMfAP8({eE(Ozo}Fff8i55?O}l?Cr-%?fHSOb% zqgj)$H~R1A8y=&J7Da@oMQbV`8CguC!ZQIW&@oe@BDh>z;oIZ_&#adc>^Cm=M|ey6 zHclYE`6S$2$g{>uf46vRb8rki75`U(naO03Y0nyc71E_8&yWS=LhV_jUj@1gA#dHH ziCT@WKqQY}kU~eT`G_E{xLQa7R!}m7I~~LojC~N&N>H-U3Lx3c!nXoD+J;p%VVec4 z%wvstIOak#LDMc20mBuJWuXp6&%>(19TXQ@kzP?8Poo_bmpY=rDDbvcf(2%MF%`H9 z#_GP_IuLnlX%_JOc$`OCXaqC`JR!#Ut#x37NTjh(`s|--RMeW_K?R;Iew&_p7G4Cyhu<0000< KMNUMnLSTaPWZ(G! literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/BadgeLogo.scale-400.png b/win/win32/vs2017/Images/BadgeLogo.scale-400.png new file mode 100644 index 0000000000000000000000000000000000000000..10fdb8f1e9081ddb3987722feeb585c1734fb675 GIT binary patch literal 770 zcmV+d1O5DoP)pHv`IukRCt{2oxyIyFbqRCp#T5NTXzW70#Rzkl*vSVr=eIK*R)v4 ziQUJSq4HpNpgR_T%#;8>Pqx3mpUijXz0C?L`Z?34BY+G{fWH|rJG-i9zar2G*amP! z2-aXn*JbtD7DT2*fKPVR(P|>z1VCmrdv>He@X=>S^*L(a7DOf#0Fl+awxc}znH)yI z-k_Zk~UXQFMYdbTRRc&{U05TSUjI;n1OTiH+yYpJm#jpTm%Ig4yLTRKwtbRHI z$XEa}OA9d;*+LIhxQ+C|5kSTQka-gzyNao1HCgLenGr=}>j)rY0m$4+0My;Im4)Q3 z1h^s=fK0gn3hP3s?5F}q02vEFrd$Ap=X}&|#J}PQAY%c@NC=>?ro_tDBn0S;1t8Nx z0N<21Ar^qllmL61FchgM22pz;AQ9k=*yphYk&zRidNT#;DQFaO0(8Rykbwz+%805D z%9v@tV)rLJ0-O=$umzE6A%Mbz0TC?(PzEl5+6+?%c6RhDYHLKO%x9#y%Tj7V&WJv9 zS^y6$hO+a5l&D^6j`o+0;4FwtN`NcQeszWfKx7e2@mAj9%G%K~3vx!Z&qo1P9vRb- z!^68X4P^?JqqbMB+hljO&usLN+NNqd`e#=F_7`TSV=u#B(8zMuvi9D$y;fmIGvcDg zN9q?ey4w+5fFnBC(V+mVil`AgLbQ(rWsji%jG5Qbj-)N914D%vqd1zqPIUyM#z8g$ zy4aDd09`0wj-DZFM+zxx)~+uR0e7~eO9*ghmYx@+&`$PR*~rWOzaxN*1t7C~aI1O| zv=USinz|!)=d42wTM!wk)lhXVu}940umEI!0Wh&C2RhA;LI3~&07*qoM6N<$f`^Sw A6#xJL literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/LargeTile.scale-100.png b/win/win32/vs2017/Images/LargeTile.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..2c00fc94e5d6f40b56b7602748a25567f75c5ab7 GIT binary patch literal 14026 zcmeHuWm6w zzD!Sb*7Ia#W<@E=OCZ7H!h?ZDN9&nD5S}tH<$V30# z;G+%|reI(kzEYw>s-C|tbK!i`9f&|yl2a$t`iR;v=m$tfOa%rt|o%r=y zR=9iB>T`7-;#aM%V_UY{7LQDHYy`YV)h~19-CCBdTS+wq%~Y_`#86>Le4L%z-rhg2 z-voN#q+o;KPx5!37FU0{+}fWc-d)_i=QGfTqVD6&llei0qB?gJHlPXr3Kz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){052wEAwfrNuxH_o{C|d?>6{9N`*!sd!qT6oFpJ_K5w|m+v1LX zzUuNLvY=_7N_yi6mP1H}IZk19=aG8)%+lB<1h=dM&d=muKmM~Z&T#gq6!m9_#`7(Q z6A^a1?~eGaiEa;JT!(84YS%9HT^}bR;MD1M)3!I`K{p^v&VvkkdIjk{#_Pb}{QVU$p78Oj%758m+L*Dr}(F5kTMeRV+gbGw<4^R$u& z#EM?V{&gs;@0*`ri;K7p2cb@f^5LBHG;LkG$>o zTTuu5R7ju#=6mQ-XZt8MPku9WOJm#@WE{EX-o8Avli4qa;qS6(97@BU31b#orA|&@ z!;~xoqA3Cfw-?dS7xo-Y3smUS&Ubp5G*)^XgLHz-N36^F6I p!tYc6oiG0HQ1$=MN%F4;M?-Msrjw_84kznbEG}D{)*IhW{D13X=Q{uZ literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/LargeTile.scale-150.png b/win/win32/vs2017/Images/LargeTile.scale-150.png new file mode 100644 index 0000000000000000000000000000000000000000..f3ccd110767465a222d0913274b553e29c0881fe GIT binary patch literal 20205 zcmeFYi#yYA{6DU|bs&chDCAHnhtRwzIJi7L*d? z#DWZTu zIh^AQKwBuyrbY`5Xb!_Q^zeiDv zZ$kH5gPWR{&nK1Ie?cb6r`GG;J9S?!C(#X8$u8$oL+M4d=-}z1CEekxl;Pc2L)$?L zv6bTq)f5SAq_m^hBmX#4X7?b*Kl zp{P4WTs5%siNL{~miYL66L@$qZKvA`1S*716DZoyaZM&?D%&Sr_v`)sB4|QF!r(f} zNrg3+X$$m{6TWFJ{8XvpMY&b>cz+yseFOoYeE7Vb3B%~uP#?~w>5RKit!44Ydcfh$ zh8qJnoYk|tcMIwuSJgY+uW(fOuM zm^7}aC7&1#@fr1Mru%U2<53EmAhX4)E!)#91B5d8nF$;rSAMG@X8eIWT5d}RuRw>7Em zejxU?a@TNgXWhOfUBXo`TsQ)^_Cu8&$<*sBgik%thchQv)_+C~rh58nAeO8gq8qb&cz4Rmax~@l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0#Z>YdD^iK$zcXd*T*B_%^kCLf|p z_X&a8REHnW-j7Qow27OOWb>6M#DMHdeZm?hHPo+Ux~s~pdTIBz1Lk`aUxnIrsPXy- z7|hl23wW8CkQwxhNZ1p{Xnm(f4;>#F8=u3_fbuN=*2nSv-unam7gcpVNvTPeA-JI% z)YAL05OsZHwSLX&2N!ZyvGP@{=+%aJkHpXTXc))ar#kslQu{{;Rke6%JWO+6ZXtRD zzDDP&8LBowX9Wp;NGA~MrkKSdA&+O%m?J(Q;jz=!@EamQJRp;1G#@9h*Ot}&mfg{x z<1{Qf5?*G^Uxbdn5O8vfERe(!3!^dYemDid!WWm_mvQ7}t`q8{@3)%YZ{76kSIb`0J=76+S-y!UqrKuS|krYPMn75*D@ApTpUZoU{DP9`UPrd z+h!h50&Kw(Q^e4(UJA9r(TH>LBc*8}ZL#c;NM2#8gyjgbY|a$GcMAl*TP#X%9oc-Q z-KTN*ciULo_ofvFb6qfCk&CCjTH)3G%RyHElvuI-W>j$__`;gP-eAgsjdJ{gq^v9I z0nZU+x46gf7`8T3goHdBouKknqbivkqqpITrkI~kS6%NBqs)^{rROs2IKl!Eac_@3 zDSB&!!-z{vjCZf*hs%-MEEUE5O><< zpdAmWqt=p;eFK2tYp>SepL^O1))M`MeC^Jqu`iorww!gCj@}u*2^iRxaq+uCV$xYt znpmevJXIKwIr!UtRKj~3=d9D%KN80h0$<+CsdStMu@E(A#=LhOKhJUevhWS>w0RaNvRz(+I=*`myTdoAis07*MSNrC&�V(gF&TDRb$$)IO zlR+nmTjN0zfZ6fS|5`IRDaDMbcNE=BhVsBa{ukaSzyV!I`}(B(uyMd0OD#HDj1v&O zUdPi@Dd&|2z~ESi=uS3NSxG_of0tT)cYb|0o&CSxO(s{4%k{GNZqDR_{yHUZk8|#| IKV7-~ABB3&UH||9 literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/LargeTile.scale-200.png b/win/win32/vs2017/Images/LargeTile.scale-200.png new file mode 100644 index 0000000000000000000000000000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ImRrFG-o|(8zV~eEf~a6lK<3N|dl5Cr0eM;pphs`k2^DKjMz8aEt_Wx4yp=KqJT< z9pDZ$o{SjAg%bu4k1>c5+6wpiq$!bRL=_B3y`w}|JHg4)MH8$N0&v+ouM?t3|i9y=$&_o(<>F89ihduApyf#9Xb z2wIV-g0#yY{#OnN*y4ZpRvJ&@;^O+ge*Fqm5NbRup^VtrFvTU&iqutS18?A~vA zyr}MNXi_+&>M98PB`<<*D{mhkHZWnPan8!@aH_4XZ6BRZ{|@74391Qz0qdJ7Di;#Ys1q_q(fUcr z&a0$2Mf=2~e(>burg@gkdnBVfTa)>Tkz7_OrgE#Lr3D@D5WF}$LWF`g5EW3qcVd@7 z+Ux#$)oq(|0d}d4bD{*Z3Ov3PG|1F8H8rV1drVAB$}#x1bswVH0lLm){>D0u6s_di z{OsIU$prV&gzc9Q$bB!*UR}t?9XcTXvw?&@7NuhV+qE2g0LsDOwL!iEN(8tr|MqX* zwika~kb~4EklY~+UpA(9wijzemPtd}+n2)jK_mb>JoeJ3r;e76Y!isaljvaKM``f( z-R;F+8!wH4Ul{wt|M3BYPyL@h{I{R|_UisKv;Sr}-z?{w<@^W!;@iUcws5{JoNo)~ l-;FcB?Hm7Z_l=L+JI$w{(Qda&q=Z&rdco4T@|^3ve*!B^4krKr literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/LockScreenLogo.scale-200.png b/win/win32/vs2017/Images/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..735f57adb5dfc01886d137b4e493d7e97cf13af3 GIT binary patch literal 1430 zcmaJ>TTC2P7~aKltDttVHYH6u8Io4i*}3fO&d$gd*bA_<3j~&e7%8(eXJLfhS!M@! zKrliY>>6yT4+Kr95$!DoD(Qn-5TP|{V_KS`k~E6(LGS@#`v$hQo&^^BKsw3HIsZBT z_y6C2n`lK@apunKojRQ^(_P}Mgewt$(^BBKCTZ;*xa?J3wQ7~@S0lUvbcLeq1Bg4o zH-bvQi|wt~L7q$~a-gDFP!{&TQfc3fX*6=uHv* zT&1&U(-)L%Xp^djI2?~eBF2cxC@YOP$+9d?P&h?lPy-9M2UT9fg5jKm1t$m#iWE{M zIf%q9@;fyT?0UP>tcw-bLkz;s2LlKl2qeP0w zECS7Ate+Awk|KQ+DOk;fl}Xsy4o^CY=pwq%QAAKKl628_yNPsK>?A>%D8fQG6IgdJ ztnxttBz#NI_a@fk7SU`WtrpsfZsNs9^0(2a z@C3#YO3>k~w7?2hipBf{#b6`}Xw1hlG$yi?;1dDs7k~xDAw@jiI*+tc;t2Lflg&bM)0!Y;0_@=w%`LW^8DsYpS#-bLOklX9r?Ei}TScw|4DbpW%+7 zFgAI)f51s}{y-eWb|vrU-Ya!GuYKP)J7z#*V_k^Xo>4!1Yqj*m)x&0L^tg3GJbVAJ zJ-Pl$R=NAabouV=^z_t;^K*0AvFs!vYU>_<|I^#c?>>CR<(T?=%{;U=aI*SbZADLH z&(f2wz_Y0??Tf|g;?|1Znw6}6U43Q#qNRwv1vp9uFn1)V#*4p&%$mP9x&15^OaBiDS(XppT|z^>;B{PLVEbS3IFYV yGvCsSX*m literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/SmallTile.scale-100.png b/win/win32/vs2017/Images/SmallTile.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..f7e719d0656ef06c160b1dff7f6639eed9f10123 GIT binary patch literal 3398 zcma)FJ&cC9j{5u~u*xvkW zG;m#;KoSzh-hV~f2gA6KkkFs%X{uR<7Ht)TSw5WL>+9-Xj_p_JRWMU?Vv(RE2g$$< zwR)DBUW@207dd(UksqTd859@-v7mjx%h~y05j>GJQguFyq0m?L_35*%Fz30BFzJrtIN<$xhZdjd{R{Bf z_1%m+Ni;e~ks67NyfR_?E?=jnoTss_9ktGVX}ZS7h{sZi>FL1zg9AqxEM4kJ+x%oL z6qHg?Asi48;Na(%<~!T6u(#9)GIw?s>gs!=m&L@(o64&kd{Gs3@i2)}MZnw*@RDhU(8rBxPaK>-2Mp`o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-^3G0WS2&%H+_uumqzxEL5BZn<%|qqVZ_V*&6q)Ho^KPDuc{qC$|9iHRHG z;nOhKQe1q{#5hUnK+Yd)jrZZa=se$g_?X?s*78C;EoRKuRQFC9&+Q6%9`f{IsgQ?2 z5C|l3lRr>A8WTyML|>(k_q~cin5*(j8}}|MiX=;@+6q`cD7JJ_K6Ca+Qhn~SqY0Ni z#mB!u$CJU~M-K@s^awok(9q6^MzWW|EkoBp(eE9e&v*Dy&f*qeCY+2gQ-#y(KZSz0 zQg|F%X`JTLs%RwvD`_o4Y4kzz1^n=^LIm@8}l73ux#ZVXz=J zqguGRVM3c%0B4SgP3b;P28r~)r0nBfk&yBb_1;IdyYVANcuFPl7*zb%VZ3u!n|+Z) z6akYj1$R&j_}H>u#KLp1iiH_+oriO@vpO{l zAEzHT`Qw;hJ0}D9$0=I6M>_y0FVc^lNcgY9#|PeGq^km?)$jjR*8Z>f16ePf_hCl! SN6~-6J_bNtPpwYHChUL1uJSYh literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/SmallTile.scale-200.png b/win/win32/vs2017/Images/SmallTile.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..5e5e0ece89a0ecee0497cc07ed902f09c0712668 GIT binary patch literal 8762 zcmd5?Ra+c9ur3sr;Y7K}J&3GyBL7JzaCI<*IW3c;Blu%OSrYBTJzeIU^VsRg)t4y=@^P z&zVO|;h7L4m$TxzFAskBZe65mUtix=L1fp(n~{G=ywUGn>C9#>4Cb_6^ve#;TgGQs zCU?JfHg%qSbJtp}IM(wxX}J-HujuOP{`z?M(+`oDk{}gGT>B-`Yy;!}+rWr^f{~MK z{aV2jYun)7cbN$aFrruCOiOlrpcf7M<@kWK)DzujV>_vsBjPb2@pAW{EdKRia`pZA zx*WInK3?J(7=}abKLvMpcfUPsn*4Y35dX_hT^(Qi=~6@Va!Pv8ZKb0_bj4%c&)U|u zC&yzgGAb(S+J3&)?p*o5rAc6$n>;RCpo=cRhAxli=|5?FCj3a!>4=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cp4>?MPtRT0(3NXS75*R{LAidwKLjV|R-55#L4q1EbeQHeh>ubpe-$bix9-_Smu3P>GY-RLSrp0vs+<9Q? zD6QG>I3*G9ohYL9WLtAh=!vC3_#UR<5lC4!;Jz;BsTy0@b-~Cp*)KB%7@!}^owj8? zQwYPHS63d*-m;6cN5p?Jx*?^?`F7q5;YlM1W5|VnRkdF$@YOCDbdWTSgmtOsO=2K- zckVa*%>h*-Nv1(v+zBAIV?j!vaGV#o1icakwtpzYO~z7|*cl!7Yt|vT+7Ar>54K=N z^R`>~KH`aSydunAw(YnDXR;LnMZG-Fn1Q_6a!yW&Yw3>NVF4O(+Xm?l5$ zuH~9&N@7>#5)*nd{HGE_L-?``O-o(o>^W4D#H7lcyo-R5O%5Vd-s=YoSq0Jpr9S?p zRZ&U*Xa7I6+v`;B*Nxt$@!9sx>F!dAO}w*@_-XLjSfA$V#S9u#CzG;%5U<#wpLHE1IE9D^^s#|~7VYt`o1tK4W= ytI%}WyxF?GOF`xd?1+QWqbdf=IUUFTvv;lKT>N^LW)1Ls69!LLKbLh*2~7YES;Oc6 literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/SplashScreen.scale-100.png b/win/win32/vs2017/Images/SplashScreen.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..d4bab84e32b17334b102036f37247f6cb1a268c6 GIT binary patch literal 14643 zcmeIZ={K9*8#WwT9VptnhN7(wziLYbHMLb#Ro$gpQ>a7?HH(-dEs_*fZBcF2JX5on zlaL^WmYQowj4@PAL86o(!W;Lq*82~Yh73N-q*R$^Ei*=*zb&==nL{o z@&f<>!AJi-Fa-d3Jpcfn8^?}tub{6m2f1Izz5liH0|10t4n90>UImT-z^&Ow4|L35 zq^{78e@S&pWB$Ql>ycL-C#@AHA?#e40@YI#02j2lQ7DTbQxsm^+=BqFasTg(m`fTW9*Wwap!fUqrExKs z-I*5ONdaI@qZWIlm$9B&S_%xBOL8eOm$ka|X}FB7uA(xGB}}*@$9>wQUUpY1p#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8qvKog$9@V@o&N%s)3 zJw%(=GQHAeP;Yd=p_BG!HbUBSg>iSE5V-Axk&d1T`W~*%*MX(qqYrk)c;P^b6+ zrqF#z#yj4If|vbpy1=rpecs1a+9zyns+ZAHz|ez>@B*y+p?C4DVQG_SQ~AlP3fR#& z=UgH=W^Sk`9D6l6u84^x>%g(h^lo#I6?FKDbq>RnMJgbj0qnGpg#brz9$Z`cVza&} z;(_*-PL(`lH`!tPy4iB_)r@LS7D-Zkp;ac9N*kC7qlEGa?0Wnx7+Z~gquTc^LawZ? zp9x#3a@};rWLw;&=ujLFg_$qu{j+`t6A-VJrJrhUm}9V^$??5s=>H2t6)vBrJf@)d)WWZ8uFs`- zZAShU5=R~7!wX8OeSrvy4&PDv)EMfX&+nnhNM#Wl1HNTN>>y@Kw>HXFTE{#EJa78t zjcm`e8}T&M?%(qIbFZ{5xdKC&d;6?MkiPy;CvjlG*wX#vBVDlZ`0%QmxMf&^2En(F z){)KNzeUd;1h6}(ghNWsU5V(JrE`=G3Hfu`5?L*$hX0ll%h2=*laLphIae|Ww6wIK z?yW(VC&h z;D5qb>=Oz)G_Pm6X{z+$M#<|v8lB&%IY0d_4A#Hwlqb|NY8drCGY>JC@Iv*qC<9^) zJ(?bLEisLopc~5T(|x$fEJ2{fvLPZ~sLuza_+p4OF}we!e|9fj-k}ZL%-84!Y}_OU zeLWJW2spzX$H^1syPUek0WA4;3jZ~*hh1vLgWM}B#TVFk4TZdJLh}b_TsN*0foP9BocACkb4N@vD%XO28HOO z>NTp)vl_s4=KNGZK+j*p0o|Nk2PJb&jdx0}+!&;PoxMHL^YNGrTF$A49F zEH8r}CfU2$roGp9^fVtXq{E~>Z9(Ji+K>hg` Z>R^!jn0b_!dw3A=Nbkvm())Iy{|_q5xe)*W literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/SplashScreen.scale-125.png b/win/win32/vs2017/Images/SplashScreen.scale-125.png new file mode 100644 index 0000000000000000000000000000000000000000..d97a15fc2e2fb91321c9d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(o@f`XfXTT#u73z2Wan{Oy2&#W!Au9g<~~)cI{pA`=t7pJp${$ zbUXgCwfpz6zd9SZ+utlJG@%D*DQLmxF~{y!TVQuAxK?s~hO}AEj91>k#p98nImwl6 zz|$vWg#NteVK4<|#}7fb4~5Nm)qP;eZQHBj3=I0_U`46mb6|Wx%jJLo*dqsm(bHW< i17h^NAL0)_`p+-kXdHS}ZpI%_?(uZ>b6Mw<&;$U1dI!w_ literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/SplashScreen.scale-150.png b/win/win32/vs2017/Images/SplashScreen.scale-150.png new file mode 100644 index 0000000000000000000000000000000000000000..2ce132a50d0a1597316ec6bc42fc8d7299d861d9 GIT binary patch literal 21466 zcmeFY=T}o*yFDBWq9B4wQIO*8Ehtr`Nf&7rq=q8BNDZO)&;$YLDpI5hNDB~ZLJbH= zQEDg&5CS670tqz)h`?{-^PDr@|KR;{J}`DhM#g6CwXZejRpyM*(b8aI;A8-SKuk}c zsOo`0XYxUyQyu5e0pC!Py?21i1@|W}y+EK#ohN^%dfZB0fk684PgRw{{#k2;3mIwxTfXQyx(FtVFqgCU+|M_jGPgmyWr65DFMbnVTI_&zq;7By z-rloFeRI40-Ps$i{#Wna?><`@OEs{t<1$@+l7V&zY@!8+7*KY=xE*2Vp^x3W)MWjB zZ=Z2}1A?N%*66nUad8*0G!W>CZr}UXQzxIk_Ax56o_u&G7=GvE%4cv^_vHEreja!x z5GV|MS@rKPOaFO$`s52eH5R&)>z7!*lMMhpVf()u{NEn@UmX13S@{124>$ulpm9k% zFMi&h`;1SN8<9Q*GByUFD@@(6sbclX>{*K|TN(!dFf%d(I5pfm0RUgitBu(!Age3? zAH;hE7j0g9u)4BRiViv2Um_JN9XdJVl;-2b*LFs=mDaWo4h~!#9eZmg*Rp1`^K`1{ zd4q;|LjP>aK>cKwvb++xea3X96ct??%?1x>G*VjIA3J9pJtz#=lqcgxty?L4X9Mu{ zZrYM>Teq{<>zG6LI-`SU$b@FnCx@Kspb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%^=$ec#v>{$OlyhW z-u}sLLhzSBZvKiQ8 zNSuQWt*@gPP0yF#nuYsik*+RA;)fN~x@0>*mppOOHL@ZxXs2hi-uty=?`e7r?6SVJ z@8N@xyWe}e+H`kV`Dfy0Uq$uuf>=9mqgtXitz5NXYQ^VQVO1hPS9%!@%+9Fbgqh97 zT9O97-4?JDQA1b>xc%VT3$z0J89%XOB9L3`tOm{}rPx(m5(@sha{C+NnqvjOFP?){tT+pLGcc0vZc(DJd7p z_>E!E%?#Bo6nU!0+YZV`>n%L0vzTg{Ctf}P0pX$l9zfvd z+e@E&o|2N1wF-5ZB%eznVM3=I%uQ7m8<0ljm80;B%~Scc_!fC3Uz zniug)q`^G^;gx^a2;fNf&StF1F1zSz!r^e{dLz*En*md=R%!QP2rm$%9OZ%bnuFBW zAnVH_bRu|UM<3W(EB&L712(8X{Nq-8z+K2`Xa6w73ha7NtNZcDg{b_)l|Oa&Z2?Y{ zim700HodThJ_v!_Klgt?69CudpGd{OxBtEkF!H~_R{sXWzrpZtF#JC`3)_O;>)}hW Tsn!YLC;R=ng;CYD+mHSS4-Q$a literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/SplashScreen.scale-400.png b/win/win32/vs2017/Images/SplashScreen.scale-400.png new file mode 100644 index 0000000000000000000000000000000000000000..05424b3077064fd853c132d5a36c6e7fe9f86cb7 GIT binary patch literal 51259 zcmeFZc{G&o|35CJ(kN|4Wl2S3FOgj(TZOWZUA8dDZZK#;5kklwk!6fw?8^+1J$qw} z!Ps{*G4?Thr{wki<9p8M{LXoQ&iDNOc+EN8_ucK9>%Ok%Jg(>Rcs{TD-4hL!lP4~n zprfNZsiyisi;j-5kdE$1;qjxiJ6xr^EwmHk3ssOC9o?yh-~SFZJLg!@(FM|}J-Dai zoxC_$^w7$dE_lq0%VBNNix61{HGp0WSo63sn!a838i;cVfdga3Uv{qOZ}S^O)9eMI~# zhkxbpF9!a_z`q#y7X$xd;9m^J5MiDC~HP?^npR^xtza$G(qM=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iYFMsK3S@c!2I{X2}QJsiua22g~jsh#1NFqi~|NffL3ds@)B93}s@I6U00B z-+!|&N8V0$2n&dXg@yAYKUt^P(&W{@`cB85%=p)#IxvB#gJ0H%dTZMo>fsZr~m zE1c>EThMi~B0ivLem=keWPv-PP~1h^Bo8|E=IYzYa*)qTby2Bs&3RG)y#i+jW;Sm;?wD&pqf z;4F#X^cQ4{=e)BmmHY*W1ApbTO1LE962yT&InPK$Ln0ay(EuFyJ6s&GGD(cF#LT>7 za7ipb5`XD0LU0l;K^%~n8Ht(se>5{2)y_upkbozSLp%M)3EWNn4=7XedcYnDb0m@@))I+Y eiP`X9jl%ZdIIWM${doS+w6DypOiNF@-TF5Ke^mVd literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Square150x150Logo.scale-100.png b/win/win32/vs2017/Images/Square150x150Logo.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..778506203297e0a81473f326838f63f2969dc242 GIT binary patch literal 6073 zcmdT|^-~*Ku%;JiAwVb^9E!V?qCr|*ixzh$xVw9T6n7{=1I3*}aJZCWK?@WwP#`!h zMIU$O{Soi|uxDrX%+8tl_I$guUxMa)MFId700RSqKv_vn`^jhhXE@KFPKjq8TTc$x zUCGc30|PktpFJCOtFpns068hkz0>tCKo{bge6YP44FmE1`KQT^6A&NCzzKyqL0Q?C z%MiA0j)t>V;t<}SZ>(YJZE7K?mats|JN0pC^>HB(xAv-hDrq#Si6+ta#c}N2fMl~5 zv@N-hVQYzl7x%%FduGQy1ztPBAw_#3Q@6-PoOhbxXL`lqpETsS-{CT5eZnGA)r^d1 zVShJ7oWWp)tMalDizVJ5lKB7d^(C|3bC;s_8|H^%QWUvojmB1QM9~oBeZEta+Z(rJ zkL?l5i`@xP-=igUzpay#l%V6zy}U&L9-fx2E>=)b5PGkxOPm7#xy$xqo6AaUcXxOG zu?Ro^OU&o^eK%K!TAG^fr75{?UFizZMMF)i`$-!c7Tp(<;2ep7b3W)iLWd3Ad}T@W zT2OFvW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W-hSBKd+Uk{rBTo)! |NYh~_gIOt$jPoC*_3O(%q)Zwk*E;bc zq(UrnbITHjJ*H@X8x)&|6Q1*K3J`l?2muT>5)<)VJ};!PsJ4XM{QYbBHG{*bYztXu zrW<9eBPnci?QRgD&LhsMs8B>Oap>m4uxZ#AyDKlO=gqPZjZ0FO3LTTqjfqar&GGjq zEV>?K=Dz4%6}QIyD|4Q4R|xilnEu19sP^qGPk9p66$OySpQhp<)4qUp;cFtDnQcltq4b?5>}~M)UP+wQOs%okn@Vqyc;+`jw+@FkJ{P|g@KikR;=o0@ z2|~=+_4a}3nIA1Rv|19if5x2j#(@gc=ZCS)ZERnKV-c1ub9HIZyHL7ImT)yXBck=g z&MK8!iXhqgsN{`rNR#f~8OnNn+fA=UMhQuGetNT&a?bt_# zHhynudBdab0ohWdHo-h&HV8_`t!tUc6FRJL8u0?)GdfCe@Mws8VkvO0Rcdj03d>iM zw-nENyRsqHww1ADSO`LJZwGM~s_X|Vnw(&~49wfGhNxeECCT}Hcfuw=KE+(|C` z2jLb8rh1IQp3A2ld>$Ii+wF3C?RzY=Cj{z9Z!VGdIvlj#t(8cK6y{S2a|sUKP`>5Y z-ZWEbDufRpp`phbw+PgC7dq2~4?*Rvf7q(^zq0pqtoqR(E2+u7AMjPHgi#9y(ujK> zRjCi|DSwvW*t&_gjk+!M-vlDtN8O#$4;jo-zyG$y6p8#ZR`>~2#j0BAaEXzi^VNFI z(fDnx#&MeeKB6-G+P{N|HgA#^4L5#W_F|oQ{XY7>oK2EQB?Pb@Nt#WbAl=zxDnK!| zV>SO3CM*=Jv;h|;#VlqT1V@QUO463-IHr5dDR3WG

z!|tQoplAR(>zmsPr0s>9_VqZuBh9`tw`s5-!fZO-V89LM|DRO+zbbZg7)Df?9f5+k T?C6sgkD)C8Uan5YBJzI#jQpPA literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Square150x150Logo.scale-125.png b/win/win32/vs2017/Images/Square150x150Logo.scale-125.png new file mode 100644 index 0000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z;s0NSpYdTgHey2RhKWx`W7Nr$>0S2>hxm*&5@2diG&+S18eH*~uUDfsQ_V<4?LwO}|9AtLxkJ>ybU^SBa izlp8?KO=0n(&Vhsx-EZ#PmlwBDDS|k@>Q~?q5lKYv!6x) literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Square150x150Logo.scale-200.png b/win/win32/vs2017/Images/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..105037a997d28a9e4d1bc67eac1a239477ed8711 GIT binary patch literal 13515 zcmeI3Wm6no7p`#)f#AX2od6-YyTdTJBsjs{-QAtwFf$O`U4pv@cNi?V!{K?qpI>m! zhpw*LGu7R-yVt$fy4STMRh4Bh(1_4rU|=xhWF^&MU|?DPJ5Z3`M?8JwT;ETq4zfDV zFfbqc{ySg??aP0_z&Vd>?f9yFAwSmFT*?(|14 z?yX>QE!R8${Bv-QOKb8OmaOmE+lFrVH&|@;m)_Z4WPMXt*gyu-WVmbUPo6;{5(+ zsNQOpCR0)V?e!&o*>m_JJZL`J(%ydZ_xVQGTSjh^z(KDtu-&*sz2ey-Q<1Lgtr?9)csyPhKkeNJtRk~Nh1_YzL& za~#C|NYhqIm9iB-Jl-7BT1&z$NzLvw->`b@%2QQm6f&D`9K+m1*k!Wf>m`Csi(Gdh6pY$ z-u<-$BWeD8e?j-f5o;xA(>0vmc|T(XTG`OtAm@dN3lSDIFfeGkJyu>tH{C%jEBfa$ zkZ7uVPjbP|LfX{#2>lov8@r$6wOCu`_yrpY7Xr6mnr&Abz}I}*xbkDI)m6qdZ@Nfk z6w~h?yk0mM;cj@aWP8zL<7wT!-x-6DL)3gC$LiQ&SrCi3Im&Qq6W?oksoEqM7f;IH z8Y}HgSE)KpS@1%#ZDV`ebh+kx`17Lwi}vf^{KvVnvD3bWu#co(5u2{*jyr#blV}xe zeV=YmA8ZnOgM+lXSqxe=!!XJ1jz!)cCgXLhIn?pvO?;0Oj7HD_&qQkl?d_{+aov>? zkTK*nN)E$n3b=K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>eRzU?FVRB2fe^-by1p!2C9 zSmSSRuv$)eNI7T@y2dNNJdx3Jdl+BST^5^8r_=k4uwkv+?8WQx0LwZ^v+#<1lt(t? z7-=AOGX$~4XP8bdkx5rU-?Bq=Q|r0Sc;Qm~*-qgKkP(kBzg;C+jhIZQ>n;LY%%e+= zRv!Z9BP!@9sUNfsyx5ZQIlUB$dVBP|nL=vJ{&!2u5pQU_@N*v8A*H4t>lFHAS47*N zZZmB5zNow9M{%>C9cq=r(qWq``L?P_u;7X>n_|$@<^?@mCkBu5JTs__7BT=D(s7~% z_i7AH4Rb>_e|+`YLD4z(3ew;LLc3GptUB9SIHN&1~HPNC# z&KX0r_`$y|N;hU~9742b4=Q06POdwzB2ehBx1F5E2}b(o#iEb#th31o-^9wyL%;=} z`v#Gt<4|}eb^_8?vUpDP4>`#YUeJpl0jyTVx3Gi#9b&&b7mZ0gFQi=E1KWwt-S=P_;tk3v@NxUJEc#(jRqVJDc+&`)ThJGU(sIQBdK zVy5x(2wRx`r3aMt{^sN__-EgNqY)M8`{GImI~#$8EfH=tv3+U3lS8zL(SgPhTYwhL z(yLz0!sTHR$-RHhI)7DmwCh%+9eLcfr5xu4a5E*N!vWI&)tL=P?`XFIekLWOm~Ca_ zU+QK57#si5RQ}`U{67_vZpGrl0MDw3h;|PH{x9RSldejDa8;MEL*&^{M@8DL0Pm`2 s!Y&bQsWT#RNC3g>+qqxlfAh$$!Rn}`4}!?)?XS6JZhg7_l54_$09jEqhX4Qo literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-16.png b/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-16.png new file mode 100644 index 0000000000000000000000000000000000000000..c37bb5650f3ed93663ed7dff97ccefdd2b971ac7 GIT binary patch literal 954 zcmV;r14aCaP)pIY)M2xRCt_alWR=dWfaDL(to=`TA)~IgIOFEvx^K=iVj(D7ZNZF z21H_w@snhLnhQgLyyVRm*_TUAv>OG^t@tCjB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q806DJN0^ooxc^Upr}tl~7noR}={j;)NF$!qs&V3Xac%t0NuL$pt?V<3=W{$CzQ~6Z3(wu?q9sSuV)Vf-MPL z1ujxLB=qWq7}iE98#bT|@24?RIn&a5UQ3rQp3sm!BY1uL!L_SGiz?yvPFT{(@)PuTH53658Mz<@wd4Y{>w6XO;!N2%c4q=tS_mc^^3Tl5P1scoy-h_1xzm>2nr%2ZYXlAJ0 z#ECe)dNs~|@BzLbnTkujFXO1+1&p?M!N1CYA~xjeLEg>gSK-u=<+ALWi6)x}H`xTQ zXJ(Z>P0@Z!B=brqRzZdQM4?}!({ACn-?4PrPQ{#K)XF2w&k%;{0pc|XH4E@2&0?B4 z6IGIJv-Y7AKNw5LnL2l-QlkibJZZw)osrqXNtvAf)Q-+4C!1=txm}AWPApsK5(xvi z&J;5KJ0sOdhTExx_I>x>3uD)=&=F2UIj>`Lj zY-g*f{dQfFEu4fQv5bUT^-#MdI(YD)k`IOr8-`BgqazckgbPPnqKR;tKYu6bMO-35$1b%c?D%CZU|*j&GUz18$8ssCI+j!1=Zfk;a*_`4)?Pn$LklO|14 z!n)K$q7d;rIRqD^G!Q;x2qRk`(A{i$mBcCnA34&IGu}Uf!QUlOjG#gCgd{ZKOFbMH zK|}z#FPj6+N>u)_ha3_b|ElT#FG!AOW!wQ>`5zn-6K}h_{C@xd002ovPDHLkV1mmp B9WMX? literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Square44x44Logo.scale-100.png b/win/win32/vs2017/Images/Square44x44Logo.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..b0b2e6cfd97634d942876a2b4d407d09c96a32d3 GIT binary patch literal 2891 zcmV-R3$*l!P)pP{YgYYRCt{2SO-v5R~r6!JV3gD6pe@ldo*NI5HJyUq7pQgNGynw zn4m(8f}uDnf)b6%l3>@J)rrw0tj0-9V#5}7E!nlA2;xJeDn+HY_u#SLe^(sG5#n>= z>}Dtb%$@t*z4x5+{oncPQR8i;$XL*);^Ph0)~{IsP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Hhk}iz_otvIh^|bdqj}2 zmXfi?Ts#9^cp984)L8ItHujUsi&(OVpNLlFr(8QNUAl}uGKyisPU%RmAgw3ezKt@P zlMRVNfQgTZ)*h^^WuD543Y7D(ZiR=#&CwAq%jheZxS^rKGJ&^!9D07<=xT2PU1~N1cM{UL;aWO)!}j)(BS&CmWrerjej9@a4^y7KM2!WIG_FhY zhgw<9gOZyZNd_JSrX_0{GDDdg7YDf`vZiYsp+=jLd`kI#KC6X_MojXtz*W#lB`=o|fp2{$BnZ-I1XJ+k5nE~F(GBbtfavB@o`Tu>ZicKgSsaYf>n%qJPi`|rQ6#5ifIn=^(=4r{}J zzH|3(?AW!d$>0nmftCM4XlQm)8Ox2UB(;(;{MsVqv}MZ{I8Z|ZP7X*kf8f9Yg{UIP zuwpf`zh9cCF>u)&RdSLtp0>yxc_UKzOCL4{?vek%@+`>z^}k0w)ABpGXH|X&_pHjl Y0k#Ohn$)@vU;qFB07*qoM6N<$g49%|EC2ui literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Square44x44Logo.scale-150.png b/win/win32/vs2017/Images/Square44x44Logo.scale-150.png new file mode 100644 index 0000000000000000000000000000000000000000..d8291fea8398bfec4cc1f4b0a73da4fdc38ad4be GIT binary patch literal 5410 zcmV+-72WEIP)pZ)Ja4^RCt{2TM1Z{<=Vby7-kUJ#SH~SK@e9|+yzV!wBwd(Rwpgn z%ry7yc(O&yI+a&0^=BT(hsD6;Pi1N`^%$!8-6aZ>7>>%Vxe z>$_%{`R4uJ_kN$}e(vXeUv#K7#dQDa4*a)REf5t}3q*z00#RYLKvY;Q5EWJnM1@%b zL;^48Ke{7-ux0V`uI>g)fN03ezRE8eHpIx0Be7%04#dU9RojT0n;V7?AAWD|va*n! zoee81E9LL<@^WZ28s(DDcJJPew6wHp+x779Ku}N+wr<^u%*@RD-Daq^5m*L<@qS-; zd3oW}Pd~-@@#7x|M4L8klzYuhI-Z!A2y1KWdp_4{wXm_V!Idjl9tcE0Kmb1c@I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*i4!N{2x|=0q+QwQ6;G6F_m(Y)WFa zOO;Tr5g;V~mW>_TnbI*mMW5c{ zp>u2RUbwJNCObQPPd(wz3GpCz1a|MP9BZ`1e%F?t>`uFJrnfTo=3hLE0%U5ECa(zx(-k>V@%qJ$LLFatWX;wvk3 zIkQ!riT9l&?<7%yvgknIh!M!7S1pK)L^%69jN#RQX;&t(#(+Qt5YDq_Ba!YNK4=hL znK}h6Mg$|#_87wIltYtMh?6HyDBK_GY#LcH9oqAnK7D$% zXEr4yJUK{bhUqvKTso5FBxacz^n^xiX9N3og?uHRDB)G38$2onc4hn~N{%K$8Hr7S z)`Sv|QUug(2*$f2+lPUX)*uq&31|{l--tvMnyLGJL4^%?q>J&(|DX(|3=gv zOlD_-pBRZ&tO{jYP&R#J5w@~Ns3v+qHfp6dP&&XkmpGOad+OoT`PBjFUtg5a{bZnDa~2B813offUa~GA z3pA3uBN?Z{?)Nh}*Ce%pnDCG6Q_A+gya$#+rVt&SL`$k zAW5mB{Ra*lXz>BhM=|j@sVO#X+N4yU@=Wz;vt%rJpI#xXEHz7jxLZyNqnoc!$_&W~ zSc!8{bbkg2s>!ot1>K%isiabslf*luKT>#^nZC+K%*+xX M07*qoM6N<$g5Q!yLjV8( literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Square44x44Logo.scale-200.png b/win/win32/vs2017/Images/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..aa5dce3202fd9e8ff129d1a1e6ac39c485694fe2 GIT binary patch literal 7723 zcmV+`9@OE9P)pi-AP12RCt{2TnTuT<+(jGlRadGKte(iLf8?JT?9o4vPeZl1l-Vi zZLQYby5F|yBWhLDDtg7LD56-c3s3}QD+&Ta5CmnBB|sKP$i8PXbI^Pcxxejl`&SIy@?{Q&>ptrcJ|TPwg`wpM_>Y^?x$*;)bivb6&2 zWorf4%hn38m#r0GFPoq`qpGT^$;Vpv^zre5%jGi9+XVA(^2Omfz?DroXwIBD7&mSl?z-zP zeE8v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k% z6B6(qy?H+!W+W>(koWK*2dkudb~#1MErO}NQ5kEN5ecu%nq|hkUZodJK0gJEumbxs z(=nLbc}|HFA@r1;nyXH8kV7WpSx9C9A`mIsxrkL(2 z>QOo@`4z(JUd8KZ-9{z>?#+ODPf7~@$zXZY9e30$&*eSBSk@V+k%!H(pOt9%DaF;q z4^4n3Cu)swxL(CYAQEd|XrYc4X;2kVg%jAy^P6HifAi+eb^8KVywC>vt0v&3Oxrtn_#U=~)+~UnZpVfR#5-C=U(e);3PSQ+ z6-pg1(y2`~se)6zJjoMN0;28u>#sL&yb=%Be|M0iqxwlSp=C2uWPz^NET|%tTKoEY z^hU)xYnBe)!OTaRRdTAa=3Yg8s;Ny1D*9bbQX19UBe+d5X?V2)^+6~dw$z6djP<@v zX?5)@V=QM`j?^YGEfVCEr&|(AZwG1YB}ZxWJjoh0KlN42ojcdO_2idel7ZTk{;I>N ze$pd;7r1)6pe&RWp;oAOzBSi=76+>dH|D|mUNtU&#h2pYUz#aE>N)ENN=u06<{x0 lE5Kg1R)D>1tpI!3{uc}&HCoe{4Qv1a002ovPDHLkV1k}}3*Z0% literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Square44x44Logo.scale-400.png b/win/win32/vs2017/Images/Square44x44Logo.scale-400.png new file mode 100644 index 0000000000000000000000000000000000000000..ec0fa86b75f84b710cc85785cea840a602011de1 GIT binary patch literal 15306 zcmcJWRaYHNw}oM|*|@vAI|K;s4#C~sU4y#>cXxMpx1hn@3GVIz4(~X>;k)SSzUuB# zwW`KiYd$kV;fDkQEG{e<7#M<-q^Q!@z3#sY8uT^Rw(jeF-C!IfHJ!o05C{Lez(?%M zOu)c+yro2iR6MdSd|;CBhm$WVPb*I4s(rR+dx*&ep#$J0tJtp1;|^Xz?Y+otqTxT% zAYMb`qmPIN>sLYNLAGXnc%9KVoS{Jo9GS?OEX2WTKuKZj3niJ;?#j-VPdk&Ys?qb) z;tuN*n_I%-ibhsCR@S}4NGzr;FBDQDe%>gB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~{SccV*T=CK>USx2j+41(;>7wATWr!C2f1mj9+lycv55RUb~o z%9mM}91M9sdMtf!@qPDfMrtmMJ7dO*>a)|mX+O#-gk$Qeo9GR*gVNWWCnrw;LqgER zxl7-lsswxa(zy+a1&szDmqz1g48d}->B%_c4H)&|#@-&+?dMy29;$gag+{0|5I2%} z5h+a^mg1+*3a#TjI%`^l%u9NWDBtM563quXe?5wNqxA7{RimS6z;%_=?lQO_;E3$H zsq$-ScG;{#tK31sP$a(eiFY#ms60=mJDLYp?4-~s!lzw!U&l+ktl0$_4?69MB*~5@ zPaP7GAU})_@9?OEy~tKuoIGG~qUNb)dcQDkH1kcDABLAJ*7WT<|Notzx&PTe|F=W* bCz8GnYO(&{9Ql_y7fed*hiHwkLE!%Z+P)EE literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Square44x44Logo.targetsize-16.png b/win/win32/vs2017/Images/Square44x44Logo.targetsize-16.png new file mode 100644 index 0000000000000000000000000000000000000000..c2f20ed08c6208fff9e4efb7f9b5e51504e7640d GIT binary patch literal 667 zcmV;M0%ZM(P)pHO-V#SRCt`Nlif>`VHn1Ly?Y%xb&8tFTVS@t%`y6N7?K2n5tz^) zAbkjS(2;~73eiF2VIW9KQY0l3efUwCVIEWmR#G{Q9JY~emP5C-+}z%6_O3S%0+}A! z4bRE_-2Axi>v|rMZI<{y0nUPgf^3t?#Q69)O-)T0jYd2k51*%}x!2o^#bUwba^ds& z0_wbB1E8h3IbWNSl5xJi9=~^qL)P;3zI$$-+L{`US5}gt*Yj+6m}oSr?d$8?s32RC zVy44K@I*pJyvGO40KXeCH)dOCYWkytePcRZG~f=;I+H$PWd^{(*IDUzvE zNUUmD()gKi&Jm78I9pM{Zb?Gf%!4Z}Eto83;YQajwAy)g>a*|&F#@UwS)ztSYAQQa z6;B2SnOj&$2Kc>RWUrrPrv-ZDl4zgC2|ub)zW`XY|mGz2-0tSU;Z#i^~T zVsdDRpbFU%aJT0US^9Kjw}ax+B3^y6u^3V~W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&@!?=C4en0TpGzXYvYEXf+b|^f5$|W_(kDeMjE%)p z2J2}l(M3_wY0=SGtyZ1?Ukh;T*fBP2*r3bxOW#|@>ZoM?U@fB8)K5xC2%j!-P<3OF z?<_UoF8e?e=kKmx&(57Y`Si2TICt(GM~@!Wm3R_>(u~~PT-|w}Xo^E7bK9F)74b#r|Dc zypsGfL53k}%PVPv(H6nx;E?k)8Tv?e+^ABW$y_TMi zNdi9o`R6pt`gA#+Xcbngp}e$|^ps@M<>3}V-?wicIXO9#oTz24&exfm9kmnQ+_sIj zwl-3pd4__sXQ^&zFlZtT_LZwwJLkxPa7s$O!l1AI9r=Ik?RVbcLQ&Dg7SpJ$t))xs Y--SKOHPn}#zyJUM07*qoM6N<$f{TG;y#N3J literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Square44x44Logo.targetsize-256.png b/win/win32/vs2017/Images/Square44x44Logo.targetsize-256.png new file mode 100644 index 0000000000000000000000000000000000000000..d7793c819280cd026d8d0643006054c6f6f5496f GIT binary patch literal 13141 zcmd6O_ghn2)aFTmgx;%^0MZns2+~Vv0@78Qbde^ZH|ar;B2ok?O2+f*{hR zcM$0%6bU6jCfJd zAb=D?xLEm=I1w&nUfLGE06^XG_XXpg|!Jmd9gAyf?k*q0U%Ro52LseuaRudWYvMCR=jb?k2QY$miq%y^3ez!v9 zQhRo*e3!SpeB!acv3|8>Yg_b(NfA@CK(mi!XXCbmLX6MHiyAf|gzK0p2~utNVF_R) z^nj8HAlFPN1j7qmB<=%3j5lJ)foDbEj6elOb*$F`#^=oH{||32i2_a{{!Cl=UuAsG zw1~99*Z+Wwssf>El{+RfYK7*YvvLnOCo$S(jLJyJG&=qGLY@?OrdG}SPi!wt$&m)d z4$7A&4kJ4OlHJ84rE-djbr^r-=z#fR@W9~Uj>2Y(=wfJhclYNn`IeTJO(8}N0XBjU zt^pnkZSFRxaQA?~K*??zYU;iyC{5qx<>m7S8P5p6))QbjTa20$5ev)eTB`gHUZHRq+g8GvMe z<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iE8q z`~?^KEm2orzTZwq_oJkG#TE(FQH8UWPLZPM*3-Xu@`$f3=ONj)HxRHvqb6eh#)rp3 zO*VmRK7@mAF|ws4V&RS70M=xEdmXS1eR)lo;L-KAi|f^T|9X__sU~v^6rnLlUeSiH z%V9_+BY=^N@_Wd4y8=ZnRjpb%R-PA#2&!#UO z2`GewK7sOlq3US!^l(yU{&$3bV&AnmWFNLAY z(t7P4`H@ul#no@wccb{gFQO+;u>NZ4|A>m|`B3;QMN+hE;u9%`f+Qj&Hz_6x{Y(f- znB^N{W%t!WXd25dERvaI2 zjmJT|bEJP*N-$1AN0|tzfEBYfwdPANFOF#asS|8!f5hCRkB$O2XkxqX{uX^tY}8;7 zfdfofZp`RC(|MTzJqkbQ5j>T}M@7mNXO7*LTk_W7d;g`#n4l9V5>|a4ef62&uU|6? z(b9PTN4@-nCF5m%X;;ZULsM|0aqyEnwN<^X6%9Bv!#EPkIXw5x$GE$m>P>otJH{7w-sjSZH)Vf$&5Lr*aNeOZ1o8 zMslu+i`h5RhJ?iOq5B-am-HU}=D@G(2PvV@jCjIugw$FSF~=YMKcCkTAmAQO=PfZ> z|Fgf@eF`0gg70ttwM_93vug|m8C7P@kbgU}UkO7|gBMZy^zU^GUD&Bj=aBNG$Oub+ uBF5+SMbv-2sUZDNApigUUp>0;Kuf|~Y=BQf7vX<0fR3ht#wRtqr~eCTv(w4| literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Square44x44Logo.targetsize-32.png b/win/win32/vs2017/Images/Square44x44Logo.targetsize-32.png new file mode 100644 index 0000000000000000000000000000000000000000..089f3635f3e29b45ef84d4ae9cb1e7f9f371b3a3 GIT binary patch literal 1823 zcmV+)2jKXLP)pL(Md!>RCt{2S7}UCR}}sjhFJjF22dyDsDTWiINq_}`U)zE?~+pspkjKCl`AhHZF%&<()eZ{7T zI%+E?_KV@_dDmF?>lGs_?M0UKY&*efQ*I(d$6~+2am@?eSQ6q1pxs85DJBO z@ZbUZ`ueyv{r&w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D%RskrW%N)QGaIYygbT$i97XF)0aIg}`mSWH@)JiV<#Yk(8JO z6H?;k=IajI<5{z2DfbQHoGYfq=*#|RP*Bi|t;tf8d*vCjrKtDp8EmB0Abrx=58dLl z7Q^1ji)}`^0qFAOJ{;`5$@$%UU|4iC+AvCWs3Z{_^uPP=J7vr9Ws~HVEk|)mOjbq| zr*x%WHn}%s|9+)7&f(0EP7qd1?0=GCM`hHsv_yr%H*QS79l&w&P$DUb=F5HsuCB0Tp1V7oWVa>JIV_{SJXw4 zv{kEC%7x_QWWZ$zmtIln1~Q9tAJ|BjZEb zTlD^oCAlmBul=9Y|C;?@|CjO)VSfVn*!G79@GoFGh3vJM7r6ic002ovPDHLkV1lkL BM-2b~ literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/StoreLogo.backup.png b/win/win32/vs2017/Images/StoreLogo.backup.png new file mode 100644 index 0000000000000000000000000000000000000000..a90d0b6cd1a41b47ff85af7ce5067aa4b03e8b51 GIT binary patch literal 1451 zcmV;c1yuTpP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1QSU_K~!i%-I+m- z(?AeK69i&8AaN9s*u{}xf#6P)ISe;|6-ddj0SUMXAXp-h!vE#|o^rd}=}scz%$F)< zJ5IY^S5?P}=iBXeb{ljj__J4+kn-dRtQ%mtT*94B>-CzB5S-xGu$Qo%r6n!Hb5M-q~r1X3S2<)UJ5=3 z;f{|&P$eLp{EU00j*Vr+D+R%0Ik=pvKx$Nykz=YDgn?XLU74*`t8f%c$9!(@4Lr`H z=c>|#+0{&QU)wS-`wT2TKBlUSDEu1?NKgsSfCbH_8W`QUef)aYOkm5+Hrq3QiG2CDa%2{Ufm?nFS^S;y>$ z70Up8(_>#g4t!D|Qr9QLpVLWM@Pr82$=$+~>PV&42GM4xzhtV}wfrgr0x<`xS!z?- z8-%ME#hLU?u99MmEtpoXumS}TQvl%?EmgBh#X3r9DR|!}jFH<~t?U@QS%8s0G#k`G zAj*nnw95>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ZX~I}Z2bMFQGdU%8U)q+FZeHnmmpyo7XSbN07*qoM6N<$f-J5kKL7v# literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/StoreLogo.scale-150.png b/win/win32/vs2017/Images/StoreLogo.scale-150.png new file mode 100644 index 0000000000000000000000000000000000000000..09163a1586dba653304b44a5ace89a5d0bb0bfc9 GIT binary patch literal 8680 zcmVP)002t}1^@s6I8J)%00009a7bBm000id z000id0mpBsWB>pmnn^@KRCt{2TnTuT)wzCWOC}p6Aq0{@fPjP@Bp@JSMG$+fqTnr- z&0Sl?rTDb9wt7)(>us+~y{)#^3Kni{wH4*I)uO1VMNl>YWeNKdLKd=bGn1LQ?|bI| z(@B_w1hn_|dG2}m$;`i;|D5-H%lm!joN)u#%Oef{Urtx5-2AT>kCgxImi!Zxc!A~b z?A@bBkH)?C-itsWfP3z_2PaRS?D88Qd+ae}XJ^N}cJSaqG&D58>2!8jhsWc=i4!OA z%rnn)`TZ#=DY)Z~JJ79LH$4CR^VqjPCnuw+sR`B9)#h4STEv`IRaKey3b4k;MpMrP7hKR%ubw@8_%IF}I1sZf0%z#Z zp$6#s`g$`c&CShS>3-M1if-6*&pl^8-+AYq`1#L&9`n9$eB&Efv}jSxYsZft$F5zw z(5qK3oOj-N=G?%61I^!K$Br2l@7}#Th7TWZ&TZYg)pSr2=J)%NnVE^7{`99U^$FCc zpMDxoJn=-#_f42E0gpfaxT!+}WlL;VN()$CuNQ8&+n}wH?Q{ivM$({{Ys6I&6BCWy zv8AZJ=QPTa9=k~G^o-gd35r%jeYT5zO_CX1pPp5n`fK+gK0e;GMIhJK)*7j@)w!dh zcG-AnaLhaGi%&lJBxcQ;g*V=K12^1oL#KdJdFY{s@ZIlz7wguo!_`+`Z5sCOyYHf3 zzkbG;wpaT0?Q0Bubi+UW^i$N-)Uwjq z-);c?-uJ$TNs}g-PTO^NrYv5(*x>PpKm5T+q)H1|85tQyB_#S?De@{h($mw;cQsJ< zL3MRh)bX~RmwIUQ1(Zf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/vs2017/Images/Wide310x150Logo.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..3a29f0911d4c9ee0031f69ca34a78757bf852806 GIT binary patch literal 6416 zcmd^^^;cAH)b>G;6e$To8U%-yknR{dzLYf5NJ|dgAl*oJNY~H<3^54O;1ENONOwxU zVoSE{P+b8?d8C~10Cj4X@!PH300Dl*73&dFOcb$cM9=T5nE%KmdC3-6bL0(S03k%tqeX>b`B0XEiK~QyuA2={r!E5MuRvt zGow}qGWRcExZBqn8h9>tXR%c>IHaYe`~OP(@#@c;(hciZ@S5NDV`5}{R^M|)HJnHn zG;O}W&{%T17|9>~{{8#)y*<$IzPh@)tG73-NH&U#%F)fu&F6H8A~`!7RAerC+#6EI z^+K?dEoa!Z4xOy5Z2aE%*w~oehf7a_{-h+L7MHbEoFPUiLvk2aY__O3*XY<- z{I*D)p0@T`?BuE^+yn>&@`N54^N)DY@$&NG5E3eCY7%)JA?$Obr|{HZdlvzI?e7RU z33Lb=^i6$-Dv305g*Jp13opDcuIYmA-I$105Qw-nVSNEbeQqpjVY^^9r^AD1&z{8r z_8kqA1!_ho%8~9@jl$yR_L6Re(l+(o2W#*oaJk{Qy`6)ry}3Zmj7NcpO$E}QYVeA; z?aN_oo#_ifcRK^|MO{5Ts^u*Qp+6a^sg^J9@02`s({f@7v?Dr{e0FcLhLaP9?L7qU z$^D*}GgKhm3GAnK8<#2)?KJcE7k2lC%$cIPyTvTU9L)@=0L(x4SUBo-5w9TzVp12EXmKAusV^<} zXt$DWZx5J2UE(WP0W9lK76d=!Lee@WpEq4^R$fK}wsc_WYuLYQwKfz>AsUzvA1}WB z(YOGX0VIypvk z+$JsUNCK>Epw|>I0vA&FI7a9bz=&|=-n`e5l{j`g;HI42|`fN!=tIg?TP4*oiGBE!q zYT2+=2D_R)d)Z-HV`L4~gZ3d|jf%9_Z<*2JshKnZ&FI6 zvq}(+WeozJGE0~Et@EWohr(SQ(meVa($LBL1(p91^^Fpc|MRaG8Y4E|2GGiueh)(K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1#=hmI@FsDGSAc?7@s2p7Acstge0;V}|Icy16OkbY`H%p`V6 zb$2}$(ow|DO+V2h!Iw7=1}E_VSofC`s!;Hk1rujYx%t9YRkcYsIib!((A<>l#s>zo zi(SHgRQ(Gs|Fws{gjCNnE~U1%5BwonD{o4d^-*S(_#Ktz zp*p^anLU@_Tl~GE&^$R$4h&n{zZ2k3`b@9G+2kZO@atJ7_Yxoun){25V^HG2prEl^ zt6NFW?JuU+1OjbVIN5ro5gjerUZ3u!!c8N#c1!cbY%!?{^QHq(&ZZ@Q*s;4JI+8b@w1PGg&Q#Kkpm(Vk5? z`=~SymS{q5?~hVJQTr!*%6O@H=xL*P>CEH&3=9mE`yz@WnvYr=LbX-g|s5ms9k9;~WZhvewX;@^7v2gEk za{VivAU9wE>QI6<`&tHdxF)dr+DmmMA$O}9HP=ZX~9GW#5oJq}Aft?QHXSTQ(`k5h=shv<9@BKOJmf|z7 zdMLS_{0Uw%y`+a~^;g7y&LLzwNtbQ<7L9fcURiK|F6H_SgqJg4*oh>vHvVYw$@L}? zt6iwdrKQ}P!2xLR^LZl7?LcdSZsn{c?mw?1&UjH^;W4=C9Wz45>Sn~III0pSru7O@ zm@?Ai<)Y{ARPExN4<7D9X5&5qqyKZ0OV0xU6m>&tMLB=*T|yZ literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Wide310x150Logo.scale-150.png b/win/win32/vs2017/Images/Wide310x150Logo.scale-150.png new file mode 100644 index 0000000000000000000000000000000000000000..8f35b96b8ea1f7a3e85a48a88be4eb4f9462b49b GIT binary patch literal 10932 zcmeHt^;4T&)Gb9@tWaDE1=>P!mtw_hKxql?!3hq5q6Lb3DNx*@xH|-w;ts)r2MJyh zAjp@#_x=(0&U`;aW}bP@>^Wzjwb$Njg@000At9tE#KOWNdG}WFGZxl^NzDKChxnN9 z@WJO)M}ddm^A$Pc+dIavH#r%GFDdBjdv%TkO$=C z@#>txzr(`9R0uW5$;o3Wb1~1DUMVUmDoTA0iwFzz%qO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;7cT8s!IncLqjgi!^r*8P!cqa0VM_O2gjpG_{)NhPG62W z)dOy20Hyfm?N3KK$`I*d~O#Z*me6?QkX0; zEbLW0Xmsa;u(?0@TRiM9v-jfHAlNS8^DyxL_xW9ThI>1Y)cxgSpg#LAX7~SL!6o`1 aJqgarvAf2H@(5a6F)8{8@bmA7Yy1o8Q^+3x literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/Images/Wide310x150Logo.scale-400.png b/win/win32/vs2017/Images/Wide310x150Logo.scale-400.png new file mode 100644 index 0000000000000000000000000000000000000000..cbffd4a6aba727708448cd5e4c2489912f6cfece GIT binary patch literal 24791 zcmeFZhgVZ+yEhzV1RF5ekgoD5DouJP7K9lnSnaoG{ZkBA3Ou0R1ZlU93NkB;R6oOkN*NaczOTD zbHRh-^%fH{2|rnWXCLD}rt?6=0ObUTm2cKfS$OOSF?s$p{}2Ml@o{pyfspnJ2sCSUK@{?o6hbnUX-moHyFf*%8c8I3{J%?gB9 zI|qx=>Hv_ST2Cfe#O7TNsdH~ie`l-X!eCO8sp#+vmsL=qv8Kr= zN>WP9#H^LT>4eB$_BS_~9n!VtDe;OfbUhSZ8JUY0IrS3S~1Jw(<(+Y};DN~3~p5{`P{N`;Jm_}Wt)bupN8RPVL zPpz*f2aWqEX(x%sd;58xP7UuG^!i-SJWn^2x_9XL(82Zn9~d<647FdyvIOQ)KGD1q z^u{OGBZ2ne)G(~%p9#<(Q{vFFqGeTr4l5h7NLw6NRF_c7^CSKOg5EnQ8}GwdfrUH2 zi4LBAF-P*x-dO{38)*kDFn%bn6hF)LSV%TqPl-&LL#NV;b_h zlbR5=JyN*eb>HksW{8A-8iS{uaeFPz$1Bo|GY7JO`?;d1_R;ZwY)dXgaMgDFsQ@=lex5r^M= zv?>pdDGeaKMScn3c}n_gTBU0Bf2bRlyUqVZ?0rhk*$m=Zn1HQq>}0M^SkYfTppL$u z*O2h&>|xHPZaT%M0Nr>9r2p#Qh{G)GZ{&x%zmN_+*|+%5Ue0I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Zc(DJd7p z_>E!E%?#Bo6nU!0+YZV`>n%L0vzTg{Ctf}P0pX$l9zfvd z+e@E&o|2N1wF-5ZB%eznVM3=I%uQ7m8<0ljm80;B%~Scc_!fC3Uz zniug)q`^G^;gx^a2;fNf&StF1F1zSz!r^e{dLz*En*md=R%!QP2rm$%9OZ%bnuFBW zAnVH_bRu|UM<3W(EB&L712(8X{Nq-8z+K2`Xa6w73ha7NtNZcDg{b_)l|Oa&Z2?Y{ zim700HodThJ_v!_Klgt?69CudpGd{OxBtEkF!H~_R{sXWzrpZtF#JC`3)_O;>)}hW Tsn!YLC;R=ng;CYD+mHSS4-Q$a literal 0 HcmV?d00001 diff --git a/win/win32/vs2017/NetHack.sln b/win/win32/vs2017/NetHack.sln index 172bb7293..0d5df6b89 100644 --- a/win/win32/vs2017/NetHack.sln +++ b/win/win32/vs2017/NetHack.sln @@ -10,7 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetHackW", "NetHackW.vcxpro {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} = {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945} {642BC75D-ABAF-403E-8224-7C725FD4CB42} = {642BC75D-ABAF-403E-8224-7C725FD4CB42} - {6813477F-64B6-4B97-B230-438D0D233385} = {6813477F-64B6-4B97-B230-438D0D233385} {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC} = {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC} {8A3F81C7-2968-49A8-86BF-2669412AD7DE} = {8A3F81C7-2968-49A8-86BF-2669412AD7DE} EndProjectSection @@ -85,6 +84,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution NetHackProperties.props = NetHackProperties.props EndProjectSection EndProject +Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "NetHackPackage", "NetHackPackage.wapproj", "{6838EC9D-F25D-4779-9CD7-2EDB61E49429}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -205,6 +206,18 @@ Global {BAA70D0F-3EC7-4D10-91F0-974F1F49308B}.Release|Win32.Build.0 = Release|Win32 {BAA70D0F-3EC7-4D10-91F0-974F1F49308B}.Release|x64.ActiveCfg = Release|x64 {BAA70D0F-3EC7-4D10-91F0-974F1F49308B}.Release|x64.Build.0 = Release|x64 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Debug|Win32.ActiveCfg = Debug|Win32 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Debug|Win32.Build.0 = Debug|Win32 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Debug|Win32.Deploy.0 = Debug|Win32 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Debug|x64.ActiveCfg = Debug|x64 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Debug|x64.Build.0 = Debug|x64 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Debug|x64.Deploy.0 = Debug|x64 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Release|Win32.ActiveCfg = Release|Win32 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Release|Win32.Build.0 = Release|Win32 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Release|Win32.Deploy.0 = Release|Win32 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Release|x64.ActiveCfg = Release|x64 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Release|x64.Build.0 = Release|x64 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Release|x64.Deploy.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/win/win32/vs2017/NetHackPackage.appxmanifest b/win/win32/vs2017/NetHackPackage.appxmanifest new file mode 100644 index 000000000..da4928ca9 --- /dev/null +++ b/win/win32/vs2017/NetHackPackage.appxmanifest @@ -0,0 +1,29 @@ + + + + + NetHack 3.6 + NetHack DevTeam + Images\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win/win32/vs2017/NetHackPackage.wapproj b/win/win32/vs2017/NetHackPackage.wapproj new file mode 100644 index 000000000..daf3091c8 --- /dev/null +++ b/win/win32/vs2017/NetHackPackage.wapproj @@ -0,0 +1,145 @@ + + + + 15.0 + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\ + + + + + + $(BinDir) + + + 6838ec9d-f25d-4779-9cd7-2edb61e49429 + 10.0.17763.0 + 10.0.15063.0 + en-US + NetHackPackage_StoreKey.pfx + NetHackW.vcxproj + 19591BE8832D6EFED75019EACE7C4CA42ABC90D4 + False + True + x86 + 1 + OnApplicationRun + + + Always + + + Always + + + Always + + + Always + + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NetHackW\defaults.nh + + + NetHackW\Guidebook.txt + + + NetHackW\license + + + NetHackW\nhdat$(VERSION_MAJOR)$(VERSION_MINOR)$(PATCHLEVEL) + + + NetHackW\opthelp + + + NetHackW\symbols + + + NetHackW\sysconf + + + + + + + + + + \ No newline at end of file diff --git a/win/win32/vs2017/Package.StoreAssociation.xml b/win/win32/vs2017/Package.StoreAssociation.xml new file mode 100644 index 000000000..1200895f3 --- /dev/null +++ b/win/win32/vs2017/Package.StoreAssociation.xml @@ -0,0 +1,373 @@ + + + CN=8BDC628A-FAAA-4EBA-8B5B-EB61BA93BA1F + NetHack DevTeam + AAD + http://www.w3.org/2001/04/xmlenc#sha256 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 30485NetHackDevTeam.NetHack3.6 + + NetHack 3.6 + + + + 30485NetHackDevTeam.NetHackBeta + + + \ No newline at end of file diff --git a/win/win32/vs2017/ScreenShot.PNG b/win/win32/vs2017/ScreenShot.PNG new file mode 100644 index 0000000000000000000000000000000000000000..36d9f9876367dbfd352767340ed88c76cf71723f GIT binary patch literal 54099 zcma&Nd0diN`#E#`u`Cn{4e zgd5{7qA*#>n5mN+?xduoq=bqH2>dXc=b4$$_m3a1m&<)~?sLwyU)TFwcj6@{>z&(< zY?G6d+i7ca-bGGsbFrM4Frp;MXE7VVJp#rWwFEu|0`#M7t3E zBUF{D|5=!Ws^xW#_Z%h`j)#9@XN@?d&?_#NndAHU$AvR@dQB7kLS|xnE1c7+JhX9T zATMIO8{))@tADuonH4rVf+&03L45sbh+WGr*NaT)c?~ocYzM#7GLdNn*IP7Ku!EnR zhKVyRMPo1H*pIW?-_~|;=wxlNCE^#QvwVD>-Je=BB-b^X+SSK zY_0F4xRzNSwzl*Oow0hTGOWQjWevp!n6Vhr8^d82rH=2|GeaF=hE%*0EzhirlhMp1 zf{_~jW+~-LoG|q~dXecp1iJRhgO7EZFF;Un>L&G)1T%RL512jX5&i)mDmn7TV>PI5Fxlgl8)9TsDAOr@g33Gl8#LEYeY z;%Wx&Ko!?b;5loV-7(Qeqzqs2q?8X^_C92j9B3N>TZ(upNhK4BGjb8_a|v!XXYQ>|Q6=>1Ql~YYf06JIZ0SULybW{k zngd8Y3nqIox6(pQ7e+OT+wN$B*!x`kR6z+sRmy@dZR@n33RQ^U*PJNrCKXpIX0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qjitDCfftkMB^t7XH)U-Oiyn+HxyqY)nRti0_ zy!L&Os{}P=-|SBz53-V{8-}xF$?@)v$0&|NtqY{JaUI4ezMq*6Lm97C#JLh{onQQ2++%%ANNsJ>;diFagZ z=@L}Z-}xo_^N{(P^28mxwTm-Qk0lh2ImPoZiCWm*BVU4Lc(hc`*t^WSL#3+DGTfY( zujx3TQY@v7%dn6RrGSr(zcJTyFNv8^c^lSPpWGK|t55s*Wqs3WUDNwFU+vDb{{`hE BtZ4uM literal 0 HcmV?d00001 From e08dc704efeaad697d6123cf4d3e509b61ae2377 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 30 Oct 2019 08:20:22 -0700 Subject: [PATCH 082/529] fix 'roff warning I think it was issued by tbl but it wasn't about any of the tables. warning: numeric expression expected (got 'R') was complaining about .lp SYMBOLS, ROGUESYMBOLS Exclosing the paragraph label within quotes to make it one argument to the lp macro or command would have fixed this, but I've split them into two paragraphs. And reordered several of the paragraphs which were alphabetized just enough to make the out of order ones seem like mistakes. Guidebook.tex needs to catch up. --- doc/Guidebook.mn | 51 ++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 429ec0a98..34ad975e0 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.312 $ $NHDT-Date: 1562838836 2019/07/11 09:53:56 $ +.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.317 $ $NHDT-Date: 1572448817 2019/10/30 15:20:17 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -2642,6 +2642,7 @@ of which can be used multiple times. In general, the statements are written in capital letters, followed by an equals sign, followed by settings particular to that statement. +.pg Here is a list of allowed statements: .lp OPTIONS There are two types of options, boolean and compound options. @@ -2653,7 +2654,7 @@ Some options are persistent, and apply only to new games. You can specify multiple OPTIONS statements, and multiple options separated by commas in a single OPTIONS statement. (Comma separated options are processed from right to left.) -.pg +.lp "" Example: .sd .ft CR @@ -2682,6 +2683,7 @@ HACKDIR, must be writable. .lp TROUBLEDIR The location that a record of game aborts and self-diagnosed game problems is kept. Defaults to HACKDIR, must be writable. +.\" config file entries beyond this point are shown alphabetically .lp AUTOCOMPLETE Enable or disable an extended command autocompletion. Autocompletion has no effect for the X11 windowport. @@ -2689,7 +2691,7 @@ You can specify multiple autocompletions. To enable autocompletion, list the extended command. Prefix the command with \(lq!\(rq to disable the autocompletion for that command. -.pg +.lp "" Example: .sd \f(CRAUTOCOMPLETE=zap,!annotate\fP @@ -2705,7 +2707,7 @@ extended commands. You can specify multiple bindings. Format is key followed by the command, separated by a colon. See the \(lqChanging Key Bindings\(rq section for more information. -.pg +.lp "" Example: .sd \f(CRBIND=\(haX:getpos.autodescribe\fP @@ -2713,7 +2715,7 @@ Example: .lp CHOOSE Chooses at random one of the comma-separated parameters as an active section name. Lines in other sections are ignored. -.pg +.lp "" Example: .sd .ft CR \" constant-width Roman @@ -2725,37 +2727,43 @@ OPTIONS=role:arc,race:dwa,align:law,gender:fem OPTIONS=role:wiz,race:elf,align:cha,gender:mal .ft \" revert to previous font .ed -.lp MSGTYPE -Change the way messages are shown in the top status line. -See the \(lqConfiguring Message Types\(rq section. .lp MENUCOLOR Highlight menu lines with different colors. See the \(lqConfiguring Menu Colors\(rq section. -.lp SYMBOLS, ROGUESYMBOLS -Override one or more symbols in the symbols files. +.lp MSGTYPE +Change the way messages are shown in the top status line. +See the \(lqConfiguring Message Types\(rq section. +.lp ROGUESYMBOLS +Custom symbols for for the rogue level's symbol set. +See \fISYMBOLS\fP below. +.lp SOUND +Define a sound mapping. +See the \(lqConfiguring User Sounds\(rq section. +.lp SOUNDDIR +Define the directory that contains the sound files. +See the \(lqConfiguring User Sounds\(rq section. +.lp SYMBOLS +Override one or more symbols in the symbol set used for all dungeon +levels except for the special rogue level. See the \(lqModifying NetHack Symbols\(rq section. -.pg +.lp "" Example: .sd -\f(CRSYMBOLS=S_boulder:0\fP +\f(CR# replace small punctuation (tick marks) with easier to see digits\fP +\f(CRSYMBOLS=S_boulder:0,S_golem:7\fP .ed .lp WIZKIT Debug mode only: extra items to add to initial inventory. Value is the name of a text file containing a list of item names, one per line, up to a maximum of 128 lines. Each line is processed by the function that handles wishing. -.pg +.lp "" Example: .sd \f(CRWIZKIT=\(ti/wizkit.txt\fP \" \(ti == '~' .ed -.lp SOUNDDIR -Define the directory that contains the sound files. -See the \(lqConfiguring User Sounds\(rq section. -.lp SOUND -Define a sound mapping. -See the \(lqConfiguring User Sounds\(rq section. -.pg +.lp "" +.pg \" this would look better outdented Here is a short example of config file contents: .sd .ft CR \" set font to constant-width Roman @@ -4376,7 +4384,8 @@ Set the name of the symbol set that you want to load for display on the rogue level. .pg You can also override one or more symbols using the SYMBOLS and -ROGUESYMBOLS config file options. Symbols are specified as name:value pairs. +ROGUESYMBOLS config file options. +Symbols are specified as name:value pairs. Note that NetHack escape-processes the value string in conventional C fashion. This means that \\ is a prefix to take the following character literally. From b6d2697a6af7d7fb726a67d5fa489b7711af55b3 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 30 Oct 2019 18:40:48 -0400 Subject: [PATCH 083/529] function didn't match prototype --- src/engrave.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engrave.c b/src/engrave.c index a1fa986e4..a66373324 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -287,7 +287,8 @@ int cnt; void wipe_engr_at(x, y, cnt, magical) -xchar x, y, cnt, magical; +xchar x, y, cnt; +boolean magical; { register struct engr *ep = engr_at(x, y); From 33d00cf0e4043d7b1cc169a7e448bcc381d75e97 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 30 Oct 2019 18:48:28 -0400 Subject: [PATCH 084/529] attempt to get mingw building correctly after recent changes make typedef of boolean match mingw header files link with shell32 and ole32 as Makefile.msc now had to do kludge some stuff missing from mingw headers in sys/winnt/windmain.c --- include/global.h | 5 +++-- sys/winnt/Makefile.gcc | 6 +++--- sys/winnt/windmain.c | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/include/global.h b/include/global.h index 6e0f96ebf..feb9f75fb 100644 --- a/include/global.h +++ b/include/global.h @@ -70,9 +70,10 @@ * since otherwise comparisons with signed quantities are done incorrectly */ typedef schar xchar; -#if defined(__GNUC__) && defined(WIN32) && defined(__cplusplus) + +#ifdef __MINGW32__ /* Resolve conflict with Qt 5 and MinGW-w32 */ -typedef uchar boolean; /* 0 or 1 */ +typedef unsigned char boolean; /* 0 or 1 */ #else #ifndef SKIP_BOOLEAN typedef xchar boolean; /* 0 or 1 */ diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 358965369..e8123334f 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -510,9 +510,9 @@ endif CFLAGSBASE = -c $(cflags) $(WINPINC) $(cdebug) $(CURSESDEF) #LFLAGSBASEC = $(linkdebug) #LFLAGSBASEG = $(linkdebug) -mwindows - -conlibs = -lgdi32 -lwinmm $(BCRYPT) -guilibs = -lcomctl32 -lwinmm +baselibs = -lwinmm -lshell32 -lole32 +conlibs = -lgdi32 $(baselibs) $(BCRYPT) +guilibs = -lcomctl32 $(baselibs) ifeq "$(WANT_WIN_QT4)" "Y" # Might be either Qt 4 or Qt 5 ifeq "$(HAVE_QT5)" "Y" diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 14734900b..1e140b0d6 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -11,9 +11,26 @@ #include #include #include +#ifndef __MINGW32__ #include +#endif #include +#ifdef __MINGW32__ +extern LONG GetCurrentPackageFullName(UINT32 *packageFullNameLength, + PWSTR packageFullName); +extern HRESULT SHGetKnownFolderPath(REFKNOWNFOLDERID rfid, + DWORD dwFlags, HANDLE hToken, PWSTR *ppszPath); +#ifdef INITGUID +#define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID DECLSPEC_SELECTANY name = { l, w1, w2,{ b1, b2, b3, b4, b5, b6, b7, b8 } } +#else +#define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID name +#endif +DEFINE_KNOWN_FOLDER (FOLDERID_ProgramData, 0x62ab5d82, 0xfdc1, 0x4dc3, 0xa9, 0xdd, 0x07, 0x0d, 0x1d, 0x49, 0x5d, 0x97); +DEFINE_KNOWN_FOLDER (FOLDERID_LocalAppData, 0xf1b32785, 0x6fba, 0x4fcf, 0x9d, 0x55, 0x7b, 0x8e, 0x7f, 0x15, 0x70, 0x91); +DEFINE_KNOWN_FOLDER (FOLDERID_Profile, 0x5e6c858f, 0x0e22, 0x4760, 0x9a, 0xfe, 0xea, 0x33, 0x17, 0xb6, 0x71, 0x73); +#endif + #if 0 #include "wintty.h" #endif From 4f1a13147db8dc21396c0651049cc3eab25c90f4 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Wed, 30 Oct 2019 18:50:59 -0400 Subject: [PATCH 085/529] This is cron-daily v1-Oct-30-2019. guidebook updated: doc/Guidebook.txt --- doc/Guidebook.txt | 1872 ++++++++++++++++++++++----------------------- 1 file changed, 936 insertions(+), 936 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index c1b1dc6c1..e5c6deb2a 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -91,32 +91,32 @@ them to move quickly and sneak up on the local nasties. They start equipped with the tools for a proper scientific expedition. - Barbarians are warriors out of the hinterland, hardened to + Barbarians are warriors out of the hinterland, hardened to battle. They begin their quests with naught but uncommon strength, a trusty hauberk, and a great two-handed sword. - Cavemen and Cavewomen start with exceptional strength but, + Cavemen and Cavewomen start with exceptional strength but, unfortunately, with neolithic weapons. - Healers are wise in medicine and apothecary. They know the - herbs and simples that can restore vitality, ease pain, anes- + Healers are wise in medicine and apothecary. They know the + herbs and simples that can restore vitality, ease pain, anes- thetize, and neutralize poisons; and with their instruments, they - can divine a being's state of health or sickness. Their medical + can divine a being's state of health or sickness. Their medical practice earns them quite reasonable amounts of money, with which they enter the dungeon. - Knights are distinguished from the common skirmisher by - their devotion to the ideals of chivalry and by the surpassing + Knights are distinguished from the common skirmisher by + their devotion to the ideals of chivalry and by the surpassing excellence of their armor. Monks are ascetics, who by rigorous practice of physical and mental disciplines have become capable of fighting as effectively - without weapons as with. They wear no armor but make up for it + without weapons as with. They wear no armor but make up for it with increased mobility. - Priests and Priestesses are clerics militant, crusaders ad- - vancing the cause of righteousness with arms, armor, and arts - thaumaturgic. Their ability to commune with deities via prayer + Priests and Priestesses are clerics militant, crusaders ad- + vancing the cause of righteousness with arms, armor, and arts + thaumaturgic. Their ability to commune with deities via prayer occasionally extricates them from peril, but can also put them in it. @@ -126,7 +126,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -136,63 +136,63 @@ - Rogues are agile and stealthy thieves, with knowledge of - locks, traps, and poisons. Their advantage lies in surprise, + Rogues are agile and stealthy thieves, with knowledge of + locks, traps, and poisons. Their advantage lies in surprise, which they employ to great advantage. - Samurai are the elite warriors of feudal Nippon. They are - lightly armored and quick, and wear the dai-sho, two swords of + Samurai are the elite warriors of feudal Nippon. They are + lightly armored and quick, and wear the dai-sho, two swords of the deadliest keenness. - Tourists start out with lots of gold (suitable for shopping - with), a credit card, lots of food, some maps, and an expensive + Tourists start out with lots of gold (suitable for shopping + with), a credit card, lots of food, some maps, and an expensive camera. Most monsters don't like being photographed. - Valkyries are hardy warrior women. Their upbringing in the - harsh Northlands makes them strong, inures them to extremes of + Valkyries are hardy warrior women. Their upbringing in the + harsh Northlands makes them strong, inures them to extremes of cold, and instills in them stealth and cunning. - Wizards start out with a knowledge of magic, a selection of - magical items, and a particular affinity for dweomercraft. Al- + Wizards start out with a knowledge of magic, a selection of + magical items, and a particular affinity for dweomercraft. Al- though seemingly weak and easy to overcome at first sight, an ex- perienced Wizard is a deadly foe. - You may also choose the race of your character (within lim- + You may also choose the race of your character (within lim- its; most roles have restrictions on which races are eligible for them): Dwarves are smaller than humans or elves, but are stocky and - solid individuals. Dwarves' most notable trait is their great - expertise in mining and metalwork. Dwarvish armor is said to be + solid individuals. Dwarves' most notable trait is their great + expertise in mining and metalwork. Dwarvish armor is said to be second in quality not even to the mithril armor of the Elves. - Elves are agile, quick, and perceptive; very little of what - goes on will escape an Elf. The quality of Elven craftsmanship + Elves are agile, quick, and perceptive; very little of what + goes on will escape an Elf. The quality of Elven craftsmanship often gives them an advantage in arms and armor. - Gnomes are smaller than but generally similar to dwarves. - Gnomes are known to be expert miners, and it is known that a se- - cret underground mine complex built by this race exists within + Gnomes are smaller than but generally similar to dwarves. + Gnomes are known to be expert miners, and it is known that a se- + cret underground mine complex built by this race exists within the Mazes of Menace, filled with both riches and danger. Humans are by far the most common race of the surface world, - and are thus the norm to which other races are often compared. - Although they have no special abilities, they can succeed in any + and are thus the norm to which other races are often compared. + Although they have no special abilities, they can succeed in any role. - Orcs are a cruel and barbaric race that hate every living - thing (including other orcs). Above all others, Orcs hate Elves - with a passion unequalled, and will go out of their way to kill - one at any opportunity. The armor and weapons fashioned by the + Orcs are a cruel and barbaric race that hate every living + thing (including other orcs). Above all others, Orcs hate Elves + with a passion unequalled, and will go out of their way to kill + one at any opportunity. The armor and weapons fashioned by the Orcs are typically of inferior quality. 3. What do all those things on the screen mean? - On the screen is kept a map of where you have been and what - you have seen on the current dungeon level; as you explore more + On the screen is kept a map of where you have been and what + you have seen on the current dungeon level; as you explore more - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -204,47 +204,47 @@ of the level, it appears on the screen in front of you. - When NetHack's ancestor rogue first appeared, its screen - orientation was almost unique among computer fantasy games. - Since then, screen orientation has become the norm rather than - the exception; NetHack continues this fine tradition. Unlike - text adventure games that accept commands in pseudo-English sen- + When NetHack's ancestor rogue first appeared, its screen + orientation was almost unique among computer fantasy games. + Since then, screen orientation has become the norm rather than + the exception; NetHack continues this fine tradition. Unlike + text adventure games that accept commands in pseudo-English sen- tences and explain the results in words, NetHack commands are all - one or two keystrokes and the results are displayed graphically - on the screen. A minimum screen size of 24 lines by 80 columns - is recommended; if the screen is larger, only a 21x80 section + one or two keystrokes and the results are displayed graphically + on the screen. A minimum screen size of 24 lines by 80 columns + is recommended; if the screen is larger, only a 21x80 section will be used for the map. NetHack can even be played by blind players, with the assis- - tance of Braille readers or speech synthesisers. Instructions - for configuring NetHack for the blind are included later in this + tance of Braille readers or speech synthesisers. Instructions + for configuring NetHack for the blind are included later in this document. NetHack generates a new dungeon every time you play it; even - the authors still find it an entertaining and exciting game de- + the authors still find it an entertaining and exciting game de- spite having won several times. - NetHack offers a variety of display options. The options - available to you will vary from port to port, depending on the - capabilities of your hardware and software, and whether various + NetHack offers a variety of display options. The options + available to you will vary from port to port, depending on the + capabilities of your hardware and software, and whether various compile-time options were enabled when your executable was creat- ed. The three possible display options are: a monochrome charac- - ter interface, a color character interface, and a graphical in- + ter interface, a color character interface, and a graphical in- terface using small pictures called tiles. The two character in- terfaces allow fonts with other characters to be substituted, but - the default assignments use standard ASCII characters to repre- + the default assignments use standard ASCII characters to repre- sent everything. There is no difference between the various dis- play options with respect to game play. Because we cannot repro- duce the tiles or colors in the Guidebook, and because it is com- - mon to all ports, we will use the default ASCII characters from - the monochrome character display when referring to things you + mon to all ports, we will use the default ASCII characters from + the monochrome character display when referring to things you might see on the screen during your game. - In order to understand what is going on in NetHack, first - you must understand what NetHack is doing with the screen. The - NetHack screen replaces the "You see ..." descriptions of text - adventure games. Figure 1 is a sample of what a NetHack screen - might look like. The way the screen looks for you depends on + In order to understand what is going on in NetHack, first + you must understand what NetHack is doing with the screen. The + NetHack screen replaces the "You see ..." descriptions of text + adventure games. Figure 1 is a sample of what a NetHack screen + might look like. The way the screen looks for you depends on your platform. @@ -258,7 +258,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -286,9 +286,9 @@ 3.1. The status lines (bottom) - The bottom two lines of the screen contain several cryptic - pieces of information describing your current status. If either - status line becomes longer than the width of the screen, you + The bottom two lines of the screen contain several cryptic + pieces of information describing your current status. If either + status line becomes longer than the width of the screen, you might not see all of it. Here are explanations of what the vari- ous status items mean (though your configuration may not have all the status items listed below): @@ -298,33 +298,33 @@ experience level, see below). Strength - A measure of your character's strength; one of your six ba- - sic attributes. A human character's attributes can range - from 3 to 18 inclusive; non-humans may exceed these limits + A measure of your character's strength; one of your six ba- + sic attributes. A human character's attributes can range + from 3 to 18 inclusive; non-humans may exceed these limits (occasionally you may get super-strengths of the form 18/xx, - and magic can also cause attributes to exceed the normal - limits). The higher your strength, the stronger you are. + and magic can also cause attributes to exceed the normal + limits). The higher your strength, the stronger you are. Strength affects how successfully you perform physical - tasks, how much damage you do in combat, and how much loot + tasks, how much damage you do in combat, and how much loot you can carry. Dexterity - Dexterity affects your chances to hit in combat, to avoid - traps, and do other tasks requiring agility or manipulation + Dexterity affects your chances to hit in combat, to avoid + traps, and do other tasks requiring agility or manipulation of objects. Constitution - Constitution affects your ability to recover from injuries - and other strains on your stamina. When strength is low or - modest, constitution also affects how much you can carry. - With sufficiently high strength, the contribution to carry- + Constitution affects your ability to recover from injuries + and other strains on your stamina. When strength is low or + modest, constitution also affects how much you can carry. + With sufficiently high strength, the contribution to carry- ing capacity from your constitution no longer matters. Intelligence - Intelligence affects your ability to cast spells and read + Intelligence affects your ability to cast spells and read - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -342,7 +342,7 @@ Charisma Charisma affects how certain creatures react toward you. In - particular, it can affect the prices shopkeepers offer you. + particular, it can affect the prices shopkeepers offer you. Alignment Lawful, Neutral, or Chaotic. Often, Lawful is taken as good @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -456,7 +456,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -533,62 +533,62 @@ I This marks the last known location of an invisible or other- - wise unseen monster. Note that the monster could have + wise unseen monster. Note that the monster could have moved. The `F' and `m' commands may be useful here. - You need not memorize all these symbols; you can ask the - game what any symbol represents with the `/' command (see the + You need not memorize all these symbols; you can ask the + game what any symbol represents with the `/' command (see the next section for more info). 4. Commands Commands can be initiated by typing one or two characters to - which the command is bound to, or typing the command name in the - extended commands entry. Some commands, like "search", do not + which the command is bound to, or typing the command name in the + extended commands entry. Some commands, like "search", do not require that any more information be collected by NetHack. Other - commands might require additional information, for example a di- - rection, or an object to be used. For those commands that re- - quire additional information, NetHack will present you with ei- - ther a menu of choices or with a command line prompt requesting + commands might require additional information, for example a di- + rection, or an object to be used. For those commands that re- + quire additional information, NetHack will present you with ei- + ther a menu of choices or with a command line prompt requesting information. Which you are presented with will depend chiefly on how you have set the menustyle option. - For example, a common question, in the form "What do you - want to use? [a-zA-Z ?*]", asks you to choose an object you are - carrying. Here, "a-zA-Z" are the inventory letters of your pos- - sible choices. Typing `?' gives you an inventory list of these - items, so you can see what each letter refers to. In this exam- + For example, a common question, in the form "What do you + want to use? [a-zA-Z ?*]", asks you to choose an object you are + carrying. Here, "a-zA-Z" are the inventory letters of your pos- + sible choices. Typing `?' gives you an inventory list of these + items, so you can see what each letter refers to. In this exam- ple, there is also a `*' indicating that you may choose an object not on the list, if you wanted to use something unexpected. Typ- - ing a `*' lists your entire inventory, so you can see the inven- - tory letters of every object you're carrying. Finally, if you + ing a `*' lists your entire inventory, so you can see the inven- + tory letters of every object you're carrying. Finally, if you change your mind and decide you don't want to do this command af- ter all, you can press the ESC key to abort the command. - You can put a number before some commands to repeat them - that many times; for example, "10s" will search ten times. If + You can put a number before some commands to repeat them + that many times; for example, "10s" will search ten times. If you have the number_pad option set, you must type `n' to prefix a - count, so the example above would be typed "n10s" instead. Com- - mands for which counts make no sense ignore them. In addition, - movement commands can be prefixed for greater control (see be- + count, so the example above would be typed "n10s" instead. Com- + mands for which counts make no sense ignore them. In addition, + movement commands can be prefixed for greater control (see be- low). To cancel a count or a prefix, press the ESC key. - The list of commands is rather long, but it can be read at - any time during the game through the `?' command, which accesses - a menu of helpful texts. Here are the default key bindings for + The list of commands is rather long, but it can be read at + any time during the game through the `?' command, which accesses + a menu of helpful texts. Here are the default key bindings for your reference: ? Help menu: display one of several help texts available. / The "whatis" command, to tell what a symbol represents. You may choose to specify a location or type a symbol (or even a - whole word) to explain. Specifying a location is done by - moving the cursor to a particular spot on the map and then + whole word) to explain. Specifying a location is done by + moving the cursor to a particular spot on the map and then pressing one of `.', `,', `;', or `:'. `.' will explain the symbol at the chosen location, conditionally check for "More - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -598,43 +598,43 @@ - info?" depending upon whether the help option is on, and - then you will be asked to pick another location; `,' will + info?" depending upon whether the help option is on, and + then you will be asked to pick another location; `,' will explain the symbol but skip any additional information, then let you pick another location; `;' will skip additional info and also not bother asking you to choose another location to examine; `:' will show additional info, if any, without ask- ing for confirmation. When picking a location, pressing the - ESC key will terminate this command, or pressing `?' will + ESC key will terminate this command, or pressing `?' will give a brief reminder about how it works. - If the autodescribe option is on, a short description of - what you see at each location is shown as you move the cur- - sor. Typing `#' while picking a location will toggle that - option on or off. The whatis_coord option controls whether + If the autodescribe option is on, a short description of + what you see at each location is shown as you move the cur- + sor. Typing `#' while picking a location will toggle that + option on or off. The whatis_coord option controls whether the short description includes map coordinates. - Specifying a name rather than a location always gives any + Specifying a name rather than a location always gives any additional information available about that name. - You may also request a description of nearby monsters, all - monsters currently displayed, nearby objects, or all ob- + You may also request a description of nearby monsters, all + monsters currently displayed, nearby objects, or all ob- jects. The whatis_coord option controls which format of map coordinate is included with their descriptions. & Tell what a command does. - < Go up to the previous level (if you are on a staircase or + < Go up to the previous level (if you are on a staircase or ladder). > Go down to the next level (if you are on a staircase or lad- der). [yuhjklbn] - Go one step in the direction indicated (see Figure 2). If - you sense or remember a monster there, you will fight the - monster instead. Only these one-step movement commands - cause you to fight monsters; the others (below) are "safe." + Go one step in the direction indicated (see Figure 2). If + you sense or remember a monster there, you will fight the + monster instead. Only these one-step movement commands + cause you to fight monsters; the others (below) are "safe." y k u 7 8 9 \ | / \ | / @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -720,7 +720,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -786,7 +786,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -822,7 +822,7 @@ i List your inventory (everything you're carrying). I List selected parts of your inventory, usually be specifying - the character for a particular set of objects, like `[' for + the character for a particular set of objects, like `[' for armor or `!' for potions. I* - list all gems in inventory; @@ -838,12 +838,12 @@ O Set options. - A menu showing the current option values will be displayed. - You can change most values simply by selecting the menu en- + A menu showing the current option values will be displayed. + You can change most values simply by selecting the menu en- try for the given option (ie, by typing its letter or click- - ing upon it, depending on your user interface). For the - non-boolean choices, a further menu or prompt will appear - once you've closed this menu. The available options are + ing upon it, depending on your user interface). For the + non-boolean choices, a further menu or prompt will appear + once you've closed this menu. The available options are listed later in this Guidebook. Options are usually set be- fore the game rather than with the `O' command; see the sec- tion on options below. @@ -852,7 +852,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -862,10 +862,10 @@ - Shortcut for "#overview": list interesting dungeon levels + Shortcut for "#overview": list interesting dungeon levels visited. - (Prior to 3.6.0, `^O' was a debug mode command which listed + (Prior to 3.6.0, `^O' was a debug mode command which listed the placement of all special levels. Use "#wizwhere" to run that command.) @@ -874,15 +874,15 @@ P Put on an accessory (ring, amulet, or blindfold). This command may also be used to wear armor. The prompt for - which inventory item to use will only list accessories, but - choosing an unlisted item of armor will attempt to wear it. + which inventory item to use will only list accessories, but + choosing an unlisted item of armor will attempt to wear it. (See the `W' command below. It lists armor as the inventory choices but will accept an accessory and attempt to put that on.) ^P Repeat previous message. - Subsequent `^P's repeat earlier messages. For some inter- + Subsequent `^P's repeat earlier messages. For some inter- faces, the behavior can be varied via the msg_window option. q Quaff (drink) something (potion, water, etc). @@ -918,7 +918,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -959,19 +959,19 @@ T Take off armor. - If you're wearing more than one piece, you'll be prompted - for which one to take off. (Note that this treats a cloak - covering a suit and/or a shirt, or a suit covering a shirt, + If you're wearing more than one piece, you'll be prompted + for which one to take off. (Note that this treats a cloak + covering a suit and/or a shirt, or a suit covering a shirt, as if the underlying items weren't there.) When you're only - wearing one, then by default it will be taken off without - asking, but you can set the paranoid_confirmation option to + wearing one, then by default it will be taken off without + asking, but you can set the paranoid_confirmation option to require a prompt. - This command may also be used to remove accessories. The - prompt for which inventory item to take off only lists worn - armor, but a worn accessory can be chosen. (See the `R' + This command may also be used to remove accessories. The + prompt for which inventory item to take off only lists worn + armor, but a worn accessory can be chosen. (See the `R' command above. It lists accessories as the inventory choic- - es but will accept an item of armor and attempt to take it + es but will accept an item of armor and attempt to take it off.) ^T Teleport, if you have the ability. @@ -984,7 +984,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -996,44 +996,44 @@ w- - wield nothing, use your bare (or gloved) hands. - Some characters can wield two weapons at once; use the `X' + Some characters can wield two weapons at once; use the `X' command (or the "#twoweapon" extended command) to do so. W Wear armor. - This command may also be used to put on an accessory (ring, - amulet, or blindfold). The prompt for which inventory item + This command may also be used to put on an accessory (ring, + amulet, or blindfold). The prompt for which inventory item to use will only list armor, but choosing an unlisted acces- sory will attempt to put it on. (See the `P' command above. - It lists accessories as the inventory choices but will ac- + It lists accessories as the inventory choices but will ac- cept an item of armor and attempt to wear it.) x Exchange your wielded weapon with the item in your alternate weapon slot. The latter is used as your secondary weapon when engaging in - two-weapon combat. Note that if one of these slots is emp- + two-weapon combat. Note that if one of these slots is emp- ty, the exchange still takes place. X Toggle two-weapon combat, if your character can do it. Also available via the "#twoweapon" extended command. - (In versions prior to 3.6 this was the command to switch + (In versions prior to 3.6 this was the command to switch from normal play to "explore mode", also known as "discovery mode", which has now been moved to "#exploremode".) ^X Display basic information about your character. - Displays name, role, race, gender (unless role name makes - that redundant, such as Caveman or Priestess), and align- - ment, along with your patron deity and his or her opposi- - tion. It also shows most of the various items of informa- + Displays name, role, race, gender (unless role name makes + that redundant, such as Caveman or Priestess), and align- + ment, along with your patron deity and his or her opposi- + tion. It also shows most of the various items of informa- tion from the status line(s) in a less terse form, including - several additional things which don't appear in the normal + several additional things which don't appear in the normal status display due to space considerations. - In normal play, that's all that `^X' displays. In explore - mode, the role and status feedback is augmented by the in- + In normal play, that's all that `^X' displays. In explore + mode, the role and status feedback is augmented by the in- formation provided by enlightenment magic. z Zap a wand. @@ -1050,7 +1050,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1116,7 +1116,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1248,7 +1248,7 @@ paranoid_confirmation:quit option to require a response of - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1314,7 +1314,7 @@ Show mobile light sources. Autocompletes. Debug mode only. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1328,27 +1328,27 @@ Look at what is here, under you. Default key is `:'. #loot - Loot a box or bag on the floor beneath you, or the saddle - from a steed standing next to you. Autocompletes. Precede - with the `m' prefix to skip containers at your location and + Loot a box or bag on the floor beneath you, or the saddle + from a steed standing next to you. Autocompletes. Precede + with the `m' prefix to skip containers at your location and go directly to removing a saddle. Default key is `M-l', and also `l' if number_pad is on. #monster - Use a monster's special ability (when polymorphed into mon- + Use a monster's special ability (when polymorphed into mon- ster form). Autocompletes. Default key is `M-m'. #name - Name a monster, an individual object, or a type of object. - Same as "#call". Autocompletes. Default keys are `N', `M- + Name a monster, an individual object, or a type of object. + Same as "#call". Autocompletes. Default keys are `N', `M- n', and `M-N'. #offer - Offer a sacrifice to the gods. Autocompletes. Default key + Offer a sacrifice to the gods. Autocompletes. Default key is `M-o'. - You'll need to find an altar to have any chance at success. - Corpses of recently killed monsters are the fodder of + You'll need to find an altar to have any chance at success. + Corpses of recently killed monsters are the fodder of choice. The `m' prefix skips offering any items which are on the al- @@ -1361,26 +1361,26 @@ Show and change option settings. Default key is `O'. #overview - Display information you've discovered about the dungeon. - Any visited level (unless forgotten due to amnesia) with an - annotation is included, and many things (altars, thrones, - fountains, and so on; extra stairs leading to another dun- - geon branch) trigger an automatic annotation. If dungeon + Display information you've discovered about the dungeon. + Any visited level (unless forgotten due to amnesia) with an + annotation is included, and many things (altars, thrones, + fountains, and so on; extra stairs leading to another dun- + geon branch) trigger an automatic annotation. If dungeon overview is chosen during end-of-game disclosure, every vis- - ited level will be included regardless of annotations. Au- + ited level will be included regardless of annotations. Au- tocompletes. Default keys are `^O', and `M-O'. #panic Test the panic routine. Terminates the current game. Auto- completes. Debug mode only. - Asks for confirmation; default is n (no); continue playing. - To really panic, respond with y. You can set the para- - noid_confirmation:quit option to require a response of yes + Asks for confirmation; default is n (no); continue playing. + To really panic, respond with y. You can set the para- + noid_confirmation:quit option to require a response of yes instead. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1401,38 +1401,38 @@ Polymorph self. Autocompletes. Debug mode only. #pray - Pray to the gods for help. Autocompletes. Default key is + Pray to the gods for help. Autocompletes. Default key is `M-p'. - Praying too soon after receiving prior help is a bad idea. - (Hint: entering the dungeon alive is treated as having re- + Praying too soon after receiving prior help is a bad idea. + (Hint: entering the dungeon alive is treated as having re- ceived help. You probably shouldn't start off a new game by - praying right away.) Since using this command by accident - can cause trouble, there is an option to make you confirm - your intent before praying. It is enabled by default, and - you can reset the paranoid_confirmation option to disable + praying right away.) Since using this command by accident + can cause trouble, there is an option to make you confirm + your intent before praying. It is enabled by default, and + you can reset the paranoid_confirmation option to disable it. #prevmsg - Show previously displayed game messages. Default key is + Show previously displayed game messages. Default key is `^P'. #puton - Put on an accessory (ring, amulet, etc). Default key is + Put on an accessory (ring, amulet, etc). Default key is `P'. #quaff Quaff (drink) something. Default key is `q'. #quit - Quit the program without saving your game. Autocompletes. + Quit the program without saving your game. Autocompletes. Default key is `M-q'. - Since using this command by accident would throw away the - current game, you are asked to confirm your intent before + Since using this command by accident would throw away the + current game, you are asked to confirm your intent before quitting. Default response is n (no); continue playing. To - really quit, respond with y. You can set the paranoid_con- - firmation:quit option to require a response of yes instead. + really quit, respond with y. You can set the paranoid_con- + firmation:quit option to require a response of yes instead. #quiver Select ammunition for quiver. Default key is `Q'. @@ -1446,7 +1446,7 @@ number_pad is on. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1512,7 +1512,7 @@ Sit down. Autocompletes. Default key is `M-s'. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1555,16 +1555,16 @@ Look at the timeout queue. Autocompletes. Debug mode only. #tip - Tip over a container (bag or box) to pour out its contents. - Autocompletes. Default key is `M-T'. The `m' prefix makes + Tip over a container (bag or box) to pour out its contents. + Autocompletes. Default key is `M-T'. The `m' prefix makes the command use a menu. #travel - Travel to a specific location on the map. Default key is + Travel to a specific location on the map. Default key is `_'. Using the "request menu" prefix shows a menu of inter- - esting targets in sight without asking to move the cursor. - When picking a target with cursor and the autodescribe op- - tion is on, the top line will show "(no travel path)" if + esting targets in sight without asking to move the cursor. + When picking a target with cursor and the autodescribe op- + tion is on, the top line will show "(no travel path)" if your character does not know of a path to that location. #turn @@ -1574,11 +1574,11 @@ Toggle two-weapon combat on or off. Autocompletes. Default key is `X', and also `M-2' if number_pad is off. - Note that you must use suitable weapons for this type of + Note that you must use suitable weapons for this type of combat, or it will be automatically turned off. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1592,14 +1592,14 @@ Untrap something (trap, door, or chest). Default key is `M- u', and `u' if number_pad is on. - In some circumstances it can also be used to rescue trapped + In some circumstances it can also be used to rescue trapped monsters. #up Go up a staircase. Default key is `<'. #vanquished - List vanquished monsters. Autocompletes. Debug mode only. + List vanquished monsters. Autocompletes. Debug mode only. #version Print compile time options for this version of NetHack. Au- @@ -1644,7 +1644,7 @@ Create a monster. May be prefixed by a count to create more - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1710,7 +1710,7 @@ lowed by the other key, you may set the altmeta option to have - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1776,7 +1776,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1842,7 +1842,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1908,7 +1908,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -1928,31 +1928,31 @@ or to paying for it will incur a charge, and the shopkeeper won't allow you to leave the shop until you have paid any debt you owe. - You can sell items to a shopkeeper by dropping them to the - floor while inside a shop. You will either be offered an amount - of gold and asked whether you're willing to sell, or you'll be - told that the shopkeeper isn't interested (generally, your item - needs to be compatible with the type of merchandise carried by + You can sell items to a shopkeeper by dropping them to the + floor while inside a shop. You will either be offered an amount + of gold and asked whether you're willing to sell, or you'll be + told that the shopkeeper isn't interested (generally, your item + needs to be compatible with the type of merchandise carried by the shop). - If you drop something in a shop by accident, the shopkeeper - will usually claim ownership without offering any compensation. + If you drop something in a shop by accident, the shopkeeper + will usually claim ownership without offering any compensation. You'll have to buy it back if you want to reclaim it. - Shopkeepers sometimes run out of money. When that happens, - you'll be offered credit instead of gold when you try to sell - something. Credit can be used to pay for purchases, but it is - only good in the shop where it was obtained; other shopkeepers - won't honor it. (If you happen to find a "credit card" in the + Shopkeepers sometimes run out of money. When that happens, + you'll be offered credit instead of gold when you try to sell + something. Credit can be used to pay for purchases, but it is + only good in the shop where it was obtained; other shopkeepers + won't honor it. (If you happen to find a "credit card" in the dungeon, don't bother trying to use it in shops; shopkeepers will not accept it.) - The `$' command, which reports the amount of gold you are + The `$' command, which reports the amount of gold you are carrying (in inventory, not inside bags or boxes), will also show - current shop debt or credit, if any. The "Iu" command lists un- + current shop debt or credit, if any. The "Iu" command lists un- paid items (those which still belong to the shop) if you are car- - rying any. The "Ix" command shows an inventory-like display of - any unpaid items which have been used up, along with other shop + rying any. The "Ix" command shows an inventory-like display of + any unpaid items which have been used up, along with other shop fees, if any. 5.4.1. Shop idiosyncrasies @@ -1974,7 +1974,7 @@ tory depletion. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2011,36 +2011,36 @@ business unless you attack them. Some of them are very dangerous when angered. Remember: discretion is the better part of valor. - In most circumstances, if you attempt to attack a peaceful - monster by moving into its location, you'll be asked to confirm - your intent. By default an answer of `y' acknowledges that in- - tent, which can be error prone if you're using `y' to move. You + In most circumstances, if you attempt to attack a peaceful + monster by moving into its location, you'll be asked to confirm + your intent. By default an answer of `y' acknowledges that in- + tent, which can be error prone if you're using `y' to move. You can set the paranoid_confirmation option to require a response of "yes" instead. - If you can't see a monster (if it is invisible, or if you - are blinded), the symbol `I' will be shown when you learn of its - presence. If you attempt to walk into it, you will try to fight - it just like a monster that you can see; of course, if the mon- + If you can't see a monster (if it is invisible, or if you + are blinded), the symbol `I' will be shown when you learn of its + presence. If you attempt to walk into it, you will try to fight + it just like a monster that you can see; of course, if the mon- ster has moved, you will attack empty air. If you guess that the - monster has moved and you don't wish to fight, you can use the - `m' command to move without fighting; likewise, if you don't re- + monster has moved and you don't wish to fight, you can use the + `m' command to move without fighting; likewise, if you don't re- member a monster but want to try fighting anyway, you can use the `F' command. 6.2. Your pet You start the game with a little dog (`d'), kitten (`f'), or - pony (`u'), which follows you about the dungeon and fights mon- - sters with you. Like you, your pet needs food to survive. Dogs - and cats usually feed themselves on fresh carrion and other - meats; horses need vegetarian food which is harder to come by. - If you're worried about your pet or want to train it, you can + pony (`u'), which follows you about the dungeon and fights mon- + sters with you. Like you, your pet needs food to survive. Dogs + and cats usually feed themselves on fresh carrion and other + meats; horses need vegetarian food which is harder to come by. + If you're worried about your pet or want to train it, you can feed it, too, by throwing it food. A properly trained pet can be very useful under certain circumstances. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2050,38 +2050,38 @@ - Your pet also gains experience from killing monsters, and - can grow over time, gaining hit points and doing more damage. - Initially, your pet may even be better at killing things than + Your pet also gains experience from killing monsters, and + can grow over time, gaining hit points and doing more damage. + Initially, your pet may even be better at killing things than you, which makes pets useful for low-level characters. - Your pet will follow you up and down staircases if it is - next to you when you move. Otherwise your pet will be stranded - and may become wild. Similarly, when you trigger certain types - of traps which alter your location (for instance, a trap door - which drops you to a lower dungeon level), any adjacent pet will + Your pet will follow you up and down staircases if it is + next to you when you move. Otherwise your pet will be stranded + and may become wild. Similarly, when you trigger certain types + of traps which alter your location (for instance, a trap door + which drops you to a lower dungeon level), any adjacent pet will accompany you and any non-adjacent pet will be left behind. Your - pet may trigger such traps itself; you will not be carried along + pet may trigger such traps itself; you will not be carried along with it even if adjacent at the time. 6.3. Steeds - Some types of creatures in the dungeon can actually be rid- + Some types of creatures in the dungeon can actually be rid- den if you have the right equipment and skill. Convincing a wild - beast to let you saddle it up is difficult to say the least. - Many a dungeoneer has had to resort to magic and wizardry in or- + beast to let you saddle it up is difficult to say the least. + Many a dungeoneer has had to resort to magic and wizardry in or- der to forge the alliance. Once you do have the beast under your - control however, you can easily climb in and out of the saddle + control however, you can easily climb in and out of the saddle with the "#ride" command. Lead the beast around the dungeon when riding, in the same manner as you would move yourself. It is the beast that you will see displayed on the map. - Riding skill is managed by the "#enhance" command. See the + Riding skill is managed by the "#enhance" command. See the section on Weapon proficiency for more information about that. Use the `a' (apply) command and pick a saddle in your inven- - tory to attempt to put that saddle on an adjacent creature. If - successful, it will be transferred to that creature's inventory. + tory to attempt to put that saddle on an adjacent creature. If + successful, it will be transferred to that creature's inventory. Use the "#loot" command while adjacent to a saddled creature to try to remove the saddle from that creature. If successful, @@ -2106,7 +2106,7 @@ it is the one who moved rather than you. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2172,7 +2172,7 @@ extremely obvious, you will be asked what you want to call this - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2238,7 +2238,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2304,7 +2304,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2370,7 +2370,7 @@ become highly skilled in daggers or staves but not in swords or - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2436,7 +2436,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2502,7 +2502,7 @@ of armor, you immediately find out the armor class and any - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2568,7 +2568,7 @@ vironment variable to the file name of your mailbox. You may - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2629,12 +2629,12 @@ then by its current number of charges. A current charge count of -1 is a special case indicating that the wand has been cancelled. - The command to use a wand is `z' (zap). To break one, use + The command to use a wand is `z' (zap). To break one, use the `a' (apply) command. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2646,14 +2646,14 @@ 7.8. Rings (`=') - Rings are very useful items, since they are relatively per- - manent magic, unlike the usually fleeting effects of potions, + Rings are very useful items, since they are relatively per- + manent magic, unlike the usually fleeting effects of potions, scrolls, and wands. - Putting on a ring activates its magic. You can wear only + Putting on a ring activates its magic. You can wear only two rings, one on each ring finger. - Most rings also cause you to grow hungry more rapidly, the + Most rings also cause you to grow hungry more rapidly, the rate varying with the type of ring. The commands to use rings are `P' (put on) and `R' (remove). @@ -2700,7 +2700,7 @@ "Weapon proficiency".) - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2766,7 +2766,7 @@ much less valuable. All rocks, however, can be used as - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2832,7 +2832,7 @@ with these challenges. Note that it is perfectly acceptable to - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2898,7 +2898,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -2964,7 +2964,7 @@ how NetHack behaves. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3005,32 +3005,32 @@ You can use different configuration statements in the file, some of which can be used multiple times. In general, the state- ments are written in capital letters, followed by an equals sign, - followed by settings particular to that statement. Here is a - list of allowed statements: + followed by settings particular to that statement. + + Here is a list of allowed statements: OPTIONS - There are two types of options, boolean and compound options. - Boolean options toggle a setting on or off, while compound op- - tions take more diverse values. Prefix a boolean option with - "no" or `!' to turn it off. For compound options, the option + There are two types of options, boolean and compound options. + Boolean options toggle a setting on or off, while compound op- + tions take more diverse values. Prefix a boolean option with + "no" or `!' to turn it off. For compound options, the option name and value are separated by a colon. Some options are per- sistent, and apply only to new games. You can specify multiple OPTIONS statements, and multiple options separated by commas in - a single OPTIONS statement. (Comma separated options are pro- + a single OPTIONS statement. (Comma separated options are pro- cessed from right to left.) - Example: + Example: - OPTIONS=dogname:Fido - OPTIONS=!legacy,autopickup,pickup_types:$"=/!?+ + OPTIONS=dogname:Fido + OPTIONS=!legacy,autopickup,pickup_types:$"=/!?+ HACKDIR - Default location of files NetHack needs. On Windows HACKDIR - defaults to the location of the NetHack.exe or NetHackw.exe - file so setting HACKDIR to override that is not usually + Default location of files NetHack needs. On Windows HACKDIR + defaults to the location of the NetHack.exe or NetHackw.exe - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3040,18 +3040,19 @@ - necessary or recommended. + file so setting HACKDIR to override that is not usually neces- + sary or recommended. LEVELDIR - The location that in-progress level files are stored. Defaults + The location that in-progress level files are stored. Defaults to HACKDIR, must be writable. SAVEDIR - The location where saved games are kept. Defaults to HACKDIR, + The location where saved games are kept. Defaults to HACKDIR, must be writable. BONESDIR - The location that bones files are kept. Defaults to HACKDIR, + The location that bones files are kept. Defaults to HACKDIR, must be writable. LOCKDIR @@ -3059,44 +3060,43 @@ Defaults to HACKDIR, must be writable. TROUBLEDIR - The location that a record of game aborts and self-diagnosed + The location that a record of game aborts and self-diagnosed game problems is kept. Defaults to HACKDIR, must be writable. AUTOCOMPLETE Enable or disable an extended command autocompletion. Autocom- - pletion has no effect for the X11 windowport. You can specify - multiple autocompletions. To enable autocompletion, list the - extended command. Prefix the command with "!" to disable the + pletion has no effect for the X11 windowport. You can specify + multiple autocompletions. To enable autocompletion, list the + extended command. Prefix the command with "!" to disable the autocompletion for that command. - Example: + Example: - AUTOCOMPLETE=zap,!annotate + AUTOCOMPLETE=zap,!annotate AUTOPICKUP_EXCEPTION - Set exceptions to the pickup_types option. See the "Configur- + Set exceptions to the pickup_types option. See the "Configur- ing Autopickup Exceptions" section. BINDINGS - Change the key bindings of some special keys, menu accelera- + Change the key bindings of some special keys, menu accelera- tors, or extended commands. You can specify multiple bindings. - Format is key followed by the command, separated by a colon. + Format is key followed by the command, separated by a colon. See the "Changing Key Bindings" section for more information. - Example: + Example: - BIND=^X:getpos.autodescribe + BIND=^X:getpos.autodescribe CHOOSE - Chooses at random one of the comma-separated parameters as an + Chooses at random one of the comma-separated parameters as an active section name. Lines in other sections are ignored. - Example: + Example: - - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3106,47 +3106,55 @@ - OPTIONS=color - CHOOSE=char A,char B - [char A] - OPTIONS=role:arc,race:dwa,align:law,gender:fem - [char B] - OPTIONS=role:wiz,race:elf,align:cha,gender:mal - - MSGTYPE - Change the way messages are shown in the top status line. See - the "Configuring Message Types" section. + OPTIONS=color + CHOOSE=char A,char B + [char A] + OPTIONS=role:arc,race:dwa,align:law,gender:fem + [char B] + OPTIONS=role:wiz,race:elf,align:cha,gender:mal MENUCOLOR Highlight menu lines with different colors. See the "Configur- ing Menu Colors" section. - SYMBOLS - Override one or more symbols in the symbols files. See the - "Modifying NetHack Symbols" section. + MSGTYPE + Change the way messages are shown in the top status line. See + the "Configuring Message Types" section. - Example: - - SYMBOLS=S_boulder:0 - - WIZKIT - Debug mode only: extra items to add to initial inventory. - Value is the name of a text file containing a list of item - names, one per line, up to a maximum of 128 lines. Each line - is processed by the function that handles wishing. - - Example: - - WIZKIT=~/wizkit.txt - - SOUNDDIR - Define the directory that contains the sound files. See the - "Configuring User Sounds" section. + ROGUESYMBOLS + Custom symbols for for the rogue level's symbol set. See SYM- + BOLS below. SOUND Define a sound mapping. See the "Configuring User Sounds" sec- tion. + SOUNDDIR + Define the directory that contains the sound files. See the + "Configuring User Sounds" section. + + SYMBOLS + Override one or more symbols in the symbol set used for all + dungeon levels except for the special rogue level. See the + "Modifying NetHack Symbols" section. + + Example: + + # replace small punctuation (tick marks) with easier to see digits + SYMBOLS=S_boulder:0,S_golem:7 + + WIZKIT + Debug mode only: extra items to add to initial inventory. + Value is the name of a text file containing a list of item + names, one per line, up to a maximum of 128 lines. Each line + is processed by the function that handles wishing. + + Example: + + WIZKIT=~/wizkit.txt + + + Here is a short example of config file contents: @@ -3154,15 +3162,7 @@ - - - - - - - - - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3187,12 +3187,12 @@ 9.3. Using the NETHACKOPTIONS environment variable - The NETHACKOPTIONS variable is a comma-separated list of - initial values for the various options. Some can only be turned - on or off. You turn one of these on by adding the name of the - option to the list, and turn it off by typing a `!' or "no" be- - fore the name. Others take a character string as a value. You - can set string options by typing the option name, a colon or + The NETHACKOPTIONS variable is a comma-separated list of + initial values for the various options. Some can only be turned + on or off. You turn one of these on by adding the name of the + option to the list, and turn it off by typing a `!' or "no" be- + fore the name. Others take a character string as a value. You + can set string options by typing the option name, a colon or equals sign, and then the value of the string. The value is ter- minated by the next comma or the end of string. @@ -3202,7 +3202,7 @@ % setenv NETHACKOPTIONS "color,\!leg,name:Blue Meanie,fruit:lime" - in csh (note the need to escape the `!' since it's special to + in csh (note the need to escape the `!' since it's special to that shell), or the pair of commands $ NETHACKOPTIONS="color,!leg,name:Blue Meanie,fruit:lime" @@ -3212,15 +3212,15 @@ The NETHACKOPTIONS value is effectively the same as a single OPTIONS statement in a configuration file. The "OPTIONS=" prefix - is implied and comma separated options are processed from right + is implied and comma separated options are processed from right to left. Other types of configuration statements such as BIND or MSGTYPE are not allowed. Instead of a comma-separated list of options, NETHACKOPTIONS - can be set to the full name of a configuration file you want to - use. If that full name doesn't start with a slash, precede it - with `@' (at-sign) to let NetHack know that the rest is intended - as a file name. If it does start with `/', the at-sign is op- + can be set to the full name of a configuration file you want to + use. If that full name doesn't start with a slash, precede it + with `@' (at-sign) to let NetHack know that the rest is intended + as a file name. If it does start with `/', the at-sign is op- tional. @@ -3228,7 +3228,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3241,28 +3241,28 @@ 9.4. Customization options Here are explanations of what the various options do. Char- - acter strings that are too long may be truncated. Some of the + acter strings that are too long may be truncated. Some of the options listed may be inactive in your dungeon. - Some options are persistent, and are saved and reloaded + Some options are persistent, and are saved and reloaded along with the game. Changing a persistent option in the config- uration file applies only to new games. acoustics - Enable messages about what your character hears (default on). + Enable messages about what your character hears (default on). Note that this has nothing to do with your computer's audio ca- pabilities. Persistent. align - Your starting alignment (align:lawful, align:neutral, or - align:chaotic). You may specify just the first letter. The - default is to randomly pick an appropriate alignment. If you + Your starting alignment (align:lawful, align:neutral, or + align:chaotic). You may specify just the first letter. The + default is to randomly pick an appropriate alignment. If you prefix the value with `!' or "no", you will exclude that align- - ment from being picked randomly. Cannot be set with the `O' + ment from being picked randomly. Cannot be set with the `O' command. Persistent. autodescribe - Automatically describe the terrain under cursor when asked to + Automatically describe the terrain under cursor when asked to get a location on the map (default true). The whatis_coord op- tion controls whether the description includes map coordinates. @@ -3294,7 +3294,7 @@ tent. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3349,9 +3349,9 @@ Show out-of-sight areas of lit rooms (default on). Persistent. disclose - Controls what information the program reveals when the game - ends. Value is a space separated list of prompting/category - pairs (default is "ni na nv ng nc no", prompt with default re- + Controls what information the program reveals when the game + ends. Value is a space separated list of prompting/category + pairs (default is "ni na nv ng nc no", prompt with default re- sponse of `n' for each candidate). Persistent. The possibili- ties are: @@ -3360,7 +3360,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3377,8 +3377,8 @@ c - display your conduct; o - display dungeon overview. - Each disclosure possibility can optionally be preceded by a - prefix which lets you refine how it behaves. Here are the + Each disclosure possibility can optionally be preceded by a + prefix which lets you refine how it behaves. Here are the valid prefixes: y - prompt you and default to yes on the prompt; @@ -3386,27 +3386,27 @@ + - disclose it without prompting; - - do not disclose it and do not prompt. - The listing of vanquished monsters can be sorted, so there are + The listing of vanquished monsters can be sorted, so there are two additional choices for `v': ? - prompt you and default to ask on the prompt; # - disclose it without prompting, ask for sort order. Asking refers to picking one of the orderings from a menu. The - `+' disclose without prompting choice, or being prompted and + `+' disclose without prompting choice, or being prompted and answering `y' rather than `a', will default to showing monsters in the traditional order, from high level to low level. Omitted categories are implicitly added with `n' prefix. Spec- ified categories with omitted prefix implicitly use `+' prefix. - Order of the disclosure categories does not matter, program + Order of the disclosure categories does not matter, program display for end-of-game disclosure follows a set sequence. - (for example "disclose:yi na +v -g o") The example sets inven- + (for example "disclose:yi na +v -g o") The example sets inven- tory to prompt and default to yes, attributes to prompt and de- fault to no, vanquished to disclose without prompting, genocid- ed to not disclose and not prompt, conduct to implicitly prompt - and default to no, and overview to disclose without prompting. + and default to no, and overview to disclose without prompting. Note that the vanquished monsters list includes all monsters killed by traps and each other as well as by you. And the dun- @@ -3421,12 +3421,12 @@ Changes the extended commands interface to pop-up a menu of available commands. It is keystroke compatible with the tradi- tional interface except that it does not require that you hit - Enter. It is implemented for the tty interface (default off). + Enter. It is implemented for the tty interface (default off). - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3438,61 +3438,61 @@ For the X11 interface, which always uses a menu for choosing an extended command, it controls whether the menu shows all avail- - able commands (on) or just the subset of commands which have + able commands (on) or just the subset of commands which have traditionally been considered extended ones (off). female - An obsolete synonym for "gender:female". Cannot be set with + An obsolete synonym for "gender:female". Cannot be set with the `O' command. fixinv - An object's inventory letter sticks to it when it's dropped - (default on). If this is off, dropping an object shifts all + An object's inventory letter sticks to it when it's dropped + (default on). If this is off, dropping an object shifts all the remaining inventory letters. Persistent. force_invmenu - Commands asking for an inventory item show a menu instead of a + Commands asking for an inventory item show a menu instead of a text query with possible menu letters. Default is off. fruit - Name a fruit after something you enjoy eating (for example - "fruit:mango") (default "slime mold"). Basically a nostalgic - whimsy that NetHack uses from time to time. You should set - this to something you find more appetizing than slime mold. - Apples, oranges, pears, bananas, and melons already exist in + Name a fruit after something you enjoy eating (for example + "fruit:mango") (default "slime mold"). Basically a nostalgic + whimsy that NetHack uses from time to time. You should set + this to something you find more appetizing than slime mold. + Apples, oranges, pears, bananas, and melons already exist in NetHack, so don't use those. gender - Your starting gender (gender:male or gender:female). You may - specify just the first letter. Although you can still denote + Your starting gender (gender:male or gender:female). You may + specify just the first letter. Although you can still denote your gender using the "male" and "female" options, the "gender" - option will take precedence. The default is to randomly pick - an appropriate gender. If you prefix the value with `!' or - "no", you will exclude that gender from being picked randomly. + option will take precedence. The default is to randomly pick + an appropriate gender. If you prefix the value with `!' or + "no", you will exclude that gender from being picked randomly. Cannot be set with the `O' command. Persistent. goldX - When filtering objects based on bless/curse state (BUCX), - whether to treat gold pieces as X (unknown bless/curse state, - when "on") or U (known to be uncursed, when "off", the de- - fault). Gold is never blessed or cursed, but it is not de- + When filtering objects based on bless/curse state (BUCX), + whether to treat gold pieces as X (unknown bless/curse state, + when "on") or U (known to be uncursed, when "off", the de- + fault). Gold is never blessed or cursed, but it is not de- scribed as "uncursed" even when the implicit_uncursed option is "off". help - If more information is available for an object looked at with + If more information is available for an object looked at with the `/' command, ask if you want to see it (default on). Turn- - ing help off makes just looking at things faster, since you - aren't interrupted with the "More info?" prompt, but it also + ing help off makes just looking at things faster, since you + aren't interrupted with the "More info?" prompt, but it also means that you might miss some interesting and/or important in- formation. Persistent. herecmd_menu - When using a windowport that supports mouse and clicking on - yourself or next to you, show a menu of possible actions for + When using a windowport that supports mouse and clicking on + yourself or next to you, show a menu of possible actions for - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3502,34 +3502,34 @@ - the location. Same as "#herecmdmenu" and "#therecmdmenu" com- + the location. Same as "#herecmdmenu" and "#therecmdmenu" com- mands. hilite_pet - Visually distinguish pets from similar animals (default off). - The behavior of this option depends on the type of windowing + Visually distinguish pets from similar animals (default off). + The behavior of this option depends on the type of windowing you use. In text windowing, text highlighting or inverse video - is often used; with tiles, generally displays a heart symbol + is often used; with tiles, generally displays a heart symbol near pets. - With the curses interface, the petattr option controls how to - highlight pets and setting it will turn the hilite_pet option + With the curses interface, the petattr option controls how to + highlight pets and setting it will turn the hilite_pet option on or off as warranted. hilite_pile - Visually distinguish piles of objects from individual objects + Visually distinguish piles of objects from individual objects (default off). The behavior of this option depends on the type - of windowing you use. In text windowing, text highlighting or - inverse video is often used; with tiles, generally displays a + of windowing you use. In text windowing, text highlighting or + inverse video is often used; with tiles, generally displays a small plus-symbol beside the object on the top of the pile. hitpointbar - Show a hit point bar graph behind your name and title. Only - available for TTY and Windows GUI, and only when statushilites + Show a hit point bar graph behind your name and title. Only + available for TTY and Windows GUI, and only when statushilites is on. horsename - Name your starting horse (for example "horsename:Trigger"). + Name your starting horse (for example "horsename:Trigger"). Cannot be set with the `O' command. ignintr @@ -3558,7 +3558,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3569,34 +3569,34 @@ male - An obsolete synonym for "gender:male". Cannot be set with the + An obsolete synonym for "gender:male". Cannot be set with the `O' command. mention_walls Give feedback when walking against a wall (default off). menucolors - Enable coloring menu lines (default off). See "Configuring + Enable coloring menu lines (default off). See "Configuring Menu Colors" on how to configure the colors. menustyle Controls the interface used when you need to choose various ob- - jects (in response to the Drop command, for instance). The - value specified should be the first letter of one of the fol- - lowing: traditional, combination, full, or partial. Tradi- - tional was the only interface available for early versions; it - consists of a prompt for object class characters, followed by - an object-by-object prompt for all items matching the selected - object class(es). Combination starts with a prompt for object + jects (in response to the Drop command, for instance). The + value specified should be the first letter of one of the fol- + lowing: traditional, combination, full, or partial. Tradi- + tional was the only interface available for early versions; it + consists of a prompt for object class characters, followed by + an object-by-object prompt for all items matching the selected + object class(es). Combination starts with a prompt for object class(es) of interest, but then displays a menu of matching ob- - jects rather than prompting one-by-one. Full displays a menu - of object classes rather than a character prompt, and then a - menu of matching objects for selection. Partial skips the ob- + jects rather than prompting one-by-one. Full displays a menu + of object classes rather than a character prompt, and then a + menu of matching objects for selection. Partial skips the ob- ject class filtering and immediately displays a menu of all ob- jects. Persistent. menu_deselect_all - Menu character accelerator to deselect all items in a menu. + Menu character accelerator to deselect all items in a menu. Implemented by the Amiga, Gem, X11 and tty ports. Default `-'. menu_deselect_page @@ -3624,7 +3624,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3690,7 +3690,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3735,7 +3735,7 @@ Send padding nulls to the terminal (default on). Persistent. number_pad - Use digit keys instead of letters to move (default 0 or off). + Use digit keys instead of letters to move (default 0 or off). Valid settings are: 0 - move by letters; "yuhjklbn" @@ -3745,18 +3745,18 @@ 4 - combines 3 with 2; phone layout plus MS-DOS compatibility -1 - by letters but use `z' to go northwest, `y' to zap wands - For backward compatibility, omitting a value is the same as - specifying 1 and negating number_pad is the same as specifying - 0. (Settings 2 and 4 are for compatibility with MS-DOS or old + For backward compatibility, omitting a value is the same as + specifying 1 and negating number_pad is the same as specifying + 0. (Settings 2 and 4 are for compatibility with MS-DOS or old PC Hack; in addition to the different behavior for `5', `Alt-5' acts as `G' and `Alt-0' acts as `I'. Setting -1 is to accommo- - date some QWERTZ keyboards which have the location of the `y' - and `z' keys swapped.) When moving by numbers, to enter a + date some QWERTZ keyboards which have the location of the `y' + and `z' keys swapped.) When moving by numbers, to enter a count prefix for those commands which accept one (such as "12s" - to search twelve times), precede it with the letter `n' + to search twelve times), precede it with the letter `n' - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3769,60 +3769,60 @@ ("n12s"). packorder - Specify the order to list object types in (default + Specify the order to list object types in (default "")[%?+!=/(*`0_"). The value of this option should be a string containing the symbols for the various object types. Any omit- ted types are filled in at the end from the previous order. paranoid_confirmation - A space separated list of specific situations where alternate - prompting is desired. The default is paranoid_confirma- + A space separated list of specific situations where alternate + prompting is desired. The default is paranoid_confirma- tion:pray. - Confirm - for any prompts which are set to require "yes" - rather than `y', also require "no" to reject in- + Confirm - for any prompts which are set to require "yes" + rather than `y', also require "no" to reject in- stead of accepting any non-yes response as no quit - require "yes" rather than `y' to confirm quitting - the game or switching into non-scoring explore + the game or switching into non-scoring explore mode; - die - require "yes" rather than `y' to confirm dying - (not useful in normal play; applies to explore + die - require "yes" rather than `y' to confirm dying + (not useful in normal play; applies to explore mode); - bones - require "yes" rather than `y' to confirm saving + bones - require "yes" rather than `y' to confirm saving bones data when dying in debug mode; - attack - require "yes" rather than `y' to confirm attack- + attack - require "yes" rather than `y' to confirm attack- ing a peaceful monster; wand-break - require "yes" rather than `y' to confirm breaking a wand; Were-change - require "yes" rather than `y' to confirm changing - form due to lycanthropy when hero has polymorph + form due to lycanthropy when hero has polymorph control; - pray - require `y' to confirm an attempt to pray rather + pray - require `y' to confirm an attempt to pray rather than immediately praying; on by default; - Remove - require selection from inventory for `R' and `T' - commands even when wearing just one applicable + Remove - require selection from inventory for `R' and `T' + commands even when wearing just one applicable item. all - turn on all of the above. - By default, the pray choice is enabled, the others disabled. - To disable it without setting any of the other choices, use + By default, the pray choice is enabled, the others disabled. + To disable it without setting any of the other choices, use "paranoid_confirmation:none". To keep it enabled while setting - any of the others, include it in the list, such as "para- + any of the others, include it in the list, such as "para- noid_confirmation:attack pray Remove". perm_invent - If true, always display your current inventory in a window. - This only makes sense for windowing system interfaces that im- + If true, always display your current inventory in a window. + This only makes sense for windowing system interfaces that im- plement this feature. petattr - Specifies one or more text highlighting attributes to use when - showing pets on the map. Effectively a superset of the + Specifies one or more text highlighting attributes to use when + showing pets on the map. Effectively a superset of the hilite_pet boolean option. Curses interface only; value is one or more of the following letters. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3842,35 +3842,35 @@ l - Left line indicator r - Right line indicator - Some of those choices might not work, particularly the final - three, depending upon terminal hardware or terminal emulation + Some of those choices might not work, particularly the final + three, depending upon terminal hardware or terminal emulation software. - Currently multiple highlight-style letters can be combined by - simply stringing them together (for example, "bk"), but in the - future they might require being separated by plus signs (such - as "b+k", which works already). When using the `n' choice, it - should be specified on its own, not in combination with any of + Currently multiple highlight-style letters can be combined by + simply stringing them together (for example, "bk"), but in the + future they might require being separated by plus signs (such + as "b+k", which works already). When using the `n' choice, it + should be specified on its own, not in combination with any of the other letters. pettype - Specify the type of your initial pet, if you are playing a - character class that uses multiple types of pets; or choose to - have no initial pet at all. Possible values are "cat", "dog", + Specify the type of your initial pet, if you are playing a + character class that uses multiple types of pets; or choose to + have no initial pet at all. Possible values are "cat", "dog", "horse", and "none". If the choice is not allowed for the role - you are currently playing, it will be silently ignored. For - example, "horse" will only be honored when playing a knight. + you are currently playing, it will be silently ignored. For + example, "horse" will only be honored when playing a knight. Cannot be set with the `O' command. pickup_burden - When you pick up an item that would exceed this encumbrance - level (Unencumbered, Burdened, streSsed, straiNed, overTaxed, - or overLoaded), you will be asked if you want to continue. + When you pick up an item that would exceed this encumbrance + level (Unencumbered, Burdened, streSsed, straiNed, overTaxed, + or overLoaded), you will be asked if you want to continue. (Default `S'). Persistent. pickup_thrown - If this option is on and autopickup is also on, try to pick up - things that you threw, even if they aren't in pickup_types or + If this option is on and autopickup is also on, try to pick up + things that you threw, even if they aren't in pickup_types or match an autopickup exception. Default is on. Persistent. pickup_types @@ -3880,15 +3880,15 @@ sistent. pile_limit - When walking across a pile of objects on the floor, threshold - at which the message "there are few/several/many objects here" - is given instead of showing a popup list of those objects. A - value of 0 means "no limit" (always list the objects); a value - of 1 effectively means "never show the objects" since the pile - size will always be at least that big; default value is 5. + When walking across a pile of objects on the floor, threshold + at which the message "there are few/several/many objects here" + is given instead of showing a popup list of those objects. A + value of 0 means "no limit" (always list the objects); a value + of 1 effectively means "never show the objects" since the pile + size will always be at least that big; default value is 5. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3901,60 +3901,60 @@ Persistent. playmode - Values are "normal", "explore", or "debug". Allows selection - of explore mode (also known as discovery mode) or debug mode + Values are "normal", "explore", or "debug". Allows selection + of explore mode (also known as discovery mode) or debug mode (also known as wizard mode) instead of normal play. Debug mode - might only be allowed for someone logged in under a particular - user name (on multi-user systems) or specifying a particular + might only be allowed for someone logged in under a particular + user name (on multi-user systems) or specifying a particular character name (on single-user systems) or it might be disabled - entirely. Requesting it when not allowed or not possible re- + entirely. Requesting it when not allowed or not possible re- sults in explore mode instead. Default is normal play. pushweapon - Using the `w' (wield) command when already wielding something - pushes the old item into your alternate weapon slot (default - off). Likewise for the `a' (apply) command if it causes the + Using the `w' (wield) command when already wielding something + pushes the old item into your alternate weapon slot (default + off). Likewise for the `a' (apply) command if it causes the applied item to become wielded. Persistent. race Selects your race (for example, "race:human"). Default is ran- - dom. If you prefix the value with `!' or "no", you will ex- + dom. If you prefix the value with `!' or "no", you will ex- clude that race from being picked randomly. Cannot be set with the `O' command. Persistent. rest_on_space - Make the space bar a synonym for the `.' (#wait) command (de- + Make the space bar a synonym for the `.' (#wait) command (de- fault off). Persistent. role - Pick your type of character (for example "role:Samurai"); syn- - onym for "character". See "name" for an alternate method of - specifying your role. Normally only the first letter of the - value is examined; `r' is an exception with "Rogue", "Ranger", + Pick your type of character (for example "role:Samurai"); syn- + onym for "character". See "name" for an alternate method of + specifying your role. Normally only the first letter of the + value is examined; `r' is an exception with "Rogue", "Ranger", and "random" values. If you prefix the value with `!' or "no", - you will exclude that role from being picked randomly. Cannot + you will exclude that role from being picked randomly. Cannot be set with the `O' command. Persistent. roguesymset - This option may be used to select one of the named symbol sets - found within "symbols" to alter the symbols displayed on the + This option may be used to select one of the named symbol sets + found within "symbols" to alter the symbols displayed on the screen on the rogue level. rlecomp When writing out a save file, perform run length compression of - the map. Not all ports support run length compression. It has + the map. Not all ports support run length compression. It has no effect on reading an existing save file. runmode - Controls the amount of screen updating for the map window when - engaged in multi-turn movement (running via shift+direction or - control+direction and so forth, or via the travel command or + Controls the amount of screen updating for the map window when + engaged in multi-turn movement (running via shift+direction or + control+direction and so forth, or via the travel command or mouse click). The possible values are: teleport - update the map after movement has finished; - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -3969,13 +3969,13 @@ crawl - like walk, but pause briefly after each step. This option only affects the game's screen display, not the ac- - tual results of moving. The default is "run"; versions prior - to 3.4.1 used "teleport" only. Whether or not the effect is + tual results of moving. The default is "run"; versions prior + to 3.4.1 used "teleport" only. Whether or not the effect is noticeable will depend upon the window port used or on the type of terminal. Persistent. safe_pet - Prevent you from (knowingly) attacking your pets (default on). + Prevent you from (knowingly) attacking your pets (default on). Persistent. sanity_check @@ -3983,8 +3983,8 @@ off). Debug mode only. scores - Control what parts of the score list you are shown at the end - (for example "scores:5 top scores/4 around my score/own + Control what parts of the score list you are shown at the end + (for example "scores:5 top scores/4 around my score/own scores"). Only the first letter of each category (`t', `a', or `o') is necessary. Persistent. @@ -3993,9 +3993,9 @@ off). Persistent. showrace - Display yourself as the glyph for your race, rather than the - glyph for your role (default off). Note that this setting af- - fects only the appearance of the display, not the way the game + Display yourself as the glyph for your race, rather than the + glyph for your role (default off). Note that this setting af- + fects only the appearance of the display, not the way the game treats you. Persistent. showscore @@ -4007,20 +4007,20 @@ sortloot Controls the sorting behavior of the pickup lists for inventory - and #loot commands and some others. Persistent. The possible + and #loot commands and some others. Persistent. The possible values are: full - always sort the lists; - loot - only sort the lists that don't use inventory letters, + loot - only sort the lists that don't use inventory letters, like with the #loot and pickup commands; none - show lists the traditional way without sorting. sortpack - Sort the pack contents by type when displaying inventory (de- + Sort the pack contents by type when displaying inventory (de- fault on). Persistent. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4032,40 +4032,40 @@ sparkle Display a sparkly effect when a monster (including yourself) is - hit by an attack to which it is resistant (default on). Per- + hit by an attack to which it is resistant (default on). Per- sistent. standout Boldface monsters and "--More--" (default off). Persistent. statushilites - Controls how many turns status hilite behaviors highlight the - field. If negated or set to zero, disables status hiliting. + Controls how many turns status hilite behaviors highlight the + field. If negated or set to zero, disables status hiliting. See "Configuring Status Hilites" for further information. status_updates - Allow updates to the status lines at the bottom of the screen + Allow updates to the status lines at the bottom of the screen (default true). suppress_alert - This option may be set to a NetHack version level to suppress - alert notification messages about feature changes for that and + This option may be set to a NetHack version level to suppress + alert notification messages about feature changes for that and prior versions (for example "suppress_alert:3.3.1"). symset - This option may be used to select one of the named symbol sets - found within "symbols" to alter the symbols displayed on the - screen. Use "symset:default" to explicitly select the default + This option may be used to select one of the named symbol sets + found within "symbols" to alter the symbols displayed on the + screen. Use "symset:default" to explicitly select the default symbols. time - Show the elapsed game time in turns on bottom line (default + Show the elapsed game time in turns on bottom line (default off). Persistent. timed_delay - When pausing momentarily for display effect, such as with ex- - plosions and moving objects, use a timer rather than sending - extra characters to the screen. (Applies to "tty" interface + When pausing momentarily for display effect, such as with ex- + plosions and moving objects, use a timer rather than sending + extra characters to the screen. (Applies to "tty" interface only; "X11" interface always uses a timer based delay. The de- fault is on if configured into the program.) Persistent. @@ -4075,18 +4075,18 @@ toptenwin Put the ending display in a NetHack window instead of on stdout - (default off). Setting this option makes the score list visi- - ble when a windowing version of NetHack is started without a - parent window, but it no longer leaves the score list around + (default off). Setting this option makes the score list visi- + ble when a windowing version of NetHack is started without a + parent window, but it no longer leaves the score list around after game end on a terminal or emulating window. travel Allow the travel command (default on). Turning this option off - will prevent the game from attempting unintended moves if you + will prevent the game from attempting unintended moves if you make inadvertent mouse clicks on the map window. Persistent. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4097,13 +4097,13 @@ verbose - Provide more commentary during the game (default on). Persis- + Provide more commentary during the game (default on). Persis- tent. whatis_coord - When using the `/' or `;' commands to look around on the map - with autodescribe on, display coordinates after the descrip- - tion. Also works in other situations where you are asked to + When using the `/' or `;' commands to look around on the map + with autodescribe on, display coordinates after the descrip- + tion. Also works in other situations where you are asked to pick a location. The possible settings are: @@ -4120,39 +4120,39 @@ whatis_filter When getting a location on the map, and using the keys to cycle - through next and previous targets, allows filtering the possi- + through next and previous targets, allows filtering the possi- ble targets. n - no filtering [default] v - in view only a - in same area only - The area-filter tries to be slightly predictive -- if you're + The area-filter tries to be slightly predictive -- if you're standing on a doorway, it will consider the area on the side of the door you were last moving towards. - Filtering can also be changed when getting a location with the + Filtering can also be changed when getting a location with the "getpos.filter" key. whatis_menu - When getting a location on the map, and using a key to cycle + When getting a location on the map, and using a key to cycle through next and previous targets, use a menu instead to pick a target. (default off) whatis_moveskip - When getting a location on the map, and using shifted movement + When getting a location on the map, and using shifted movement keys or meta-digit keys to fast-move, instead of moving 8 units at a time, move by skipping the same glyphs. (default off) windowtype When the program has been built to support multiple interfaces, - select which one to use, such as "tty" or "X11" (default de- + select which one to use, such as "tty" or "X11" (default de- pends on build-time settings; use "#version" to check). Cannot be set with the `O' command. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4162,10 +4162,10 @@ - When used, it should be the first option set since its value - might enable or disable the availability of various other op- - tions. For multiple lines in a configuration file, that would - be the first non-comment line. For a comma-separated list in + When used, it should be the first option set since its value + might enable or disable the availability of various other op- + tions. For multiple lines in a configuration file, that would + be the first non-comment line. For a comma-separated list in NETHACKOPTIONS or an OPTIONS line in a configuration file, that would be the rightmost option in the list. @@ -4174,35 +4174,35 @@ off). Debug mode only. zerocomp - When writing out a save file, perform zero-comp compression of - the contents. Not all ports support zero-comp compression. It + When writing out a save file, perform zero-comp compression of + the contents. Not all ports support zero-comp compression. It has no effect on reading an existing save file. 9.5. Window Port Customization options - Here are explanations of the various options that are used - to customize and change the characteristics of the windowtype + Here are explanations of the various options that are used + to customize and change the characteristics of the windowtype that you have chosen. Character strings that are too long may be - truncated. Not all window ports will adjust for all settings - listed here. You can safely add any of these options to your - config file, and if the window port is capable of adjusting to - suit your preferences, it will attempt to do so. If it can't it - will silently ignore it. You can find out if an option is sup- - ported by the window port that you are currently using by check- - ing to see if it shows up in the Options list. Some options are - dynamic and can be specified during the game with the `O' com- + truncated. Not all window ports will adjust for all settings + listed here. You can safely add any of these options to your + config file, and if the window port is capable of adjusting to + suit your preferences, it will attempt to do so. If it can't it + will silently ignore it. You can find out if an option is sup- + ported by the window port that you are currently using by check- + ing to see if it shows up in the Options list. Some options are + dynamic and can be specified during the game with the `O' com- mand. align_message - Where to align or place the message window (top, bottom, left, + Where to align or place the message window (top, bottom, left, or right) align_status - Where to align or place the status window (top, bottom, left, + Where to align or place the status window (top, bottom, left, or right). ascii_map - If NetHack can, it should display an ascii character map if it + If NetHack can, it should display an ascii character map if it can. color @@ -4210,15 +4210,15 @@ monsters, objects, and dungeon features. eight_bit_tty - If NetHack can, it should pass eight-bit character values (for - example, specified with the traps option) straight through to + If NetHack can, it should pass eight-bit character values (for + example, specified with the traps option) straight through to your terminal (default off). font_map if NetHack can, it should use a font by the chosen name for the - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4231,7 +4231,7 @@ map window. font_menu - If NetHack can, it should use a font by the chosen name for + If NetHack can, it should use a font by the chosen name for menu windows. font_message @@ -4243,15 +4243,15 @@ status window. font_text - If NetHack can, it should use a font by the chosen name for + If NetHack can, it should use a font by the chosen name for text windows. font_size_map - If NetHack can, it should use this size font for the map win- + If NetHack can, it should use this size font for the map win- dow. font_size_menu - If NetHack can, it should use this size font for menu windows. + If NetHack can, it should use this size font for menu windows. font_size_message If NetHack can, it should use this size font for the message @@ -4262,29 +4262,29 @@ window. font_size_text - If NetHack can, it should use this size font for text windows. + If NetHack can, it should use this size font for text windows. fullscreen - If NetHack can, it should try and display on the entire screen + If NetHack can, it should try and display on the entire screen rather than in a window. guicolor - Use color text and/or highlighting attributes when displaying - some non-map data (such as menu selector letters). Curses in- + Use color text and/or highlighting attributes when displaying + some non-map data (such as menu selector letters). Curses in- terface only; default is on. large_font If NetHack can, it should use a large font. map_mode - If NetHack can, it should display the map in the manner speci- + If NetHack can, it should display the map in the manner speci- fied. player_selection - If NetHack can, it should pop up dialog boxes, or use prompts + If NetHack can, it should pop up dialog boxes, or use prompts - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4301,27 +4301,27 @@ preload_tiles If NetHack can, it should preload tiles into memory. For exam- - ple, in the protected mode MS-DOS version, control whether - tiles get pre-loaded into RAM at the start of the game. Doing - so enhances performance of the tile graphics, but uses more + ple, in the protected mode MS-DOS version, control whether + tiles get pre-loaded into RAM at the start of the game. Doing + so enhances performance of the tile graphics, but uses more memory. (default on). Cannot be set with the `O' command. scroll_amount - If NetHack can, it should scroll the display by this number of + If NetHack can, it should scroll the display by this number of cells when the hero reaches the scroll_margin. scroll_margin - If NetHack can, it should scroll the display when the hero or - cursor is this number of cells away from the edge of the win- + If NetHack can, it should scroll the display when the hero or + cursor is this number of cells away from the edge of the win- dow. selectsaved - If NetHack can, it should display a menu of existing saved + If NetHack can, it should display a menu of existing saved games for the player to choose from at game startup, if it can. Not all ports support this option. softkeyboard - Display an onscreen keyboard. Handhelds are most likely to + Display an onscreen keyboard. Handhelds are most likely to support this option. splash_screen @@ -4329,28 +4329,28 @@ it starts up (default yes). statuslines - Number of lines for traditional below-the-map status display. - Acceptable values are 2 and 3 (default is 2). Curses and tty + Number of lines for traditional below-the-map status display. + Acceptable values are 2 and 3 (default is 2). Curses and tty interfaces only. term_cols and term_rows - Curses interface only. Number of columns and rows to use for + Curses interface only. Number of columns and rows to use for the display. Curses will attempt to resize to the values spec- - ified but will settle for smaller sizes if they are too big. + ified but will settle for smaller sizes if they are too big. Default is the current window size. tiled_map If NetHack can, it should display a tiled map if it can. tile_file - Specify the name of an alternative tile file to override the + Specify the name of an alternative tile file to override the default. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4361,7 +4361,7 @@ tile_height - Specify the preferred height of each tile in a tile capable + Specify the preferred height of each tile in a tile capable port. tile_width @@ -4416,7 +4416,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4482,7 +4482,7 @@ (default on, PC NetHack only). Cannot be set with the `O' - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4548,7 +4548,7 @@ up_exception option should be followed by a regular expression - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4614,7 +4614,7 @@ bols into menu accelerators. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4680,7 +4680,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4746,7 +4746,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4800,11 +4800,11 @@ Prefix key to run towards a direction. Default is `G'. run.nopickup - Prefix key to run towards a direction without picking up items + Prefix key to run towards a direction without picking up items on the way. Default is `M'. run.numpad - Prefix key to run towards a direction. With number_pad only. + Prefix key to run towards a direction. With number_pad only. Default is `5'. rush @@ -4812,7 +4812,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4840,45 +4840,45 @@ show - show message normally; hide - never show the message; stop - wait for user with more-prompt; - norep - show the message once, but not again if no other mes- + norep - show the message once, but not again if no other mes- sage is shown in between. - Here's an example of message types using NetHack's internal + Here's an example of message types using NetHack's internal pattern matching facility: MSGTYPE=stop "You feel hungry." MSGTYPE=hide "You displaced *." - specifies that whenever a message "You feel hungry" is shown, - the user is prompted with more-prompt, and a message matching + specifies that whenever a message "You feel hungry" is shown, + the user is prompted with more-prompt, and a message matching "You displaced ." is not shown at all. - The order of the defined MSGTYPE-lines is important; the last - matching rule is used. Put the general case first, exceptions + The order of the defined MSGTYPE-lines is important; the last + matching rule is used. Put the general case first, exceptions below them. 9.11. Configuring Menu Colors Some platforms allow you to define colors used in menu lines - when the line matches a user-defined pattern. At this time the + when the line matches a user-defined pattern. At this time the tty, win32tty and win32gui support this. - In general, the config file entries to configure the menu + In general, the config file entries to configure the menu color mappings look like this: MENUCOLOR="pattern"=color&attribute pattern - the pattern to match; - color - the color to use for lines matching the pat- + color - the color to use for lines matching the pat- tern; - attribute - the attribute to use for lines matching the - pattern. The attribute is optional, and if + attribute - the attribute to use for lines matching the + pattern. The attribute is optional, and if left out, you must also leave out the preced- - ing ampersand. If no attribute is defined, + ing ampersand. If no attribute is defined, no attribute is used. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -4890,61 +4890,61 @@ The pattern should be a regular expression. - Allowed colors are black, red, green, brown, blue, magenta, - cyan, gray, orange, light-green, yellow, light-blue, light-ma- - genta, light-cyan, and white. And no-color, the default fore- - ground color, which isn't necessarily the same as any of the + Allowed colors are black, red, green, brown, blue, magenta, + cyan, gray, orange, light-green, yellow, light-blue, light-ma- + genta, light-cyan, and white. And no-color, the default fore- + ground color, which isn't necessarily the same as any of the other colors. - Allowed attributes are none, bold, dim, underline, blink, and - inverse. "Normal" is a synonym for "none". Note that the + Allowed attributes are none, bold, dim, underline, blink, and + inverse. "Normal" is a synonym for "none". Note that the platform used may interpret the attributes any way it wants. - Here's an example of menu colors using NetHack's internal pat- + Here's an example of menu colors using NetHack's internal pat- tern matching facility: MENUCOLOR="* blessed *"=green MENUCOLOR="* cursed *"=red MENUCOLOR="* cursed *(being worn)"=red&underline - specifies that any menu line with " blessed " contained in it - will be shown in green color, lines with " cursed " will be - shown in red, and lines with " cursed " followed by "(being - worn)" on the same line will be shown in red color and under- - lined. You can have multiple MENUCOLOR entries in your config - file, and the last MENUCOLOR-line in your config file that + specifies that any menu line with " blessed " contained in it + will be shown in green color, lines with " cursed " will be + shown in red, and lines with " cursed " followed by "(being + worn)" on the same line will be shown in red color and under- + lined. You can have multiple MENUCOLOR entries in your config + file, and the last MENUCOLOR-line in your config file that matches a menu line will be used for the line. Note that if you intend to have one or more color specifica- - tions match " uncursed ", you will probably want to turn the im- + tions match " uncursed ", you will probably want to turn the im- plicit_uncursed option off so that all items known to be uncursed are actually displayed with the "uncursed" description. 9.12. Configuring User Sounds - Some platforms allow you to define sound files to be played - when a message that matches a user-defined pattern is delivered + Some platforms allow you to define sound files to be played + when a message that matches a user-defined pattern is delivered to the message window. At this time the Qt port and the win32tty and win32gui ports support the use of user sounds. - The following config file entries are relevant to mapping + The following config file entries are relevant to mapping user sounds to messages: SOUNDDIR The directory that houses the sound files to be played. SOUND - An entry that maps a sound file to a user-specified message - pattern. Each SOUND entry is broken down into the following + An entry that maps a sound file to a user-specified message + pattern. Each SOUND entry is broken down into the following parts: - MESG - message window mapping (the only one supported in + MESG - message window mapping (the only one supported in 3.6); pattern - the pattern to match; sound file - the sound file to play; - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5010,7 +5010,7 @@ fy just one attribute. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5049,34 +5049,34 @@ * "always" will set the default attributes for that field. - * "up" and "down" set the field attributes for when the - field value changes upwards or downwards. This attribute + * "up" and "down" set the field attributes for when the + field value changes upwards or downwards. This attribute times out after statushilites turns. * "changed" sets the field attribute for when the field val- - ue changes. This attribute times out after statushilites - turns. (If a field has both a "changed" rule and an "up" - or "down" rule which matches a change in the field's val- + ue changes. This attribute times out after statushilites + turns. (If a field has both a "changed" rule and an "up" + or "down" rule which matches a change in the field's val- ue, the "up" or "down" one takes precedence.) - * percentage sets the field attribute when the field value - matches the percentage. It is specified as a number be- - tween 0 and 100, followed by `%' (percent sign). If the - percentage is prefixed with `<=' or `>=', it also matches - when value is below or above the percentage. Use prefix - `<' or `>' to match when strictly below or above. (The - numeric limit is relaxed slightly for those: >-1% and - <101% are allowed.) Only four fields support percentage - rules. Percentages for "hitpoints" and "power" are - straightforward; they're based on the corresponding maxi- - mum field. Percentage highlight rules are also allowed + * percentage sets the field attribute when the field value + matches the percentage. It is specified as a number be- + tween 0 and 100, followed by `%' (percent sign). If the + percentage is prefixed with `<=' or `>=', it also matches + when value is below or above the percentage. Use prefix + `<' or `>' to match when strictly below or above. (The + numeric limit is relaxed slightly for those: >-1% and + <101% are allowed.) Only four fields support percentage + rules. Percentages for "hitpoints" and "power" are + straightforward; they're based on the corresponding maxi- + mum field. Percentage highlight rules are also allowed for "experience level" and "experience points" (valid when the showexp option is enabled). For those, the percentage is based on the progress from the start of the current ex- - perience level to the start of the next level. So if + perience level to the start of the next level. So if - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5086,32 +5086,32 @@ - level 2 starts at 20 points and level 3 starts at 40 - points, having 30 points is 50% and 35 points is 75%. - 100% is unattainable for experience because you'll gain a + level 2 starts at 20 points and level 3 starts at 40 + points, having 30 points is 50% and 35 points is 75%. + 100% is unattainable for experience because you'll gain a level and the calculations will be reset for that new lev- - el, but a rule for =100% is allowed and matches the spe- + el, but a rule for =100% is allowed and matches the spe- cial case of being exactly 1 experience point short of the next level. - * absolute value sets the attribute when the field value - matches that number. The number must be 0 or higher, ex- - cept for "armor-class' which allows negative values, and - may optionally be preceded by `='. If the number is pre- - ceded by `<=' or `>=' instead, it also matches when value - is below or above. If the prefix is `<' or `>', only + * absolute value sets the attribute when the field value + matches that number. The number must be 0 or higher, ex- + cept for "armor-class' which allows negative values, and + may optionally be preceded by `='. If the number is pre- + ceded by `<=' or `>=' instead, it also matches when value + is below or above. If the prefix is `<' or `>', only match when strictly above or below. * text match sets the attribute when the field value matches - the text. Text matches can only be used for "alignment", - "carrying-capacity", "hunger", "dungeon-level", and "ti- - tle". For title, only the role's rank title is tested; + the text. Text matches can only be used for "alignment", + "carrying-capacity", "hunger", "dungeon-level", and "ti- + tle". For title, only the role's rank title is tested; the character's name is ignored. - The in-game options menu can help you determine the correct + The in-game options menu can help you determine the correct syntax for a config file. - The whole feature can be disabled by setting option sta- + The whole feature can be disabled by setting option sta- tushilites to 0. Example hilites: @@ -5131,18 +5131,18 @@ NetHack can load entire symbol sets from the symbol file. - The options that are used to select a particular symbol set + The options that are used to select a particular symbol set from the symbol file are: symset Set the name of the symbol set that you want to load. roguesymset - Set the name of the symbol set that you want to load for dis- + Set the name of the symbol set that you want to load for dis- play on the rogue level. - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5152,18 +5152,18 @@ - You can also override one or more symbols using the SYMBOLS - config file option. Symbols are specified as name:value pairs. - Note that NetHack escape-processes the value string in conven- - tional C fashion. This means that \ is a prefix to take the fol- - lowing character literally. Thus \ needs to be represented as - \\. The special prefix form \m switches on the meta bit in the - symbol value, and the ^ prefix causes the following character to - be treated as a control character. + You can also override one or more symbols using the SYMBOLS + and ROGUESYMBOLS config file options. Symbols are specified as + name:value pairs. Note that NetHack escape-processes the value + string in conventional C fashion. This means that \ is a prefix + to take the following character literally. Thus \ needs to be + represented as \\. The special prefix form \m switches on the + meta bit in the symbol value, and the ^ prefix causes the follow- + ing character to be treated as a control character. - NetHack Symbols + NetHack Symbols Default Symbol Name Description - ------------------------------------------------------------------------ + --------------------------------------------------------------------------------- S_air (air) _ S_altar (altar) " S_amulet (amulet) @@ -5208,7 +5208,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5274,7 +5274,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5340,7 +5340,7 @@ - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5377,36 +5377,36 @@ Y S_yeti (apelike creature) Z S_zombie (zombie) z S_zruty (zruty) + S_pet_override (pet override if sysconf accessibility is set) + S_player_override (player override if sysconf accessibility is set) 9.15. Configuring NetHack for Play by the Blind - NetHack can be set up to use only standard ASCII characters - for making maps of the dungeons. This makes the MS-DOS versions - of NetHack completely accessible to the blind who use speech - and/or Braille access technologies. Players will require a good - working knowledge of their screen-reader's review features, and - will have to know how to navigate horizontally and vertically - character by character. They will also find the search capabili- - ties of their screen-readers to be quite valuable. Be certain to - examine this Guidebook before playing so you have an idea what - the screen layout is like. You'll also need to be able to locate - the PC cursor. It is always where your character is located. - Merely searching for an @-sign will not always find your charac- + NetHack can be set up to use only standard ASCII characters + for making maps of the dungeons. This makes the MS-DOS versions + of NetHack completely accessible to the blind who use speech + and/or Braille access technologies. Players will require a good + working knowledge of their screen-reader's review features, and + will have to know how to navigate horizontally and vertically + character by character. They will also find the search capabili- + ties of their screen-readers to be quite valuable. Be certain to + examine this Guidebook before playing so you have an idea what + the screen layout is like. You'll also need to be able to locate + the PC cursor. It is always where your character is located. + Merely searching for an @-sign will not always find your charac- ter since there are other humanoids represented by the same sign. - Your screen-reader should also have a function which gives you - the row and column of your review cursor and the PC cursor. - These co-ordinates are often useful in giving players a better + Your screen-reader should also have a function which gives you + the row and column of your review cursor and the PC cursor. + These co-ordinates are often useful in giving players a better sense of the overall location of items on the screen. - NetHack can also be compiled with support for sending the - game messages to an external program, such as a text-to-speech - synthesizer. If the "#version" extended command shows "external - program as a message handler", your NetHack has been compiled - with the capability. When compiling NetHack from source on Linux - and other POSIX systems, define MSGHANDLER to enable it. To use + NetHack can also be compiled with support for sending the + game messages to an external program, such as a text-to-speech + synthesizer. If the "#version" extended command shows "external + program as a message handler", your NetHack has been compiled - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5416,26 +5416,32 @@ - the capability, set the environment variable NETHACK_MSGHANDLER + with the capability. When compiling NetHack from source on Linux + and other POSIX systems, define MSGHANDLER to enable it. To use + the capability, set the environment variable NETHACK_MSGHANDLER to an executable, which will be executed with the game message as the program's only parameter. - While it is not difficult for experienced users to edit the - defaults.nh file to accomplish this, novices may find this task + While it is not difficult for experienced users to edit the + defaults.nh file to accomplish this, novices may find this task somewhat daunting. Included within the "symbols" file of all of- ficial distributions of NetHack is a symset called NHAccess. Se- - lecting that symset in your configuration file will cause the - game to run in a manner accessible to the blind. After you have - gained some experience with the game and with editing files, you - may want to alter settings via SYMBOLS= in your configuration - file to better suit your preferences. The most crucial settings - to make the game accessible are: + lecting that symset in your configuration file will cause the + game to run in a manner accessible to the blind. After you have + gained some experience with the game and with editing files, you + may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your + configuration file to better suit your preferences. See the pre- + vious section for the special symbols S_pet_override to force a + consistent symbol for all pets and S_player_override to force a + unique symbol for the player character if accessibility is en- + abled in the sysconf file. The most crucial settings to make the + game accessible are: symset:NHAccess Load a symbol set appropriate for use by blind players. roguesymset:NHAccess - Load a symbol set for the rogue level that is appropriate for + Load a symbol set for the rogue level that is appropriate for use by blind players. menustyle:traditional @@ -5445,34 +5451,28 @@ Show menus on a cleared screen and aligned to the left edge. number_pad - A lot of speech access programs use the number-pad to review + A lot of speech access programs use the number-pad to review the screen. If this is the case, disable the number_pad option and use the traditional Rogue-like commands. autodescribe - Automatically describe the terrain under the cursor when tar- + Automatically describe the terrain under the cursor when tar- geting. mention_walls - Give feedback messages when walking towards a wall or when + Give feedback messages when walking towards a wall or when travel command was interrupted. whatis_coord:compass - When targeting with cursor, describe the cursor position with + When targeting with cursor, describe the cursor position with coordinates relative to your character. whatis_filter:area - When targeting with cursor, filter possible locations so only - those in the same area (eg. same room, or same corridor) are - considered. - - whatis_moveskip - When targeting with cursor and using fast-move, skip the same - glyphs instead of moving 8 units at a time. + When targeting with cursor, filter possible locations so only + those in the same area (eg. same room, or same corridor) are - - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5482,23 +5482,29 @@ + considered. + + whatis_moveskip + When targeting with cursor and using fast-move, skip the same + glyphs instead of moving 8 units at a time. + nostatus_updates - Prevent updates to the status lines at the bottom of the - screen, if your screen-reader reads those lines. The same in- + Prevent updates to the status lines at the bottom of the + screen, if your screen-reader reads those lines. The same in- formation can be seen via the #attributes command. 9.16. Global Configuration for System Administrators - If NetHack is compiled with the SYSCF option, a system ad- - ministrator should set up a global configuration; this is a file + If NetHack is compiled with the SYSCF option, a system ad- + ministrator should set up a global configuration; this is a file in the same format as the traditional per-user configuration file (see above). This file should be named sysconf and placed in the - same directory as the other NetHack support files. The options + same directory as the other NetHack support files. The options recognized in this file are listed below. Any option not set us- - es a compiled-in default (which may not be appropriate for your + es a compiled-in default (which may not be appropriate for your system). - WIZARDS = A space-separated list of user names who are allowed + WIZARDS = A space-separated list of user names who are allowed to play in debug mode (commonly referred to as wizard mode). A value of a single asterisk (*) allows anyone to start a game in debug mode. @@ -5506,20 +5512,20 @@ SHELLERS = A list of users who are allowed to use the shell es- cape command (!). The syntax is the same as WIZARDS. - EXPLORERS = A list of users who are allowed to use the explore + EXPLORERS = A list of users who are allowed to use the explore mode. The syntax is the same as WIZARDS. MAXPLAYERS = Limit the maximum number of games that can be run- ning at the same time. - SUPPORT = A string explaining how to get local support (no de- + SUPPORT = A string explaining how to get local support (no de- fault value). - RECOVER = A string explaining how to recover a game on this + RECOVER = A string explaining how to recover a game on this system (no default value). - SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE - option. When disabled, incubi and succubi behave like nymphs. + SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE + option. When disabled, incubi and succubi behave like nymphs. CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- ARDS, and SHELLERS check for the player name instead of the us- @@ -5530,15 +5536,9 @@ verify that the user who is restoring is the same one who saved). - The following options affect the score file: - - PERSMAX = Maximum number of entries for one person. - - ENTRYMAX = Maximum number of entries in the score file. - - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5548,6 +5548,12 @@ + The following options affect the score file: + + PERSMAX = Maximum number of entries for one person. + + ENTRYMAX = Maximum number of entries in the score file. + POINTSMIN = Minimum number of points to get an entry in the score file. @@ -5596,15 +5602,9 @@ If you just want to see what the current top players/games list is, you can type nethack -s all on most versions. - 11. Explore mode - - NetHack is an intricate and difficult game. Novices might - falter in fear, aware of their ignorance of the means to survive. - Well, fear not. Your dungeon comes equipped with an "explore" or - "discovery" mode that enables you to keep old save files and - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5614,6 +5614,12 @@ + 11. Explore mode + + NetHack is an intricate and difficult game. Novices might + falter in fear, aware of their ignorance of the means to survive. + Well, fear not. Your dungeon comes equipped with an "explore" or + "discovery" mode that enables you to keep old save files and cheat death, at the paltry cost of not getting on the high score list. @@ -5662,15 +5668,9 @@ Andries Brouwer did a major re-write, transforming Hack into a very different game, and published (at least) three versions - (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. - - Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, - producing PC HACK 1.01e, added support for DEC Rainbow graphics - in version 1.03g, and went on to produce at least four more ver- - sions (3.0, 3.2, 3.51, and 3.6). - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5680,63 +5680,63 @@ + (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. + + Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, + producing PC HACK 1.01e, added support for DEC Rainbow graphics + in version 1.03g, and went on to produce at least four more ver- + sions (3.0, 3.2, 3.51, and 3.6). + R. Black ported PC HACK 3.51 to Lattice C and the Atari 520/1040ST, producing ST Hack 1.03. Mike Stephenson merged these various versions back together, incorporating many of the added features, and produced NetHack 1.4. He then coordinated a cast of thousands in enhancing and - debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. + debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. Later, Mike coordinated a major rewrite of the game, heading a team which included Ken Arromdee, Jean-Christophe Collet, Steve Creps, Eric Hendrickson, Izchak Miller, John Rupley, Mike Threep- oint, and Janet Walz, to produce NetHack 3.0c. - NetHack 3.0 was ported to the Atari by Eric R. Smith, to - OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three + NetHack 3.0 was ported to the Atari by Eric R. Smith, to + OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three of them and Kevin Darcy later joined the main NetHack Development Team to produce subsequent revisions of 3.0. - Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm - Meluch, Stephen Spackman and Pierre Martineau designed overlay - code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the - Macintosh. Along with various other Dungeoneers, they continued - to enhance the PC, Macintosh, and Amiga ports through the later + Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm + Meluch, Stephen Spackman and Pierre Martineau designed overlay + code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the + Macintosh. Along with various other Dungeoneers, they continued + to enhance the PC, Macintosh, and Amiga ports through the later revisions of 3.0. - Headed by Mike Stephenson and coordinated by Izchak Miller - and Janet Walz, the NetHack Development Team which now included - Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, - Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, + Headed by Mike Stephenson and coordinated by Izchak Miller + and Janet Walz, the NetHack Development Team which now included + Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, + Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Eric Raymond, and Eric Smith undertook a radical revision of 3.0. They re-structured the game's design, and re-wrote major parts of - the code. They added multiple dungeons, a new display, special - individual character quests, a new endgame and many other new + the code. They added multiple dungeons, a new display, special + individual character quests, a new endgame and many other new features, and produced NetHack 3.1. - Ken Lorber, Gregg Wonderly and Greg Olson, with help from - Richard Addison, Mike Passaretti, and Olaf Seibert, developed + Ken Lorber, Gregg Wonderly and Greg Olson, with help from + Richard Addison, Mike Passaretti, and Olaf Seibert, developed NetHack 3.1 for the Amiga. - Norm Meluch and Kevin Smolkowski, with help from Carl Sche- + Norm Meluch and Kevin Smolkowski, with help from Carl Sche- lin, Stephen Spackman, Steve VanDevender, and Paul Winner, ported NetHack 3.1 to the PC. Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike - Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny - Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack - 3.1 for the Macintosh, porting it for MPW. Building on their de- - velopment, Barton House added a Think C port. - - Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith port- - ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua - Delahunty, was responsible for the VMS version of NetHack 3.1. - Michael Allison ported NetHack 3.1 to Windows NT. + Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny + Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack + 3.1 for the Macintosh, porting it for MPW. Building on their - - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5746,63 +5746,63 @@ - Dean Luick, with help from David Cohrs, developed NetHack - 3.1 for X11. Warwick Allison wrote a tiled version of NetHack - for the Atari; he later contributed the tiles to the NetHack De- - velopment Team and tile support was then added to other plat- + development, Barton House added a Think C port. + + Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith port- + ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua + Delahunty, was responsible for the VMS version of NetHack 3.1. + Michael Allison ported NetHack 3.1 to Windows NT. + + Dean Luick, with help from David Cohrs, developed NetHack + 3.1 for X11. Warwick Allison wrote a tiled version of NetHack + for the Atari; he later contributed the tiles to the NetHack De- + velopment Team and tile support was then added to other plat- forms. The 3.2 NetHack Development Team, comprised of Michael Alli- son, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Er- - ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released + ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released version 3.2 in April of 1996. Version 3.2 marked the tenth anniversary of the formation of - the development team. In a testament to their dedication to the - game, all thirteen members of the original NetHack Development - Team remained on the team at the start of work on that release. - During the interval between the release of 3.1.3 and 3.2, one of - the founding members of the NetHack Development Team, Dr. Izchak - Miller, was diagnosed with cancer and passed away. That release - of the game was dedicated to him by the development and porting + the development team. In a testament to their dedication to the + game, all thirteen members of the original NetHack Development + Team remained on the team at the start of work on that release. + During the interval between the release of 3.1.3 and 3.2, one of + the founding members of the NetHack Development Team, Dr. Izchak + Miller, was diagnosed with cancer and passed away. That release + of the game was dedicated to him by the development and porting teams. During the lifespan of NetHack 3.1 and 3.2, several enthusi- - asts of the game added their own modifications to the game and + asts of the game added their own modifications to the game and made these "variants" publicly available: - Tom Proudfoot and Yuval Oren created NetHack++, which was - quickly renamed NetHack--. Working independently, Stephen White - wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and + Tom Proudfoot and Yuval Oren created NetHack++, which was + quickly renamed NetHack--. Working independently, Stephen White + wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and his own NetHack-- to produce SLASH. Larry Stewart-Zerba and War- - wick Allison improved the spell casting system with the Wizard - Patch. Warwick Allison also ported NetHack to use the Qt inter- + wick Allison improved the spell casting system with the Wizard + Patch. Warwick Allison also ported NetHack to use the Qt inter- face. - Warren Cheung combined SLASH with the Wizard Patch to pro- - duce Slash'EM, and with the help of Kevin Hugo, added more fea- - tures. Kevin later joined the NetHack Development Team and in- + Warren Cheung combined SLASH with the Wizard Patch to pro- + duce Slash'EM, and with the help of Kevin Hugo, added more fea- + tures. Kevin later joined the NetHack Development Team and in- corporated the best of these ideas in NetHack 3.3. The final update to 3.2 was the bug fix release 3.2.3, which - was released simultaneously with 3.3.0 in December 1999 just in + was released simultaneously with 3.3.0 in December 1999 just in time for the Year 2000. - The 3.3 NetHack Development Team, consisting of Michael Al- - lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, - Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- - ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet - Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 - in August of 2000. - - Version 3.3 offered many firsts. It was the first version to - separate race and profession. The Elf class was removed in pref- - erence to an elf race, and the races of dwarves, gnomes, and orcs - made their first appearance in the game alongside the familiar + The 3.3 NetHack Development Team, consisting of Michael Al- + lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, + Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- + ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5812,46 +5812,53 @@ - human race. Monk and Ranger roles joined Archeologists, Barbar- - ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, - Tourists, Valkyries and of course, Wizards. It was also the - first version to allow you to ride a steed, and was the first - version to have a publicly available web-site listing all the - bugs that had been discovered. Despite that constantly growing - bug list, 3.3 proved stable enough to last for more than a year + Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 + in August of 2000. + + Version 3.3 offered many firsts. It was the first version to + separate race and profession. The Elf class was removed in pref- + erence to an elf race, and the races of dwarves, gnomes, and orcs + made their first appearance in the game alongside the familiar + human race. Monk and Ranger roles joined Archeologists, Barbar- + ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, + Tourists, Valkyries and of course, Wizards. It was also the + first version to allow you to ride a steed, and was the first + version to have a publicly available web-site listing all the + bugs that had been discovered. Despite that constantly growing + bug list, 3.3 proved stable enough to last for more than a year and a half. - The 3.4 NetHack Development Team initially consisted of - Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin - Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet - Walz, and Paul Winner, with Warwick Allison joining just before + The 3.4 NetHack Development Team initially consisted of + Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin + Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet + Walz, and Paul Winner, with Warwick Allison joining just before the release of NetHack 3.4.0 in March 2002. - As with version 3.3, various people contributed to the game + As with version 3.3, various people contributed to the game as a whole as well as supporting ports on the different platforms that NetHack runs on: Pat Rankin maintained 3.4 for VMS. - Michael Allison maintained NetHack 3.4 for the MS-DOS plat- + Michael Allison maintained NetHack 3.4 for the MS-DOS plat- form. Paul Winner and Yitzhak Sapir provided encouragement. - Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- + Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- hanced the Macintosh port of 3.4. - Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, - and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft + Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, + and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft Windows platform. Alex Kompel contributed a new graphical inter- - face for the Windows port. Alex Kompel also contributed a Win- + face for the Windows port. Alex Kompel also contributed a Win- dows CE port for 3.4.1. Ron Van Iwaarden was the sole maintainer of NetHack for OS/2 - the past several releases. Unfortunately Ron's last OS/2 machine - stopped working in early 2006. A great many thanks to Ron for + the past several releases. Unfortunately Ron's last OS/2 machine + stopped working in early 2006. A great many thanks to Ron for keeping NetHack alive on OS/2 all these years. - Janne Salmijarvi and Teemu Suikki maintained and enhanced - the Amiga port of 3.4 after Janne Salmijarvi resurrected it for + Janne Salmijarvi and Teemu Suikki maintained and enhanced + the Amiga port of 3.4 after Janne Salmijarvi resurrected it for 3.3.1. Christian "Marvin" Bressler maintained 3.4 for the Atari af- @@ -5859,16 +5866,9 @@ The release of NetHack 3.4.3 in December 2003 marked the be- ginning of a long release hiatus. 3.4.3 proved to be a remarkably - stable version that provided continued enjoyment by the community - for more than a decade. The NetHack Development Team slowly and - quietly continued to work on the game behind the scenes during - the tenure of 3.4.3. It was during that same period that several - new variants emerged within the NetHack community. Notably - sporkhack by Derek S. Ray, unnethack by Patric Mueller, nitrohack - and its successors originally by Daniel Thaler and then by Alex - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -5878,63 +5878,63 @@ - Smith, and Dynahack by Tung Nguyen. Some of those variants con- - tinue to be developed, maintained, and enjoyed by the community + stable version that provided continued enjoyment by the community + for more than a decade. The NetHack Development Team slowly and + quietly continued to work on the game behind the scenes during + the tenure of 3.4.3. It was during that same period that several + new variants emerged within the NetHack community. Notably + sporkhack by Derek S. Ray, unnethack by Patric Mueller, nitrohack + and its successors originally by Daniel Thaler and then by Alex + Smith, and Dynahack by Tung Nguyen. Some of those variants con- + tinue to be developed, maintained, and enjoyed by the community to this day. In September 2014, an interim snapshot of the code under de- velopment was released publicly by other parties. Since that code - was a work-in-progress and had not gone through the process of - debugging it as a suitable release, it was decided that the ver- - sion numbers present on that code snapshot would be retired and - never used in an official NetHack release. An announcement was - posted on the NetHack Development Team's official nethack.org - website to that effect, stating that there would never be a + was a work-in-progress and had not gone through the process of + debugging it as a suitable release, it was decided that the ver- + sion numbers present on that code snapshot would be retired and + never used in an official NetHack release. An announcement was + posted on the NetHack Development Team's official nethack.org + website to that effect, stating that there would never be a 3.4.4, 3.5, or 3.5.0 official release version. - In January 2015, preparation began for the release of + In January 2015, preparation began for the release of NetHack 3.6. - At the beginning of development for what would eventually - get released as 3.6.0, the NetHack Development Team consisted of - Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, - Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- - son, Janet Walz, and Paul Winner. In early 2015, ahead of the + At the beginning of development for what would eventually + get released as 3.6.0, the NetHack Development Team consisted of + Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, + Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- + son, Janet Walz, and Paul Winner. In early 2015, ahead of the release of 3.6.0, new members Sean Hunt, Pasi Kallinen, and Derek S. Ray joined the NetHack Development Team. Near the end of the development of 3.6.0, one of the signif- - icant inspirations for many of the humorous and fun features - found in the game, author Terry Pratchett, passed away. NetHack + icant inspirations for many of the humorous and fun features + found in the game, author Terry Pratchett, passed away. NetHack 3.6.0 introduced a tribute to him. 3.6.0 was released in December 2015, and merged work done by - the development team since the release of 3.4.3 with some of the + the development team since the release of 3.4.3 with some of the beloved community patches. Many bugs were fixed and some code was restructured. - The NetHack Development Team, as well as Steve VanDevender + The NetHack Development Team, as well as Steve VanDevender and Kevin Smolkowski, ensured that NetHack 3.6 continued to oper- ate on various UNIX flavors and maintained the X11 interface. - Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- + Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- tained the port of NetHack 3.6 for Mac OSX. - Michael Allison, David Cohrs, Barton House, Pasi Kallinen, - Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- + Michael Allison, David Cohrs, Barton House, Pasi Kallinen, + Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- tained the port of NetHack 3.6 for Microsoft Windows. - Pat Rankin attempted to keep the VMS port running for - NetHack 3.6, hindered by limited access. Kevin Smolkowski has up- - dated 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. - - Ray Chason resurrected the msdos port for 3.6 and contrib- - uted the necessary updates to the community at large. - NetHack 3.6 October 1, 2019 + + NetHack 3.6 October 27, 2019 @@ -5944,16 +5944,25 @@ - In late April 2018, several hundred bug fixes for 3.6.0 and - some new features were assembled and released as NetHack 3.6.1. + Pat Rankin attempted to keep the VMS port running for + NetHack 3.6, hindered by limited access. Kevin Smolkowski has up- + dated 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. + + Ray Chason resurrected the msdos port for 3.6 and contrib- + uted the necessary updates to the community at large. + + In late April 2018, several hundred bug fixes for 3.6.0 and + some new features were assembled and released as NetHack 3.6.1. The NetHack Development Team at the time of release of 3.6.1 con- - sisted of Warwick Allison, Michael Allison, Ken Arromdee, David - Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, - Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike + sisted of Warwick Allison, Michael Allison, Ken Arromdee, David + Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, + Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz, and Paul Winner. In early May 2019, another 320 bug fixes along with some en- - hancements and the adopted curses window port, were released as + hancements and the adopted curses window port, were released as 3.6.2. The official NetHack web site is maintained by Ken Lorber at @@ -5962,12 +5971,12 @@ 12.1. SPECIAL THANKS On behalf of the NetHack community, thank you very much once - again to M. Drew Streib and Pasi Kallinen for providing a public - NetHack server at nethack.alt.org. Thanks to Keith Simpson and + again to M. Drew Streib and Pasi Kallinen for providing a public + NetHack server at nethack.alt.org. Thanks to Keith Simpson and Andy Thomson for hardfought.org. Thanks to all those unnamed dun- - geoneers who invest their time and effort into annual NetHack - tournaments such as Junethack, The November NetHack Tournament - and in days past, devnull.net (gone for now, but not forgotten). + geoneers who invest their time and effort into annual NetHack + tournaments such as Junethack, The November NetHack Tournament + and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - @@ -5988,19 +5997,10 @@ Bill Dyer Jon W{tte Ray Chason Boudewijn Waijers Jonathan Handler Richard Addison Bruce Cox Joshua Delahunty Richard Beigel - Bruce Holloway Karl Garrison Richard P. Hughey - Bruce Mewborne Keizo Yamamoto Rob Menke - Carl Schelin Ken Arnold Robin Bandy - Chris Russo Ken Arromdee Robin Johnson - David Cohrs Ken Lorber Roderick Schertler - David Damerell Ken Washikita Roland McGrath - David Gentzel Kevin Darcy Ron Van Iwaarden - David Hairston Kevin Hugo Ronnen Miller - Dean Luick Kevin Sitze Ross Brown - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 @@ -6010,6 +6010,15 @@ + Bruce Holloway Karl Garrison Richard P. Hughey + Bruce Mewborne Keizo Yamamoto Rob Menke + Carl Schelin Ken Arnold Robin Bandy + Chris Russo Ken Arromdee Robin Johnson + David Cohrs Ken Lorber Roderick Schertler + David Damerell Ken Washikita Roland McGrath + David Gentzel Kevin Darcy Ron Van Iwaarden + David Hairston Kevin Hugo Ronnen Miller + Dean Luick Kevin Sitze Ross Brown Del Lamb Kevin Smolkowski Sascha Wostmann Derek S. Ray Kevin Sweet Scott Bigham Deron Meranda Lars Huttar Scott R. Turner @@ -6057,16 +6066,7 @@ - - - - - - - - - - NetHack 3.6 October 1, 2019 + NetHack 3.6 October 27, 2019 From 7f867c098b92c06b9299550416c95db0efb4f03a Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Wed, 30 Oct 2019 18:53:52 -0400 Subject: [PATCH 086/529] This is cron-daily v1-Oct-30-2019. files updated: Files --- Files | 138 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 102 insertions(+), 36 deletions(-) diff --git a/Files b/Files index 1f4fc250f..2974df3bf 100644 --- a/Files +++ b/Files @@ -50,9 +50,9 @@ fixes30.pl08 fixes30.pl09 fixes30.pl10 fixes31.1 fixes31.2 fixes31.3 fixes32.0 fixes32.1 fixes32.2 fixes32.3 fixes33.0 fixes33.1 fixes34.0 fixes34.1 fixes34.2 fixes34.3 fixes35.0 fixes36.0 fixes36.1 fixes36.2 -lev_comp.6 lev_comp.txt makedefs.6 makedefs.txt mn.7 -mnh.7 nethack.6 nethack.txt recover.6 recover.txt -tmac.n tmac.nh window.doc +fixes36.3 lev_comp.6 lev_comp.txt makedefs.6 makedefs.txt +mn.7 mnh.7 nethack.6 nethack.txt recover.6 +recover.txt tmac.n tmac.nh window.doc include: (files for GEM versions) @@ -236,10 +236,12 @@ NetHack.xcscheme makedefs.xcscheme recover.xcscheme sys/unix/hints: (files for configuring UNIX NetHack versions) -linux linux-chroot linux-minimal linux-qt4 -linux-qt5 linux-x11 macosx macosx.sh -macosx10.5 macosx10.7 macosx10.8 macosx10.10 -macosx10.10-qt macosx10.14 unix +linux linux-chroot linux-minimal +linux-qt4 linux-qt5 linux-x11 +macosx macosx.sh macosx10.5 +macosx10.7 macosx10.8 macosx10.10 +macosx10.10-qt macosx10.14 solaris +solaris-playground unix sys/vms: (files for VMS version) @@ -357,38 +359,102 @@ getline.c termcap.c topl.c wintty.c win/win32: (files for Windows versions - tested up to Windows 10) -NetHackW.exe.manifest dgnstuff-mingw32.mak dgnstuff.mak -levstuff-mingw32.mak levstuff.mak mhaskyn.c -mhaskyn.h mhdlg.c mhdlg.h -mhfont.c mhfont.h mhinput.c -mhinput.h mhmain.c mhmain.h -mhmap.c mhmap.h mhmenu.c -mhmenu.h mhmsg.h mhmsgwnd.c -mhmsgwnd.h mhrip.c mhrip.h -mhsplash.c mhsplash.h mhstatus.c -mhstatus.h mhtext.c mhtext.h -mnsel.uu mnselcnt.uu mnunsel.uu -mswproc.c nethack.rc nhresource.h -petmark.uu pilemark.uu record.uu -resource.h rip.uu splash.uu -tiles-mingw32.mak tiles.mak winMS.h -winhack.c winhack.rc +NetHackW.c NetHackW.exe.manifest NetHackW.rc +dgnstuff-mingw32.mak dgnstuff.mak levstuff-mingw32.mak +levstuff.mak mhaskyn.c mhaskyn.h +mhdlg.c mhdlg.h mhfont.c +mhfont.h mhinput.c mhinput.h +mhmain.c mhmain.h mhmap.c +mhmap.h mhmenu.c mhmenu.h +mhmsg.h mhmsgwnd.c mhmsgwnd.h +mhrip.c mhrip.h mhsplash.c +mhsplash.h mhstatus.c mhstatus.h +mhtext.c mhtext.h mnsel.uu +mnselcnt.uu mnunsel.uu mswproc.c +nethack.rc nhresource.h petmark.uu +pilemark.uu record.uu resource.h +rip.uu splash.uu tiles-mingw32.mak +tiles.mak winMS.h win/win32/vs2017: (files for Visual Studio 2017 Community Edition builds) -NetHack.sln NetHack.vcxproj NetHackW.vcxproj -PDCurses.vcxproj afterdgncomp.proj afterdlb.proj -afterlevcomp.proj aftermakedefs.proj afternethack.proj -afterrecover.proj aftertile2bmp.proj aftertilemap.proj -afteruudecode.proj build.bat common.props -config.props console.props default.props -default_dll.props default_lib.props dgncomp.vcxproj -dirs.props dlb.vcxproj dll.props -files.props levcomp.vcxproj makedefs.vcxproj -nh340key.def nh340key.vcxproj nhdefkey.def -nhdefkey.vcxproj nhraykey.def nhraykey.vcxproj -recover.vcxproj tile2bmp.vcxproj tilemap.vcxproj -tiles.vcxproj uudecode.vcxproj +NetHack.sln NetHack.vcxproj +NetHackPackage.appxmanifest NetHackPackage.wapproj +NetHackProperties.props NetHackW.vcxproj +PDCurses.vcxproj Package.StoreAssociation.xml +ScreenShot.PNG afterdgncomp.proj +afterdlb.proj afterlevcomp.proj +aftermakedefs.proj afternethack.proj +afterrecover.proj aftertile2bmp.proj +aftertilemap.proj afteruudecode.proj +build.bat common.props +config.props console.props +default.props default_dll.props +default_lib.props dgncomp.vcxproj +dirs.props dlb.vcxproj +dll.props files.props +levcomp.vcxproj makedefs.vcxproj +nh340key.def nh340key.vcxproj +nhdefkey.def nhdefkey.vcxproj +nhraykey.def nhraykey.vcxproj +recover.vcxproj tile2bmp.vcxproj +tilemap.vcxproj tiles.vcxproj +travisci.sh uudecode.vcxproj + +win/win32/vs2017/Images: +(files for Visual Studio 2017 Community Edition builds) +BadgeLogo.scale-100.png +BadgeLogo.scale-125.png +BadgeLogo.scale-150.png +BadgeLogo.scale-200.png +BadgeLogo.scale-400.png +LargeTile.scale-100.png +LargeTile.scale-125.png +LargeTile.scale-150.png +LargeTile.scale-200.png +LargeTile.scale-400.png +LockScreenLogo.scale-200.png +SmallTile.scale-100.png +SmallTile.scale-125.png +SmallTile.scale-150.png +SmallTile.scale-200.png +SmallTile.scale-400.png +SplashScreen.scale-100.png +SplashScreen.scale-125.png +SplashScreen.scale-150.png +SplashScreen.scale-200.png +SplashScreen.scale-400.png +Square150x150Logo.scale-100.png +Square150x150Logo.scale-125.png +Square150x150Logo.scale-150.png +Square150x150Logo.scale-200.png +Square150x150Logo.scale-400.png +Square44x44Logo.altform-unplated_targetsize-16.png +Square44x44Logo.altform-unplated_targetsize-256.png +Square44x44Logo.altform-unplated_targetsize-32.png +Square44x44Logo.altform-unplated_targetsize-48.png +Square44x44Logo.scale-100.png +Square44x44Logo.scale-125.png +Square44x44Logo.scale-150.png +Square44x44Logo.scale-200.png +Square44x44Logo.scale-400.png +Square44x44Logo.targetsize-16.png +Square44x44Logo.targetsize-24.png +Square44x44Logo.targetsize-24_altform-unplated.png +Square44x44Logo.targetsize-256.png +Square44x44Logo.targetsize-32.png +Square44x44Logo.targetsize-48.png +StoreLogo.backup.png +StoreLogo.scale-100.png +StoreLogo.scale-125.png +StoreLogo.scale-150.png +StoreLogo.scale-200.png +StoreLogo.scale-400.png +Wide310x150Logo.scale-100.png +Wide310x150Logo.scale-125.png +Wide310x150Logo.scale-150.png +Wide310x150Logo.scale-200.png +Wide310x150Logo.scale-400.png This is a list of files produced by auxiliary programs. They can all be regenerated from the files in the distribution. From 384f98b61f77f3ef0648ee561d63c062ad61c6b0 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 30 Oct 2019 17:37:04 -0700 Subject: [PATCH 087/529] Guidebook tweak This sample comment attending the sample SYMBOLS statement fit ok in the pdf output but wrapped to another line in the plain text output, so shorten it. S_xan, S_pet_override, and S_player_override still wrap, but by a bit less than before. Their width causes the line of dashes at the top of the table to wrap too. Guidebook.tex is still lagging behind. --- doc/Guidebook.mn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 34ad975e0..55bfcd5e2 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.317 $ $NHDT-Date: 1572448817 2019/10/30 15:20:17 $ +.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.318 $ $NHDT-Date: 1572482202 2019/10/31 00:36:42 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -2749,7 +2749,7 @@ See the \(lqModifying NetHack Symbols\(rq section. .lp "" Example: .sd -\f(CR# replace small punctuation (tick marks) with easier to see digits\fP +\f(CR# replace small punctuation (tick marks) with digits\fP \f(CRSYMBOLS=S_boulder:0,S_golem:7\fP .ed .lp WIZKIT @@ -4579,8 +4579,8 @@ X S_xorn (xorn) Y S_yeti (apelike creature) Z S_zombie (zombie) z S_zruty (zruty) - S_pet_override (pet override if sysconf accessibility is set) - S_player_override (player override if sysconf accessibility is set) +\ S_pet_override (any pet if sysconf accessibility is set) +\ S_player_override (hero if sysconf accessibility is set) .\"TABLE_END Do not delete this line. .TE .pg @@ -4663,7 +4663,7 @@ of moving 8 units at a time. .lp nostatus_updates Prevent updates to the status lines at the bottom of the screen, if your screen-reader reads those lines. The same information can be -seen via the #attributes command. +seen via the \(lq#attributes\(rq command. .hn 2 Global Configuration for System Administrators .pg From 86473526b8eb2948744c1965bcc734ed211ce987 Mon Sep 17 00:00:00 2001 From: Bart House Date: Wed, 30 Oct 2019 19:17:03 -0700 Subject: [PATCH 088/529] Save a copy of the symbols file to symbols.save when updating. --- include/ntconf.h | 6 ++++++ src/files.c | 2 +- sys/winnt/windmain.c | 43 +++++++++++++++++++++++++++---------------- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/include/ntconf.h b/include/ntconf.h index c38770e17..af84c3ef0 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -80,6 +80,12 @@ * objects being thrown when the hangup occurs. \ */ +#define CONFIG_FILE "defaults.nh" +#define CONFIG_TEMPLATE "defaults.template" +#define SYSCF_TEMPLATE "sysconf.template" +#define SYMBOLS_TEMPLATE "symbols.template" +#define GUIDEBOOK_FILE "Guidebook.txt" + /* Stuff to help the user with some common, yet significant errors */ #define INTERJECT_PANIC 0 #define INTERJECTION_TYPES (INTERJECT_PANIC + 1) diff --git a/src/files.c b/src/files.c index 7228cd7e8..f89e5e061 100644 --- a/src/files.c +++ b/src/files.c @@ -1910,7 +1910,7 @@ const char *default_configfile = "NetHack Defaults"; #else #if defined(MSDOS) || defined(WIN32) - "defaults.nh"; + CONFIG_FILE; #else "NetHack.cnf"; #endif diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 1e140b0d6..f88fbaa37 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -301,7 +301,8 @@ update_file( const char * dst_folder, const char * dst_name, const char * src_folder, - const char * src_name) + const char * src_name, + BOOL save_copy) { char dst_path[MAX_PATH]; strcpy(dst_path, dst_folder); @@ -311,12 +312,20 @@ update_file( strcpy(src_path, src_folder); strcat(src_path, src_name); + char save_path[MAX_PATH]; + strcpy(save_path, dst_folder); + strcat(save_path, dst_name); + strcat(save_path, ".save"); + if(!file_exists(src_path)) error("Unable to copy file '%s' as it does not exist", src_path); if (!file_newer(src_path, dst_path)) return; + if (file_exists(dst_path) && save_copy) + CopyFileA(dst_path, save_path, FALSE); + BOOL success = CopyFileA(src_path, dst_path, FALSE); if(!success) error("Failed to update '%s' to '%s'", src_path, dst_path); @@ -325,37 +334,39 @@ update_file( void copy_config_content() { /* Keep templates up to date */ - update_file(fqn_prefix[CONFIGPREFIX], "defaults.tmp", - fqn_prefix[DATAPREFIX], "defaults.nh"); - update_file(fqn_prefix[SYSCONFPREFIX], "sysconf.tmp", - fqn_prefix[DATAPREFIX], SYSCF_FILE); + /* TODO: Update the package to store config file as .nethackrc */ + update_file(fqn_prefix[CONFIGPREFIX], CONFIG_TEMPLATE, + fqn_prefix[DATAPREFIX], CONFIG_FILE, FALSE); + update_file(fqn_prefix[SYSCONFPREFIX], SYSCF_TEMPLATE, + fqn_prefix[DATAPREFIX], SYSCF_FILE, FALSE); /* If the required early game file does not exist, copy it */ - copy_file(fqn_prefix[CONFIGPREFIX], "defaults.nh", - fqn_prefix[DATAPREFIX], "defaults.nh"); + /* NOTE: We never replace .nethackrc or sysconf */ + copy_file(fqn_prefix[CONFIGPREFIX], CONFIG_FILE, + fqn_prefix[DATAPREFIX], CONFIG_FILE); copy_file(fqn_prefix[SYSCONFPREFIX], SYSCF_FILE, fqn_prefix[DATAPREFIX], SYSCF_FILE); - /* If a required game file does not exist, copy it */ + /* Update symbols and save a copy if we are replacing */ /* TODO: Can't HACKDIR be changed during option parsing causing us to perhaps be checking options against the wrong symbols file? */ - copy_file(fqn_prefix[HACKPREFIX], SYMBOLS, - fqn_prefix[DATAPREFIX], SYMBOLS); + update_file(fqn_prefix[HACKPREFIX], SYMBOLS, + fqn_prefix[DATAPREFIX], SYMBOLS, TRUE); } void copy_hack_content() { /* Keep Guidebook and opthelp up to date */ - update_file(fqn_prefix[HACKPREFIX], "Guidebook.txt", - fqn_prefix[DATAPREFIX], "Guidebook.txt"); - update_file(fqn_prefix[HACKPREFIX], "opthelp", - fqn_prefix[DATAPREFIX], "opthelp"); + update_file(fqn_prefix[HACKPREFIX], GUIDEBOOK_FILE, + fqn_prefix[DATAPREFIX], GUIDEBOOK_FILE, FALSE); + update_file(fqn_prefix[HACKPREFIX], OPTIONFILE, + fqn_prefix[DATAPREFIX], OPTIONFILE, FALSE); /* Keep templates up to date */ - update_file(fqn_prefix[HACKPREFIX], "symbols.tmp", - fqn_prefix[DATAPREFIX], "symbols"); + update_file(fqn_prefix[HACKPREFIX], SYMBOLS_TEMPLATE, + fqn_prefix[DATAPREFIX], SYMBOLS, FALSE); } From eb825a2da5c2c2f28e01bcbc92d3e756aaf5e750 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 31 Oct 2019 05:31:39 -0700 Subject: [PATCH 089/529] catch Guidebook.tex up with Guidebook.mn Only with the past couple of changes, not a complete reconciliation. Not tested. --- doc/Guidebook.mn | 4 ++- doc/Guidebook.tex | 78 +++++++++++++++++++++++++++++------------------ 2 files changed, 51 insertions(+), 31 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 55bfcd5e2..a9d828728 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.318 $ $NHDT-Date: 1572482202 2019/10/31 00:36:42 $ +.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.319 $ $NHDT-Date: 1572525093 2019/10/31 12:31:33 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -2683,7 +2683,9 @@ HACKDIR, must be writable. .lp TROUBLEDIR The location that a record of game aborts and self-diagnosed game problems is kept. Defaults to HACKDIR, must be writable. +.\" .\" config file entries beyond this point are shown alphabetically +.\" .lp AUTOCOMPLETE Enable or disable an extended command autocompletion. Autocompletion has no effect for the X11 windowport. diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 4b9357e52..92b4d742a 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2895,9 +2895,13 @@ Section names are case insensitive. %.pg You can use different configuration statements in the file, some -of which can be used multiple times. In general, the statements are +of which can be used multiple times. +In general, the statements are written in capital letters, followed by an equals sign, followed by -settings particular to that statement. Here is a list of allowed statements: +settings particular to that statement. + +%.pg +Here is a list of allowed statements: %.lp \blist{} @@ -2912,7 +2916,7 @@ You can specify multiple OPTIONS statements, and multiple options separated by commas in a single OPTIONS statement. (Comma separated options are processed from right to left.) -%.pg +%.lp "" Example: %.sd \begin{verbatim} @@ -2946,6 +2950,9 @@ HACKDIR, must be writable. \item[\bb{TROUBLEDIR}] The location that a record of game aborts and self-diagnosed game problems is kept. Defaults to HACKDIR, must be writable. +% +% config file entries beyond this point are shown alphabetically +% %.lp \item[\bb{AUTOCOMPLETE}] Enable or disable an extended command autocompletion. @@ -2955,11 +2962,11 @@ autocompletion, list the extended command. Prefix the command with ``{{\tt !}}'' to disable the autocompletion for that command. -%.pg +%.lp "" Example: %.sd \begin{verbatim} - AUTOCOMPLETE=zap,!annotate + AUTOCOMPLETE=zap,!annotate \end{verbatim} %.ed @@ -2974,7 +2981,7 @@ extended commands. You can specify multiple bindings. Format is key followed by the command, separated by a colon. See the ``Changing Key Bindings`` section for more information. -%.pg +%.lp "" Example: %.sd \begin{verbatim} @@ -2987,7 +2994,7 @@ Example: Chooses at random one of the comma-separated parameters as an active section name. Lines in other sections are ignored. -%.pg +%.lp "" Example: %.sd \begin{verbatim} @@ -3000,23 +3007,37 @@ Example: \end{verbatim} %.ed -%.lp -\item[\bb{MSGTYPE}] -Change the way messages are shown in the top status line. -See the ``Configuring Message Types`` section. %.lp \item[\bb{MENUCOLOR}] Highlight menu lines with different colors. See the ``Configuring Menu Colors`` section. %.lp -\item[\bb{SYMBOLS},\bb{ROGUESYMBOLS}] -Override one or more symbols in the symbols files. +\item[\bb{MSGTYPE}] +Change the way messages are shown in the top status line. +See the ``Configuring Message Types`` section. +%.lp +\item[\bb{ROGUESYMBOLS}] +Custom symbols for for the rogue level's symbol set. +See {\it SYMBOLS} below. +%.lp +\item[\bb{SOUND}] +Define a sound mapping. +See the ``Configuring User Sounds'' section. +%.lp +\item[\bb{SOUNDDIR}] +Define the directory that contains the sound files. +See the ``Configuring User Sounds'' section. +%.lp +\item[\bb{SYMBOLS} +Override one or more symbols in the symbol set used for all dungeon +levels except for the special rogue level. See the ``Modifying {\it NetHack\/} Symbols'' section. %.pg Example: %.sd \begin{verbatim} - SYMBOLS=S_boulder:0 + # replace small punctuation (tick marks) with digits + SYMBOLS=S_boulder:0,S_golem:7 \end{verbatim} %.ed @@ -3026,22 +3047,17 @@ Debug mode only: extra items to add to initial inventory. Value is the name of a text file containing a list of item names, one per line, up to a maximum of 128 lines. Each line is processed by the function that handles wishing. -%.pg + +%.lp "" Example: %.sd \begin{verbatim} - WIZKIT=~/wizkit.txt + WIZKIT=~/wizkit.txt \end{verbatim} %.ed -%.lp -\item[\bb{SOUNDDIR}] -Define the directory that contains the sound files. -See the ``Configuring User Sounds'' section. -%.lp -\item[\bb{SOUND}] -Define a sound mapping. See the ``Configuring User Sounds'' section. \elist +%.lp "" %.pg Here is a short example of config file contents: %.sd @@ -4880,11 +4896,13 @@ on the rogue level. \elist You can also override one or more symbols using the {\it SYMBOLS\/} and -{\it ROGUESYMBOLS\/} config file options. Symbols are specified as -{\it name:value\/} pairs. Note that {\it NetHack\/} escape-processes -the {\it value\/} string in conventional C fashion. This means that `\verb+\+' -is a prefix to take the following character literally. Thus `\verb+\+' needs -to be represented as `\verb+\\+'. +{\it ROGUESYMBOLS\/} config file options. +Symbols are specified as {\it name:value\/} pairs. +Note that {\it NetHack\/} escape-processes +the {\it value\/} string in conventional C fashion. +This means that `\verb+\+' is a prefix to take the following character +literally. +Thus `\verb+\+' needs to be represented as `\verb+\\+'. The special prefix `\verb+\m+' switches on the meta bit in the symbol value, and the `{\tt \^{}}' prefix causes the following character to be treated as a control @@ -5071,8 +5089,8 @@ Default & Symbol Name & Description\\ \verb@Y@ & S\verb+_+yeti & (apelike creature)\\ \verb@Z@ & S\verb+_+zombie & (zombie)\\ \verb@z@ & S\verb+_+zruty & (zruty)\\ -\verb@ @ & S\verb+_+pet\verb+_+override & (pet override if sysconf accessibility is set)\\ -\verb@ @ & S\verb+_+player\verb+_+override & (player override if sysconf accessibility is set) +\verb@ @ & S\verb+_+pet\verb+_+override & (any pet if sysconf accessibility is set)\\ +\verb@ @ & S\verb+_+player\verb+_+override & (hero if sysconf accessibility is set) \end{longtable}% } From 7cc59eb9297af5a5bebbdca7a2aff2110d35eddf Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 31 Oct 2019 06:57:16 -0700 Subject: [PATCH 090/529] fix #H9374 - initial rendering of guardian angel Creation of guardian angel bypasses tamedog() and marks it tame directly but it wasn't updating the map after changing the monster. So if 'hilite_pet' was On when entering the Astral Plane level, the angel appeared to be ordinary monster rather than a tame one until it moved or the screen was redrawn. Also, the message about it appearing was issued before marking it tame, so a tiny bit of code reordering has been done to get the sequence correct. --- doc/fixes36.3 | 4 +++- src/minion.c | 15 +++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 5940e16aa..c95a46c4c 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.149 $ $NHDT-Date: 1572141706 2019/10/27 02:01:46 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.151 $ $NHDT-Date: 1572530225 2019/10/31 13:57:05 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -208,6 +208,8 @@ parsing for the argument to 'scores' option was sloppy; "3a/o" (slash) and "3a 1o" (space and digit one, not lowercase L) both worked but "3a o" (just space) was supposed to but didn't wizmakemap could leave genocided monsters on map +when entering Astral level, initial rendering of guardian angel didn't show + it as tame; noticeable if the level was entered with 'hilite_pet' On Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/minion.c b/src/minion.c index 85acbe51c..e752ddbce 100644 --- a/src/minion.c +++ b/src/minion.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 minion.c $NHDT-Date: 1561061319 2019/06/20 20:08:39 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.42 $ */ +/* NetHack 3.6 minion.c $NHDT-Date: 1572530226 2019/10/31 13:57:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.43 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -481,15 +481,18 @@ gain_guardian_angel() && (mtmp = mk_roamer(&mons[PM_ANGEL], u.ualign.type, mm.x, mm.y, TRUE)) != 0) { mtmp->mstrategy &= ~STRAT_APPEARMSG; + /* guardian angel -- the one case mtame doesn't imply an + * edog structure, so we don't want to call tamedog(). + * [Note: this predates mon->mextra which allows a monster + * to have both emin and edog at the same time.] + */ + mtmp->mtame = 10; + /* for 'hilite_pet'; after making tame, before next message */ + newsym(mtmp->mx, mtmp->my); if (!Blind) pline("An angel appears near you."); else You_feel("the presence of a friendly angel near you."); - /* guardian angel -- the one case mtame doesn't - * imply an edog structure, so we don't want to - * call tamedog(). - */ - mtmp->mtame = 10; /* make him strong enough vs. endgame foes */ mtmp->m_lev = rn1(8, 15); mtmp->mhp = mtmp->mhpmax = From b110ee9eaf10876e8a567adb9cd6c57fa1a22e34 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 31 Oct 2019 12:00:59 -0400 Subject: [PATCH 091/529] msdos build fix following recent files.c change --- include/pcconf.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/pcconf.h b/include/pcconf.h index fb210b8ca..e3f764625 100644 --- a/include/pcconf.h +++ b/include/pcconf.h @@ -21,6 +21,11 @@ * Note: 3.6.x was not verified with Symantec C. */ +#if defined(MSDOS) +#define CONFIG_FILE "defaults.nh" +#define GUIDEBOOK_FILE "Guidebook.txt" +#endif + /* * The following options are somewhat configurable depending on * your compiler. From 919765f67f1f45c67f731044d5a1ede81074a26b Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 31 Oct 2019 12:16:03 -0400 Subject: [PATCH 092/529] Windows: link with ole32.lib and shell32.lib --- sys/winnt/Makefile.msc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 492153d1b..ad55dad0e 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -526,7 +526,8 @@ guilflags = $(lflags) -subsystem:windows,$(EXEVER) dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll # basic subsystem specific libraries, less the C Run-Time -baselibs = kernel32.lib $(optlibs) $(winsocklibs) advapi32.lib gdi32.lib +baselibs = kernel32.lib $(optlibs) $(winsocklibs) advapi32.lib gdi32.lib \ + ole32.lib Shell32.lib winlibs = $(baselibs) user32.lib comdlg32.lib winspool.lib # for Windows applications that use the C Run-Time libraries From 6f7246bdc315c205d1ebd799337c70ca5275a455 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 31 Oct 2019 12:46:33 -0400 Subject: [PATCH 093/529] Guidebook.tex fix --- doc/Guidebook.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 92b4d742a..d1128e967 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -3028,7 +3028,7 @@ See the ``Configuring User Sounds'' section. Define the directory that contains the sound files. See the ``Configuring User Sounds'' section. %.lp -\item[\bb{SYMBOLS} +\item[\bb{SYMBOLS}] Override one or more symbols in the symbol set used for all dungeon levels except for the special rogue level. See the ``Modifying {\it NetHack\/} Symbols'' section. @@ -3036,7 +3036,7 @@ See the ``Modifying {\it NetHack\/} Symbols'' section. Example: %.sd \begin{verbatim} - # replace small punctuation (tick marks) with digits + # replaces small punctuation (tick marks) with digits SYMBOLS=S_boulder:0,S_golem:7 \end{verbatim} %.ed From ac49d7b5e80ab6620e0fa56bd6fcdc77f074ff62 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 31 Oct 2019 12:50:12 -0400 Subject: [PATCH 094/529] unintentional change --- doc/Guidebook.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index d1128e967..b3c175766 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -3036,7 +3036,7 @@ See the ``Modifying {\it NetHack\/} Symbols'' section. Example: %.sd \begin{verbatim} - # replaces small punctuation (tick marks) with digits + # replace small punctuation (tick marks) with digits SYMBOLS=S_boulder:0,S_golem:7 \end{verbatim} %.ed From 696f54a3b83dcd94a1040fe67cf85e279885043e Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 31 Oct 2019 13:27:10 -0400 Subject: [PATCH 095/529] doc updates --- dat/history | 9 ++++++--- doc/Guidebook.mn | 11 +++++++---- doc/Guidebook.tex | 13 +++++++++---- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/dat/history b/dat/history index 70935071a..2922bcd9e 100644 --- a/dat/history +++ b/dat/history @@ -57,7 +57,7 @@ Spackman, Steve VanDevender, and Paul Winner, ported NetHack 3.1 to the PC. Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny Lee, Tim Lennan, Rob Menke, and Andy Swanson developed NetHack 3.1 for the Macintosh, porting it for -MPW. Building on their development, Barton House added a Think C port. +MPW. Building on their development, Bart House added a Think C port. Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith ported NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua Delahunty, is responsible @@ -195,7 +195,7 @@ Unix flavors as well as maintaining the X11 interface. Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick maintained the port of NetHack 3.6.1 for Mac OSX. -Michael Allison, David Cohrs, Barton House, Pasi Kallinen, Alex Kompel, +Michael Allison, David Cohrs, Bart House, Pasi Kallinen, Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir maintained the port of NetHack 3.6 for Microsoft Windows. @@ -217,6 +217,9 @@ Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz and Paul Winner. In early May 2019, another 320 bug fixes along with some enhancements and the adopted curses window port, were released as 3.6.2. +Bart House, who had contributed to the game as a porting team participant +for decades, joined the NetHack Development Team in late May 2019. + The official NetHack web site is maintained by Ken Lorber at http://www.nethack.org/. @@ -241,7 +244,7 @@ of these miscreants in this, the list of Dungeoneers: Andy Church Jochen Erwied Pat Rankin Andy Swanson John Kallen Patric Mueller Ari Huttunen John Rupley Paul Winner - Barton House John S. Bien Pierre Martineau + Bart House John S. Bien Pierre Martineau Benson I. Margulies Johnny Lee Ralf Brown Bill Dyer Jon W{tte Ray Chason Boudewijn Waijers Jonathan Handler Richard Addison diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index a9d828728..8e18ec97d 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "October 27, 2019 +.ds f2 "October 31, 2019 . .\" A note on some special characters: .\" \(lq = left double quote @@ -4900,7 +4900,7 @@ and \fBPaul Winner\fP, ported NetHack 3.1 to the PC. \fBMike Engber\fP, \fBDavid Hairston\fP, \fBMichael Hamel\fP, \fBJonathan Handler\fP, \fBJohnny Lee\fP, \fBTim Lennan\fP, \fBRob Menke\fP, and \fBAndy Swanson\fP, developed NetHack 3.1 for the Macintosh, -porting it for MPW. Building on their development, \fBBarton House\fP +porting it for MPW. Building on their development, \fBBart House\fP added a Think C port. .pg \fBTimo Hakulinen\fP ported NetHack 3.1 to OS/2. \fBEric Smith\fP @@ -5059,7 +5059,7 @@ flavors and maintained the X11 interface. \fBKen Lorber\fP, \fBHaoyang Wang\fP, \fBPat Rankin\fP, and \fBDean Luick\fP maintained the port of NetHack 3.6 for Mac OSX. .pg -\fBMichael Allison\fP, \fBDavid Cohrs\fP, \fBBarton House\fP, +\fBMichael Allison\fP, \fBDavid Cohrs\fP, \fBBart House\fP, \fBPasi Kallinen\fP, \fBAlex Kompel\fP, \fBDion Nicolaas\fP, \fBDerek S. Ray\fP and \fBYitzhak Sapir\fP maintained the port of NetHack 3.6 for Microsoft Windows. @@ -5084,6 +5084,9 @@ The NetHack Development Team at the time of release of 3.6.1 consisted of In early May 2019, another 320 bug fixes along with some enhancements and the adopted curses window port, were released as 3.6.2. .pg +\fBBart House\fP, who had contributed to the game as a porting team +participant for decades, joined the NetHack Development Team in late May 2019. +.pg The official NetHack web site is maintained by \fBKen Lorber\fP at .UR http://www.nethack.org/ . @@ -5119,7 +5122,7 @@ Andreas Dorn Jeff Bailey Pasi Kallinen Andy Church Jochen Erwied Pat Rankin Andy Swanson John Kallen Patric Mueller Ari Huttunen John Rupley Paul Winner -Barton House John S. Bien Pierre Martineau +Bart House John S. Bien Pierre Martineau Benson I. Margulies Johnny Lee Ralf Brown Bill Dyer Jon W{tte Ray Chason Boudewijn Waijers Jonathan Handler Richard Addison diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index b3c175766..9be2f073d 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{October 22, 2019} +\date{October 31, 2019} \maketitle @@ -5457,7 +5457,7 @@ with help from {\it Ross Brown}, {\it Mike Engber}, {\it David Hairston}, {\it Michael Hamel}, {\it Jonathan Handler}, {\it Johnny Lee}, {\it Tim Lennan}, {\it Rob Menke}, and {\it Andy Swanson}, developed {\it NetHack\/} 3.1 for the Macintosh, porting it for MPW. -Building on their development, {\it Barton House} added a Think C port. +Building on their development, {\it Bart House} added a Think C port. %.pg \medskip @@ -5670,7 +5670,7 @@ maintained the port of {\it NetHack\/} 3.6 for Mac OSX. %.pg \medskip -{\it Michael Allison}, {\it David Cohrs}, {\it Barton House}, +{\it Michael Allison}, {\it David Cohrs}, {\it Bart House}, {\it Pasi Kallinen}, {\it Alex Kompel}, {\it Dion Nicolaas}, {\it Derek S. Ray} and {\it Yitzhak Sapir} maintained the port of {\it NetHack\/} 3.6 for Microsoft Windows. @@ -5704,6 +5704,11 @@ time of release of 3.6.1 consisted of In early May 2019, another 320 bug fixes along with some enhancements and the adopted curses window port, were released as 3.6.2. +%.pg +\medskip +{\it Bart House}, who had contributed to the game as a porting team participant +for decades, joined the {\it NetHack Development Team} in late May 2019. + %.pg \medskip \nd The official {\it NetHack\/} web site is maintained by {\it Ken Lorber} at @@ -5745,7 +5750,7 @@ Andreas Dorn & Jeff Bailey & Pasi Kallinen\\ Andy Church & Jochen Erwied & Pat Rankin\\ Andy Swanson & John Kallen & Patric Mueller\\ Ari Huttunen & John Rupley & Paul Winner\\ -Barton House & John S. Bien & Pierre Martineau\\ +Bart House & John S. Bien & Pierre Martineau\\ Benson I. Margulies & Johnny Lee & Ralf Brown\\ Bill Dyer & Jon W\{tte & Ray Chason\\ Boudewijn Waijers & Jonathan Handler & Richard Addison\\ From 5d5a4610ff2f2ae36e8bd40116371703574be27e Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 31 Oct 2019 19:22:05 -0400 Subject: [PATCH 096/529] try to improve some reported TeX Guidebook to pdf results --- doc/Guidebook.tex | 122 +++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 62 deletions(-) diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 9be2f073d..87cf04452 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -1130,7 +1130,7 @@ slot to another so that it has a letter which is more meaningful for you or that it will appear in a particular location when inventory listings are displayed. You can move to a currently empty slot, or if the destination is -occupied--and won't merge--the item there will swap slots with the one +occupied---and won't merge---the item there will swap slots with the one being moved. ``{\tt \#adjust}'' can also be used to split a stack of objects; when choosing the item to adjust, enter a count prior to its letter.\\ @@ -2044,9 +2044,9 @@ will result in it disappearing from your map, similarly if it is the one who moved rather than you. %.pg -However, if you encounter a monster which you can't see or sense-- -perhaps it is invisible and has just tapped you on the noggin-- -a special ``remembered, unseen monster'' marker will be displayed at +However, if you encounter a monster which you can't see or +sense---perhaps it is invisible and has just tapped you on the +noggin---a special ``remembered, unseen monster'' marker will be displayed at the location where you think it is. That will persist until you have proven that there is no monster there, even if the unseen monster @@ -2326,7 +2326,7 @@ But first you need to have a weapon in each hand. (Note that your two weapons are not fully equal; the one in the hand you normally wield with is considered primary and the other one is considered secondary. The most noticeable difference is -after you stop--or before you begin, for that matter--wielding +after you stop---or before you begin, for that matter---wielding two weapons at once. The primary is your wielded weapon and the secondary is just an item in your inventory that's been designated as alternate weapon.) @@ -2558,7 +2558,7 @@ The commands to use rings are `{\tt P}' (put on) and `{\tt R}' (remove). %.pg Spellbooks are tomes of mighty magic. When studied with the `{\tt r}' (read) command, they transfer to the reader the knowledge of a spell (and -therefore eventually become unreadable) --- unless the attempt backfires. +therefore eventually become unreadable)---unless the attempt backfires. Reading a cursed spellbook or one with mystic runes beyond your ken can be harmful to your health! @@ -2701,9 +2701,9 @@ you are carrying (shopkeepers aside). Normally, if you have seen an object at a particular map location and move to another location where you can't directly see that object any more, if will continue to be displayed on your map. -That remains the case even if it is not actually there any more-- -perhaps a monster has picked it up or it has rotted away-- -until you can see or feel that location again. +That remains the case even if it is not actually there any +more---perhaps a monster has picked it up or it has rotted +away---until you can see or feel that location again. One notable exception is that if the object gets covered by the ``remembered, unseen monster'' marker. When that marker is later removed @@ -3033,6 +3033,8 @@ Override one or more symbols in the symbol set used for all dungeon levels except for the special rogue level. See the ``Modifying {\it NetHack\/} Symbols'' section. %.pg + +%.lp "" Example: %.sd \begin{verbatim} @@ -4382,158 +4384,158 @@ Below are the special commands you can rebind. Some of them can be bound to same keys with no problems, others are in the same ``context'', and if bound to same keys, only one of those commands will be available. Special command can only be bound to a single key. +\elist %.pg -\blist{} +\blist{\itemindent 10mm \labelwidth 15mm \rightmargin 20mm} %.lp -\item{\bb{count}} +\item[{\bb{count}}] Prefix key to start a count, to repeat a command this many times. With {\it number\verb+_+pad\/} only. Default is `{\tt n}'. %.lp -\item{\bb{doinv}} +\item[{\bb{doinv}}] Show inventory. With {\it number\verb+_+pad\/} only. Default is `{\tt 0}'. %.lp -\item{\bb{fight}} +\item[{\bb{fight}}] Prefix key to force fight a direction. Default is `{\tt F}'. %.lp -\item{\bb{fight.numpad}} +\item[{\bb{fight.numpad}}] Prefix key to force fight a direction. With {\it number\verb+_+pad\/} only. Default is `{\tt -}'. %.lp -\item{\bb{getdir.help}} +\item[{\bb{getdir.help}}] When asked for a direction, the key to show the help. Default is `{\tt ?}'. %.lp -\item{\bb{getdir.self}} +\item[{\bb{getdir.self}}] When asked for a direction, the key to target yourself. Default is `{\tt .}'. %.lp -\item{\bb{getdir.self2}} +\item[{\bb{getdir.self2}}] When asked for a direction, the key to target yourself. Default is `{\tt s}'. %.lp -\item{\bb{getpos.autodescribe}} +\item[{\bb{getpos.autodescribe}}] When asked for a location, the key to toggle {\it autodescribe\/}. Default is `{\tt \#}'. %.lp -\item{\bb{getpos.all.next}} +\item[{\bb{getpos.all.next}}] When asked for a location, the key to go to next closest interesting thing. Default is `{\tt a}'. %.lp -\item{\bb{getpos.all.prev}} +\item[{\bb{getpos.all.prev}}] When asked for a location, the key to go to previous closest interesting thing. Default is `{\tt A}'. %.lp -\item{\bb{getpos.door.next}} +\item[{\bb{getpos.door.next}}] When asked for a location, the key to go to next closest door or doorway. Default is `{\tt d}'. %.lp -\item{\bb{getpos.door.prev}} +\item[{\bb{getpos.door.prev}}] When asked for a location, the key to go to previous closest door or doorway. Default is `{\tt D}'. %.lp -\item{\bb{getpos.help}} +\item[{\bb{getpos.help}}] When asked for a location, the key to show help. Default is `{\tt ?}'. %.lp -\item{\bb{getpos.mon.next}} +\item[{\bb{getpos.mon.next}}] When asked for a location, the key to go to next closest monster. Default is `{\tt m}'. %.lp -\item{\bb{getpos.mon.prev}} +\item[{\bb{getpos.mon.prev}}] When asked for a location, the key to go to previous closest monster. Default is `{\tt M}'. %.lp -\item{\bb{getpos.obj.next}} +\item[{\bb{getpos.obj.next}}] When asked for a location, the key to go to next closest object. Default is `{\tt o}'. %.lp -\item{\bb{getpos.obj.prev}} +\item[{\bb{getpos.obj.prev}}] When asked for a location, the key to go to previous closest object. Default is `{\tt O}'. %.lp -\item{\bb{getpos.menu}} +\item[{\bb{getpos.menu}}] When asked for a location, and using one of the next or previous keys to cycle through targets, toggle showing a menu instead. Default is `{\tt !}'. %.lp -\item{\bb{getpos.moveskip}} +\item[{\bb{getpos.moveskip}}] When asked for a location, and using the shifted movement keys or meta-digit keys to fast-move around, move by skipping the same glyphs instead of by 8 units. Default is `{\tt *}'. %.lp -\item{\bb{getpos.filter}} +\item[{\bb{getpos.filter}}] When asked for a location, change the filtering mode when using one of the next or previous keys to cycle through targets. Toggles between no filtering, in view only, and in the same area only. Default is `{\tt "}'. %.lp -\item{\bb{getpos.pick}} +\item[{\bb{getpos.pick}}] When asked for a location, the key to choose the location, and possibly ask for more info. Default is `{\tt .}'. %.lp -\item{\bb{getpos.pick.once}} +\item[{\bb{getpos.pick.once}}] When asked for a location, the key to choose the location, and skip asking for more info. Default is `{\tt ,}'. %.lp -\item{\bb{getpos.pick.quick}} +\item[{\bb{getpos.pick.quick}}] When asked for a location, the key to choose the location, skip asking for more info, and exit the location asking loop. Default is `{\tt ;}'. %.lp -\item{\bb{getpos.pick.verbose}} +\item[{\bb{getpos.pick.verbose}}] When asked for a location, the key to choose the location, and show more info without asking. Default is `{\tt :}'. %.lp -\item{\bb{getpos.self}} +\item[{\bb{getpos.self}}] When asked for a location, the key to go to your location. Default is `{\tt @}'. %.lp -\item{\bb{getpos.unexplored.next}} +\item[{\bb{getpos.unexplored.next}}] When asked for a location, the key to go to next closest unexplored location. Default is `{\tt x}'. %.lp -\item{\bb{getpos.unexplored.prev}} +\item[{\bb{getpos.unexplored.prev}}] When asked for a location, the key to go to previous closest unexplored location. Default is `{\tt X}'. %.lp -\item{\bb{getpos.valid}} +\item[{\bb{getpos.valid}}] When asked for a location, the key to go to show valid target locations. Default is `{\tt \$}'. %.lp -\item{\bb{getpos.valid.next}} +\item[{\bb{getpos.valid.next}}] When asked for a location, the key to go to next closest valid location. Default is `{\tt z}'. %.lp -\item{\bb{getpos.valid.prev}} +\item[{\bb{getpos.valid.prev}}] When asked for a location, the key to go to previous closest valid location. Default is `{\tt Z}'. %.lp -\item{\bb{nopickup}} +\item[{\bb{nopickup}}] Prefix key to move without picking up items. Default is `{\tt m}'. %.lp -\item{\bb{redraw}} +\item[{\bb{redraw}}] Key to redraw the screen. Default is `{\tt \^{}R}'. %.lp -\item{\bb{redraw.numpad}} +\item[{\bb{redraw.numpad}}] Key to redraw the screen. With {\it number\verb+_+pad\/} only. Default is `{\tt \^{}L}'. %.lp -\item{\bb{repeat}} +\item[{\bb{repeat}}] Key to repeat previous command. Default is `{\tt \^{}A}'. %.lp -\item{\bb{reqmenu}} +\item[{\bb{reqmenu}}] Prefix key to request menu from some commands. Default is `{\tt m}'. %.lp -\item{\bb{run}} +\item[{\bb{run}}] Prefix key to run towards a direction. Default is `{\tt G}'. %.lp -\item{\bb{run.nopickup}} +\item[{\bb{run.nopickup}}] Prefix key to run towards a direction without picking up items on the way. Default is `{\tt M}'. %.lp -\item{\bb{run.numpad}} +\item[{\bb{run.numpad}}] Prefix key to run towards a direction. With {\it number\verb+_+pad\/} only. Default is `{\tt 5}'. %.lp -\item{\bb{rush}} +\item[{\bb{rush}}] Prefix key to rush towards a direction. Default is `{\tt g}'. \elist -\elist %.hn 2 @@ -4737,6 +4739,8 @@ combination with any of the other attributes. To specify both a color and an attribute, use `\&' to combine them. To specify multiple attributes, use `+' to combine those. + +%.lp "" For example: {\tt magenta\&inverse+dim}. Note that the display may substitute or ignore particular attributes @@ -4789,23 +4793,19 @@ percentage or absolute number threshold, or text to match against. \blist{} %.lp "*" -\item{\bb{}} -``{\tt always}'' will set the default attributes for that field. +\item[{\tt always}] will set the default attributes for that field. %.lp "*" -\item{\bb{}} -``{\tt up}'' and ``{\tt down}'' set the field attributes for when the field +\item[{\tt up} and ``{\tt down}''] set the field attributes for when the field value changes upwards or downwards. This attribute times out after {\tt statushilites} turns. %.lp "*" -\item{\bb{}} -``{\tt changed}'' sets the field attribute for when the field value +\item[{\tt changed}] sets the field attribute for when the field value changes. This attribute times out after {\tt statushilites} turns. (If a field has both a ``changed'' rule and an ``up'' or ``down'' rule which matches a change in the field's value, the ``up'' or ``down'' one takes precedence.) %.lp "*" -\item{\bb{}} -percentage sets the field attribute when the field value +\item[{\tt percentage}] sets the field attribute when the field value matches the percentage. It is specified as a number between 0 and 100, followed by `{\tt \%}' (percent sign). @@ -4833,8 +4833,7 @@ exactly 1 experience point short of the next level. % percentage will remain at 0\% no matter have many additional experience % points you earn.) %.lp "*" -\item{\bb{}} -absolute value sets the attribute when the field value +\item[{\tt absolute}] value sets the attribute when the field value matches that number. The number must be 0 or higher, except for ``{\it armor-class\/} which allows negative values, and may optionally be preceded by `{\tt =}'. @@ -4843,8 +4842,7 @@ it also matches when value is below or above. If the prefix is `{\tt <}' or `{\tt >}', only match when strictly above or below. %.lp "*" -\item{\bb{}} -text match sets the attribute when the field value matches the text. +\item[{\tt text}] match sets the attribute when the field value matches the text. Text matches can only be used for ``{\it alignment\/}'', ``{\it carrying-capacity\/}'', ``{\it hunger\/}'', ``{\it dungeon-level\/}'', and ``{\it title\/}''. From e33dfed4561d8184d17f751dde901294387183f7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 31 Oct 2019 19:43:59 -0400 Subject: [PATCH 097/529] quiet a mingw warning --- sys/winnt/windmain.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index f88fbaa37..2cfab8c91 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -21,15 +21,17 @@ extern LONG GetCurrentPackageFullName(UINT32 *packageFullNameLength, PWSTR packageFullName); extern HRESULT SHGetKnownFolderPath(REFKNOWNFOLDERID rfid, DWORD dwFlags, HANDLE hToken, PWSTR *ppszPath); +#ifndef DEFINE_KNOWN_FOLDER #ifdef INITGUID #define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID DECLSPEC_SELECTANY name = { l, w1, w2,{ b1, b2, b3, b4, b5, b6, b7, b8 } } #else #define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID name -#endif +#endif /* INITGUID */ +#endif /* DEFINE_KNOWN_FOLDER */ DEFINE_KNOWN_FOLDER (FOLDERID_ProgramData, 0x62ab5d82, 0xfdc1, 0x4dc3, 0xa9, 0xdd, 0x07, 0x0d, 0x1d, 0x49, 0x5d, 0x97); DEFINE_KNOWN_FOLDER (FOLDERID_LocalAppData, 0xf1b32785, 0x6fba, 0x4fcf, 0x9d, 0x55, 0x7b, 0x8e, 0x7f, 0x15, 0x70, 0x91); DEFINE_KNOWN_FOLDER (FOLDERID_Profile, 0x5e6c858f, 0x0e22, 0x4760, 0x9a, 0xfe, 0xea, 0x33, 0x17, 0xb6, 0x71, 0x73); -#endif +#endif /* __MINGW32__ */ #if 0 #include "wintty.h" From 215815c0b59c27e65d7b053bbb437ac411c85f5b Mon Sep 17 00:00:00 2001 From: Bart House Date: Thu, 31 Oct 2019 20:18:27 -0700 Subject: [PATCH 098/529] Changes to player selection dialog support to respond to per-monitor DPI. --- win/win32/NetHackW.rc | 10 +- win/win32/mhdlg.c | 541 ++++++++++++++++++++++-------- win/win32/resource.h | 7 +- win/win32/vs2017/NetHackW.vcxproj | 14 +- 4 files changed, 419 insertions(+), 153 deletions(-) diff --git a/win/win32/NetHackW.rc b/win/win32/NetHackW.rc index 1ac42d05d..59381dd90 100644 --- a/win/win32/NetHackW.rc +++ b/win/win32/NetHackW.rc @@ -172,12 +172,12 @@ BEGIN CONTROL "Chaotic",IDC_PLSEL_ALIGN_CHAOTIC,"Button",BS_AUTORADIOBUTTON,168,72,38,10 CONTROL "Male",IDC_PLSEL_GENDER_MALE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,168,108,30,10 CONTROL "Female",IDC_PLSEL_GENDER_FEMALE,"Button",BS_AUTORADIOBUTTON,168,120,38,10 - GROUPBOX "Alignment",IDC_STATIC,162,36,48,54 - GROUPBOX "Gender",IDC_STATIC,162,96,48,42 - GROUPBOX "Role",IDC_STATIC,6,36,72,150 - GROUPBOX "Race",IDC_STATIC,84,36,72,72 + GROUPBOX "Alignment",IDC_PLSEL_ALIGNMENT_GROUP,162,36,48,54 + GROUPBOX "Gender",IDC_PLSEL_GENDER_GROUP,162,96,48,42 + GROUPBOX "Role",IDC_PLSEL_ROLE_GROUP,6,36,72,150 + GROUPBOX "Race",IDC_PLSEL_RACE_GROUP,84,36,72,72 PUSHBUTTON "Random",IDC_PLSEL_RANDOM,90,192,54,14,WS_GROUP - GROUPBOX "Name",IDC_STATIC,6,0,120,30 + GROUPBOX "Name",IDC_PLSEL_NAME_GROUP,6,0,120,30 CONTROL "",IDC_PLSEL_ROLE_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_OWNERDRAWFIXED | LVS_ALIGNLEFT | LVS_NOSCROLL | LVS_NOCOLUMNHEADER | WS_BORDER | WS_GROUP | WS_TABSTOP,12,48,60,130 CONTROL "",IDC_PLSEL_RACE_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_OWNERDRAWFIXED | LVS_ALIGNLEFT | LVS_NOSCROLL | LVS_NOCOLUMNHEADER | WS_BORDER | WS_GROUP | WS_TABSTOP,90,48,60,51 END diff --git a/win/win32/mhdlg.c b/win/win32/mhdlg.c index 51134332c..cb76c9a18 100644 --- a/win/win32/mhdlg.c +++ b/win/win32/mhdlg.c @@ -4,6 +4,7 @@ /* various dialog boxes are defined here */ +#include "win10.h" #include "winMS.h" #include "hack.h" #include "func_tab.h" @@ -12,6 +13,7 @@ #include + /*---------------------------------------------------------------*/ /* data for getlin dialog */ struct getlin_data { @@ -276,22 +278,68 @@ ExtCmdDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) /*---------------------------------------------------------------*/ /* player selector dialog */ + +/* NOTE: this enumeration is in control tab order */ +enum player_selector_control { + psc_name_group, + psc_role_group, + psc_race_group, + psc_alignment_group, + psc_gender_group, + psc_name_box, + psc_role_list, + psc_race_list, + psc_lawful_button, + psc_neutral_button, + psc_chaotic_button, + psc_male_button, + psc_female_button, + psc_play_button, + psc_random_button, + psc_quit_button, + psc_control_count +}; + +static const s_psc_id[psc_control_count] = { + IDC_PLSEL_NAME_GROUP, + IDC_PLSEL_ROLE_GROUP, + IDC_PLSEL_RACE_GROUP, + IDC_PLSEL_ALIGNMENT_GROUP, + IDC_PLSEL_GENDER_GROUP, + IDC_PLSEL_NAME, + IDC_PLSEL_ROLE_LIST, + IDC_PLSEL_RACE_LIST, + IDC_PLSEL_ALIGN_LAWFUL, + IDC_PLSEL_ALIGN_NEUTRAL, + IDC_PLSEL_ALIGN_CHAOTIC, + IDC_PLSEL_GENDER_MALE, + IDC_PLSEL_GENDER_FEMALE, + IDOK, + IDC_PLSEL_RANDOM, + IDCANCEL +}; + +typedef struct { + int id; + POINT pos; + SIZE size; + HWND hWnd; +} control_t; + typedef struct plsel_data { + HWND dialog; + HWND focus; + control_t controls[psc_control_count]; + SIZE client_size; int config_race; int config_role; int config_gender; int config_alignment; - HWND control_role; - HWND control_race; - HWND control_genders[ROLE_GENDERS]; - HWND control_aligns[ROLE_ALIGNS]; int role_count; int race_count; - HWND focus; } plsel_data_t; INT_PTR CALLBACK PlayerSelectorDlgProc(HWND, UINT, WPARAM, LPARAM); -static void plselInitDialog(HWND hWnd); static void plselAdjustSelections(HWND hWnd); static boolean plselRandomize(plsel_data_t * data); static BOOL plselDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam); @@ -322,38 +370,314 @@ mswin_player_selection_window() return ok; } +int +list_view_height(HWND hWnd, int count) +{ + return (ListView_ApproximateViewRect(hWnd, -1, -1, count)) >> 16; +} + +/* calculate the size and position of the controls taking into account + the per-monitor DPI expressed as a scaling factor on sizes at 96 DPI */ +void +calculate_player_selector_layout(plsel_data_t * data) +{ + MonitorInfo monitorInfo; + win10_monitor_info(data->dialog, &monitorInfo); + + double scale = monitorInfo.scale; + + /* Note these hard coded sizes are in 96DPI pixels and must be + scaled by the per-monitor DPI scaling factor */ + int list_width = (int) (120 * scale); + int group_border = (int) (16 * scale); + int client_border = (int) (16 * scale); + int group_spacing = (int) (16 * scale); + int button_width = (int) (80 * scale); + int button_height = (int) (28 * scale); + + /* set control sizes */ + control_t * name_box = &data->controls[psc_name_box]; + name_box->size.cx = (int) (280 * scale); + name_box->size.cy = (int) (24 * scale); + + control_t * role_list = &data->controls[psc_role_list]; + /* NOTE: we dont' scale the list view reported height as it appears these + values are the actual size the control will be drawn at using the + existing DPI value */ + role_list->size.cy = list_view_height(role_list->hWnd, data->role_count); + role_list->size.cx = list_width; + + control_t * race_list = &data->controls[psc_race_list]; + race_list->size.cy = list_view_height(race_list->hWnd, data->race_count); + race_list->size.cx = list_width; + + for(int i = psc_lawful_button; i <= psc_quit_button; i++) { + data->controls[i].size.cx = button_width; + data->controls[i].size.cy = button_height; + } + + for(int i = 0; i < 3; i++) { + control_t * group_control = &data->controls[psc_name_group + i]; + control_t * inner_control = &data->controls[psc_name_box + i]; + group_control->size.cx = inner_control->size.cx + (2 * group_border); + group_control->size.cy = inner_control->size.cy + (2 * group_border); + } + + control_t * alignment_group = &data->controls[psc_alignment_group]; + alignment_group->size.cx = button_width + (2 * group_border); + alignment_group->size.cy = (3 * button_height) + (2 * group_border); + + control_t * gender_group = &data->controls[psc_gender_group]; + gender_group->size.cx = button_width + (2 * group_border); + gender_group->size.cy = (2 * button_height) + (2 * group_border); + + /* set control positions */ + control_t * name_group = &data->controls[psc_name_group]; + name_group->pos.x = client_border; + name_group->pos.y = client_border; + + control_t * role_group = &data->controls[psc_role_group]; + role_group->pos.x = client_border; + role_group->pos.y = name_group->pos.y + name_group->size.cy + group_spacing; + + control_t * race_group = &data->controls[psc_race_group]; + race_group->pos.x = role_group->pos.x + role_group->size.cx + group_spacing; + race_group->pos.y = role_group->pos.y; + + for(int i = 0; i < 3; i++) { + control_t * group_control = &data->controls[psc_name_group + i]; + control_t * inner_control = &data->controls[psc_name_box + i]; + inner_control->pos.x = group_control->pos.x + group_border; + inner_control->pos.y = group_control->pos.y + group_border; + } + + alignment_group->pos.x = race_group->pos.x + race_group->size.cx + group_spacing; + alignment_group->pos.y = race_group->pos.y; + + for(int i = psc_lawful_button; i <= psc_chaotic_button; i++) { + data->controls[i].pos.x = alignment_group->pos.x + group_border; + data->controls[i].pos.y = alignment_group->pos.y + group_border + + ((i -psc_lawful_button) * button_height); + } + + gender_group->pos.x = alignment_group->pos.x; + gender_group->pos.y = alignment_group->pos.y + alignment_group->size.cy + group_spacing; + + for(int i = psc_male_button; i <= psc_female_button; i++) { + data->controls[i].pos.x = gender_group->pos.x + group_border; + data->controls[i].pos.y = gender_group->pos.y + group_border + + ((i - psc_male_button) * button_height); + } + + int group_bottom = role_group->pos.y + role_group->size.cy; + if (group_bottom < race_group->pos.y + race_group->size.cy) + group_bottom = race_group->pos.y + race_group->size.cy; + if (group_bottom < gender_group->pos.y + gender_group->size.cy) + group_bottom = gender_group->pos.y + gender_group->size.cy; + + control_t * play_button = &data->controls[psc_play_button]; + play_button->pos.y = group_bottom + group_spacing; + play_button->pos.x = role_group->pos.x; + + control_t * random_button = &data->controls[psc_random_button]; + random_button->pos.y = play_button->pos.y; + random_button->pos.x = race_list->pos.x; + + control_t * quit_button = &data->controls[psc_quit_button]; + quit_button->pos.y = play_button->pos.y; + quit_button->pos.x = data->controls[psc_female_button].pos.x; + + data->client_size.cx = alignment_group->pos.x + alignment_group->size.cx; + data->client_size.cy = quit_button->pos.y + quit_button->size.cy; + data->client_size.cx += client_border; + data->client_size.cy += client_border; +} + +void +get_rect_size(RECT * rect, SIZE * size) +{ + size->cx = rect->right - rect->left + 1; + size->cy = rect->bottom - rect->top + 1; +} + +/* center given dialog in the main window */ +void +center_dialog(HWND dialog) +{ + RECT main_rect; + SIZE main_size; + RECT dialog_rect; + SIZE dialog_size; + POINT pos; + + GetWindowRect(GetNHApp()->hMainWnd, &main_rect); + get_rect_size(&main_rect, &main_size); + + GetWindowRect(dialog, &dialog_rect); + get_rect_size(&dialog_rect, &dialog_size); + + pos.x = main_rect.left + (main_size.cx - dialog_size.cx) / 2; + pos.y = main_rect.top + (main_size.cy - dialog_size.cy) / 2; + + MoveWindow(dialog, pos.x, pos.y, dialog_size.cx, dialog_size.cy, + TRUE); +} + +/* size the dialog such that it has the given client rect size */ +void +size_dialog(HWND dialog, SIZE new_client_size) +{ + RECT dialog_rect; + SIZE dialog_size; + RECT client_rect; + SIZE client_size; + + GetWindowRect(dialog, &dialog_rect); + get_rect_size(&dialog_rect, &dialog_size); + + GetClientRect(dialog, &client_rect); + get_rect_size(&client_rect, &client_size); + + dialog_size.cx += new_client_size.cx - client_size.cx; + dialog_size.cy += new_client_size.cy - client_size.cy; + + MoveWindow(dialog, dialog_rect.left, dialog_rect.top, + dialog_size.cx, dialog_size.cy, TRUE); +} + +/* helper routine to move all controls according to there position + and size information */ +void +move_controls(control_t * controls, int count) +{ + control_t * control = controls; + while(count-- > 0) { + MoveWindow(control->hWnd, control->pos.x, control->pos.y, + control->size.cx, control->size.cy, TRUE); + control++; + } +} + +/* adjust the size and positions of all controls in the player + selection dialog taking into account the per-monitor DPI. */ +void +do_player_selector_layout(plsel_data_t * data) +{ + calculate_player_selector_layout(data); + move_controls(data->controls, psc_control_count); + size_dialog(data->dialog, data->client_size); +} + +/* initialize player selector dialog */ +void +plselInitDialog(struct plsel_data * data) +{ + TCHAR wbuf[BUFSZ]; + LVCOLUMN lvcol; + + SetWindowLongPtr(data->dialog, GWLP_USERDATA, (LONG_PTR) data); + + for(int i = 0; i < psc_control_count; i++) { + data->controls[i].id = s_psc_id[i]; + data->controls[i].hWnd = GetDlgItem(data->dialog, s_psc_id[i]); + } + + control_t * role_list = &data->controls[psc_role_list]; + + ZeroMemory(&lvcol, sizeof(lvcol)); + lvcol.mask = LVCF_WIDTH; + lvcol.cx = 1024; + + /* build role list */ + ListView_InsertColumn(role_list->hWnd, 0, &lvcol); + data->role_count = 0; + for (int i = 0; roles[i].name.m; i++) { + LVITEM lvitem; + ZeroMemory(&lvitem, sizeof(lvitem)); + + lvitem.mask = LVIF_STATE | LVIF_TEXT; + lvitem.iItem = i; + lvitem.iSubItem = 0; + lvitem.state = 0; + lvitem.stateMask = LVIS_FOCUSED; + if (flags.female && roles[i].name.f) + lvitem.pszText = NH_A2W(roles[i].name.f, wbuf, BUFSZ); + else + lvitem.pszText = NH_A2W(roles[i].name.m, wbuf, BUFSZ); + if (ListView_InsertItem(role_list->hWnd, &lvitem) == -1) { + panic("cannot insert menu item"); + } + data->role_count++; + } + + /* build race list */ + control_t * race_list = &data->controls[psc_race_list]; + ListView_InsertColumn(race_list->hWnd, 0, &lvcol); + data->race_count = 0; + for (int i = 0; races[i].noun; i++) { + LVITEM lvitem; + ZeroMemory(&lvitem, sizeof(lvitem)); + + lvitem.mask = LVIF_STATE | LVIF_TEXT; + lvitem.iItem = i; + lvitem.iSubItem = 0; + lvitem.state = 0; + lvitem.stateMask = LVIS_FOCUSED; + lvitem.pszText = NH_A2W(races[i].noun, wbuf, BUFSZ); + if (ListView_InsertItem(race_list->hWnd, &lvitem) == -1) { + panic("cannot insert menu item"); + } + data->race_count++; + } + + /* set gender radio button state */ + control_t * gender_buttons = &data->controls[psc_male_button]; + for (int i = 0; i < ROLE_GENDERS; i++) + Button_Enable(gender_buttons[i].hWnd, TRUE); + + Button_SetCheck(data->controls[psc_male_button].hWnd, BST_CHECKED); + + /* set alignment radio button state */ + control_t * alignment_buttons = &data->controls[psc_lawful_button]; + for (int i = 0; i < ROLE_ALIGNS; i++) + Button_Enable(alignment_buttons[i].hWnd, TRUE); + + Button_SetCheck(data->controls[psc_lawful_button].hWnd, BST_CHECKED); + + /* set player name */ + control_t * name_box = &data->controls[psc_name_box]; + SetDlgItemText(data->dialog, name_box->id, NH_A2W(plname, wbuf, sizeof(wbuf))); + + plselRandomize(data); + + /* populate select boxes */ + plselAdjustSelections(data->dialog); + + /* set tab order */ + control_t * control = &data->controls[psc_quit_button]; + for(int i = psc_quit_button; i >= psc_name_box; i--, control++) + SetWindowPos(control->hWnd, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); + + do_player_selector_layout(data); + + center_dialog(data->dialog); +} + INT_PTR CALLBACK PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { - struct plsel_data *data; - RECT main_rt, dlg_rt; - SIZE dlg_sz; + plsel_data_t *data; switch (message) { case WM_INITDIALOG: - data = (struct plsel_data *) lParam; - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) data); - /* center dialog in the main window */ - GetWindowRect(GetNHApp()->hMainWnd, &main_rt); - GetWindowRect(hWnd, &dlg_rt); - dlg_sz.cx = dlg_rt.right - dlg_rt.left; - dlg_sz.cy = dlg_rt.bottom - dlg_rt.top; + data = (plsel_data_t *) lParam; + data->dialog = hWnd; - dlg_rt.left = (main_rt.left + main_rt.right - dlg_sz.cx) / 2; - dlg_rt.right = dlg_rt.left + dlg_sz.cx; - dlg_rt.top = (main_rt.top + main_rt.bottom - dlg_sz.cy) / 2; - dlg_rt.bottom = dlg_rt.top + dlg_sz.cy; - MoveWindow(hWnd, (main_rt.left + main_rt.right - dlg_sz.cx) / 2, - (main_rt.top + main_rt.bottom - dlg_sz.cy) / 2, dlg_sz.cx, - dlg_sz.cy, TRUE); - - /* init dialog */ - plselInitDialog(hWnd); + plselInitDialog(data); /* tell windows to set the focus */ return TRUE; - break; case WM_DRAWITEM: if (wParam == IDC_PLSEL_ROLE_LIST || wParam == IDC_PLSEL_RACE_LIST) @@ -367,20 +691,23 @@ PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) data = (struct plsel_data *) GetWindowLongPtr(hWnd, GWLP_USERDATA); + control_t * role_control = &data->controls[psc_role_list]; + control_t * race_control = &data->controls[psc_race_list]; + switch (nmhdr->code) { case LVN_KEYDOWN: { LPNMLVKEYDOWN lpnmkeydown = (LPNMLVKEYDOWN) lParam; if (lpnmkeydown->wVKey == ' ') { - if (control == data->control_role) { - int i = ListView_GetNextItem(data->control_role, -1, LVNI_FOCUSED); - assert(i == -1 || ListView_GetNextItem(data->control_role, i, LVNI_FOCUSED) == -1); + if (control == role_control->hWnd) { + int i = ListView_GetNextItem(control, -1, LVNI_FOCUSED); + assert(i == -1 || ListView_GetNextItem(control, i, LVNI_FOCUSED) == -1); flags.initrole = i; plselAdjustSelections(hWnd); - } else if (control == data->control_race) { - int i = ListView_GetNextItem(data->control_race, -1, LVNI_FOCUSED); - assert(i == -1 || ListView_GetNextItem(data->control_race, i, LVNI_FOCUSED) == -1); + } else if (control == race_control->hWnd) { + int i = ListView_GetNextItem(control, -1, LVNI_FOCUSED); + assert(i == -1 || ListView_GetNextItem(control, i, LVNI_FOCUSED) == -1); if (ok_race(flags.initrole, i, ROLE_RANDOM, ROLE_RANDOM)) { flags.initrace = i; plselAdjustSelections(hWnd); @@ -395,10 +722,10 @@ PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) int i = lpnmitem->iItem; if (i == -1) return FALSE; - if (control == data->control_role) { + if (control == role_control->hWnd) { flags.initrole = i; plselAdjustSelections(hWnd); - } else if(control == data->control_race) { + } else if(control == race_control->hWnd) { if (ok_race(flags.initrole, i, ROLE_RANDOM, ROLE_RANDOM)) { flags.initrace = i; plselAdjustSelections(hWnd); @@ -408,12 +735,12 @@ PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) break; case NM_KILLFOCUS: { - if (data->focus == data->control_race) { + if (data->focus == race_control->hWnd) { data->focus = NULL; - ListView_RedrawItems(data->control_race, 0, data->race_count - 1); - } else if (data->focus == data->control_role) { + ListView_RedrawItems(race_control->hWnd, 0, data->race_count - 1); + } else if (data->focus == role_control->hWnd) { data->focus = NULL; - ListView_RedrawItems(data->control_role, 0, data->role_count - 1); + ListView_RedrawItems(role_control->hWnd, 0, data->role_count - 1); } } break; @@ -421,11 +748,11 @@ PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { data->focus = control; - if (control == data->control_race) { - data->focus = data->control_race; + if (control == race_control->hWnd) { + data->focus = control; plselAdjustSelections(hWnd); - } else if (control == data->control_role) { - data->focus = data->control_role; + } else if (control == role_control->hWnd) { + data->focus = control; plselAdjustSelections(hWnd); } } @@ -478,109 +805,29 @@ PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } break; + + case WM_DPICHANGED: + { + data = (struct plsel_data *) GetWindowLongPtr(hWnd, GWLP_USERDATA); + + do_player_selector_layout(data); + + InvalidateRect(hWnd, NULL, TRUE); + } break; } + return FALSE; } -/* initialize player selector dialog */ -void -plselInitDialog(HWND hWnd) -{ - struct plsel_data * data = (plsel_data_t *) GetWindowLongPtr(hWnd, GWLP_USERDATA); - TCHAR wbuf[BUFSZ]; - LVCOLUMN lvcol; - data->control_role = GetDlgItem(hWnd, IDC_PLSEL_ROLE_LIST); - data->control_race = GetDlgItem(hWnd, IDC_PLSEL_RACE_LIST); - - ZeroMemory(&lvcol, sizeof(lvcol)); - lvcol.mask = LVCF_WIDTH; - lvcol.cx = GetSystemMetrics(SM_CXFULLSCREEN); - - /* build role list */ - ListView_InsertColumn(data->control_role, 0, &lvcol); - data->role_count = 0; - for (int i = 0; roles[i].name.m; i++) { - LVITEM lvitem; - ZeroMemory(&lvitem, sizeof(lvitem)); - - lvitem.mask = LVIF_STATE | LVIF_TEXT; - lvitem.iItem = i; - lvitem.iSubItem = 0; - lvitem.state = 0; - lvitem.stateMask = LVIS_FOCUSED; - if (flags.female && roles[i].name.f) - lvitem.pszText = NH_A2W(roles[i].name.f, wbuf, BUFSZ); - else - lvitem.pszText = NH_A2W(roles[i].name.m, wbuf, BUFSZ); - if (ListView_InsertItem(data->control_role, &lvitem) == -1) { - panic("cannot insert menu item"); - } - data->role_count++; - } - - /* build race list */ - ListView_InsertColumn(data->control_race, 0, &lvcol); - data->race_count = 0; - for (int i = 0; races[i].noun; i++) { - LVITEM lvitem; - ZeroMemory(&lvitem, sizeof(lvitem)); - - lvitem.mask = LVIF_STATE | LVIF_TEXT; - lvitem.iItem = i; - lvitem.iSubItem = 0; - lvitem.state = 0; - lvitem.stateMask = LVIS_FOCUSED; - lvitem.pszText = NH_A2W(races[i].noun, wbuf, BUFSZ); - if (ListView_InsertItem(data->control_race, &lvitem) == -1) { - panic("cannot insert menu item"); - } - data->race_count++; - } - - for(int i = 0; i < ROLE_GENDERS; i++) - data->control_genders[i] = GetDlgItem(hWnd, IDC_PLSEL_GENDER_MALE + i); - - for(int i = 0; i < ROLE_ALIGNS; i++) - data->control_aligns[i] = GetDlgItem(hWnd, IDC_PLSEL_ALIGN_LAWFUL + i); - - /* set gender radio button state */ - for (int i = 0; i < ROLE_GENDERS; i++) - Button_Enable(data->control_genders[i], TRUE); - - Button_SetCheck(data->control_genders[0], BST_CHECKED); - - /* set alignment radio button state */ - for (int i = 0; i < ROLE_ALIGNS; i++) - Button_Enable(data->control_aligns[i], TRUE); - - Button_SetCheck(data->control_aligns[0], BST_CHECKED); - - /* set player name */ - SetDlgItemText(hWnd, IDC_PLSEL_NAME, NH_A2W(plname, wbuf, sizeof(wbuf))); - - plselRandomize(data); - - /* populate select boxes */ - plselAdjustSelections(hWnd); - - /* set tab order */ - SetWindowPos(GetDlgItem(hWnd, IDCANCEL), NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); - SetWindowPos(GetDlgItem(hWnd, IDC_PLSEL_RANDOM), NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); - SetWindowPos(GetDlgItem(hWnd, IDOK), NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); - for(int i = ROLE_GENDERS - 1; i >= 0; i--) - SetWindowPos(data->control_genders[i], NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); - for(int i = ROLE_ALIGNS - 1; i >= 0; i--) - SetWindowPos(data->control_aligns[i], NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); - SetWindowPos(data->control_race, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); - SetWindowPos(data->control_role, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); - -} void plselAdjustSelections(HWND hWnd) { struct plsel_data * data = (plsel_data_t *) GetWindowLongPtr(hWnd, GWLP_USERDATA); + control_t * role_control = &data->controls[psc_role_list]; + control_t * race_control = &data->controls[psc_race_list]; + if (!ok_race(flags.initrole, flags.initrace, ROLE_RANDOM, ROLE_RANDOM)) flags.initrace = pick_race(flags.initrole, ROLE_RANDOM, ROLE_RANDOM, ROLE_RANDOM); @@ -590,29 +837,31 @@ plselAdjustSelections(HWND hWnd) if (!ok_align(flags.initrole, flags.initrace, flags.initgend, flags.initalign)) flags.initalign = pick_align(flags.initrole, flags.initrace, flags.initgend , ROLE_RANDOM); - ListView_RedrawItems(data->control_role, 0, data->role_count - 1); - ListView_RedrawItems(data->control_race, 0, data->race_count - 1); + ListView_RedrawItems(role_control->hWnd, 0, data->role_count - 1); + ListView_RedrawItems(race_control->hWnd, 0, data->race_count - 1); /* set gender radio button state */ for (int i = 0; i < ROLE_GENDERS; i++) { + HWND button = data->controls[psc_male_button+i].hWnd; BOOL enable = ok_gend(flags.initrole, flags.initrace, i, flags.initalign); - Button_Enable(data->control_genders[i], enable); - LRESULT state = Button_GetCheck(data->control_genders[i]); + Button_Enable(button, enable); + LRESULT state = Button_GetCheck(button); if (state == BST_CHECKED && flags.initgend != i) - Button_SetCheck(data->control_genders[i], BST_UNCHECKED); + Button_SetCheck(button, BST_UNCHECKED); if (state == BST_UNCHECKED && flags.initgend == i) - Button_SetCheck(data->control_genders[i], BST_CHECKED); + Button_SetCheck(button, BST_CHECKED); } /* set alignment radio button state */ for (int i = 0; i < ROLE_ALIGNS; i++) { + HWND button = data->controls[psc_lawful_button+i].hWnd; BOOL enable = ok_align(flags.initrole, flags.initrace, flags.initgend, i); - Button_Enable(data->control_aligns[i], enable); - LRESULT state = Button_GetCheck(data->control_aligns[i]); + Button_Enable(button, enable); + LRESULT state = Button_GetCheck(button); if (state == BST_CHECKED && flags.initalign != i) - Button_SetCheck(data->control_aligns[i], BST_UNCHECKED); + Button_SetCheck(button, BST_UNCHECKED); if (state == BST_UNCHECKED && flags.initalign == i) - Button_SetCheck(data->control_aligns[i], BST_CHECKED); + Button_SetCheck(button, BST_CHECKED); } } diff --git a/win/win32/resource.h b/win/win32/resource.h index 6be779811..fdd864f12 100644 --- a/win/win32/resource.h +++ b/win/win32/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. -// Used by winhack.rc +// Used by NetHackW.rc // #define IDC_MYICON 2 #define IDD_WINHACK_DIALOG 102 @@ -114,6 +114,11 @@ #define IDC_PLSEL_ALIGN_CHAOTIC 1336 #define IDC_PLSEL_GENDER_MALE 1337 #define IDC_PLSEL_GENDER_FEMALE 1338 +#define IDC_PLSEL_NAME_GROUP 1339 +#define IDC_PLSEL_ROLE_GROUP 1340 +#define IDC_PLSEL_RACE_GROUP 1341 +#define IDC_PLSEL_ALIGNMENT_GROUP 1342 +#define IDC_PLSEL_GENDER_GROUP 1343 #define IDM_SAVE 32771 #define IDM_HELP_LONG 32772 #define IDM_HELP_COMMANDS 32773 diff --git a/win/win32/vs2017/NetHackW.vcxproj b/win/win32/vs2017/NetHackW.vcxproj index 793158e01..4369b4485 100644 --- a/win/win32/vs2017/NetHackW.vcxproj +++ b/win/win32/vs2017/NetHackW.vcxproj @@ -201,6 +201,18 @@ + + + + + + + + + + + + @@ -212,4 +224,4 @@ - + \ No newline at end of file From 34cf17c4d0588a3c01411d9884bc6618dece99dd Mon Sep 17 00:00:00 2001 From: Bart House Date: Thu, 31 Oct 2019 20:37:43 -0700 Subject: [PATCH 099/529] New package submitted to microsoft store. --- win/win32/vs2017/NetHackPackage.appxmanifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/win32/vs2017/NetHackPackage.appxmanifest b/win/win32/vs2017/NetHackPackage.appxmanifest index da4928ca9..44c752964 100644 --- a/win/win32/vs2017/NetHackPackage.appxmanifest +++ b/win/win32/vs2017/NetHackPackage.appxmanifest @@ -1,6 +1,6 @@  - + NetHack 3.6 NetHack DevTeam From 2f260541d96848d26b342e9e678dec57b1cdb32d Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 1 Nov 2019 12:48:09 -0400 Subject: [PATCH 100/529] more doc updates and tweaks --- doc/Guidebook.mn | 20 ++++++-- doc/Guidebook.tex | 125 ++++++++++++++++++++++++---------------------- 2 files changed, 81 insertions(+), 64 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 8e18ec97d..0f9068ede 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "October 31, 2019 +.ds f2 "November 1, 2019 . .\" A note on some special characters: .\" \(lq = left double quote @@ -2617,8 +2617,7 @@ Using a configuration file .hw .nethackrc defaults.nh nethack.exe nethackW.exe The default name of the configuration file varies on different operating systems. -On MS-DOS and Windows, it is \(lqdefaults.nh\(rq -in the same folder as nethack.exe or nethackW.exe. +.pg On .UX , Linux, @@ -2626,6 +2625,19 @@ and Mac OS X it is \(lq.nethackrc\(rq in the user's home directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor. .pg +On Windows, if you manually installed from the zip file, +it is \(lqdefaults.nh\(rq +in the same folder as nethack.exe or nethackW.exe. +If you installed using the Microsoft Store, it is +\(lqdefaults.nh\(rq in the following folder: +\(lq\\%USERPROFILE%\\NetHack\(rq. There, a starting template is +provided for you to use to create your \(lqdefaults.nh\(rq +configuration file. It is \(lqdefaults.tmp\(rq also in the following +folder: +\(lq\\%USERPROFILE%\\NetHack\(rq +.pg +On MS-DOS, it is \(lqdefaults.nh\(rq in the same folder as nethack.exe. +.pg Any line in the configuration file starting with \(oq#\(cq is treated as a comment. Empty lines are ignored. @@ -4289,7 +4301,7 @@ text to match against. .lp "*" \(lqalways\(rq will set the default attributes for that field. .lp "*" -\(lqup\(rq and \(lqdown\(rq set the field attributes for when the field +\(lqup\(rq, \(lqdown\(rq set the field attributes for when the field value changes upwards or downwards. This attribute times out after .op statushilites diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 87cf04452..77ce5e2e6 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{October 31, 2019} +\date{November 1, 2019} \maketitle @@ -2867,27 +2867,32 @@ for system administrators. %.pg The default name and location of the configuration file varies on different -operating systems. If you manually installed on MS-DOS and Windows, -it is \mbox{``defaults.nh''} in -the same folder as \mbox{{\it nethack.exe\/}} or \mbox{{\it nethackW.exe\/}}. -If you installed using the Microsoft Store, it is \mbox{``defaults.nh''} in -the folder \mbox{{``\%USERPROFILE\%\textbackslash NetHack''}}. +operating systems.\\ + +%.lp "" On Unix, Linux and Mac OS X it is \mbox{``.nethackrc''} in the user's home directory. The file may not exist, but it is a normal ASCII text file and -can be created with any text editor. +can be created with any text editor.\\ -%.pg -If you installed using the Microsoft Store, you will find that we provide -a starting template for you to use to create your \mbox{``defaults.nh''} -configuration file. It is \mbox{``defaults.tmp''} also in the folder +%.lp "" +On Windows, if you manually installed from the zip file, +it is \mbox{``defaults.nh''} in the same folder as +\mbox{{\it nethack.exe\/}} or \mbox{{\it nethackW.exe\/}}. +If you installed using the Microsoft Store, it is \mbox{``defaults.nh''} in +the following folder: \mbox{{``\%USERPROFILE\%\textbackslash NetHack''}}. +There, a starting template is provided for you to use to create your +\mbox{``defaults.nh''} configuration file. It is \mbox{``defaults.tmp''} +also in the following folder: +\mbox{{``\%USERPROFILE\%\textbackslash NetHack''}}.\\ -%.pg +%.lp "" +On MS-DOS it is \mbox{``defaults.nh''} in the same folder as +\mbox{{\it nethack.exe\/}}.\\ + +%.lp "" Any line in the configuration file starting with `{\tt \#}' is treated as a comment. -Empty lines are ignored. - -%.pg -Any line beginning with `{\tt [}' and ending in `{\tt ]}' is considered a section +Empty lines are ignored. Any line beginning with `{\tt [}' and ending in `{\tt ]}' is considered a section marker. The text between the square brackets is the section name. Lines after a section marker belong to that section, and are ignored unless a CHOOSE -statement was used to select that section. @@ -4105,7 +4110,7 @@ Number of lines for traditional below-the-map status display. Acceptable values are 2 and 3 (default is 2). Curses and tty interfaces only. %.lp -\item[\ib{term\verb+_+cols}\ \ {\it and}]" +\item[\ib{term\verb+_+cols} {\normalfont and}] %.lp \item[\ib{term\verb+_+rows}] Curses interface only. @@ -4387,154 +4392,154 @@ can only be bound to a single key. \elist %.pg -\blist{\itemindent 10mm \labelwidth 15mm \rightmargin 20mm} +\blist{\itemindent 10mm \labelwidth 15mm \rightmargin 15mm} %.lp \item[{\bb{count}}] Prefix key to start a count, to repeat a command this many times. -With {\it number\verb+_+pad\/} only. Default is `{\tt n}'. +With {\it number\verb+_+pad\/} only. Default is~`{\tt n}'. %.lp \item[{\bb{doinv}}] -Show inventory. With {\it number\verb+_+pad\/} only. Default is `{\tt 0}'. +Show inventory. With {\it number\verb+_+pad\/} only. Default is~`{\tt 0}'. %.lp \item[{\bb{fight}}] -Prefix key to force fight a direction. Default is `{\tt F}'. +Prefix key to force fight a direction. Default is~`{\tt F}'. %.lp \item[{\bb{fight.numpad}}] Prefix key to force fight a direction. With {\it number\verb+_+pad\/} only. -Default is `{\tt -}'. +Default is~`{\tt -}'. %.lp \item[{\bb{getdir.help}}] -When asked for a direction, the key to show the help. Default is `{\tt ?}'. +When asked for a direction, the key to show the help. Default is~`{\tt ?}'. %.lp \item[{\bb{getdir.self}}] -When asked for a direction, the key to target yourself. Default is `{\tt .}'. +When asked for a direction, the key to target yourself. Default is~`{\tt .}'. %.lp \item[{\bb{getdir.self2}}] -When asked for a direction, the key to target yourself. Default is `{\tt s}'. +When asked for a direction, the key to target yourself. Default is~`{\tt s}'. %.lp \item[{\bb{getpos.autodescribe}}] When asked for a location, the key to toggle {\it autodescribe\/}. -Default is `{\tt \#}'. +Default is~`{\tt \#}'. %.lp \item[{\bb{getpos.all.next}}] When asked for a location, the key to go to next closest interesting thing. -Default is `{\tt a}'. +Default is~`{\tt a}'. %.lp \item[{\bb{getpos.all.prev}}] When asked for a location, the key to go to previous closest interesting thing. -Default is `{\tt A}'. +Default is~`{\tt A}'. %.lp \item[{\bb{getpos.door.next}}] When asked for a location, the key to go to next closest door or doorway. -Default is `{\tt d}'. +Default is~`{\tt d}'. %.lp \item[{\bb{getpos.door.prev}}] When asked for a location, the key to go to previous closest door or doorway. -Default is `{\tt D}'. +Default is~`{\tt D}'. %.lp \item[{\bb{getpos.help}}] -When asked for a location, the key to show help. Default is `{\tt ?}'. +When asked for a location, the key to show help. Default is~`{\tt ?}'. %.lp \item[{\bb{getpos.mon.next}}] When asked for a location, the key to go to next closest monster. -Default is `{\tt m}'. +Default is~`{\tt m}'. %.lp \item[{\bb{getpos.mon.prev}}] When asked for a location, the key to go to previous closest monster. -Default is `{\tt M}'. +Default is~`{\tt M}'. %.lp \item[{\bb{getpos.obj.next}}] When asked for a location, the key to go to next closest object. -Default is `{\tt o}'. +Default is~`{\tt o}'. %.lp \item[{\bb{getpos.obj.prev}}] When asked for a location, the key to go to previous closest object. -Default is `{\tt O}'. +Default is~`{\tt O}'. %.lp \item[{\bb{getpos.menu}}] When asked for a location, and using one of the next or previous keys to -cycle through targets, toggle showing a menu instead. Default is `{\tt !}'. +cycle through targets, toggle showing a menu instead. Default is~`{\tt !}'. %.lp \item[{\bb{getpos.moveskip}}] When asked for a location, and using the shifted movement keys or meta-digit keys to fast-move around, move by skipping the same glyphs instead of by 8 units. -Default is `{\tt *}'. +Default is~`{\tt *}'. %.lp \item[{\bb{getpos.filter}}] When asked for a location, change the filtering mode when using one of the next or previous keys to cycle through targets. Toggles between no -filtering, in view only, and in the same area only. Default is `{\tt "}'. +filtering, in view only, and in the same area only. Default is~`{\tt "}'. %.lp \item[{\bb{getpos.pick}}] When asked for a location, the key to choose the location, and possibly -ask for more info. Default is `{\tt .}'. +ask for more info. Default is~`{\tt .}'. %.lp \item[{\bb{getpos.pick.once}}] When asked for a location, the key to choose the location, and skip -asking for more info. Default is `{\tt ,}'. +asking for more info. Default is~`{\tt ,}'. %.lp \item[{\bb{getpos.pick.quick}}] When asked for a location, the key to choose the location, skip asking -for more info, and exit the location asking loop. Default is `{\tt ;}'. +for more info, and exit the location asking loop. Default is~`{\tt ;}'. %.lp \item[{\bb{getpos.pick.verbose}}] When asked for a location, the key to choose the location, and show more -info without asking. Default is `{\tt :}'. +info without asking. Default is~`{\tt :}'. %.lp \item[{\bb{getpos.self}}] When asked for a location, the key to go to your location. -Default is `{\tt @}'. +Default is~`{\tt @}'. %.lp \item[{\bb{getpos.unexplored.next}}] When asked for a location, the key to go to next closest unexplored location. -Default is `{\tt x}'. +Default is~`{\tt x}'. %.lp \item[{\bb{getpos.unexplored.prev}}] When asked for a location, the key to go to previous closest unexplored -location. Default is `{\tt X}'. +location. Default is~`{\tt X}'. %.lp \item[{\bb{getpos.valid}}] When asked for a location, the key to go to show valid target locations. -Default is `{\tt \$}'. +Default is~`{\tt \$}'. %.lp \item[{\bb{getpos.valid.next}}] When asked for a location, the key to go to next closest valid location. -Default is `{\tt z}'. +Default is~`{\tt z}'. %.lp \item[{\bb{getpos.valid.prev}}] When asked for a location, the key to go to previous closest valid location. -Default is `{\tt Z}'. +Default is~`{\tt Z}'. %.lp \item[{\bb{nopickup}}] -Prefix key to move without picking up items. Default is `{\tt m}'. +Prefix key to move without picking up items. Default is~`{\tt m}'. %.lp \item[{\bb{redraw}}] -Key to redraw the screen. Default is `{\tt \^{}R}'. +Key to redraw the screen. Default is~`{\tt \^{}R}'. %.lp \item[{\bb{redraw.numpad}}] Key to redraw the screen. With {\it number\verb+_+pad\/} only. -Default is `{\tt \^{}L}'. +Default is~`{\tt \^{}L}'. %.lp \item[{\bb{repeat}}] -Key to repeat previous command. Default is `{\tt \^{}A}'. +Key to repeat previous command. Default is~`{\tt \^{}A}'. %.lp \item[{\bb{reqmenu}}] -Prefix key to request menu from some commands. Default is `{\tt m}'. +Prefix key to request menu from some commands. Default is~`{\tt m}'. %.lp \item[{\bb{run}}] -Prefix key to run towards a direction. Default is `{\tt G}'. +Prefix key to run towards a direction. Default is~`{\tt G}'. %.lp \item[{\bb{run.nopickup}}] Prefix key to run towards a direction without picking up items on the way. -Default is `{\tt M}'. +Default is~`{\tt M}'. %.lp \item[{\bb{run.numpad}}] Prefix key to run towards a direction. With {\it number\verb+_+pad\/} only. -Default is `{\tt 5}'. +Default is~`{\tt 5}'. %.lp \item[{\bb{rush}}] -Prefix key to rush towards a direction. Default is `{\tt g}'. +Prefix key to rush towards a direction. Default is~`{\tt g}'. \elist @@ -4795,9 +4800,9 @@ percentage or absolute number threshold, or text to match against. %.lp "*" \item[{\tt always}] will set the default attributes for that field. %.lp "*" -\item[{\tt up} and ``{\tt down}''] set the field attributes for when the field -value changes upwards or downwards. This attribute times out after -{\tt statushilites} turns. +\item[{\tt up}{\normalfont, }{\tt down}] set the field attributes +for when the field value changes upwards or downwards. This attribute +times out after {\tt statushilites} turns. %.lp "*" \item[{\tt changed}] sets the field attribute for when the field value changes. This attribute times out after {\tt statushilites} turns. From 54024f2015933cb104e1d925f89d1a2319015918 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 1 Nov 2019 19:04:24 +0200 Subject: [PATCH 101/529] Fix pet polyed to long worm staying leashed Long worms cannot be leashed, but polymorphing a leashed pet into a long worm kept it leashed. --- doc/fixes36.3 | 1 + include/extern.h | 1 + src/apply.c | 2 +- src/mon.c | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index c95a46c4c..4738aa857 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -210,6 +210,7 @@ parsing for the argument to 'scores' option was sloppy; "3a/o" (slash) and wizmakemap could leave genocided monsters on map when entering Astral level, initial rendering of guardian angel didn't show it as tame; noticeable if the level was entered with 'hilite_pet' On +fix a leashed pet polymorphed into a long worm staying leashed Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/include/extern.h b/include/extern.h index 50d25cc1e..b1a28d4b8 100644 --- a/include/extern.h +++ b/include/extern.h @@ -38,6 +38,7 @@ E int NDECL(number_leashed); E void FDECL(o_unleash, (struct obj *)); E void FDECL(m_unleash, (struct monst *, BOOLEAN_P)); E void NDECL(unleash_all); +E boolean FDECL(leashable, (struct monst *)); E boolean NDECL(next_to_u); E struct obj *FDECL(get_mleash, (struct monst *)); E const char *NDECL(beautiful); diff --git a/src/apply.c b/src/apply.c index 63ffe9e6f..96f9469b6 100644 --- a/src/apply.c +++ b/src/apply.c @@ -595,7 +595,7 @@ unleash_all() * This ought to exclude various other things, such as lights and gas * spore, is_whirly() critters, ethereal creatures, possibly others. */ -static boolean +boolean leashable(mtmp) struct monst *mtmp; { diff --git a/src/mon.c b/src/mon.c index 8f9de1f4a..9b734d0db 100644 --- a/src/mon.c +++ b/src/mon.c @@ -3762,6 +3762,9 @@ boolean msg; /* "The oldmon turns into a newmon!" */ /* take on the new form... */ set_mon_data(mtmp, mdat); + if (!leashable(mtmp)) + m_unleash(mtmp, TRUE); + if (emits_light(olddata) != emits_light(mtmp->data)) { /* used to give light, now doesn't, or vice versa, or light's range has changed */ From 4b163e3d55090e5f3f31cb83b1bc6ad9314611e7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 1 Nov 2019 16:33:04 -0400 Subject: [PATCH 102/529] Revert "quiet a mingw warning" This reverts commit e33dfed4561d8184d17f751dde901294387183f7. --- sys/winnt/windmain.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 2cfab8c91..f88fbaa37 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -21,17 +21,15 @@ extern LONG GetCurrentPackageFullName(UINT32 *packageFullNameLength, PWSTR packageFullName); extern HRESULT SHGetKnownFolderPath(REFKNOWNFOLDERID rfid, DWORD dwFlags, HANDLE hToken, PWSTR *ppszPath); -#ifndef DEFINE_KNOWN_FOLDER #ifdef INITGUID #define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID DECLSPEC_SELECTANY name = { l, w1, w2,{ b1, b2, b3, b4, b5, b6, b7, b8 } } #else #define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID name -#endif /* INITGUID */ -#endif /* DEFINE_KNOWN_FOLDER */ +#endif DEFINE_KNOWN_FOLDER (FOLDERID_ProgramData, 0x62ab5d82, 0xfdc1, 0x4dc3, 0xa9, 0xdd, 0x07, 0x0d, 0x1d, 0x49, 0x5d, 0x97); DEFINE_KNOWN_FOLDER (FOLDERID_LocalAppData, 0xf1b32785, 0x6fba, 0x4fcf, 0x9d, 0x55, 0x7b, 0x8e, 0x7f, 0x15, 0x70, 0x91); DEFINE_KNOWN_FOLDER (FOLDERID_Profile, 0x5e6c858f, 0x0e22, 0x4760, 0x9a, 0xfe, 0xea, 0x33, 0x17, 0xb6, 0x71, 0x73); -#endif /* __MINGW32__ */ +#endif #if 0 #include "wintty.h" From 3587d8aee913a9501777305358d59b1806fe4377 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 2 Nov 2019 01:03:02 -0400 Subject: [PATCH 103/529] bump Windows supported version in mingw-w64 sys/winnt/Makefile.gcc mingw-w64 sys/winnt/Makefile.gcc required a Windows version bump from 0x0501 to 0x0601 (XP level to Windows 7 level) during compile in order for the mingw system header files to include some of the needed support for recent Windows port changes. --- sys/winnt/Install.nt | 2 +- sys/winnt/Makefile.gcc | 2 +- sys/winnt/windmain.c | 17 +---------------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/sys/winnt/Install.nt b/sys/winnt/Install.nt index 8842ad861..48c2dddd4 100644 --- a/sys/winnt/Install.nt +++ b/sys/winnt/Install.nt @@ -3,7 +3,7 @@ ============================================================== Instructions for compiling and installing NetHack 3.6 on a Windows system - (Windows 7/8.x/10 or later only. XP may work but is untested) + (Windows 7/8.x/10 or later only) ============================================================== Last revision: $NHDT-Date: 1554784481 2019/04/09 04:34:41 $ diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index e8123334f..0dce1f176 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -188,7 +188,7 @@ RANDOM = $(OBJ)/random.o #RANDOM = BCRYPT=-lbcrypt -WINPFLAG = -DTILES -DMSWIN_GRAPHICS -DWIN32CON -D_WIN32_IE=0x0400 -D_WIN32_WINNT=0x0501 +WINPFLAG = -DTILES -DMSWIN_GRAPHICS -DWIN32CON -D_WIN32_IE=0x0400 -D_WIN32_WINNT=0x0601 -DWINVER=0x0601 ifeq "$(WANT_WIN_QT4)" "Y" WINPFLAG += -DQT_GRAPHICS -DPIXMAPDIR='"."' endif diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index f88fbaa37..44a1902f5 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -11,28 +11,13 @@ #include #include #include -#ifndef __MINGW32__ -#include -#endif #include #ifdef __MINGW32__ extern LONG GetCurrentPackageFullName(UINT32 *packageFullNameLength, PWSTR packageFullName); -extern HRESULT SHGetKnownFolderPath(REFKNOWNFOLDERID rfid, - DWORD dwFlags, HANDLE hToken, PWSTR *ppszPath); -#ifdef INITGUID -#define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID DECLSPEC_SELECTANY name = { l, w1, w2,{ b1, b2, b3, b4, b5, b6, b7, b8 } } #else -#define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID name -#endif -DEFINE_KNOWN_FOLDER (FOLDERID_ProgramData, 0x62ab5d82, 0xfdc1, 0x4dc3, 0xa9, 0xdd, 0x07, 0x0d, 0x1d, 0x49, 0x5d, 0x97); -DEFINE_KNOWN_FOLDER (FOLDERID_LocalAppData, 0xf1b32785, 0x6fba, 0x4fcf, 0x9d, 0x55, 0x7b, 0x8e, 0x7f, 0x15, 0x70, 0x91); -DEFINE_KNOWN_FOLDER (FOLDERID_Profile, 0x5e6c858f, 0x0e22, 0x4760, 0x9a, 0xfe, 0xea, 0x33, 0x17, 0xb6, 0x71, 0x73); -#endif - -#if 0 -#include "wintty.h" +# include #endif #if !defined(SAFEPROCS) From f261b02f5a7c564d951c48b91f36b096284f0800 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 2 Nov 2019 01:40:58 -0400 Subject: [PATCH 104/529] dungeoneers update --- dat/history | 67 ++++++++++++++++++++++---------------------- doc/Guidebook.mn | 69 ++++++++++++++++++++++----------------------- doc/Guidebook.tex | 71 ++++++++++++++++++++++++----------------------- 3 files changed, 105 insertions(+), 102 deletions(-) diff --git a/dat/history b/dat/history index 2922bcd9e..40ff7afc3 100644 --- a/dat/history +++ b/dat/history @@ -237,44 +237,45 @@ particularly intriguing modification to help out with the game. The NetHack Development Team sometimes makes note of the names of the worst of these miscreants in this, the list of Dungeoneers: - Adam Aronow Janet Walz Nathan Eady - Alex Kompel Janne Salmijarvi Norm Meluch - Alex Smith Jean-Christophe Collet Olaf Seibert - Andreas Dorn Jeff Bailey Pasi Kallinen - Andy Church Jochen Erwied Pat Rankin - Andy Swanson John Kallen Patric Mueller + Adam Aronow J. Ali Harlow Mikko Juola + Alex Kompel Janet Walz Nathan Eady + Alex Smith Janne Salmijarvi Norm Meluch + Andreas Dorn Jean-Christophe Collet Olaf Seibert + Andy Church Jeff Bailey Pasi Kallinen + Andy Swanson Jochen Erwied Pat Rankin + Andy Thomson John Kallen Patric Mueller Ari Huttunen John Rupley Paul Winner - Bart House John S. Bien Pierre Martineau + Barton House John S. Bien Pierre Martineau Benson I. Margulies Johnny Lee Ralf Brown Bill Dyer Jon W{tte Ray Chason Boudewijn Waijers Jonathan Handler Richard Addison Bruce Cox Joshua Delahunty Richard Beigel Bruce Holloway Karl Garrison Richard P. Hughey Bruce Mewborne Keizo Yamamoto Rob Menke - Carl Schelin Ken Arnold Robin Bandy - Chris Russo Ken Arromdee Robin Johnson - David Cohrs Ken Lorber Roderick Schertler - David Damerell Ken Washikita Roland McGrath - David Gentzel Kevin Darcy Ron Van Iwaarden - David Hairston Kevin Hugo Ronnen Miller - Dean Luick Kevin Sitze Ross Brown - Del Lamb Kevin Smolkowski Sascha Wostmann - Derek S. Ray Kevin Sweet Scott Bigham - Deron Meranda Lars Huttar Scott R. Turner - Dion Nicolaas Leon Arnott Sean Hunt - Dylan O'Donnell M. Drew Streib Stephen Spackman - Eric Backus Malcolm Ryan Stefan Thielscher - Eric Hendrickson Mark Gooderum Stephen White - Eric R. Smith Mark Modrall Steve Creps - Eric S. Raymond Marvin Bressler Steve Linhart - Erik Andersen Matthew Day Steve VanDevender - Frederick Roeber Merlyn LeRoy Teemu Suikki - Gil Neiger Michael Allison Tim Lennan - Greg Laskin Michael Feir Timo Hakulinen - Greg Olson Michael Hamel Tom Almy - Gregg Wonderly Michael Sokolov Tom West - Hao-yang Wang Mike Engber Warren Cheung - Helge Hafting Mike Gallop Warwick Allison - Irina Rempt-Drijfhout Mike Passaretti Yitzhak Sapir + Carl Schelin Keith Simpson Robin Bandy + Chris Russo Ken Arnold Robin Johnson + David Cohrs Ken Arromdee Roderick Schertler + David Damerell Ken Lorber Roland McGrath + David Gentzel Ken Washikita Ron Van Iwaarden + David Hairston Kevin Darcy Ronnen Miller + Dean Luick Kevin Hugo Ross Brown + Del Lamb Kevin Sitze Sascha Wostmann + Derek S. Ray Kevin Smolkowski Scott Bigham + Deron Meranda Kevin Sweet Scott R. Turner + Dion Nicolaas Lars Huttar Sean Hunt + Dylan O'Donnell Leon Arnott Stephen Spackman + Eric Backus M. Drew Streib Stefan Thielscher + Eric Hendrickson Malcolm Ryan Stephen White + Eric R. Smith Mark Gooderum Steve Creps + Eric S. Raymond Mark Modrall Steve Linhart + Erik Andersen Marvin Bressler Steve VanDevender + Fredrik Ljungdahl Matthew Day Teemu Suikki + Frederick Roeber Merlyn LeRoy Tim Lennan + Gil Neiger Michael Allison Timo Hakulinen + Greg Laskin Michael Feir Tom Almy + Greg Olson Michael Hamel Tom West + Gregg Wonderly Michael Sokolov Warren Cheung + Hao-yang Wang Mike Engber Warwick Allison + Helge Hafting Mike Gallop Yitzhak Sapir + Irina Rempt-Drijfhout Mike Passaretti Izchak Miller Mike Stephenson - J. Ali Harlow Mikko Juola diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 0f9068ede..d9a201caa 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "November 1, 2019 +.ds f2 "November 2, 2019 . .\" A note on some special characters: .\" \(lq = left double quote @@ -5127,47 +5127,48 @@ miscreants in this, the list of Dungeoneers: center; c c c. .\"TABLE_START -Adam Aronow Janet Walz Nathan Eady -Alex Kompel Janne Salmijarvi Norm Meluch -Alex Smith Jean-Christophe Collet Olaf Seibert -Andreas Dorn Jeff Bailey Pasi Kallinen -Andy Church Jochen Erwied Pat Rankin -Andy Swanson John Kallen Patric Mueller +Adam Aronow J. Ali Harlow Mikko Juola +Alex Kompel Janet Walz Nathan Eady +Alex Smith Janne Salmijarvi Norm Meluch +Andreas Dorn Jean-Christophe Collet Olaf Seibert +Andy Church Jeff Bailey Pasi Kallinen +Andy Swanson Jochen Erwied Pat Rankin +Andy Thomson John Kallen Patric Mueller Ari Huttunen John Rupley Paul Winner -Bart House John S. Bien Pierre Martineau +Barton House John S. Bien Pierre Martineau Benson I. Margulies Johnny Lee Ralf Brown Bill Dyer Jon W{tte Ray Chason Boudewijn Waijers Jonathan Handler Richard Addison Bruce Cox Joshua Delahunty Richard Beigel Bruce Holloway Karl Garrison Richard P. Hughey Bruce Mewborne Keizo Yamamoto Rob Menke -Carl Schelin Ken Arnold Robin Bandy -Chris Russo Ken Arromdee Robin Johnson -David Cohrs Ken Lorber Roderick Schertler -David Damerell Ken Washikita Roland McGrath -David Gentzel Kevin Darcy Ron Van Iwaarden -David Hairston Kevin Hugo Ronnen Miller -Dean Luick Kevin Sitze Ross Brown -Del Lamb Kevin Smolkowski Sascha Wostmann -Derek S. Ray Kevin Sweet Scott Bigham -Deron Meranda Lars Huttar Scott R. Turner -Dion Nicolaas Leon Arnott Sean Hunt -Dylan O'Donnell M. Drew Streib Stephen Spackman -Eric Backus Malcolm Ryan Stefan Thielscher -Eric Hendrickson Mark Gooderum Stephen White -Eric R. Smith Mark Modrall Steve Creps -Eric S. Raymond Marvin Bressler Steve Linhart -Erik Andersen Matthew Day Steve VanDevender -Frederick Roeber Merlyn LeRoy Teemu Suikki -Gil Neiger Michael Allison Tim Lennan -Greg Laskin Michael Feir Timo Hakulinen -Greg Olson Michael Hamel Tom Almy -Gregg Wonderly Michael Sokolov Tom West -Hao-yang Wang Mike Engber Warren Cheung -Helge Hafting Mike Gallop Warwick Allison -Irina Rempt-Drijfhout Mike Passaretti Yitzhak Sapir +Carl Schelin Keith Simpson Robin Bandy +Chris Russo Ken Arnold Robin Johnson +David Cohrs Ken Arromdee Roderick Schertler +David Damerell Ken Lorber Roland McGrath +David Gentzel Ken Washikita Ron Van Iwaarden +David Hairston Kevin Darcy Ronnen Miller +Dean Luick Kevin Hugo Ross Brown +Del Lamb Kevin Sitze Sascha Wostmann +Derek S. Ray Kevin Smolkowski Scott Bigham +Deron Meranda Kevin Sweet Scott R. Turner +Dion Nicolaas Lars Huttar Sean Hunt +Dylan O'Donnell Leon Arnott Stephen Spackman +Eric Backus M. Drew Streib Stefan Thielscher +Eric Hendrickson Malcolm Ryan Stephen White +Eric R. Smith Mark Gooderum Steve Creps +Eric S. Raymond Mark Modrall Steve Linhart +Erik Andersen Marvin Bressler Steve VanDevender +Fredrik Ljungdahl Matthew Day Teemu Suikki +Frederick Roeber Merlyn LeRoy Tim Lennan +Gil Neiger Michael Allison Timo Hakulinen +Greg Laskin Michael Feir Tom Almy +Greg Olson Michael Hamel Tom West +Gregg Wonderly Michael Sokolov Warren Cheung +Hao-yang Wang Mike Engber Warwick Allison +Helge Hafting Mike Gallop Yitzhak Sapir +Irina Rempt-Drijfhout Mike Passaretti Izchak Miller Mike Stephenson -J. Ali Harlow Mikko Juola .\"TABLE_END Do not delete this line. .TE .pg diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 77ce5e2e6..625d219dc 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{November 1, 2019} +\date{November 2, 2019} \maketitle @@ -5746,47 +5746,48 @@ of these miscreants in this, the list of Dungeoneers: \begin{center} \begin{tabular}{llll} %TABLE_START -Adam Aronow & Janet Walz & Nathan Eady\\ -Alex Kompel & Janne Salmij\"{a}rvi & Norm Meluch\\ -Alex Smith & Jean-Christophe Collet & Olaf Seibert\\ -Andreas Dorn & Jeff Bailey & Pasi Kallinen\\ -Andy Church & Jochen Erwied & Pat Rankin\\ -Andy Swanson & John Kallen & Patric Mueller\\ +Adam Aronow & J. Ali Harlow & Mikko Juola\\ +Alex Kompel & Janet Walz & Nathan Eady\\ +Alex Smith & Janne Salmij\"{a}rvi & Norm Meluch\\ +Andreas Dorn & Jean-Christophe Collet & Olaf Seibert\\ +Andy Church & Jeff Bailey & Pasi Kallinen\\ +Andy Swanson & Jochen Erwied & Pat Rankin\\ +Andy Thomson & John Kallen & Patric Mueller\\ Ari Huttunen & John Rupley & Paul Winner\\ -Bart House & John S. Bien & Pierre Martineau\\ +Barton House & John S. Bien & Pierre Martineau\\ Benson I. Margulies & Johnny Lee & Ralf Brown\\ Bill Dyer & Jon W\{tte & Ray Chason\\ Boudewijn Waijers & Jonathan Handler & Richard Addison\\ Bruce Cox & Joshua Delahunty & Richard Beigel\\ Bruce Holloway & Karl Garrison & Richard P. Hughey\\ Bruce Mewborne & Keizo Yamamoto & Rob Menke\\ -Carl Schelin & Ken Arnold & Robin Bandy\\ -Chris Russo & Ken Arromdee & Robin Johnson\\ -David Cohrs & Ken Lorber & Roderick Schertler\\ -David Damerell & Ken Washikita & Roland McGrath\\ -David Gentzel & Kevin Darcy & Ron Van Iwaarden\\ -David Hairston & Kevin Hugo & Ronnen Miller\\ -Dean Luick & Kevin Sitze & Ross Brown\\ -Del Lamb & Kevin Smolkowski & Sascha Wostmann\\ -Derek S. Ray & Kevin Sweet & Scott Bigham\\ -Deron Meranda & Lars Huttar & Scott R. Turner\\ -Dion Nicolaas & Leon Arnott & Sean Hunt\\ -Dylan O'Donnell & M. Drew Streib & Stephen Spackman\\ -Eric Backus & Malcolm Ryan & Stefan Thielscher\\ -Eric Hendrickson & Mark Gooderum & Stephen White\\ -Eric R. Smith & Mark Modrall & Steve Creps\\ -Eric S. Raymond & Marvin Bressler & Steve Linhart\\ -Erik Andersen & Matthew Day & Steve VanDevender\\ -Frederick Roeber & Merlyn LeRoy & Teemu Suikki\\ -Gil Neiger & Michael Allison & Tim Lennan\\ -Greg Laskin & Michael Feir & Timo Hakulinen\\ -Greg Olson & Michael Hamel & Tom Almy\\ -Gregg Wonderly & Michael Sokolov & Tom West\\ -Hao-yang Wang & Mike Engber & Warren Cheung\\ -Helge Hafting & Mike Gallop & Warwick Allison\\ -Irina Rempt-Drijfhout & Mike Passaretti & Yitzhak Sapir\\ -Izchak Miller & Mike Stephenson\\ -J. Ali Harlow & Mikko Juola +Carl Schelin & Keith Simpson & Robin Bandy\\ +Chris Russo & Ken Arnold & Robin Johnson\\ +David Cohrs & Ken Arromdee & Roderick Schertler\\ +David Damerell & Ken Lorber & Roland McGrath\\ +David Gentzel & Ken Washikita & Ron Van Iwaarden\\ +David Hairston & Kevin Darcy & Ronnen Miller\\ +Dean Luick & Kevin Hugo & Ross Brown\\ +Del Lamb & Kevin Sitze & Sascha Wostmann\\ +Derek S. Ray & Kevin Smolkowski & Scott Bigham\\ +Deron Meranda & Kevin Sweet & Scott R. Turner\\ +Dion Nicolaas & Lars Huttar & Sean Hunt\\ +Dylan O'Donnell & Leon Arnott & Stephen Spackman\\ +Eric Backus & M. Drew Streib & Stefan Thielscher\\ +Eric Hendrickson & Malcolm Ryan & Stephen White\\ +Eric R. Smith & Mark Gooderum & Steve Creps\\ +Eric S. Raymond & Mark Modrall & Steve Linhart\\ +Erik Andersen & Marvin Bressler & Steve VanDevender\\ +Fredrik Ljungdahl & Matthew Day & Teemu Suikki\\ +Frederick Roeber & Merlyn LeRoy & Tim Lennan\\ +Gil Neiger & Michael Allison & Timo Hakulinen\\ +Greg Laskin & Michael Feir & Tom Almy\\ +Greg Olson & Michael Hamel & Tom West\\ +Gregg Wonderly & Michael Sokolov & Warren Cheung\\ +Hao-yang Wang & Mike Engber & Warwick Allison\\ +Helge Hafting & Mike Gallop & Yitzhak Sapir\\ +Irina Rempt-Drijfhout & Mike Passaretti\\ +Izchak Miller & Mike Stephenson %TABLE_END Do not delete this line. \end{tabular} \end{center} From 13f4a466d977a35bc52e312df8bf0c9a0118456e Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 2 Nov 2019 01:44:00 -0400 Subject: [PATCH 105/529] name correction --- dat/history | 2 +- doc/Guidebook.mn | 2 +- doc/Guidebook.tex | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dat/history b/dat/history index 40ff7afc3..23dba2d4c 100644 --- a/dat/history +++ b/dat/history @@ -245,7 +245,7 @@ of these miscreants in this, the list of Dungeoneers: Andy Swanson Jochen Erwied Pat Rankin Andy Thomson John Kallen Patric Mueller Ari Huttunen John Rupley Paul Winner - Barton House John S. Bien Pierre Martineau + Bart House John S. Bien Pierre Martineau Benson I. Margulies Johnny Lee Ralf Brown Bill Dyer Jon W{tte Ray Chason Boudewijn Waijers Jonathan Handler Richard Addison diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index d9a201caa..aec017528 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -5135,7 +5135,7 @@ Andy Church Jeff Bailey Pasi Kallinen Andy Swanson Jochen Erwied Pat Rankin Andy Thomson John Kallen Patric Mueller Ari Huttunen John Rupley Paul Winner -Barton House John S. Bien Pierre Martineau +Bart House John S. Bien Pierre Martineau Benson I. Margulies Johnny Lee Ralf Brown Bill Dyer Jon W{tte Ray Chason Boudewijn Waijers Jonathan Handler Richard Addison diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 625d219dc..9e60138d9 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -5754,7 +5754,7 @@ Andy Church & Jeff Bailey & Pasi Kallinen\\ Andy Swanson & Jochen Erwied & Pat Rankin\\ Andy Thomson & John Kallen & Patric Mueller\\ Ari Huttunen & John Rupley & Paul Winner\\ -Barton House & John S. Bien & Pierre Martineau\\ +Bart House & John S. Bien & Pierre Martineau\\ Benson I. Margulies & Johnny Lee & Ralf Brown\\ Bill Dyer & Jon W\{tte & Ray Chason\\ Boudewijn Waijers & Jonathan Handler & Richard Addison\\ From 4c9f4dbbd937bea1bccfa692bebdfcd873b9c4dc Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 2 Nov 2019 11:40:12 +0200 Subject: [PATCH 106/529] Prevent leashing monsters with no extremities ... and also unsolid monsters. --- doc/fixes36.3 | 1 + src/apply.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 4738aa857..df3a55a30 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -211,6 +211,7 @@ wizmakemap could leave genocided monsters on map when entering Astral level, initial rendering of guardian angel didn't show it as tame; noticeable if the level was entered with 'hilite_pet' On fix a leashed pet polymorphed into a long worm staying leashed +prevent leashing unsolid monsters and monsters with no extremities Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/apply.c b/src/apply.c index 96f9469b6..6c135f110 100644 --- a/src/apply.c +++ b/src/apply.c @@ -591,15 +591,13 @@ unleash_all() #define MAXLEASHED 2 -/* TODO: - * This ought to exclude various other things, such as lights and gas - * spore, is_whirly() critters, ethereal creatures, possibly others. - */ boolean leashable(mtmp) struct monst *mtmp; { - return (boolean) (mtmp->mnum != PM_LONG_WORM); + return (boolean) (mtmp->mnum != PM_LONG_WORM + && !unsolid(mtmp->data) + && (!nolimbs(mtmp->data) || has_head(mtmp->data))); } /* ARGSUSED */ @@ -671,6 +669,11 @@ struct obj *obj; if (mtmp->mleashed) { pline("This %s is already leashed.", spotmon ? l_monnam(mtmp) : "creature"); + } else if (unsolid(mtmp->data)) { + pline("The leash would just fall off."); + } else if (nolimbs(mtmp->data) && !has_head(mtmp->data)) { + pline("%s has no extremities the leash would fit.", + Monnam(mtmp)); } else if (!leashable(mtmp)) { pline("The leash won't fit onto %s%s.", spotmon ? "your " : "", l_monnam(mtmp)); From c66eb915d29ec303c558de9054e26db36a73cbf5 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 2 Nov 2019 03:32:35 -0700 Subject: [PATCH 107/529] Guidebook.mn Symbols section The table listing symset entries was ok for ps/pdf output but for plain text output it was wrapping to a second line for S_xan, S_pet_override, and S_player_override and also going past the right margin for some others. I've shortened the text for those three and narrowed the first column to give more room for the third column, bringing all the lines within their margin. The entry for S_stone was rather surprising: "dark part of a room". It now says "solid rock or unexplored terrain or dark part of a room" and needed to span two lines. The first column has been labeled "Default" but that was why that column was wider than necessary. It now has a label of two spaces and is left justified instead of being centered. It is also now forcing constant-width Roman as the font and every character in that column should be the same size so one reason for centering is removed. The title used to be centered but always looked a bit off due to the fact that the three columns have differing widths and/or because of the over-wide lines changing the location of "center". It is now left justified and looks a little bit like it's labeling the first column. Perhaps it needs a blank line separating it from the rest. Guidebook.tex is lagging again. --- doc/Guidebook.mn | 48 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index aec017528..b4c37dc6f 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.319 $ $NHDT-Date: 1572525093 2019/10/31 12:31:33 $ +.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.324 $ $NHDT-Date: 1572690738 2019/11/02 10:32:18 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -4408,16 +4408,23 @@ The special prefix form \\m switches on the meta bit in the symbol value, and the \(ha prefix causes the following character to be treated as a control character. .pg +.\" Table is centered. +.\" First line (title) is left justified and spans second and third columns; +.\" it used to be centered but tended to look as if too far to the right. +.\" Remaining lines are left justified in each of three columns. First +.\" line (second overall) contains column labels; the first column has a +.\" dummy label of two spaces. (That used to be "Default" but it made all +.\" the lines wider because of the label's width and caused several lines +.\" to be too wide when generating plain text output. Two spaces leaves +.\" some room between the symbol character and name.) Entries in first +.\" column now use constant-width Roman font to approximate TeX tt font. .TS S center; -c s s -c1 l1 l. +l s s +l1fCR l1 l. .\"TABLE_START -.\" because description is wide, centered title seems off, so pad it a bit -.\" note that each backslash precedes one space of padding (including the -.\" last one; in other words, there's a trailing space here) -NetHack Symbols\ \ \ \ \ \ \ -Default Symbol Name Description +NetHack Symbols +\ \ Symbol Name Description \_ \_ \_ \ S_air (air) \&_ S_altar (altar) @@ -4544,7 +4551,8 @@ s S_spider (arachnid or centipede) @ S_ss3 (magic shield 3 of 4) * S_ss4 (magic shield 4 of 4) \(ha S_statue_trap (statue trap) -\ S_stone (dark part of a room) +\ S_stone (solid rock or unexplored terrain +\ \ \ or dark part of a room) ] S_strange_obj (strange object) \- S_sw_bc (swallow bottom center) \\ S_sw_bl (swallow bottom left) @@ -4588,15 +4596,28 @@ v S_vortex (vortex) w S_worm (worm) \(ti S_worm_tail (long worm tail) W S_wraith (wraith) -x S_xan (xan or other mythical/fantastic insect) +x S_xan (xan or other extraordinary insect) X S_xorn (xorn) Y S_yeti (apelike creature) Z S_zombie (zombie) z S_zruty (zruty) -\ S_pet_override (any pet if sysconf accessibility is set) -\ S_player_override (hero if sysconf accessibility is set) +\ S_pet_override (any pet if ACCESSIBILITY=1 is set) +\ S_player_override (hero if ACCESSIBILITY=1 is set) .\"TABLE_END Do not delete this line. .TE +.\" don't hyphenate file name across lines +.hw sysconf +.pg +Notes: several symbols in this table appear to be blank. They are the +space character, except for S_pet_override and S_player_override which +don't have any default value and can only be used if enabled in the +\(lqsysconf\(rq file. +.pg +S_rock is misleadingly named; rocks and stones use S_gem. +Statues and boulders are the rock being referred to, but since +version 3.6.0, statues are displayed as the monster they depict. +So S_rock is only used for boulders and not used at all if +overridden by the more specific S_boulder. .pg .hn 2 Configuring NetHack for Play by the Blind @@ -4643,7 +4664,8 @@ See the previous section for the special symbols S_pet_override to force a consistent symbol for all pets and S_player_override to force a unique symbol for the player character if \fBaccessibility\fP is enabled in the sysconf file. -The most crucial settings to make the game accessible are: +.pg +The most crucial settings to make the game more accessible are: .pg .lp symset:NHAccess Load a symbol set appropriate for use by blind players. From 35fc46e3ebfbe87eff7112e9ed48d8f60d6c4f55 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 2 Nov 2019 09:23:34 -0400 Subject: [PATCH 108/529] missing constants on mingw build fix Errors seen during build: o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_ProgramData[.refptr.FOLDERID_ProgramData]+0x0): undefined reference to `FOLDERID_ProgramData' o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_LocalAppData[.refptr.FOLDERID_LocalAppData]+0x0): undefined reference to `FOLDERID_LocalAppData' o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_Profile[.refptr.FOLDERID_Profile]+0x0): undefined reference to `FOLDERID_Profile' collect2.exe: error: ld returned 1 exit status mingw32-make: *** [Makefile:849: ../binary/NetHack.exe] Error 1 DEFINE_KNOWN_FOLDER is using this particular definition in the mingw header files: rather than this one: So, the known folder values that recent code is using such as FOLDERID_ProgramData, FOLDERID_LocalAppData, and FOLDERID_Profile are being declared as external constants. That is why the error is a link error. We need to include -luuid on the link command line because those external constants are defined in uuid.lib. --- sys/winnt/Makefile.gcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 0dce1f176..54a14572e 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -510,7 +510,7 @@ endif CFLAGSBASE = -c $(cflags) $(WINPINC) $(cdebug) $(CURSESDEF) #LFLAGSBASEC = $(linkdebug) #LFLAGSBASEG = $(linkdebug) -mwindows -baselibs = -lwinmm -lshell32 -lole32 +baselibs = -lwinmm -lshell32 -lole32 -luuid conlibs = -lgdi32 $(baselibs) $(BCRYPT) guilibs = -lcomctl32 $(baselibs) ifeq "$(WANT_WIN_QT4)" "Y" From 33149eed0e8c78630dbce2b01557c1db61028ccb Mon Sep 17 00:00:00 2001 From: Bart House Date: Sat, 2 Nov 2019 11:39:11 -0700 Subject: [PATCH 109/529] Move is_desktop_bridge() api to win10 wrapper. --- include/extern.h | 1 - sys/winnt/win10.c | 26 ++++++++++++++++++++++++++ sys/winnt/win10.h | 5 ++++- sys/winnt/windmain.c | 16 ---------------- sys/winnt/winnt.c | 8 +++++++- win/win32/vs2017/common.props | 2 +- 6 files changed, 38 insertions(+), 20 deletions(-) diff --git a/include/extern.h b/include/extern.h index b1a28d4b8..989f07f50 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1826,7 +1826,6 @@ E int NDECL(dohistory); E void FDECL(chdirx, (char *, BOOLEAN_P)); #endif /* CHDIR */ E boolean NDECL(authorize_wizard_mode); -E boolean NDECL(is_desktop_bridge_application); #endif /* MICRO || WIN32 */ diff --git a/sys/winnt/win10.c b/sys/winnt/win10.c index c6d667080..07b898107 100644 --- a/sys/winnt/win10.c +++ b/sys/winnt/win10.c @@ -34,6 +34,17 @@ void win10_init() FreeLibrary(hUser32); + HINSTANCE hKernel32 = LoadLibraryA("kernel32.dll"); + + if (hKernel32 == NULL) + panic("Unable to load user32.dll"); + + gWin10.GetCurrentPackageFullName = (GetCurrentPackageFullNameProc) GetProcAddress(hKernel32, "GetCurrentPackageFullName"); + if (gWin10.GetCurrentPackageFullName == NULL) + panic("Unable to get address of GetCurrentPackageFullName"); + + FreeLibrary(hKernel32); + gWin10.Valid = TRUE; } @@ -80,4 +91,19 @@ void win10_monitor_info(HWND hWnd, MonitorInfo * monitorInfo) monitorInfo->left = info.rcMonitor.left; monitorInfo->top = info.rcMonitor.top; } + +BOOL +win10_is_desktop_bridge_application() +{ + if (gWin10.Valid) { + UINT32 length = 0; + LONG rc = gWin10.GetCurrentPackageFullName(&length, NULL); + + return (rc == ERROR_INSUFFICIENT_BUFFER); + } + + return FALSE; +} + + #endif /* _MSC_VER */ diff --git a/sys/winnt/win10.h b/sys/winnt/win10.h index 458e6991d..4ba834995 100644 --- a/sys/winnt/win10.h +++ b/sys/winnt/win10.h @@ -11,12 +11,15 @@ typedef DPI_AWARENESS_CONTEXT(WINAPI *GetThreadDpiAwarenessContextProc)(VOID); typedef BOOL(WINAPI *AreDpiAwarenessContextsEqualProc)( DPI_AWARENESS_CONTEXT dpiContextA, DPI_AWARENESS_CONTEXT dpiContextB); typedef UINT(WINAPI *GetDpiForWindowProc)(HWND hwnd); +typedef LONG (WINAPI *GetCurrentPackageFullNameProc)(UINT32 *packageFullNameLength, + PWSTR packageFullName); typedef struct { BOOL Valid; GetThreadDpiAwarenessContextProc GetThreadDpiAwarenessContext; AreDpiAwarenessContextsEqualProc AreDpiAwarenessContextsEqual; GetDpiForWindowProc GetDpiForWindow; + GetCurrentPackageFullNameProc GetCurrentPackageFullName; } Win10; typedef struct { @@ -34,6 +37,6 @@ int win10_monitor_dpi(HWND hWnd); double win10_monitor_scale(HWND hWnd); void win10_monitor_size(HWND hWnd, int * width, int * height); void win10_monitor_info(HWND hWnd, MonitorInfo * monitorInfo); - +BOOL win10_is_desktop_bridge_application(void); #endif // WIN10_H diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 44a1902f5..df2eaff4e 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -13,13 +13,6 @@ #include #include -#ifdef __MINGW32__ -extern LONG GetCurrentPackageFullName(UINT32 *packageFullNameLength, - PWSTR packageFullName); -#else -# include -#endif - #if !defined(SAFEPROCS) #error You must #define SAFEPROCS to build windmain.c #endif @@ -71,15 +64,6 @@ static struct stat hbuf; extern char orgdir[]; -boolean -is_desktop_bridge_application() -{ - UINT32 length = 0; - LONG rc = GetCurrentPackageFullName(&length, NULL); - - return (rc == ERROR_INSUFFICIENT_BUFFER); -} - void get_known_folder_path( const KNOWNFOLDERID * folder_id, diff --git a/sys/winnt/winnt.c b/sys/winnt/winnt.c index 37edbbcbf..967fa6e4e 100644 --- a/sys/winnt/winnt.c +++ b/sys/winnt/winnt.c @@ -11,6 +11,7 @@ * */ +#include "win10.h" #include "winos.h" #define NEED_VARARGS @@ -189,15 +190,20 @@ int *lan_username_size; { static TCHAR username_buffer[BUFSZ]; DWORD i = BUFSZ - 1; + BOOL allowUserName = TRUE; Strcpy(username_buffer, "NetHack"); +#ifndef WIN32CON /* Our privacy policy for the windows store version of nethack makes * a promise about not collecting any personally identifiable information. * Do not allow getting user name if we being run from windows store * version of nethack. In 3.7, we should remove use of username. */ - if (!is_desktop_bridge_application()) { + allowUserName = !win10_is_desktop_bridge_application(); +#endif + + if (allowUserName) { /* i gets updated with actual size */ if (GetUserName(username_buffer, &i)) username_buffer[i] = '\0'; diff --git a/win/win32/vs2017/common.props b/win/win32/vs2017/common.props index 8f5d2a450..ee802873c 100644 --- a/win/win32/vs2017/common.props +++ b/win/win32/vs2017/common.props @@ -9,7 +9,7 @@ Level3 - WIN32;CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;WINVER=0x0601;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) Console From 0bbedb2933e2f110565c7e7574891428136efb2e Mon Sep 17 00:00:00 2001 From: Bart House Date: Sat, 2 Nov 2019 11:51:20 -0700 Subject: [PATCH 110/529] Fix cut and paste error in output string. --- sys/winnt/win10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/winnt/win10.c b/sys/winnt/win10.c index 07b898107..d1332260c 100644 --- a/sys/winnt/win10.c +++ b/sys/winnt/win10.c @@ -37,7 +37,7 @@ void win10_init() HINSTANCE hKernel32 = LoadLibraryA("kernel32.dll"); if (hKernel32 == NULL) - panic("Unable to load user32.dll"); + panic("Unable to load kernel32.dll"); gWin10.GetCurrentPackageFullName = (GetCurrentPackageFullNameProc) GetProcAddress(hKernel32, "GetCurrentPackageFullName"); if (gWin10.GetCurrentPackageFullName == NULL) From 3a315a7c765cbf5bbf28b87e99b03829e8ff5d10 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sat, 2 Nov 2019 12:10:13 -0700 Subject: [PATCH 111/529] Make type Win10 and gWin10 local to win10.c module. --- sys/winnt/win10.c | 15 +++++++++++++++ sys/winnt/win10.h | 18 ------------------ 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/sys/winnt/win10.c b/sys/winnt/win10.c index d1332260c..abf76d9eb 100644 --- a/sys/winnt/win10.c +++ b/sys/winnt/win10.c @@ -9,6 +9,21 @@ #include "hack.h" +typedef DPI_AWARENESS_CONTEXT(WINAPI *GetThreadDpiAwarenessContextProc)(VOID); +typedef BOOL(WINAPI *AreDpiAwarenessContextsEqualProc)( + DPI_AWARENESS_CONTEXT dpiContextA, DPI_AWARENESS_CONTEXT dpiContextB); +typedef UINT(WINAPI *GetDpiForWindowProc)(HWND hwnd); +typedef LONG (WINAPI *GetCurrentPackageFullNameProc)(UINT32 *packageFullNameLength, + PWSTR packageFullName); + +typedef struct { + BOOL Valid; + GetThreadDpiAwarenessContextProc GetThreadDpiAwarenessContext; + AreDpiAwarenessContextsEqualProc AreDpiAwarenessContextsEqual; + GetDpiForWindowProc GetDpiForWindow; + GetCurrentPackageFullNameProc GetCurrentPackageFullName; +} Win10; + Win10 gWin10 = { 0 }; void win10_init() diff --git a/sys/winnt/win10.h b/sys/winnt/win10.h index 4ba834995..bbb0ca9a3 100644 --- a/sys/winnt/win10.h +++ b/sys/winnt/win10.h @@ -7,21 +7,6 @@ #include "win32api.h" -typedef DPI_AWARENESS_CONTEXT(WINAPI *GetThreadDpiAwarenessContextProc)(VOID); -typedef BOOL(WINAPI *AreDpiAwarenessContextsEqualProc)( - DPI_AWARENESS_CONTEXT dpiContextA, DPI_AWARENESS_CONTEXT dpiContextB); -typedef UINT(WINAPI *GetDpiForWindowProc)(HWND hwnd); -typedef LONG (WINAPI *GetCurrentPackageFullNameProc)(UINT32 *packageFullNameLength, - PWSTR packageFullName); - -typedef struct { - BOOL Valid; - GetThreadDpiAwarenessContextProc GetThreadDpiAwarenessContext; - AreDpiAwarenessContextsEqualProc AreDpiAwarenessContextsEqual; - GetDpiForWindowProc GetDpiForWindow; - GetCurrentPackageFullNameProc GetCurrentPackageFullName; -} Win10; - typedef struct { double scale; // dpi of monitor / 96 int width; // in pixels @@ -30,12 +15,9 @@ typedef struct { int left; // in desktop coordinate pixel space } MonitorInfo; -extern Win10 gWin10; - void win10_init(); int win10_monitor_dpi(HWND hWnd); double win10_monitor_scale(HWND hWnd); -void win10_monitor_size(HWND hWnd, int * width, int * height); void win10_monitor_info(HWND hWnd, MonitorInfo * monitorInfo); BOOL win10_is_desktop_bridge_application(void); From d7354fe78ca16ec0152a81fc627f583f189418d0 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 2 Nov 2019 16:05:39 -0700 Subject: [PATCH 112/529] Guidebook.tex catch up, Guideboon.mn bits Guidebook.tex not tested. The \, in the continuation of S_stone is a narrow space in LaTeX. It should be \hspace{ width of '(' } but I don't remember how to measure something in LaTeX or TeX. Guidebook.mn is getting two small changes: I forgot about the guideline that each sentence be on its own line. Also, this adds the fix for wide lines in the dungeoneers list although the reordering accompanying a recent change might have made that moot (unless some future reordering puts wide names on the same line again, assuming that was the issue). --- doc/Guidebook.mn | 12 ++++++------ doc/Guidebook.tex | 27 ++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index b4c37dc6f..698e5743d 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.324 $ $NHDT-Date: 1572690738 2019/11/02 10:32:18 $ +.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.325 $ $NHDT-Date: 1572735924 2019/11/02 23:05:24 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -4608,10 +4608,10 @@ z S_zruty (zruty) .\" don't hyphenate file name across lines .hw sysconf .pg -Notes: several symbols in this table appear to be blank. They are the -space character, except for S_pet_override and S_player_override which -don't have any default value and can only be used if enabled in the -\(lqsysconf\(rq file. +Notes: several symbols in this table appear to be blank. +They are the space character, except for S_pet_override +and S_player_override which don't have any default value +and can only be used if enabled in the \(lqsysconf\(rq file. .pg S_rock is misleadingly named; rocks and stones use S_gem. Statues and boulders are the rock being referred to, but since @@ -5147,7 +5147,7 @@ miscreants in this, the list of Dungeoneers: . .TS S center; -c c c. +c2 c2 c. .\"TABLE_START Adam Aronow J. Ali Harlow Mikko Juola Alex Kompel Janet Walz Nathan Eady diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 9e60138d9..ea677433c 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -5043,7 +5043,8 @@ Default & Symbol Name & Description\\ \verb+@+ & S\verb+_+ss3 & (magic shield 3 of 4)\\ \verb@*@ & S\verb+_+ss4 & (magic shield 4 of 4)\\ \verb@^@ & S\verb+_+statue\verb+_+trap & (statue trap)\\ -\verb@ @ & S\verb+_+stone & (dark part of a room)\\ +\verb@ @ & S\verb+_+stone & (solid rock or unexplored terrain\\ + & & \,dark part of a room)\\ \verb@]@ & S\verb+_+strange\verb+_+obj & (strange object)\\ \verb@-@ & S\verb+_+sw\verb+_+bc & (swallow bottom center)\\ \verb@\@ & S\verb+_+sw\verb+_+bl & (swallow bottom left)\\ @@ -5087,16 +5088,30 @@ Default & Symbol Name & Description\\ \verb@w@ & S\verb+_+worm & (worm)\\ \verb@~@ & S\verb+_+worm\verb+_+tail & (long worm tail)\\ \verb@W@ & S\verb+_+wraith & (wraith)\\ -\verb@x@ & S\verb+_+xan & (xan or other mythical/fantastic insect)\\ +\verb@x@ & S\verb+_+xan & (xan or other extraordinary insect)\\ \verb@X@ & S\verb+_+xorn & (xorn)\\ \verb@Y@ & S\verb+_+yeti & (apelike creature)\\ \verb@Z@ & S\verb+_+zombie & (zombie)\\ \verb@z@ & S\verb+_+zruty & (zruty)\\ -\verb@ @ & S\verb+_+pet\verb+_+override & (any pet if sysconf accessibility is set)\\ -\verb@ @ & S\verb+_+player\verb+_+override & (hero if sysconf accessibility is set) +\verb@ @ & S\verb+_+pet\verb+_+override & (any pet if ACCESSIBILITY=1 is set)\\ +\verb@ @ & S\verb+_+player\verb+_+override & (hero if ACCESSIBILITY=1 is set) \end{longtable}% } +\hyphenation{sysconf} %no syllable breaks => don't hyphenate file name +%.pg +Notes: several symbols in this table appear to be blank. +They are the space character, except for S\verb+_+pet\verb+_+override +and S\verb+_+player\verb+_+override which don't have any default value +and can only be used if enabled in the ``sysconf'' file. + +%.pg +S\verb+_+rock is misleadingly named; rocks and stones use S\verb+_+gem. +Statues and boulders are the rock being referred to, but since +version 3.6.0, statues are displayed as the monster they depict. +So S\verb+_+rock is only used for boulders and not used at all if +overridden by the more specific S\verb+_+boulder. + %.pg %.hn 2 \subsection*{Configuring {\it NetHack\/} for Play by the Blind} @@ -5144,7 +5159,9 @@ See the previous section for the special symbols S\verb+_+pet\verb+_+override to force a consistent symbol for all pets and S\verb+_+player\verb+_+override to force a unique symbol for the player character if {\it accessibility\/} is enabled in the {\it sysconf\/} file. -The most crucial settings to make the game accessible are: + +%.pg +The most crucial settings to make the game more accessible are: %.pg \blist{} %.lp From ee1817f4ec6a4a96654f2f14687565c553542701 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sat, 2 Nov 2019 16:57:43 -0700 Subject: [PATCH 113/529] Updates to fixes36.3 for recent work. --- doc/fixes36.3 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index df3a55a30..04a1e0685 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -350,6 +350,9 @@ unix: sysconf CHECK_PLNAME=1 wouldn't work if attempt to obtain unix username unix+curses: startup error only reset terminal for tty; one noticeable example was answering 'n' to "Destroy old game?" Windows: some startup error messages were not being delivered successfully +WindowsGUI: player selection dialog box layout was not being adjusted for DPI +Windows: signifiant changes to default directory choices. see documentation + for details. General New Features From 2c1edc860cff954220047c81e08b5c9c3567d1fa Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 2 Nov 2019 17:15:54 -0700 Subject: [PATCH 114/529] couple of Guidebook.tex bits More symbols: I left out a word on the continutation line for S_stone and S_tool has been forcing narrow space where ordinary was intended. --- doc/Guidebook.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index ea677433c..d58a737a3 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -5044,7 +5044,7 @@ Default & Symbol Name & Description\\ \verb@*@ & S\verb+_+ss4 & (magic shield 4 of 4)\\ \verb@^@ & S\verb+_+statue\verb+_+trap & (statue trap)\\ \verb@ @ & S\verb+_+stone & (solid rock or unexplored terrain\\ - & & \,dark part of a room)\\ + & & \,or dark part of a room)\\ \verb@]@ & S\verb+_+strange\verb+_+obj & (strange object)\\ \verb@-@ & S\verb+_+sw\verb+_+bc & (swallow bottom center)\\ \verb@\@ & S\verb+_+sw\verb+_+bl & (swallow bottom left)\\ @@ -5059,7 +5059,7 @@ Default & Symbol Name & Description\\ \verb@\@ & S\verb+_+throne & (opulent throne)\\ \verb@-@ & S\verb+_+tlcorn & (top left corner)\\ \verb@|@ & S\verb+_+tlwall & (wall)\\ -\verb@(@ & S\verb+_+tool & (useful item (pick-axe\, key\, lamp...))\\ +\verb@(@ & S\verb+_+tool & (useful item (pick-axe, key, lamp...))\\ \verb@^@ & S\verb+_+trap\verb+_+door & (trap door)\\ \verb@t@ & S\verb+_+trapper & (trapper or lurker above)\\ \verb@-@ & S\verb+_+trcorn & (top right corner)\\ From 2b9e6a057b5ee8181c0b8a28591f9fea81d63a46 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sat, 2 Nov 2019 18:17:10 -0700 Subject: [PATCH 115/529] Removed the redundant #if definded(MSDOS). --- include/pcconf.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/pcconf.h b/include/pcconf.h index e3f764625..b22d3e70d 100644 --- a/include/pcconf.h +++ b/include/pcconf.h @@ -21,10 +21,8 @@ * Note: 3.6.x was not verified with Symantec C. */ -#if defined(MSDOS) #define CONFIG_FILE "defaults.nh" #define GUIDEBOOK_FILE "Guidebook.txt" -#endif /* * The following options are somewhat configurable depending on From 4ab976d6fd155e6bfc50fc7a7e4b5baba34fccb7 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sat, 2 Nov 2019 18:18:02 -0700 Subject: [PATCH 116/529] Renamed defaults.nh to .nethackrc for windows. --- include/ntconf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ntconf.h b/include/ntconf.h index af84c3ef0..725f4c4f0 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -80,8 +80,8 @@ * objects being thrown when the hangup occurs. \ */ -#define CONFIG_FILE "defaults.nh" -#define CONFIG_TEMPLATE "defaults.template" +#define CONFIG_FILE ".nethackrc" +#define CONFIG_TEMPLATE ".nethack.template" #define SYSCF_TEMPLATE "sysconf.template" #define SYMBOLS_TEMPLATE "symbols.template" #define GUIDEBOOK_FILE "Guidebook.txt" From 2b73494296a6ad8f979b79062bae3df45c8aa438 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sat, 2 Nov 2019 18:18:48 -0700 Subject: [PATCH 117/529] Updated guidebook to discuss new loc and name of configuration file on win. --- doc/Guidebook.mn | 21 +++++++++++---------- doc/Guidebook.tex | 23 +++++++++++++---------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 698e5743d..99d5d44fc 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -2625,16 +2625,17 @@ and Mac OS X it is \(lq.nethackrc\(rq in the user's home directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor. .pg -On Windows, if you manually installed from the zip file, -it is \(lqdefaults.nh\(rq -in the same folder as nethack.exe or nethackW.exe. -If you installed using the Microsoft Store, it is -\(lqdefaults.nh\(rq in the following folder: -\(lq\\%USERPROFILE%\\NetHack\(rq. There, a starting template is -provided for you to use to create your \(lqdefaults.nh\(rq -configuration file. It is \(lqdefaults.tmp\(rq also in the following -folder: -\(lq\\%USERPROFILE%\\NetHack\(rq +On Windows, it is \(lq.nethackrc\(rq in +\(lq\\%USERPROFILE%\\NetHack\\3.6\(rq. The file may not exist, +but it is a normal ASCII text file can can be created with any +text editor. +.pg +After running NetHack for the first time, you should find a default +template for the configuration file named \(lq.nethackrc.template\(rq +in \(lq\\%USERPROFILE%\\NetHack\\3.6\(rq. +.pg +If you had not created the configuration file, NetHack will create +the configuration file for you using the default template file. .pg On MS-DOS, it is \(lqdefaults.nh\(rq in the same folder as nethack.exe. .pg diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index d58a737a3..f2a2b9e9b 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2875,16 +2875,19 @@ directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor.\\ %.lp "" -On Windows, if you manually installed from the zip file, -it is \mbox{``defaults.nh''} in the same folder as -\mbox{{\it nethack.exe\/}} or \mbox{{\it nethackW.exe\/}}. -If you installed using the Microsoft Store, it is \mbox{``defaults.nh''} in -the following folder: -\mbox{{``\%USERPROFILE\%\textbackslash NetHack''}}. -There, a starting template is provided for you to use to create your -\mbox{``defaults.nh''} configuration file. It is \mbox{``defaults.tmp''} -also in the following folder: -\mbox{{``\%USERPROFILE\%\textbackslash NetHack''}}.\\ +On Windows, it is \mbox{``.nethackrc''} in the foler +\mbox{{``\%USERPROFILE\%\textbackslash NetHack\textbackslash 3.6''}}. The +file may not exist, but it is a normal ASCII text file and can be created +with any text editor.\\ + +%.lp "" +After runing {\it NetHack\/} for the first time, you should find a default +template for ths configuration file named \mbox{``.nethackrc.template''} in +\mbox{{``\%USERPROFILE\%\textbackslash NetHack\textbackslash 3.6''}}. + +%.lp "" +If you had not created the configuration file, {\it NetHack\/} will create +the configuration file for you using the default template file. %.lp "" On MS-DOS it is \mbox{``defaults.nh''} in the same folder as From 11018da6b83dd23e8238972338a8bc7744382533 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sat, 2 Nov 2019 19:11:26 -0700 Subject: [PATCH 118/529] Renamed configuration file for windows to .nethackrc. Also adjusted name of template files populated during windows builds. --- Files | 12 ++++++------ include/ntconf.h | 2 +- sys/winnt/{defaults.nh => .nethackrc.template} | 0 sys/winnt/{sysconf => sysconf.template} | 0 sys/winnt/windmain.c | 12 ++++++------ win/win32/vs2017/NetHackPackage.wapproj | 12 ++++++------ win/win32/vs2017/afternethack.proj | 13 ++++++------- 7 files changed, 25 insertions(+), 26 deletions(-) rename sys/winnt/{defaults.nh => .nethackrc.template} (100%) rename sys/winnt/{sysconf => sysconf.template} (100%) diff --git a/Files b/Files index 2974df3bf..a2e10eb35 100644 --- a/Files +++ b/Files @@ -273,12 +273,12 @@ stat.h sys/winnt: (files for Windows 7/8.x/10 version) -Install.nt Makefile.gcc Makefile.msc console.rc -defaults.nh nethack.def nh340key.c nhdefkey.c -nhico.uu nhraykey.c nhsetup.bat ntsound.c -nttty.c porthelp stub-pdcscrn.c stubs.c -sysconf win10.c win10.h win32api.h -windmain.c winnt.c winos.h +Install.nt Makefile.gcc Makefile.msc console.rc +.nethackrc.template nethack.def nh340key.c nhdefkey.c +nhico.uu nhraykey.c nhsetup.bat ntsound.c +nttty.c porthelp stub-pdcscrn.c stubs.c +sysconf.template win10.c win10.h win32api.h +windmain.c winnt.c winos.h util: (files for all versions) diff --git a/include/ntconf.h b/include/ntconf.h index 725f4c4f0..a135ee420 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -81,7 +81,7 @@ */ #define CONFIG_FILE ".nethackrc" -#define CONFIG_TEMPLATE ".nethack.template" +#define CONFIG_TEMPLATE ".nethackrc.template" #define SYSCF_TEMPLATE "sysconf.template" #define SYMBOLS_TEMPLATE "symbols.template" #define GUIDEBOOK_FILE "Guidebook.txt" diff --git a/sys/winnt/defaults.nh b/sys/winnt/.nethackrc.template similarity index 100% rename from sys/winnt/defaults.nh rename to sys/winnt/.nethackrc.template diff --git a/sys/winnt/sysconf b/sys/winnt/sysconf.template similarity index 100% rename from sys/winnt/sysconf rename to sys/winnt/sysconf.template diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index df2eaff4e..4574e9d1a 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -305,23 +305,23 @@ void copy_config_content() /* Keep templates up to date */ /* TODO: Update the package to store config file as .nethackrc */ update_file(fqn_prefix[CONFIGPREFIX], CONFIG_TEMPLATE, - fqn_prefix[DATAPREFIX], CONFIG_FILE, FALSE); + fqn_prefix[DATAPREFIX], CONFIG_TEMPLATE, FALSE); update_file(fqn_prefix[SYSCONFPREFIX], SYSCF_TEMPLATE, - fqn_prefix[DATAPREFIX], SYSCF_FILE, FALSE); + fqn_prefix[DATAPREFIX], SYSCF_TEMPLATE, FALSE); /* If the required early game file does not exist, copy it */ /* NOTE: We never replace .nethackrc or sysconf */ copy_file(fqn_prefix[CONFIGPREFIX], CONFIG_FILE, - fqn_prefix[DATAPREFIX], CONFIG_FILE); + fqn_prefix[DATAPREFIX], CONFIG_TEMPLATE); copy_file(fqn_prefix[SYSCONFPREFIX], SYSCF_FILE, - fqn_prefix[DATAPREFIX], SYSCF_FILE); + fqn_prefix[DATAPREFIX], SYSCF_TEMPLATE); /* Update symbols and save a copy if we are replacing */ /* TODO: Can't HACKDIR be changed during option parsing causing us to perhaps be checking options against the wrong symbols file? */ update_file(fqn_prefix[HACKPREFIX], SYMBOLS, - fqn_prefix[DATAPREFIX], SYMBOLS, TRUE); + fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, TRUE); } void @@ -335,7 +335,7 @@ copy_hack_content() /* Keep templates up to date */ update_file(fqn_prefix[HACKPREFIX], SYMBOLS_TEMPLATE, - fqn_prefix[DATAPREFIX], SYMBOLS, FALSE); + fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, FALSE); } diff --git a/win/win32/vs2017/NetHackPackage.wapproj b/win/win32/vs2017/NetHackPackage.wapproj index daf3091c8..514baa251 100644 --- a/win/win32/vs2017/NetHackPackage.wapproj +++ b/win/win32/vs2017/NetHackPackage.wapproj @@ -113,8 +113,8 @@ - - NetHackW\defaults.nh + + NetHackW\.nethackrc.template NetHackW\Guidebook.txt @@ -128,11 +128,11 @@ NetHackW\opthelp - - NetHackW\symbols + + NetHackW\symbols.template - - NetHackW\sysconf + + NetHackW\sysconf.template diff --git a/win/win32/vs2017/afternethack.proj b/win/win32/vs2017/afternethack.proj index 912d75e89..ca39fddfc 100644 --- a/win/win32/vs2017/afternethack.proj +++ b/win/win32/vs2017/afternethack.proj @@ -3,13 +3,12 @@ - - - - + Inputs="$(SysWinntDir).nethackrc.template;$(DocDir)Guidebook.txt;$(DatDir)license;$(SysWinntDir)sysconf.template;$(DocDir)nethack.txt;$(DatDir)symbols;$(WinWin32Dir)record;$(DatDir)opthelp" + Outputs="$(BinDir).nethackrc.template;$(BinDir)Guidebook.txt;$(BinDir)license;$(BinDir)sysconf.template;$(BinDir)symbols.template;$(BinDir)record;$(BinDir)opthelp"> + + - + From a259d0346097ca8be9b29b4c8d863990df669db4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 2 Nov 2019 22:33:34 -0400 Subject: [PATCH 119/529] Windows Makefile catch-up bits --- sys/winnt/Makefile.gcc | 8 ++++---- sys/winnt/Makefile.msc | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 54a14572e..a3ea33cdb 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -1,4 +1,4 @@ -# NetHack 3.6 Makefile.gcc $NHDT-Date: 1546174698 2018/12/30 12:58:18 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.71 $ +# NetHack 3.6 Makefile.gcc $NHDT-Date: 1572748375 2019/11/03 02:32:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.80 $ # Copyright (c) 2010 by Michael Allison # NetHack may be freely redistributed. See license for details. # @@ -764,11 +764,11 @@ else $(subst /,\,copy $(DAT)/*.lev $(GAMEDIR)) $(subst /,\,if exist $(GAMEDIR)/makefile del $(GAMEDIR)/makefile) endif - $(subst /,\,if not exist $(GAMEDIR)/sysconf copy $(MSWSYS)/sysconf $(GAMEDIR)) - $(subst /,\,if exist $(DAT)/symbols copy $(DAT)/symbols $(GAMEDIR)) + $(subst /,\,if exist $(MSWSYS)/sysconf copy $(MSWSYS)/sysconf $(GAMEDIR)/sysconf.template) + $(subst /,\,if exist $(DAT)/symbols copy $(DAT)/symbols $(GAMEDIR)/symbols.template) $(subst /,\,if exist $(DOC)/guidebook.txt copy $(DOC)/guidebook.txt $(GAMEDIR)/Guidebook.txt) $(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR)/NetHack.txt) - $(subst /,\,if not exist $(GAMEDIR)/defaults.nh copy $(MSWSYS)/defaults.nh $(GAMEDIR)/defaults.nh) + $(subst /,\,if exist $(MSWSYS)/defaults.nh copy $(MSWSYS)/defaults.nh $(GAMEDIR)/.nethackrc.template) $(subst /,\,-if not exist $(GAMEDIR)/record. echo.>$(GAMEDIR)/record.) # # diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index ad55dad0e..de927a197 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -1,4 +1,4 @@ -# NetHack 3.6 Makefile.msc $NHDT-Date: 1554784482 2019/04/09 04:34:42 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.153 $ */ +# NetHack 3.6 Makefile.msc $NHDT-Date: 1572748386 2019/11/03 02:33:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.167 $ */ # Copyright (c) NetHack PC Development Team 1993-2019 # #============================================================================== @@ -688,13 +688,13 @@ $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ copy $(DAT)\*.lev $(GAMEDIR) if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile ! ENDIF - if not exist $(GAMEDIR)\sysconf copy $(MSWSYS)\sysconf $(GAMEDIR) - if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR) + if exist $(MSWSYS)\sysconf copy $(MSWSYS)\sysconf $(GAMEDIR)\sysconf.template + if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR)\symbols.template if exist $(DOC)\guidebook.txt copy $(DOC)\guidebook.txt $(GAMEDIR)\Guidebook.txt if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt @if exist $(GAMEDIR)\NetHack.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHack.PDB to conserve space @if exist $(GAMEDIR)\NetHackW.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHackW.PDB to conserve space - -if not exist $(GAMEDIR)\defaults.nh copy $(MSWSYS)\defaults.nh $(GAMEDIR)\defaults.nh + if exist $(MSWSYS)\defaults.nh copy $(MSWSYS)\defaults.nh $(GAMEDIR)\.nethackrc.template -if not exist $(GAMEDIR)\record. goto>$(GAMEDIR)\record. echo install done > $@ From 9319e3577b5358926d4b08bd102baed39e9d64fe Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 2 Nov 2019 22:43:25 -0400 Subject: [PATCH 120/529] use new Windows file names --- sys/winnt/Makefile.gcc | 4 ++-- sys/winnt/Makefile.msc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index a3ea33cdb..9bb2f920e 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -764,11 +764,11 @@ else $(subst /,\,copy $(DAT)/*.lev $(GAMEDIR)) $(subst /,\,if exist $(GAMEDIR)/makefile del $(GAMEDIR)/makefile) endif - $(subst /,\,if exist $(MSWSYS)/sysconf copy $(MSWSYS)/sysconf $(GAMEDIR)/sysconf.template) + $(subst /,\,if exist $(MSWSYS)/sysconf.template copy $(MSWSYS)/sysconf.template $(GAMEDIR)) $(subst /,\,if exist $(DAT)/symbols copy $(DAT)/symbols $(GAMEDIR)/symbols.template) $(subst /,\,if exist $(DOC)/guidebook.txt copy $(DOC)/guidebook.txt $(GAMEDIR)/Guidebook.txt) $(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR)/NetHack.txt) - $(subst /,\,if exist $(MSWSYS)/defaults.nh copy $(MSWSYS)/defaults.nh $(GAMEDIR)/.nethackrc.template) + $(subst /,\,if exist $(MSWSYS)/.nethackrc.template copy $(MSWSYS)/.nethackrc.template $(GAMEDIR)) $(subst /,\,-if not exist $(GAMEDIR)/record. echo.>$(GAMEDIR)/record.) # # diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index de927a197..8a9eb0d2f 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -688,13 +688,13 @@ $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ copy $(DAT)\*.lev $(GAMEDIR) if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile ! ENDIF - if exist $(MSWSYS)\sysconf copy $(MSWSYS)\sysconf $(GAMEDIR)\sysconf.template + if exist $(MSWSYS)\sysconf.template copy $(MSWSYS)\sysconf.template $(GAMEDIR) if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR)\symbols.template if exist $(DOC)\guidebook.txt copy $(DOC)\guidebook.txt $(GAMEDIR)\Guidebook.txt if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt @if exist $(GAMEDIR)\NetHack.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHack.PDB to conserve space @if exist $(GAMEDIR)\NetHackW.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHackW.PDB to conserve space - if exist $(MSWSYS)\defaults.nh copy $(MSWSYS)\defaults.nh $(GAMEDIR)\.nethackrc.template + if exist $(MSWSYS)\.nethackrc.template copy $(MSWSYS)\.nethackrc.template $(GAMEDIR) -if not exist $(GAMEDIR)\record. goto>$(GAMEDIR)\record. echo install done > $@ From 395c970add9325e3c7320e2a30435d101c58e6f2 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sun, 3 Nov 2019 07:52:33 -0800 Subject: [PATCH 121/529] Changes to windows based discussion of .nethackrc. --- doc/Guidebook.mn | 2 -- doc/Guidebook.tex | 4 ---- 2 files changed, 6 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 99d5d44fc..f389ef8b5 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -2629,11 +2629,9 @@ On Windows, it is \(lq.nethackrc\(rq in \(lq\\%USERPROFILE%\\NetHack\\3.6\(rq. The file may not exist, but it is a normal ASCII text file can can be created with any text editor. -.pg After running NetHack for the first time, you should find a default template for the configuration file named \(lq.nethackrc.template\(rq in \(lq\\%USERPROFILE%\\NetHack\\3.6\(rq. -.pg If you had not created the configuration file, NetHack will create the configuration file for you using the default template file. .pg diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index f2a2b9e9b..dfbb9f471 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2879,13 +2879,9 @@ On Windows, it is \mbox{``.nethackrc''} in the foler \mbox{{``\%USERPROFILE\%\textbackslash NetHack\textbackslash 3.6''}}. The file may not exist, but it is a normal ASCII text file and can be created with any text editor.\\ - -%.lp "" After runing {\it NetHack\/} for the first time, you should find a default template for ths configuration file named \mbox{``.nethackrc.template''} in \mbox{{``\%USERPROFILE\%\textbackslash NetHack\textbackslash 3.6''}}. - -%.lp "" If you had not created the configuration file, {\it NetHack\/} will create the configuration file for you using the default template file. From 0b23cac8ab8905b3fb167de8460aa47415922cf8 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sun, 3 Nov 2019 08:03:01 -0800 Subject: [PATCH 122/529] Formatting changes to .nethackrc discussion for windows. --- doc/Guidebook.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index dfbb9f471..818cce066 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2878,7 +2878,7 @@ can be created with any text editor.\\ On Windows, it is \mbox{``.nethackrc''} in the foler \mbox{{``\%USERPROFILE\%\textbackslash NetHack\textbackslash 3.6''}}. The file may not exist, but it is a normal ASCII text file and can be created -with any text editor.\\ +with any text editor. After runing {\it NetHack\/} for the first time, you should find a default template for ths configuration file named \mbox{``.nethackrc.template''} in \mbox{{``\%USERPROFILE\%\textbackslash NetHack\textbackslash 3.6''}}. From f0707fee6ed9a11626436657059ca45f86ca8858 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sun, 3 Nov 2019 13:31:17 -0800 Subject: [PATCH 123/529] More tweaks to how windows deals with directory paths. --- include/decl.h | 1 + src/decl.c | 4 ++ src/files.c | 7 ++- sys/winnt/windmain.c | 115 ++++++++++++++++++++++--------------------- 4 files changed, 69 insertions(+), 58 deletions(-) diff --git a/include/decl.h b/include/decl.h index 974af0f10..1aa115983 100644 --- a/include/decl.h +++ b/include/decl.h @@ -398,6 +398,7 @@ E const char *const monexplain[], invisexplain[], *const oclass_names[]; #endif E char *fqn_prefix[PREFIX_COUNT]; +E boolean fqn_prefix_locked[PREFIX_COUNT]; #ifdef PREFIXES_IN_USE E char *fqn_prefix_names[PREFIX_COUNT]; #endif diff --git a/src/decl.c b/src/decl.c index a42cad2a0..d732df35c 100644 --- a/src/decl.c +++ b/src/decl.c @@ -286,6 +286,10 @@ char *fqn_prefix[PREFIX_COUNT] = { (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0 }; +boolean fqn_prefix_locked[PREFIX_COUNT] = { FALSE, FALSE, FALSE, + FALSE, FALSE, FALSE, + FALSE, FALSE, FALSE, + FALSE }; #ifdef PREFIXES_IN_USE char *fqn_prefix_names[PREFIX_COUNT] = { diff --git a/src/files.c b/src/files.c index f89e5e061..d6f1cf5da 100644 --- a/src/files.c +++ b/src/files.c @@ -2158,6 +2158,8 @@ int prefixid; if (!bufp) return; + if (fqn_prefix_locked[prefixid]) + return; /* Backward compatibility, ignore trailing ;n */ if ((ptr = index(bufp, ';')) != 0) *ptr = '\0'; @@ -3196,7 +3198,7 @@ fopen_sym_file() { FILE *fp; - fp = fopen_datafile(SYMBOLS, "r", HACKPREFIX); + fp = fopen_datafile(SYMBOLS, "r", CONFIGPREFIX); return fp; } @@ -3861,6 +3863,9 @@ assure_syscf_file() { int fd; + /* We are checking that the sysconf exists ... lock the path */ + fqn_prefix_locked[SYSCONFPREFIX] = TRUE; + /* * All we really care about is the end result - can we read the file? * So just check that directly. diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 4574e9d1a..c14e3e7af 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -97,13 +97,16 @@ void build_known_folder_path( const KNOWNFOLDERID * folder_id, char * path, - size_t path_size) + size_t path_size, + boolean versioned) { get_known_folder_path(folder_id, path, path_size); strcat(path, "\\NetHack\\"); create_directory(path); - strcat(path, "3.6\\"); - create_directory(path); + if (versioned) { + strcat(path, "3.6\\"); + create_directory(path); + } } void @@ -190,51 +193,37 @@ set_default_prefix_locations(const char *programPath) char *envp = NULL; char *sptr = NULL; - static char hack_path[MAX_PATH]; static char executable_path[MAX_PATH]; - static char nethack_profile_path[MAX_PATH]; - static char nethack_per_user_data_path[MAX_PATH]; - static char nethack_global_data_path[MAX_PATH]; - static char sysconf_path[MAX_PATH]; + static char profile_path[MAX_PATH]; + static char versioned_profile_path[MAX_PATH]; + static char versioned_user_data_path[MAX_PATH]; + static char versioned_global_data_path[MAX_PATH]; strcpy(executable_path, get_executable_path()); append_slash(executable_path); - build_environment_path("NETHACKDIR", NULL, hack_path, sizeof(hack_path)); + build_known_folder_path(&FOLDERID_Profile, profile_path, + sizeof(profile_path), FALSE); - if (hack_path[0] == '\0') - build_environment_path("HACKDIR", NULL, hack_path, sizeof(hack_path)); - - build_known_folder_path(&FOLDERID_Profile, nethack_profile_path, - sizeof(nethack_profile_path)); + build_known_folder_path(&FOLDERID_Profile, versioned_profile_path, + sizeof(profile_path), TRUE); build_known_folder_path(&FOLDERID_LocalAppData, - nethack_per_user_data_path, sizeof(nethack_per_user_data_path)); + versioned_user_data_path, sizeof(versioned_user_data_path), TRUE); build_known_folder_path(&FOLDERID_ProgramData, - nethack_global_data_path, sizeof(nethack_global_data_path)); + versioned_global_data_path, sizeof(versioned_global_data_path), TRUE); - if (hack_path[0] == '\0') - strcpy(hack_path, nethack_profile_path); - - fqn_prefix[LEVELPREFIX] = nethack_per_user_data_path; - fqn_prefix[SAVEPREFIX] = nethack_per_user_data_path; - fqn_prefix[BONESPREFIX] = nethack_global_data_path; + fqn_prefix[LEVELPREFIX] = versioned_user_data_path; + fqn_prefix[SAVEPREFIX] = versioned_user_data_path; + fqn_prefix[BONESPREFIX] = versioned_global_data_path; fqn_prefix[DATAPREFIX] = executable_path; - fqn_prefix[SCOREPREFIX] = nethack_global_data_path; - fqn_prefix[LOCKPREFIX] = nethack_global_data_path; - fqn_prefix[CONFIGPREFIX] = nethack_profile_path; - - fqn_prefix[HACKPREFIX] = hack_path; - fqn_prefix[TROUBLEPREFIX] = hack_path; - - build_environment_path("COMMONPROGRAMFILES", "NetHack\\3.6", sysconf_path, - sizeof(sysconf_path)); - - if(!folder_file_exists(sysconf_path, SYSCF_FILE)) - strcpy(sysconf_path, hack_path); - - fqn_prefix[SYSCONFPREFIX] = sysconf_path; + fqn_prefix[SCOREPREFIX] = versioned_global_data_path; + fqn_prefix[LOCKPREFIX] = versioned_global_data_path; + fqn_prefix[CONFIGPREFIX] = profile_path; + fqn_prefix[HACKPREFIX] = versioned_profile_path; + fqn_prefix[TROUBLEPREFIX] = versioned_profile_path; + fqn_prefix[SYSCONFPREFIX] = versioned_global_data_path; } @@ -300,43 +289,51 @@ update_file( } -void copy_config_content() +void copy_sysconf_content() { - /* Keep templates up to date */ - /* TODO: Update the package to store config file as .nethackrc */ - update_file(fqn_prefix[CONFIGPREFIX], CONFIG_TEMPLATE, - fqn_prefix[DATAPREFIX], CONFIG_TEMPLATE, FALSE); + /* Using the SYSCONFPREFIX path, lock it so that it does not change */ + fqn_prefix_locked[SYSCONFPREFIX] = TRUE; + update_file(fqn_prefix[SYSCONFPREFIX], SYSCF_TEMPLATE, fqn_prefix[DATAPREFIX], SYSCF_TEMPLATE, FALSE); + /* If the required early game file does not exist, copy it */ + copy_file(fqn_prefix[SYSCONFPREFIX], SYSCF_FILE, + fqn_prefix[DATAPREFIX], SYSCF_TEMPLATE); +} + +void copy_config_content() +{ + /* Using the CONFIGPREFIX path, lock it so that it does not change */ + fqn_prefix_locked[CONFIGPREFIX] = TRUE; + + /* Keep templates up to date */ + update_file(fqn_prefix[CONFIGPREFIX], CONFIG_TEMPLATE, + fqn_prefix[DATAPREFIX], CONFIG_TEMPLATE, FALSE); + + update_file(fqn_prefix[CONFIGPREFIX], SYMBOLS_TEMPLATE, + fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, FALSE); + /* If the required early game file does not exist, copy it */ /* NOTE: We never replace .nethackrc or sysconf */ copy_file(fqn_prefix[CONFIGPREFIX], CONFIG_FILE, fqn_prefix[DATAPREFIX], CONFIG_TEMPLATE); - copy_file(fqn_prefix[SYSCONFPREFIX], SYSCF_FILE, - fqn_prefix[DATAPREFIX], SYSCF_TEMPLATE); - /* Update symbols and save a copy if we are replacing */ - /* TODO: Can't HACKDIR be changed during option parsing - causing us to perhaps be checking options against the wrong - symbols file? */ - update_file(fqn_prefix[HACKPREFIX], SYMBOLS, + update_file(fqn_prefix[CONFIGPREFIX], SYMBOLS, fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, TRUE); + } void copy_hack_content() { + nhassert(fqn_prefix_locked[HACKPREFIX]); + /* Keep Guidebook and opthelp up to date */ update_file(fqn_prefix[HACKPREFIX], GUIDEBOOK_FILE, fqn_prefix[DATAPREFIX], GUIDEBOOK_FILE, FALSE); update_file(fqn_prefix[HACKPREFIX], OPTIONFILE, fqn_prefix[DATAPREFIX], OPTIONFILE, FALSE); - - /* Keep templates up to date */ - update_file(fqn_prefix[HACKPREFIX], SYMBOLS_TEMPLATE, - fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, FALSE); - } /* @@ -407,22 +404,26 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ chdir(fqn_prefix[HACKPREFIX]); #endif - copy_config_content(); - if (GUILaunched || IsDebuggerPresent()) getreturn_enabled = TRUE; check_recordfile((char *) 0); iflags.windowtype_deferred = TRUE; + copy_sysconf_content(); initoptions(); + copy_config_content(); + process_options(argc, argv); + + /* Finished processing options, lock all directory paths */ + for(int i = 0; i < PREFIX_COUNT; i++) + fqn_prefix_locked[i] = TRUE; + if (!validate_prefix_locations(failbuf)) { raw_printf("Some invalid directory locations were specified:\n\t%s\n", failbuf); nethack_exit(EXIT_FAILURE); } - process_options(argc, argv); - copy_hack_content(); /* From da8525978240be8bcf10de2162d12d08579fd5d8 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sun, 3 Nov 2019 14:06:49 -0800 Subject: [PATCH 124/529] Fixes to template files . --- sys/winnt/.nethackrc.template | 30 +++++++++++------------- sys/winnt/sysconf.template | 43 ++++++++++++++++------------------- 2 files changed, 33 insertions(+), 40 deletions(-) diff --git a/sys/winnt/.nethackrc.template b/sys/winnt/.nethackrc.template index 39b7924cf..6bec6e108 100644 --- a/sys/winnt/.nethackrc.template +++ b/sys/winnt/.nethackrc.template @@ -142,28 +142,24 @@ OPTIONS=vary_msgcount:4 # IMPORTANT: If you change any of these locations, the directories they # point at must exist. NetHack will not create them for you. # -# HACKDIR is the default location for everything. -# Note: On Windows HACKDIR defaults to the location -# of the NetHack.exe or NetHackw.exe file so -# setting HACKDIR below to override that is -# not usually necessary or recommended. -#HACKDIR=c:\games\nethack +# The location that documentation and helps files are placed +#HACKDIR=c:\User\USERNAME\NetHack\3.6 # -# The location that level files in progress are stored (default=HACKDIR, writeable) -#LEVELDIR=c:\nethack\levels +# The location that level files in progress are stored (writeable) +#LEVELDIR=c:\User\USERNAME\AppData\Local\NetHack\3.6 # -# The location where saved games are kept (default=HACKDIR, writeable) -#SAVEDIR=c:\nethack\save +# The location where saved games are kept (writeable) +#SAVEDIR=c:\User\USERNAME\AppData\Local\NetHack\3.6 # -# The location that bones files are kept (default=HACKDIR, writeable) -#BONESDIR=c:\nethack\save +# The location that bones files are kept (writeable) +#BONESDIR=c:\ProgramData\NetHack\3.6 # -# The location that file synchronization locks are stored (default=HACKDIR, writeable) -#LOCKDIR=c:\nethack\levels +# The location that score files are kept (writeable) +#SCOREDIR=c:\ProgramData\NetHack\3.6 +# +# The location that file synchronization locks are stored (writeable) +#LOCKDIR=c:\ProgramData\NetHack\3.6 # -# The location that a record of game aborts and self-diagnosed game problems -# is kept (default=HACKDIR, writeable) -#TROUBLEDIR=c:\nethack\trouble # Finnish keyboards might need these modifications uncommented. # For \, @, $, [, | diff --git a/sys/winnt/sysconf.template b/sys/winnt/sysconf.template index 93aaa1ddc..058b29122 100644 --- a/sys/winnt/sysconf.template +++ b/sys/winnt/sysconf.template @@ -77,30 +77,27 @@ WIZARDS=* # IMPORTANT: If you change any of these locations, the directories they # point at must exist. NetHack will not create them for you. # -# HACKDIR is the default location for everything. -# Note: On Windows HACKDIR defaults to the location -# of the NetHack.exe or NetHackw.exe file so -# setting HACKDIR below to override that is -# not usually necessary or recommended. -#HACKDIR=c:\games\nethack -# # The location that users can adjust their config file startup options -#CONFIGDIR=c:\games\nethack -# -# The location that level files in progress are stored (default=HACKDIR, writeable) -#LEVELDIR=c:\nethack\levels -# -# The location where saved games are kept (default=HACKDIR, writeable) -#SAVEDIR=c:\nethack\save -# -# The location that bones files are kept (default=HACKDIR, writeable) -#BONESDIR=c:\nethack\save -# -# The location that file synchronization locks are stored (default=HACKDIR, writeable) -#LOCKDIR=c:\nethack\levels +#CONFIGDIR=c:\User\USERNAME\NetHack # # The location that a record of game aborts and self-diagnosed game problems # is kept (default=HACKDIR, writeable) -#TROUBLEDIR=c:\nethack\trouble - - +#TROUBLEDIR=c:\User\USERNAME\NetHack\3.6 +# +# The location that documentation and helps files are placed +#HACKDIR=c:\User\USERNAME\NetHack\3.6 +# +# The location that level files in progress are stored (writeable) +#LEVELDIR=c:\User\USERNAME\AppData\Local\NetHack\3.6 +# +# The location where saved games are kept (writeable) +#SAVEDIR=c:\User\USERNAME\AppData\Local\NetHack\3.6 +# +# The location that bones files are kept (writeable) +#BONESDIR=c:\ProgramData\NetHack\3.6 +# +# The location that score files are kept (writeable) +#SCOREDIR=c:\ProgramData\NetHack\3.6 +# +# The location that file synchronization locks are stored (writeable) +#LOCKDIR=c:\ProgramData\NetHack\3.6 From 7c5a2adfa54cb3e42d4f58c5a08ea54063cb84c7 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sun, 3 Nov 2019 14:07:11 -0800 Subject: [PATCH 125/529] Lock TROUBLEPREFIX after parsing sysconf. --- sys/winnt/windmain.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index c14e3e7af..d226b26f1 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -410,7 +410,12 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ check_recordfile((char *) 0); iflags.windowtype_deferred = TRUE; copy_sysconf_content(); - initoptions(); + initoptions(); + + /* Now that sysconf has had a chance to set the TROUBLEPREFIX, don't + allow it to be changed from here on out. */ + fqn_prefix_locked[TROUBLEPREFIX] = TRUE; + copy_config_content(); process_options(argc, argv); From 224472013381a7f9a7e473b6757d634f11ad353b Mon Sep 17 00:00:00 2001 From: Bart House Date: Sun, 3 Nov 2019 17:39:18 -0800 Subject: [PATCH 126/529] Built windows store package. --- win/win32/vs2017/NetHackPackage.appxmanifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/win32/vs2017/NetHackPackage.appxmanifest b/win/win32/vs2017/NetHackPackage.appxmanifest index 44c752964..8eebc3cc4 100644 --- a/win/win32/vs2017/NetHackPackage.appxmanifest +++ b/win/win32/vs2017/NetHackPackage.appxmanifest @@ -1,6 +1,6 @@  - + NetHack 3.6 NetHack DevTeam From 6b88a19365d1e51ea0064414ab57c2e7a2b52eac Mon Sep 17 00:00:00 2001 From: Bart House Date: Sun, 3 Nov 2019 17:59:39 -0800 Subject: [PATCH 127/529] Added new map_mode tiles_fit_to_screen for Windows NetHackW.exe --- doc/config.nh | 3 ++- src/options.c | 11 +++++++++-- sys/winnt/.nethackrc.template | 3 ++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/doc/config.nh b/doc/config.nh index ce5410382..437158250 100644 --- a/doc/config.nh +++ b/doc/config.nh @@ -347,7 +347,8 @@ # How the map window is shown? Windows GUI only. # possible map_mode options include: tiles, ascii4x6, # ascii6x8, ascii8x8, ascii16x8, ascii7x12, ascii8x12, ascii16x12, -# ascii12x16, ascii10x18, fit_to_screen +# ascii12x16, ascii10x18, fit_to_screen, ascii_fit_to_screen, +# tiles_fit_to_screen #OPTIONS=map_mode:tiles # Define alternative file for the files, and the tile size diff --git a/src/options.c b/src/options.c index 28de184c3..bfeb08604 100644 --- a/src/options.c +++ b/src/options.c @@ -3396,7 +3396,8 @@ boolean tinitial, tfrom_file; /* WINCAP * * map_mode:[tiles|ascii4x6|ascii6x8|ascii8x8|ascii16x8|ascii7x12 - * |ascii8x12|ascii16x12|ascii12x16|ascii10x18|fit_to_screen] + * |ascii8x12|ascii16x12|ascii12x16|ascii10x18|fit_to_screen + * |ascii_fit_to_screen|tiles_fit_to_screen] */ fullname = "map_mode"; if (match_optname(opts, fullname, sizeof "map_mode" - 1, TRUE)) { @@ -3404,7 +3405,7 @@ boolean tinitial, tfrom_file; complain_about_duplicate(opts, 1); op = string_for_opt(opts, negated); if (op && !negated) { - if (!strncmpi(op, "tiles", sizeof "tiles" - 1)) + if (!strcmpi(op, "tiles")) iflags.wc_map_mode = MAP_MODE_TILES; else if (!strncmpi(op, "ascii4x6", sizeof "ascii4x6" - 1)) iflags.wc_map_mode = MAP_MODE_ASCII4x6; @@ -3427,6 +3428,12 @@ boolean tinitial, tfrom_file; else if (!strncmpi(op, "fit_to_screen", sizeof "fit_to_screen" - 1)) iflags.wc_map_mode = MAP_MODE_ASCII_FIT_TO_SCREEN; + else if (!strncmpi(op, "ascii_fit_to_screen", + sizeof "ascii_fit_to_screen" - 1)) + iflags.wc_map_mode = MAP_MODE_ASCII_FIT_TO_SCREEN; + else if (!strncmpi(op, "tiles_fit_to_screen", + sizeof "tiles_fit_to_screen" - 1)) + iflags.wc_map_mode = MAP_MODE_TILES_FIT_TO_SCREEN; else { config_error_add("Unknown %s parameter '%s'", fullname, op); return FALSE; diff --git a/sys/winnt/.nethackrc.template b/sys/winnt/.nethackrc.template index 39b7924cf..50605b27d 100644 --- a/sys/winnt/.nethackrc.template +++ b/sys/winnt/.nethackrc.template @@ -104,7 +104,8 @@ OPTIONS=suppress_alert:3.3.1 # Map window settings # possible map_mode options include: tiles|ascii4x6|ascii6x8|ascii8x8|ascii16x8| # ascii7x12|ascii8x12|ascii16x12|ascii12x16| -# ascii10x18|fit_to_screen +# ascii10x18|fit_to_screen|ascii_fit_to_screen| +# tiles_fit_to_screen OPTIONS=map_mode:tiles,scroll_margin:10 # Message window settings From f29a6b164d67812859659d6f1b3f70301bcbb90b Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 3 Nov 2019 18:12:55 -0800 Subject: [PATCH 128/529] fix #H9392 - deafness vs music Music wasn't using You_hear() so needs to handle Deaf itself. Have it give alternate messages for sounds being emitted from instruments. This doesn't implement the suggestion that a Deaf hero shouldn't be able to produce the same music as a non-deaf one. --- doc/fixes36.3 | 3 ++- src/music.c | 73 ++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 54 insertions(+), 22 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 04a1e0685..1618edd50 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.151 $ $NHDT-Date: 1572530225 2019/10/31 13:57:05 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.155 $ $NHDT-Date: 1572833562 2019/11/04 02:12:42 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -212,6 +212,7 @@ when entering Astral level, initial rendering of guardian angel didn't show it as tame; noticeable if the level was entered with 'hilite_pet' On fix a leashed pet polymorphed into a long worm staying leashed prevent leashing unsolid monsters and monsters with no extremities +playing musical instruments gave feedback which ignored deafness Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/music.c b/src/music.c index bcaae3f83..c1eed4359 100644 --- a/src/music.c +++ b/src/music.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 music.c $NHDT-Date: 1544442713 2018/12/10 11:51:53 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.57 $ */ +/* NetHack 3.6 music.c $NHDT-Date: 1572833563 2019/11/04 02:12:43 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.58 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -187,7 +187,7 @@ struct monst *bugler; /* monster that played instrument */ mtmp->mstrategy &= ~STRAT_WAITMASK; if (canseemon(mtmp)) pline("%s is now ready for battle!", Monnam(mtmp)); - else + else if (!Deaf) Norep("You hear the rattle of battle gear being readied."); } else if ((distm = ((bugler == &youmonst) ? distu(mtmp->mx, mtmp->my) @@ -301,7 +301,7 @@ int force; /*FALLTHRU*/ case ROOM: case CORR: /* Try to make a pit */ - do_pit: + do_pit: chasm = maketrap(x, y, PIT); if (!chasm) break; /* no pit if portal at that location */ @@ -483,6 +483,7 @@ struct obj *instr; itmp.otyp -= 1; mundane = TRUE; } + #ifdef MAC mac_speaker(&itmp, "C"); #endif @@ -514,10 +515,16 @@ struct obj *instr; You("start playing %s.", yname(instr)); break; case PLAY_STUNNED: - You("produce an obnoxious droning sound."); + if (!Deaf) + You("produce an obnoxious droning sound."); + else + You_feel("a monotonous vibration."); break; case PLAY_CONFUSED: - You("produce a raucous noise."); + if (!Deaf) + You("produce a raucous noise."); + else + You_feel("a jarring vibration."); break; case PLAY_HALLU: You("produce a kaleidoscopic display of floating butterfiles."); @@ -541,13 +548,17 @@ struct obj *instr; case MAGIC_FLUTE: /* Make monster fall asleep */ consume_obj_charge(instr, TRUE); - You("produce %s music.", Hallucination ? "piped" : "soft"); + You("%sproduce %s music.", !Deaf ? "" : "seem to ", + Hallucination ? "piped" : "soft"); put_monsters_to_sleep(u.ulevel * 5); exercise(A_DEX, TRUE); break; case WOODEN_FLUTE: /* May charm snakes */ do_spec &= (rn2(ACURR(A_DEX)) + u.ulevel > 25); - pline("%s.", Tobjnam(instr, do_spec ? "trill" : "toot")); + if (!Deaf) + pline("%s.", Tobjnam(instr, do_spec ? "trill" : "toot")); + else + You_feel("%s %s.", yname(instr), do_spec ? "trill" : "toot"); if (do_spec) charm_snakes(u.ulevel * 3); exercise(A_DEX, TRUE); @@ -573,26 +584,38 @@ struct obj *instr; makeknown(instr->otyp); break; case TOOLED_HORN: /* Awaken or scare monsters */ - You("produce a frightful, grave sound."); + if (!Deaf) + You("produce a frightful, grave sound."); + else + You("blow into the horn."); awaken_monsters(u.ulevel * 30); exercise(A_WIS, FALSE); break; case BUGLE: /* Awaken & attract soldiers */ - You("extract a loud noise from %s.", yname(instr)); + if (!Deaf) + You("extract a loud noise from %s.", yname(instr)); + else + You("blow into the bugle."); awaken_soldiers(&youmonst); exercise(A_WIS, FALSE); break; case MAGIC_HARP: /* Charm monsters */ consume_obj_charge(instr, TRUE); - pline("%s very attractive music.", Tobjnam(instr, "produce")); + if (!Deaf) + pline("%s very attractive music.", Tobjnam(instr, "produce")); + else + You_feel("very soothing vibrations."); charm_monsters((u.ulevel - 1) / 3 + 1); exercise(A_DEX, TRUE); break; case WOODEN_HARP: /* May calm Nymph */ do_spec &= (rn2(ACURR(A_DEX)) + u.ulevel > 25); - pline("%s %s.", Yname2(instr), - do_spec ? "produces a lilting melody" : "twangs"); + if (!Deaf) + pline("%s %s.", Yname2(instr), + do_spec ? "produces a lilting melody" : "twangs"); + else + You_feel("soothing vibrations."); if (do_spec) calm_nymphs(u.ulevel * 3); exercise(A_DEX, TRUE); @@ -613,8 +636,12 @@ struct obj *instr; break; case LEATHER_DRUM: /* Awaken monsters */ if (!mundane) { - You("beat a deafening row!"); - incr_itimeout(&HDeaf, rn1(20, 30)); + if (!Deaf) { + You("beat a deafening row!"); + incr_itimeout(&HDeaf, rn1(20, 30)); + } else { + You("pound on the drum."); + } exercise(A_WIS, FALSE); } else You("%s %s.", @@ -685,7 +712,10 @@ struct obj *instr; *s = 'B'; } } - You("extract a strange sound from %s!", the(xname(instr))); + + You(!Deaf ? "extract a strange sound from %s!" + : "can feel %s emitting vibrations.", the(xname(instr))); + #ifdef UNIX386MUSIC /* if user is at the console, play through the console speaker */ if (atconsole()) @@ -725,8 +755,8 @@ struct obj *instr; for (x = u.ux - 1; x <= u.ux + 1; x++) if (isok(x, y)) if (find_drawbridge(&x, &y)) { - u.uevent.uheard_tune = - 2; /* tune now fully known */ + /* tune now fully known */ + u.uevent.uheard_tune = 2; if (levl[x][y].typ == DRAWBRIDGE_DOWN) close_drawbridge(x, y); else @@ -759,7 +789,7 @@ struct obj *instr; if (buf[x] == tune[x]) { gears++; matched[x] = TRUE; - } else + } else { for (y = 0; y < 5; y++) if (!matched[y] && buf[x] == tune[y] && buf[y] != tune[y]) { @@ -767,8 +797,9 @@ struct obj *instr; matched[y] = TRUE; break; } + } } - if (tumblers) + if (tumblers) { if (gears) You_hear("%d tumbler%s click and %d gear%s turn.", tumblers, plur(tumblers), gears, @@ -776,7 +807,7 @@ struct obj *instr; else You_hear("%d tumbler%s click.", tumblers, plur(tumblers)); - else if (gears) { + } else if (gears) { You_hear("%d gear%s turn.", gears, plur(gears)); /* could only get `gears == 5' by playing five correct notes followed by excess; otherwise, @@ -791,7 +822,7 @@ struct obj *instr; } else return do_improvisation(instr); -nevermind: + nevermind: pline1(Never_mind); return 0; } From a5080da8980dbc51e7ea6059d87ffa651b105c2a Mon Sep 17 00:00:00 2001 From: Bart House Date: Sun, 3 Nov 2019 18:46:33 -0800 Subject: [PATCH 129/529] Dismiss the splash dialog when user hits window close. --- win/win32/mhsplash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/win/win32/mhsplash.c b/win/win32/mhsplash.c index 8dcfd1b39..dcb698450 100644 --- a/win/win32/mhsplash.c +++ b/win/win32/mhsplash.c @@ -259,6 +259,7 @@ NHSplashWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_COMMAND: switch (LOWORD(wParam)) { + case IDCANCEL: case IDOK: mswin_window_mark_dead(mswin_winid_from_handle(hWnd)); if (GetNHApp()->hMainWnd == hWnd) From 93f95dd05146e1c6c9093b42be786f1b0b5182ce Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 4 Nov 2019 00:36:54 -0500 Subject: [PATCH 130/529] more deafness-related message corrections --- doc/fixes36.3 | 1 + src/dokick.c | 13 ++++++++++--- src/shk.c | 3 ++- src/zap.c | 4 +++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 1618edd50..12490115f 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -213,6 +213,7 @@ when entering Astral level, initial rendering of guardian angel didn't show fix a leashed pet polymorphed into a long worm staying leashed prevent leashing unsolid monsters and monsters with no extremities playing musical instruments gave feedback which ignored deafness +some other deafness-related message corrections Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/dokick.c b/src/dokick.c index 528b80c28..3524a5ab5 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1197,9 +1197,16 @@ dokick() exercise(A_DEX, TRUE); return 1; } else if (!rn2(3)) { - pline("Flupp! %s.", - (Blind ? "You hear a sloshing sound" - : "Muddy waste pops up from the drain")); + if (Blind && Deaf) + Sprintf(buf, " %s", body_part(FACE)); + else + buf[0] = '\0'; + pline("%s%s%s.", !Deaf ? "Flupp! " : "", + !Blind + ? "Muddy waste pops up from the drain" + : !Deaf + ? "You hear a sloshing sound" + : "Something splashes you in the", buf); if (!(maploc->looted & S_LRING)) { /* once per sink */ if (!Blind) You_see("a ring shining in its midst."); diff --git a/src/shk.c b/src/shk.c index f111b3dcc..74957e82e 100644 --- a/src/shk.c +++ b/src/shk.c @@ -2989,8 +2989,9 @@ boolean peaceful, silent; if (canseemon(shkp)) { Norep("%s booms: \"%s, you are a thief!\"", Shknam(shkp), plname); - } else + } else if (!Deaf) { Norep("You hear a scream, \"Thief!\""); + } } hot_pursuit(shkp); (void) angry_guards(FALSE); diff --git a/src/zap.c b/src/zap.c index c8bbe34a9..8040a6c71 100644 --- a/src/zap.c +++ b/src/zap.c @@ -4441,7 +4441,9 @@ short exploding_wand_typ; if (is_ice(x, y)) { melt_ice(x, y, (char *) 0); } else if (is_pool(x, y)) { - const char *msgtxt = "You hear hissing gas."; + const char *msgtxt = (!Deaf) + ? "You hear hissing gas." + : "That seemed remarkably uneventful."; if (lev->typ != POOL) { /* MOAT or DRAWBRIDGE_UP */ if (see_it) From efbef0f22ca97fdf2e25a3ba109d90e6649efa3a Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 4 Nov 2019 18:58:22 +0200 Subject: [PATCH 131/529] Fix unleashable message given for non-leashed monster --- src/mon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mon.c b/src/mon.c index 9b734d0db..4f0a13d4a 100644 --- a/src/mon.c +++ b/src/mon.c @@ -3762,7 +3762,7 @@ boolean msg; /* "The oldmon turns into a newmon!" */ /* take on the new form... */ set_mon_data(mtmp, mdat); - if (!leashable(mtmp)) + if (mtmp->mleashed && !leashable(mtmp)) m_unleash(mtmp, TRUE); if (emits_light(olddata) != emits_light(mtmp->data)) { From fbc790a34d1176c8a4643918c1ad9ddca31b02ae Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 4 Nov 2019 09:14:18 -0800 Subject: [PATCH 132/529] dipping into holy/unholy water while blind Something I realized while following up a newsgroup post. If you knew an item's bless/curse state and dipped it into water while blind, the bknown flag stayed set and you learned the item's new bless/curse state without seeing any "glows blue/black/&c" feedback. Clear the flag unless you know that the potion being dipped into is water (or is clear if not water has not been discovered) and also know the water potion's own bless/curse state. --- doc/fixes36.3 | 5 ++++- src/potion.c | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 12490115f..c2faaf917 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.155 $ $NHDT-Date: 1572833562 2019/11/04 02:12:42 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.157 $ $NHDT-Date: 1572887643 2019/11/04 17:14:03 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -214,6 +214,9 @@ fix a leashed pet polymorphed into a long worm staying leashed prevent leashing unsolid monsters and monsters with no extremities playing musical instruments gave feedback which ignored deafness some other deafness-related message corrections +when dipping into holy/unholy water while blind (where the glow message is + suppressed), clear dipped item's bknown flag unless water potion's + bless/curse state is known Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/potion.c b/src/potion.c index 728fdc9e4..d366a1196 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 potion.c $NHDT-Date: 1570235292 2019/10/05 00:28:12 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.163 $ */ +/* NetHack 3.6 potion.c $NHDT-Date: 1572887644 2019/11/04 17:14:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.164 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1268,6 +1268,15 @@ const char *objphrase; /* "Your widget glows" or "Steed's saddle glows" */ pline("%s %s.", objphrase, glowcolor); iflags.last_msg = PLNMSG_OBJ_GLOWS; targobj->bknown = !Hallucination; + } else { + /* didn't see what happened: forget the BUC state if that was + known unless the bless/curse state of the water is known; + without this, hero would know the new state even without + seeing the glow; priest[ess] will immediately relearn it */ + if (!potion->bknown || !potion->dknown) + targobj->bknown = 0; + /* [should the bknown+dknown exception require that water + be discovered or at least named?] */ } /* potions of water are the only shop goods whose price depends on their curse/bless state */ From 25edd16945137b79d3cc8b6cb5fc34c402870749 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 4 Nov 2019 12:28:25 -0500 Subject: [PATCH 133/529] code maintenance bit to white-list current "You hear" instances Flag existing occurrences of "You hear" as "Deaf-aware" so that a grep for that string in the future doesn't need to trigger further investigation of those. --- doc/fixes36.3 | 3 +++ src/dokick.c | 2 +- src/engrave.c | 2 +- src/mcastu.c | 2 +- src/mkmaze.c | 2 +- src/music.c | 3 ++- src/pline.c | 2 +- src/shk.c | 2 +- src/trap.c | 3 ++- src/zap.c | 2 +- 10 files changed, 14 insertions(+), 9 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 12490115f..055d5ec27 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -403,5 +403,8 @@ autopickup exception priority change in pull request #226 Code Cleanup and Reorganization ------------------------------- began to add some function caller BREADCRUMBS to aid debugging +flag existing occurrences of "You hear" as "Deaf-aware" to aid in + future maintenance + diff --git a/src/dokick.c b/src/dokick.c index 3524a5ab5..d70b2e504 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1205,7 +1205,7 @@ dokick() !Blind ? "Muddy waste pops up from the drain" : !Deaf - ? "You hear a sloshing sound" + ? "You hear a sloshing sound" /* Deaf-aware */ : "Something splashes you in the", buf); if (!(maploc->looted & S_LRING)) { /* once per sink */ if (!Blind) diff --git a/src/engrave.c b/src/engrave.c index a66373324..d81144cc0 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -755,7 +755,7 @@ doengrave() } Strcpy(post_engr_text, (Blind && !Deaf) - ? "You hear drilling!" + ? "You hear drilling!" /* Deaf-aware */ : Blind ? "You feel tremors." : IS_GRAVE(levl[u.ux][u.uy].typ) diff --git a/src/mcastu.c b/src/mcastu.c index 652a6105a..1b2fb632b 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -72,7 +72,7 @@ boolean undirected; pline("%s points %s.", Monnam(mtmp), point_msg); } else if ((!(moves % 4) || !rn2(4))) { if (!Deaf) - Norep("You hear a mumbled curse."); + Norep("You hear a mumbled curse."); /* Deaf-aware */ } } diff --git a/src/mkmaze.c b/src/mkmaze.c index 999d5af9d..ed38053f2 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -1365,7 +1365,7 @@ fumaroles() } } if (snd && !Deaf) - Norep("You hear a %swhoosh!", loud ? "loud " : ""); + Norep("You hear a %swhoosh!", loud ? "loud " : ""); /* Deaf-aware */ } /* diff --git a/src/music.c b/src/music.c index c1eed4359..53baeb42e 100644 --- a/src/music.c +++ b/src/music.c @@ -188,7 +188,8 @@ struct monst *bugler; /* monster that played instrument */ if (canseemon(mtmp)) pline("%s is now ready for battle!", Monnam(mtmp)); else if (!Deaf) - Norep("You hear the rattle of battle gear being readied."); + Norep("%s the rattle of battle gear being readied.", + "You hear"); /* Deaf-aware */ } else if ((distm = ((bugler == &youmonst) ? distu(mtmp->mx, mtmp->my) : dist2(bugler->mx, bugler->my, mtmp->mx, diff --git a/src/pline.c b/src/pline.c index d7db3f43d..b1ac1dffc 100644 --- a/src/pline.c +++ b/src/pline.c @@ -367,7 +367,7 @@ VA_DECL(const char *, line) else if (Unaware) YouPrefix(tmp, "You dream that you hear ", line); else - YouPrefix(tmp, "You hear ", line); + YouPrefix(tmp, "You hear ", line); /* Deaf-aware */ vpline(strcat(tmp, line), VA_ARGS); VA_END(); } diff --git a/src/shk.c b/src/shk.c index 74957e82e..815c2e726 100644 --- a/src/shk.c +++ b/src/shk.c @@ -2990,7 +2990,7 @@ boolean peaceful, silent; Norep("%s booms: \"%s, you are a thief!\"", Shknam(shkp), plname); } else if (!Deaf) { - Norep("You hear a scream, \"Thief!\""); + Norep("You hear a scream, \"Thief!\""); /* Deaf-aware */ } } hot_pursuit(shkp); diff --git a/src/trap.c b/src/trap.c index cb025e514..071bad6dc 100644 --- a/src/trap.c +++ b/src/trap.c @@ -2637,7 +2637,8 @@ register struct monst *mtmp; a_your[trap->madeby_u]); } if (!in_sight && !Deaf) - pline("Kaablamm! You hear an explosion in the distance!"); + pline("Kaablamm! %s an explosion in the distance!", + "You hear"); /* Deaf-aware */ blow_up_landmine(trap); /* explosion might have destroyed a drawbridge; don't dish out more damage if monster is already dead */ diff --git a/src/zap.c b/src/zap.c index 8040a6c71..bc4189a47 100644 --- a/src/zap.c +++ b/src/zap.c @@ -4442,7 +4442,7 @@ short exploding_wand_typ; melt_ice(x, y, (char *) 0); } else if (is_pool(x, y)) { const char *msgtxt = (!Deaf) - ? "You hear hissing gas." + ? "You hear hissing gas." /* Deaf-aware */ : "That seemed remarkably uneventful."; if (lev->typ != POOL) { /* MOAT or DRAWBRIDGE_UP */ From 7efdec7f5e56202eeb28989d4a6ff82f5568dc88 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 4 Nov 2019 10:42:14 -0800 Subject: [PATCH 134/529] fix symset:curses S_tree Symbol set changes... curses: S_tree (use plus-or-minus sign instead of accidental horizontal line); S_bars (switch from default '#' to not-equals sign); DECgraphics: S_altar (switch from default '_' to 'pi'); S_bars (switch from 'pi' to not-equals sign); DECgraphics_2: get rid of this commented out set since its contents are now folded into DECgraphics. (The IBMgraphics one is just whitespace; delete a that precedes a .) --- dat/symbols | 31 ++++++------------------------- doc/fixes36.3 | 10 +++++++--- 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/dat/symbols b/dat/symbols index ae22419c5..06aa31f66 100644 --- a/dat/symbols +++ b/dat/symbols @@ -1,4 +1,4 @@ -# NetHack 3.6 symbols $NHDT-Date: 1571314611 2019/10/17 12:16:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.20 $ +# NetHack 3.6 symbols $NHDT-Date: 1572892906 2019/11/04 18:41:46 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.21 $ # Copyright (c) 2006 by Michael Allison # NetHack may be freely redistributed. See license for details. # @@ -340,7 +340,7 @@ start: IBMgraphics S_pool: \xf7 # meta-w, approx. equals S_ice: \xfa # meta-z, centered dot S_lava: \xf7 # meta-w, approx. equals - S_vodbridge: \xfa # meta-z, centered dot + S_vodbridge: \xfa # meta-z, centered dot S_hodbridge: \xfa # meta-z, centered dot S_water: \xf7 # meta-w, approx. equals S_vbeam: \xb3 # meta-3, vertical rule @@ -548,7 +548,8 @@ start: curses S_tlwall: \xf5 # meta-u, T left S_trwall: \xf4 # meta-t, T right S_ndoor: \xfe # meta-z, centered dot - S_tree: \xf1 # plus or minus symbol + S_bars: \xfc # meta-|, not-equals sign (was '#') + S_tree: \xe7 # meta-g, plus or minus sign S_room: \xfe # meta-z, centered dot S_corr: \xe1 # meta-a, solid block S_litcorr: \xe1 # meta-a, solid block @@ -581,11 +582,12 @@ start: DECgraphics S_ndoor: \xfe # meta-~, centered dot S_vodoor: \xe1 # meta-a, solid block S_hodoor: \xe1 # meta-a, solid block - S_bars: \xfb # meta-{, small pi + S_bars: \xfc # meta-|, not-equals (used to be pi) S_tree: \xe7 # meta-g, plus-or-minus S_room: \xfe # meta-~, centered dot S_upladder: \xf9 # meta-y, less-than-or-equals S_dnladder: \xfa # meta-z, greater-than-or-equals + S_altar: \xfb # meta-{, pi (used to default to '_') S_pool: \xe0 # meta-\, diamond S_ice: \xfe # meta-~, centered dot S_lava: \xe0 # meta-\, diamond @@ -604,27 +606,6 @@ start: DECgraphics S_explode8: \xf3 # meta-s, low horizontal line finish -# -# This is commented out because specifying alternate default set isn't -# implemented. -# -# DECgraphics_2: underscore (default for altar) can be hard to see if -# hero or highlighted pet is on the spot below (south of) it, making -# it look like part of slightly bigger block cursor. Bars are usually -# within walls and we have something else for doorless doorway so '#' -# for bars shouldn't be mistaken for the corridor symbol even by someone -# used to DECgraphics, at least not often enough to pose a problem. -# The pi symbol is small like lowercase but flat-topped like uppercase -# so could represent a side view of a raised platform or table. -# -# start: DECgraphics_2 -# Defaults: DECgraphics # includes 'Handling: DEC' -# Description: variation of DECgraphics (iron bars:#, altar:pi) -# S_bars: '#' # (switch from pi to plain '#') -# S_altar: \xfb # meta-{, pi (switch from underscore) -# finish -# - start: MACgraphics # Description: (pre-OSX: obsolete?) # Restrictions: primary diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 4a144a25e..5c88d0381 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.157 $ $NHDT-Date: 1572887643 2019/11/04 17:14:03 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.159 $ $NHDT-Date: 1572892926 2019/11/04 18:42:06 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -240,6 +240,8 @@ surviving death while polymorphed would yield "You are a " without 'mksobj failure' commit resulted in wrong corpse types for dying monsters a recent intended sanity check fix inadvertently bypassed placing a thrown chained ball back onto the floor +in symset:curses, symbol S_tree was accidentally set to horizontal line where + plus-or-minus sign was meant; also, change S_bars to not-equals sign curses: sometimes the message window would show a blank line after a prompt curses: the change to show map in columns 1..79 instead of 2..80 made the highlight for '@' show up in the wrong place if clipped map had been @@ -391,9 +393,11 @@ curses+'perm_invent': since persistent inventory is narrow, strip off "a", curses+'curses': change the curses map display to use new symbol set 'curses' instead of hard-coded values; it attempts to show IBMgraphics-style map using DECgraphics characters; DECgraphics can also be used as-is -fulfill a request from a blind player to have a unique overriding SYMBOL for pets - and for the player +fulfill a request from a blind player to have a unique overriding SYMBOL for + pets and for the player ROGUESYMBOLS can be overridden in config files like SYMBOLS can +in symset:DECgraphics, set S_altar to 'pi' (was default '_'), S_bars to + not-equals sign (was 'pi') NetHack Community Patches (or Variation) Included From a778cf3e06c7b76b275439ece927d22cb9e0acee Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Mon, 4 Nov 2019 20:28:59 -0500 Subject: [PATCH 135/529] This is cron-daily v1-Oct-31-2019. files updated: Files --- Files | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Files b/Files index a2e10eb35..dc18600ed 100644 --- a/Files +++ b/Files @@ -273,12 +273,14 @@ stat.h sys/winnt: (files for Windows 7/8.x/10 version) -Install.nt Makefile.gcc Makefile.msc console.rc -.nethackrc.template nethack.def nh340key.c nhdefkey.c -nhico.uu nhraykey.c nhsetup.bat ntsound.c -nttty.c porthelp stub-pdcscrn.c stubs.c -sysconf.template win10.c win10.h win32api.h -windmain.c winnt.c winos.h +.nethackrc.template Install.nt Makefile.gcc +Makefile.msc console.rc nethack.def +nh340key.c nhdefkey.c nhico.uu +nhraykey.c nhsetup.bat ntsound.c +nttty.c porthelp stub-pdcscrn.c +stubs.c sysconf.template win10.c +win10.h win32api.h windmain.c +winnt.c winos.h util: (files for all versions) From 59c6425f4c44d8b09afec529d15556f2c2333530 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Mon, 4 Nov 2019 22:26:47 -0500 Subject: [PATCH 136/529] Deal with FreeDOS bugs when building pdcurses.a --- sys/msdos/Makefile.GCC | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index e6a039abc..4693bda37 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -332,13 +332,17 @@ PDCURSES_CURSPRIV_H = $(PDCURSES_TOP)/curspriv.h PDCURSES_HEADERS = $(PDCURSES_CURSES_H) $(PDCURSES_CURSPRIV_H) PDCSRC = $(PDCURSES_TOP)/pdcurses PDCDOS = $(PDCURSES_TOP)/dos -PDCLIBOBJS = $(O)addch.o $(O)addchstr.o $(O)addstr.o $(O)attr.o $(O)beep.o \ +PDCLIBOBJS1 = $(O)addch.o $(O)addchstr.o $(O)addstr.o $(O)attr.o $(O)beep.o \ $(O)bkgd.o $(O)border.o $(O)clear.o $(O)color.o $(O)delch.o $(O)deleteln.o \ - $(O)getch.o $(O)getstr.o $(O)getyx.o $(O)inch.o $(O)inchstr.o \ - $(O)initscr.o $(O)inopts.o $(O)insch.o $(O)insstr.o $(O)instr.o $(O)kernel.o \ - $(O)keyname.o $(O)mouse.o $(O)move.o $(O)outopts.o $(O)overlay.o $(O)pad.o \ - $(O)panel.o $(O)printw.o $(O)refresh.o $(O)scanw.o $(O)scr_dump.o $(O)scroll.o \ - $(O)slk.o $(O)termattr.o $(O)touch.o $(O)util.o $(O)window.o $(O)debug.o + $(O)getch.o +PDCLIBOBJS2 = $(O)getstr.o $(O)getyx.o $(O)inch.o $(O)inchstr.o $(O)initscr.o \ + $(O)inopts.o $(O)insch.o $(O)insstr.o $(O)instr.o $(O)kernel.o \ + $(O)keyname.o $(O)mouse.o +PDCLIBOBJS3 = $(O)move.o $(O)outopts.o $(O)overlay.o $(O)pad.o $(O)panel.o \ + $(O)printw.o $(O)refresh.o $(O)scanw.o $(O)scr_dump.o $(O)scroll.o \ + $(O)slk.o $(O)termattr.o +PDCLIBOBJS4 = $(O)touch.o $(O)util.o $(O)window.o $(O)debug.o +PDCLIBOBJS = $(PDCLIBOBJS1) $(PDCLIBOBJS2) $(PDCLIBOBJS3) $(PDCLIBOBJS4) PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o \ $(O)pdcscrn.o $(O)pdcsetsc.o $(O)pdcutil.o @@ -944,7 +948,11 @@ endif #========================================== $(O)pdcurses.a : $(PDCLIBOBJS) $(PDCOBJS) - ar rcs $@ $(PDCLIBOBJS) $(PDCOBJS) + ar rcS $@ $(PDCLIBOBJS1) + ar rcS $@ $(PDCLIBOBJS2) + ar rcS $@ $(PDCLIBOBJS3) + ar rcS $@ $(PDCLIBOBJS4) + ar rcs $@ $(PDCOBJS) #========================================== # Other Util Dependencies. From d4ff00cd4012dbb7e53afb6acdb3da95ba51aa12 Mon Sep 17 00:00:00 2001 From: Bart House Date: Mon, 4 Nov 2019 19:34:03 -0800 Subject: [PATCH 137/529] Updated windows directory paths to latest iteration of design. --- sys/winnt/windmain.c | 65 +++++++++----------------------------------- 1 file changed, 13 insertions(+), 52 deletions(-) diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index d226b26f1..16f62267a 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -149,44 +149,6 @@ folder_file_exists(const char * folder, const char * file_name) return file_exists(path); } -/* - * Rules for setting prefix locations - * - * COMMON_NETHACK_PATH = %COMMONPROGRAMFILES%\NetHack\3.6\ - * PROFILE_PATH = %SystemDrive%\Users\%USERNAME%\ - * - * NETHACK_PROFILE_PATH = PROFILE_PATH\NetHack\3.6\ - * NETHACK_PER_USER_DATA_PATH = PROFILE_PATH\AppData\Local\NetHack\3.6\ - * NETHACK_GLOBAL_DATA_PATH = %SystemDrive%\ProgramData\NetHack\3.6\ - * EXECUTABLE_PATH = path to where .exe lives - * - * HACKPREFIX: - * - use environment variable NETHACKDIR if variable is defined - * - otherwise use environment variable HACKDIR if variable is defined - * - otherwise if store install use NETHACK_PROFILE_PATH - * - otherwise if manual install use EXECUTABLE_PATH - * - * LEVELPREFIX, SAVEPREFIX: - * - if store install use NETHACK_PER_USER_DATA_PATH - * - if manual install use HACKPREFIX - * - * BONESPREFIX, SCOREPREFIX, LOCKPREFIX: - * - if store install use NETHACK_GLOBAL_DATA_PATH - * - if manual install use HACKPREFIX - * - * DATAPREFIX - * - if store install use EXECUTABLE_PATH - * - if manual install use HACKPREFIX - * - * SYSCONFPREFIX - * - use COMMON_NETHACK_PATH if sysconf present - * - otherwise use HACKPREFIX - * - * CONFIGPREFIX - * - if manual install use PROFILE_PATH - * - if store install use NETHACK_PROFILE_PATH - */ - void set_default_prefix_locations(const char *programPath) { @@ -214,16 +176,16 @@ set_default_prefix_locations(const char *programPath) build_known_folder_path(&FOLDERID_ProgramData, versioned_global_data_path, sizeof(versioned_global_data_path), TRUE); - fqn_prefix[LEVELPREFIX] = versioned_user_data_path; - fqn_prefix[SAVEPREFIX] = versioned_user_data_path; - fqn_prefix[BONESPREFIX] = versioned_global_data_path; - fqn_prefix[DATAPREFIX] = executable_path; - fqn_prefix[SCOREPREFIX] = versioned_global_data_path; - fqn_prefix[LOCKPREFIX] = versioned_global_data_path; + fqn_prefix[SYSCONFPREFIX] = versioned_global_data_path; fqn_prefix[CONFIGPREFIX] = profile_path; fqn_prefix[HACKPREFIX] = versioned_profile_path; + fqn_prefix[SAVEPREFIX] = versioned_user_data_path; + fqn_prefix[LEVELPREFIX] = versioned_user_data_path; + fqn_prefix[BONESPREFIX] = versioned_global_data_path; + fqn_prefix[SCOREPREFIX] = versioned_global_data_path; + fqn_prefix[LOCKPREFIX] = versioned_global_data_path; fqn_prefix[TROUBLEPREFIX] = versioned_profile_path; - fqn_prefix[SYSCONFPREFIX] = versioned_global_data_path; + fqn_prefix[DATAPREFIX] = executable_path; } @@ -297,9 +259,15 @@ void copy_sysconf_content() update_file(fqn_prefix[SYSCONFPREFIX], SYSCF_TEMPLATE, fqn_prefix[DATAPREFIX], SYSCF_TEMPLATE, FALSE); + update_file(fqn_prefix[SYSCONFPREFIX], SYMBOLS_TEMPLATE, + fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, FALSE); + /* If the required early game file does not exist, copy it */ copy_file(fqn_prefix[SYSCONFPREFIX], SYSCF_FILE, fqn_prefix[DATAPREFIX], SYSCF_TEMPLATE); + + update_file(fqn_prefix[SYSCONFPREFIX], SYMBOLS, + fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, TRUE); } void copy_config_content() @@ -311,17 +279,10 @@ void copy_config_content() update_file(fqn_prefix[CONFIGPREFIX], CONFIG_TEMPLATE, fqn_prefix[DATAPREFIX], CONFIG_TEMPLATE, FALSE); - update_file(fqn_prefix[CONFIGPREFIX], SYMBOLS_TEMPLATE, - fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, FALSE); - /* If the required early game file does not exist, copy it */ /* NOTE: We never replace .nethackrc or sysconf */ copy_file(fqn_prefix[CONFIGPREFIX], CONFIG_FILE, fqn_prefix[DATAPREFIX], CONFIG_TEMPLATE); - - update_file(fqn_prefix[CONFIGPREFIX], SYMBOLS, - fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, TRUE); - } void From 86aa5634a79b2fbe0295687ed737c4d912ee9b80 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 4 Nov 2019 22:50:04 -0500 Subject: [PATCH 138/529] chasonr's msdos Makefile.gcc pdcurses build changes # Please enter the commit message for your changes. Lines starting closes #243 --- doc/fixes36.3 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 5c88d0381..5443c831e 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -404,6 +404,7 @@ NetHack Community Patches (or Variation) Included ------------------------------------------------- add a couple of engraving suggestions in pull request #79 chasonr's faster method to write characters to msdos VGA in pull request #220 +chasonr's msdos Makefile.gcc pdcurses build changes in pull request #243 autopickup exception priority change in pull request #226 From 26121fca9a6fb5e80e768e541bbfdc783954255f Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 4 Nov 2019 23:08:15 -0500 Subject: [PATCH 139/529] deafness left "Perhaps that why you cannot move it" message orphaned --- src/hack.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/hack.c b/src/hack.c index 7bae18567..e615385d0 100644 --- a/src/hack.c +++ b/src/hack.c @@ -153,17 +153,35 @@ moverock() if (mtmp && !noncorporeal(mtmp->data) && (!mtmp->mtrapped || !(ttmp && is_pit(ttmp->ttyp)))) { + boolean deliver_part1 = FALSE; + if (Blind) feel_location(sx, sy); if (canspotmon(mtmp)) { pline("There's %s on the other side.", a_monnam(mtmp)); + deliver_part1 = TRUE; } else { You_hear("a monster behind %s.", the(xname(otmp))); + if (!Deaf) + deliver_part1 = TRUE; map_invisible(rx, ry); } - if (flags.verbose) - pline("Perhaps that's why %s cannot move it.", - u.usteed ? y_monnam(u.usteed) : "you"); + if (flags.verbose) { + char you_or_steed[BUFSZ]; + + Strcpy(you_or_steed, + u.usteed ? y_monnam(u.usteed) : "you"); + pline("%s%s cannot move %s.", + deliver_part1 + ? "Perhaps that's why " + : "", + deliver_part1 + ? you_or_steed + : upstart(you_or_steed), + deliver_part1 + ? "it" + : the(xname(otmp))); + } goto cannot_push; } From e8c5da768e16d0a464eb7a387c8eff2ea0281857 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 5 Nov 2019 09:18:25 -0500 Subject: [PATCH 140/529] updated Guidebook.txt --- doc/Guidebook.txt | 2566 +++++++++++++++++++++++---------------------- 1 file changed, 1316 insertions(+), 1250 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index e5c6deb2a..595c02aae 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -91,32 +91,32 @@ them to move quickly and sneak up on the local nasties. They start equipped with the tools for a proper scientific expedition. - Barbarians are warriors out of the hinterland, hardened to + Barbarians are warriors out of the hinterland, hardened to battle. They begin their quests with naught but uncommon strength, a trusty hauberk, and a great two-handed sword. - Cavemen and Cavewomen start with exceptional strength but, + Cavemen and Cavewomen start with exceptional strength but, unfortunately, with neolithic weapons. - Healers are wise in medicine and apothecary. They know the - herbs and simples that can restore vitality, ease pain, anes- + Healers are wise in medicine and apothecary. They know the + herbs and simples that can restore vitality, ease pain, anes- thetize, and neutralize poisons; and with their instruments, they - can divine a being's state of health or sickness. Their medical + can divine a being's state of health or sickness. Their medical practice earns them quite reasonable amounts of money, with which they enter the dungeon. - Knights are distinguished from the common skirmisher by - their devotion to the ideals of chivalry and by the surpassing + Knights are distinguished from the common skirmisher by + their devotion to the ideals of chivalry and by the surpassing excellence of their armor. Monks are ascetics, who by rigorous practice of physical and mental disciplines have become capable of fighting as effectively - without weapons as with. They wear no armor but make up for it + without weapons as with. They wear no armor but make up for it with increased mobility. - Priests and Priestesses are clerics militant, crusaders ad- - vancing the cause of righteousness with arms, armor, and arts - thaumaturgic. Their ability to commune with deities via prayer + Priests and Priestesses are clerics militant, crusaders ad- + vancing the cause of righteousness with arms, armor, and arts + thaumaturgic. Their ability to commune with deities via prayer occasionally extricates them from peril, but can also put them in it. @@ -126,7 +126,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -136,63 +136,63 @@ - Rogues are agile and stealthy thieves, with knowledge of - locks, traps, and poisons. Their advantage lies in surprise, + Rogues are agile and stealthy thieves, with knowledge of + locks, traps, and poisons. Their advantage lies in surprise, which they employ to great advantage. - Samurai are the elite warriors of feudal Nippon. They are - lightly armored and quick, and wear the dai-sho, two swords of + Samurai are the elite warriors of feudal Nippon. They are + lightly armored and quick, and wear the dai-sho, two swords of the deadliest keenness. - Tourists start out with lots of gold (suitable for shopping - with), a credit card, lots of food, some maps, and an expensive + Tourists start out with lots of gold (suitable for shopping + with), a credit card, lots of food, some maps, and an expensive camera. Most monsters don't like being photographed. - Valkyries are hardy warrior women. Their upbringing in the - harsh Northlands makes them strong, inures them to extremes of + Valkyries are hardy warrior women. Their upbringing in the + harsh Northlands makes them strong, inures them to extremes of cold, and instills in them stealth and cunning. - Wizards start out with a knowledge of magic, a selection of - magical items, and a particular affinity for dweomercraft. Al- + Wizards start out with a knowledge of magic, a selection of + magical items, and a particular affinity for dweomercraft. Al- though seemingly weak and easy to overcome at first sight, an ex- perienced Wizard is a deadly foe. - You may also choose the race of your character (within lim- + You may also choose the race of your character (within lim- its; most roles have restrictions on which races are eligible for them): Dwarves are smaller than humans or elves, but are stocky and - solid individuals. Dwarves' most notable trait is their great - expertise in mining and metalwork. Dwarvish armor is said to be + solid individuals. Dwarves' most notable trait is their great + expertise in mining and metalwork. Dwarvish armor is said to be second in quality not even to the mithril armor of the Elves. - Elves are agile, quick, and perceptive; very little of what - goes on will escape an Elf. The quality of Elven craftsmanship + Elves are agile, quick, and perceptive; very little of what + goes on will escape an Elf. The quality of Elven craftsmanship often gives them an advantage in arms and armor. - Gnomes are smaller than but generally similar to dwarves. - Gnomes are known to be expert miners, and it is known that a se- - cret underground mine complex built by this race exists within + Gnomes are smaller than but generally similar to dwarves. + Gnomes are known to be expert miners, and it is known that a se- + cret underground mine complex built by this race exists within the Mazes of Menace, filled with both riches and danger. Humans are by far the most common race of the surface world, - and are thus the norm to which other races are often compared. - Although they have no special abilities, they can succeed in any + and are thus the norm to which other races are often compared. + Although they have no special abilities, they can succeed in any role. - Orcs are a cruel and barbaric race that hate every living - thing (including other orcs). Above all others, Orcs hate Elves - with a passion unequalled, and will go out of their way to kill - one at any opportunity. The armor and weapons fashioned by the + Orcs are a cruel and barbaric race that hate every living + thing (including other orcs). Above all others, Orcs hate Elves + with a passion unequalled, and will go out of their way to kill + one at any opportunity. The armor and weapons fashioned by the Orcs are typically of inferior quality. 3. What do all those things on the screen mean? - On the screen is kept a map of where you have been and what - you have seen on the current dungeon level; as you explore more + On the screen is kept a map of where you have been and what + you have seen on the current dungeon level; as you explore more - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -204,47 +204,47 @@ of the level, it appears on the screen in front of you. - When NetHack's ancestor rogue first appeared, its screen - orientation was almost unique among computer fantasy games. - Since then, screen orientation has become the norm rather than - the exception; NetHack continues this fine tradition. Unlike - text adventure games that accept commands in pseudo-English sen- + When NetHack's ancestor rogue first appeared, its screen + orientation was almost unique among computer fantasy games. + Since then, screen orientation has become the norm rather than + the exception; NetHack continues this fine tradition. Unlike + text adventure games that accept commands in pseudo-English sen- tences and explain the results in words, NetHack commands are all - one or two keystrokes and the results are displayed graphically - on the screen. A minimum screen size of 24 lines by 80 columns - is recommended; if the screen is larger, only a 21x80 section + one or two keystrokes and the results are displayed graphically + on the screen. A minimum screen size of 24 lines by 80 columns + is recommended; if the screen is larger, only a 21x80 section will be used for the map. NetHack can even be played by blind players, with the assis- - tance of Braille readers or speech synthesisers. Instructions - for configuring NetHack for the blind are included later in this + tance of Braille readers or speech synthesisers. Instructions + for configuring NetHack for the blind are included later in this document. NetHack generates a new dungeon every time you play it; even - the authors still find it an entertaining and exciting game de- + the authors still find it an entertaining and exciting game de- spite having won several times. - NetHack offers a variety of display options. The options - available to you will vary from port to port, depending on the - capabilities of your hardware and software, and whether various + NetHack offers a variety of display options. The options + available to you will vary from port to port, depending on the + capabilities of your hardware and software, and whether various compile-time options were enabled when your executable was creat- ed. The three possible display options are: a monochrome charac- - ter interface, a color character interface, and a graphical in- + ter interface, a color character interface, and a graphical in- terface using small pictures called tiles. The two character in- terfaces allow fonts with other characters to be substituted, but - the default assignments use standard ASCII characters to repre- + the default assignments use standard ASCII characters to repre- sent everything. There is no difference between the various dis- play options with respect to game play. Because we cannot repro- duce the tiles or colors in the Guidebook, and because it is com- - mon to all ports, we will use the default ASCII characters from - the monochrome character display when referring to things you + mon to all ports, we will use the default ASCII characters from + the monochrome character display when referring to things you might see on the screen during your game. - In order to understand what is going on in NetHack, first - you must understand what NetHack is doing with the screen. The - NetHack screen replaces the "You see ..." descriptions of text - adventure games. Figure 1 is a sample of what a NetHack screen - might look like. The way the screen looks for you depends on + In order to understand what is going on in NetHack, first + you must understand what NetHack is doing with the screen. The + NetHack screen replaces the "You see ..." descriptions of text + adventure games. Figure 1 is a sample of what a NetHack screen + might look like. The way the screen looks for you depends on your platform. @@ -258,7 +258,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -286,9 +286,9 @@ 3.1. The status lines (bottom) - The bottom two lines of the screen contain several cryptic - pieces of information describing your current status. If either - status line becomes longer than the width of the screen, you + The bottom two lines of the screen contain several cryptic + pieces of information describing your current status. If either + status line becomes longer than the width of the screen, you might not see all of it. Here are explanations of what the vari- ous status items mean (though your configuration may not have all the status items listed below): @@ -298,33 +298,33 @@ experience level, see below). Strength - A measure of your character's strength; one of your six ba- - sic attributes. A human character's attributes can range - from 3 to 18 inclusive; non-humans may exceed these limits + A measure of your character's strength; one of your six ba- + sic attributes. A human character's attributes can range + from 3 to 18 inclusive; non-humans may exceed these limits (occasionally you may get super-strengths of the form 18/xx, - and magic can also cause attributes to exceed the normal - limits). The higher your strength, the stronger you are. + and magic can also cause attributes to exceed the normal + limits). The higher your strength, the stronger you are. Strength affects how successfully you perform physical - tasks, how much damage you do in combat, and how much loot + tasks, how much damage you do in combat, and how much loot you can carry. Dexterity - Dexterity affects your chances to hit in combat, to avoid - traps, and do other tasks requiring agility or manipulation + Dexterity affects your chances to hit in combat, to avoid + traps, and do other tasks requiring agility or manipulation of objects. Constitution - Constitution affects your ability to recover from injuries - and other strains on your stamina. When strength is low or - modest, constitution also affects how much you can carry. - With sufficiently high strength, the contribution to carry- + Constitution affects your ability to recover from injuries + and other strains on your stamina. When strength is low or + modest, constitution also affects how much you can carry. + With sufficiently high strength, the contribution to carry- ing capacity from your constitution no longer matters. Intelligence - Intelligence affects your ability to cast spells and read + Intelligence affects your ability to cast spells and read - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -342,7 +342,7 @@ Charisma Charisma affects how certain creatures react toward you. In - particular, it can affect the prices shopkeepers offer you. + particular, it can affect the prices shopkeepers offer you. Alignment Lawful, Neutral, or Chaotic. Often, Lawful is taken as good @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -456,7 +456,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -533,62 +533,62 @@ I This marks the last known location of an invisible or other- - wise unseen monster. Note that the monster could have + wise unseen monster. Note that the monster could have moved. The `F' and `m' commands may be useful here. - You need not memorize all these symbols; you can ask the - game what any symbol represents with the `/' command (see the + You need not memorize all these symbols; you can ask the + game what any symbol represents with the `/' command (see the next section for more info). 4. Commands Commands can be initiated by typing one or two characters to - which the command is bound to, or typing the command name in the - extended commands entry. Some commands, like "search", do not + which the command is bound to, or typing the command name in the + extended commands entry. Some commands, like "search", do not require that any more information be collected by NetHack. Other - commands might require additional information, for example a di- - rection, or an object to be used. For those commands that re- - quire additional information, NetHack will present you with ei- - ther a menu of choices or with a command line prompt requesting + commands might require additional information, for example a di- + rection, or an object to be used. For those commands that re- + quire additional information, NetHack will present you with ei- + ther a menu of choices or with a command line prompt requesting information. Which you are presented with will depend chiefly on how you have set the menustyle option. - For example, a common question, in the form "What do you - want to use? [a-zA-Z ?*]", asks you to choose an object you are - carrying. Here, "a-zA-Z" are the inventory letters of your pos- - sible choices. Typing `?' gives you an inventory list of these - items, so you can see what each letter refers to. In this exam- + For example, a common question, in the form "What do you + want to use? [a-zA-Z ?*]", asks you to choose an object you are + carrying. Here, "a-zA-Z" are the inventory letters of your pos- + sible choices. Typing `?' gives you an inventory list of these + items, so you can see what each letter refers to. In this exam- ple, there is also a `*' indicating that you may choose an object not on the list, if you wanted to use something unexpected. Typ- - ing a `*' lists your entire inventory, so you can see the inven- - tory letters of every object you're carrying. Finally, if you + ing a `*' lists your entire inventory, so you can see the inven- + tory letters of every object you're carrying. Finally, if you change your mind and decide you don't want to do this command af- ter all, you can press the ESC key to abort the command. - You can put a number before some commands to repeat them - that many times; for example, "10s" will search ten times. If + You can put a number before some commands to repeat them + that many times; for example, "10s" will search ten times. If you have the number_pad option set, you must type `n' to prefix a - count, so the example above would be typed "n10s" instead. Com- - mands for which counts make no sense ignore them. In addition, - movement commands can be prefixed for greater control (see be- + count, so the example above would be typed "n10s" instead. Com- + mands for which counts make no sense ignore them. In addition, + movement commands can be prefixed for greater control (see be- low). To cancel a count or a prefix, press the ESC key. - The list of commands is rather long, but it can be read at - any time during the game through the `?' command, which accesses - a menu of helpful texts. Here are the default key bindings for + The list of commands is rather long, but it can be read at + any time during the game through the `?' command, which accesses + a menu of helpful texts. Here are the default key bindings for your reference: ? Help menu: display one of several help texts available. / The "whatis" command, to tell what a symbol represents. You may choose to specify a location or type a symbol (or even a - whole word) to explain. Specifying a location is done by - moving the cursor to a particular spot on the map and then + whole word) to explain. Specifying a location is done by + moving the cursor to a particular spot on the map and then pressing one of `.', `,', `;', or `:'. `.' will explain the symbol at the chosen location, conditionally check for "More - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -598,43 +598,43 @@ - info?" depending upon whether the help option is on, and - then you will be asked to pick another location; `,' will + info?" depending upon whether the help option is on, and + then you will be asked to pick another location; `,' will explain the symbol but skip any additional information, then let you pick another location; `;' will skip additional info and also not bother asking you to choose another location to examine; `:' will show additional info, if any, without ask- ing for confirmation. When picking a location, pressing the - ESC key will terminate this command, or pressing `?' will + ESC key will terminate this command, or pressing `?' will give a brief reminder about how it works. - If the autodescribe option is on, a short description of - what you see at each location is shown as you move the cur- - sor. Typing `#' while picking a location will toggle that - option on or off. The whatis_coord option controls whether + If the autodescribe option is on, a short description of + what you see at each location is shown as you move the cur- + sor. Typing `#' while picking a location will toggle that + option on or off. The whatis_coord option controls whether the short description includes map coordinates. - Specifying a name rather than a location always gives any + Specifying a name rather than a location always gives any additional information available about that name. - You may also request a description of nearby monsters, all - monsters currently displayed, nearby objects, or all ob- + You may also request a description of nearby monsters, all + monsters currently displayed, nearby objects, or all ob- jects. The whatis_coord option controls which format of map coordinate is included with their descriptions. & Tell what a command does. - < Go up to the previous level (if you are on a staircase or + < Go up to the previous level (if you are on a staircase or ladder). > Go down to the next level (if you are on a staircase or lad- der). [yuhjklbn] - Go one step in the direction indicated (see Figure 2). If - you sense or remember a monster there, you will fight the - monster instead. Only these one-step movement commands - cause you to fight monsters; the others (below) are "safe." + Go one step in the direction indicated (see Figure 2). If + you sense or remember a monster there, you will fight the + monster instead. Only these one-step movement commands + cause you to fight monsters; the others (below) are "safe." y k u 7 8 9 \ | / \ | / @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -720,7 +720,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -786,7 +786,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -822,7 +822,7 @@ i List your inventory (everything you're carrying). I List selected parts of your inventory, usually be specifying - the character for a particular set of objects, like `[' for + the character for a particular set of objects, like `[' for armor or `!' for potions. I* - list all gems in inventory; @@ -838,12 +838,12 @@ O Set options. - A menu showing the current option values will be displayed. - You can change most values simply by selecting the menu en- + A menu showing the current option values will be displayed. + You can change most values simply by selecting the menu en- try for the given option (ie, by typing its letter or click- - ing upon it, depending on your user interface). For the - non-boolean choices, a further menu or prompt will appear - once you've closed this menu. The available options are + ing upon it, depending on your user interface). For the + non-boolean choices, a further menu or prompt will appear + once you've closed this menu. The available options are listed later in this Guidebook. Options are usually set be- fore the game rather than with the `O' command; see the sec- tion on options below. @@ -852,7 +852,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -862,10 +862,10 @@ - Shortcut for "#overview": list interesting dungeon levels + Shortcut for "#overview": list interesting dungeon levels visited. - (Prior to 3.6.0, `^O' was a debug mode command which listed + (Prior to 3.6.0, `^O' was a debug mode command which listed the placement of all special levels. Use "#wizwhere" to run that command.) @@ -874,15 +874,15 @@ P Put on an accessory (ring, amulet, or blindfold). This command may also be used to wear armor. The prompt for - which inventory item to use will only list accessories, but - choosing an unlisted item of armor will attempt to wear it. + which inventory item to use will only list accessories, but + choosing an unlisted item of armor will attempt to wear it. (See the `W' command below. It lists armor as the inventory choices but will accept an accessory and attempt to put that on.) ^P Repeat previous message. - Subsequent `^P's repeat earlier messages. For some inter- + Subsequent `^P's repeat earlier messages. For some inter- faces, the behavior can be varied via the msg_window option. q Quaff (drink) something (potion, water, etc). @@ -918,7 +918,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -959,19 +959,19 @@ T Take off armor. - If you're wearing more than one piece, you'll be prompted - for which one to take off. (Note that this treats a cloak - covering a suit and/or a shirt, or a suit covering a shirt, + If you're wearing more than one piece, you'll be prompted + for which one to take off. (Note that this treats a cloak + covering a suit and/or a shirt, or a suit covering a shirt, as if the underlying items weren't there.) When you're only - wearing one, then by default it will be taken off without - asking, but you can set the paranoid_confirmation option to + wearing one, then by default it will be taken off without + asking, but you can set the paranoid_confirmation option to require a prompt. - This command may also be used to remove accessories. The - prompt for which inventory item to take off only lists worn - armor, but a worn accessory can be chosen. (See the `R' + This command may also be used to remove accessories. The + prompt for which inventory item to take off only lists worn + armor, but a worn accessory can be chosen. (See the `R' command above. It lists accessories as the inventory choic- - es but will accept an item of armor and attempt to take it + es but will accept an item of armor and attempt to take it off.) ^T Teleport, if you have the ability. @@ -984,7 +984,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -996,44 +996,44 @@ w- - wield nothing, use your bare (or gloved) hands. - Some characters can wield two weapons at once; use the `X' + Some characters can wield two weapons at once; use the `X' command (or the "#twoweapon" extended command) to do so. W Wear armor. - This command may also be used to put on an accessory (ring, - amulet, or blindfold). The prompt for which inventory item + This command may also be used to put on an accessory (ring, + amulet, or blindfold). The prompt for which inventory item to use will only list armor, but choosing an unlisted acces- sory will attempt to put it on. (See the `P' command above. - It lists accessories as the inventory choices but will ac- + It lists accessories as the inventory choices but will ac- cept an item of armor and attempt to wear it.) x Exchange your wielded weapon with the item in your alternate weapon slot. The latter is used as your secondary weapon when engaging in - two-weapon combat. Note that if one of these slots is emp- + two-weapon combat. Note that if one of these slots is emp- ty, the exchange still takes place. X Toggle two-weapon combat, if your character can do it. Also available via the "#twoweapon" extended command. - (In versions prior to 3.6 this was the command to switch + (In versions prior to 3.6 this was the command to switch from normal play to "explore mode", also known as "discovery mode", which has now been moved to "#exploremode".) ^X Display basic information about your character. - Displays name, role, race, gender (unless role name makes - that redundant, such as Caveman or Priestess), and align- - ment, along with your patron deity and his or her opposi- - tion. It also shows most of the various items of informa- + Displays name, role, race, gender (unless role name makes + that redundant, such as Caveman or Priestess), and align- + ment, along with your patron deity and his or her opposi- + tion. It also shows most of the various items of informa- tion from the status line(s) in a less terse form, including - several additional things which don't appear in the normal + several additional things which don't appear in the normal status display due to space considerations. - In normal play, that's all that `^X' displays. In explore - mode, the role and status feedback is augmented by the in- + In normal play, that's all that `^X' displays. In explore + mode, the role and status feedback is augmented by the in- formation provided by enlightenment magic. z Zap a wand. @@ -1050,7 +1050,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1116,7 +1116,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1248,7 +1248,7 @@ paranoid_confirmation:quit option to require a response of - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1314,7 +1314,7 @@ Show mobile light sources. Autocompletes. Debug mode only. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1328,27 +1328,27 @@ Look at what is here, under you. Default key is `:'. #loot - Loot a box or bag on the floor beneath you, or the saddle - from a steed standing next to you. Autocompletes. Precede - with the `m' prefix to skip containers at your location and + Loot a box or bag on the floor beneath you, or the saddle + from a steed standing next to you. Autocompletes. Precede + with the `m' prefix to skip containers at your location and go directly to removing a saddle. Default key is `M-l', and also `l' if number_pad is on. #monster - Use a monster's special ability (when polymorphed into mon- + Use a monster's special ability (when polymorphed into mon- ster form). Autocompletes. Default key is `M-m'. #name - Name a monster, an individual object, or a type of object. - Same as "#call". Autocompletes. Default keys are `N', `M- + Name a monster, an individual object, or a type of object. + Same as "#call". Autocompletes. Default keys are `N', `M- n', and `M-N'. #offer - Offer a sacrifice to the gods. Autocompletes. Default key + Offer a sacrifice to the gods. Autocompletes. Default key is `M-o'. - You'll need to find an altar to have any chance at success. - Corpses of recently killed monsters are the fodder of + You'll need to find an altar to have any chance at success. + Corpses of recently killed monsters are the fodder of choice. The `m' prefix skips offering any items which are on the al- @@ -1361,26 +1361,26 @@ Show and change option settings. Default key is `O'. #overview - Display information you've discovered about the dungeon. - Any visited level (unless forgotten due to amnesia) with an - annotation is included, and many things (altars, thrones, - fountains, and so on; extra stairs leading to another dun- - geon branch) trigger an automatic annotation. If dungeon + Display information you've discovered about the dungeon. + Any visited level (unless forgotten due to amnesia) with an + annotation is included, and many things (altars, thrones, + fountains, and so on; extra stairs leading to another dun- + geon branch) trigger an automatic annotation. If dungeon overview is chosen during end-of-game disclosure, every vis- - ited level will be included regardless of annotations. Au- + ited level will be included regardless of annotations. Au- tocompletes. Default keys are `^O', and `M-O'. #panic Test the panic routine. Terminates the current game. Auto- completes. Debug mode only. - Asks for confirmation; default is n (no); continue playing. - To really panic, respond with y. You can set the para- - noid_confirmation:quit option to require a response of yes + Asks for confirmation; default is n (no); continue playing. + To really panic, respond with y. You can set the para- + noid_confirmation:quit option to require a response of yes instead. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1401,38 +1401,38 @@ Polymorph self. Autocompletes. Debug mode only. #pray - Pray to the gods for help. Autocompletes. Default key is + Pray to the gods for help. Autocompletes. Default key is `M-p'. - Praying too soon after receiving prior help is a bad idea. - (Hint: entering the dungeon alive is treated as having re- + Praying too soon after receiving prior help is a bad idea. + (Hint: entering the dungeon alive is treated as having re- ceived help. You probably shouldn't start off a new game by - praying right away.) Since using this command by accident - can cause trouble, there is an option to make you confirm - your intent before praying. It is enabled by default, and - you can reset the paranoid_confirmation option to disable + praying right away.) Since using this command by accident + can cause trouble, there is an option to make you confirm + your intent before praying. It is enabled by default, and + you can reset the paranoid_confirmation option to disable it. #prevmsg - Show previously displayed game messages. Default key is + Show previously displayed game messages. Default key is `^P'. #puton - Put on an accessory (ring, amulet, etc). Default key is + Put on an accessory (ring, amulet, etc). Default key is `P'. #quaff Quaff (drink) something. Default key is `q'. #quit - Quit the program without saving your game. Autocompletes. + Quit the program without saving your game. Autocompletes. Default key is `M-q'. - Since using this command by accident would throw away the - current game, you are asked to confirm your intent before + Since using this command by accident would throw away the + current game, you are asked to confirm your intent before quitting. Default response is n (no); continue playing. To - really quit, respond with y. You can set the paranoid_con- - firmation:quit option to require a response of yes instead. + really quit, respond with y. You can set the paranoid_con- + firmation:quit option to require a response of yes instead. #quiver Select ammunition for quiver. Default key is `Q'. @@ -1446,7 +1446,7 @@ number_pad is on. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1512,7 +1512,7 @@ Sit down. Autocompletes. Default key is `M-s'. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1555,16 +1555,16 @@ Look at the timeout queue. Autocompletes. Debug mode only. #tip - Tip over a container (bag or box) to pour out its contents. - Autocompletes. Default key is `M-T'. The `m' prefix makes + Tip over a container (bag or box) to pour out its contents. + Autocompletes. Default key is `M-T'. The `m' prefix makes the command use a menu. #travel - Travel to a specific location on the map. Default key is + Travel to a specific location on the map. Default key is `_'. Using the "request menu" prefix shows a menu of inter- - esting targets in sight without asking to move the cursor. - When picking a target with cursor and the autodescribe op- - tion is on, the top line will show "(no travel path)" if + esting targets in sight without asking to move the cursor. + When picking a target with cursor and the autodescribe op- + tion is on, the top line will show "(no travel path)" if your character does not know of a path to that location. #turn @@ -1574,11 +1574,11 @@ Toggle two-weapon combat on or off. Autocompletes. Default key is `X', and also `M-2' if number_pad is off. - Note that you must use suitable weapons for this type of + Note that you must use suitable weapons for this type of combat, or it will be automatically turned off. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1592,14 +1592,14 @@ Untrap something (trap, door, or chest). Default key is `M- u', and `u' if number_pad is on. - In some circumstances it can also be used to rescue trapped + In some circumstances it can also be used to rescue trapped monsters. #up Go up a staircase. Default key is `<'. #vanquished - List vanquished monsters. Autocompletes. Debug mode only. + List vanquished monsters. Autocompletes. Debug mode only. #version Print compile time options for this version of NetHack. Au- @@ -1644,7 +1644,7 @@ Create a monster. May be prefixed by a count to create more - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1710,7 +1710,7 @@ lowed by the other key, you may set the altmeta option to have - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1776,7 +1776,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1842,7 +1842,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1908,7 +1908,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -1928,31 +1928,31 @@ or to paying for it will incur a charge, and the shopkeeper won't allow you to leave the shop until you have paid any debt you owe. - You can sell items to a shopkeeper by dropping them to the - floor while inside a shop. You will either be offered an amount - of gold and asked whether you're willing to sell, or you'll be - told that the shopkeeper isn't interested (generally, your item - needs to be compatible with the type of merchandise carried by + You can sell items to a shopkeeper by dropping them to the + floor while inside a shop. You will either be offered an amount + of gold and asked whether you're willing to sell, or you'll be + told that the shopkeeper isn't interested (generally, your item + needs to be compatible with the type of merchandise carried by the shop). - If you drop something in a shop by accident, the shopkeeper - will usually claim ownership without offering any compensation. + If you drop something in a shop by accident, the shopkeeper + will usually claim ownership without offering any compensation. You'll have to buy it back if you want to reclaim it. - Shopkeepers sometimes run out of money. When that happens, - you'll be offered credit instead of gold when you try to sell - something. Credit can be used to pay for purchases, but it is - only good in the shop where it was obtained; other shopkeepers - won't honor it. (If you happen to find a "credit card" in the + Shopkeepers sometimes run out of money. When that happens, + you'll be offered credit instead of gold when you try to sell + something. Credit can be used to pay for purchases, but it is + only good in the shop where it was obtained; other shopkeepers + won't honor it. (If you happen to find a "credit card" in the dungeon, don't bother trying to use it in shops; shopkeepers will not accept it.) - The `$' command, which reports the amount of gold you are + The `$' command, which reports the amount of gold you are carrying (in inventory, not inside bags or boxes), will also show - current shop debt or credit, if any. The "Iu" command lists un- + current shop debt or credit, if any. The "Iu" command lists un- paid items (those which still belong to the shop) if you are car- - rying any. The "Ix" command shows an inventory-like display of - any unpaid items which have been used up, along with other shop + rying any. The "Ix" command shows an inventory-like display of + any unpaid items which have been used up, along with other shop fees, if any. 5.4.1. Shop idiosyncrasies @@ -1974,7 +1974,7 @@ tory depletion. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2011,36 +2011,36 @@ business unless you attack them. Some of them are very dangerous when angered. Remember: discretion is the better part of valor. - In most circumstances, if you attempt to attack a peaceful - monster by moving into its location, you'll be asked to confirm - your intent. By default an answer of `y' acknowledges that in- - tent, which can be error prone if you're using `y' to move. You + In most circumstances, if you attempt to attack a peaceful + monster by moving into its location, you'll be asked to confirm + your intent. By default an answer of `y' acknowledges that in- + tent, which can be error prone if you're using `y' to move. You can set the paranoid_confirmation option to require a response of "yes" instead. - If you can't see a monster (if it is invisible, or if you - are blinded), the symbol `I' will be shown when you learn of its - presence. If you attempt to walk into it, you will try to fight - it just like a monster that you can see; of course, if the mon- + If you can't see a monster (if it is invisible, or if you + are blinded), the symbol `I' will be shown when you learn of its + presence. If you attempt to walk into it, you will try to fight + it just like a monster that you can see; of course, if the mon- ster has moved, you will attack empty air. If you guess that the - monster has moved and you don't wish to fight, you can use the - `m' command to move without fighting; likewise, if you don't re- + monster has moved and you don't wish to fight, you can use the + `m' command to move without fighting; likewise, if you don't re- member a monster but want to try fighting anyway, you can use the `F' command. 6.2. Your pet You start the game with a little dog (`d'), kitten (`f'), or - pony (`u'), which follows you about the dungeon and fights mon- - sters with you. Like you, your pet needs food to survive. Dogs - and cats usually feed themselves on fresh carrion and other - meats; horses need vegetarian food which is harder to come by. - If you're worried about your pet or want to train it, you can + pony (`u'), which follows you about the dungeon and fights mon- + sters with you. Like you, your pet needs food to survive. Dogs + and cats usually feed themselves on fresh carrion and other + meats; horses need vegetarian food which is harder to come by. + If you're worried about your pet or want to train it, you can feed it, too, by throwing it food. A properly trained pet can be very useful under certain circumstances. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2050,38 +2050,38 @@ - Your pet also gains experience from killing monsters, and - can grow over time, gaining hit points and doing more damage. - Initially, your pet may even be better at killing things than + Your pet also gains experience from killing monsters, and + can grow over time, gaining hit points and doing more damage. + Initially, your pet may even be better at killing things than you, which makes pets useful for low-level characters. - Your pet will follow you up and down staircases if it is - next to you when you move. Otherwise your pet will be stranded - and may become wild. Similarly, when you trigger certain types - of traps which alter your location (for instance, a trap door - which drops you to a lower dungeon level), any adjacent pet will + Your pet will follow you up and down staircases if it is + next to you when you move. Otherwise your pet will be stranded + and may become wild. Similarly, when you trigger certain types + of traps which alter your location (for instance, a trap door + which drops you to a lower dungeon level), any adjacent pet will accompany you and any non-adjacent pet will be left behind. Your - pet may trigger such traps itself; you will not be carried along + pet may trigger such traps itself; you will not be carried along with it even if adjacent at the time. 6.3. Steeds - Some types of creatures in the dungeon can actually be rid- + Some types of creatures in the dungeon can actually be rid- den if you have the right equipment and skill. Convincing a wild - beast to let you saddle it up is difficult to say the least. - Many a dungeoneer has had to resort to magic and wizardry in or- + beast to let you saddle it up is difficult to say the least. + Many a dungeoneer has had to resort to magic and wizardry in or- der to forge the alliance. Once you do have the beast under your - control however, you can easily climb in and out of the saddle + control however, you can easily climb in and out of the saddle with the "#ride" command. Lead the beast around the dungeon when riding, in the same manner as you would move yourself. It is the beast that you will see displayed on the map. - Riding skill is managed by the "#enhance" command. See the + Riding skill is managed by the "#enhance" command. See the section on Weapon proficiency for more information about that. Use the `a' (apply) command and pick a saddle in your inven- - tory to attempt to put that saddle on an adjacent creature. If - successful, it will be transferred to that creature's inventory. + tory to attempt to put that saddle on an adjacent creature. If + successful, it will be transferred to that creature's inventory. Use the "#loot" command while adjacent to a saddled creature to try to remove the saddle from that creature. If successful, @@ -2106,7 +2106,7 @@ it is the one who moved rather than you. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2172,7 +2172,7 @@ extremely obvious, you will be asked what you want to call this - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2238,7 +2238,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2304,7 +2304,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2370,7 +2370,7 @@ become highly skilled in daggers or staves but not in swords or - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2436,7 +2436,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2502,7 +2502,7 @@ of armor, you immediately find out the armor class and any - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2568,7 +2568,7 @@ vironment variable to the file name of your mailbox. You may - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2629,12 +2629,12 @@ then by its current number of charges. A current charge count of -1 is a special case indicating that the wand has been cancelled. - The command to use a wand is `z' (zap). To break one, use + The command to use a wand is `z' (zap). To break one, use the `a' (apply) command. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2646,14 +2646,14 @@ 7.8. Rings (`=') - Rings are very useful items, since they are relatively per- - manent magic, unlike the usually fleeting effects of potions, + Rings are very useful items, since they are relatively per- + manent magic, unlike the usually fleeting effects of potions, scrolls, and wands. - Putting on a ring activates its magic. You can wear only + Putting on a ring activates its magic. You can wear only two rings, one on each ring finger. - Most rings also cause you to grow hungry more rapidly, the + Most rings also cause you to grow hungry more rapidly, the rate varying with the type of ring. The commands to use rings are `P' (put on) and `R' (remove). @@ -2700,7 +2700,7 @@ "Weapon proficiency".) - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2766,7 +2766,7 @@ much less valuable. All rocks, however, can be used as - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2832,7 +2832,7 @@ with these challenges. Note that it is perfectly acceptable to - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2898,7 +2898,7 @@ - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2964,7 +2964,7 @@ how NetHack behaves. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -2987,11 +2987,23 @@ 9.2. Using a configuration file The default name of the configuration file varies on differ- - ent operating systems. On MS-DOS and Windows, it is - "defaults.nh" in the same folder as nethack.exe or nethackW.exe. - On UNIX, Linux, and Mac OS X it is ".nethackrc" in the user's - home directory. The file may not exist, but it is a normal ASCII - text file and can be created with any text editor. + ent operating systems. + + On UNIX, Linux, and Mac OS X it is ".nethackrc" in the us- + er's home directory. The file may not exist, but it is a normal + ASCII text file and can be created with any text editor. + + On Windows, it is ".nethackrc" in "\%USERPRO- + FILE%\NetHack\3.6". The file may not exist, but it is a normal + ASCII text file can can be created with any text editor. After + running NetHack for the first time, you should find a default + template for the configuration file named ".nethackrc.template" + in "\%USERPROFILE%\NetHack\3.6". If you had not created the con- + figuration file, NetHack will create the configuration file for + you using the default template file. + + On MS-DOS, it is "defaults.nh" in the same folder as + nethack.exe. Any line in the configuration file starting with `#' is treated as a comment. Empty lines are ignored. @@ -3016,6 +3028,18 @@ "no" or `!' to turn it off. For compound options, the option name and value are separated by a colon. Some options are per- sistent, and apply only to new games. You can specify multiple + + + NetHack 3.6 November 2, 2019 + + + + + + NetHack Guidebook 47 + + + OPTIONS statements, and multiple options separated by commas in a single OPTIONS statement. (Comma separated options are pro- cessed from right to left.) @@ -3028,18 +3052,6 @@ HACKDIR Default location of files NetHack needs. On Windows HACKDIR defaults to the location of the NetHack.exe or NetHackw.exe - - - NetHack 3.6 October 27, 2019 - - - - - - NetHack Guidebook 47 - - - file so setting HACKDIR to override that is not usually neces- sary or recommended. @@ -3082,6 +3094,18 @@ Change the key bindings of some special keys, menu accelera- tors, or extended commands. You can specify multiple bindings. Format is key followed by the command, separated by a colon. + + + NetHack 3.6 November 2, 2019 + + + + + + NetHack Guidebook 48 + + + See the "Changing Key Bindings" section for more information. Example: @@ -3094,18 +3118,6 @@ Example: - - - NetHack 3.6 October 27, 2019 - - - - - - NetHack Guidebook 48 - - - OPTIONS=color CHOOSE=char A,char B [char A] @@ -3140,7 +3152,7 @@ Example: - # replace small punctuation (tick marks) with easier to see digits + # replace small punctuation (tick marks) with digits SYMBOLS=S_boulder:0,S_golem:7 WIZKIT @@ -3149,20 +3161,8 @@ names, one per line, up to a maximum of 128 lines. Each line is processed by the function that handles wishing. - Example: - WIZKIT=~/wizkit.txt - - - - Here is a short example of config file contents: - - - - - - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -3172,6 +3172,14 @@ + Example: + + WIZKIT=~/wizkit.txt + + + + Here is a short example of config file contents: + # Set your character's role, race, gender, and alignment. OPTIONS=role:Valkyrie, race:Human, gender:female, align:lawful # @@ -3218,17 +3226,9 @@ Instead of a comma-separated list of options, NETHACKOPTIONS can be set to the full name of a configuration file you want to - use. If that full name doesn't start with a slash, precede it - with `@' (at-sign) to let NetHack know that the rest is intended - as a file name. If it does start with `/', the at-sign is op- - tional. - - - - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -3238,6 +3238,11 @@ + use. If that full name doesn't start with a slash, precede it + with `@' (at-sign) to let NetHack know that the rest is intended + as a file name. If it does start with `/', the at-sign is op- + tional. + 9.4. Customization options Here are explanations of what the various options do. Char- @@ -3275,26 +3280,21 @@ tent. autopickup - Automatically pick up things onto which you move (default on). + Automatically pick up things onto which you move (default on). Persistent. See pickup_types to refine the behavior. autoquiver - This option controls what happens when you attempt the `f' - (fire) command when nothing is quivered or readied (default - false). When true, the computer will fill your quiver or - quiver sack or make ready some suitable weapon. Note that it - will not take into account the blessed/cursed status, enchant- + This option controls what happens when you attempt the `f' + (fire) command when nothing is quivered or readied (default + false). When true, the computer will fill your quiver or + quiver sack or make ready some suitable weapon. Note that it + will not take into account the blessed/cursed status, enchant- ment, damage, or quality of the weapon; you are free to manual- - ly fill your quiver or quiver sack or make ready with the `Q' + ly fill your quiver or quiver sack or make ready with the `Q' command instead. If no weapon is found or the option is false, - the `t' (throw) command is executed instead. Persistent. - - blind - Start the character permanently blind (default false). Persis- - tent. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -3304,45 +3304,51 @@ + the `t' (throw) command is executed instead. Persistent. + + blind + Start the character permanently blind (default false). Persis- + tent. + bones - Allow saving and loading bones files (default true). Persis- + Allow saving and loading bones files (default true). Persis- tent. boulder - Set the character used to display boulders (default is the + Set the character used to display boulders (default is the "large rock" class symbol, ``'). catname - Name your starting cat (for example "catname:Morris"). Cannot + Name your starting cat (for example "catname:Morris"). Cannot be set with the `O' command. character - Synonym for "role" to pick the type of your character (for ex- + Synonym for "role" to pick the type of your character (for ex- ample "character:Monk"). See role for more details. checkpoint - Save game state after each level change, for possible recovery + Save game state after each level change, for possible recovery after program crash (default on). Persistent. checkspace - Check free disk space before writing files to disk (default - on). You may have to turn this off if you have more than 2 GB - free space on the partition used for your save and level files - (because too much space might overflow the calculation and end + Check free disk space before writing files to disk (default + on). You may have to turn this off if you have more than 2 GB + free space on the partition used for your save and level files + (because too much space might overflow the calculation and end up looking like insufficient space). Only applies when MFLOPPY was defined during compilation. clicklook - Allows looking at things on the screen by navigating the mouse + Allows looking at things on the screen by navigating the mouse over them and clicking the right mouse button (default off). cmdassist - Have the game provide some additional command assistance for - new players if it detects some anticipated mistakes (default + Have the game provide some additional command assistance for + new players if it detects some anticipated mistakes (default on). confirm - Have user confirm attacks on pets, shopkeepers, and other + Have user confirm attacks on pets, shopkeepers, and other peaceable creatures (default on). Persistent. dark_room @@ -3351,16 +3357,10 @@ disclose Controls what information the program reveals when the game ends. Value is a space separated list of prompting/category - pairs (default is "ni na nv ng nc no", prompt with default re- - sponse of `n' for each candidate). Persistent. The possibili- - ties are: + pairs (default is "ni na nv ng nc no", prompt with default - - - - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -3370,6 +3370,9 @@ + response of `n' for each candidate). Persistent. The possi- + bilities are: + i - disclose your inventory; a - disclose your attributes; v - summarize monsters that have been vanquished; @@ -3406,9 +3409,9 @@ tory to prompt and default to yes, attributes to prompt and de- fault to no, vanquished to disclose without prompting, genocid- ed to not disclose and not prompt, conduct to implicitly prompt - and default to no, and overview to disclose without prompting. + and default to no, and overview to disclose without prompting. - Note that the vanquished monsters list includes all monsters + Note that the vanquished monsters list includes all monsters killed by traps and each other as well as by you. And the dun- geon overview shows all levels you had visited but does not re- veal things about them that you hadn't discovered. @@ -3418,15 +3421,12 @@ set with the `O' command. extmenu - Changes the extended commands interface to pop-up a menu of + Changes the extended commands interface to pop-up a menu of available commands. It is keystroke compatible with the tradi- - tional interface except that it does not require that you hit - Enter. It is implemented for the tty interface (default off). + tional interface except that it does not require that you hit - - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -3436,6 +3436,8 @@ + Enter. It is implemented for the tty interface (default off). + For the X11 interface, which always uses a menu for choosing an extended command, it controls whether the menu shows all avail- able commands (on) or just the subset of commands which have @@ -3487,12 +3489,10 @@ means that you might miss some interesting and/or important in- formation. Persistent. - herecmd_menu - When using a windowport that supports mouse and clicking on - yourself or next to you, show a menu of possible actions for - NetHack 3.6 October 27, 2019 + + NetHack 3.6 November 2, 2019 @@ -3502,6 +3502,9 @@ + herecmd_menu + When using a windowport that supports mouse and clicking on + yourself or next to you, show a menu of possible actions for the location. Same as "#herecmdmenu" and "#therecmdmenu" com- mands. @@ -3544,21 +3547,18 @@ on). Persistent. lit_corridor - Show corridor squares seen by night vision or a light source + Show corridor squares seen by night vision or a light source held by your character as lit (default off). Persistent. lootabc - When using a menu to interact with a container, use the old - `a', `b', and `c' keyboard shortcuts rather than the mnemonics + When using a menu to interact with a container, use the old + `a', `b', and `c' keyboard shortcuts rather than the mnemonics `o', `i', and `b' (default off). Persistent. - mail - Enable mail delivery during the game (default on). Persistent. - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -3568,6 +3568,9 @@ + mail + Enable mail delivery during the game (default on). Persistent. + male An obsolete synonym for "gender:male". Cannot be set with the `O' command. @@ -3600,8 +3603,8 @@ Implemented by the Amiga, Gem, X11 and tty ports. Default `-'. menu_deselect_page - Menu character accelerator to deselect all items on this page - of a menu. Implemented by the Amiga, Gem and tty ports. De- + Menu character accelerator to deselect all items on this page + of a menu. Implemented by the Amiga, Gem and tty ports. De- fault `\'. menu_first_page @@ -3609,22 +3612,19 @@ Implemented by the Amiga, Gem and tty ports. Default `^'. menu_headings - Controls how the headings in a menu are highlighted. Values - are "none", "bold", "dim", "underline", "blink", or "inverse". + Controls how the headings in a menu are highlighted. Values + are "none", "bold", "dim", "underline", "blink", or "inverse". Not all ports can actually display all types. menu_invert_all - Menu character accelerator to invert all items in a menu. Im- + Menu character accelerator to invert all items in a menu. Im- plemented by the Amiga, Gem, X11 and tty ports. Default `@'. menu_invert_page - Menu character accelerator to invert all items on this page of - a menu. Implemented by the Amiga, Gem and tty ports. Default - `~'. + Menu character accelerator to invert all items on this page of - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -3634,21 +3634,24 @@ + a menu. Implemented by the Amiga, Gem and tty ports. Default + `~'. + menu_last_page - Menu character accelerator to jump to the last page in a menu. + Menu character accelerator to jump to the last page in a menu. Implemented by the Amiga, Gem and tty ports. Default `|'. menu_next_page - Menu character accelerator to goto the next menu page. Imple- + Menu character accelerator to goto the next menu page. Imple- mented by the Amiga, Gem and tty ports. Default `>'. menu_objsyms - Show object symbols in menu headings in menus where the object + Show object symbols in menu headings in menus where the object symbols act as menu accelerators (default off). menu_overlay - Do not clear the screen before drawing menus, and align menus - to the right edge of the screen. Only for the tty port. (de- + Do not clear the screen before drawing menus, and align menus + to the right edge of the screen. Only for the tty port. (de- fault on) menu_previous_page @@ -3656,16 +3659,16 @@ plemented by the Amiga, Gem and tty ports. Default `<'. menu_search - Menu character accelerator to search for a menu item. Imple- + Menu character accelerator to search for a menu item. Imple- mented by the Amiga, Gem, X11 and tty ports. Default `:'. menu_select_all - Menu character accelerator to select all items in a menu. Im- + Menu character accelerator to select all items in a menu. Im- plemented by the Amiga, Gem, X11 and tty ports. Default `.'. menu_select_page - Menu character accelerator to select all items on this page of - a menu. Implemented by the Amiga, Gem and tty ports. Default + Menu character accelerator to select all items on this page of + a menu. Implemented by the Amiga, Gem and tty ports. Default `,'. monpolycontrol @@ -3673,24 +3676,21 @@ off). Debug mode only. mouse_support - Allow use of the mouse for input and travel. Valid settings + Allow use of the mouse for input and travel. Valid settings are: 0 - disabled 1 - enabled and make OS adjustments to support mouse use in the game 2 - like 1 but does not make any OS adjustments - Omitting a value is the same as specifying 1 and negating + Omitting a value is the same as specifying 1 and negating mouse_support is the same as specifying 0. msghistory - The number of top line messages to keep (and be able to recall - with `^P') (default 20). Cannot be set with the `O' command. + The number of top line messages to keep (and be able to recall - - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -3700,10 +3700,12 @@ + with `^P') (default 20). Cannot be set with the `O' command. + msg_window - Allows you to change the way recalled messages are displayed. - Currently it is only supported for tty (all four choices) and - for curses (`f' and `r' choices, default `r'). The possible + Allows you to change the way recalled messages are displayed. + Currently it is only supported for tty (all four choices) and + for curses (`f' and `r' choices, default `r'). The possible values are: s - single message (default; only choice prior to 3.4.0); @@ -3711,16 +3713,16 @@ f - full window, oldest message first; r - full window reversed, newest message first. - For backward compatibility, no value needs to be specified - (which defaults to "full"), or it can be negated (which + For backward compatibility, no value needs to be specified + (which defaults to "full"), or it can be negated (which defaults to "single"). name - Set your character's name (defaults to your user name). You - can also set your character's role by appending a dash and one + Set your character's name (defaults to your user name). You + can also set your character's role by appending a dash and one or more letters of the role (that is, by suffixing one of -A -B - -C -H -K -M -P -Ra -Ro -S -T -V -W). If -@ is used for the - role, then a random one will be automatically chosen. Cannot + -C -H -K -M -P -Ra -Ro -S -T -V -W). If -@ is used for the + role, then a random one will be automatically chosen. Cannot be set with the `O' command. news @@ -3752,11 +3754,9 @@ acts as `G' and `Alt-0' acts as `I'. Setting -1 is to accommo- date some QWERTZ keyboards which have the location of the `y' and `z' keys swapped.) When moving by numbers, to enter a - count prefix for those commands which accept one (such as "12s" - to search twelve times), precede it with the letter `n' - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -3766,6 +3766,8 @@ + count prefix for those commands which accept one (such as "12s" + to search twelve times), precede it with the letter `n' ("n12s"). packorder @@ -3818,11 +3820,9 @@ petattr Specifies one or more text highlighting attributes to use when showing pets on the map. Effectively a superset of the - hilite_pet boolean option. Curses interface only; value is one - or more of the following letters. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -3832,6 +3832,9 @@ + hilite_pet boolean option. Curses interface only; value is one + or more of the following letters. + n - Normal text (no highlighting) i - Inverse video (default) b - Bold text @@ -3883,12 +3886,9 @@ When walking across a pile of objects on the floor, threshold at which the message "there are few/several/many objects here" is given instead of showing a popup list of those objects. A - value of 0 means "no limit" (always list the objects); a value - of 1 effectively means "never show the objects" since the pile - size will always be at least that big; default value is 5. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -3898,6 +3898,9 @@ + value of 0 means "no limit" (always list the objects); a value + of 1 effectively means "never show the objects" since the pile + size will always be at least that big; default value is 5. Persistent. playmode @@ -3949,12 +3952,9 @@ Controls the amount of screen updating for the map window when engaged in multi-turn movement (running via shift+direction or control+direction and so forth, or via the travel command or - mouse click). The possible values are: - - teleport - update the map after movement has finished; - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -3964,6 +3964,9 @@ + mouse click). The possible values are: + + teleport - update the map after movement has finished; run - update the map after every seven or so steps; walk - update the map after each step; crawl - like walk, but pause briefly after each step. @@ -4015,12 +4018,9 @@ like with the #loot and pickup commands; none - show lists the traditional way without sorting. - sortpack - Sort the pack contents by type when displaying inventory (de- - fault on). Persistent. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -4030,6 +4030,10 @@ + sortpack + Sort the pack contents by type when displaying inventory (de- + fault on). Persistent. + sparkle Display a sparkly effect when a monster (including yourself) is hit by an attack to which it is resistant (default on). Per- @@ -4080,13 +4084,9 @@ parent window, but it no longer leaves the score list around after game end on a terminal or emulating window. - travel - Allow the travel command (default on). Turning this option off - will prevent the game from attempting unintended moves if you - make inadvertent mouse clicks on the map window. Persistent. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -4096,6 +4096,11 @@ + travel + Allow the travel command (default on). Turning this option off + will prevent the game from attempting unintended moves if you + make inadvertent mouse clicks on the map window. Persistent. + verbose Provide more commentary during the game (default on). Persis- tent. @@ -4144,15 +4149,10 @@ keys or meta-digit keys to fast-move, instead of moving 8 units at a time, move by skipping the same glyphs. (default off) - windowtype - When the program has been built to support multiple interfaces, - select which one to use, such as "tty" or "X11" (default de- - pends on build-time settings; use "#version" to check). Cannot - be set with the `O' command. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -4162,6 +4162,12 @@ + windowtype + When the program has been built to support multiple interfaces, + select which one to use, such as "tty" or "X11" (default de- + pends on build-time settings; use "#version" to check). Cannot + be set with the `O' command. + When used, it should be the first option set since its value might enable or disable the availability of various other op- tions. For multiple lines in a configuration file, that would @@ -4209,16 +4215,10 @@ If NetHack can, it should display color if it can for different monsters, objects, and dungeon features. - eight_bit_tty - If NetHack can, it should pass eight-bit character values (for - example, specified with the traps option) straight through to - your terminal (default off). - - font_map - if NetHack can, it should use a font by the chosen name for the - NetHack 3.6 October 27, 2019 + + NetHack 3.6 November 2, 2019 @@ -4228,6 +4228,13 @@ + eight_bit_tty + If NetHack can, it should pass eight-bit character values (for + example, specified with the traps option) straight through to + your terminal (default off). + + font_map + if NetHack can, it should use a font by the chosen name for the map window. font_menu @@ -4251,18 +4258,18 @@ dow. font_size_menu - If NetHack can, it should use this size font for menu windows. + If NetHack can, it should use this size font for menu windows. font_size_message - If NetHack can, it should use this size font for the message + If NetHack can, it should use this size font for the message window. font_size_status - If NetHack can, it should use this size font for the status + If NetHack can, it should use this size font for the status window. font_size_text - If NetHack can, it should use this size font for text windows. + If NetHack can, it should use this size font for text windows. fullscreen If NetHack can, it should try and display on the entire screen @@ -4276,15 +4283,8 @@ large_font If NetHack can, it should use a large font. - map_mode - If NetHack can, it should display the map in the manner speci- - fied. - player_selection - If NetHack can, it should pop up dialog boxes, or use prompts - - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -4294,6 +4294,12 @@ + map_mode + If NetHack can, it should display the map in the manner speci- + fied. + + player_selection + If NetHack can, it should pop up dialog boxes, or use prompts for character selection. popup_dialog @@ -4341,16 +4347,10 @@ ified but will settle for smaller sizes if they are too big. Default is the current window size. - tiled_map - If NetHack can, it should display a tiled map if it can. - - tile_file - Specify the name of an alternative tile file to override the - default. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -4360,6 +4360,13 @@ + tiled_map + If NetHack can, it should display a tiled map if it can. + + tile_file + Specify the name of an alternative tile file to override the + default. + tile_height Specify the preferred height of each tile in a tile capable port. @@ -4371,52 +4378,45 @@ Use bold black instead of blue for black glyphs (TTY only). use_inverse - If NetHack can, it should display inverse when the game speci- + If NetHack can, it should display inverse when the game speci- fies it. vary_msgcount - If NetHack can, it should display this number of messages at a + If NetHack can, it should display this number of messages at a time in the message window. windowborders - Whether to draw boxes around the map, status area, message - area, and persistent inventory window if enabled. Curses in- + Whether to draw boxes around the map, status area, message + area, and persistent inventory window if enabled. Curses in- terface only. Acceptable values are 0 - off, never show borders 1 - on, always show borders 2 - auto, on if display is at least (24+2)x(80+2) (default) - (The 26x82 size threshold for `2' refers to number of rows and - columns of the display. A width of at least 110 columns + (The 26x82 size threshold for `2' refers to number of rows and + columns of the display. A width of at least 110 columns (80+2+26+2) is needed for align_status set to left or right.) windowcolors - If NetHack can, it should display windows with the specified + If NetHack can, it should display windows with the specified foreground/background colors. Windows GUI only. The format is OPTION=windowcolors:wintype foreground/background - where wintype is one of "menu", "message", "status", or - "text", and foreground and background are colors, either a hexa- - decimal \'#rrggbb', one of the named colors (black, red, green, - brown, blue, magenta, cyan, orange, brightgreen, yellow, bright- - blue, brightmagenta, brightcyan, white, trueblack, gray, purple, - silver, maroon, fuchsia, lime, olive, navy, teal, aqua), or one - of Windows UI colors (activeborder, activecaption, appworkspace, - background, btnface, btnshadow, btntext, captiontext, graytext, - greytext, highlight, highlighttext, inactiveborder, inactivecap- - tion, menu, menutext, scrollbar, window, windowframe, window- - text). - - wraptext - If NetHack can, it should wrap long lines of text if they don't - fit in the visible area of the window. + where wintype is one of "menu", "message", "status", or + "text", and foreground and background are colors, either a hexa- + decimal \'#rrggbb', one of the named colors (black, red, green, + brown, blue, magenta, cyan, orange, brightgreen, yellow, bright- + blue, brightmagenta, brightcyan, white, trueblack, gray, purple, + silver, maroon, fuchsia, lime, olive, navy, teal, aqua), or one + of Windows UI colors (activeborder, activecaption, appworkspace, + background, btnface, btnshadow, btntext, captiontext, graytext, + greytext, highlight, highlighttext, inactiveborder, inactivecap- + tion, menu, menutext, scrollbar, window, windowframe, - - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -4426,14 +4426,20 @@ + windowtext). + + wraptext + If NetHack can, it should wrap long lines of text if they don't + fit in the visible area of the window. + 9.6. Platform-specific Customization options - Here are explanations of options that are used by specific + Here are explanations of options that are used by specific platforms or ports to customize and change the port behavior. altkeyhandler - Select an alternate keystroke handler dll to load (Win32 tty - NetHack only). The name of the handler is specified without + Select an alternate keystroke handler dll to load (Win32 tty + NetHack only). The name of the handler is specified without the .dll extension and without any path information. Cannot be set with the `O' command. @@ -4443,23 +4449,23 @@ altmeta On other (non-Amiga) systems where this option is available, it - can be set to tell NetHack to convert a two character sequence - beginning with ESC into a meta-shifted version of the second + can be set to tell NetHack to convert a two character sequence + beginning with ESC into a meta-shifted version of the second character (default off). - This conversion is only done for commands, not for other input + This conversion is only done for commands, not for other input prompts. Note that typing one or more digits as a count prefix prior to a command -- preceded by n if the number_pad option is - set -- is also subject to this conversion, so attempting to - abort the count by typing ESC will leave NetHack waiting for + set -- is also subject to this conversion, so attempting to + abort the count by typing ESC will leave NetHack waiting for another character to complete the two character sequence. Type - a second ESC to finish cancelling such a count. At other + a second ESC to finish cancelling such a count. At other prompts a single ESC suffices. BIOS Use BIOS calls to update the screen display quickly and to read - the keyboard (allowing the use of arrow keys to move) on ma- - chines with an IBM PC compatible BIOS ROM (default off, OS/2, + the keyboard (allowing the use of arrow keys to move) on ma- + chines with an IBM PC compatible BIOS ROM (default off, OS/2, PC, and ST NetHack only). flush @@ -4472,17 +4478,11 @@ (default on, Mac NetHack only). rawio - Force raw (non-cbreak) mode for faster output and more bullet- - proof input (MS-DOS sometimes treats `^P' as a printer toggle - without it) (default off, OS/2, PC, and ST NetHack only). - Note: DEC Rainbows hang if this is turned on. Cannot be set - with the `O' command. - - soundcard - (default on, PC NetHack only). Cannot be set with the `O' + Force raw (non-cbreak) mode for faster output and more bullet- + proof input (MS-DOS sometimes treats `^P' as a printer toggle - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -4492,45 +4492,51 @@ - command. + without it) (default off, OS/2, PC, and ST NetHack only). + Note: DEC Rainbows hang if this is turned on. Cannot be set + with the `O' command. + + soundcard + (default on, PC NetHack only). Cannot be set with the `O' com- + mand. subkeyvalue - (Win32 tty NetHack only). May be used to alter the value of + (Win32 tty NetHack only). May be used to alter the value of keystrokes that the operating system returns to NetHack to help - compensate for international keyboard issues. OPTIONS=subkey- - value:171/92 will return 92 to NetHack, if 171 was originally - going to be returned. You can use multiple subkeyvalue state- + compensate for international keyboard issues. OPTIONS=subkey- + value:171/92 will return 92 to NetHack, if 171 was originally + going to be returned. You can use multiple subkeyvalue state- ments in the config file if needed. Cannot be set with the `O' command. video Set the video mode used (PC NetHack only). Values are "autode- - tect", "default", or "vga". Setting "vga" (or "autodetect" - with vga hardware present) will cause the game to display + tect", "default", or "vga". Setting "vga" (or "autodetect" + with vga hardware present) will cause the game to display tiles. Cannot be set with the `O' command. videocolors - Set the color palette for PC systems using NO_TERMS (default - 4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order - of colors is red, green, brown, blue, magenta, cyan, - bright.white, bright.red, bright.green, yellow, bright.blue, - bright.magenta, and bright.cyan. Cannot be set with the `O' + Set the color palette for PC systems using NO_TERMS (default + 4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order + of colors is red, green, brown, blue, magenta, cyan, + bright.white, bright.red, bright.green, yellow, bright.blue, + bright.magenta, and bright.cyan. Cannot be set with the `O' command. videoshades Set the intensity level of the three gray scales available (de- fault dark normal light, PC NetHack only). If the game display - is difficult to read, try adjusting these scales; if this does - not correct the problem, try !color. Cannot be set with the + is difficult to read, try adjusting these scales; if this does + not correct the problem, try !color. Cannot be set with the `O' command. 9.7. Regular Expressions - Regular expressions are normally POSIX extended regular ex- - pressions. It is possible to compile NetHack without regular ex- - pression support on a platform where there is no regular expres- - sion library. While this is not true of any modern platform, if - your NetHack was built this way, patterns are instead glob pat- + Regular expressions are normally POSIX extended regular ex- + pressions. It is possible to compile NetHack without regular ex- + pression support on a platform where there is no regular expres- + sion library. While this is not true of any modern platform, if + your NetHack was built this way, patterns are instead glob pat- terns. This applies to Autopickup exceptions, Message types, Menu colors, and User sounds. @@ -4539,16 +4545,10 @@ You can further refine the behavior of the autopickup option beyond what is available through the pickup_types option. - By placing autopickup_exception lines in your configuration - file, you can define patterns to be checked when the game is - about to autopickup something. - - autopickup_exception - Sets an exception to the pickup_types option. The autopick- - up_exception option should be followed by a regular expression - NetHack 3.6 October 27, 2019 + + NetHack 3.6 November 2, 2019 @@ -4558,22 +4558,29 @@ - to be used as a pattern to match against the singular form of + By placing autopickup_exception lines in your configuration + file, you can define patterns to be checked when the game is + about to autopickup something. + + autopickup_exception + Sets an exception to the pickup_types option. The autopick- + up_exception option should be followed by a regular expression + to be used as a pattern to match against the singular form of the description of an object at your location. - In addition, some characters are treated specially if they oc- + In addition, some characters are treated specially if they oc- cur as the first character in the pattern, specifically: < - always pickup an object that matches rest of pattern; > - never pickup an object that matches rest of pattern. - The autopickup_exception rules are processed in the order in - which they appear in your config file, thus allowing a later + The autopickup_exception rules are processed in the order in + which they appear in your config file, thus allowing a later rule to override an earlier rule. - Exceptions can be set with the `O' command, but because they - are not included in your config file, they won't be in effect - if you save and then restore your game. autopickup_exception + Exceptions can be set with the `O' command, but because they + are not included in your config file, they won't be in effect + if you save and then restore your game. autopickup_exception rules and not saved with the game. Here are some examples: @@ -4582,17 +4589,17 @@ autopickup_exception=">*corpse" autopickup_exception=">* cursed*" - The first example above will result in autopickup of any - type of arrow. The second example results in the exclusion of - any corpse from autopickup. The last example results in the ex- + The first example above will result in autopickup of any + type of arrow. The second example results in the exclusion of + any corpse from autopickup. The last example results in the ex- clusion of items known to be cursed from autopickup. 9.9. Changing Key Bindings - It is possible to change the default key bindings of some - special commands, menu accelerator keys, and extended commands, - by using BIND stanzas in the configuration file. Format is key, - followed by the command to bind to, separated by a colon. The + It is possible to change the default key bindings of some + special commands, menu accelerator keys, and extended commands, + by using BIND stanzas in the configuration file. Format is key, + followed by the command to bind to, separated by a colon. The key can be a single character ("x"), a control key ("^X", "C-x"), a meta key ("M-x"), or a three-digit decimal ASCII code. @@ -4603,18 +4610,11 @@ BIND=v:loot Extended command keys - You can bind multiple keys to the same extended command. Un- - bind a key by using "nothing" as the extended command to bind - to. You can also bind the "", "", and "" - keys. - - Menu accelerator keys - The menu control or accelerator keys can also be rebound via - OPTIONS-lines in the config file. You cannot bind object sym- - bols into menu accelerators. + You can bind multiple keys to the same extended command. Un- + bind a key by using "nothing" as the extended command to bind - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -4624,15 +4624,23 @@ + to. You can also bind the "", "", and "" + keys. + + Menu accelerator keys + The menu control or accelerator keys can also be rebound via + OPTIONS-lines in the config file. You cannot bind object sym- + bols into menu accelerators. + Special command keys - Below are the special commands you can rebind. Some of them - can be bound to same keys with no problems, others are in the - same "context", and if bound to same keys, only one of those - commands will be available. Special command can only be bound + Below are the special commands you can rebind. Some of them + can be bound to same keys with no problems, others are in the + same "context", and if bound to same keys, only one of those + commands will be available. Special command can only be bound to a single key. count - Prefix key to start a count, to repeat a command this many + Prefix key to start a count, to repeat a command this many times. With number_pad only. Default is `n'. doinv @@ -4642,19 +4650,19 @@ Prefix key to force fight a direction. Default is `F'. fight.numpad - Prefix key to force fight a direction. With number_pad only. + Prefix key to force fight a direction. With number_pad only. Default is `-'. getdir.help - When asked for a direction, the key to show the help. Default + When asked for a direction, the key to show the help. Default is `?'. getdir.self - When asked for a direction, the key to target yourself. De- + When asked for a direction, the key to target yourself. De- fault is `.'. getdir.self2 - When asked for a direction, the key to target yourself. De- + When asked for a direction, the key to target yourself. De- fault is `s'. getpos.autodescribe @@ -4666,21 +4674,13 @@ esting thing. Default is `a'. getpos.all.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest interesting thing. Default is `A'. - getpos.door.next - When asked for a location, the key to go to next closest door - or doorway. Default is `d'. - - getpos.door.prev - When asked for a location, the key to go to previous closest - door or doorway. Default is `D'. - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -4690,63 +4690,63 @@ + getpos.door.next + When asked for a location, the key to go to next closest door + or doorway. Default is `d'. + + getpos.door.prev + When asked for a location, the key to go to previous closest + door or doorway. Default is `D'. + getpos.help - When asked for a location, the key to show help. Default is + When asked for a location, the key to show help. Default is `?'. getpos.mon.next - When asked for a location, the key to go to next closest mon- + When asked for a location, the key to go to next closest mon- ster. Default is `m'. getpos.mon.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest monster. Default is `M'. getpos.obj.next - When asked for a location, the key to go to next closest ob- + When asked for a location, the key to go to next closest ob- ject. Default is `o'. getpos.obj.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest object. Default is `O'. getpos.menu - When asked for a location, and using one of the next or previ- - ous keys to cycle through targets, toggle showing a menu in- + When asked for a location, and using one of the next or previ- + ous keys to cycle through targets, toggle showing a menu in- stead. Default is `!'. getpos.moveskip - When asked for a location, and using the shifted movement keys - or meta-digit keys to fast-move around, move by skipping the + When asked for a location, and using the shifted movement keys + or meta-digit keys to fast-move around, move by skipping the same glyphs instead of by 8 units. Default is `*'. getpos.filter When asked for a location, change the filtering mode when using - one of the next or previous keys to cycle through targets. - Toggles between no filtering, in view only, and in the same + one of the next or previous keys to cycle through targets. + Toggles between no filtering, in view only, and in the same area only. Default is `"'. getpos.pick - When asked for a location, the key to choose the location, and + When asked for a location, the key to choose the location, and possibly ask for more info. Default is `.'. getpos.pick.once - When asked for a location, the key to choose the location, and + When asked for a location, the key to choose the location, and skip asking for more info. Default is `,'. getpos.pick.quick When asked for a location, the key to choose the location, skip - asking for more info, and exit the location asking loop. De- - fault is `;'. - - getpos.pick.verbose - When asked for a location, the key to choose the location, and - show more info without asking. Default is `:'. - - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -4756,28 +4756,35 @@ + asking for more info, and exit the location asking loop. De- + fault is `;'. + + getpos.pick.verbose + When asked for a location, the key to choose the location, and + show more info without asking. Default is `:'. + getpos.self When asked for a location, the key to go to your location. De- fault is `@'. getpos.unexplored.next - When asked for a location, the key to go to next closest unex- + When asked for a location, the key to go to next closest unex- plored location. Default is `x'. getpos.unexplored.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest unexplored location. Default is `X'. getpos.valid - When asked for a location, the key to go to show valid target + When asked for a location, the key to go to show valid target locations. Default is `$'. getpos.valid.next - When asked for a location, the key to go to next closest valid + When asked for a location, the key to go to next closest valid location. Default is `z'. getpos.valid.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest valid location. Default is `Z'. nopickup @@ -4787,7 +4794,7 @@ Key to redraw the screen. Default is `^R'. redraw.numpad - Key to redraw the screen. With number_pad only. Default is + Key to redraw the screen. With number_pad only. Default is `^L'. repeat @@ -4803,16 +4810,9 @@ Prefix key to run towards a direction without picking up items on the way. Default is `M'. - run.numpad - Prefix key to run towards a direction. With number_pad only. - Default is `5'. - - rush - Prefix key to rush towards a direction. Default is `g'. - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -4822,6 +4822,13 @@ + run.numpad + Prefix key to run towards a direction. With number_pad only. + Default is `5'. + + rush + Prefix key to rush towards a direction. Default is `g'. + 9.10. Configuring Message Types You can change the way the messages are shown in the message @@ -4869,16 +4876,9 @@ MENUCOLOR="pattern"=color&attribute pattern - the pattern to match; - color - the color to use for lines matching the pat- - tern; - attribute - the attribute to use for lines matching the - pattern. The attribute is optional, and if - left out, you must also leave out the preced- - ing ampersand. If no attribute is defined, - no attribute is used. - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -4888,6 +4888,14 @@ + color - the color to use for lines matching the pat- + tern; + attribute - the attribute to use for lines matching the + pattern. The attribute is optional, and if + left out, you must also leave out the preced- + ing ampersand. If no attribute is defined, + no attribute is used. + The pattern should be a regular expression. Allowed colors are black, red, green, brown, blue, magenta, @@ -4933,18 +4941,10 @@ SOUNDDIR The directory that houses the sound files to be played. - SOUND - An entry that maps a sound file to a user-specified message - pattern. Each SOUND entry is broken down into the following - parts: - - MESG - message window mapping (the only one supported in - 3.6); - pattern - the pattern to match; - sound file - the sound file to play; - NetHack 3.6 October 27, 2019 + + NetHack 3.6 November 2, 2019 @@ -4954,6 +4954,15 @@ + SOUND + An entry that maps a sound file to a user-specified message + pattern. Each SOUND entry is broken down into the following + parts: + + MESG - message window mapping (the only one supported in + 3.6); + pattern - the pattern to match; + sound file - the sound file to play; volume - the volume to be set while playing the sound file. The pattern should be a POSIX extended regular expression. @@ -4961,7 +4970,7 @@ 9.13. Configuring Status Hilites Your copy of NetHack may have been compiled with support for - "Status Hilites". If so, you can customize your game display by + "Status Hilites". If so, you can customize your game display by setting thresholds to change the color or appearance of fields in the status display. @@ -4969,8 +4978,8 @@ OPTION=hilite_status:field-name/behavior/color&attributes - For example, the following line in your configuration file - will cause the hitpoints field to display in the color red if + For example, the following line in your configuration file + will cause the hitpoints field to display in the color red if your hitpoints drop to or below a threshold of 30%: OPTION=hilite_status:hitpoints/<=30%/red/normal @@ -4978,39 +4987,30 @@ (That example is actually specifying red&normal for <=30% and no- color&normal for >30%.) - For another example, the following line in your configura- - tion file will cause wisdom to be displayed red if it drops and + For another example, the following line in your configura- + tion file will cause wisdom to be displayed red if it drops and green if it rises: OPTION=hilite_status:wisdom/down/red/up/green - Allowed colors are black, red, green, brown, blue, magenta, + Allowed colors are black, red, green, brown, blue, magenta, cyan, gray, orange, light-green, yellow, light-blue, light-magen- - ta, light-cyan, and white. And "no-color", the default fore- + ta, light-cyan, and white. And "no-color", the default fore- ground color on the display, which is not necessarily the same as black or white or any of the other colors. - Allowed attributes are none, bold, dim, underline, blink, - and inverse. "Normal" is a synonym for "none"; they should not + Allowed attributes are none, bold, dim, underline, blink, + and inverse. "Normal" is a synonym for "none"; they should not be used in combination with any of the other attributes. To specify both a color and an attribute, use `&' to combine - them. To specify multiple attributes, use `+' to combine those. + them. To specify multiple attributes, use `+' to combine those. For example: "magenta&inverse+dim". - Note that the display may substitute or ignore particular - attributes depending upon its capabilities, and in general may - interpret the attributes any way it wants. For example, on some - display systems a request for bold might yield blink or vice ver- - sa. On others, issuing an attribute request while another is al- - ready set up will replace the earlier attribute rather than com- - bine with it. Since NetHack issues attribute requests sequen- - tially (at least with the tty interface) rather than all at once, - the only way a situation like that can be controlled is to speci- - fy just one attribute. - NetHack 3.6 October 27, 2019 + + NetHack 3.6 November 2, 2019 @@ -5020,7 +5020,18 @@ - You can adjust the appearance of the following status + Note that the display may substitute or ignore particular + attributes depending upon its capabilities, and in general may + interpret the attributes any way it wants. For example, on some + display systems a request for bold might yield blink or vice ver- + sa. On others, issuing an attribute request while another is al- + ready set up will replace the earlier attribute rather than com- + bine with it. Since NetHack issues attribute requests sequen- + tially (at least with the tty interface) rather than all at once, + the only way a situation like that can be controlled is to speci- + fy just one attribute. + + You can adjust the appearance of the following status fields: title dungeon-level experience-level strength gold experience @@ -5031,16 +5042,16 @@ charisma armor-class condition alignment score - The pseudo-field "characteristics" can be used to set all six - of Str, Dex, Con, Int, Wis, and Cha at once. "HD" is "hit - dice", an approximation of experience level displayed when - polymorphed. "experience", "time", and "score" are condition- + The pseudo-field "characteristics" can be used to set all six + of Str, Dex, Con, Int, Wis, and Cha at once. "HD" is "hit + dice", an approximation of experience level displayed when + polymorphed. "experience", "time", and "score" are condition- ally displayed depending upon your other option settings. - Instead of a behavior, "condition" takes the following condi- - tion flags: stone, slime, strngl, foodpois, termill, blind, - deaf, stun, conf, hallu, lev, fly, and ride. You can use "ma- - jor_troubles" as an alias for stone through termill, "mi- + Instead of a behavior, "condition" takes the following condi- + tion flags: stone, slime, strngl, foodpois, termill, blind, + deaf, stun, conf, hallu, lev, fly, and ride. You can use "ma- + jor_troubles" as an alias for stone through termill, "mi- nor_troubles" for blind through hallu, "movement" for lev, fly, and ride, and "all" for every condition. @@ -5049,9 +5060,9 @@ * "always" will set the default attributes for that field. - * "up" and "down" set the field attributes for when the - field value changes upwards or downwards. This attribute - times out after statushilites turns. + * "up", "down" set the field attributes for when the field + value changes upwards or downwards. This attribute times + out after statushilites turns. * "changed" sets the field attribute for when the field val- ue changes. This attribute times out after statushilites @@ -5063,6 +5074,18 @@ matches the percentage. It is specified as a number be- tween 0 and 100, followed by `%' (percent sign). If the percentage is prefixed with `<=' or `>=', it also matches + + + NetHack 3.6 November 2, 2019 + + + + + + NetHack Guidebook 78 + + + when value is below or above the percentage. Use prefix `<' or `>' to match when strictly below or above. (The numeric limit is relaxed slightly for those: >-1% and @@ -5073,26 +5096,14 @@ for "experience level" and "experience points" (valid when the showexp option is enabled). For those, the percentage is based on the progress from the start of the current ex- - perience level to the start of the next level. So if - - - NetHack 3.6 October 27, 2019 - - - - - - NetHack Guidebook 78 - - - - level 2 starts at 20 points and level 3 starts at 40 - points, having 30 points is 50% and 35 points is 75%. - 100% is unattainable for experience because you'll gain a - level and the calculations will be reset for that new lev- - el, but a rule for =100% is allowed and matches the spe- - cial case of being exactly 1 experience point short of the - next level. + perience level to the start of the next level. So if lev- + el 2 starts at 20 points and level 3 starts at 40 points, + having 30 points is 50% and 35 points is 75%. 100% is + unattainable for experience because you'll gain a level + and the calculations will be reset for that new level, but + a rule for =100% is allowed and matches the special case + of being exactly 1 experience point short of the next lev- + el. * absolute value sets the attribute when the field value matches that number. The number must be 0 or higher, ex- @@ -5127,6 +5138,20 @@ OPTION=hilite_status: condition/major/orange&inverse OPTION=hilite_status: condition/lev+fly/red&inverse + + + + + NetHack 3.6 November 2, 2019 + + + + + + NetHack Guidebook 79 + + + 9.14. Modifying NetHack Symbols NetHack can load entire symbol sets from the symbol file. @@ -5141,17 +5166,6 @@ Set the name of the symbol set that you want to load for dis- play on the rogue level. - - NetHack 3.6 October 27, 2019 - - - - - - NetHack Guidebook 79 - - - You can also override one or more symbols using the SYMBOLS and ROGUESYMBOLS config file options. Symbols are specified as name:value pairs. Note that NetHack escape-processes the value @@ -5161,54 +5175,40 @@ meta bit in the symbol value, and the ^ prefix causes the follow- ing character to be treated as a control character. - NetHack Symbols - Default Symbol Name Description - --------------------------------------------------------------------------------- - S_air (air) - _ S_altar (altar) - " S_amulet (amulet) - A S_angel (angelic being) - a S_ant (ant or other insect) - ^ S_anti_magic_trap (anti-magic field) - [ S_armor (suit or piece of armor) - [ S_armour (suit or piece of armor) - ^ S_arrow_trap (arrow trap) - 0 S_ball (iron ball) - # S_bars (iron bars) - B S_bat (bat or bird) - ^ S_bear_trap (bear trap) - - S_blcorn (bottom left corner) - b S_blob (blob) - + S_book (spellbook) - ) S_boomleft (boomerang open left) - ( S_boomright (boomerang open right) - ` S_boulder (boulder) - - S_brcorn (bottom right corner) - C S_centaur (centaur) - _ S_chain (iron chain) - # S_cloud (cloud) - c S_cockatrice (cockatrice) - $ S_coin (pile of coins) - # S_corr (corridor) - - S_crwall (wall) - # S_darkroom (dark room) - ^ S_dart_trap (dart trap) - & S_demon (major demon) - * S_digbeam (dig beam) - > S_dnladder (ladder down) - > S_dnstair (staircase down) - d S_dog (dog or other canine) - D S_dragon (dragon) - ; S_eel (sea monster) - E S_elemental (elemental) - / S_explode1 (explosion top left) - - S_explode2 (explosion top center) - \ S_explode3 (explosion top right) - | S_explode4 (explosion middle left) + NetHack Symbols + Symbol Name Description + ----------------------------------------------------------------- + S_air (air) + _ S_altar (altar) + " S_amulet (amulet) + A S_angel (angelic being) + a S_ant (ant or other insect) + ^ S_anti_magic_trap (anti-magic field) + [ S_armor (suit or piece of armor) + [ S_armour (suit or piece of armor) + ^ S_arrow_trap (arrow trap) + 0 S_ball (iron ball) + # S_bars (iron bars) + B S_bat (bat or bird) + ^ S_bear_trap (bear trap) + - S_blcorn (bottom left corner) + b S_blob (blob) + + S_book (spellbook) + ) S_boomleft (boomerang open left) + ( S_boomright (boomerang open right) + ` S_boulder (boulder) + - S_brcorn (bottom right corner) + C S_centaur (centaur) + _ S_chain (iron chain) + # S_cloud (cloud) + c S_cockatrice (cockatrice) + $ S_coin (pile of coins) + # S_corr (corridor) + - S_crwall (wall) - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -5218,63 +5218,63 @@ - S_explode5 (explosion middle center) - | S_explode6 (explosion middle right) - \ S_explode7 (explosion bottom left) - - S_explode8 (explosion bottom center) - / S_explode9 (explosion bottom right) - e S_eye (eye or sphere) - ^ S_falling_rock_trap (falling rock trap) - f S_feline (cat or other feline) - ^ S_fire_trap (fire trap) - ! S_flashbeam (flash beam) - % S_food (piece of food) - { S_fountain (fountain) - F S_fungus (fungus or mold) - * S_gem (gem or rock) - S_ghost (ghost) - H S_giant (giant humanoid) - G S_gnome (gnome) - ' S_golem (golem) - | S_grave (grave) - g S_gremlin (gremlin) - - S_hbeam (horizontal beam [zap animation]) - # S_hcdbridge (horizontal raised drawbridge) - + S_hcdoor (closed door in horizontal wall) - . S_hodbridge (horizontal lowered drawbridge) - | S_hodoor (open door in horizontal wall) - ^ S_hole (hole) - @ S_human (human or elf) - h S_humanoid (humanoid) - - S_hwall (horizontal wall) - . S_ice (ice) - i S_imp (imp or minor demon) - I S_invisible (invisible monster) - J S_jabberwock (jabberwock) - j S_jelly (jelly) - k S_kobold (kobold) - K S_kop (Keystone Kop) - ^ S_land_mine (land mine) - } S_lava (molten lava) - l S_leprechaun (leprechaun) - ^ S_level_teleporter (level teleporter) - L S_lich (lich) - y S_light (light) - # S_litcorr (lit corridor) - : S_lizard (lizard) - \ S_lslant (diagonal beam [zap animation]) - ^ S_magic_portal (magic portal) - ^ S_magic_trap (magic trap) - m S_mimic (mimic) - ] S_mimic_def (mimic) - M S_mummy (mummy) - N S_naga (naga) - . S_ndoor (doorway without door) - n S_nymph (nymph) + # S_darkroom (dark room) + ^ S_dart_trap (dart trap) + & S_demon (major demon) + * S_digbeam (dig beam) + > S_dnladder (ladder down) + > S_dnstair (staircase down) + d S_dog (dog or other canine) + D S_dragon (dragon) + ; S_eel (sea monster) + E S_elemental (elemental) + / S_explode1 (explosion top left) + - S_explode2 (explosion top center) + \ S_explode3 (explosion top right) + | S_explode4 (explosion middle left) + S_explode5 (explosion middle center) + | S_explode6 (explosion middle right) + \ S_explode7 (explosion bottom left) + - S_explode8 (explosion bottom center) + / S_explode9 (explosion bottom right) + e S_eye (eye or sphere) + ^ S_falling_rock_trap (falling rock trap) + f S_feline (cat or other feline) + ^ S_fire_trap (fire trap) + ! S_flashbeam (flash beam) + % S_food (piece of food) + { S_fountain (fountain) + F S_fungus (fungus or mold) + * S_gem (gem or rock) + S_ghost (ghost) + H S_giant (giant humanoid) + G S_gnome (gnome) + ' S_golem (golem) + | S_grave (grave) + g S_gremlin (gremlin) + - S_hbeam (horizontal beam [zap animation]) + # S_hcdbridge (horizontal raised drawbridge) + + S_hcdoor (closed door in horizontal wall) + . S_hodbridge (horizontal lowered drawbridge) + | S_hodoor (open door in horizontal wall) + ^ S_hole (hole) + @ S_human (human or elf) + h S_humanoid (humanoid) + - S_hwall (horizontal wall) + . S_ice (ice) + i S_imp (imp or minor demon) + I S_invisible (invisible monster) + J S_jabberwock (jabberwock) + j S_jelly (jelly) + k S_kobold (kobold) + K S_kop (Keystone Kop) + ^ S_land_mine (land mine) + } S_lava (molten lava) + l S_leprechaun (leprechaun) - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -5284,63 +5284,63 @@ - O S_ogre (ogre) - o S_orc (orc) - p S_piercer (piercer) - ^ S_pit (pit) - # S_poisoncloud (poison cloud) - ^ S_polymorph_trap (polymorph trap) - } S_pool (water) - ! S_potion (potion) - P S_pudding (pudding or ooze) - q S_quadruped (quadruped) - Q S_quantmech (quantum mechanic) - = S_ring (ring) - ` S_rock (boulder or statue) - r S_rodent (rodent) - ^ S_rolling_boulder_trap (rolling boulder trap) - . S_room (floor of a room) - / S_rslant (diagonal beam [zap animation]) - ^ S_rust_trap (rust trap) - R S_rustmonst (rust monster or disenchanter) - ? S_scroll (scroll) - # S_sink (sink) - ^ S_sleeping_gas_trap (sleeping gas trap) - S S_snake (snake) - s S_spider (arachnid or centipede) - ^ S_spiked_pit (spiked pit) - ^ S_squeaky_board (squeaky board) - 0 S_ss1 (magic shield 1 of 4) - # S_ss2 (magic shield 2 of 4) - @ S_ss3 (magic shield 3 of 4) - * S_ss4 (magic shield 4 of 4) - ^ S_statue_trap (statue trap) - S_stone (dark part of a room) - ] S_strange_obj (strange object) - - S_sw_bc (swallow bottom center) - \ S_sw_bl (swallow bottom left) - / S_sw_br (swallow bottom right) - | S_sw_ml (swallow middle left) - | S_sw_mr (swallow middle right) - - S_sw_tc (swallow top center) - / S_sw_tl (swallow top left) - \ S_sw_tr (swallow top right) - - S_tdwall (wall) - ^ S_teleportation_trap (teleportation trap) - \ S_throne (opulent throne) - - S_tlcorn (top left corner) - | S_tlwall (wall) - ( S_tool (useful item (pick-axe, key, lamp...)) - ^ S_trap_door (trap door) - t S_trapper (trapper or lurker above) - - S_trcorn (top right corner) - # S_tree (tree) - T S_troll (troll) - | S_trwall (wall) + ^ S_level_teleporter (level teleporter) + L S_lich (lich) + y S_light (light) + # S_litcorr (lit corridor) + : S_lizard (lizard) + \ S_lslant (diagonal beam [zap animation]) + ^ S_magic_portal (magic portal) + ^ S_magic_trap (magic trap) + m S_mimic (mimic) + ] S_mimic_def (mimic) + M S_mummy (mummy) + N S_naga (naga) + . S_ndoor (doorway without door) + n S_nymph (nymph) + O S_ogre (ogre) + o S_orc (orc) + p S_piercer (piercer) + ^ S_pit (pit) + # S_poisoncloud (poison cloud) + ^ S_polymorph_trap (polymorph trap) + } S_pool (water) + ! S_potion (potion) + P S_pudding (pudding or ooze) + q S_quadruped (quadruped) + Q S_quantmech (quantum mechanic) + = S_ring (ring) + ` S_rock (boulder or statue) + r S_rodent (rodent) + ^ S_rolling_boulder_trap (rolling boulder trap) + . S_room (floor of a room) + / S_rslant (diagonal beam [zap animation]) + ^ S_rust_trap (rust trap) + R S_rustmonst (rust monster or disenchanter) + ? S_scroll (scroll) + # S_sink (sink) + ^ S_sleeping_gas_trap (sleeping gas trap) + S S_snake (snake) + s S_spider (arachnid or centipede) + ^ S_spiked_pit (spiked pit) + ^ S_squeaky_board (squeaky board) + 0 S_ss1 (magic shield 1 of 4) + # S_ss2 (magic shield 2 of 4) + @ S_ss3 (magic shield 3 of 4) + * S_ss4 (magic shield 4 of 4) + ^ S_statue_trap (statue trap) + S_stone (solid rock or unexplored terrain + or dark part of a room) + ] S_strange_obj (strange object) + - S_sw_bc (swallow bottom center) + \ S_sw_bl (swallow bottom left) + / S_sw_br (swallow bottom right) + | S_sw_ml (swallow middle left) + | S_sw_mr (swallow middle right) - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -5350,63 +5350,63 @@ - - S_tuwall (wall) - U S_umber (umber hulk) - u S_unicorn (unicorn or horse) - < S_upladder (ladder up) - < S_upstair (staircase up) - V S_vampire (vampire) - | S_vbeam (vertical beam [zap animation]) - # S_vcdbridge (vertical raised drawbridge) - + S_vcdoor (closed door in vertical wall) - . S_venom (splash of venom) - ^ S_vibrating_square (vibrating square) - . S_vodbridge (vertical lowered drawbridge) - - S_vodoor (open door in vertical wall) - v S_vortex (vortex) - | S_vwall (vertical wall) - / S_wand (wand) - } S_water (water) - ) S_weapon (weapon) - " S_web (web) - w S_worm (worm) - ~ S_worm_tail (long worm tail) - W S_wraith (wraith) - x S_xan (xan or other mythical/fantastic insect) - X S_xorn (xorn) - Y S_yeti (apelike creature) - Z S_zombie (zombie) - z S_zruty (zruty) - S_pet_override (pet override if sysconf accessibility is set) - S_player_override (player override if sysconf accessibility is set) + - S_sw_tc (swallow top center) + / S_sw_tl (swallow top left) + \ S_sw_tr (swallow top right) + - S_tdwall (wall) + ^ S_teleportation_trap (teleportation trap) + \ S_throne (opulent throne) + - S_tlcorn (top left corner) + | S_tlwall (wall) + ( S_tool (useful item (pick-axe, key, lamp...)) + ^ S_trap_door (trap door) + t S_trapper (trapper or lurker above) + - S_trcorn (top right corner) + # S_tree (tree) + T S_troll (troll) + | S_trwall (wall) + - S_tuwall (wall) + U S_umber (umber hulk) + u S_unicorn (unicorn or horse) + < S_upladder (ladder up) + < S_upstair (staircase up) + V S_vampire (vampire) + | S_vbeam (vertical beam [zap animation]) + # S_vcdbridge (vertical raised drawbridge) + + S_vcdoor (closed door in vertical wall) + . S_venom (splash of venom) + ^ S_vibrating_square (vibrating square) + . S_vodbridge (vertical lowered drawbridge) + - S_vodoor (open door in vertical wall) + v S_vortex (vortex) + | S_vwall (vertical wall) + / S_wand (wand) + } S_water (water) + ) S_weapon (weapon) + " S_web (web) + w S_worm (worm) + ~ S_worm_tail (long worm tail) + W S_wraith (wraith) + x S_xan (xan or other extraordinary insect) + X S_xorn (xorn) + Y S_yeti (apelike creature) + Z S_zombie (zombie) + z S_zruty (zruty) + S_pet_override (any pet if ACCESSIBILITY=1 is set) + S_player_override (hero if ACCESSIBILITY=1 is set) - 9.15. Configuring NetHack for Play by the Blind + Notes: several symbols in this table appear to be blank. + They are the space character, except for S_pet_override and + S_player_override which don't have any default value and can only + be used if enabled in the "sysconf" file. - NetHack can be set up to use only standard ASCII characters - for making maps of the dungeons. This makes the MS-DOS versions - of NetHack completely accessible to the blind who use speech - and/or Braille access technologies. Players will require a good - working knowledge of their screen-reader's review features, and - will have to know how to navigate horizontally and vertically - character by character. They will also find the search capabili- - ties of their screen-readers to be quite valuable. Be certain to - examine this Guidebook before playing so you have an idea what - the screen layout is like. You'll also need to be able to locate - the PC cursor. It is always where your character is located. - Merely searching for an @-sign will not always find your charac- - ter since there are other humanoids represented by the same sign. - Your screen-reader should also have a function which gives you - the row and column of your review cursor and the PC cursor. - These co-ordinates are often useful in giving players a better - sense of the overall location of items on the screen. - - NetHack can also be compiled with support for sending the - game messages to an external program, such as a text-to-speech - synthesizer. If the "#version" extended command shows "external - program as a message handler", your NetHack has been compiled + S_rock is misleadingly named; rocks and stones use S_gem. + Statues and boulders are the rock being referred to, but since + version 3.6.0, statues are displayed as the monster they depict. + So S_rock is only used for boulders and not used at all if - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -5416,63 +5416,63 @@ + overridden by the more specific S_boulder. + + 9.15. Configuring NetHack for Play by the Blind + + NetHack can be set up to use only standard ASCII characters + for making maps of the dungeons. This makes the MS-DOS versions + of NetHack completely accessible to the blind who use speech + and/or Braille access technologies. Players will require a good + working knowledge of their screen-reader's review features, and + will have to know how to navigate horizontally and vertically + character by character. They will also find the search capabili- + ties of their screen-readers to be quite valuable. Be certain to + examine this Guidebook before playing so you have an idea what + the screen layout is like. You'll also need to be able to locate + the PC cursor. It is always where your character is located. + Merely searching for an @-sign will not always find your charac- + ter since there are other humanoids represented by the same sign. + Your screen-reader should also have a function which gives you + the row and column of your review cursor and the PC cursor. + These co-ordinates are often useful in giving players a better + sense of the overall location of items on the screen. + + NetHack can also be compiled with support for sending the + game messages to an external program, such as a text-to-speech + synthesizer. If the "#version" extended command shows "external + program as a message handler", your NetHack has been compiled with the capability. When compiling NetHack from source on Linux - and other POSIX systems, define MSGHANDLER to enable it. To use - the capability, set the environment variable NETHACK_MSGHANDLER + and other POSIX systems, define MSGHANDLER to enable it. To use + the capability, set the environment variable NETHACK_MSGHANDLER to an executable, which will be executed with the game message as the program's only parameter. - While it is not difficult for experienced users to edit the - defaults.nh file to accomplish this, novices may find this task + While it is not difficult for experienced users to edit the + defaults.nh file to accomplish this, novices may find this task somewhat daunting. Included within the "symbols" file of all of- ficial distributions of NetHack is a symset called NHAccess. Se- - lecting that symset in your configuration file will cause the - game to run in a manner accessible to the blind. After you have - gained some experience with the game and with editing files, you + lecting that symset in your configuration file will cause the + game to run in a manner accessible to the blind. After you have + gained some experience with the game and with editing files, you may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your configuration file to better suit your preferences. See the pre- - vious section for the special symbols S_pet_override to force a - consistent symbol for all pets and S_player_override to force a - unique symbol for the player character if accessibility is en- - abled in the sysconf file. The most crucial settings to make the - game accessible are: + vious section for the special symbols S_pet_override to force a + consistent symbol for all pets and S_player_override to force a + unique symbol for the player character if accessibility is en- + abled in the sysconf file. + + The most crucial settings to make the game more accessible + are: symset:NHAccess Load a symbol set appropriate for use by blind players. roguesymset:NHAccess - Load a symbol set for the rogue level that is appropriate for - use by blind players. - - menustyle:traditional - This will assist in the interface to speech synthesizers. - - nomenu_overlay - Show menus on a cleared screen and aligned to the left edge. - - number_pad - A lot of speech access programs use the number-pad to review - the screen. If this is the case, disable the number_pad option - and use the traditional Rogue-like commands. - - autodescribe - Automatically describe the terrain under the cursor when tar- - geting. - - mention_walls - Give feedback messages when walking towards a wall or when - travel command was interrupted. - - whatis_coord:compass - When targeting with cursor, describe the cursor position with - coordinates relative to your character. - - whatis_filter:area - When targeting with cursor, filter possible locations so only - those in the same area (eg. same room, or same corridor) are + Load a symbol set for the rogue level that is appropriate for - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -5482,50 +5482,89 @@ + use by blind players. + + menustyle:traditional + This will assist in the interface to speech synthesizers. + + nomenu_overlay + Show menus on a cleared screen and aligned to the left edge. + + number_pad + A lot of speech access programs use the number-pad to review + the screen. If this is the case, disable the number_pad option + and use the traditional Rogue-like commands. + + autodescribe + Automatically describe the terrain under the cursor when tar- + geting. + + mention_walls + Give feedback messages when walking towards a wall or when + travel command was interrupted. + + whatis_coord:compass + When targeting with cursor, describe the cursor position with + coordinates relative to your character. + + whatis_filter:area + When targeting with cursor, filter possible locations so only + those in the same area (eg. same room, or same corridor) are considered. whatis_moveskip - When targeting with cursor and using fast-move, skip the same + When targeting with cursor and using fast-move, skip the same glyphs instead of moving 8 units at a time. nostatus_updates - Prevent updates to the status lines at the bottom of the - screen, if your screen-reader reads those lines. The same in- - formation can be seen via the #attributes command. + Prevent updates to the status lines at the bottom of the + screen, if your screen-reader reads those lines. The same in- + formation can be seen via the "#attributes" command. 9.16. Global Configuration for System Administrators - If NetHack is compiled with the SYSCF option, a system ad- - ministrator should set up a global configuration; this is a file + If NetHack is compiled with the SYSCF option, a system ad- + ministrator should set up a global configuration; this is a file in the same format as the traditional per-user configuration file (see above). This file should be named sysconf and placed in the - same directory as the other NetHack support files. The options + same directory as the other NetHack support files. The options recognized in this file are listed below. Any option not set us- - es a compiled-in default (which may not be appropriate for your + es a compiled-in default (which may not be appropriate for your system). - WIZARDS = A space-separated list of user names who are allowed + WIZARDS = A space-separated list of user names who are allowed to play in debug mode (commonly referred to as wizard mode). A value of a single asterisk (*) allows anyone to start a game in debug mode. + + NetHack 3.6 November 2, 2019 + + + + + + NetHack Guidebook 85 + + + SHELLERS = A list of users who are allowed to use the shell es- cape command (!). The syntax is the same as WIZARDS. - EXPLORERS = A list of users who are allowed to use the explore + EXPLORERS = A list of users who are allowed to use the explore mode. The syntax is the same as WIZARDS. MAXPLAYERS = Limit the maximum number of games that can be run- ning at the same time. - SUPPORT = A string explaining how to get local support (no de- + SUPPORT = A string explaining how to get local support (no de- fault value). - RECOVER = A string explaining how to recover a game on this + RECOVER = A string explaining how to recover a game on this system (no default value). - SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE - option. When disabled, incubi and succubi behave like nymphs. + SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE + option. When disabled, incubi and succubi behave like nymphs. CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- ARDS, and SHELLERS check for the player name instead of the us- @@ -5536,18 +5575,6 @@ verify that the user who is restoring is the same one who saved). - - - NetHack 3.6 October 27, 2019 - - - - - - NetHack Guidebook 85 - - - The following options affect the score file: PERSMAX = Maximum number of entries for one person. @@ -5575,6 +5602,18 @@ %T - current time, UNIX timestamp format %d - game start time, YYYYMMDDhhmmss format %D - current time, YYYYMMDDhhmmss format + + + NetHack 3.6 November 2, 2019 + + + + + + NetHack Guidebook 86 + + + %n - player name %N - first character of player name @@ -5602,18 +5641,6 @@ If you just want to see what the current top players/games list is, you can type nethack -s all on most versions. - - - NetHack 3.6 October 27, 2019 - - - - - - NetHack Guidebook 86 - - - 11. Explore mode NetHack is an intricate and difficult game. Novices might @@ -5641,6 +5668,18 @@ vide god-like powers to your character, and players who attempt debugging are expected to figure out how to use it themselves. It is initiated by starting the game with the -D command-line + + + NetHack 3.6 November 2, 2019 + + + + + + NetHack Guidebook 87 + + + switch or with the playmode:debug option. For some systems, the player must be logged in under a par- @@ -5668,18 +5707,6 @@ Andries Brouwer did a major re-write, transforming Hack into a very different game, and published (at least) three versions - - - NetHack 3.6 October 27, 2019 - - - - - - NetHack Guidebook 87 - - - (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, @@ -5693,50 +5720,23 @@ Mike Stephenson merged these various versions back together, incorporating many of the added features, and produced NetHack 1.4. He then coordinated a cast of thousands in enhancing and - debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. + debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. Later, Mike coordinated a major rewrite of the game, heading a team which included Ken Arromdee, Jean-Christophe Collet, Steve Creps, Eric Hendrickson, Izchak Miller, John Rupley, Mike Threep- oint, and Janet Walz, to produce NetHack 3.0c. - NetHack 3.0 was ported to the Atari by Eric R. Smith, to - OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three + NetHack 3.0 was ported to the Atari by Eric R. Smith, to + OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three of them and Kevin Darcy later joined the main NetHack Development Team to produce subsequent revisions of 3.0. - Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm - Meluch, Stephen Spackman and Pierre Martineau designed overlay - code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the - Macintosh. Along with various other Dungeoneers, they continued - to enhance the PC, Macintosh, and Amiga ports through the later - revisions of 3.0. - - Headed by Mike Stephenson and coordinated by Izchak Miller - and Janet Walz, the NetHack Development Team which now included - Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, - Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, - Eric Raymond, and Eric Smith undertook a radical revision of 3.0. - They re-structured the game's design, and re-wrote major parts of - the code. They added multiple dungeons, a new display, special - individual character quests, a new endgame and many other new - features, and produced NetHack 3.1. - - Ken Lorber, Gregg Wonderly and Greg Olson, with help from - Richard Addison, Mike Passaretti, and Olaf Seibert, developed - NetHack 3.1 for the Amiga. - - Norm Meluch and Kevin Smolkowski, with help from Carl Sche- - lin, Stephen Spackman, Steve VanDevender, and Paul Winner, ported - NetHack 3.1 to the PC. - - Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike - Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny - Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack - 3.1 for the Macintosh, porting it for MPW. Building on their + Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm + Meluch, Stephen Spackman and Pierre Martineau designed overlay - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -5746,63 +5746,63 @@ - development, Barton House added a Think C port. + code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the + Macintosh. Along with various other Dungeoneers, they continued + to enhance the PC, Macintosh, and Amiga ports through the later + revisions of 3.0. + + Headed by Mike Stephenson and coordinated by Izchak Miller + and Janet Walz, the NetHack Development Team which now included + Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, + Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, + Eric Raymond, and Eric Smith undertook a radical revision of 3.0. + They re-structured the game's design, and re-wrote major parts of + the code. They added multiple dungeons, a new display, special + individual character quests, a new endgame and many other new + features, and produced NetHack 3.1. + + Ken Lorber, Gregg Wonderly and Greg Olson, with help from + Richard Addison, Mike Passaretti, and Olaf Seibert, developed + NetHack 3.1 for the Amiga. + + Norm Meluch and Kevin Smolkowski, with help from Carl Sche- + lin, Stephen Spackman, Steve VanDevender, and Paul Winner, ported + NetHack 3.1 to the PC. + + Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike + Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny + Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack + 3.1 for the Macintosh, porting it for MPW. Building on their de- + velopment, Bart House added a Think C port. Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith port- - ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua - Delahunty, was responsible for the VMS version of NetHack 3.1. + ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua + Delahunty, was responsible for the VMS version of NetHack 3.1. Michael Allison ported NetHack 3.1 to Windows NT. - Dean Luick, with help from David Cohrs, developed NetHack - 3.1 for X11. Warwick Allison wrote a tiled version of NetHack - for the Atari; he later contributed the tiles to the NetHack De- - velopment Team and tile support was then added to other plat- + Dean Luick, with help from David Cohrs, developed NetHack + 3.1 for X11. Warwick Allison wrote a tiled version of NetHack + for the Atari; he later contributed the tiles to the NetHack De- + velopment Team and tile support was then added to other plat- forms. The 3.2 NetHack Development Team, comprised of Michael Alli- son, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Er- - ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released + ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released version 3.2 in April of 1996. Version 3.2 marked the tenth anniversary of the formation of - the development team. In a testament to their dedication to the - game, all thirteen members of the original NetHack Development - Team remained on the team at the start of work on that release. - During the interval between the release of 3.1.3 and 3.2, one of - the founding members of the NetHack Development Team, Dr. Izchak - Miller, was diagnosed with cancer and passed away. That release - of the game was dedicated to him by the development and porting - teams. - - During the lifespan of NetHack 3.1 and 3.2, several enthusi- - asts of the game added their own modifications to the game and - made these "variants" publicly available: - - Tom Proudfoot and Yuval Oren created NetHack++, which was - quickly renamed NetHack--. Working independently, Stephen White - wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and - his own NetHack-- to produce SLASH. Larry Stewart-Zerba and War- - wick Allison improved the spell casting system with the Wizard - Patch. Warwick Allison also ported NetHack to use the Qt inter- - face. - - Warren Cheung combined SLASH with the Wizard Patch to pro- - duce Slash'EM, and with the help of Kevin Hugo, added more fea- - tures. Kevin later joined the NetHack Development Team and in- - corporated the best of these ideas in NetHack 3.3. - - The final update to 3.2 was the bug fix release 3.2.3, which - was released simultaneously with 3.3.0 in December 1999 just in - time for the Year 2000. - - The 3.3 NetHack Development Team, consisting of Michael Al- - lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, - Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- - ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet + the development team. In a testament to their dedication to the + game, all thirteen members of the original NetHack Development + Team remained on the team at the start of work on that release. + During the interval between the release of 3.1.3 and 3.2, one of + the founding members of the NetHack Development Team, Dr. Izchak + Miller, was diagnosed with cancer and passed away. That release + of the game was dedicated to him by the development and porting - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -5812,63 +5812,63 @@ - Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 + teams. + + During the lifespan of NetHack 3.1 and 3.2, several enthusi- + asts of the game added their own modifications to the game and + made these "variants" publicly available: + + Tom Proudfoot and Yuval Oren created NetHack++, which was + quickly renamed NetHack--. Working independently, Stephen White + wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and + his own NetHack-- to produce SLASH. Larry Stewart-Zerba and War- + wick Allison improved the spell casting system with the Wizard + Patch. Warwick Allison also ported NetHack to use the Qt inter- + face. + + Warren Cheung combined SLASH with the Wizard Patch to pro- + duce Slash'EM, and with the help of Kevin Hugo, added more fea- + tures. Kevin later joined the NetHack Development Team and in- + corporated the best of these ideas in NetHack 3.3. + + The final update to 3.2 was the bug fix release 3.2.3, which + was released simultaneously with 3.3.0 in December 1999 just in + time for the Year 2000. + + The 3.3 NetHack Development Team, consisting of Michael Al- + lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, + Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- + ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet + Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 in August of 2000. Version 3.3 offered many firsts. It was the first version to - separate race and profession. The Elf class was removed in pref- + separate race and profession. The Elf class was removed in pref- erence to an elf race, and the races of dwarves, gnomes, and orcs - made their first appearance in the game alongside the familiar - human race. Monk and Ranger roles joined Archeologists, Barbar- - ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, - Tourists, Valkyries and of course, Wizards. It was also the - first version to allow you to ride a steed, and was the first - version to have a publicly available web-site listing all the - bugs that had been discovered. Despite that constantly growing - bug list, 3.3 proved stable enough to last for more than a year + made their first appearance in the game alongside the familiar + human race. Monk and Ranger roles joined Archeologists, Barbar- + ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, + Tourists, Valkyries and of course, Wizards. It was also the + first version to allow you to ride a steed, and was the first + version to have a publicly available web-site listing all the + bugs that had been discovered. Despite that constantly growing + bug list, 3.3 proved stable enough to last for more than a year and a half. - The 3.4 NetHack Development Team initially consisted of - Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin - Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet - Walz, and Paul Winner, with Warwick Allison joining just before + The 3.4 NetHack Development Team initially consisted of + Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin + Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet + Walz, and Paul Winner, with Warwick Allison joining just before the release of NetHack 3.4.0 in March 2002. - As with version 3.3, various people contributed to the game + As with version 3.3, various people contributed to the game as a whole as well as supporting ports on the different platforms that NetHack runs on: - Pat Rankin maintained 3.4 for VMS. - - Michael Allison maintained NetHack 3.4 for the MS-DOS plat- - form. Paul Winner and Yitzhak Sapir provided encouragement. - - Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- - hanced the Macintosh port of 3.4. - - Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, - and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft - Windows platform. Alex Kompel contributed a new graphical inter- - face for the Windows port. Alex Kompel also contributed a Win- - dows CE port for 3.4.1. - - Ron Van Iwaarden was the sole maintainer of NetHack for OS/2 - the past several releases. Unfortunately Ron's last OS/2 machine - stopped working in early 2006. A great many thanks to Ron for - keeping NetHack alive on OS/2 all these years. - - Janne Salmijarvi and Teemu Suikki maintained and enhanced - the Amiga port of 3.4 after Janne Salmijarvi resurrected it for - 3.3.1. - - Christian "Marvin" Bressler maintained 3.4 for the Atari af- - ter he resurrected it for 3.3.1. - - The release of NetHack 3.4.3 in December 2003 marked the be- - ginning of a long release hiatus. 3.4.3 proved to be a remarkably - NetHack 3.6 October 27, 2019 + + NetHack 3.6 November 2, 2019 @@ -5878,63 +5878,63 @@ + Pat Rankin maintained 3.4 for VMS. + + Michael Allison maintained NetHack 3.4 for the MS-DOS plat- + form. Paul Winner and Yitzhak Sapir provided encouragement. + + Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- + hanced the Macintosh port of 3.4. + + Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, + and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft + Windows platform. Alex Kompel contributed a new graphical inter- + face for the Windows port. Alex Kompel also contributed a Win- + dows CE port for 3.4.1. + + Ron Van Iwaarden was the sole maintainer of NetHack for OS/2 + the past several releases. Unfortunately Ron's last OS/2 machine + stopped working in early 2006. A great many thanks to Ron for + keeping NetHack alive on OS/2 all these years. + + Janne Salmijarvi and Teemu Suikki maintained and enhanced + the Amiga port of 3.4 after Janne Salmijarvi resurrected it for + 3.3.1. + + Christian "Marvin" Bressler maintained 3.4 for the Atari af- + ter he resurrected it for 3.3.1. + + The release of NetHack 3.4.3 in December 2003 marked the be- + ginning of a long release hiatus. 3.4.3 proved to be a remarkably stable version that provided continued enjoyment by the community - for more than a decade. The NetHack Development Team 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 + for more than a decade. The NetHack Development Team slowly and + quietly continued to work on the game behind the scenes during + the tenure of 3.4.3. It was during that same period that several new variants emerged within the NetHack community. Notably sporkhack by Derek S. Ray, unnethack by Patric Mueller, nitrohack - and its successors originally by Daniel Thaler and then by Alex - Smith, and Dynahack by Tung Nguyen. Some of those variants con- - tinue to be developed, maintained, and enjoyed by the community + and its successors originally by Daniel Thaler and then by Alex + Smith, and Dynahack by Tung Nguyen. Some of those variants con- + tinue to be developed, maintained, and enjoyed by the community to this day. In September 2014, an interim snapshot of the code under de- velopment was released publicly by other parties. Since that code - was a work-in-progress and had not gone through the process of - debugging it as a suitable release, it was decided that the ver- - sion numbers present on that code snapshot would be retired and - never used in an official NetHack release. An announcement was - posted on the NetHack Development Team's official nethack.org - website to that effect, stating that there would never be a + was a work-in-progress and had not gone through the process of + debugging it as a suitable release, it was decided that the ver- + sion numbers present on that code snapshot would be retired and + never used in an official NetHack release. An announcement was + posted on the NetHack Development Team's official nethack.org + website to that effect, stating that there would never be a 3.4.4, 3.5, or 3.5.0 official release version. - In January 2015, preparation began for the release of + In January 2015, preparation began for the release of NetHack 3.6. - At the beginning of development for what would eventually - get released as 3.6.0, the NetHack Development Team consisted of - Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, - Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- - son, Janet Walz, and Paul Winner. In early 2015, ahead of the - release of 3.6.0, new members Sean Hunt, Pasi Kallinen, and Derek - S. Ray joined the NetHack Development Team. - - Near the end of the development of 3.6.0, one of the signif- - icant inspirations for many of the humorous and fun features - found in the game, author Terry Pratchett, passed away. NetHack - 3.6.0 introduced a tribute to him. - - 3.6.0 was released in December 2015, and merged work done by - the development team since the release of 3.4.3 with some of the - beloved community patches. Many bugs were fixed and some code was - restructured. - - The NetHack Development Team, as well as Steve VanDevender - and Kevin Smolkowski, ensured that NetHack 3.6 continued to oper- - ate on various UNIX flavors and maintained the X11 interface. - - Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- - tained the port of NetHack 3.6 for Mac OSX. - - Michael Allison, David Cohrs, Barton House, Pasi Kallinen, - Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- - tained the port of NetHack 3.6 for Microsoft Windows. + At the beginning of development for what would eventually + get released as 3.6.0, the NetHack Development Team consisted of - - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -5944,63 +5944,63 @@ - Pat Rankin attempted to keep the VMS port running for + Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, + Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- + son, Janet Walz, and Paul Winner. In early 2015, ahead of the + release of 3.6.0, new members Sean Hunt, Pasi Kallinen, and Derek + S. Ray joined the NetHack Development Team. + + Near the end of the development of 3.6.0, one of the signif- + icant inspirations for many of the humorous and fun features + found in the game, author Terry Pratchett, passed away. NetHack + 3.6.0 introduced a tribute to him. + + 3.6.0 was released in December 2015, and merged work done by + the development team since the release of 3.4.3 with some of the + beloved community patches. Many bugs were fixed and some code was + restructured. + + The NetHack Development Team, as well as Steve VanDevender + and Kevin Smolkowski, ensured that NetHack 3.6 continued to oper- + ate on various UNIX flavors and maintained the X11 interface. + + Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- + tained the port of NetHack 3.6 for Mac OSX. + + Michael Allison, David Cohrs, Bart House, Pasi Kallinen, + Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- + tained the port of NetHack 3.6 for Microsoft Windows. + + Pat Rankin attempted to keep the VMS port running for NetHack 3.6, hindered by limited access. Kevin Smolkowski has up- - dated and tested it for the most recent version of OpenVMS (V8.4 + dated 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. - Ray Chason resurrected the msdos port for 3.6 and contrib- + Ray Chason resurrected the msdos port for 3.6 and contrib- uted the necessary updates to the community at large. - In late April 2018, several hundred bug fixes for 3.6.0 and - some new features were assembled and released as NetHack 3.6.1. + In late April 2018, several hundred bug fixes for 3.6.0 and + some new features were assembled and released as NetHack 3.6.1. The NetHack Development Team at the time of release of 3.6.1 con- - sisted of Warwick Allison, Michael Allison, Ken Arromdee, David - Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, - Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike + sisted of Warwick Allison, Michael Allison, Ken Arromdee, David + Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, + Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz, and Paul Winner. In early May 2019, another 320 bug fixes along with some en- - hancements and the adopted curses window port, were released as + hancements and the adopted curses window port, were released as 3.6.2. + Bart House, who had contributed to the game as a porting + team participant for decades, joined the NetHack Development Team + in late May 2019. + The official NetHack web site is maintained by Ken Lorber at http://www.nethack.org/. - 12.1. SPECIAL THANKS - On behalf of the NetHack community, thank you very much once - again to M. Drew Streib and Pasi Kallinen for providing a public - NetHack server at nethack.alt.org. Thanks to Keith Simpson and - Andy Thomson for hardfought.org. Thanks to all those unnamed dun- - geoneers who invest their time and effort into annual NetHack - tournaments such as Junethack, The November NetHack Tournament - and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out - with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list - of Dungeoneers: - Adam Aronow Janet Walz Nathan Eady - Alex Kompel Janne Salmijarvi Norm Meluch - Alex Smith Jean-Christophe Collet Olaf Seibert - Andreas Dorn Jeff Bailey Pasi Kallinen - Andy Church Jochen Erwied Pat Rankin - Andy Swanson John Kallen Patric Mueller - Ari Huttunen John Rupley Paul Winner - Barton House John S. Bien Pierre Martineau - Benson I. Margulies Johnny Lee Ralf Brown - Bill Dyer Jon W{tte Ray Chason - Boudewijn Waijers Jonathan Handler Richard Addison - Bruce Cox Joshua Delahunty Richard Beigel - - - - NetHack 3.6 October 27, 2019 + NetHack 3.6 November 2, 2019 @@ -6010,35 +6010,78 @@ - Bruce Holloway Karl Garrison Richard P. Hughey - Bruce Mewborne Keizo Yamamoto Rob Menke - Carl Schelin Ken Arnold Robin Bandy - Chris Russo Ken Arromdee Robin Johnson - David Cohrs Ken Lorber Roderick Schertler - David Damerell Ken Washikita Roland McGrath - David Gentzel Kevin Darcy Ron Van Iwaarden - David Hairston Kevin Hugo Ronnen Miller - Dean Luick Kevin Sitze Ross Brown - Del Lamb Kevin Smolkowski Sascha Wostmann - Derek S. Ray Kevin Sweet Scott Bigham - Deron Meranda Lars Huttar Scott R. Turner - Dion Nicolaas Leon Arnott Sean Hunt - Dylan O'Donnell M. Drew Streib Stephen Spackman - Eric Backus Malcolm Ryan Stefan Thielscher - Eric Hendrickson Mark Gooderum Stephen White - Eric R. Smith Mark Modrall Steve Creps - Eric S. Raymond Marvin Bressler Steve Linhart - Erik Andersen Matthew Day Steve VanDevender - Frederick Roeber Merlyn LeRoy Teemu Suikki - Gil Neiger Michael Allison Tim Lennan - Greg Laskin Michael Feir Timo Hakulinen - Greg Olson Michael Hamel Tom Almy - Gregg Wonderly Michael Sokolov Tom West - Hao-yang Wang Mike Engber Warren Cheung - Helge Hafting Mike Gallop Warwick Allison - Irina Rempt-Drijfhout Mike Passaretti Yitzhak Sapir - Izchak Miller Mike Stephenson - J. Ali Harlow Mikko Juola + 12.1. SPECIAL THANKS + + On behalf of the NetHack community, thank you very much once + again to M. Drew Streib and Pasi Kallinen for providing a public + NetHack server at nethack.alt.org. Thanks to Keith Simpson and + Andy Thomson for hardfought.org. Thanks to all those unnamed dun- + geoneers who invest their time and effort into annual NetHack + tournaments such as Junethack, The November NetHack Tournament + and in days past, devnull.net (gone for now, but not forgotten). + + - - - - - - - - - - + + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out + with the game. The NetHack Development Team sometimes makes note + of the names of the worst of these miscreants in this, the list + of Dungeoneers: + Adam Aronow J. Ali Harlow Mikko Juola + Alex Kompel Janet Walz Nathan Eady + Alex Smith Janne Salmijarvi Norm Meluch + Andreas Dorn Jean-Christophe Collet Olaf Seibert + Andy Church Jeff Bailey Pasi Kallinen + Andy Swanson Jochen Erwied Pat Rankin + Andy Thomson John Kallen Patric Mueller + Ari Huttunen John Rupley Paul Winner + Bart House John S. Bien Pierre Martineau + Benson I. Margulies Johnny Lee Ralf Brown + Bill Dyer Jon W{tte Ray Chason + Boudewijn Waijers Jonathan Handler Richard Addison + Bruce Cox Joshua Delahunty Richard Beigel + Bruce Holloway Karl Garrison Richard P. Hughey + Bruce Mewborne Keizo Yamamoto Rob Menke + Carl Schelin Keith Simpson Robin Bandy + Chris Russo Ken Arnold Robin Johnson + David Cohrs Ken Arromdee Roderick Schertler + David Damerell Ken Lorber Roland McGrath + David Gentzel Ken Washikita Ron Van Iwaarden + David Hairston Kevin Darcy Ronnen Miller + Dean Luick Kevin Hugo Ross Brown + Del Lamb Kevin Sitze Sascha Wostmann + Derek S. Ray Kevin Smolkowski Scott Bigham + Deron Meranda Kevin Sweet Scott R. Turner + Dion Nicolaas Lars Huttar Sean Hunt + Dylan O'Donnell Leon Arnott Stephen Spackman + Eric Backus M. Drew Streib Stefan Thielscher + Eric Hendrickson Malcolm Ryan Stephen White + Eric R. Smith Mark Gooderum Steve Creps + Eric S. Raymond Mark Modrall Steve Linhart + Erik Andersen Marvin Bressler Steve VanDevender + Fredrik Ljungdahl Matthew Day Teemu Suikki + Frederick Roeber Merlyn LeRoy Tim Lennan + Gil Neiger Michael Allison Timo Hakulinen + Greg Laskin Michael Feir Tom Almy + + + + NetHack 3.6 November 2, 2019 + + + + + + NetHack Guidebook 93 + + + + Greg Olson Michael Hamel Tom West + Gregg Wonderly Michael Sokolov Warren Cheung + Hao-yang Wang Mike Engber Warwick Allison + Helge Hafting Mike Gallop Yitzhak Sapir + Irina Rempt-Drijfhout Mike Passaretti + Izchak Miller Mike Stephenson Brand and product names are trademarks or registered trade- marks of their respective holders. @@ -6066,7 +6109,30 @@ - NetHack 3.6 October 27, 2019 + + + + + + + + + + + + + + + + + + + + + + + + NetHack 3.6 November 2, 2019 From 0b861f64e67d477d78e0675cf94cbcb56f0f2e7a Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 28 Jun 2019 18:38:20 -0400 Subject: [PATCH 141/529] merge bit --- win/curses/cursdial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/curses/cursdial.c b/win/curses/cursdial.c index 6d2bed525..9ea8bcc4d 100644 --- a/win/curses/cursdial.c +++ b/win/curses/cursdial.c @@ -992,7 +992,7 @@ menu_win_size(nhmenu *menu) int maxheaderwidth = 0; nhmenu_item *menu_item_ptr; - if (program_state.gameover) { + if (g.program_state.gameover) { /* for final inventory disclosure, use full width */ maxwidth = term_cols - 2; } else { From be94808d67f58eead51c741e27b7cd8897312f31 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 28 Jun 2019 18:59:06 -0400 Subject: [PATCH 142/529] build fix for Windows if pdcurses is included after recent changes cursmain.o : error LNK2001: unresolved external symbol _erase_char cursmesg.o : error LNK2001: unresolved external symbol _erase_char cursmain.o : error LNK2001: unresolved external symbol _kill_char cursmesg.o : error LNK2001: unresolved external symbol _kill_char --- sys/winnt/Makefile.msc | 3 ++- win/win32/vs2017/NetHack.vcxproj | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index cf6374e5e..0038e12ab 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -648,7 +648,8 @@ DLB = #========================================== {$(WCURSES)}.c{$(OBJ)}.o: - @$(cc) -DPDC_NCMOUSE $(PDCINCL) $(cflagsBuild) -Fo$@ $< + @$(cc) -DPDC_NCMOUSE -DCURSES_DEFINE_ERASE_CHAR \ + $(PDCINCL) $(cflagsBuild) -Fo$@ $< #{$(WCURSES)}.txt{$(DAT)}.txt: # @copy $< $@ diff --git a/win/win32/vs2017/NetHack.vcxproj b/win/win32/vs2017/NetHack.vcxproj index cfa359be4..44329ac77 100644 --- a/win/win32/vs2017/NetHack.vcxproj +++ b/win/win32/vs2017/NetHack.vcxproj @@ -31,7 +31,7 @@ $(PDCURSES);%(AdditionalIncludeDirectories) - CURSES_GRAPHICS;CHTYPE_32;%(PreprocessorDefinitions) + CURSES_GRAPHICS;CHTYPE_32;PDC_NCMOUSE;CURSES_DEFINE_ERASE_CHAR;%(PreprocessorDefinitions) $(ToolsDir) From de44286d794549d125683594ba87f750564dc099 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 28 Jun 2019 17:00:20 -0700 Subject: [PATCH 143/529] curses+EDIT_GETLIN again Turns the "fix" in commit 319dcf4746a81ef0ca413491bdf30b4c08f931c2 handled removing the default answer for single-line-prompt plus multi-line-answer but not for multi-line-prompt plus long-enough- answer-to-reach-another-line. The logic wasn't quite right and I misunderstood what is stored in linestarts[] so even correct logic wouldn't have solved things. --- doc/fixes36.3 | 5 ++++- win/curses/cursmesg.c | 13 +++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 5b177c06e..648ef6902 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.77 $ $NHDT-Date: 1561751390 2019/06/28 19:49:50 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.78 $ $NHDT-Date: 1561766416 2019/06/29 00:00:16 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -177,6 +177,9 @@ curses+'popup_dialog': show the text cursor at the end of prompts for single character input curses+EDIT_GETLIN: when a prompt's answer was preloaded, using ESC to discard it deleted it from the answer buffer but didn't erase it from screen +curses+EDIT_GETLIN: the preceding fix handled an answer which spanned more + than one line but didn't remove the answer properly if the prompt + portion of prompt+answer spanned more than one line tty: re-do one optimization used when status conditions have all been removed and remove another that tried to check whether condition text to be displayed next was the same as the existing value; sometimes new diff --git a/win/curses/cursmesg.c b/win/curses/cursmesg.c index b0a28b15b..0e67787a0 100644 --- a/win/curses/cursmesg.c +++ b/win/curses/cursmesg.c @@ -550,12 +550,13 @@ curses_message_win_getline(const char *prompt, char *answer, int buffer) if that is called for; find where the end of the prompt will be without the answer appended */ while (ltmp2 > 0) { - ltmp2 -= ltmp; + if ((ltmp2 -= ltmp) < 0) { + ltmp = -ltmp2; + break; + } promptline -= 1; - ltmp = (int) strlen(linestarts[promptline]); + ltmp = linestarts[promptline + 1] - linestarts[promptline]; } - if (ltmp2 < 0) - ltmp = -ltmp2; promptx = ltmp + border_space; } #endif @@ -597,11 +598,11 @@ curses_message_win_getline(const char *prompt, char *answer, int buffer) #endif curs_set(0); - if (erase_char && ch == erase_char) { + if (erase_char && ch == (int) (uchar) erase_char) { ch = '\177'; /* match switch-case below */ /* honor kill_char if it's ^U or similar, but not if it's '@' */ - } else if (kill_char && ch == kill_char + } else if (kill_char && ch == (int) (uchar) kill_char && (ch < ' ' || ch >= '\177')) { /*ASCII*/ if (len == 0) /* nothing to kill; just start over */ continue; From 0c7e740b446beb4034b30d1d141545d6ac3346ec Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 30 Jun 2019 01:09:41 -0400 Subject: [PATCH 144/529] update Windows Makefiles to support TRAVIS CI builds --- sys/winnt/Makefile.gcc | 80 ++++++++++++++++++++++++++---------------- sys/winnt/Makefile.msc | 11 +++--- sys/winnt/stubs.c | 3 ++ 3 files changed, 58 insertions(+), 36 deletions(-) diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 1f1272ab4..5fd3181da 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -138,6 +138,13 @@ SKIP_NETHACKW=Y #============================================================================== +# The version of the game this Makefile was designed for +NETHACK_VERSION="3.6.3" + +# A brief version for use in macros +NHV1=$(subst .,,$(NETHACK_VERSION)) +NHV=$(subst ",,$(NHV1)) + # # Source directories. Makedefs hardcodes these, don't change them. # @@ -336,7 +343,7 @@ ifneq "$(SKIP_NETHACKW)" "Y" GUIOBJ = $(O)mhaskyn.o $(O)mhdlg.o \ $(O)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \ $(O)mhmenu.o $(O)mhmsgwnd.o $(O)mhrip.o $(O)mhsplash.o \ - $(O)mhstatus.o $(O)mhtext.o $(O)mswproc.o $(O)winhack.o + $(O)mhstatus.o $(O)mhtext.o $(O)mswproc.o $(O)NetHackW.o endif @@ -475,10 +482,18 @@ endif #========================================== #========================================== +ifndef TRAVIS_COMPILER cc = i686-w64-mingw32-gcc.exe cxx = g++ rc = windres link = i686-w64-mingw32-gcc.exe +else +cc = gcc +cxx = g++ +rc = windres +link = gcc +endif + ifeq "$(WANT_WIN_QT4)" "Y" link = g++ endif @@ -547,7 +562,7 @@ lflags = $(LFLAGSBASEC) $(linkdebuf) CXXFLAGS = $(CFLAGS) ifeq "$(USE_DLB)" "Y" -DLB = nhdat +DLB = nhdat$(NHV) else DLB = endif @@ -620,11 +635,11 @@ $(OBJ)/%.o : $(MSWIN)/%.c $(cc) $(CFLAGS) -o$@ $< #========================================== -# Rules for files in win\curses +# Rules for files in win/curses #========================================== $(OBJ)/%.o : $(WCURSES)/%.c - $(cc) $(PDCINCL) $(CFLAGS) -o$@ $< + $(cc) -DPDC_NCMOUSE $(PDCINCL) $(CFLAGS) -o$@ $< #========================================== # Rules for files in PDCurses @@ -728,16 +743,20 @@ default : install all : install -install: initialchk $(GAMEDIR)/NetHack.exe $(U)uudecode.exe $(O)winres.o \ - $(NETHACKW_EXE) install.tag $(EXTRA_FILES) +install: initialchk $(O)utility.tag $(GAMEDIR)/NetHack.exe $(NETHACKW_EXE) \ + $(O)install.tag $(EXTRA_FILES) @echo NetHack is up to date. @echo Done. - -install.tag: $(DAT)/data $(DAT)/rumors $(DAT)/dungeon \ - $(DAT)/oracles $(DAT)/quest.dat sp_lev.tag $(DLB) +$(O)install.tag: $(DAT)/data $(DAT)/rumors $(DAT)/dungeon \ + $(DAT)/oracles $(DAT)/quest.dat $(O)sp_lev.tag $(DLB) +ifdef TRAVIS_COMPILER + ls -l $(SRC) + ls -l $(DAT) + ls -l $(UTIL) +endif ifeq "$(USE_DLB)" "Y" - $(subst /,\,copy nhdat $(GAMEDIR)) + $(subst /,\,copy nhdat$(NHV) $(GAMEDIR)) $(subst /,\,copy $(DAT)/license $(GAMEDIR)) $(subst /,\,copy $(DAT)/opthelp $(GAMEDIR)) else @@ -762,7 +781,7 @@ recover: $(U)recover.exe $(subst /,\,if exist $(U)recover.exe copy $(U)recover.exe $(GAMEDIR)) $(subst /,\,if exist $(DOC)/recover.txt copy $(DOC)/recover.txt $(GAMEDIR)/recover.txt) -sp_lev.tag: utility.tag $(DAT)/bigroom.des $(DAT)/castle.des \ +$(O)sp_lev.tag: $(O)utility.tag $(DAT)/bigroom.des $(DAT)/castle.des \ $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \ $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \ $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \ @@ -796,9 +815,9 @@ sp_lev.tag: utility.tag $(DAT)/bigroom.des $(DAT)/castle.des \ $(subst /,\,$(U)levcomp $(DAT)/wizard.des) $(subst /,\,copy *.lev $(DAT)) $(subst /,\,del *.lev) - $(subst /,\,echo sp_levs done > sp_lev.tag) + $(subst /,\,echo sp_levs done > $(O)sp_lev.tag) -utility.tag: $(INCL)/date.h $(INCL)/onames.h $(INCL)/pm.h \ +$(O)utility.tag: $(INCL)/date.h $(INCL)/onames.h $(INCL)/pm.h \ $(SRC)/vis_tab.c $(U)levcomp.exe $(INCL)/vis_tab.h \ $(U)dgncomp.exe $(TILEUTIL16) $(subst /,\,@echo utilities made >$@) @@ -807,11 +826,11 @@ utility.tag: $(INCL)/date.h $(INCL)/onames.h $(INCL)/pm.h \ tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe @echo Optional tile development utilities are up to date. -$(O)winres.o: $(TILEBMP16) $(MSWIN)/winhack.rc $(MSWIN)/mnsel.bmp \ +$(O)winres.o: $(TILEBMP16) $(MSWIN)/NetHackW.rc $(MSWIN)/mnsel.bmp \ $(MSWIN)/mnselcnt.bmp $(MSWIN)/mnunsel.bmp \ $(MSWIN)/petmark.bmp $(MSWIN)/pilemark.bmp $(MSWIN)/NetHack.ico $(MSWIN)/rip.bmp \ $(MSWIN)/splash.bmp - $(rc) -o$@ --include-dir $(MSWIN) -i $(MSWIN)/winhack.rc + $(rc) -o$@ --include-dir $(MSWIN) -i $(MSWIN)/NetHackW.rc $(O)conres.o: $(MSWSYS)/console.rc $(MSWSYS)/NetHack.ico $(rc) -o$@ --include-dir $(MSWSYS) -i $(MSWSYS)/console.rc @@ -830,7 +849,7 @@ $(GAMEDIR)/NetHack.exe : gamedir.tag $(PDCLIB) $(O)tile.o $(O)nttty.o $(O)guistu @echo Linking $@... $(link) $(lflags) -o$@ $(ALLOBJ) $(TTYOBJ) $(O)nttty.o $(O)tile.o \ $(O)guistub.o $(O)conres.o $(PDCLIB) $(conlibs) -static -lstdc++ - $(subst /,\,@if exist install.tag del install.tag) + $(subst /,\,@if exist $(O)install.tag del $(O)install.tag) # NetHackW # full tty linkage libs: @@ -846,7 +865,7 @@ $(GAMEDIR)/NetHackW.exe : gamedir.tag $(PDCLIB) $(O)tile.o $(O)ttystub.o \ @echo Linking $@... $(link) $(lflags) -mwindows -o$@ $(ALLOBJ) $(GUIOBJ) $(O)tile.o $(O)ttystub.o \ $(O)winres.o $(PDCLIB) $(guilibs) -static -lstdc++ - $(subst /,\,@if exist install.tag del install.tag) + $(subst /,\,@if exist $(O)install.tag del $(O)install.tag) endif $(O)nhdefkey.o: @@ -926,16 +945,16 @@ $(INCL)/vis_tab.h: $(U)makedefs.exe $(SRC)/vis_tab.c: $(U)makedefs.exe $(subst /,\,$(U)makedefs -z) -$(DAT)/data: utility.tag $(DATABASE) +$(DAT)/data: $(O)utility.tag $(DATABASE) $(subst /,\,$(U)makedefs -d) -$(DAT)/rumors: utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal +$(DAT)/rumors: $(O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal $(subst /,\,$(U)makedefs -r) -$(DAT)/quest.dat: utility.tag $(DAT)/quest.txt +$(DAT)/quest.dat: $(O)utility.tag $(DAT)/quest.txt $(subst /,\,$(U)makedefs -q) -$(DAT)/oracles: utility.tag $(DAT)/oracles.txt +$(DAT)/oracles: $(O)utility.tag $(DAT)/oracles.txt $(subst /,\,$(U)makedefs -h) $(DAT)/engrave: $(DAT)/engrave.txt $(U)makedefs.exe @@ -947,7 +966,7 @@ $(DAT)/epitaph: $(DAT)/epitaph.txt $(U)makedefs.exe $(DAT)/bogusmon: $(DAT)/bogusmon.txt $(U)makedefs.exe $(subst /,\,$(U)makedefs -s) -$(DAT)/dungeon: utility.tag $(DAT)/dungeon.def +$(DAT)/dungeon: $(O)utility.tag $(DAT)/dungeon.def $(subst /,\,$(U)makedefs -e) $(subst /,\,$(U)dgncomp $(DAT)/dungeon.pdf) @@ -1099,10 +1118,11 @@ $(O)dlb_main.o: $(UTIL)/dlb_main.c $(INCL)/config.h $(INCL)/dlb.h $(DAT)/porthelp: $(MSWSYS)/porthelp $(subst /,\,@copy $(MSWSYS)/porthelp $@ >nul) -nhdat: $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \ +nhdat$(NHV): $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \ $(DAT)/quest.dat $(DAT)/rumors $(DAT)/help $(DAT)/hh $(DAT)/cmdhelp $(DAT)/keyhelp \ $(DAT)/history $(DAT)/opthelp $(DAT)/wizhelp $(DAT)/dungeon \ - $(DAT)/porthelp $(DAT)/license $(DAT)/engrave $(DAT)/epitaph $(DAT)/bogusmon $(DAT)/tribute sp_lev.tag + $(DAT)/porthelp $(DAT)/license $(DAT)/engrave \ + $(DAT)/epitaph $(DAT)/bogusmon $(DAT)/tribute $(O)sp_lev.tag $(subst /,\,echo data >$(DAT)/dlb.lst) $(subst /,\,echo oracles >>$(DAT)/dlb.lst) $(subst /,\,if exist $(DAT)/options echo options >>$(DAT)/dlb.lst) @@ -1235,13 +1255,13 @@ ifneq "$(W_GAMEDIR)" "" if exist $(W_GAMEDIR)\nhraykey.dll del $(W_GAMEDIR)\nhraykey.dll if exist $(W_GAMEDIR)\NetHack.exe del $(W_GAMEDIR)\NetHack.exe if exist $(W_GAMEDIR)\NetHack.pdb del $(W_GAMEDIR)\NetHack.pdb - if exist $(W_GAMEDIR)\nhdat del $(W_GAMEDIR)\nhdat + if exist $(W_GAMEDIR)\nhdat$(NHV) del $(W_GAMEDIR)\nhdat$(NHV) endif ifneq "$(W_SRC)" "" if exist $(W_SRC)\vis_tab.c del $(W_SRC)\vis_tab.c if exist $(W_SRC)\tile.c del $(W_SRC)\tile.c if exist $(W_SRC)\vis_tab.c del $(W_SRC)\vis_tab.c - if exist nhdat. del nhdat. + if exist $(W_SRC)\nhdat$(NHV). del $(W_SRC)\nhdat$(NHV). endif ifneq "$(W_DAT)" "" if exist $(W_DAT)\data del $(W_DAT)\data @@ -1334,8 +1354,8 @@ endif clean: if exist initialchk del initialchk - if exist install.tag del install.tag - if exist utility.tag del utility.tag + if exist $(O)install.tag del $(O)install.tag + if exist $(O)utility.tag del $(O)utility.tag ifneq "$(W_UTIL)" "" if exist $(W_UTIL)\makedefs.exe del $(W_UTIL)\makedefs.exe if exist $(W_UTIL)\levcomp.exe del $(W_UTIL)\levcomp.exe @@ -1392,8 +1412,8 @@ endif $(subst /,\,if exist $(TILEBMP32) del $(TILEBMP32)) #clean: -# -test -f install.tag && del install.tag -# -test -f utility.tag && del utility.tag +# -test -f $(O)install.tag && del $(O)install.tag +# -test -f $(O)utility.tag && del $(O)utility.tag # -test -f $(U)makedefs.exe && del $(U)makedefs.exe # -test -f $(U)levcomp.exe && del $(U)levcomp.exe # -test -f $(U)dgncomp.exe && del $(U)dgncomp.exe diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 0038e12ab..8837b08cd 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -72,8 +72,8 @@ DEBUGINFO = Y # PDCurses header (.h) files and PDCURSES_C to the location # of your PDCurses C files. # -#ADD_CURSES=Y -#PDCURSES_TOP=..\..\pdcurses +ADD_CURSES=Y +PDCURSES_TOP=..\..\pdcurses # #============================================================================== # This marks the end of the BUILD DECISIONS section. @@ -379,6 +379,7 @@ TSRC = $(SRC:\=/) cc=cl +cpp=cpp link=link rc=Rc @@ -596,7 +597,7 @@ DLB = @$(cc) $(cflagsBuild) -Fo$@ $< {$(SSYS)}.cpp{$(OBJ)}.o: - @$(CC) $(cflagsBuild) /EHsc -Fo$@ $< + @$(cc) $(cflagsBuild) /EHsc -Fo$@ $< #========================================== # Rules for files in sys\winnt @@ -648,8 +649,7 @@ DLB = #========================================== {$(WCURSES)}.c{$(OBJ)}.o: - @$(cc) -DPDC_NCMOUSE -DCURSES_DEFINE_ERASE_CHAR \ - $(PDCINCL) $(cflagsBuild) -Fo$@ $< + @$(cc) -DPDC_NCMOUSE $(PDCINCL) $(cflagsBuild) -Fo$@ $< #{$(WCURSES)}.txt{$(DAT)}.txt: # @copy $< $@ @@ -852,7 +852,6 @@ $(GAMEDIR)\NetHackW.exe : $(O)gamedir.tag $(O)tile.o $(O)ttystub.o \ $(O)ttystub.o $(O)NetHackW.res << - @if exist $(O)install.tag del $(O)install.tag $(O)gamedir.tag: @if not exist $(GAMEDIR)\*.* echo creating directory $(GAMEDIR:\=/) diff --git a/sys/winnt/stubs.c b/sys/winnt/stubs.c index ea38e3a57..ca7313b5b 100644 --- a/sys/winnt/stubs.c +++ b/sys/winnt/stubs.c @@ -64,6 +64,9 @@ HANDLE hConIn; HANDLE hConOut; int GUILaunched; struct window_procs tty_procs = { "-ttystubs" }; +#ifdef CURSES_GRAPHICS +char erase_char, kill_char; +#endif void win_tty_init(dir) From 29002ccf0b326f47dfa4971feddad62c59efc226 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 30 Jun 2019 01:10:32 -0400 Subject: [PATCH 145/529] No PDCurses right out-of-the-box; requires an edit --- sys/winnt/Makefile.msc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 8837b08cd..7954b30c2 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -72,8 +72,8 @@ DEBUGINFO = Y # PDCurses header (.h) files and PDCURSES_C to the location # of your PDCurses C files. # -ADD_CURSES=Y -PDCURSES_TOP=..\..\pdcurses +#ADD_CURSES=Y +#PDCURSES_TOP=..\..\pdcurses # #============================================================================== # This marks the end of the BUILD DECISIONS section. From 43935698e05f85acbc11e901e247457ef4a744e9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 30 Jun 2019 10:19:16 -0400 Subject: [PATCH 146/529] TRAVIS CI updated to include Windows and osx testing TRAVIS CI added Windows to their platform list in late 2018. Update the .travis.yml file to include a pair of Windows in machines in the testing suite, one built with visual studio command line tools and the other with mingw gcc tools. The visual studio build is currently using nmake with the sys/winnt/Makefile.msc Makefile from our distribution, That's the same process we've been using for building our binaries, pretty much. BRH may be able to modernize it over the next couple of weeks to use the msbuild process instead. I went with the HINTS environment variable on windows for consistent self-documenting purposes, even though the environment variable isn't used on windows. included: os: linux Compiler: gcc C HINTS=linux os: linux Compiler: clang C HINTS=linux os: linux Compiler: gcc C HINTS=linux-x11 os: linux Compiler: gcc C HINTS=linux-qt5 os: linux Compiler: gcc C HINTS=linux-minimal os: windows language: shell HINTS=Windows-visual-studio os: windows HINTS=Windows-mingw excluded: os: osx Compiler: clang Xcode: xcode10.2 C HINTS=macosx10.14 --- .travis.yml | 77 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7866ecd0b..f3533b3e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,20 @@ language: c - -script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && QT_SELECT=5 make MOC=moc install" - matrix: include: - - env: HINTS=linux + - os: linux + env: HINTS=linux compiler: gcc - - env: HINTS=linux + script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make install" + - os: linux + env: HINTS=linux compiler: clang - - env: HINTS=linux-x11 + script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make install" + - os: linux + env: HINTS=linux-x11 compiler: gcc - - env: HINTS=linux-qt5 + script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make install" + - os: linux + env: HINTS=linux-qt5 compiler: gcc addons: apt: @@ -18,7 +22,9 @@ matrix: - qtbase5-dev - qtmultimedia5-dev - qtbase5-dev-tools - - env: HINTS=linux-minimal + script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && QT_SELECT=5 make MOC=moc install" + - os: linux + env: HINTS=linux-minimal compiler: gcc script: | cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ @@ -43,10 +49,59 @@ matrix: sed -i 's/^#define TEXTCOLOR//' include/unixconf.h make install cat dat/options - + - os: windows + env: HINTS=Windows-visual-studio + language: shell + script: +# - find /c/Program\ Files\ \(x86\) -iname 'rc.exe' -print +# - export + - export VSVER=2017 + - export MSVER=14.16.27023 + - export SDKVER=10.0.17763.0 + - export FRAMEVER=4.0.30319 + - export NETFXVER=4.6.1 + - export WKITVER=10.0.17134.0 +# - export TOOLSVER=Community + - export TOOLSVER=BuildTools + - export PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/Common7/IDE/VC/VCPackages:$PATH + - export PATH=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/bin/$WKITVER/x64:$PATH + - export PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/bin/HostX64/x64:$PATH + - export PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/bin/HostX64/x86:$PATH + - export PATH=$PATH:/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/Common7/IDE/CommonExtensions/Microsoft/TestWindow + - export PATH=$PATH:/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/MSBuild/Current/bin/Roslyn + - export INCLUDE=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/$TOOLSVER/VC/Tools/MSVC/$MSVER/include + - export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/Include/$WKITVER/ucrt + - export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/ucrt + - export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/shared + - export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/um + - export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/winrt + - export INCLUDE=$INCLUDE:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/$WKITVER/cppwinrt + - export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/ATLMFC/lib/x86 + - export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/lib/x86:$LIB + - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/ucrt/x86:$LIB + - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB +# - export + - cd src + - cp ../sys/winnt/Makefile.msc ./Makefile + - nmake install + - os: windows +# install: choco install mingw + env: HINTS=Windows-mingw + script: + - cd src + - cp ../sys/winnt/Makefile.gcc ./Makefile + - mingw32-make install + exclude: + - os: osx + osx_image: xcode10.2 + env: HINTS=macosx10.14 + compiler: clang + script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make install" +# sudo: false - notifications: email: recipients: - - devteam@nethack.org +# - devteam@nethack.org + + From ddb5e6e8e5c05928afd9ca4b83b8ce66f71ec04f Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 30 Jun 2019 10:33:53 -0400 Subject: [PATCH 147/529] lower case windows in .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3533b3e6..8ccc6a525 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ matrix: make install cat dat/options - os: windows - env: HINTS=Windows-visual-studio + env: HINTS=windows-visual-studio language: shell script: # - find /c/Program\ Files\ \(x86\) -iname 'rc.exe' -print @@ -86,7 +86,7 @@ matrix: - nmake install - os: windows # install: choco install mingw - env: HINTS=Windows-mingw + env: HINTS=windows-mingw script: - cd src - cp ../sys/winnt/Makefile.gcc ./Makefile From 466516b125afc2638fad9ee8d95d35e81b89c35f Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 30 Jun 2019 12:12:42 -0400 Subject: [PATCH 148/529] remove "bogus" bit :) --- win/win32/vs2017/NetHack.vcxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/win32/vs2017/NetHack.vcxproj b/win/win32/vs2017/NetHack.vcxproj index 44329ac77..4b9563347 100644 --- a/win/win32/vs2017/NetHack.vcxproj +++ b/win/win32/vs2017/NetHack.vcxproj @@ -31,7 +31,7 @@ $(PDCURSES);%(AdditionalIncludeDirectories) - CURSES_GRAPHICS;CHTYPE_32;PDC_NCMOUSE;CURSES_DEFINE_ERASE_CHAR;%(PreprocessorDefinitions) + CURSES_GRAPHICS;CHTYPE_32;PDC_NCMOUSE;%(PreprocessorDefinitions) $(ToolsDir) From c9bba80786e073421d399208ccc947b58295f4e1 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 30 Jun 2019 13:22:25 -0400 Subject: [PATCH 149/529] add pdcurses support to travis ci windows test builds pdcurses is obtained on-the-fly from the github source --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8ccc6a525..bef2f9891 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,6 +81,9 @@ matrix: - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/ucrt/x86:$LIB - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB # - export + - git clone https://github.com/wmcbrine/PDCurses.git ../pdcurses + - export ADD_CURSES=Y + - export PDCURSES_TOP=../../pdcurses - cd src - cp ../sys/winnt/Makefile.msc ./Makefile - nmake install @@ -88,6 +91,9 @@ matrix: # install: choco install mingw env: HINTS=windows-mingw script: + - git clone https://github.com/wmcbrine/PDCurses.git ../pdcurses + - export ADD_CURSES=Y + - export PDCURSES_TOP=../../pdcurses - cd src - cp ../sys/winnt/Makefile.gcc ./Makefile - mingw32-make install @@ -104,4 +110,3 @@ notifications: recipients: # - devteam@nethack.org - From ee70762c69dd54624fb34109a7a3cccd297df416 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 30 Jun 2019 14:12:16 -0400 Subject: [PATCH 150/529] add --depth 1 to git clone for travis windows test --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bef2f9891..818b1bf5a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,7 +81,7 @@ matrix: - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/ucrt/x86:$LIB - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB # - export - - git clone https://github.com/wmcbrine/PDCurses.git ../pdcurses + - git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses - export ADD_CURSES=Y - export PDCURSES_TOP=../../pdcurses - cd src @@ -91,7 +91,7 @@ matrix: # install: choco install mingw env: HINTS=windows-mingw script: - - git clone https://github.com/wmcbrine/PDCurses.git ../pdcurses + - git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses - export ADD_CURSES=Y - export PDCURSES_TOP=../../pdcurses - cd src @@ -110,3 +110,4 @@ notifications: recipients: # - devteam@nethack.org + From 3e029d2900b16fdc3c917199aad0f1efab265e08 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 30 Jun 2019 10:51:00 -0700 Subject: [PATCH 151/529] attributes disclosure: experience points Wizard mode shows the number of points needed to reach the next level (unless already maxxed out at 30) for ^X and end of game disclosure. Do it in normal play for the latter too. (I think it would ok to do that for ^X too but haven't gone that far.) Even when it was wizard mode only, the phrasing for past tense had a minor grammar bug, and it could make the line a little too long for tty and curses (not sure about others) when level was high, resulting in wrapped text. That looked bad for tty, which first tries removing indentation (just 1 space in this case), making that line outdented as well as wrapped. So change the phrasing slightly when experience level is 'too high'. I had a version which formatted, measured, and re-formatted if necessary but that was overkill; simple hardcoded rephrasing suffices particularly when measuring was against assumed display width (80) rather than actual width. --- doc/fixes36.3 | 7 ++++++- src/cmd.c | 29 +++++++++++++++++++---------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 648ef6902..d03090095 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.78 $ $NHDT-Date: 1561766416 2019/06/29 00:00:16 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.79 $ $NHDT-Date: 1561917056 2019/06/30 17:50:56 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -92,6 +92,8 @@ wizard mode ^I with 'perm_invent' On would unintentionally filter the content change #adjust to treat carrying only gold as not having anything to adjust saving bones with 'perm_invent' On could result in "Bad fruit #N" warnings update persistent inventory window immediately if 'sortpack' option is toggled +grammar bit for wizard mode final disclosure; attribute section could show + "You had N experience points, 1 more were needed to attain level X+1." Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository @@ -196,6 +198,9 @@ classify sources as released, beta, or work-in-progress via NH_DEVEL_STATUS rather than just released vs beta via BETA if you reach the edge of a level (relatively uncommon) and try to move off, report that you can't go farther if the 'mention_walls' option is set +'attributes' disclosure at end of game includes number of experience points + that were needed to reach the next experience level (new for normal + play and explore mode; previously only shown for wizard mode) wizard-mode: display effect to show where an unseen wished-for monster landed curses: enable latent mouse support curses: give menus and text windows a minimum size of 5x25 since tiny ones can diff --git a/src/cmd.c b/src/cmd.c index f81b53d81..0b7471715 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1977,19 +1977,28 @@ int final; enlght_line(You_, "entered ", buf, ""); } if (!Upolyd) { - /* flags.showexp does not matter */ + int ulvl = (int) u.ulevel; + /* [flags.showexp currently does not matter; should it?] */ + /* experience level is already shown above */ Sprintf(buf, "%-1ld experience point%s", u.uexp, plur(u.uexp)); - if (wizard) { - if (u.ulevel < 30) { - int ulvl = (int) u.ulevel; - long nxtlvl = newuexp(ulvl); - /* long oldlvl = (ulvl > 1) ? newuexp(ulvl - 1) : 0; */ + /* TODO? + * Remove wizard-mode restriction since patient players can + * determine the numbers needed without resorting to spoilers + * (even before this started being disclosed for 'final'; + * just enable 'showexp' and look at normal status lines + * after drinking gain level potions or eating wraith corpses + * or being level-drained by vampires). + */ + if (ulvl < 30 && (final || wizard)) { + long nxtlvl = newuexp(ulvl), delta = nxtlvl - u.uexp; - Sprintf(eos(buf), ", %ld %s%sneeded to attain level %d", - (nxtlvl - u.uexp), (u.uexp > 0) ? "more " : "", - !final ? "" : "were ", (ulvl + 1)); - } + Sprintf(eos(buf), ", %ld %s%sneeded %s level %d", + delta, (u.uexp > 0) ? "more " : "", + /* present tense=="needed", past tense=="were needed" */ + !final ? "" : (delta == 1L) ? "was " : "were ", + /* "for": grammatically iffy but less likely to wrap */ + (ulvl < 18) ? "to attain" : "for", (ulvl + 1)); } you_have(buf, ""); } From fd55d9118ec9fab1805f738f323665efcf29c702 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 10 May 2019 21:11:50 +0300 Subject: [PATCH 152/529] Use lua for special level files Game is playable, and should compile on linux and Windows. Assumes you have a lua 5.3 library available. Removes level compiler and associated files. Replaces special level des-files with lua scripts. Exposes some NetHack internals to lua: - des-table with commands to create special levels - nh-table with NetHack core commands - nhc-table with some constants - u-table with some player-specific data (u-struct) - selection userdata Adds some rudimentary tests. Adds new extended command #wizloadlua to run a specific script, and #wizloaddes to run a specific level-creation script. nhlib.lua is loaded for every lua script. Download and untar lua: mkdir lib cd lib curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz tar zxf lua-5.3.5.tar.gz Then make nethack normally. --- dat/Arc-fila.lua | 59 + dat/Arc-filb.lua | 59 + dat/Arc-goal.lua | 115 + dat/Arc-loca.lua | 145 ++ dat/Arc-strt.lua | 113 + dat/Arch.des | 472 ---- dat/Bar-fila.lua | 33 + dat/Bar-filb.lua | 44 + dat/Bar-goal.lua | 95 + dat/Bar-loca.lua | 107 + dat/Bar-strt.lua | 103 + dat/Barb.des | 377 --- dat/Cav-fila.lua | 35 + dat/Cav-filb.lua | 41 + dat/Cav-goal.lua | 59 + dat/Cav-loca.lua | 101 + dat/Cav-strt.lua | 91 + dat/Caveman.des | 316 --- dat/Hea-fila.lua | 42 + dat/Hea-filb.lua | 50 + dat/Hea-goal.lua | 90 + dat/Hea-loca.lua | 97 + dat/Hea-strt.lua | 107 + dat/Healer.des | 380 --- dat/Kni-fila.lua | 35 + dat/Kni-filb.lua | 40 + dat/Kni-goal.lua | 99 + dat/Kni-loca.lua | 137 ++ dat/Kni-strt.lua | 102 + dat/Knight.des | 408 ---- dat/Mon-fila.lua | 61 + dat/Mon-filb.lua | 60 + dat/Mon-goal.lua | 75 + dat/Mon-loca.lua | 90 + dat/Mon-strt.lua | 104 + dat/Monk.des | 378 --- dat/Pri-fila.lua | 55 + dat/Pri-filb.lua | 62 + dat/Pri-goal.lua | 83 + dat/Pri-loca.lua | 73 + dat/Pri-strt.lua | 105 + dat/Priest.des | 356 --- dat/Ran-fila.lua | 35 + dat/Ran-filb.lua | 39 + dat/Ran-goal.lua | 106 + dat/Ran-loca.lua | 79 + dat/Ran-strt.lua | 97 + dat/Ranger.des | 356 --- dat/Rog-fila.lua | 64 + dat/Rog-filb.lua | 64 + dat/Rog-goal.lua | 110 + dat/Rog-loca.lua | 99 + dat/Rog-strt.lua | 163 ++ dat/Rogue.des | 485 ---- dat/Sam-fila.lua | 37 + dat/Sam-filb.lua | 60 + dat/Sam-goal.lua | 111 + dat/Sam-loca.lua | 141 ++ dat/Sam-strt.lua | 91 + dat/Samurai.des | 440 ---- dat/Tou-fila.lua | 35 + dat/Tou-filb.lua | 39 + dat/Tou-goal.lua | 160 ++ dat/Tou-loca.lua | 157 ++ dat/Tou-strt.lua | 131 ++ dat/Tourist.des | 519 ----- dat/Val-fila.lua | 40 + dat/Val-filb.lua | 42 + dat/Val-goal.lua | 102 + dat/Val-loca.lua | 85 + dat/Val-strt.lua | 98 + dat/Valkyrie.des | 353 --- dat/Wiz-fila.lua | 59 + dat/Wiz-filb.lua | 58 + dat/Wiz-goal.lua | 132 ++ dat/Wiz-loca.lua | 151 ++ dat/Wiz-strt.lua | 104 + dat/Wizard.des | 472 ---- dat/air.lua | 108 + dat/asmodeus.lua | 88 + dat/astral.lua | 187 ++ dat/baalz.lua | 72 + dat/bigrm-1.lua | 72 + dat/bigrm-10.lua | 58 + dat/bigrm-2.lua | 57 + dat/bigrm-3.lua | 71 + dat/bigrm-4.lua | 43 + dat/bigrm-5.lua | 44 + dat/bigrm-6.lua | 45 + dat/bigrm-7.lua | 48 + dat/bigrm-8.lua | 50 + dat/bigrm-9.lua | 48 + dat/bigroom.des | 723 ------ dat/castle.des | 249 -- dat/castle.lua | 256 +++ dat/earth.lua | 130 ++ dat/endgame.des | 655 ------ dat/fakewiz1.lua | 35 + dat/fakewiz2.lua | 35 + dat/fire.lua | 156 ++ dat/gehennom.des | 713 ------ dat/juiblex.lua | 125 + dat/knox.des | 153 -- dat/knox.lua | 154 ++ dat/medusa-1.lua | 121 + dat/medusa-2.lua | 126 + dat/medusa-3.lua | 115 + dat/medusa-4.lua | 129 ++ dat/medusa.des | 416 ---- dat/minefill.lua | 50 + dat/minend-1.lua | 118 + dat/minend-2.lua | 152 ++ dat/minend-3.lua | 107 + dat/minetn-1.lua | 145 ++ dat/minetn-2.lua | 182 ++ dat/minetn-3.lua | 150 ++ dat/minetn-4.lua | 133 ++ dat/minetn-5.lua | 137 ++ dat/minetn-6.lua | 83 + dat/minetn-7.lua | 198 ++ dat/nhlib.lua | 12 + dat/oracle.des | 65 - dat/oracle.lua | 63 + dat/orcus.lua | 142 ++ dat/sanctum.lua | 131 ++ dat/soko1-1.lua | 107 + dat/soko1-2.lua | 108 + dat/soko2-1.lua | 67 + dat/soko2-2.lua | 68 + dat/soko3-1.lua | 79 + dat/soko3-2.lua | 71 + dat/soko4-1.lua | 97 + dat/soko4-2.lua | 68 + dat/sokoban.des | 637 ----- dat/tower.des | 147 -- dat/tower1.lua | 62 + dat/tower2.lua | 50 + dat/tower3.lua | 50 + dat/valley.lua | 174 ++ dat/water.lua | 102 + dat/wizard1.lua | 92 + dat/wizard2.lua | 55 + dat/wizard3.lua | 81 + dat/yendor.des | 281 --- doc/lev_comp.6 | 588 ----- doc/lev_comp.txt | 726 ------ include/align.h | 1 + include/decl.h | 13 +- include/extern.h | 49 +- include/global.h | 2 +- include/ntconf.h | 5 + include/sp_lev.h | 345 +-- include/system.h | 11 +- src/cmd.c | 100 +- src/decl.c | 4 +- src/do_name.c | 6 +- src/hacklib.c | 42 + src/mklev.c | 19 +- src/mkmap.c | 4 +- src/nhlsel.c | 723 ++++++ src/nhlua.c | 883 +++++++ src/save.c | 8 +- src/sp_lev.c | 4690 +++++++++++++++++-------------------- sys/msdos/Makefile.GCC | 556 +++-- sys/msdos/setup.bat | 3 +- sys/msdos/vidvesa.c | 4 +- sys/msdos/vidvga.c | 4 +- sys/share/lev_lex.c | 3310 -------------------------- sys/share/lev_yacc.c | 4985 ---------------------------------------- sys/share/pcmain.c | 40 +- sys/unix/Makefile.dat | 36 +- sys/unix/Makefile.doc | 7 +- sys/unix/Makefile.src | 18 +- sys/unix/Makefile.top | 15 +- sys/unix/Makefile.utl | 70 +- sys/unix/hints/linux | 4 +- sys/winnt/Makefile.gcc | 291 ++- sys/winnt/Makefile.msc | 379 +-- sys/winnt/nhsetup.bat | 2 +- test_des.lua | 377 +++ test_lev.lua | 75 + test_sel.lua | 85 + test_src.lua | 88 + util/lev_comp.l | 437 ---- util/lev_comp.y | 2721 ---------------------- util/lev_main.c | 1646 ------------- win/curses/cursmain.c | 4 + x.lua | 99 + y.lua | 210 ++ 189 files changed, 16653 insertions(+), 27346 deletions(-) create mode 100644 dat/Arc-fila.lua create mode 100644 dat/Arc-filb.lua create mode 100644 dat/Arc-goal.lua create mode 100644 dat/Arc-loca.lua create mode 100644 dat/Arc-strt.lua delete mode 100644 dat/Arch.des create mode 100644 dat/Bar-fila.lua create mode 100644 dat/Bar-filb.lua create mode 100644 dat/Bar-goal.lua create mode 100644 dat/Bar-loca.lua create mode 100644 dat/Bar-strt.lua delete mode 100644 dat/Barb.des create mode 100644 dat/Cav-fila.lua create mode 100644 dat/Cav-filb.lua create mode 100644 dat/Cav-goal.lua create mode 100644 dat/Cav-loca.lua create mode 100644 dat/Cav-strt.lua delete mode 100644 dat/Caveman.des create mode 100644 dat/Hea-fila.lua create mode 100644 dat/Hea-filb.lua create mode 100644 dat/Hea-goal.lua create mode 100644 dat/Hea-loca.lua create mode 100644 dat/Hea-strt.lua delete mode 100644 dat/Healer.des create mode 100644 dat/Kni-fila.lua create mode 100644 dat/Kni-filb.lua create mode 100644 dat/Kni-goal.lua create mode 100644 dat/Kni-loca.lua create mode 100644 dat/Kni-strt.lua delete mode 100644 dat/Knight.des create mode 100644 dat/Mon-fila.lua create mode 100644 dat/Mon-filb.lua create mode 100644 dat/Mon-goal.lua create mode 100644 dat/Mon-loca.lua create mode 100644 dat/Mon-strt.lua delete mode 100644 dat/Monk.des create mode 100644 dat/Pri-fila.lua create mode 100644 dat/Pri-filb.lua create mode 100644 dat/Pri-goal.lua create mode 100644 dat/Pri-loca.lua create mode 100644 dat/Pri-strt.lua delete mode 100644 dat/Priest.des create mode 100644 dat/Ran-fila.lua create mode 100644 dat/Ran-filb.lua create mode 100644 dat/Ran-goal.lua create mode 100644 dat/Ran-loca.lua create mode 100644 dat/Ran-strt.lua delete mode 100644 dat/Ranger.des create mode 100644 dat/Rog-fila.lua create mode 100644 dat/Rog-filb.lua create mode 100644 dat/Rog-goal.lua create mode 100644 dat/Rog-loca.lua create mode 100644 dat/Rog-strt.lua delete mode 100644 dat/Rogue.des create mode 100644 dat/Sam-fila.lua create mode 100644 dat/Sam-filb.lua create mode 100644 dat/Sam-goal.lua create mode 100644 dat/Sam-loca.lua create mode 100644 dat/Sam-strt.lua delete mode 100644 dat/Samurai.des create mode 100644 dat/Tou-fila.lua create mode 100644 dat/Tou-filb.lua create mode 100644 dat/Tou-goal.lua create mode 100644 dat/Tou-loca.lua create mode 100644 dat/Tou-strt.lua delete mode 100644 dat/Tourist.des create mode 100644 dat/Val-fila.lua create mode 100644 dat/Val-filb.lua create mode 100644 dat/Val-goal.lua create mode 100644 dat/Val-loca.lua create mode 100644 dat/Val-strt.lua delete mode 100644 dat/Valkyrie.des create mode 100644 dat/Wiz-fila.lua create mode 100644 dat/Wiz-filb.lua create mode 100644 dat/Wiz-goal.lua create mode 100644 dat/Wiz-loca.lua create mode 100644 dat/Wiz-strt.lua delete mode 100644 dat/Wizard.des create mode 100644 dat/air.lua create mode 100644 dat/asmodeus.lua create mode 100644 dat/astral.lua create mode 100644 dat/baalz.lua create mode 100644 dat/bigrm-1.lua create mode 100644 dat/bigrm-10.lua create mode 100644 dat/bigrm-2.lua create mode 100644 dat/bigrm-3.lua create mode 100644 dat/bigrm-4.lua create mode 100644 dat/bigrm-5.lua create mode 100644 dat/bigrm-6.lua create mode 100644 dat/bigrm-7.lua create mode 100644 dat/bigrm-8.lua create mode 100644 dat/bigrm-9.lua delete mode 100644 dat/bigroom.des delete mode 100644 dat/castle.des create mode 100644 dat/castle.lua create mode 100644 dat/earth.lua delete mode 100644 dat/endgame.des create mode 100644 dat/fakewiz1.lua create mode 100644 dat/fakewiz2.lua create mode 100644 dat/fire.lua delete mode 100644 dat/gehennom.des create mode 100644 dat/juiblex.lua delete mode 100644 dat/knox.des create mode 100644 dat/knox.lua create mode 100644 dat/medusa-1.lua create mode 100644 dat/medusa-2.lua create mode 100644 dat/medusa-3.lua create mode 100644 dat/medusa-4.lua delete mode 100644 dat/medusa.des create mode 100644 dat/minefill.lua create mode 100644 dat/minend-1.lua create mode 100644 dat/minend-2.lua create mode 100644 dat/minend-3.lua create mode 100644 dat/minetn-1.lua create mode 100644 dat/minetn-2.lua create mode 100644 dat/minetn-3.lua create mode 100644 dat/minetn-4.lua create mode 100644 dat/minetn-5.lua create mode 100644 dat/minetn-6.lua create mode 100644 dat/minetn-7.lua create mode 100644 dat/nhlib.lua delete mode 100644 dat/oracle.des create mode 100644 dat/oracle.lua create mode 100644 dat/orcus.lua create mode 100644 dat/sanctum.lua create mode 100644 dat/soko1-1.lua create mode 100644 dat/soko1-2.lua create mode 100644 dat/soko2-1.lua create mode 100644 dat/soko2-2.lua create mode 100644 dat/soko3-1.lua create mode 100644 dat/soko3-2.lua create mode 100644 dat/soko4-1.lua create mode 100644 dat/soko4-2.lua delete mode 100644 dat/sokoban.des delete mode 100644 dat/tower.des create mode 100644 dat/tower1.lua create mode 100644 dat/tower2.lua create mode 100644 dat/tower3.lua create mode 100644 dat/valley.lua create mode 100644 dat/water.lua create mode 100644 dat/wizard1.lua create mode 100644 dat/wizard2.lua create mode 100644 dat/wizard3.lua delete mode 100644 dat/yendor.des delete mode 100644 doc/lev_comp.6 delete mode 100644 doc/lev_comp.txt create mode 100644 src/nhlsel.c create mode 100644 src/nhlua.c delete mode 100644 sys/share/lev_lex.c delete mode 100644 sys/share/lev_yacc.c create mode 100644 test_des.lua create mode 100644 test_lev.lua create mode 100644 test_sel.lua create mode 100644 test_src.lua delete mode 100644 util/lev_comp.l delete mode 100644 util/lev_comp.y delete mode 100644 util/lev_main.c create mode 100644 x.lua create mode 100644 y.lua diff --git a/dat/Arc-fila.lua b/dat/Arc-fila.lua new file mode 100644 index 000000000..2e2dc1578 --- /dev/null +++ b/dat/Arc-fila.lua @@ -0,0 +1,59 @@ +-- NetHack 3.6 Arch.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- +des.room({ type = "ordinary", + contents = function() + des.stair("up") + des.object() + des.monster("S") + end +}); + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.monster("S") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.object() + des.monster("S") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.stair("down") + des.object() + des.trap() + des.monster("S") + des.monster("human mummy") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.trap() + des.monster("S") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.monster("S") + end +}) + +des.random_corridors() diff --git a/dat/Arc-filb.lua b/dat/Arc-filb.lua new file mode 100644 index 000000000..8b3f1d257 --- /dev/null +++ b/dat/Arc-filb.lua @@ -0,0 +1,59 @@ +-- NetHack 3.6 Arch.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- +des.room({ type = "ordinary", + contents = function() + des.stair("up") + des.object() + des.monster("M") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.monster("M") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.object() + des.monster("M") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.stair("down") + des.object() + des.trap() + des.monster("S") + des.monster("human mummy") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.trap() + des.monster("S") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.monster("S") + end +}) + +des.random_corridors() diff --git a/dat/Arc-goal.lua b/dat/Arc-goal.lua new file mode 100644 index 000000000..4f48ec516 --- /dev/null +++ b/dat/Arc-goal.lua @@ -0,0 +1,115 @@ +-- NetHack 3.6 Arch.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.map([[ + + --------- + |..|.|..| + -----------|..S.S..|----------- + |.|........|+-|.|-+|........|.| + |.S........S..|.|..S........S.| + |.|........|..|.|..|........|.| + ------------------+------------------ + |..|..........|.......|..........|..| + |..|..........+.......|..........S..| + |..S..........|.......+..........|..| + |..|..........|.......|..........|..| + ------------------+------------------ + |.|........|..|.|..|........|.| + |.S........S..|.|..S........S.| + |.|........|+-|.|-+|........|.| + -----------|..S.S..|----------- + |..|.|..| + --------- + +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +des.region(selection.area(35,02,36,03), "unlit") +des.region(selection.area(40,02,41,03), "unlit") +des.region(selection.area(24,04,24,06), "unlit") +des.region(selection.area(26,04,33,06), "lit") +des.region(selection.area(38,02,38,06), "unlit") +des.region(selection.area(43,04,50,06), "lit") +des.region(selection.area(52,04,52,06), "unlit") +des.region(selection.area(35,05,36,06), "unlit") +des.region(selection.area(40,05,41,06), "unlit") +des.region(selection.area(21,08,22,11), "unlit") +des.region(selection.area(24,08,33,11), "lit") +des.region(selection.area(35,08,41,11), "unlit") +des.region(selection.area(43,08,52,11), "lit") +des.region(selection.area(54,08,55,11), "unlit") +des.region(selection.area(24,13,24,15), "unlit") +des.region(selection.area(26,13,33,15), "unlit") +des.region(selection.area(35,13,36,14), "unlit") +des.region(selection.area(35,16,36,17), "unlit") +des.region(selection.area(38,13,38,17), "unlit") +des.region(selection.area(40,13,41,14), "unlit") +des.region(selection.area(40,16,41,17), "unlit") +des.region({ region={43,13, 50,15}, lit=0, type="temple", prefilled=0 }) +des.region(selection.area(52,13,52,15), "unlit") +-- Stairs +des.stair("up", 38,10) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- The altar of Huhetotl. Unattended. +des.altar({ x=50,y=14,align="chaos",type="altar" }) +-- Objects +des.object({ id = "crystal ball", x=50, y=14,buc="blessed",spe=5,name="The Orb of Detection" }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap("rolling boulder",46,14) +-- Random monsters. +des.monster("Minion of Huhetotl", 50, 14) +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("human mummy") +des.monster("human mummy") +des.monster("human mummy") +des.monster("human mummy") +des.monster("human mummy") +des.monster("human mummy") +des.monster("human mummy") +des.monster("human mummy") +des.monster("M") diff --git a/dat/Arc-loca.lua b/dat/Arc-loca.lua new file mode 100644 index 000000000..374deb595 --- /dev/null +++ b/dat/Arc-loca.lua @@ -0,0 +1,145 @@ +-- NetHack 3.6 Arch.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "hardfloor") + +des.map([[ +............................................................................ +............................................................................ +............................................................................ +........................-------------------------------..................... +........................|....|.S......................|..................... +........................|....|.|.|+------------------.|..................... +........................|....|.|.|.|.........|......|.|..................... +........................|....|.|.|.|.........|......|.|..................... +........................|---+-.|.|.|..---....+......|.|..................... +........................|....|.|.|.---|.|....|......|.|..................... +........................|....S.|.|.+..S.|--S-----S--|.|..................... +........................|....|.|.|.---|.|....|......+.|..................... +........................|---+-.|.|.|..---....|.------.|..................... +........................|....|.|.|.|.........|.|....+.|..................... +........................|....|.|.|.|.........|+|....|-|..................... +........................|....|.|.|------------+------.S..................... +........................|....|.S......................|..................... +........................-------------------------------..................... +............................................................................ +............................................................................ +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +des.region({ region={25,04, 28,07}, lit=1, type="temple", prefilled=0 }) +des.region({ region={25,09, 28,11}, lit=0, type="temple", prefilled=0 }) +des.region({ region={25,13, 28,16}, lit=1, type="temple", prefilled=0 }) +des.region(selection.area(30,04,30,16), "lit") +des.region(selection.area(32,04,32,16), "unlit") +des.region({ region={33,04, 53,04}, lit=0, type="ordinary", prefilled=0, irregular=1 }) +des.region(selection.area(36,10,37,10), "unlit") +des.region(selection.area(39,09,39,11), "unlit") +des.region({ region={36,06, 42,08}, lit=0, type="ordinary", prefilled=0, irregular=1 }) +des.region({ region={36,12, 42,14}, lit=0, type="ordinary", prefilled=0, irregular=1 }) +des.region(selection.area(46,06,51,09), "unlit") +des.region({ region={46,11, 49,11}, lit=0, type="ordinary", prefilled=0, irregular=1 }) +des.region(selection.area(48,13,51,14), "unlit") +-- Doors +des.door("closed",31,04) +des.door("closed",28,08) +des.door("locked",29,10) +des.door("closed",28,12) +des.door("closed",31,16) +des.door("locked",34,05) +des.door("locked",35,10) +des.door("locked",38,10) +des.door("closed",43,10) +des.door("closed",45,08) +des.door("locked",46,14) +des.door("locked",46,15) +des.door("locked",49,10) +des.door("locked",52,11) +des.door("closed",52,13) +des.door("closed",54,15) +-- Stairs +des.stair("up", 03,17) +des.stair("down", 39,10) +-- Altars - three types. All are unattended. +des.altar({ x=26,y=05,align=align[1], type="altar" }) +des.altar({ x=26,y=10,align=align[2], type="altar" }) +des.altar({ x=26,y=15,align=align[3], type="altar" }) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Objects +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Treasure? +des.engraving({ type="engrave", text="X marks the spot." }) +des.engraving({ type="engrave", text="X marks the spot." }) +des.engraving({ type="engrave", text="X marks the spot." }) +des.engraving({ type="engrave", text="X marks the spot." }) +-- Random traps +des.trap("spiked pit",24,02) +des.trap("spiked pit",37,00) +des.trap("spiked pit",23,05) +des.trap("spiked pit",26,19) +des.trap("spiked pit",55,10) +des.trap("spiked pit",55,08) +des.trap("pit",51,01) +des.trap("pit",23,18) +des.trap("pit",31,18) +des.trap("pit",48,19) +des.trap("pit",55,15) +des.trap("magic",60,04) +des.trap("statue",72,07) +des.trap("statue") +des.trap("statue") +des.trap("anti magic",64,12) +des.trap("sleep gas") +des.trap("sleep gas") +des.trap("dart") +des.trap("dart") +des.trap("dart") +des.trap("rolling boulder",32,10) +des.trap("rolling boulder",40,16) +-- Random monsters. +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("S") +des.monster("M") +des.monster("human mummy") +des.monster("human mummy") +des.monster("human mummy") +des.monster("human mummy") +des.monster("human mummy") +des.monster("human mummy") +des.monster("human mummy") +des.monster("M") diff --git a/dat/Arc-strt.lua b/dat/Arc-strt.lua new file mode 100644 index 000000000..9292d40ca --- /dev/null +++ b/dat/Arc-strt.lua @@ -0,0 +1,113 @@ +-- NetHack 3.6 Arch.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, Lord Carnarvon +-- and receive your quest assignment. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") + +des.map([[ +............................................................................ +............................................................................ +............................................................................ +............................................................................ +....................}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}................. +....................}-------------------------------------}................. +....................}|..S......+.................+.......|}................. +....................}-S---------------+----------|.......|}................. +....................}|.|...............|.......+.|.......|}................. +....................}|.|...............---------.---------}................. +....................}|.S.\.............+.................+.................. +....................}|.|...............---------.---------}................. +....................}|.|...............|.......+.|.......|}................. +....................}-S---------------+----------|.......|}................. +....................}|..S......+.................+.......|}................. +....................}-------------------------------------}................. +....................}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}................. +............................................................................ +............................................................................ +............................................................................ +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +des.region(selection.area(22,06,23,06), "unlit") +des.region(selection.area(25,06,30,06), "unlit") +des.region(selection.area(32,06,48,06), "unlit") +des.region(selection.area(50,06,56,08), "lit") +des.region(selection.area(40,08,46,08), "unlit") +des.region(selection.area(22,08,22,12), "unlit") +des.region(selection.area(24,08,38,12), "unlit") +des.region(selection.area(48,08,48,08), "lit") +des.region(selection.area(40,10,56,10), "lit") +des.region(selection.area(48,12,48,12), "lit") +des.region(selection.area(40,12,46,12), "unlit") +des.region(selection.area(50,12,56,14), "lit") +des.region(selection.area(22,14,23,14), "unlit") +des.region(selection.area(25,14,30,14), "unlit") +des.region(selection.area(32,14,48,14), "unlit") +-- Stairs +des.stair("down", 55,07) +-- Portal arrival point +des.levregion({ region = {63,06,63,06}, type="branch" }) +-- Doors +des.door("closed",22,07) +des.door("closed",38,07) +des.door("locked",47,08) +des.door("locked",23,10) +des.door("locked",39,10) +des.door("locked",57,10) +des.door("locked",47,12) +des.door("closed",22,13) +des.door("closed",38,13) +des.door("locked",24,14) +des.door("closed",31,14) +des.door("locked",49,14) +-- Lord Carnarvon +des.monster("Lord Carnarvon", 25, 10) +-- The treasure of Lord Carnarvon +des.object("chest", 25, 10) +-- student guards for the audience chamber +des.monster("student", 26, 09) +des.monster("student", 27, 09) +des.monster("student", 28, 09) +des.monster("student", 26, 10) +des.monster("student", 28, 10) +des.monster("student", 26, 11) +des.monster("student", 27, 11) +des.monster("student", 28, 11) +-- city watch guards in the antechambers +des.monster("watchman", 50, 06) +des.monster("watchman", 50, 14) +-- Eels in the moat +des.monster("giant eel", 20, 10) +des.monster("giant eel", 45, 04) +des.monster("giant eel", 33, 16) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Monsters on siege duty. +des.monster("S", 60, 09) +des.monster("M", 60, 10) +des.monster("S", 60, 11) +des.monster("S", 60, 12) +des.monster("M", 60, 13) +des.monster("S", 61, 10) +des.monster("S", 61, 11) +des.monster("S", 61, 12) +des.monster("S", 30, 03) +des.monster("M", 20, 17) +des.monster("S", 67, 02) +des.monster("S", 10, 19) diff --git a/dat/Arch.des b/dat/Arch.des deleted file mode 100644 index 9335f7d2f..000000000 --- a/dat/Arch.des +++ /dev/null @@ -1,472 +0,0 @@ -# NetHack 3.6 Arch.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1991 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, Lord Carnarvon -# and receive your quest assignment. -# -MAZE: "Arc-strt",' ' -FLAGS: noteleport,hardfloor -GEOMETRY:center,center -MAP -............................................................................ -............................................................................ -............................................................................ -............................................................................ -....................}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}................. -....................}-------------------------------------}................. -....................}|..S......+.................+.......|}................. -....................}-S---------------+----------|.......|}................. -....................}|.|...............|.......+.|.......|}................. -....................}|.|...............---------.---------}................. -....................}|.S.\.............+.................+.................. -....................}|.|...............---------.---------}................. -....................}|.|...............|.......+.|.......|}................. -....................}-S---------------+----------|.......|}................. -....................}|..S......+.................+.......|}................. -....................}-------------------------------------}................. -....................}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}................. -............................................................................ -............................................................................ -............................................................................ -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION: (22,06,23,06),unlit,"ordinary" -REGION: (25,06,30,06),unlit,"ordinary" -REGION: (32,06,48,06),unlit,"ordinary" -REGION: (50,06,56,08),lit,"ordinary" -REGION: (40,08,46,08),unlit,"ordinary" -REGION: (22,08,22,12),unlit,"ordinary" -REGION: (24,08,38,12),unlit,"ordinary" -REGION: (48,08,48,08),lit,"ordinary" -REGION: (40,10,56,10),lit,"ordinary" -REGION: (48,12,48,12),lit,"ordinary" -REGION: (40,12,46,12),unlit,"ordinary" -REGION: (50,12,56,14),lit,"ordinary" -REGION: (22,14,23,14),unlit,"ordinary" -REGION: (25,14,30,14),unlit,"ordinary" -REGION: (32,14,48,14),unlit,"ordinary" -# Stairs -STAIR:(55,07),down -# Portal arrival point -BRANCH:(63,06,63,06),(0,0,0,0) -# Doors -DOOR:closed,(22,07) -DOOR:closed,(38,07) -DOOR:locked,(47,08) -DOOR:locked,(23,10) -DOOR:locked,(39,10) -DOOR:locked,(57,10) -DOOR:locked,(47,12) -DOOR:closed,(22,13) -DOOR:closed,(38,13) -DOOR:locked,(24,14) -DOOR:closed,(31,14) -DOOR:locked,(49,14) -# Lord Carnarvon -MONSTER:('@',"Lord Carnarvon"),(25,10) -# The treasure of Lord Carnarvon -OBJECT:('(',"chest"),(25,10) -# student guards for the audience chamber -MONSTER:('@',"student"),(26,09) -MONSTER:('@',"student"),(27,09) -MONSTER:('@',"student"),(28,09) -MONSTER:('@',"student"),(26,10) -MONSTER:('@',"student"),(28,10) -MONSTER:('@',"student"),(26,11) -MONSTER:('@',"student"),(27,11) -MONSTER:('@',"student"),(28,11) -# city watch guards in the antechambers -MONSTER:('@',"watchman"),(50,06) -MONSTER:('@',"watchman"),(50,14) -# Eels in the moat -MONSTER:(';',"giant eel"),(20,10) -MONSTER:(';',"giant eel"),(45,04) -MONSTER:(';',"giant eel"),(33,16) -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Monsters on siege duty. -MONSTER: 'S',(60,09) -MONSTER: 'M',(60,10) -MONSTER: 'S',(60,11) -MONSTER: 'S',(60,12) -MONSTER: 'M',(60,13) -MONSTER: 'S',(61,10) -MONSTER: 'S',(61,11) -MONSTER: 'S',(61,12) -MONSTER: 'S',(30,03) -MONSTER: 'M',(20,17) -MONSTER: 'S',(67,02) -MONSTER: 'S',(10,19) - -# -# The "locate" level for the quest. -# -# Here you have to find the Entrance to the Tomb of the Toltec Kings -# to go further towards your assigned quest. -# - -MAZE: "Arc-loca",' ' -FLAGS: hardfloor -GEOMETRY:center,center -MAP -............................................................................ -............................................................................ -............................................................................ -........................-------------------------------..................... -........................|....|.S......................|..................... -........................|....|.|.|+------------------.|..................... -........................|....|.|.|.|.........|......|.|..................... -........................|....|.|.|.|.........|......|.|..................... -........................|---+-.|.|.|..---....+......|.|..................... -........................|....|.|.|.---|.|....|......|.|..................... -........................|....S.|.|.+..S.|--S-----S--|.|..................... -........................|....|.|.|.---|.|....|......+.|..................... -........................|---+-.|.|.|..---....|.------.|..................... -........................|....|.|.|.|.........|.|....+.|..................... -........................|....|.|.|.|.........|+|....|-|..................... -........................|....|.|.|------------+------.S..................... -........................|....|.S......................|..................... -........................-------------------------------..................... -............................................................................ -............................................................................ -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(25,04,28,07),lit,"temple" -REGION:(25,09,28,11),unlit,"temple" -REGION:(25,13,28,16),lit,"temple" -REGION:(30,04,30,16),lit,"ordinary" -REGION:(32,04,32,16),unlit,"ordinary" -REGION:(33,04,53,04),unlit,"ordinary",unfilled,irregular -REGION:(36,10,37,10),unlit,"ordinary" -REGION:(39,09,39,11),unlit,"ordinary" -REGION:(36,06,42,08),unlit,"ordinary",unfilled,irregular -REGION:(36,12,42,14),unlit,"ordinary",unfilled,irregular -REGION:(46,06,51,09),unlit,"ordinary" -REGION:(46,11,49,11),unlit,"ordinary",unfilled,irregular -REGION:(48,13,51,14),unlit,"ordinary" -# Doors -DOOR:closed,(31,04) -DOOR:closed,(28,08) -DOOR:locked,(29,10) -DOOR:closed,(28,12) -DOOR:closed,(31,16) -DOOR:locked,(34,05) -DOOR:locked,(35,10) -DOOR:locked,(38,10) -DOOR:closed,(43,10) -DOOR:closed,(45,08) -DOOR:locked,(46,14) -DOOR:locked,(46,15) -DOOR:locked,(49,10) -DOOR:locked,(52,11) -DOOR:closed,(52,13) -DOOR:closed,(54,15) -# Stairs -STAIR:(03,17),up -STAIR:(39,10),down -# Altars - three types. All are unattended. -ALTAR:(26,05),align[0],altar -ALTAR:(26,10),align[1],altar -ALTAR:(26,15),align[2],altar -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Treasure? -ENGRAVING:random,engrave,"X marks the spot." -ENGRAVING:random,engrave,"X marks the spot." -ENGRAVING:random,engrave,"X marks the spot." -ENGRAVING:random,engrave,"X marks the spot." -# Random traps -TRAP:"spiked pit",(24,02) -TRAP:"spiked pit",(37,00) -TRAP:"spiked pit",(23,05) -TRAP:"spiked pit",(26,19) -TRAP:"spiked pit",(55,10) -TRAP:"spiked pit",(55,08) -TRAP:"pit",(51,01) -TRAP:"pit",(23,18) -TRAP:"pit",(31,18) -TRAP:"pit",(48,19) -TRAP:"pit",(55,15) -TRAP:"magic",(60,04) -TRAP:"statue",(72,07) -TRAP:"statue",random -TRAP:"statue",random -TRAP:"anti magic",(64,12) -TRAP:"sleep gas",random -TRAP:"sleep gas",random -TRAP:"dart",random -TRAP:"dart",random -TRAP:"dart",random -TRAP:"rolling boulder",(32,10) -TRAP:"rolling boulder",(40,16) -# Random monsters. -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'M',random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:'M',random - -# -# The "goal" level for the quest. -# -# Here you meet Minion of Huhetotl your nemesis monster. You have to -# defeat Minion of Huhetotl in combat to gain the artifact you have -# been assigned to retrieve. -# - -MAZE: "Arc-goal", ' ' -GEOMETRY:center,center -MAP - - --------- - |..|.|..| - -----------|..S.S..|----------- - |.|........|+-|.|-+|........|.| - |.S........S..|.|..S........S.| - |.|........|..|.|..|........|.| - ------------------+------------------ - |..|..........|.......|..........|..| - |..|..........+.......|..........S..| - |..S..........|.......+..........|..| - |..|..........|.......|..........|..| - ------------------+------------------ - |.|........|..|.|..|........|.| - |.S........S..|.|..S........S.| - |.|........|+-|.|-+|........|.| - -----------|..S.S..|----------- - |..|.|..| - --------- - -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(35,02,36,03),unlit,"ordinary" -REGION:(40,02,41,03),unlit,"ordinary" -REGION:(24,04,24,06),unlit,"ordinary" -REGION:(26,04,33,06),lit,"ordinary" -REGION:(38,02,38,06),unlit,"ordinary" -REGION:(43,04,50,06),lit,"ordinary" -REGION:(52,04,52,06),unlit,"ordinary" -REGION:(35,05,36,06),unlit,"ordinary" -REGION:(40,05,41,06),unlit,"ordinary" -REGION:(21,08,22,11),unlit,"ordinary" -REGION:(24,08,33,11),lit,"ordinary" -REGION:(35,08,41,11),unlit,"ordinary" -REGION:(43,08,52,11),lit,"ordinary" -REGION:(54,08,55,11),unlit,"ordinary" -REGION:(24,13,24,15),unlit,"ordinary" -REGION:(26,13,33,15),unlit,"ordinary" -REGION:(35,13,36,14),unlit,"ordinary" -REGION:(35,16,36,17),unlit,"ordinary" -REGION:(38,13,38,17),unlit,"ordinary" -REGION:(40,13,41,14),unlit,"ordinary" -REGION:(40,16,41,17),unlit,"ordinary" -REGION:(43,13,50,15),unlit,"temple" -REGION:(52,13,52,15),unlit,"ordinary" -# Stairs -STAIR:(38,10),up -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# The altar of Huhetotl. Unattended. -ALTAR:(50,14),chaos,altar -# Objects -OBJECT:('(',"crystal ball"),(50,14),blessed,5,name:"The Orb of Detection" -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:"rolling boulder",(46,14) -# Random monsters. -MONSTER:('&',"Minion of Huhetotl"),(50,14) -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:'S',random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:('M',"human mummy"),random -MONSTER:'M',random - -# -# The "fill" levels for the quest. -# -# These levels are used to fill out any levels not occupied by specific -# levels as defined above. "filla" is the upper filler, between the -# start and locate levels, and "fillb" the lower between the locate -# and goal levels. -# - -LEVEL: "Arc-fila" -# -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up - OBJECT: random,random - MONSTER: 'S', random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random,random - MONSTER: 'S', random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - OBJECT: random,random - MONSTER: 'S', random -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - OBJECT: random, random - TRAP: random, random - MONSTER: 'S', random - MONSTER: ('M', "human mummy"), random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random, random - TRAP: random, random - MONSTER: 'S', random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - MONSTER: 'S', random -} - -RANDOM_CORRIDORS - -LEVEL: "Arc-filb" -# -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up - OBJECT: random,random - MONSTER: 'M', random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random,random - MONSTER: 'M', random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - OBJECT: random,random - MONSTER: 'M', random -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - OBJECT: random, random - TRAP: random, random - MONSTER: 'S', random - MONSTER: ('M', "human mummy"), random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random, random - TRAP: random, random - MONSTER: 'S', random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - MONSTER: 'S', random -} - -RANDOM_CORRIDORS diff --git a/dat/Bar-fila.lua b/dat/Bar-fila.lua new file mode 100644 index 000000000..3f685c50b --- /dev/null +++ b/dat/Bar-fila.lua @@ -0,0 +1,33 @@ +-- NetHack 3.6 Barb.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg=".", bg=".", smoothed=true, joined=true, lit=0, walled=false }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.trap() +des.trap() +des.trap() +des.trap() +-- +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ class = "O", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) diff --git a/dat/Bar-filb.lua b/dat/Bar-filb.lua new file mode 100644 index 000000000..15d9f33a5 --- /dev/null +++ b/dat/Bar-filb.lua @@ -0,0 +1,44 @@ +-- NetHack 3.6 Barb.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg=".", bg=" ", smoothed=true, joined=true, lit=0, walled=true }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.trap() +des.trap() +des.trap() +des.trap() +-- +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ class = "O", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ class = "T", peaceful=0 }) diff --git a/dat/Bar-goal.lua b/dat/Bar-goal.lua new file mode 100644 index 000000000..31754a4c0 --- /dev/null +++ b/dat/Bar-goal.lua @@ -0,0 +1,95 @@ +-- NetHack 3.6 Barb.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.map([[ + + ............. + .................. + .... ......................... .... + ....... .......................... ....... + ...... ........................ ....... + .. ...................................... .. + .. ..................... .. + .. .................. .. + .. ..S...S.............. ................ + .. ........ ... + ......... .. + ...... .. ... .... + .. ... .. ...... ........ + .... .. .................. ........ ...... + ...... ...................... ...... .. + .... .................. ........... + .............. + ........... + +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "unlit") +-- Secret doors +des.door("locked",22,09) +des.door("locked",26,09) +-- Stairs +des.stair("up", 36,05) +-- The altar. Unattended. +des.altar({ x=63,y=04,align="noncoaligned", type="altar" }) +des.non_diggable(selection.area(00,00,75,19)) +-- Objects +des.object({ id = "luckstone", x=63, y=04,buc="blessed",spe=0,name="The Heart of Ahriman" }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster({ id = "Thoth Amon", x=63, y=04, peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ class = "O", peaceful=0 }) +des.monster({ class = "O", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ class = "T", peaceful=0 }) +des.wallify() + diff --git a/dat/Bar-loca.lua b/dat/Bar-loca.lua new file mode 100644 index 000000000..df1e7d8aa --- /dev/null +++ b/dat/Bar-loca.lua @@ -0,0 +1,107 @@ +-- NetHack 3.6 Barb.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "hardfloor") + +des.map([[ +..........PPP......................................... +...........PP.......................................... ....... +..........PP...........-----..........------------------ .......... +...........PP..........+...|..........|....S...........|.. ............ +..........PPP..........|...|..........|-----...........|... ............. +...........PPP.........-----..........+....+...........|... ............. +..........PPPPPPPPP...................+....+...........S................. +........PPPPPPPPPPPPP.........-----...|-----...........|................ +......PPPPPPPPPPPPPP..P.......+...|...|....S...........| ... +.....PPPPPPP......P..PPPP.....|...|...------------------.. ... +....PPPPPPP.........PPPPPP....-----........................ ........ +...PPPPPPP..........PPPPPPP.................................. .......... +....PPPPPPP........PPPPPPP.................................... .......... +.....PPPPP........PPPPPPP.........-----........................ ........ +......PPP..PPPPPPPPPPPP...........+...|......................... ..... +..........PPPPPPPPPPP.............|...|......................... .... +..........PPPPPPPPP...............-----......................... . +..............PPP................................................. +...............PP.................................................... +................PPP................................................... +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +des.region(selection.area(24,03,26,04), "unlit") +des.region(selection.area(31,08,33,09), "unlit") +des.region(selection.area(35,14,37,15), "unlit") +des.region(selection.area(39,03,54,08), "lit") +des.region(selection.area(56,00,75,08), "unlit") +des.region(selection.area(64,09,75,16), "unlit") +-- Doors +des.door("open",23,03) +des.door("open",30,08) +des.door("open",34,14) +des.door("locked",38,05) +des.door("locked",38,06) +des.door("closed",43,03) +des.door("closed",43,05) +des.door("closed",43,06) +des.door("closed",43,08) +des.door("locked",55,06) +-- Stairs +des.stair("up", 05,02) +des.stair("down", 70,13) +-- Objects +des.object({ x = 42, y = 03 }) +des.object({ x = 42, y = 03 }) +des.object({ x = 42, y = 03 }) +des.object({ x = 41, y = 03 }) +des.object({ x = 41, y = 03 }) +des.object({ x = 41, y = 03 }) +des.object({ x = 41, y = 03 }) +des.object({ x = 41, y = 08 }) +des.object({ x = 41, y = 08 }) +des.object({ x = 42, y = 08 }) +des.object({ x = 42, y = 08 }) +des.object({ x = 42, y = 08 }) +des.object({ x = 71, y = 13 }) +des.object({ x = 71, y = 13 }) +des.object({ x = 71, y = 13 }) +-- Random traps +des.trap("spiked pit",10,13) +des.trap("spiked pit",21,07) +des.trap("spiked pit",67,08) +des.trap("spiked pit",68,09) +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster({ id = "ogre", x=12, y=09, peaceful=0 }) +des.monster({ id = "ogre", x=18, y=11, peaceful=0 }) +des.monster({ id = "ogre", x=45, y=05, peaceful=0 }) +des.monster({ id = "ogre", x=45, y=06, peaceful=0 }) +des.monster({ id = "ogre", x=47, y=05, peaceful=0 }) +des.monster({ id = "ogre", x=46, y=05, peaceful=0 }) +des.monster({ id = "ogre", x=56, y=03, peaceful=0 }) +des.monster({ id = "ogre", x=56, y=04, peaceful=0 }) +des.monster({ id = "ogre", x=56, y=05, peaceful=0 }) +des.monster({ id = "ogre", x=56, y=06, peaceful=0 }) +des.monster({ id = "ogre", x=57, y=03, peaceful=0 }) +des.monster({ id = "ogre", x=57, y=04, peaceful=0 }) +des.monster({ id = "ogre", x=57, y=05, peaceful=0 }) +des.monster({ id = "ogre", x=57, y=06, peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ id = "ogre", peaceful=0 }) +des.monster({ class = "O", peaceful=0 }) +des.monster({ class = "T", peaceful=0 }) +des.monster({ id = "rock troll", x=46, y=06, peaceful=0 }) +des.monster({ id = "rock troll", x=47, y=06, peaceful=0 }) +des.monster({ id = "rock troll", x=56, y=07, peaceful=0 }) +des.monster({ id = "rock troll", x=57, y=07, peaceful=0 }) +des.monster({ id = "rock troll", x=70, y=13, peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ id = "rock troll", peaceful=0 }) +des.monster({ class = "T", peaceful=0 }) + diff --git a/dat/Bar-strt.lua b/dat/Bar-strt.lua new file mode 100644 index 000000000..c3a98de04 --- /dev/null +++ b/dat/Bar-strt.lua @@ -0,0 +1,103 @@ +-- NetHack 3.6 Barb.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, Pelias, +-- and receive your quest assignment. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") + +des.map([[ +..................................PP........................................ +...................................PP....................................... +...................................PP....................................... +....................................PP...................................... +........--------------......-----....PPP.................................... +........|...S........|......+...|...PPP..................................... +........|----........|......|...|....PP..................................... +........|.\..........+......-----........................................... +........|----........|...............PP..................................... +........|...S........|...-----.......PPP.................................... +........--------------...+...|......PPPPP................................... +.........................|...|.......PPP.................................... +...-----......-----......-----........PP.................................... +...|...+......|...+..--+--.............PP................................... +...|...|......|...|..|...|..............PP.................................. +...-----......-----..|...|.............PPPP................................. +.....................-----............PP..PP................................ +.....................................PP...PP................................ +....................................PP...PP................................. +....................................PP....PP................................ +]]); + +-- the forest beyond the river +des.replace_terrain({ region={37,00, 59,19}, fromterrain=".", toterrain="T", chance=5 }) +des.replace_terrain({ region={60,00, 64,19}, fromterrain=".", toterrain="T", chance=10 }) +des.replace_terrain({ region={65,00, 75,19}, fromterrain=".", toterrain="T", chance=20 }) +-- guarantee a path and free spot for the portal +des.terrain(selection.randline(selection.new(), 37,7, 62,02, 7), ".") +des.terrain({62,02}, ".") + +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +des.region(selection.area(09,05,11,05), "unlit") +des.region(selection.area(09,07,11,07), "lit") +des.region(selection.area(09,09,11,09), "unlit") +des.region(selection.area(13,05,20,09), "lit") +des.region(selection.area(29,05,31,06), "lit") +des.region(selection.area(26,10,28,11), "lit") +des.region(selection.area(04,13,06,14), "lit") +des.region(selection.area(15,13,17,14), "lit") +des.region(selection.area(22,14,24,15), "lit") +-- Stairs +des.stair("down", 09,09) +-- Portal arrival point +des.levregion({ region = {62,02,62,02}, type="branch" }) +-- Doors +des.door("locked",12,05) +des.door("locked",12,09) +des.door("closed",21,07) +des.door("open",07,13) +des.door("open",18,13) +des.door("open",23,13) +des.door("open",25,10) +des.door("open",28,05) +-- Elder +des.monster("Pelias", 10, 07) +-- The treasure of Pelias +des.object("chest", 09, 05) +-- chieftain guards for the audience chamber +des.monster("chieftain", 10, 05) +des.monster("chieftain", 10, 09) +des.monster("chieftain", 11, 05) +des.monster("chieftain", 11, 09) +des.monster("chieftain", 14, 05) +des.monster("chieftain", 14, 09) +des.monster("chieftain", 16, 05) +des.monster("chieftain", 16, 09) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- One trap to keep the ogres at bay. +des.trap("spiked pit",37,07) +-- Eels in the river +des.monster("giant eel", 36, 01) +des.monster("giant eel", 37, 09) +des.monster("giant eel", 39, 15) +-- Monsters on siege duty. +des.monster({ id = "ogre", x=40, y=08, peaceful=0 }) +des.monster({ id = "ogre", x=41, y=06, peaceful=0 }) +des.monster({ id = "ogre", x=41, y=07, peaceful=0 }) +des.monster({ id = "ogre", x=41, y=08, peaceful=0 }) +des.monster({ id = "ogre", x=41, y=09, peaceful=0 }) +des.monster({ id = "ogre", x=41, y=10, peaceful=0 }) +des.monster({ id = "ogre", x=42, y=06, peaceful=0 }) +des.monster({ id = "ogre", x=42, y=07, peaceful=0 }) +des.monster({ id = "ogre", x=42, y=08, peaceful=0 }) +des.monster({ id = "ogre", x=42, y=09, peaceful=0 }) +des.monster({ id = "ogre", x=42, y=10, peaceful=0 }) diff --git a/dat/Barb.des b/dat/Barb.des deleted file mode 100644 index 0be480636..000000000 --- a/dat/Barb.des +++ /dev/null @@ -1,377 +0,0 @@ -# NetHack 3.6 Barb.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1991 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, Pelias, -# and receive your quest assignment. -# -MAZE: "Bar-strt",' ' -FLAGS: noteleport,hardfloor -GEOMETRY:center,center -MAP -..................................PP........................................ -...................................PP....................................... -...................................PP....................................... -....................................PP...................................... -........--------------......-----....PPP.................................... -........|...S........|......+...|...PPP..................................... -........|----........|......|...|....PP..................................... -........|.\..........+......-----........................................... -........|----........|...............PP..................................... -........|...S........|...-----.......PPP.................................... -........--------------...+...|......PPPPP................................... -.........................|...|.......PPP.................................... -...-----......-----......-----........PP.................................... -...|...+......|...+..--+--.............PP................................... -...|...|......|...|..|...|..............PP.................................. -...-----......-----..|...|.............PPPP................................. -.....................-----............PP..PP................................ -.....................................PP...PP................................ -....................................PP...PP................................. -....................................PP....PP................................ -ENDMAP - -# the forest beyond the river -REPLACE_TERRAIN:(37,0,59,19),'.','T', 5% -REPLACE_TERRAIN:(60,0,64,19),'.','T', 10% -REPLACE_TERRAIN:(65,0,75,19),'.','T', 20% -# guarantee a path and free spot for the portal -TERRAIN:(randline (37,7),(62,02),7), '.' -TERRAIN:(62,02),'.' - -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(09,05,11,05),unlit,"ordinary" -REGION:(09,07,11,07),lit,"ordinary" -REGION:(09,09,11,09),unlit,"ordinary" -REGION:(13,05,20,09),lit,"ordinary" -REGION:(29,05,31,06),lit,"ordinary" -REGION:(26,10,28,11),lit,"ordinary" -REGION:(04,13,06,14),lit,"ordinary" -REGION:(15,13,17,14),lit,"ordinary" -REGION:(22,14,24,15),lit,"ordinary" -# Stairs -STAIR:(09,09),down -# Portal arrival point -BRANCH:(62,02,62,02),(0,0,0,0) -# Doors -DOOR:locked,(12,05) -DOOR:locked,(12,09) -DOOR:closed,(21,07) -DOOR:open,(07,13) -DOOR:open,(18,13) -DOOR:open,(23,13) -DOOR:open,(25,10) -DOOR:open,(28,05) -# Elder -MONSTER:('@',"Pelias"),(10,07) -# The treasure of Pelias -OBJECT:('(',"chest"),(09,05) -# chieftain guards for the audience chamber -MONSTER:('@',"chieftain"),(10,05) -MONSTER:('@',"chieftain"),(10,09) -MONSTER:('@',"chieftain"),(11,05) -MONSTER:('@',"chieftain"),(11,09) -MONSTER:('@',"chieftain"),(14,05) -MONSTER:('@',"chieftain"),(14,09) -MONSTER:('@',"chieftain"),(16,05) -MONSTER:('@',"chieftain"),(16,09) -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# One trap to keep the ogres at bay. -TRAP:"spiked pit",(37,07) -# Eels in the river -MONSTER:(';',"giant eel"),(36,01) -MONSTER:(';',"giant eel"),(37,09) -MONSTER:(';',"giant eel"),(39,15) -# Monsters on siege duty. -MONSTER:('O',"ogre"),(40,08),hostile -MONSTER:('O',"ogre"),(41,06),hostile -MONSTER:('O',"ogre"),(41,07),hostile -MONSTER:('O',"ogre"),(41,08),hostile -MONSTER:('O',"ogre"),(41,09),hostile -MONSTER:('O',"ogre"),(41,10),hostile -MONSTER:('O',"ogre"),(42,06),hostile -MONSTER:('O',"ogre"),(42,07),hostile -MONSTER:('O',"ogre"),(42,08),hostile -MONSTER:('O',"ogre"),(42,09),hostile -MONSTER:('O',"ogre"),(42,10),hostile - -# -# The "locate" level for the quest. -# -# Here you have to infiltrate the Duali Oasis to go -# further towards your assigned quest. -# - -MAZE: "Bar-loca",' ' -FLAGS: hardfloor -GEOMETRY:center,center -MAP -..........PPP......................................... -...........PP.......................................... ....... -..........PP...........-----..........------------------ .......... -...........PP..........+...|..........|....S...........|.. ............ -..........PPP..........|...|..........|-----...........|... ............. -...........PPP.........-----..........+....+...........|... ............. -..........PPPPPPPPP...................+....+...........S................. -........PPPPPPPPPPPPP.........-----...|-----...........|................ -......PPPPPPPPPPPPPP..P.......+...|...|....S...........| ... -.....PPPPPPP......P..PPPP.....|...|...------------------.. ... -....PPPPPPP.........PPPPPP....-----........................ ........ -...PPPPPPP..........PPPPPPP.................................. .......... -....PPPPPPP........PPPPPPP.................................... .......... -.....PPPPP........PPPPPPP.........-----........................ ........ -......PPP..PPPPPPPPPPPP...........+...|......................... ..... -..........PPPPPPPPPPP.............|...|......................... .... -..........PPPPPPPPP...............-----......................... . -..............PPP................................................. -...............PP.................................................... -................PPP................................................... -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(24,03,26,04),unlit,"ordinary" -REGION:(31,08,33,09),unlit,"ordinary" -REGION:(35,14,37,15),unlit,"ordinary" -REGION:(39,03,54,08),lit,"ordinary" -REGION:(56,00,75,08),unlit,"ordinary" -REGION:(64,09,75,16),unlit,"ordinary" -# Doors -DOOR:open,(23,03) -DOOR:open,(30,08) -DOOR:open,(34,14) -DOOR:locked,(38,05) -DOOR:locked,(38,06) -DOOR:closed,(43,03) -DOOR:closed,(43,05) -DOOR:closed,(43,06) -DOOR:closed,(43,08) -DOOR:locked,(55,06) -# Stairs -STAIR:(05,02),up -STAIR:(70,13),down -# Objects -OBJECT:random,(42,03) -OBJECT:random,(42,03) -OBJECT:random,(42,03) -OBJECT:random,(41,03) -OBJECT:random,(41,03) -OBJECT:random,(41,03) -OBJECT:random,(41,03) -OBJECT:random,(41,08) -OBJECT:random,(41,08) -OBJECT:random,(42,08) -OBJECT:random,(42,08) -OBJECT:random,(42,08) -OBJECT:random,(71,13) -OBJECT:random,(71,13) -OBJECT:random,(71,13) -# Random traps -TRAP:"spiked pit",(10,13) -TRAP:"spiked pit",(21,07) -TRAP:"spiked pit",(67,08) -TRAP:"spiked pit",(68,09) -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('O',"ogre"),(12,09),hostile -MONSTER:('O',"ogre"),(18,11),hostile -MONSTER:('O',"ogre"),(45,05),hostile -MONSTER:('O',"ogre"),(45,06),hostile -MONSTER:('O',"ogre"),(47,05),hostile -MONSTER:('O',"ogre"),(46,05),hostile -MONSTER:('O',"ogre"),(56,03),hostile -MONSTER:('O',"ogre"),(56,04),hostile -MONSTER:('O',"ogre"),(56,05),hostile -MONSTER:('O',"ogre"),(56,06),hostile -MONSTER:('O',"ogre"),(57,03),hostile -MONSTER:('O',"ogre"),(57,04),hostile -MONSTER:('O',"ogre"),(57,05),hostile -MONSTER:('O',"ogre"),(57,06),hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:'O',random,hostile -MONSTER:'T',random,hostile -MONSTER:('T',"rock troll"),(46,06),hostile -MONSTER:('T',"rock troll"),(47,06),hostile -MONSTER:('T',"rock troll"),(56,07),hostile -MONSTER:('T',"rock troll"),(57,07),hostile -MONSTER:('T',"rock troll"),(70,13),hostile -MONSTER:('T',"rock troll"),random,hostile -MONSTER:('T',"rock troll"),random,hostile -MONSTER:'T',random,hostile - -# -# The "goal" level for the quest. -# -# Here you meet Thoth Amon, your nemesis monster. You have to -# defeat Thoth Amon in combat to gain the artifact you have -# been assigned to retrieve. -# - -MAZE: "Bar-goal", ' ' -GEOMETRY:center,center -MAP - - ............. - .................. - .... ......................... .... - ....... .......................... ....... - ...... ........................ ....... - .. ...................................... .. - .. ..................... .. - .. .................. .. - .. ..S...S.............. ................ - .. ........ ... - ......... .. - ...... .. ... .... - .. ... .. ...... ........ - .... .. .................. ........ ...... - ...... ...................... ...... .. - .... .................. ........... - .............. - ........... - -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),unlit,"ordinary" -# Secret doors -DOOR:locked,(22,09) -DOOR:locked,(26,09) -# Stairs -STAIR:(36,05),up -# The altar. Unattended. -ALTAR:(63,04),noncoaligned,altar -NON_DIGGABLE:(00,00,75,19) -# Objects -OBJECT:('*',"luckstone"),(63,04),blessed,0,name:"The Heart of Ahriman" -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('@',"Thoth Amon"),(63,04),hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:('O',"ogre"),random,hostile -MONSTER:'O',random,hostile -MONSTER:'O',random,hostile -MONSTER:('T',"rock troll"),random,hostile -MONSTER:('T',"rock troll"),random,hostile -MONSTER:('T',"rock troll"),random,hostile -MONSTER:('T',"rock troll"),random,hostile -MONSTER:('T',"rock troll"),random,hostile -MONSTER:('T',"rock troll"),random,hostile -MONSTER:('T',"rock troll"),random,hostile -MONSTER:('T',"rock troll"),random,hostile -MONSTER:'T',random,hostile -WALLIFY - -# -# The "fill" levels for the quest. -# -# These levels are used to fill out any levels not occupied by specific -# levels as defined above. "filla" is the upper filler, between the -# start and locate levels, and "fillb" the lower between the locate -# and goal levels. -# - -MAZE: "Bar-fila" , ' ' -INIT_MAP: mines, '.' , '.' , true , true , unlit , false -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -# -MONSTER: ('O', "ogre"), random, hostile -MONSTER: ('O', "ogre"), random, hostile -MONSTER: 'O', random, hostile -MONSTER: ('T', "rock troll"), random, hostile - -MAZE: "Bar-filb" , ' ' -INIT_MAP: mines, '.' , ' ' , true , true , unlit , true -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -# -MONSTER: ('O', "ogre"), random, hostile -MONSTER: ('O', "ogre"), random, hostile -MONSTER: ('O', "ogre"), random, hostile -MONSTER: ('O', "ogre"), random, hostile -MONSTER: ('O', "ogre"), random, hostile -MONSTER: ('O', "ogre"), random, hostile -MONSTER: ('O', "ogre"), random, hostile -MONSTER: 'O' , random, hostile -MONSTER: ('T', "rock troll"), random, hostile -MONSTER: ('T', "rock troll"), random, hostile -MONSTER: ('T', "rock troll"), random, hostile -MONSTER: 'T' , random, hostile diff --git a/dat/Cav-fila.lua b/dat/Cav-fila.lua new file mode 100644 index 000000000..b32a90854 --- /dev/null +++ b/dat/Cav-fila.lua @@ -0,0 +1,35 @@ +-- NetHack 3.6 Caveman.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.level_init({ style = "mines", fg = ".", bg = " ", smoothed=true, joined=true, walled=true }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.trap() +des.trap() +des.trap() +des.trap() +-- +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ class = "h", peaceful=0 }) +des.monster({ id = "hill giant", peaceful=0 }) diff --git a/dat/Cav-filb.lua b/dat/Cav-filb.lua new file mode 100644 index 000000000..0e0c24542 --- /dev/null +++ b/dat/Cav-filb.lua @@ -0,0 +1,41 @@ +-- NetHack 3.6 Caveman.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.level_init({ style = "mines", fg = ".", bg = " ", smoothed=true, joined=true, walled=true }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.trap() +des.trap() +des.trap() +des.trap() +-- +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ class = "h", peaceful=0 }) +des.monster({ class = "h", peaceful=0 }) +des.monster({ id = "hill giant", peaceful=0 }) +des.monster({ id = "hill giant", peaceful=0 }) diff --git a/dat/Cav-goal.lua b/dat/Cav-goal.lua new file mode 100644 index 000000000..98919b04f --- /dev/null +++ b/dat/Cav-goal.lua @@ -0,0 +1,59 @@ +-- NetHack 3.6 Caveman.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.map([[ + + ..................... + ....................... + ......................... + ........................... + ............................. + ............................... + ................................. + ................................... + ..................................... + ....................................... + ..................................... + ................................... + ................................. + ............................... + ............................. + ........................... + ......................... + ....................... + +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +-- Stairs +des.stair("up") +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Objects +des.object({ id = "mace", x=23, y=10, buc="blessed", spe=0, name="The Sceptre of Might" }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- monsters. +des.monster({ id = "Chromatic Dragon", x=23, y=10, asleep=1 }) +des.monster("shrieker", 26, 13) +des.monster("shrieker", 25, 8) +des.monster("shrieker", 45, 11) +des.wallify() diff --git a/dat/Cav-loca.lua b/dat/Cav-loca.lua new file mode 100644 index 000000000..e3b970948 --- /dev/null +++ b/dat/Cav-loca.lua @@ -0,0 +1,101 @@ +-- NetHack 3.6 Caveman.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "hardfloor") + +des.map([[ + + ............. ........... + ............... ............. + ............. ............... .......... + ........... ............. ............... + ... ... .................. + ... .......... ... .................. + ... ............ BBB................... + ... .......... ...................... + ..... .. .....B........................ + .... ............... . ........B.......................... + ...... .. .............S.............. .................. + .... .. ........... ............... + .. ... .................... + .... BB................... + .. .. .. ............... + .. ....... .... ..... .... .. ....... S + ............ ....... .. ....... ..... ... .... + ....... ..... ...... ....... + +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "unlit") +des.region({ region={52,06, 73,15}, lit=1, type="ordinary", prefilled=0, irregular=1 }) +-- Doors +des.door("locked",28,11) +-- Stairs +des.stair("up", 04,03) +des.stair("down", 73,10) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Objects +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster({ id = "bugbear", x=02, y=10, peaceful=0 }) +des.monster({ id = "bugbear", x=03, y=11, peaceful=0 }) +des.monster({ id = "bugbear", x=04, y=12, peaceful=0 }) +des.monster({ id = "bugbear", x=02, y=11, peaceful=0 }) +des.monster({ id = "bugbear", x=16, y=16, peaceful=0 }) +des.monster({ id = "bugbear", x=17, y=17, peaceful=0 }) +des.monster({ id = "bugbear", x=18, y=18, peaceful=0 }) +des.monster({ id = "bugbear", x=19, y=16, peaceful=0 }) +des.monster({ id = "bugbear", x=30, y=06, peaceful=0 }) +des.monster({ id = "bugbear", x=31, y=07, peaceful=0 }) +des.monster({ id = "bugbear", x=32, y=08, peaceful=0 }) +des.monster({ id = "bugbear", x=33, y=06, peaceful=0 }) +des.monster({ id = "bugbear", x=34, y=07, peaceful=0 }) +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ id = "bugbear", peaceful=0 }) +des.monster({ class = "h", peaceful=0 }) +des.monster({ class = "H", peaceful=0 }) +des.monster({ id = "hill giant", x=03, y=12, peaceful=0 }) +des.monster({ id = "hill giant", x=20, y=17, peaceful=0 }) +des.monster({ id = "hill giant", x=35, y=08, peaceful=0 }) +des.monster({ id = "hill giant", peaceful=0 }) +des.monster({ id = "hill giant", peaceful=0 }) +des.monster({ id = "hill giant", peaceful=0 }) +des.monster({ id = "hill giant", peaceful=0 }) +des.monster({ class = "H", peaceful=0 }) +des.wallify() + +-- +-- The "goal" level for the quest. +-- +-- Here you meet Tiamat your nemesis monster. You have to +-- defeat Tiamat in combat to gain the artifact you have +-- been assigned to retrieve. +-- diff --git a/dat/Cav-strt.lua b/dat/Cav-strt.lua new file mode 100644 index 000000000..eae5c35d1 --- /dev/null +++ b/dat/Cav-strt.lua @@ -0,0 +1,91 @@ +-- NetHack 3.6 Caveman.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, Shaman Karnov +-- and receive your quest assignment. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") + +des.map([[ + + ...... .......................... ... .... ...... + ...... .......................... ........ .... ..... + ..BB ............................. ......... .... .. + .. ...................... ....... .. .... .. + .. .................... .. ....... .. ... + .. S BB ..... ....... .... .... + .. ... . .. ........ .. .. .. ... + .. ...... .. ............ .. ... + . .... .. ........ .. ........... + ... .. .. ............. ................... + ..... ..... ............................... ........... + .....B................ ... ... + ..... . .......... .... . ... .......... ... + ... .. ............. .. ................... .... + BB .. ......... BB ... .......... .. ... ... + ...... ..... B ........ .. .. .... ... + .......... .......... ..... ... ..... ........ + .. ... . ..... .... .. ... .. + +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "unlit") +des.region({ region={13,01, 40,05}, lit=1, type="temple", prefilled=0, irregular=1 }) +-- The occupied rooms. +des.region({ region={02,01, 08,03}, lit=1, type="ordinary", prefilled=0, irregular=1 }) +des.region({ region={01,11, 06,14}, lit=1, type="ordinary", prefilled=0, irregular=1 }) +des.region({ region={13,08, 18,10}, lit=1, type="ordinary", prefilled=0, irregular=1 }) +des.region({ region={05,17, 14,18}, lit=1, type="ordinary", prefilled=0, irregular=1 }) +des.region({ region={17,16, 23,18}, lit=1, type="ordinary", prefilled=0, irregular=1 }) +des.region({ region={35,16, 44,18}, lit=1, type="ordinary", prefilled=0, irregular=1 }) +-- Stairs +des.stair("down", 02,03) +-- Portal arrival point +des.levregion({ region = {71,09,71,09}, type="branch" }) +-- Doors +des.door("locked",19,06) +-- The temple altar (this will force a priest(ess) to be created) +des.altar({ x=36,y=02, align="coaligned", type="shrine" }) +-- Shaman Karnov +des.monster("Shaman Karnov", 35, 02) +-- The treasure of Shaman Karnov +des.object("chest", 34, 02) +-- neanderthal guards for the audience chamber +des.monster("neanderthal", 20, 03) +des.monster("neanderthal", 20, 02) +des.monster("neanderthal", 20, 01) +des.monster("neanderthal", 21, 03) +des.monster("neanderthal", 21, 02) +des.monster("neanderthal", 21, 01) +des.monster("neanderthal", 22, 01) +des.monster("neanderthal", 26, 09) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Random traps +des.trap("pit",47,11) +des.trap("pit",57,10) +des.trap() +des.trap() +des.trap() +des.trap() +-- Monsters on siege duty (in the outer caves). +des.monster({ id ="bugbear", x=47, y=02, peaceful=0 }) +des.monster({ id ="bugbear", x=48, y=03, peaceful=0 }) +des.monster({ id ="bugbear", x=49, y=04, peaceful=0 }) +des.monster({ id ="bugbear", x=67, y=03, peaceful=0 }) +des.monster({ id ="bugbear", x=69, y=04, peaceful=0 }) +des.monster({ id ="bugbear", x=51, y=13, peaceful=0 }) +des.monster({ id ="bugbear", x=53, y=14, peaceful=0 }) +des.monster({ id ="bugbear", x=55, y=15, peaceful=0 }) +des.monster({ id ="bugbear", x=63, y=10, peaceful=0 }) +des.monster({ id ="bugbear", x=65, y=09, peaceful=0 }) +des.monster({ id ="bugbear", x=67, y=10, peaceful=0 }) +des.monster({ id ="bugbear", x=69, y=11, peaceful=0 }) +des.wallify() diff --git a/dat/Caveman.des b/dat/Caveman.des deleted file mode 100644 index a2e2ec9b8..000000000 --- a/dat/Caveman.des +++ /dev/null @@ -1,316 +0,0 @@ -# NetHack 3.6 Caveman.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1991 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, Shaman Karnov -# and receive your quest assignment. -# -MAZE: "Cav-strt",' ' -FLAGS: noteleport,hardfloor -GEOMETRY:center,center -MAP - - ...... .......................... ... .... ...... - ...... .......................... ........ .... ..... - ..BB ............................. ......... .... .. - .. ...................... ....... .. .... .. - .. .................... .. ....... .. ... - .. S BB ..... ....... .... .... - .. ... . .. ........ .. .. .. ... - .. ...... .. ............ .. ... - . .... .. ........ .. ........... - ... .. .. ............. ................... - ..... ..... ............................... ........... - .....B................ ... ... - ..... . .......... .... . ... .......... ... - ... .. ............. .. ................... .... - BB .. ......... BB ... .......... .. ... ... - ...... ..... B ........ .. .. .... ... - .......... .......... ..... ... ..... ........ - .. ... . ..... .... .. ... .. - -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),unlit,"ordinary" -REGION:(13,01,40,05),lit,"temple",unfilled,irregular -# The occupied rooms. -REGION:(02,01,08,03),lit,"ordinary",unfilled,irregular -REGION:(01,11,06,14),lit,"ordinary",unfilled,irregular -REGION:(13,08,18,10),lit,"ordinary",unfilled,irregular -REGION:(05,17,14,18),lit,"ordinary",unfilled,irregular -REGION:(17,16,23,18),lit,"ordinary",unfilled,irregular -REGION:(35,16,44,18),lit,"ordinary",unfilled,irregular -# Stairs -STAIR:(02,03),down -# Portal arrival point -BRANCH:(71,09,71,09),(0,0,0,0) -# Doors -DOOR:locked,(19,06) -# The temple altar (this will force a priest(ess) to be created) -ALTAR:(36,02),coaligned,shrine -# Shaman Karnov -MONSTER:('@',"Shaman Karnov"),(35,02) -# The treasure of Shaman Karnov -OBJECT:('(',"chest"),(34,02) -# neanderthal guards for the audience chamber -MONSTER:('@',"neanderthal"),(20,03) -MONSTER:('@',"neanderthal"),(20,02) -MONSTER:('@',"neanderthal"),(20,01) -MONSTER:('@',"neanderthal"),(21,03) -MONSTER:('@',"neanderthal"),(21,02) -MONSTER:('@',"neanderthal"),(21,01) -MONSTER:('@',"neanderthal"),(22,01) -MONSTER:('@',"neanderthal"),(26,09) -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Random traps -TRAP:"pit",(47,11) -TRAP:"pit",(57,10) -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Monsters on siege duty (in the outer caves). -MONSTER: ('h',"bugbear"),(47,02),hostile -MONSTER: ('h',"bugbear"),(48,03),hostile -MONSTER: ('h',"bugbear"),(49,04),hostile -MONSTER: ('h',"bugbear"),(67,03),hostile -MONSTER: ('h',"bugbear"),(69,04),hostile -MONSTER: ('h',"bugbear"),(51,13),hostile -MONSTER: ('h',"bugbear"),(53,14),hostile -MONSTER: ('h',"bugbear"),(55,15),hostile -MONSTER: ('h',"bugbear"),(63,10),hostile -MONSTER: ('h',"bugbear"),(65,09),hostile -MONSTER: ('h',"bugbear"),(67,10),hostile -MONSTER: ('h',"bugbear"),(69,11),hostile -WALLIFY - -# -# The "locate" level for the quest. -# -# Here you have to find the lair of Tiamat to go -# further towards your assigned quest. -# - -MAZE: "Cav-loca",' ' -FLAGS: hardfloor -GEOMETRY:center,center -MAP - - ............. ........... - ............... ............. - ............. ............... .......... - ........... ............. ............... - ... ... .................. - ... .......... ... .................. - ... ............ BBB................... - ... .......... ...................... - ..... .. .....B........................ - .... ............... . ........B.......................... - ...... .. .............S.............. .................. - .... .. ........... ............... - .. ... .................... - .... BB................... - .. .. .. ............... - .. ....... .... ..... .... .. ....... S - ............ ....... .. ....... ..... ... .... - ....... ..... ...... ....... - -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),unlit,"ordinary" -REGION:(52,06,73,15),lit,"ordinary",unfilled,irregular -# Doors -DOOR:locked,(28,11) -# Stairs -STAIR:(04,03),up -STAIR:(73,10),down -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('h',"bugbear"),(02,10),hostile -MONSTER:('h',"bugbear"),(03,11),hostile -MONSTER:('h',"bugbear"),(04,12),hostile -MONSTER:('h',"bugbear"),(02,11),hostile -MONSTER:('h',"bugbear"),(16,16),hostile -MONSTER:('h',"bugbear"),(17,17),hostile -MONSTER:('h',"bugbear"),(18,18),hostile -MONSTER:('h',"bugbear"),(19,16),hostile -MONSTER:('h',"bugbear"),(30,06),hostile -MONSTER:('h',"bugbear"),(31,07),hostile -MONSTER:('h',"bugbear"),(32,08),hostile -MONSTER:('h',"bugbear"),(33,06),hostile -MONSTER:('h',"bugbear"),(34,07),hostile -MONSTER:('h',"bugbear"),random,hostile -MONSTER:('h',"bugbear"),random,hostile -MONSTER:('h',"bugbear"),random,hostile -MONSTER:('h',"bugbear"),random,hostile -MONSTER:'h',random,hostile -MONSTER:'H',random,hostile -MONSTER:('H',"hill giant"),(03,12),hostile -MONSTER:('H',"hill giant"),(20,17),hostile -MONSTER:('H',"hill giant"),(35,08),hostile -MONSTER:('H',"hill giant"),random,hostile -MONSTER:('H',"hill giant"),random,hostile -MONSTER:('H',"hill giant"),random,hostile -MONSTER:('H',"hill giant"),random,hostile -MONSTER:'H',random,hostile -WALLIFY - -# -# The "goal" level for the quest. -# -# Here you meet Tiamat your nemesis monster. You have to -# defeat Tiamat in combat to gain the artifact you have -# been assigned to retrieve. -# - -MAZE: "Cav-goal", ' ' -GEOMETRY:center,center -MAP - - ..................... - ....................... - ......................... - ........................... - ............................. - ............................... - ................................. - ................................... - ..................................... - ....................................... - ..................................... - ................................... - ................................. - ............................... - ............................. - ........................... - ......................... - ....................... - -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -# Stairs -STAIR:random,up -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Objects -OBJECT:(')',"mace"),(23,10),blessed,0,name:"The Sceptre of Might" -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# monsters. -MONSTER:('D',"Chromatic Dragon"),(23,10),asleep -MONSTER:('F',"shrieker"),(26,13) -MONSTER:('F',"shrieker"),(25,8) -MONSTER:('F',"shrieker"),(45,11) -WALLIFY - -# -# The "fill" levels for the quest. -# -# These levels are used to fill out any levels not occupied by specific -# levels as defined above. "filla" is the upper filler, between the -# start and locate levels, and "fillb" the lower between the locate -# and goal levels. -# - -MAZE: "Cav-fila" , ' ' -INIT_MAP: mines, '.' , ' ' , true , true , random , true -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -# -MONSTER: ('h', "bugbear"), random, hostile -MONSTER: ('h', "bugbear"), random, hostile -MONSTER: ('h', "bugbear"), random, hostile -MONSTER: ('h', "bugbear"), random, hostile -MONSTER: ('h', "bugbear"), random, hostile -MONSTER: 'h', random, hostile -MONSTER: ('H', "hill giant"), random, hostile - -MAZE: "Cav-filb" , ' ' -INIT_MAP: mines, '.' , ' ' , true , true , random , true -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -# -MONSTER: ('h', "bugbear"), random, hostile -MONSTER: ('h', "bugbear"), random, hostile -MONSTER: ('h', "bugbear"), random, hostile -MONSTER: ('h', "bugbear"), random, hostile -MONSTER: 'h', random, hostile -MONSTER: 'h', random, hostile -MONSTER: ('H', "hill giant"), random, hostile -MONSTER: ('H', "hill giant"), random, hostile diff --git a/dat/Hea-fila.lua b/dat/Hea-fila.lua new file mode 100644 index 000000000..bee89587f --- /dev/null +++ b/dat/Hea-fila.lua @@ -0,0 +1,42 @@ +-- NetHack 3.6 Healer.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991, 1993 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = "P" }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg=".", bg="P", smoothed=false, joined=true, lit=1, walled=false }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.monster("rabid rat") +des.monster({ class = "r", peaceful=0 }) +des.monster({ class = "r", peaceful=0 }) +des.monster("giant eel") +des.monster("giant eel") +des.monster("electric eel") +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +-- +des.trap() +des.trap() +des.trap() +des.trap() diff --git a/dat/Hea-filb.lua b/dat/Hea-filb.lua new file mode 100644 index 000000000..ac6325866 --- /dev/null +++ b/dat/Hea-filb.lua @@ -0,0 +1,50 @@ +-- NetHack 3.6 Healer.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991, 1993 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = "P" }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg=".", bg="P", smoothed=false, joined=true, lit=1, walled=false }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.monster("rabid rat") +des.monster("rabid rat") +des.monster({ class = "r", peaceful=0 }) +des.monster({ class = "r", peaceful=0 }) +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("electric eel") +des.monster("electric eel") +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +-- +des.trap() +des.trap() +des.trap() +des.trap() diff --git a/dat/Hea-goal.lua b/dat/Hea-goal.lua new file mode 100644 index 000000000..48d6fbae4 --- /dev/null +++ b/dat/Hea-goal.lua @@ -0,0 +1,90 @@ +-- NetHack 3.6 Healer.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991, 1993 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = "P" }); + +des.level_flags("mazelevel"); + +-- +des.level_init({ style="mines", fg=".", bg="P", smoothed=false, joined=true, lit=1, walled=false }) + +des.map([[ +.P....................................PP. +PP.......PPPPPPP....PPPPPPP....PPPP...PP. +...PPPPPPP....PPPPPPP.....PPPPPP..PPP...P +...PP..............................PPP... +..PP..............................PP..... +..PP..............................PPP.... +..PPP..............................PP.... +.PPP..............................PPPP... +...PP............................PPP...PP +..PPPP...PPPPP..PPPP...PPPPP.....PP...PP. +P....PPPPP...PPPP..PPPPP...PPPPPPP...PP.. +PPP..................................PPP. +]]); +-- Dungeon Description +des.region(selection.area(00,00,40,11), "lit") +-- Stairs +des.stair("up", 39,10) +-- Non diggable walls +des.non_diggable(selection.area(00,00,40,11)) +-- Objects +des.object({ id = "quarterstaff", x=20, y=06, buc="blessed", spe=0, name="The Staff of Aesculapius" }) +des.object("lightning", 20, 06) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster({ id = "Cyclops", x=20, y=06, peaceful=0 }) +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster({ class = "r", peaceful=0 }) +des.monster({ class = "r", peaceful=0 }) +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("electric eel") +des.monster("electric eel") +des.monster("shark") +des.monster("shark") +des.monster({ class = ";", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) + diff --git a/dat/Hea-loca.lua b/dat/Hea-loca.lua new file mode 100644 index 000000000..fdc432471 --- /dev/null +++ b/dat/Hea-loca.lua @@ -0,0 +1,97 @@ +-- NetHack 3.6 Healer.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991, 1993 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "hardfloor"); +-- +des.level_init({ style="mines", fg=".", bg="P", smoothed=true ,joined=true, lit=1, walled=false }) + +des.map([[ +PPPPPPPPPPPPP.......PPPPPPPPPPP +PPPPPPPP...............PPPPPPPP +PPPP.....-------------...PPPPPP +PPPPP....|.S.........|....PPPPP +PPP......+.|.........|...PPPPPP +PPP......+.|.........|..PPPPPPP +PPPP.....|.S.........|..PPPPPPP +PPPPP....-------------....PPPPP +PPPPPPPP...............PPPPPPPP +PPPPPPPPPPP........PPPPPPPPPPPP +]]); +-- Dungeon Description +des.region(selection.area(00,00,30,09), "lit") +des.region({ region={12,03, 20,06}, lit=1, type="temple" }) +-- Doors +des.door("closed",09,04) +des.door("closed",09,05) +des.door("locked",11,03) +des.door("locked",11,06) +-- Stairs +des.stair("up", 04,04) +des.stair("down", 20,06) +-- Non diggable walls +des.non_diggable(selection.area(11,02,21,07)) +-- Altar in the temple. +des.altar({ x=13,y=05, align="chaos", type="shrine" }) +-- Objects +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster({ class = "r", peaceful=0 }) +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("electric eel") +des.monster("electric eel") +des.monster("kraken") +des.monster("shark") +des.monster("shark") +des.monster({ class = ";", peaceful=0 }) +des.monster({ class = ";", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) diff --git a/dat/Hea-strt.lua b/dat/Hea-strt.lua new file mode 100644 index 000000000..665c73097 --- /dev/null +++ b/dat/Hea-strt.lua @@ -0,0 +1,107 @@ +-- NetHack 3.6 Healer.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991, 1993 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, Hippocrates +-- and receive your quest assignment. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") + +des.map([[ +PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP +PPPP........PPPP.....PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP.P..PPPPP......PPPPPPPP +PPP..........PPPP...PPPPP.........................PPPP..PPPPP........PPPPPPP +PP............PPPPPPPP..............................PPP...PPPP......PPPPPPPP +P.....PPPPPPPPPPPPPPP................................PPPPPPPPPPPPPPPPPPPPPPP +PPPP....PPPPPPPPPPPP...................................PPPPP.PPPPPPPPPPPPPPP +PPPP........PPPPP.........-----------------------........PP...PPPPPPP.....PP +PPP............PPPPP....--|.|......S..........S.|--.....PPPP.PPPPPPP.......P +PPPP..........PPPPP.....|.S.|......-----------|S|.|......PPPPPP.PPP.......PP +PPPPPP......PPPPPP......|.|.|......|...|......|.|.|.....PPPPPP...PP.......PP +PPPPPPPPPPPPPPPPPPP.....+.|.|......S.\.S......|.|.+......PPPPPP.PPPP.......P +PPP...PPPPP...PPPP......|.|.|......|...|......|.|.|.......PPPPPPPPPPP.....PP +PP.....PPP.....PPP......|.|S|-----------......|.S.|......PPPPPPPPPPPPPPPPPPP +PPP..PPPPP...PPPP.......--|.S..........S......|.|--.....PPPPPPPPP....PPPPPPP +PPPPPPPPPPPPPPPP..........-----------------------..........PPPPP..........PP +PPPPPPPPPPPPPPPPP........................................PPPPPP............P +PPP.............PPPP...................................PPP..PPPP..........PP +PP...............PPPPP................................PPPP...PPPP........PPP +PPP.............PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP....PPPPPP +PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP +]]); + +des.replace_terrain({ region={01,01, 74,18}, fromterrain="P", toterrain=".", chance=10 }) + +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +-- Stairs +des.stair("down", 37,9) +-- Portal arrival point +des.levregion({ region = {04,12,04,12}, type="branch" }) +-- altar for the Temple +des.altar({ x=32,y=09,align="neutral",type="altar" }) +-- Doors +des.door("locked",24,10) +des.door("closed",26,08) +des.door("closed",27,12) +des.door("locked",28,13) +des.door("closed",35,07) +des.door("locked",35,10) +des.door("locked",39,10) +des.door("closed",39,13) +des.door("locked",46,07) +des.door("closed",47,08) +des.door("closed",48,12) +des.door("locked",50,10) +-- Hippocrates +des.monster("Hippocrates", 37, 10) +-- The treasure of Hippocrates +des.object("chest", 37, 10) +-- intern guards for the audience chamber +des.monster("attendant", 29, 08) +des.monster("attendant", 29, 09) +des.monster("attendant", 29, 10) +des.monster("attendant", 29, 11) +des.monster("attendant", 40, 09) +des.monster("attendant", 40, 10) +des.monster("attendant", 40, 11) +des.monster("attendant", 40, 13) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Monsters on siege duty. +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("rabid rat") +des.monster("giant eel") +des.monster("shark") +des.monster(";") +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) +des.monster({ class = "S", peaceful=0 }) diff --git a/dat/Healer.des b/dat/Healer.des deleted file mode 100644 index 1f8e3497d..000000000 --- a/dat/Healer.des +++ /dev/null @@ -1,380 +0,0 @@ -# NetHack 3.6 Healer.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1991, 1993 by M. Stephenson, P. Winner -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, Hippocrates -# and receive your quest assignment. -# -MAZE: "Hea-strt",' ' -FLAGS: noteleport,hardfloor -GEOMETRY:center,center -MAP -PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP -PPPP........PPPP.....PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP.P..PPPPP......PPPPPPPP -PPP..........PPPP...PPPPP.........................PPPP..PPPPP........PPPPPPP -PP............PPPPPPPP..............................PPP...PPPP......PPPPPPPP -P.....PPPPPPPPPPPPPPP................................PPPPPPPPPPPPPPPPPPPPPPP -PPPP....PPPPPPPPPPPP...................................PPPPP.PPPPPPPPPPPPPPP -PPPP........PPPPP.........-----------------------........PP...PPPPPPP.....PP -PPP............PPPPP....--|.|......S..........S.|--.....PPPP.PPPPPPP.......P -PPPP..........PPPPP.....|.S.|......-----------|S|.|......PPPPPP.PPP.......PP -PPPPPP......PPPPPP......|.|.|......|...|......|.|.|.....PPPPPP...PP.......PP -PPPPPPPPPPPPPPPPPPP.....+.|.|......S.\.S......|.|.+......PPPPPP.PPPP.......P -PPP...PPPPP...PPPP......|.|.|......|...|......|.|.|.......PPPPPPPPPPP.....PP -PP.....PPP.....PPP......|.|S|-----------......|.S.|......PPPPPPPPPPPPPPPPPPP -PPP..PPPPP...PPPP.......--|.S..........S......|.|--.....PPPPPPPPP....PPPPPPP -PPPPPPPPPPPPPPPP..........-----------------------..........PPPPP..........PP -PPPPPPPPPPPPPPPPP........................................PPPPPP............P -PPP.............PPPP...................................PPP..PPPP..........PP -PP...............PPPPP................................PPPP...PPPP........PPP -PPP.............PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP....PPPPPP -PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP -ENDMAP - -REPLACE_TERRAIN:(01,01,74,18), 'P', '.', 10% - -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -# Stairs -STAIR:(37,9),down -# Portal arrival point -BRANCH:(04,12,04,12),(0,0,0,0) -# altar for the Temple -ALTAR:(32,09),neutral,altar -# Doors -DOOR:locked,(24,10) -DOOR:closed,(26,08) -DOOR:closed,(27,12) -DOOR:locked,(28,13) -DOOR:closed,(35,07) -DOOR:locked,(35,10) -DOOR:locked,(39,10) -DOOR:closed,(39,13) -DOOR:locked,(46,07) -DOOR:closed,(47,08) -DOOR:closed,(48,12) -DOOR:locked,(50,10) -# Hippocrates -MONSTER:('@',"Hippocrates"),(37,10) -# The treasure of Hippocrates -OBJECT:('(',"chest"),(37,10) -# intern guards for the audience chamber -MONSTER:('@',"attendant"),(29,08) -MONSTER:('@',"attendant"),(29,09) -MONSTER:('@',"attendant"),(29,10) -MONSTER:('@',"attendant"),(29,11) -MONSTER:('@',"attendant"),(40,09) -MONSTER:('@',"attendant"),(40,10) -MONSTER:('@',"attendant"),(40,11) -MONSTER:('@',"attendant"),(40,13) -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Monsters on siege duty. -MONSTER: ('r',"rabid rat"),random -MONSTER: ('r',"rabid rat"),random -MONSTER: ('r',"rabid rat"),random -MONSTER: ('r',"rabid rat"),random -MONSTER: ('r',"rabid rat"),random -MONSTER: ('r',"rabid rat"),random -MONSTER: ('r',"rabid rat"),random -MONSTER: ('r',"rabid rat"),random -MONSTER: ('r',"rabid rat"),random -MONSTER: ('r',"rabid rat"),random -MONSTER: (';',"giant eel"),random -MONSTER: (';',"shark"),random -MONSTER: ';', random -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -# -# The "locate" level for the quest. -# -# Here you have to find the Temple of Coeus to go -# further towards your assigned quest. -# - -MAZE: "Hea-loca",' ' -FLAGS: hardfloor -# -INIT_MAP: mines, '.' , 'P', true , true , lit , false -GEOMETRY:center,center -MAP -PPPPPPPPPPPPP.......PPPPPPPPPPP -PPPPPPPP...............PPPPPPPP -PPPP.....-------------...PPPPPP -PPPPP....|.S.........|....PPPPP -PPP......+.|.........|...PPPPPP -PPP......+.|.........|..PPPPPPP -PPPP.....|.S.........|..PPPPPPP -PPPPP....-------------....PPPPP -PPPPPPPP...............PPPPPPPP -PPPPPPPPPPP........PPPPPPPPPPPP -ENDMAP -# Dungeon Description -REGION:(00,00,30,09),lit,"ordinary" -REGION:(12,03,20,06),lit,"temple" -# Doors -DOOR:closed,(09,04) -DOOR:closed,(09,05) -DOOR:locked,(11,03) -DOOR:locked,(11,06) -# Stairs -STAIR:(04,04),up -STAIR:(20,06),down -# Non diggable walls -NON_DIGGABLE:(11,02,21,07) -# Altar in the temple. -ALTAR:(13,05), chaos, shrine -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('r',"rabid rat"),random -MONSTER:('r',"rabid rat"),random -MONSTER:('r',"rabid rat"),random -MONSTER:('r',"rabid rat"),random -MONSTER:('r',"rabid rat"),random -MONSTER:('r',"rabid rat"),random -MONSTER:('r',"rabid rat"),random -MONSTER:('r',"rabid rat"),random -MONSTER:'r',random,hostile -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"electric eel"),random -MONSTER:(';',"electric eel"),random -MONSTER:(';',"kraken"),random -MONSTER:(';',"shark"),random -MONSTER:(';',"shark"),random -MONSTER:';', random,hostile -MONSTER:';', random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile - -# -# The "goal" level for the quest. -# -# Here you meet Cyclops your nemesis monster. You have to -# defeat Cyclops in combat to gain the artifact you have -# been assigned to retrieve. -# - -MAZE: "Hea-goal", 'P' -# -INIT_MAP: mines, '.' , 'P' , false , true , lit , false -GEOMETRY:center,center -MAP -.P....................................PP. -PP.......PPPPPPP....PPPPPPP....PPPP...PP. -...PPPPPPP....PPPPPPP.....PPPPPP..PPP...P -...PP..............................PPP... -..PP..............................PP..... -..PP..............................PPP.... -..PPP..............................PP.... -.PPP..............................PPPP... -...PP............................PPP...PP -..PPPP...PPPPP..PPPP...PPPPP.....PP...PP. -P....PPPPP...PPPP..PPPPP...PPPPPPP...PP.. -PPP..................................PPP. -ENDMAP -# Dungeon Description -REGION:(00,00,40,11),lit,"ordinary" -# Stairs -STAIR:(39,10),up -# Non diggable walls -NON_DIGGABLE:(00,00,40,11) -# Objects -OBJECT:(')',"quarterstaff"),(20,06),blessed,0,name:"The Staff of Aesculapius" -OBJECT:('/',"lightning"),(20,06) -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('H',"Cyclops"),(20,06),hostile -MONSTER:('r',"rabid rat"),random -MONSTER:('r',"rabid rat"),random -MONSTER:('r',"rabid rat"),random -MONSTER:'r',random,hostile -MONSTER:'r',random,hostile -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"electric eel"),random -MONSTER:(';',"electric eel"),random -MONSTER:(';',"shark"),random -MONSTER:(';',"shark"),random -MONSTER:';',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile - -# -# The "fill" levels for the quest. -# -# These levels are used to fill out any levels not occupied by specific -# levels as defined above. "filla" is the upper filler, between the -# start and locate levels, and "fillb" the lower between the locate -# and goal levels. -# - -MAZE: "Hea-fila" , 'P' -INIT_MAP: mines, '.' , 'P' , false , true , lit , false -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -MONSTER: ('r', "rabid rat"), random -MONSTER: 'r', random,hostile -MONSTER: 'r', random,hostile -MONSTER: (';', "giant eel"), random -MONSTER: (';', "giant eel"), random -MONSTER: (';', "electric eel"), random -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random - -MAZE: "Hea-filb" , 'P' -INIT_MAP: mines, '.' , 'P' , false , true , lit , false -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -MONSTER: ('r', "rabid rat"), random -MONSTER: ('r', "rabid rat"), random -MONSTER: 'r', random,hostile -MONSTER: 'r', random,hostile -MONSTER: (';', "giant eel"), random -MONSTER: (';', "giant eel"), random -MONSTER: (';', "giant eel"), random -MONSTER: (';', "giant eel"), random -MONSTER: (';', "giant eel"), random -MONSTER: (';', "electric eel"), random -MONSTER: (';', "electric eel"), random -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'D',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -MONSTER: 'S',random,hostile -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random diff --git a/dat/Kni-fila.lua b/dat/Kni-fila.lua new file mode 100644 index 000000000..08bc089cf --- /dev/null +++ b/dat/Kni-fila.lua @@ -0,0 +1,35 @@ +-- NetHack 3.6 Knight.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991,92 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = "." }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg=".", bg="P", smoothed=false, joined=true, lit=1, walled=false }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ class = "i", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +-- +des.trap() +des.trap() +des.trap() +des.trap() diff --git a/dat/Kni-filb.lua b/dat/Kni-filb.lua new file mode 100644 index 000000000..98a324b37 --- /dev/null +++ b/dat/Kni-filb.lua @@ -0,0 +1,40 @@ +-- NetHack 3.6 Knight.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991,92 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = "." }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg=".", bg="P", smoothed=false, joined=true, lit=1, walled=false }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ class = "i", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +-- +des.trap() +des.trap() +des.trap() +des.trap() diff --git a/dat/Kni-goal.lua b/dat/Kni-goal.lua new file mode 100644 index 000000000..577355937 --- /dev/null +++ b/dat/Kni-goal.lua @@ -0,0 +1,99 @@ +-- NetHack 3.6 Knight.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991,92 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.map([[ +....PPPP..PPP.. +.PPPPP...PP.. .......... ................................. +..PPPPP...P.. ........... ................................... +..PPP....... ........... ...................................... +...PPP....... ......... ............... ..................... +........... ............ ............ ...................... +............ ............. ....... ..................... +.............................. ......................... +............................... .................................. +............................. .................................... +......... ...................................................... +.....PP... ..................................................... +.....PPP.... .................................................... +......PPP.... .............. .................................... +.......PPP.... ............. ..................................... +........PP... ............ ...................................... +...PPP........ .......... .................................. +..PPPPP........ .......... .............................. +....PPPPP...... ......... .......................... +.......PPPP... +]]); +-- Dungeon Description +des.region(selection.area(00,00,14,19), "lit") +des.region(selection.area(15,00,75,19), "unlit") +-- Stairs +des.stair("up", 03,08) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Objects +des.object({ id = "mirror", x=50,y=06, buc="blessed", spe=0, name="The Magic Mirror of Merlin" }) +des.object({ coord = { 33, 01 } }) +des.object({ coord = { 33, 02 } }) +des.object({ coord = { 33, 03 } }) +des.object({ coord = { 33, 04 } }) +des.object({ coord = { 33, 05 } }) +des.object({ coord = { 34, 01 } }) +des.object({ coord = { 34, 02 } }) +des.object({ coord = { 34, 03 } }) +des.object({ coord = { 34, 04 } }) +des.object({ coord = { 34, 05 } }) +des.object({ coord = { 35, 01 } }) +des.object({ coord = { 35, 02 } }) +des.object({ coord = { 35, 03 } }) +des.object({ coord = { 35, 04 } }) +des.object({ coord = { 35, 05 } }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap("spiked pit",13,07) +des.trap("spiked pit",12,08) +des.trap("spiked pit",12,09) +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster({ id = "Ixoth", x=50, y=06, peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ class = "i", peaceful=0 }) +des.monster({ class = "i", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ class = "j", peaceful=0 }) diff --git a/dat/Kni-loca.lua b/dat/Kni-loca.lua new file mode 100644 index 000000000..20aed41f5 --- /dev/null +++ b/dat/Kni-loca.lua @@ -0,0 +1,137 @@ +-- NetHack 3.6 Knight.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991,92 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "hardfloor") + +des.level_init({ style="mines", fg=".", bg="P", smoothed=false, joined=true, lit=1, walled=false }) + +des.map([[ +xxxxxxxxx......xxxx...........xxxxxxxxxx +xxxxxxx.........xxx.............xxxxxxxx +xxxx..............................xxxxxx +xx.................................xxxxx +....................................xxxx +.......................................x +........................................ +xx...................................xxx +xxxx..............................xxxxxx +xxxxxx..........................xxxxxxxx +xxxxxxxx.........xx..........xxxxxxxxxxx +xxxxxxxxx.......xxxxxx.....xxxxxxxxxxxxx +]]); +-- Dungeon Description +-- The Isle of Glass is a Tor rising out of the swamps surrounding it. +des.region(selection.area(00,00,39,11), "lit") +-- The top area of the Tor is a holy site. +des.region({ region={09,02, 27,09}, lit=1, type="temple" }) +-- Stairs +des.stair("up", 38,0) +des.stair("down", 18,05) +-- The altar atop the Tor and its attendant (creating altar makes the priest). +des.altar({ x=17, y=05, align="neutral", type="shrine" }) +-- Objects +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +-- All of the avenues are guarded by magic except for the East. +-- South +des.trap("magic",08,11) +des.trap("magic",09,11) +des.trap("magic",10,11) +des.trap("magic",11,11) +des.trap("magic",12,11) +des.trap("magic",13,11) +des.trap("magic",14,11) +des.trap("magic",15,11) +des.trap("magic",16,11) +des.trap("magic",20,11) +des.trap("magic",21,11) +des.trap("magic",22,11) +des.trap("magic",23,11) +des.trap("magic",24,11) +des.trap("magic",25,11) +des.trap("magic",26,11) +des.trap("magic",27,11) +des.trap("magic",28,11) +-- West +des.trap("magic",00,03) +des.trap("magic",00,04) +des.trap("magic",00,05) +des.trap("magic",00,06) +-- North +des.trap("magic",06,00) +des.trap("magic",07,00) +des.trap("magic",08,00) +des.trap("magic",09,00) +des.trap("magic",10,00) +des.trap("magic",11,00) +des.trap("magic",12,00) +des.trap("magic",13,00) +des.trap("magic",14,00) +des.trap("magic",19,00) +des.trap("magic",20,00) +des.trap("magic",21,00) +des.trap("magic",22,00) +des.trap("magic",23,00) +des.trap("magic",24,00) +des.trap("magic",25,00) +des.trap("magic",26,00) +des.trap("magic",27,00) +des.trap("magic",28,00) +des.trap("magic",29,00) +des.trap("magic",30,00) +des.trap("magic",31,00) +des.trap("magic",32,00) +-- Even so, there are magic "sinkholes" around. +des.trap("anti magic") +des.trap("anti magic") +des.trap("anti magic") +des.trap("anti magic") +des.trap("anti magic") +des.trap("anti magic") +des.trap("anti magic") +-- Random monsters. +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ id = "quasit", peaceful=0 }) +des.monster({ class = "i", peaceful=0 }) +des.monster({ class = "j", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ id = "ochre jelly", peaceful=0 }) +des.monster({ class = "j", peaceful=0 }) diff --git a/dat/Kni-strt.lua b/dat/Kni-strt.lua new file mode 100644 index 000000000..8feba3489 --- /dev/null +++ b/dat/Kni-strt.lua @@ -0,0 +1,102 @@ +-- NetHack 3.6 Knight.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991,92 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, King Arthur +-- and receive your quest assignment. +-- +des.level_init({ style = "solidfill", fg = "." }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") +-- This is a kludge to init the level as a lit field. +des.level_init({ style="mines", fg=".", bg=".", smoothed=false, joined=false, lit=1, walled=false }) + +des.map([[ +.................................................. +.-----......................................-----. +.|...|......................................|...|. +.--|+-------------------++-------------------+|--. +...|...................+..+...................|... +...|.|-----------------|++|-----------------|.|... +...|.|.................|..|.........|.......|.|... +...|.|...\.............+..+.........|.......|.|... +...|.|.................+..+.........+.......|.|... +...|.|.................|..|.........|.......|.|... +...|.|--------------------------------------|.|... +...|..........................................|... +.--|+----------------------------------------+|--. +.|...|......................................|...|. +.-----......................................-----. +.................................................. +]]); +-- Dungeon Description +des.region(selection.area(00,00,49,15), "lit") +des.region(selection.area(04,04,45,11), "unlit") +des.region({ region={06,06,22,09}, lit=1, type="throne", prefilled=1 }) +des.region(selection.area(27,06,43,09), "lit") +-- Portal arrival point +des.levregion({ region = {20,14,20,14}, type="branch" }) +-- Stairs +des.stair("down", 40,7) +-- Doors +-- Outside Doors +des.door("locked",24,03) +des.door("locked",25,03) +-- Inside Doors +des.door("closed",23,04) +des.door("closed",26,04) +des.door("locked",24,05) +des.door("locked",25,05) +des.door("closed",23,07) +des.door("closed",26,07) +des.door("closed",23,08) +des.door("closed",26,08) +des.door("closed",36,08) +-- Watchroom Doors +des.door("closed",04,03) +des.door("closed",45,03) +des.door("closed",04,12) +des.door("closed",45,12) +-- King Arthur +des.monster("King Arthur", 09, 07) +-- The treasure of King Arthur +des.object("chest", 09, 07) +-- knight guards for the watchrooms +des.monster({ id = "knight", x=04, y=02, peaceful = 1 }) +des.monster({ id = "knight", x=04, y=13, peaceful = 1 }) +des.monster({ id = "knight", x=45, y=02, peaceful = 1 }) +des.monster({ id = "knight", x=45, y=13, peaceful = 1 }) +-- page guards for the audience chamber +des.monster("page", 16, 06) +des.monster("page", 18, 06) +des.monster("page", 20, 06) +des.monster("page", 16, 09) +des.monster("page", 18, 09) +des.monster("page", 20, 09) +-- Non diggable walls +des.non_diggable(selection.area(00,00,49,15)) +-- Random traps +des.trap("sleep gas",24,04) +des.trap("sleep gas",25,04) +des.trap() +des.trap() +des.trap() +des.trap() +-- Monsters on siege duty. +des.monster({ id = "quasit", x=14, y=00, peaceful=0 }) +des.monster({ id = "quasit", x=16, y=00, peaceful=0 }) +des.monster({ id = "quasit", x=18, y=00, peaceful=0 }) +des.monster({ id = "quasit", x=20, y=00, peaceful=0 }) +des.monster({ id = "quasit", x=22, y=00, peaceful=0 }) +des.monster({ id = "quasit", x=24, y=00, peaceful=0 }) +des.monster({ id = "quasit", x=26, y=00, peaceful=0 }) +des.monster({ id = "quasit", x=28, y=00, peaceful=0 }) +des.monster({ id = "quasit", x=30, y=00, peaceful=0 }) +des.monster({ id = "quasit", x=32, y=00, peaceful=0 }) +des.monster({ id = "quasit", x=34, y=00, peaceful=0 }) +des.monster({ id = "quasit", x=36, y=00, peaceful=0 }) + diff --git a/dat/Knight.des b/dat/Knight.des deleted file mode 100644 index d5db2e01c..000000000 --- a/dat/Knight.des +++ /dev/null @@ -1,408 +0,0 @@ -# NetHack 3.6 Knight.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1991,92 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, King Arthur -# and receive your quest assignment. -# -MAZE: "Kni-strt",'.' -FLAGS: noteleport,hardfloor -# This is a kludge to init the level as a lit field. -INIT_MAP: mines, '.' , '.' , false , false , lit , false -GEOMETRY:center,center -MAP -.................................................. -.-----......................................-----. -.|...|......................................|...|. -.--|+-------------------++-------------------+|--. -...|...................+..+...................|... -...|.|-----------------|++|-----------------|.|... -...|.|.................|..|.........|.......|.|... -...|.|...\.............+..+.........|.......|.|... -...|.|.................+..+.........+.......|.|... -...|.|.................|..|.........|.......|.|... -...|.|--------------------------------------|.|... -...|..........................................|... -.--|+----------------------------------------+|--. -.|...|......................................|...|. -.-----......................................-----. -.................................................. -ENDMAP -# Dungeon Description -REGION:(00,00,49,15),lit,"ordinary" -REGION:(04,04,45,11),unlit,"ordinary" -REGION:(06,06,22,09),lit,"throne" , unfilled -REGION:(27,06,43,09),lit,"ordinary" -# Portal arrival point -BRANCH:(20,14,20,14),(0,0,0,0) -# Stairs -STAIR:(40,7),down -# Doors -# Outside Doors -DOOR:locked,(24,03) -DOOR:locked,(25,03) -# Inside Doors -DOOR:closed,(23,04) -DOOR:closed,(26,04) -DOOR:locked,(24,05) -DOOR:locked,(25,05) -DOOR:closed,(23,07) -DOOR:closed,(26,07) -DOOR:closed,(23,08) -DOOR:closed,(26,08) -DOOR:closed,(36,08) -# Watchroom Doors -DOOR:closed,(04,03) -DOOR:closed,(45,03) -DOOR:closed,(04,12) -DOOR:closed,(45,12) -# King Arthur -MONSTER:('@',"King Arthur"),(09,07) -# The treasure of King Arthur -OBJECT:('(',"chest"),(09,07) -# knight guards for the watchrooms -MONSTER:('@',"knight"),(04,02),peaceful -MONSTER:('@',"knight"),(04,13),peaceful -MONSTER:('@',"knight"),(45,02),peaceful -MONSTER:('@',"knight"),(45,13),peaceful -# page guards for the audience chamber -MONSTER:('@',"page"),(16,06) -MONSTER:('@',"page"),(18,06) -MONSTER:('@',"page"),(20,06) -MONSTER:('@',"page"),(16,09) -MONSTER:('@',"page"),(18,09) -MONSTER:('@',"page"),(20,09) -# Non diggable walls -NON_DIGGABLE:(00,00,49,15) -# Random traps -TRAP:"sleep gas",(24,04) -TRAP:"sleep gas",(25,04) -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Monsters on siege duty. -MONSTER: ('i',"quasit"),(14,00),hostile -MONSTER: ('i',"quasit"),(16,00),hostile -MONSTER: ('i',"quasit"),(18,00),hostile -MONSTER: ('i',"quasit"),(20,00),hostile -MONSTER: ('i',"quasit"),(22,00),hostile -MONSTER: ('i',"quasit"),(24,00),hostile -MONSTER: ('i',"quasit"),(26,00),hostile -MONSTER: ('i',"quasit"),(28,00),hostile -MONSTER: ('i',"quasit"),(30,00),hostile -MONSTER: ('i',"quasit"),(32,00),hostile -MONSTER: ('i',"quasit"),(34,00),hostile -MONSTER: ('i',"quasit"),(36,00),hostile - -# -# The "locate" level for the quest. -# -# Here you have to find your way to the Isle of Glass to go -# further towards your assigned quest. -# - -MAZE: "Kni-loca",' ' -FLAGS: hardfloor -INIT_MAP: mines, '.' , 'P' , false , true , lit , false -GEOMETRY:center,center -MAP -xxxxxxxxx......xxxx...........xxxxxxxxxx -xxxxxxx.........xxx.............xxxxxxxx -xxxx..............................xxxxxx -xx.................................xxxxx -....................................xxxx -.......................................x -........................................ -xx...................................xxx -xxxx..............................xxxxxx -xxxxxx..........................xxxxxxxx -xxxxxxxx.........xx..........xxxxxxxxxxx -xxxxxxxxx.......xxxxxx.....xxxxxxxxxxxxx -ENDMAP -# Dungeon Description -# The Isle of Glass is a Tor rising out of the swamps surrounding it. -REGION:(00,00,39,11),lit,"ordinary" -# The top area of the Tor is a holy site. -REGION:(09,02,27,09),lit,"temple" -# Stairs -STAIR:(38,0),up -STAIR:(18,05),down -# The altar atop the Tor and its attendant (creating altar makes the priest). -ALTAR:(17,05),neutral,shrine -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -# All of the avenues are guarded by magic except for the East. -# South -TRAP:"magic",(08,11) -TRAP:"magic",(09,11) -TRAP:"magic",(10,11) -TRAP:"magic",(11,11) -TRAP:"magic",(12,11) -TRAP:"magic",(13,11) -TRAP:"magic",(14,11) -TRAP:"magic",(15,11) -TRAP:"magic",(16,11) -TRAP:"magic",(20,11) -TRAP:"magic",(21,11) -TRAP:"magic",(22,11) -TRAP:"magic",(23,11) -TRAP:"magic",(24,11) -TRAP:"magic",(25,11) -TRAP:"magic",(26,11) -TRAP:"magic",(27,11) -TRAP:"magic",(28,11) -# West -TRAP:"magic",(00,03) -TRAP:"magic",(00,04) -TRAP:"magic",(00,05) -TRAP:"magic",(00,06) -# North -TRAP:"magic",(06,00) -TRAP:"magic",(07,00) -TRAP:"magic",(08,00) -TRAP:"magic",(09,00) -TRAP:"magic",(10,00) -TRAP:"magic",(11,00) -TRAP:"magic",(12,00) -TRAP:"magic",(13,00) -TRAP:"magic",(14,00) -TRAP:"magic",(19,00) -TRAP:"magic",(20,00) -TRAP:"magic",(21,00) -TRAP:"magic",(22,00) -TRAP:"magic",(23,00) -TRAP:"magic",(24,00) -TRAP:"magic",(25,00) -TRAP:"magic",(26,00) -TRAP:"magic",(27,00) -TRAP:"magic",(28,00) -TRAP:"magic",(29,00) -TRAP:"magic",(30,00) -TRAP:"magic",(31,00) -TRAP:"magic",(32,00) -# Even so, there are magic "sinkholes" around. -TRAP:"anti magic",random -TRAP:"anti magic",random -TRAP:"anti magic",random -TRAP:"anti magic",random -TRAP:"anti magic",random -TRAP:"anti magic",random -TRAP:"anti magic",random -# Random monsters. -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:'i',random,hostile -MONSTER:'j',random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:'j',random,hostile - -# -# The "goal" level for the quest. -# -# Here you meet Ixoth your nemesis monster. You have to -# defeat Ixoth in combat to gain the artifact you have -# been assigned to retrieve. -# - -MAZE: "Kni-goal", ' ' -GEOMETRY:center,center -MAP -....PPPP..PPP.. -.PPPPP...PP.. .......... ................................. -..PPPPP...P.. ........... ................................... -..PPP....... ........... ...................................... -...PPP....... ......... ............... ..................... -........... ............ ............ ...................... -............ ............. ....... ..................... -.............................. ......................... -............................... .................................. -............................. .................................... -......... ...................................................... -.....PP... ..................................................... -.....PPP.... .................................................... -......PPP.... .............. .................................... -.......PPP.... ............. ..................................... -........PP... ............ ...................................... -...PPP........ .......... .................................. -..PPPPP........ .......... .............................. -....PPPPP...... ......... .......................... -.......PPPP... -ENDMAP -# Dungeon Description -REGION:(00,00,14,19),lit,"ordinary" -REGION:(15,00,75,19),unlit,"ordinary" -# Stairs -STAIR:(03,08),up -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Objects -OBJECT:('(',"mirror"),(50,06),blessed,0,name:"The Magic Mirror of Merlin" -OBJECT:random,(33,01) -OBJECT:random,(33,02) -OBJECT:random,(33,03) -OBJECT:random,(33,04) -OBJECT:random,(33,05) -OBJECT:random,(34,01) -OBJECT:random,(34,02) -OBJECT:random,(34,03) -OBJECT:random,(34,04) -OBJECT:random,(34,05) -OBJECT:random,(35,01) -OBJECT:random,(35,02) -OBJECT:random,(35,03) -OBJECT:random,(35,04) -OBJECT:random,(35,05) -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:"spiked pit",(13,07) -TRAP:"spiked pit",(12,08) -TRAP:"spiked pit",(12,09) -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('D',"Ixoth"),(50,06),hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:('i',"quasit"),random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:('j',"ochre jelly"),random,hostile -MONSTER:'j',random,hostile - -# -# The "fill" levels for the quest. -# -# These levels are used to fill out any levels not occupied by specific -# levels as defined above. "filla" is the upper filler, between the -# start and locate levels, and "fillb" the lower between the locate -# and goal levels. -# - -MAZE: "Kni-fila" , '.' -INIT_MAP: mines, '.' , 'P' , false , true , lit , false -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -MONSTER: ('i', "quasit"), random, hostile -MONSTER: ('i', "quasit"), random, hostile -MONSTER: ('i', "quasit"), random, hostile -MONSTER: ('i', "quasit"), random, hostile -MONSTER: 'i', random, hostile -MONSTER: ('j', "ochre jelly"), random, hostile -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random - -MAZE: "Kni-filb" , '.' -INIT_MAP: mines, '.' , 'P' , false , true , lit , false -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -MONSTER: ('i', "quasit"), random, hostile -MONSTER: ('i', "quasit"), random, hostile -MONSTER: ('i', "quasit"), random, hostile -MONSTER: ('i', "quasit"), random, hostile -MONSTER: 'i', random, hostile -MONSTER: ('j', "ochre jelly"), random, hostile -MONSTER: ('j', "ochre jelly"), random, hostile -MONSTER: ('j', "ochre jelly"), random, hostile -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random diff --git a/dat/Mon-fila.lua b/dat/Mon-fila.lua new file mode 100644 index 000000000..d0e36ad2c --- /dev/null +++ b/dat/Mon-fila.lua @@ -0,0 +1,61 @@ +-- NetHack 3.6 Monk.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- + +-- +des.room({ type = "ordinary", + contents = function() + des.stair("up") + des.object() + des.monster({ class = "E", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.monster({ class = "E", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.object() + des.monster("xorn") + des.monster("earth elemental") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.stair("down") + des.object() + des.trap() + des.monster({ class = "E", peaceful=0 }) + des.monster("earth elemental") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.trap() + des.monster({ class = "X", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.monster("earth elemental") + end +}) + +des.random_corridors() diff --git a/dat/Mon-filb.lua b/dat/Mon-filb.lua new file mode 100644 index 000000000..a6fbdd5b1 --- /dev/null +++ b/dat/Mon-filb.lua @@ -0,0 +1,60 @@ +-- NetHack 3.6 Monk.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- + +-- +des.room({ type = "ordinary", + contents = function() + des.stair("up") + des.object() + des.monster({ class = "X", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.monster({ class = "X", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.object() + des.monster({ class = "E", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.stair("down") + des.object() + des.trap() + des.monster({ class = "E", peaceful=0 }) + des.monster("earth elemental") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.trap() + des.monster({ class = "X", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.monster("earth elemental") + end +}) + +des.random_corridors() diff --git a/dat/Mon-goal.lua b/dat/Mon-goal.lua new file mode 100644 index 000000000..d339e323d --- /dev/null +++ b/dat/Mon-goal.lua @@ -0,0 +1,75 @@ +-- NetHack 3.6 Monk.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg="L", bg=".", smoothed=false, joined=false, lit=0, walled=false }) + +des.map([[ +xxxxxx..xxxxxx...xxxxxxxxx +xxxx......xx......xxxxxxxx +xx.xx.............xxxxxxxx +x....................xxxxx +......................xxxx +......................xxxx +xx........................ +xxx......................x +xxx................xxxxxxx +xxxx.....x.xx.......xxxxxx +xxxxx...xxxxxx....xxxxxxxx +]]); +-- Dungeon Description +local place = { {14,04},{13,07} } +local placeidx = math.random(1, #place); + +des.region(selection.area(00,00,25,10), "unlit") +-- Stairs +des.stair("up", 20,05) +-- Objects +des.object({ id = "lenses", coord = place[placeidx], buc="blessed", spe=0, name="The Eyes of the Overworld" }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap() +des.trap() +-- Random monsters. +des.monster("Master Kaen",place[placeidx]) +des.altar({ coord = place[placeidx], align="noalign", type="altar" }) +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") diff --git a/dat/Mon-loca.lua b/dat/Mon-loca.lua new file mode 100644 index 000000000..2436a33da --- /dev/null +++ b/dat/Mon-loca.lua @@ -0,0 +1,90 @@ +-- NetHack 3.6 Monk.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +-- 1 2 3 4 5 6 7 +--123456789012345678901234567890123456789012345678901234567890123456789012345 +des.map([[ + ---------------------------------------------------- -------- + ---.................................................- --.....| + ---...--------........------........................--- ---...| + ---.....- --.......- ----..................---- --.-- + ---.....---- --------- --..................-- --..| + ---...----- ----.----.....----.....--- --..|| +----..---- -----..--- |...--- |.......--- --...| +|...--- ----....--- |.--- |.........-- --...|| +|...- ----.....--- ---- |..........---....| +|...---- ----......--- | |...|.......-....|| +|......----- ---.........- | -----...|............| +|..........----- ----...........--- -------......||...........|| +|..............-----................--- |............|||..........| +|-S----...............................--- |...........|| |.........|| +|.....|..............------.............-----..........|| ||........| +|.....|.............-- ---.........................|| |.......|| +|.....|.............- ---.....................--| ||......| +|---S--------.......---- --.................---- |.....|| +|...........|..........--------..............----- ||....| +|...........|............................----- |....| +------------------------------------------ ------ +]]); +-- Random Monsters + +-- Dungeon Description +des.region(selection.area(00,00,75,20), "lit") +-- Stairs +des.stair("up") +des.stair("down") +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,20)) +-- Objects +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("earth elemental") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") +des.monster("xorn") diff --git a/dat/Mon-strt.lua b/dat/Mon-strt.lua new file mode 100644 index 000000000..1add47ab6 --- /dev/null +++ b/dat/Mon-strt.lua @@ -0,0 +1,104 @@ +-- NetHack 3.6 Monk.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, the Grand Master +-- and receive your quest assignment. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") + +des.map([[ +............................................................................ +............................................................................ +............................................................................ +....................------------------------------------.................... +....................|................|.....|.....|.....|.................... +....................|..------------..|--+-----+-----+--|.................... +....................|..|..........|..|.................|.................... +....................|..|..........|..|+---+---+-----+--|.................... +..................---..|..........|......|...|...|.....|.................... +..................+....|..........+......|...|...|.....|.................... +..................+....|..........+......|...|...|.....|.................... +..................---..|..........|......|...|...|.....|.................... +....................|..|..........|..|+-----+---+---+--|.................... +....................|..|..........|..|.................|.................... +....................|..------------..|--+-----+-----+--|.................... +....................|................|.....|.....|.....|.................... +....................------------------------------------.................... +............................................................................ +............................................................................ +............................................................................ +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +des.region({ region={24,06, 33,13}, lit=1, type="temple" }) + +des.replace_terrain({ region={00,00, 10,19}, fromterrain=".", toterrain="T", chance=10 }) +des.replace_terrain({ region={65,00, 75,19}, fromterrain=".", toterrain="T", chance=10 }) + +-- Portal arrival point +des.terrain({05,04}, ".") +des.levregion({ region = {05,04,05,04}, type="branch" }) +-- Stairs +des.stair("down", 52,09) +-- Doors +des.door("locked",18,09) +des.door("locked",18,10) +des.door("closed",34,09) +des.door("closed",34,10) +des.door("closed",40,05) +des.door("closed",46,05) +des.door("closed",52,05) +des.door("locked",38,07) +des.door("closed",42,07) +des.door("closed",46,07) +des.door("closed",52,07) +des.door("locked",38,12) +des.door("closed",44,12) +des.door("closed",48,12) +des.door("closed",52,12) +des.door("closed",40,14) +des.door("closed",46,14) +des.door("closed",52,14) +-- Unattended Altar - unaligned due to conflict - player must align it. +des.altar({ x=28,y=09, align="noalign", type="altar" }) +-- The Grand Master +des.monster("Grand Master", 28, 10) +-- No treasure chest! +-- guards for the audience chamber +des.monster("abbot", 32, 07) +des.monster("abbot", 32, 08) +des.monster("abbot", 32, 11) +des.monster("abbot", 32, 12) +des.monster("abbot", 33, 07) +des.monster("abbot", 33, 08) +des.monster("abbot", 33, 11) +des.monster("abbot", 33, 12) +-- Non diggable walls +des.non_diggable(selection.area(18,03,55,16)) +-- Random traps +des.trap("dart",20,09) +des.trap("dart",20,10) +des.trap() +des.trap() +des.trap() +des.trap() +-- Monsters on siege duty. +des.monster("earth elemental", 37, 01) +des.monster("earth elemental", 37, 18) +des.monster("earth elemental", 03, 03) +des.monster("earth elemental", 65, 04) +des.monster("earth elemental", 12, 11) +des.monster("earth elemental", 60, 12) +des.monster("earth elemental", 14, 08) +des.monster("earth elemental", 55, 00) +des.monster("xorn", 18, 18) +des.monster("xorn", 59, 10) +des.monster("xorn", 13, 09) +des.monster("xorn", 01, 17) diff --git a/dat/Monk.des b/dat/Monk.des deleted file mode 100644 index 5b1ba7caa..000000000 --- a/dat/Monk.des +++ /dev/null @@ -1,378 +0,0 @@ -# NetHack 3.6 Monk.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1991-2 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, the Grand Master -# and receive your quest assignment. -# -MAZE: "Mon-strt",' ' -FLAGS: noteleport,hardfloor -GEOMETRY:center,center -MAP -............................................................................ -............................................................................ -............................................................................ -....................------------------------------------.................... -....................|................|.....|.....|.....|.................... -....................|..------------..|--+-----+-----+--|.................... -....................|..|..........|..|.................|.................... -....................|..|..........|..|+---+---+-----+--|.................... -..................---..|..........|......|...|...|.....|.................... -..................+....|..........+......|...|...|.....|.................... -..................+....|..........+......|...|...|.....|.................... -..................---..|..........|......|...|...|.....|.................... -....................|..|..........|..|+-----+---+---+--|.................... -....................|..|..........|..|.................|.................... -....................|..------------..|--+-----+-----+--|.................... -....................|................|.....|.....|.....|.................... -....................------------------------------------.................... -............................................................................ -............................................................................ -............................................................................ -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(24,06,33,13),lit,"temple" - -REPLACE_TERRAIN:(0,0,10,19),'.','T',10% -REPLACE_TERRAIN:(65,0,75,19),'.','T',10% - -# Portal arrival point -TERRAIN:(05,04),'.' -BRANCH:(05,04,05,04),(0,0,0,0) -# Stairs -STAIR:(52,09),down -# Doors -DOOR:locked,(18,09) -DOOR:locked,(18,10) -DOOR:closed,(34,09) -DOOR:closed,(34,10) -DOOR:closed,(40,05) -DOOR:closed,(46,05) -DOOR:closed,(52,05) -DOOR:locked,(38,07) -DOOR:closed,(42,07) -DOOR:closed,(46,07) -DOOR:closed,(52,07) -DOOR:locked,(38,12) -DOOR:closed,(44,12) -DOOR:closed,(48,12) -DOOR:closed,(52,12) -DOOR:closed,(40,14) -DOOR:closed,(46,14) -DOOR:closed,(52,14) -# Unattended Altar - unaligned due to conflict - player must align it. -ALTAR:(28,09),noalign,altar -# The Grand Master -MONSTER:('@',"Grand Master"),(28,10) -# No treasure chest! -# guards for the audience chamber -MONSTER:('@',"abbot"),(32,07) -MONSTER:('@',"abbot"),(32,08) -MONSTER:('@',"abbot"),(32,11) -MONSTER:('@',"abbot"),(32,12) -MONSTER:('@',"abbot"),(33,07) -MONSTER:('@',"abbot"),(33,08) -MONSTER:('@',"abbot"),(33,11) -MONSTER:('@',"abbot"),(33,12) -# Non diggable walls -NON_DIGGABLE:(18,03,55,16) -# Random traps -TRAP:"dart",(20,09) -TRAP:"dart",(20,10) -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Monsters on siege duty. -MONSTER: ('E',"earth elemental"),(37,01) -MONSTER: ('E',"earth elemental"),(37,18) -MONSTER: ('E',"earth elemental"),(03,03) -MONSTER: ('E',"earth elemental"),(65,04) -MONSTER: ('E',"earth elemental"),(12,11) -MONSTER: ('E',"earth elemental"),(60,12) -MONSTER: ('E',"earth elemental"),(14,08) -MONSTER: ('E',"earth elemental"),(55,00) -MONSTER: ('X',"xorn"),(18,18) -MONSTER: ('X',"xorn"),(59,10) -MONSTER: ('X',"xorn"),(13,09) -MONSTER: ('X',"xorn"),(01,17) - -# -# The "locate" level for the quest. -# -# Here you have to locate the Monastery of the Earth-Lord to -# go further towards your assigned quest. -# - -MAZE: "Mon-loca",' ' -GEOMETRY:center,center -# 1 2 3 4 5 6 7 -#123456789012345678901234567890123456789012345678901234567890123456789012345 -MAP - ---------------------------------------------------- -------- - ---.................................................- --.....| - ---...--------........------........................--- ---...| - ---.....- --.......- ----..................---- --.-- - ---.....---- --------- --..................-- --..| - ---...----- ----.----.....----.....--- --..|| -----..---- -----..--- |...--- |.......--- --...| -|...--- ----....--- |.--- |.........-- --...|| -|...- ----.....--- ---- |..........---....| -|...---- ----......--- | |...|.......-....|| -|......----- ---.........- | -----...|............| -|..........----- ----...........--- -------......||...........|| -|..............-----................--- |............|||..........| -|-S----...............................--- |...........|| |.........|| -|.....|..............------.............-----..........|| ||........| -|.....|.............-- ---.........................|| |.......|| -|.....|.............- ---.....................--| ||......| -|---S--------.......---- --.................---- |.....|| -|...........|..........--------..............----- ||....| -|...........|............................----- |....| ------------------------------------------- ------ -ENDMAP -# Random Monsters -$monster = monster: { 'E', 'X' } -SHUFFLE: $monster - -# Dungeon Description -REGION:(00,00,75,20),lit,"ordinary" -# Stairs -STAIR:random,up -STAIR:random,down -# Non diggable walls -NON_DIGGABLE:(00,00,75,20) -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random - -# -# The "goal" level for the quest. -# -# Here you meet Master Kaen, your nemesis monster. You have to -# defeat Master Kaen in combat to gain the artifact you have -# been assigned to retrieve. -# - -MAZE: "Mon-goal", ' ' -INIT_MAP: mines, 'L' , '.' , false , false , unlit , false -GEOMETRY:center,center -MAP -xxxxxx..xxxxxx...xxxxxxxxx -xxxx......xx......xxxxxxxx -xx.xx.............xxxxxxxx -x....................xxxxx -......................xxxx -......................xxxx -xx........................ -xxx......................x -xxx................xxxxxxx -xxxx.....x.xx.......xxxxxx -xxxxx...xxxxxx....xxxxxxxx -ENDMAP -# Dungeon Description -$place = { (14,04),(13,07) } -SHUFFLE: $place - -REGION:(00,00,25,10),unlit,"ordinary" -# Stairs -STAIR:(20,05),up -# Objects -OBJECT:('(',"lenses"),$place[0],blessed,0,name:"The Eyes of the Overworld" -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('@',"Master Kaen"),$place[0] -ALTAR:$place[0],noalign,altar -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('E',"earth elemental"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random -MONSTER: ('X',"xorn"),random - -# -# The "fill" levels for the quest. -# -# These levels are used to fill out any levels not occupied by specific -# levels as defined above. "fila" is the upper filler, between the -# start and locate levels, and "filb" the lower between the locate -# and goal levels. -# - -LEVEL: "Mon-fila" -# Random Monsters -$monster = monster: { 'E', 'X' } -SHUFFLE: $monster - -# -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up - OBJECT: random,random - MONSTER: 'E', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random,random - MONSTER: 'E', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - OBJECT: random,random - MONSTER: ('X', "xorn"), random - MONSTER: ('E', "earth elemental"), random -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - OBJECT: random, random - TRAP: random, random - MONSTER: 'E', random, hostile - MONSTER: ('E', "earth elemental"), random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random, random - TRAP: random, random - MONSTER: 'X', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - MONSTER: ('E', "earth elemental"), random -} - -RANDOM_CORRIDORS - -LEVEL: "Mon-filb" -# Random Monsters -$monster = monster: { 'E', 'X' } -SHUFFLE: $monster - -# -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up - OBJECT: random,random - MONSTER: 'X', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random,random - MONSTER: 'X', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - OBJECT: random,random - MONSTER: 'E', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - OBJECT: random, random - TRAP: random, random - MONSTER: 'E', random, hostile - MONSTER: ('E', "earth elemental"), random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random, random - TRAP: random, random - MONSTER: 'X', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - MONSTER: ('E', "earth elemental"), random -} - -RANDOM_CORRIDORS - diff --git a/dat/Pri-fila.lua b/dat/Pri-fila.lua new file mode 100644 index 000000000..6df964f60 --- /dev/null +++ b/dat/Pri-fila.lua @@ -0,0 +1,55 @@ +-- NetHack 3.6 Priest.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- +des.room({ type = "ordinary", + contents = function() + des.stair("up") + des.object() + des.monster("human zombie") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.object() + des.monster("human zombie") + end +}) + +des.room({ type = "morgue", + contents = function() + des.stair("down") + des.object() + des.trap() + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.trap() + des.monster("wraith") + end +}) + +des.room({ type = "morgue", + contents = function() + des.object() + des.trap() + end +}) + +des.random_corridors() diff --git a/dat/Pri-filb.lua b/dat/Pri-filb.lua new file mode 100644 index 000000000..060afd246 --- /dev/null +++ b/dat/Pri-filb.lua @@ -0,0 +1,62 @@ +-- NetHack 3.6 Priest.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- + +des.room({ type = "ordinary", + contents = function() + des.stair("up") + des.object() + des.monster("human zombie") + des.monster("wraith") + end +}) + +des.room({ type = "morgue", + contents = function() + des.object() + des.object() + des.object() + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.object() + des.monster("human zombie") + des.monster("wraith") + end +}) + +des.room({ type = "morgue", + contents = function() + des.stair("down") + des.object() + des.object() + des.trap() + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.trap() + des.monster("human zombie") + des.monster("wraith") + end +}) + + +des.room({ type = "morgue", + contents = function() + des.object() + des.trap() + end +}) + +des.random_corridors() diff --git a/dat/Pri-goal.lua b/dat/Pri-goal.lua new file mode 100644 index 000000000..5de237d20 --- /dev/null +++ b/dat/Pri-goal.lua @@ -0,0 +1,83 @@ +-- NetHack 3.6 Priest.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg="L", bg=".", smoothed=false, joined=false, lit=0, walled=false }) + +des.map([[ +xxxxxx..xxxxxx...xxxxxxxxx +xxxx......xx......xxxxxxxx +xx.xx.............xxxxxxxx +x....................xxxxx +......................xxxx +......................xxxx +xx........................ +xxx......................x +xxx................xxxxxxx +xxxx.....x.xx.......xxxxxx +xxxxx...xxxxxx....xxxxxxxx +]]); +-- Dungeon Description +local place = { {14,04}, {13,07} } +local placeidx = math.random(1, #place); + +des.region(selection.area(00,00,25,10), "unlit") +-- Stairs +des.stair("up", 20,05) +-- Objects +des.object({ id = "helm of brilliance", coord = place[placeidx], buc="blessed", spe=0, name="The Mitre of Holiness" }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap() +des.trap() +-- Random monsters. +des.monster("Nalzok",place[placeidx]) +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("Z") +des.monster("Z") +des.monster("wraith") +des.monster("wraith") +des.monster("wraith") +des.monster("wraith") +des.monster("wraith") +des.monster("wraith") +des.monster("wraith") +des.monster("wraith") +des.monster("W") diff --git a/dat/Pri-loca.lua b/dat/Pri-loca.lua new file mode 100644 index 000000000..16f5bdb85 --- /dev/null +++ b/dat/Pri-loca.lua @@ -0,0 +1,73 @@ +-- NetHack 3.6 Priest.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "hardfloor") +-- This is a kludge to init the level as a lit field. +des.level_init({ style="mines", fg=".", bg=".", smoothed=false, joined=false, lit=1, walled=false }) + +des.map([[ +........................................ +........................................ +..........----------+----------......... +..........|........|.|........|......... +..........|........|.|........|......... +..........|----.----.----.----|......... +..........+...................+......... +..........+...................+......... +..........|----.----.----.----|......... +..........|........|.|........|......... +..........|........|.|........|......... +..........----------+----------......... +........................................ +........................................ +]]); +-- Dungeon Description +des.region({ region={00,00, 09,13}, lit=0, type="morgue", prefilled=0 }) +des.region({ region={09,00, 30,01}, lit=0, type="morgue", prefilled=0 }) +des.region({ region={09,12, 30,13}, lit=0, type="morgue", prefilled=0 }) +des.region({ region={31,00, 39,13}, lit=0, type="morgue", prefilled=0 }) +des.region({ region={11,03, 29,10}, lit=1, type="temple", prefilled=0, irregular=1 }) +-- The altar inside the temple +des.altar({ x=20,y=07, align="noalign", type="shrine" }) +des.monster({ id = "aligned priest", x=20, y=07, align="noalign", peaceful = 0 }) +-- Doors +des.door("locked",10,06) +des.door("locked",10,07) +des.door("locked",20,02) +des.door("locked",20,11) +des.door("locked",30,06) +des.door("locked",30,07) +-- Stairs +-- Note: The up stairs are *intentionally* off of the map. +des.stair("up", 43,05) +des.stair("down", 20,06) +-- Non diggable walls +des.non_diggable(selection.area(10,02,30,13)) +-- Objects (inside the antechambers). +des.object({ coord = { 14, 03 } }) +des.object({ coord = { 15, 03 } }) +des.object({ coord = { 16, 03 } }) +des.object({ coord = { 14, 10 } }) +des.object({ coord = { 15, 10 } }) +des.object({ coord = { 16, 10 } }) +des.object({ coord = { 17, 10 } }) +des.object({ coord = { 24, 03 } }) +des.object({ coord = { 25, 03 } }) +des.object({ coord = { 26, 03 } }) +des.object({ coord = { 27, 03 } }) +des.object({ coord = { 24, 10 } }) +des.object({ coord = { 25, 10 } }) +des.object({ coord = { 26, 10 } }) +des.object({ coord = { 27, 10 } }) +-- Random traps +des.trap({ coord = { 15,04 } }) +des.trap({ coord = { 25,04 } }) +des.trap({ coord = { 15,09 } }) +des.trap({ coord = { 25,09 } }) +des.trap() +des.trap() +-- No random monsters - the morgue generation will put them in. diff --git a/dat/Pri-strt.lua b/dat/Pri-strt.lua new file mode 100644 index 000000000..691a4b8ad --- /dev/null +++ b/dat/Pri-strt.lua @@ -0,0 +1,105 @@ +-- NetHack 3.6 Priest.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, High Priest +-- and receive your quest assignment. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") + +des.map([[ +............................................................................ +............................................................................ +............................................................................ +....................------------------------------------.................... +....................|................|.....|.....|.....|.................... +....................|..------------..|--+-----+-----+--|.................... +....................|..|..........|..|.................|.................... +....................|..|..........|..|+---+---+-----+--|.................... +..................---..|..........|......|...|...|.....|.................... +..................+....|..........+......|...|...|.....|.................... +..................+....|..........+......|...|...|.....|.................... +..................---..|..........|......|...|...|.....|.................... +....................|..|..........|..|+-----+---+---+--|.................... +....................|..|..........|..|.................|.................... +....................|..------------..|--+-----+-----+--|.................... +....................|................|.....|.....|.....|.................... +....................------------------------------------.................... +............................................................................ +............................................................................ +............................................................................ +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +des.region({ region={24,06, 33,13}, lit=1, type="temple" }) + +des.replace_terrain({ region={00,00, 10,19}, fromterrain=".", toterrain="T", chance=10 }) +des.replace_terrain({ region={65,00, 75,19}, fromterrain=".", toterrain="T", chance=10 }) +des.terrain({05,04}, ".") + +-- Portal arrival point +des.levregion({ region = {05,04,05,04}, type="branch" }) +-- Stairs +des.stair("down", 52,09) +-- Doors +des.door("locked",18,09) +des.door("locked",18,10) +des.door("closed",34,09) +des.door("closed",34,10) +des.door("closed",40,05) +des.door("closed",46,05) +des.door("closed",52,05) +des.door("locked",38,07) +des.door("closed",42,07) +des.door("closed",46,07) +des.door("closed",52,07) +des.door("locked",38,12) +des.door("closed",44,12) +des.door("closed",48,12) +des.door("closed",52,12) +des.door("closed",40,14) +des.door("closed",46,14) +des.door("closed",52,14) +-- Unattended Altar - unaligned due to conflict - player must align it. +des.altar({ x=28, y=09, align="noalign", type="altar" }) +-- High Priest +des.monster("Arch Priest", 28, 10) +-- The treasure of High Priest +des.object("chest", 27, 10) +-- knight guards for the audience chamber +des.monster("acolyte", 32, 07) +des.monster("acolyte", 32, 08) +des.monster("acolyte", 32, 11) +des.monster("acolyte", 32, 12) +des.monster("acolyte", 33, 07) +des.monster("acolyte", 33, 08) +des.monster("acolyte", 33, 11) +des.monster("acolyte", 33, 12) +-- Non diggable walls +des.non_diggable(selection.area(18,03,55,16)) +-- Random traps +des.trap("dart",20,09) +des.trap("dart",20,10) +des.trap() +des.trap() +des.trap() +des.trap() +-- Monsters on siege duty. +des.monster("human zombie", 37, 01) +des.monster("human zombie", 37, 18) +des.monster("human zombie", 03, 03) +des.monster("human zombie", 65, 04) +des.monster("human zombie", 12, 11) +des.monster("human zombie", 60, 12) +des.monster("human zombie", 14, 08) +des.monster("human zombie", 55, 00) +des.monster("human zombie", 18, 18) +des.monster("human zombie", 59, 10) +des.monster("human zombie", 13, 09) +des.monster("human zombie", 01, 17) diff --git a/dat/Priest.des b/dat/Priest.des deleted file mode 100644 index d6cfdcef5..000000000 --- a/dat/Priest.des +++ /dev/null @@ -1,356 +0,0 @@ -# NetHack 3.6 Priest.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1991-2 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, High Priest -# and receive your quest assignment. -# -MAZE: "Pri-strt",' ' -FLAGS: noteleport,hardfloor -GEOMETRY:center,center -MAP -............................................................................ -............................................................................ -............................................................................ -....................------------------------------------.................... -....................|................|.....|.....|.....|.................... -....................|..------------..|--+-----+-----+--|.................... -....................|..|..........|..|.................|.................... -....................|..|..........|..|+---+---+-----+--|.................... -..................---..|..........|......|...|...|.....|.................... -..................+....|..........+......|...|...|.....|.................... -..................+....|..........+......|...|...|.....|.................... -..................---..|..........|......|...|...|.....|.................... -....................|..|..........|..|+-----+---+---+--|.................... -....................|..|..........|..|.................|.................... -....................|..------------..|--+-----+-----+--|.................... -....................|................|.....|.....|.....|.................... -....................------------------------------------.................... -............................................................................ -............................................................................ -............................................................................ -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(24,06,33,13),lit,"temple" - -REPLACE_TERRAIN:(0,0,10,19),'.','T',10% -REPLACE_TERRAIN:(65,0,75,19),'.','T',10% -TERRAIN:(05,04),'.' - -# Portal arrival point -BRANCH:(05,04,05,04),(0,0,0,0) -# Stairs -STAIR:(52,09),down -# Doors -DOOR:locked,(18,09) -DOOR:locked,(18,10) -DOOR:closed,(34,09) -DOOR:closed,(34,10) -DOOR:closed,(40,05) -DOOR:closed,(46,05) -DOOR:closed,(52,05) -DOOR:locked,(38,07) -DOOR:closed,(42,07) -DOOR:closed,(46,07) -DOOR:closed,(52,07) -DOOR:locked,(38,12) -DOOR:closed,(44,12) -DOOR:closed,(48,12) -DOOR:closed,(52,12) -DOOR:closed,(40,14) -DOOR:closed,(46,14) -DOOR:closed,(52,14) -# Unattended Altar - unaligned due to conflict - player must align it. -ALTAR:(28,09),noalign,altar -# High Priest -MONSTER:('@',"Arch Priest"),(28,10) -# The treasure of High Priest -OBJECT:('(',"chest"),(27,10) -# knight guards for the audience chamber -MONSTER:('@',"acolyte"),(32,07) -MONSTER:('@',"acolyte"),(32,08) -MONSTER:('@',"acolyte"),(32,11) -MONSTER:('@',"acolyte"),(32,12) -MONSTER:('@',"acolyte"),(33,07) -MONSTER:('@',"acolyte"),(33,08) -MONSTER:('@',"acolyte"),(33,11) -MONSTER:('@',"acolyte"),(33,12) -# Non diggable walls -NON_DIGGABLE:(18,03,55,16) -# Random traps -TRAP:"dart",(20,09) -TRAP:"dart",(20,10) -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Monsters on siege duty. -MONSTER: ('Z',"human zombie"),(37,01) -MONSTER: ('Z',"human zombie"),(37,18) -MONSTER: ('Z',"human zombie"),(03,03) -MONSTER: ('Z',"human zombie"),(65,04) -MONSTER: ('Z',"human zombie"),(12,11) -MONSTER: ('Z',"human zombie"),(60,12) -MONSTER: ('Z',"human zombie"),(14,08) -MONSTER: ('Z',"human zombie"),(55,00) -MONSTER: ('Z',"human zombie"),(18,18) -MONSTER: ('Z',"human zombie"),(59,10) -MONSTER: ('Z',"human zombie"),(13,09) -MONSTER: ('Z',"human zombie"),(01,17) - -# -# The "locate" level for the quest. -# -# Here you have to locate the Temple of Nalzok to go -# further towards your assigned quest. -# - -MAZE: "Pri-loca",' ' -FLAGS: hardfloor -# This is a kludge to init the level as a lit field. -INIT_MAP: mines, '.' , '.' , false , false , lit , false -GEOMETRY:center,center -MAP -........................................ -........................................ -..........----------+----------......... -..........|........|.|........|......... -..........|........|.|........|......... -..........|----.----.----.----|......... -..........+...................+......... -..........+...................+......... -..........|----.----.----.----|......... -..........|........|.|........|......... -..........|........|.|........|......... -..........----------+----------......... -........................................ -........................................ -ENDMAP -# Dungeon Description -REGION:(00,00,09,13),unlit,"morgue" -REGION:(09,00,30,01),unlit,"morgue" -REGION:(09,12,30,13),unlit,"morgue" -REGION:(31,00,39,13),unlit,"morgue" -REGION:(11,03,29,10),lit,"temple",filled,irregular -# The altar inside the temple -ALTAR:(20,07),noalign,shrine -MONSTER:('@',"aligned priest"),(20,07),noalign,hostile -# Doors -DOOR:locked,(10,06) -DOOR:locked,(10,07) -DOOR:locked,(20,02) -DOOR:locked,(20,11) -DOOR:locked,(30,06) -DOOR:locked,(30,07) -# Stairs -# Note: The up stairs are *intentionally* off of the map. -STAIR:(43,05),up -STAIR:(20,06),down -# Non diggable walls -NON_DIGGABLE:(10,02,30,13) -# Objects (inside the antechambers). -OBJECT:random,(14,03) -OBJECT:random,(15,03) -OBJECT:random,(16,03) -OBJECT:random,(14,10) -OBJECT:random,(15,10) -OBJECT:random,(16,10) -OBJECT:random,(17,10) -OBJECT:random,(24,03) -OBJECT:random,(25,03) -OBJECT:random,(26,03) -OBJECT:random,(27,03) -OBJECT:random,(24,10) -OBJECT:random,(25,10) -OBJECT:random,(26,10) -OBJECT:random,(27,10) -# Random traps -TRAP:random,(15,04) -TRAP:random,(25,04) -TRAP:random,(15,09) -TRAP:random,(25,09) -TRAP:random,random -TRAP:random,random -# No random monsters - the morgue generation will put them in. - -# -# The "goal" level for the quest. -# -# Here you meet Nalzok your nemesis monster. You have to -# defeat Nalzok in combat to gain the artifact you have -# been assigned to retrieve. -# - -MAZE: "Pri-goal", ' ' -INIT_MAP: mines, 'L' , '.' , false , false , unlit , false -GEOMETRY:center,center -MAP -xxxxxx..xxxxxx...xxxxxxxxx -xxxx......xx......xxxxxxxx -xx.xx.............xxxxxxxx -x....................xxxxx -......................xxxx -......................xxxx -xx........................ -xxx......................x -xxx................xxxxxxx -xxxx.....x.xx.......xxxxxx -xxxxx...xxxxxx....xxxxxxxx -ENDMAP -# Dungeon Description -$place = { (14,04),(13,07) } -SHUFFLE: $place - -REGION:(00,00,25,10),unlit,"ordinary" -# Stairs -STAIR:(20,05),up -# Objects -OBJECT:('[',"helm of brilliance"),$place[0],blessed,0,name:"The Mitre of Holiness" -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('&',"Nalzok"),$place[0] -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:'Z',random -MONSTER:'Z',random -MONSTER:('W',"wraith"),random -MONSTER:('W',"wraith"),random -MONSTER:('W',"wraith"),random -MONSTER:('W',"wraith"),random -MONSTER:('W',"wraith"),random -MONSTER:('W',"wraith"),random -MONSTER:('W',"wraith"),random -MONSTER:('W',"wraith"),random -MONSTER:'W',random - -# -# The "fill" levels for the quest. -# -# These levels are used to fill out any levels not occupied by specific -# levels as defined above. "filla" is the upper filler, between the -# start and locate levels, and "fillb" the lower between the locate -# and goal levels. -# - -LEVEL: "Pri-fila" -# -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up - OBJECT: random,random - MONSTER: ('Z', "human zombie"), random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random,random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - OBJECT: random,random - MONSTER: ('Z', "human zombie"), random -} - -ROOM: "morgue" , random, random, random, random { - STAIR: random, down - OBJECT: random, random - TRAP: random, random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random, random - TRAP: random, random - MONSTER: ('W', "wraith"), random -} - -ROOM: "morgue" , random, random, random, random { - OBJECT: random, random - TRAP: random, random -} - -RANDOM_CORRIDORS - -LEVEL: "Pri-filb" -# -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up - OBJECT: random,random - MONSTER: ('Z', "human zombie"), random - MONSTER: ('W', "wraith"), random -} - -ROOM: "morgue" , random, random, random, random { - OBJECT: random, random - OBJECT: random, random - OBJECT: random,random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - OBJECT: random,random - MONSTER: ('Z', "human zombie"), random - MONSTER: ('W', "wraith"), random -} - -ROOM: "morgue" , random, random, random, random { - STAIR: random, down - OBJECT: random, random - OBJECT: random, random - TRAP: random, random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random, random - TRAP: random, random - MONSTER: ('Z', "human zombie"), random - MONSTER: ('W', "wraith"), random -} - -ROOM: "morgue" , random, random, random, random { - OBJECT: random, random - TRAP: random, random -} - -RANDOM_CORRIDORS diff --git a/dat/Ran-fila.lua b/dat/Ran-fila.lua new file mode 100644 index 000000000..321a9bc55 --- /dev/null +++ b/dat/Ran-fila.lua @@ -0,0 +1,35 @@ +-- NetHack 3.6 Ranger.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg=".", bg="T", smoothed=true, joined=true, walled=true }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.trap() +des.trap() +des.trap() +des.trap() +-- +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "forest centaur", peaceful=0 }) +des.monster({ id = "forest centaur", peaceful=0 }) +des.monster({ id = "forest centaur", peaceful=0 }) +des.monster({ class = "C", peaceful=0 }) +des.monster({ id = "scorpion", peaceful=0 }) diff --git a/dat/Ran-filb.lua b/dat/Ran-filb.lua new file mode 100644 index 000000000..e7109541f --- /dev/null +++ b/dat/Ran-filb.lua @@ -0,0 +1,39 @@ +-- NetHack 3.6 Ranger.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg=".", bg=" ", smoothed=true, joined=true, walled=true }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.trap() +des.trap() +des.trap() +des.trap() +-- +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ class = "C", peaceful=0 }) +des.monster({ id = "scorpion", peaceful=0 }) +des.monster({ id = "scorpion", peaceful=0 }) diff --git a/dat/Ran-goal.lua b/dat/Ran-goal.lua new file mode 100644 index 000000000..b32c5add4 --- /dev/null +++ b/dat/Ran-goal.lua @@ -0,0 +1,106 @@ +-- NetHack 3.6 Ranger.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.map([[ + + ... ... + .......................................................................... + ... + ... + . ............ ....... . ....... . + . ............................. . ........ .........S.. . + . ............ . ...... . . . ....... .. . + . ......... . .... + . ... . .. . + . S . ......... .S. .S............... . + . ... . ... . ......... . . + . ........ .....S.+.......+....\....+........+. . + . ... ... S ......... .. ..... . + . .. ......... .. ...... . + . ....... ... + .... .... .......... . + . .............. .. . ...... .. ............. . + . ............. . .......... ...... . + ... + ... + .......................................................................... + ... ... + +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +-- Stairs +des.stair("up", 19,10) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Objects +des.object({ id = "bow", x=37, y=10, buc="blessed", spe=0, name="The Longbow of Diana" }) +des.object("chest", 37, 10) +des.object({ coord = { 36, 09 } }) +des.object({ coord = { 36, 10 } }) +des.object({ coord = { 36, 11 } }) +des.object({ coord = { 37, 09 } }) +des.object({ coord = { 37, 11 } }) +des.object({ coord = { 38, 09 } }) +des.object({ coord = { 38, 10 } }) +des.object({ coord = { 38, 11 } }) +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- doors +des.door("locked",12,08) +des.door("closed",22,10) +des.door("locked",24,10) +des.door("closed",25,11) +des.door("closed",32,10) +des.door("closed",37,03) +des.door("closed",37,07) +des.door("closed",37,13) +des.door("closed",37,16) +des.door("closed",42,10) +des.door("locked",46,08) +des.door("closed",51,10) +des.door("locked",53,08) +des.door("closed",65,05) +-- Random monsters. +des.monster({ id = "Scorpius", x=37, y=10, peaceful=0 }) +des.monster({ id = "forest centaur", x=36, y=09, peaceful=0 }) +des.monster({ id = "forest centaur", x=36, y=10, peaceful=0 }) +des.monster({ id = "forest centaur", x=36, y=11, peaceful=0 }) +des.monster({ id = "forest centaur", x=37, y=09, peaceful=0 }) +des.monster({ id = "forest centaur", x=37, y=11, peaceful=0 }) +des.monster({ id = "forest centaur", x=38, y=09, peaceful=0 }) +des.monster({ id = "mountain centaur", x=38, y=10, peaceful=0 }) +des.monster({ id = "mountain centaur", x=38, y=11, peaceful=0 }) +des.monster({ id = "mountain centaur", x=02, y=02, peaceful=0 }) +des.monster({ id = "mountain centaur", x=71, y=02, peaceful=0 }) +des.monster({ id = "mountain centaur", x=02, y=16, peaceful=0 }) +des.monster({ id = "mountain centaur", x=71, y=16, peaceful=0 }) +des.monster({ id = "forest centaur", peaceful=0 }) +des.monster({ id = "forest centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ class = "C", peaceful=0 }) +des.monster({ class = "C", peaceful=0 }) +des.monster({ id = "scorpion", x=03, y=02, peaceful=0 }) +des.monster({ id = "scorpion", x=72, y=02, peaceful=0 }) +des.monster({ id = "scorpion", x=03, y=17, peaceful=0 }) +des.monster({ id = "scorpion", x=72, y=17, peaceful=0 }) +des.monster({ id = "scorpion", x=41, y=10, peaceful=0 }) +des.monster({ id = "scorpion", x=33, y=09, peaceful=0 }) +des.monster({ id = "scorpion", peaceful=0 }) +des.monster({ id = "scorpion", peaceful=0 }) +des.monster({ class = "s", peaceful=0 }) + +des.wallify() diff --git a/dat/Ran-loca.lua b/dat/Ran-loca.lua new file mode 100644 index 000000000..c9af3f1f3 --- /dev/null +++ b/dat/Ran-loca.lua @@ -0,0 +1,79 @@ +-- NetHack 3.6 Ranger.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "hardfloor") +--1234567890123456789012345678901234567890123456789012345678901234567890 +des.map([[ + ....... ......... ....... + ................... ................... + .... ....... ....... .... +... ..... . ..... . ..... ... +. .......... ..... ........... ..... .......... . +. .. ..... .......... ..... .......... ..... .. . +. . . ..... . ..... . . . +. . ..... ............. ..... . . +. . ................ ....... ................ . . +. . ..... ....... ..... . . +. . . ...... ...... . . . +. . ........... ......... ........... . . +. . .......... .......... . . +. .. ..... . ..... . ..... .. . +. .......... ..... ........... ..... .......... . +. ..... .......... ..... .......... ..... . +. . ..... . ..... . . +... ....... ....... ....... ... + .............. ............. .............. + ....... ....... ....... ....... ....... +]]); +-- Dungeon Description +des.region(selection.area(00,00,54,19), "lit") +-- Stairs +des.stair("up", 25,05) +des.stair("down", 27,18) +-- Non diggable walls +des.non_diggable(selection.area(00,00,54,19)) +-- Objects +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap("spiked pit") +des.trap("spiked pit") +des.trap("teleport") +des.trap("teleport") +des.trap("arrow") +des.trap("arrow") +-- Random monsters. +des.monster({ id = "wumpus", x=27, y=18, peaceful=0, asleep=1 }) +des.monster({ id = "giant bat", peaceful=0 }) +des.monster({ id = "giant bat", peaceful=0 }) +des.monster({ id = "giant bat", peaceful=0 }) +des.monster({ id = "giant bat", peaceful=0 }) +des.monster({ id = "forest centaur", peaceful=0 }) +des.monster({ id = "forest centaur", peaceful=0 }) +des.monster({ id = "forest centaur", peaceful=0 }) +des.monster({ id = "forest centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "mountain centaur", peaceful=0 }) +des.monster({ id = "scorpion", peaceful=0 }) +des.monster({ id = "scorpion", peaceful=0 }) +des.monster({ id = "scorpion", peaceful=0 }) +des.monster({ id = "scorpion", peaceful=0 }) +des.monster({ class = "s", peaceful=0 }) +des.monster({ class = "s", peaceful=0 }) + diff --git a/dat/Ran-strt.lua b/dat/Ran-strt.lua new file mode 100644 index 000000000..66ea5028a --- /dev/null +++ b/dat/Ran-strt.lua @@ -0,0 +1,97 @@ +-- NetHack 3.6 Ranger.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, Orion, +-- and receive your quest assignment. +-- +des.level_init({ style = "solidfill", fg = "." }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "arboreal") + +des.level_init({ style="mines", fg=".", bg=".", smoothed=true, joined=true, lit=1, walled=false }) +des.replace_terrain({ region={00,00, 76,19}, fromterrain=".", toterrain="T", chance=5 }) +--1234567890123456789012345678901234567890123456789012345678901234567890 +des.map({ halign = "left", valign = "center", map = [[ + xx + ................................... x + .. .. + .. ...............F............... .. + . .. .F. .. . + . .. .............F............. .. . + . . .. .. . . + . . .. ....................... .. ... + . . . .. .. . + ... . .. .|..................... ...... + FFF . . ..S.................. + ... . .. .|................. .... ... + . . . .. .. . . . + . . .. ....................... .. . . + . . .. .. . . + . .. .............F............. .. . + . .. .F. .. . + .. ...............F............... .. + .. .. + ................................... x + xx +]] }); +-- Dungeon Description +des.region(selection.area(00,00,40,20), "lit") +-- Stairs +des.stair("down", 10,10) +-- Portal arrival point; just about anywhere on the right hand side of the map +des.levregion({ region = {51,2,77,18}, region_islev = 1, type="branch" }) +-- Orion +des.monster("Orion", 20, 10) +-- The treasure of Orion +des.object("chest", 20, 10) +-- Guards for the audience chamber +des.monster("hunter", 19, 09) +des.monster("hunter", 20, 09) +des.monster("hunter", 21, 09) +des.monster("hunter", 19, 10) +des.monster("hunter", 21, 10) +des.monster("hunter", 19, 11) +des.monster("hunter", 20, 11) +des.monster("hunter", 21, 11) +-- Non diggable walls +des.non_diggable(selection.area(00,00,40,20)) +-- Traps +des.trap("arrow",30,09) +des.trap("arrow",30,10) +des.trap("pit",40,09) +des.trap("spiked pit") +des.trap("bear") +des.trap("bear") +-- Monsters on siege duty. +des.monster({ id = "minotaur", x=33, y=09, peaceful=0, asleep=1 }) +des.monster({ id = "forest centaur", x=19, y=03, peaceful=0 }) +des.monster({ id = "forest centaur", x=19, y=04, peaceful=0 }) +des.monster({ id = "forest centaur", x=19, y=05, peaceful=0 }) +des.monster({ id = "forest centaur", x=21, y=03, peaceful=0 }) +des.monster({ id = "forest centaur", x=21, y=04, peaceful=0 }) +des.monster({ id = "forest centaur", x=21, y=05, peaceful=0 }) +des.monster({ id = "forest centaur", x=01, y=09, peaceful=0 }) +des.monster({ id = "forest centaur", x=02, y=09, peaceful=0 }) +des.monster({ id = "forest centaur", x=03, y=09, peaceful=0 }) +des.monster({ id = "forest centaur", x=01, y=11, peaceful=0 }) +des.monster({ id = "forest centaur", x=02, y=11, peaceful=0 }) +des.monster({ id = "forest centaur", x=03, y=11, peaceful=0 }) +des.monster({ id = "forest centaur", x=19, y=15, peaceful=0 }) +des.monster({ id = "forest centaur", x=19, y=16, peaceful=0 }) +des.monster({ id = "forest centaur", x=19, y=17, peaceful=0 }) +des.monster({ id = "forest centaur", x=21, y=15, peaceful=0 }) +des.monster({ id = "forest centaur", x=21, y=16, peaceful=0 }) +des.monster({ id = "forest centaur", x=21, y=17, peaceful=0 }) +des.monster({ id = "plains centaur", peaceful=0 }) +des.monster({ id = "plains centaur", peaceful=0 }) +des.monster({ id = "plains centaur", peaceful=0 }) +des.monster({ id = "plains centaur", peaceful=0 }) +des.monster({ id = "plains centaur", peaceful=0 }) +des.monster({ id = "plains centaur", peaceful=0 }) +des.monster({ id = "scorpion", peaceful=0 }) +des.monster({ id = "scorpion", peaceful=0 }) diff --git a/dat/Ranger.des b/dat/Ranger.des deleted file mode 100644 index aa081cfe8..000000000 --- a/dat/Ranger.des +++ /dev/null @@ -1,356 +0,0 @@ -# NetHack 3.6 Ranger.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1991 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, Orion, -# and receive your quest assignment. -# -MAZE: "Ran-strt",'.' -FLAGS: noteleport,hardfloor,arboreal -INIT_MAP:mines,'.','.',true,true,lit,false -REPLACE_TERRAIN:(0,0,76,19),'.', 'T', 5% -GEOMETRY:left,center -#1234567890123456789012345678901234567890123456789012345678901234567890 -MAP - xx - ................................... x - .. .. - .. ...............F............... .. - . .. .F. .. . - . .. .............F............. .. . - . . .. .. . . - . . .. ....................... .. ... - . . . .. .. . - ... . .. .|..................... ...... - FFF . . ..S.................. - ... . .. .|................. .... ... - . . . .. .. . . . - . . .. ....................... .. . . - . . .. .. . . - . .. .............F............. .. . - . .. .F. .. . - .. ...............F............... .. - .. .. - ................................... x - xx -ENDMAP -# Dungeon Description -REGION:(00,00,40,20),lit,"ordinary" -# Stairs -STAIR:(10,10),down -# Portal arrival point; just about anywhere on the right hand side of the map -BRANCH:levregion(51,2,77,18),(0,0,40,20) -# Orion -MONSTER:('@',"Orion"),(20,10) -# The treasure of Orion -OBJECT:('(',"chest"),(20,10) -# Guards for the audience chamber -MONSTER:('@',"hunter"),(19,09) -MONSTER:('@',"hunter"),(20,09) -MONSTER:('@',"hunter"),(21,09) -MONSTER:('@',"hunter"),(19,10) -MONSTER:('@',"hunter"),(21,10) -MONSTER:('@',"hunter"),(19,11) -MONSTER:('@',"hunter"),(20,11) -MONSTER:('@',"hunter"),(21,11) -# Non diggable walls -NON_DIGGABLE:(00,00,40,20) -# Traps -TRAP:"arrow",(30,09) -TRAP:"arrow",(30,10) -TRAP:"pit",(40,09) -TRAP:"spiked pit",random -TRAP:"bear",random -TRAP:"bear",random -# Monsters on siege duty. -MONSTER: ('H',"minotaur"),(33,09),hostile,asleep -MONSTER: ('C',"forest centaur"),(19,03),hostile -MONSTER: ('C',"forest centaur"),(19,04),hostile -MONSTER: ('C',"forest centaur"),(19,05),hostile -MONSTER: ('C',"forest centaur"),(21,03),hostile -MONSTER: ('C',"forest centaur"),(21,04),hostile -MONSTER: ('C',"forest centaur"),(21,05),hostile -MONSTER: ('C',"forest centaur"),(01,09),hostile -MONSTER: ('C',"forest centaur"),(02,09),hostile -MONSTER: ('C',"forest centaur"),(03,09),hostile -MONSTER: ('C',"forest centaur"),(01,11),hostile -MONSTER: ('C',"forest centaur"),(02,11),hostile -MONSTER: ('C',"forest centaur"),(03,11),hostile -MONSTER: ('C',"forest centaur"),(19,15),hostile -MONSTER: ('C',"forest centaur"),(19,16),hostile -MONSTER: ('C',"forest centaur"),(19,17),hostile -MONSTER: ('C',"forest centaur"),(21,15),hostile -MONSTER: ('C',"forest centaur"),(21,16),hostile -MONSTER: ('C',"forest centaur"),(21,17),hostile -MONSTER: ('C',"plains centaur"),random,hostile -MONSTER: ('C',"plains centaur"),random,hostile -MONSTER: ('C',"plains centaur"),random,hostile -MONSTER: ('C',"plains centaur"),random,hostile -MONSTER: ('C',"plains centaur"),random,hostile -MONSTER: ('C',"plains centaur"),random,hostile -MONSTER: ('s',"scorpion"),random,hostile -MONSTER: ('s',"scorpion"),random,hostile - - -# -# The "locate" level for the quest. -# -# Here you have to infiltrate the Cave of the Wumpus to go -# further towards your assigned quest. -# - -MAZE: "Ran-loca",' ' -FLAGS: hardfloor -GEOMETRY:center,center -#1234567890123456789012345678901234567890123456789012345678901234567890 -MAP - ....... ......... ....... - ................... ................... - .... ....... ....... .... -... ..... . ..... . ..... ... -. .......... ..... ........... ..... .......... . -. .. ..... .......... ..... .......... ..... .. . -. . . ..... . ..... . . . -. . ..... ............. ..... . . -. . ................ ....... ................ . . -. . ..... ....... ..... . . -. . . ...... ...... . . . -. . ........... ......... ........... . . -. . .......... .......... . . -. .. ..... . ..... . ..... .. . -. .......... ..... ........... ..... .......... . -. ..... .......... ..... .......... ..... . -. . ..... . ..... . . -... ....... ....... ....... ... - .............. ............. .............. - ....... ....... ....... ....... ....... -ENDMAP -# Dungeon Description -REGION:(00,00,54,19),lit,"ordinary" -# Stairs -STAIR:(25,05),up -STAIR:(27,18),down -# Non diggable walls -NON_DIGGABLE:(00,00,54,19) -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:"spiked pit",random -TRAP:"spiked pit",random -TRAP:"teleport",random -TRAP:"teleport",random -TRAP:"arrow",random -TRAP:"arrow",random -# Random monsters. -MONSTER:('q',"wumpus"),(27,18),hostile,asleep -MONSTER:('B',"giant bat"),random,hostile -MONSTER:('B',"giant bat"),random,hostile -MONSTER:('B',"giant bat"),random,hostile -MONSTER:('B',"giant bat"),random,hostile -MONSTER:('C',"forest centaur"),random,hostile -MONSTER:('C',"forest centaur"),random,hostile -MONSTER:('C',"forest centaur"),random,hostile -MONSTER:('C',"forest centaur"),random,hostile -MONSTER:('C',"mountain centaur"),random,hostile -MONSTER:('C',"mountain centaur"),random,hostile -MONSTER:('C',"mountain centaur"),random,hostile -MONSTER:('C',"mountain centaur"),random,hostile -MONSTER:('C',"mountain centaur"),random,hostile -MONSTER:('C',"mountain centaur"),random,hostile -MONSTER:('C',"mountain centaur"),random,hostile -MONSTER:('C',"mountain centaur"),random,hostile -MONSTER:('s',"scorpion"),random,hostile -MONSTER:('s',"scorpion"),random,hostile -MONSTER:('s',"scorpion"),random,hostile -MONSTER:('s',"scorpion"),random,hostile -MONSTER:'s',random,hostile -MONSTER:'s',random,hostile - - -# -# The "goal" level for the quest. -# -# Here you meet Scorpius, your nemesis monster. You have to -# defeat Scorpius in combat to gain the artifact you have -# been assigned to retrieve. -# - -MAZE: "Ran-goal", ' ' -GEOMETRY:center,center -MAP - - ... ... - .......................................................................... - ... + ... - . ............ ....... . ....... . - . ............................. . ........ .........S.. . - . ............ . ...... . . . ....... .. . - . ......... . .... + . ... . .. . - . S . ......... .S. .S............... . - . ... . ... . ......... . . - . ........ .....S.+.......+....\....+........+. . - . ... ... S ......... .. ..... . - . .. ......... .. ...... . - . ....... ... + .... .... .......... . - . .............. .. . ...... .. ............. . - . ............. . .......... ...... . - ... + ... - .......................................................................... - ... ... - -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -# Stairs -STAIR:(19,10),up -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Objects -OBJECT:(')',"bow"),(37,10),blessed,0,name:"The Longbow of Diana" -OBJECT:('(',"chest"),(37,10) -OBJECT:random,(36,09) -OBJECT:random,(36,10) -OBJECT:random,(36,11) -OBJECT:random,(37,09) -OBJECT:random,(37,11) -OBJECT:random,(38,09) -OBJECT:random,(38,10) -OBJECT:random,(38,11) -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# doors -DOOR:locked,(12,08) -DOOR:closed,(22,10) -DOOR:locked,(24,10) -DOOR:closed,(25,11) -DOOR:closed,(32,10) -DOOR:closed,(37,03) -DOOR:closed,(37,07) -DOOR:closed,(37,13) -DOOR:closed,(37,16) -DOOR:closed,(42,10) -DOOR:locked,(46,08) -DOOR:closed,(51,10) -DOOR:locked,(53,08) -DOOR:closed,(65,05) -# Random monsters. -MONSTER:('s',"Scorpius"),(37,10),hostile -MONSTER:('C',"forest centaur"),(36,09),hostile -MONSTER:('C',"forest centaur"),(36,10),hostile -MONSTER:('C',"forest centaur"),(36,11),hostile -MONSTER:('C',"forest centaur"),(37,09),hostile -MONSTER:('C',"forest centaur"),(37,11),hostile -MONSTER:('C',"forest centaur"),(38,09),hostile -MONSTER:('C',"mountain centaur"),(38,10),hostile -MONSTER:('C',"mountain centaur"),(38,11),hostile -MONSTER:('C',"mountain centaur"),(02,02),hostile -MONSTER:('C',"mountain centaur"),(71,02),hostile -MONSTER:('C',"mountain centaur"),(02,16),hostile -MONSTER:('C',"mountain centaur"),(71,16),hostile -MONSTER:('C',"forest centaur"),random,hostile -MONSTER:('C',"forest centaur"),random,hostile -MONSTER:('C',"mountain centaur"),random,hostile -MONSTER:('C',"mountain centaur"),random,hostile -MONSTER:'C',random,hostile -MONSTER:'C',random,hostile -MONSTER:('s',"scorpion"),(03,02),hostile -MONSTER:('s',"scorpion"),(72,02),hostile -MONSTER:('s',"scorpion"),(03,17),hostile -MONSTER:('s',"scorpion"),(72,17),hostile -MONSTER:('s',"scorpion"),(41,10),hostile -MONSTER:('s',"scorpion"),(33,09),hostile -MONSTER:('s',"scorpion"),random,hostile -MONSTER:('s',"scorpion"),random,hostile -MONSTER:'s',random,hostile - -WALLIFY - -# -# The "fill" levels for the quest. -# -# These levels are used to fill out any levels not occupied by specific -# levels as defined above. "fila" is the upper filler, between the -# start and locate levels, and "filb" the lower between the locate -# and goal levels. -# - -MAZE: "Ran-fila" , ' ' -INIT_MAP: mines, '.' , 'T', true, true, random, true -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -# -MONSTER: ('C', "mountain centaur"), random, hostile -MONSTER: ('C', "mountain centaur"), random, hostile -MONSTER: ('C', "forest centaur"), random, hostile -MONSTER: ('C', "forest centaur"), random, hostile -MONSTER: ('C', "forest centaur"), random, hostile -MONSTER: 'C', random, hostile -MONSTER: ('s', "scorpion"), random, hostile - -MAZE: "Ran-filb" , ' ' -INIT_MAP: mines, '.' , ' ', true, true, random, true -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -# -MONSTER: ('C', "mountain centaur"), random, hostile -MONSTER: ('C', "mountain centaur"), random, hostile -MONSTER: ('C', "mountain centaur"), random, hostile -MONSTER: ('C', "mountain centaur"), random, hostile -MONSTER: 'C', random, hostile -MONSTER: ('s', "scorpion"), random, hostile -MONSTER: ('s', "scorpion"), random, hostile - diff --git a/dat/Rog-fila.lua b/dat/Rog-fila.lua new file mode 100644 index 000000000..b21be7db9 --- /dev/null +++ b/dat/Rog-fila.lua @@ -0,0 +1,64 @@ +-- NetHack 3.6 Rogue.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1992 by Dean Luick +-- NetHack may be freely redistributed. See license for details. +-- +-- +des.room({ type = "ordinary", + contents = function() + des.stair("up") + des.object() + des.monster({ id = "leprechaun", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.monster({ id = "leprechaun", peaceful=0 }) + des.monster({ id = "guardian naga", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.trap() + des.object() + des.monster({ id = "water nymph", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.stair("down") + des.object() + des.trap() + des.trap() + des.monster({ class = "l", peaceful=0 }) + des.monster({ id = "guardian naga", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.trap() + des.trap() + des.monster({ id = "leprechaun", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.trap() + des.monster({ id = "leprechaun", peaceful=0 }) + des.monster({ id = "water nymph", peaceful=0 }) + end +}) + +des.random_corridors() diff --git a/dat/Rog-filb.lua b/dat/Rog-filb.lua new file mode 100644 index 000000000..b21be7db9 --- /dev/null +++ b/dat/Rog-filb.lua @@ -0,0 +1,64 @@ +-- NetHack 3.6 Rogue.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1992 by Dean Luick +-- NetHack may be freely redistributed. See license for details. +-- +-- +des.room({ type = "ordinary", + contents = function() + des.stair("up") + des.object() + des.monster({ id = "leprechaun", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.monster({ id = "leprechaun", peaceful=0 }) + des.monster({ id = "guardian naga", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.trap() + des.object() + des.monster({ id = "water nymph", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.stair("down") + des.object() + des.trap() + des.trap() + des.monster({ class = "l", peaceful=0 }) + des.monster({ id = "guardian naga", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.trap() + des.trap() + des.monster({ id = "leprechaun", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.trap() + des.monster({ id = "leprechaun", peaceful=0 }) + des.monster({ id = "water nymph", peaceful=0 }) + end +}) + +des.random_corridors() diff --git a/dat/Rog-goal.lua b/dat/Rog-goal.lua new file mode 100644 index 000000000..3fa505c25 --- /dev/null +++ b/dat/Rog-goal.lua @@ -0,0 +1,110 @@ +-- NetHack 3.6 Rogue.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1992 by Dean Luick +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport") + +-- 1 2 3 4 5 6 7 +--123456789012345678901234567890123456789012345678901234567890123456789012345 +des.map([[ +----- -------.......................................|-----------------| +|...| -----.....|.......................................|.................| +|...----...|.....|.......................................|....---------....| +|.---......---..--.................................------------.......|....| +|...............|..................................|..|...|...----........-| +|.....-----....--.................................|-..--..-|.....----S----| +|--S---...|....|.................................|-........-|....|........| +|.........---------.............................|-....}}....-|...|...|....| +|....|.....S......|............................|-.....}}.....-|..--.------| +|-----.....--.....|...........................|-...}}}}}}}}...-|....|.....-- +|...........--....------S-----...............|-....}}}}}}}}....-|..........| +|............--........|...| |..............--.....}}.}}........----------S- +|.............|........|...| |..............|......}}}}}}}}......|...|.....| +|S-.---.---.---.---.---|...| ------------...--........}}.}}.....--..---....| +|.---.---.---.---.-S-..----- |....|.....|....|-....}}}}}}}}....---..S.|--..| +|...|.......|..........|...---....---...S.....|-...}}}}}}}}...-|.S..|...|..| +|...|..|....|..........|............|..--..----|-.....}}.....-|..----...-S-- +|...|---....----.......|----- ......|...---| |-....}}....-|...|..--.--..| +-----.....---.....--.---....--...--------..| |-........-|....|.........| + |.............|..........|.............S... |S-------|.....|..-----..| + ---------------------------------------- ...... ---------- ---- +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,20), "lit") +-- Stairs +des.levregion({ region={01,00,15,20}, region_islev=1, exclude={01,18,04,20}, type="stair-up" }); +-- Doors +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,20)) +-- One trap to keep the gnomes at bay. +des.trap("spiked pit",37,07) +-- Objects +des.object({ id = "skeleton key", x=38, y=10, buc="blessed", spe=0, name="The Master Key of Thievery" }) +des.object({ id = "tin", x=26, y=12, montype="chameleon" }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster({ id = "Master Assassin", x=38, y=10, peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ class = "l", peaceful=0 }) +des.monster({ class = "l", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ class = "N", peaceful=0 }) +des.monster({ class = "N", peaceful=0 }) +des.monster({ class = "N", peaceful=0 }) +des.monster({ id = "chameleon", peaceful=0 }) +des.monster({ id = "chameleon", peaceful=0 }) +des.monster({ id = "chameleon", peaceful=0 }) +des.monster({ id = "chameleon", peaceful=0 }) +des.monster({ id = "chameleon", peaceful=0 }) +des.monster({ id = "shark", x=51, y=14, peaceful=0 }) +des.monster({ id = "shark", x=53, y=09, peaceful=0 }) +des.monster({ id = "shark", x=55, y=15, peaceful=0 }) +des.monster({ id = "shark", x=58, y=10, peaceful=0 }) diff --git a/dat/Rog-loca.lua b/dat/Rog-loca.lua new file mode 100644 index 000000000..ef5b399ea --- /dev/null +++ b/dat/Rog-loca.lua @@ -0,0 +1,99 @@ +-- NetHack 3.6 Rogue.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1992 by Dean Luick +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +-- 1 2 3 4 5 6 7 +--123456789012345678901234567890123456789012345678901234567890123456789012345 +des.map([[ + ---------------------------------------------------- -------- + ---.................................................- --.....| + ---...--------........-------.......................--- ---...| + ---.....- ---......- ---..................---- --.-- + ---.....---- -------- --..................-- --..| + ---...----- ----.----.....----.....--- --..|| +----..---- -----..--- |...--- |.......--- --...| +|...--- ----....--- |.--- |.........-- --...|| +|...- ----.....--- ---- |..........---....| +|...---- ----......--- | |...|.......-....|| +|......----- ---.........- | -----...|............| +|..........----- ----...........--- -------......||...........|| +|..............-----................--- |............|||..........| +|------...............................--- |...........|| |.........|| +|.....|..............------.............-----..........|| ||........| +|.....|.............-- ---.........................|| |.......|| +|.....|.............- ---.....................--| ||......| +|-S----------.......---- --.................---- |.....|| +|...........|..........--------..............----- ||....| +|...........|............................----- |....| +------------------------------------------ ------ +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,20), "lit") +-- Doors +--DOOR:locked|closed|open,(xx,yy) +-- Stairs +des.stair("up") +des.stair("down") +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,20)) +-- Objects +des.object({ id = "teleportation", x=11, y=18, buc="cursed", spe=0 }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ id = "leprechaun", peaceful=0 }) +des.monster({ class = "l", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ id = "guardian naga", peaceful=0 }) +des.monster({ class = "N", peaceful=0 }) +des.monster({ class = "N", peaceful=0 }) +des.monster({ class = "N", peaceful=0 }) +des.monster({ id = "chameleon", peaceful=0 }) +des.monster({ id = "chameleon", peaceful=0 }) +des.monster({ id = "chameleon", peaceful=0 }) +des.monster({ id = "chameleon", peaceful=0 }) +des.monster({ id = "chameleon", peaceful=0 }) diff --git a/dat/Rog-strt.lua b/dat/Rog-strt.lua new file mode 100644 index 000000000..769cb517f --- /dev/null +++ b/dat/Rog-strt.lua @@ -0,0 +1,163 @@ +-- NetHack 3.6 Rogue.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1992 by Dean Luick +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, Master of Thieves +-- and receive your quest assignment. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "nommap") + +-- 1 2 3 4 5 6 7 +--123456789012345678901234567890123456789012345678901234567890123456789012345 +des.map([[ +---------------------------------.------------------------------------------ +|.....|.||..........|....|......|.|.........|.......+............---.......| +|.....|..+..........+....---....S.|...-S-----.-----.|............+.+.......| +|.....+.||........---......|....|.|...|.....|.|...|.---.....------.--------| +|-----|.-------|..|........------.-----.....|.--..|...-------..............| +|.....|........------+------..........+.....|..--S---.........------.-----.. +|.....|.------...............-----.}}.--------.|....-------.---....|.+...--| +|..-+--.|....|-----.--------.|...|.....+.....|.|....|.....+.+......|.--....| +|..|....|....|....+.|......|.|...-----.|.....|.--...|.....|.|......|..|....| +|..|.-----S----...|.+....-----...|...|.----..|..|.---....--.---S-----.|----| +|..|.|........|...------.|.S.....|...|....-----.+.|......|..|.......|.|....| +|---.-------..|...|....|.|.|.....|...----.|...|.|---.....|.|-.......|.---..| +...........|..S...|....---.----S----..|...|...+.|..-------.---+-....|...--+| +|---------.---------...|......|....S..|.---...|.|..|...........----.---....| +|........|.........|...+.------....|---.---...|.--+-.----.----....|.+...--+| +|........|.---+---.|----.--........|......-----......|..|..|.--+-.|.-S-.|..| +|........|.|.....|........----------.----.......---.--..|-.|....|.-----.|..| +|----....+.|.....----+---............|..|--------.+.|...SS.|....|.......|..| +|...--+-----.....|......|.------------............---...||.------+--+----..| +|..........S.....|......|.|..........S............|.....||...|.....|....|..| +-------------------------.-------------------------------------------------- +]]); +-- Dungeon Description +--REGION:(00,00,75,20),lit,"ordinary" + +local streets = selection.floodfill(selection.new(), 0,12) + + +-- The down stairs is at one of the 4 "exits". The others are mimics, +-- mimicing stairwells. +local place = { {33,0}, {0,12}, {25,20}, {75,05} } +shuffle(place) + +des.stair({ dir = "down", coord = place[1] }) +des.monster({ id = "giant mimic", coord = place[2], appear_as = "ter:staircase down" }) +des.monster({ id = "large mimic", coord = place[3], appear_as = "ter:staircase down" }) +des.monster({ id = "small mimic", coord = place[4], appear_as = "ter:staircase down" }) +-- Portal arrival point +des.levregion({ region = {19,09,19,09}, type="branch" }) +-- Doors (secret) +--DOOR:locked|closed|open,(xx,yy) +des.door("locked", 32, 2) +des.door("locked", 63, 9) +des.door("locked", 27,10) +des.door("locked", 31,12) +des.door("locked", 35,13) +des.door("locked", 69,15) +des.door("locked", 56,17) +des.door("locked", 57,17) +des.door("locked", 11,19) +des.door("locked", 37,19) +des.door("locked", 39, 2) +des.door("locked", 49, 5) +des.door("locked", 10, 9) +des.door("locked", 14,12) +-- Doors (regular) +des.door("closed", 52, 1) +des.door("closed", 9, 2) +des.door("closed", 20, 2) +des.door("closed", 65, 2) +des.door("closed", 67, 2) +des.door("closed", 6, 3) +des.door("closed", 21, 5) +des.door("closed", 38, 5) +des.door("closed", 69, 6) +des.door("closed", 4, 7) +des.door("closed", 39, 7) +des.door("closed", 58, 7) +des.door("closed", 60, 7) +des.door("closed", 18, 8) +des.door("closed", 20, 9) +des.door("closed", 48,10) +des.door("closed", 46,12) +des.door("closed", 62,12) +des.door("closed", 74,12) +des.door("closed", 23,14) +des.door("closed", 23,14) +des.door("closed", 50,14) +des.door("closed", 68,14) +des.door("closed", 74,14) +des.door("closed", 14,15) +des.door("closed", 63,15) +des.door("closed", 9,17) +des.door("closed", 21,17) +des.door("closed", 50,17) +des.door("closed", 6,18) +des.door("closed", 65,18) +des.door("closed", 68,18) +-- Master of Thieves +des.monster("Master of Thieves", 36, 11) +-- The treasure of Master of Thieves +des.object("chest", 36, 11) +-- thug guards, room #1 +des.monster("thug", 28, 10) +des.monster("thug", 29, 11) +des.monster("thug", 30, 09) +des.monster("thug", 31, 07) +-- thug guards, room #2 +des.monster("thug", 31, 13) +des.monster("thug", 33, 14) +des.monster("thug", 30, 15) +--thug guards, room #3 +des.monster("thug", 35, 09) +des.monster("thug", 36, 13) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,20)) +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- +-- Monsters to get in the way. +-- +-- West exit +des.monster({ id = "leprechaun", x=01, y=12, peaceful=0 }) +des.monster({ id = "water nymph", x=02, y=12, peaceful=0 }) +-- North exit +des.monster({ id = "water nymph", x=33, y=01, peaceful=0 }) +des.monster({ id = "leprechaun", x=33, y=02, peaceful=0 }) +-- East exit +des.monster({ id = "water nymph", x=74, y=05, peaceful=0 }) +des.monster({ id = "leprechaun", x=74, y=04, peaceful=0 }) +-- South exit +des.monster({ id = "leprechaun", x=25, y=19, peaceful=0 }) +des.monster({ id = "water nymph", x=25, y=18, peaceful=0 }) +-- Wandering the streets. +for i=1,4 + math.random(1 - 1,1*3) do + des.monster({ id = "water nymph", coord = {streets:rndcoord(1)}, peaceful=0 }) + des.monster({ id = "leprechaun", coord = {streets:rndcoord(1)}, peaceful=0 }) +end +for i=1,7 + math.random(1 - 1,1*3) do + des.monster({ id = "chameleon", coord = {streets:rndcoord(1)}, peaceful=0 }) +end diff --git a/dat/Rogue.des b/dat/Rogue.des deleted file mode 100644 index 1f0c4eb6c..000000000 --- a/dat/Rogue.des +++ /dev/null @@ -1,485 +0,0 @@ -# NetHack 3.6 Rogue.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ -# Copyright (c) 1992 by Dean Luick -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, Master of Thieves -# and receive your quest assignment. -# -MAZE: "Rog-strt",' ' -FLAGS: noteleport, hardfloor, nommap -GEOMETRY:center,center -# 1 2 3 4 5 6 7 -#123456789012345678901234567890123456789012345678901234567890123456789012345 -MAP ----------------------------------.------------------------------------------ -|.....|.||..........|....|......|.|.........|.......+............---.......| -|.....|..+..........+....---....S.|...-S-----.-----.|............+.+.......| -|.....+.||........---......|....|.|...|.....|.|...|.---.....------.--------| -|-----|.-------|..|........------.-----.....|.--..|...-------..............| -|.....|........------+------..........+.....|..--S---.........------.-----.. -|.....|.------...............-----.}}.--------.|....-------.---....|.+...--| -|..-+--.|....|-----.--------.|...|.....+.....|.|....|.....+.+......|.--....| -|..|....|....|....+.|......|.|...-----.|.....|.--...|.....|.|......|..|....| -|..|.-----S----...|.+....-----...|...|.----..|..|.---....--.---S-----.|----| -|..|.|........|...------.|.S.....|...|....-----.+.|......|..|.......|.|....| -|---.-------..|...|....|.|.|.....|...----.|...|.|---.....|.|-.......|.---..| -...........|..S...|....---.----S----..|...|...+.|..-------.---+-....|...--+| -|---------.---------...|......|....S..|.---...|.|..|...........----.---....| -|........|.........|...+.------....|---.---...|.--+-.----.----....|.+...--+| -|........|.---+---.|----.--........|......-----......|..|..|.--+-.|.-S-.|..| -|........|.|.....|........----------.----.......---.--..|-.|....|.-----.|..| -|----....+.|.....----+---............|..|--------.+.|...SS.|....|.......|..| -|...--+-----.....|......|.------------............---...||.------+--+----..| -|..........S.....|......|.|..........S............|.....||...|.....|....|..| --------------------------.-------------------------------------------------- -ENDMAP -# Dungeon Description -#REGION:(00,00,75,20),lit,"ordinary" - -$streets = selection: floodfill(0,12) - - -# The down stairs is at one of the 4 "exits". The others are mimics, -# mimicing stairwells. -$place = { (33,0), (0,12), (25,20), (75,05) } -SHUFFLE: $place - -STAIR:$place[0],down -MONSTER:('m',"giant mimic"), $place[1], m_feature "staircase down" -MONSTER:('m',"large mimic"), $place[2], m_feature "staircase down" -MONSTER:('m',"small mimic"), $place[3], m_feature "staircase down" -# Portal arrival point -BRANCH:(19,09,19,09),(0,0,0,0) -# Doors (secret) -#DOOR:locked|closed|open,(xx,yy) -DOOR: locked, (32, 2) -DOOR: locked, (63, 9) -DOOR: locked, (27,10) -DOOR: locked, (31,12) -DOOR: locked, (35,13) -DOOR: locked, (69,15) -DOOR: locked, (56,17) -DOOR: locked, (57,17) -DOOR: locked, (11,19) -DOOR: locked, (37,19) -DOOR: locked, (39, 2) -DOOR: locked, (49, 5) -DOOR: locked, (10, 9) -DOOR: locked, (14,12) -# Doors (regular) -DOOR: closed, (52, 1) -DOOR: closed, ( 9, 2) -DOOR: closed, (20, 2) -DOOR: closed, (65, 2) -DOOR: closed, (67, 2) -DOOR: closed, ( 6, 3) -DOOR: closed, (21, 5) -DOOR: closed, (38, 5) -DOOR: closed, (69, 6) -DOOR: closed, ( 4, 7) -DOOR: closed, (39, 7) -DOOR: closed, (58, 7) -DOOR: closed, (60, 7) -DOOR: closed, (18, 8) -DOOR: closed, (20, 9) -DOOR: closed, (48,10) -DOOR: closed, (46,12) -DOOR: closed, (62,12) -DOOR: closed, (74,12) -DOOR: closed, (23,14) -DOOR: closed, (23,14) -DOOR: closed, (50,14) -DOOR: closed, (68,14) -DOOR: closed, (74,14) -DOOR: closed, (14,15) -DOOR: closed, (63,15) -DOOR: closed, ( 9,17) -DOOR: closed, (21,17) -DOOR: closed, (50,17) -DOOR: closed, ( 6,18) -DOOR: closed, (65,18) -DOOR: closed, (68,18) -# Master of Thieves -MONSTER:('@',"Master of Thieves"),(36,11) -# The treasure of Master of Thieves -OBJECT:('(',"chest"),(36,11) -# thug guards, room #1 -MONSTER:('@',"thug"),(28,10) -MONSTER:('@',"thug"),(29,11) -MONSTER:('@',"thug"),(30,09) -MONSTER:('@',"thug"),(31,07) -# thug guards, room #2 -MONSTER:('@',"thug"),(31,13) -MONSTER:('@',"thug"),(33,14) -MONSTER:('@',"thug"),(30,15) -#thug guards, room #3 -MONSTER:('@',"thug"),(35,09) -MONSTER:('@',"thug"),(36,13) -# Non diggable walls -NON_DIGGABLE:(00,00,75,20) -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# -# Monsters to get in the way. -# -# West exit -MONSTER: ('l',"leprechaun"),(01,12),hostile -MONSTER: ('n',"water nymph"),(02,12),hostile -# North exit -MONSTER: ('n',"water nymph"),(33,01),hostile -MONSTER: ('l',"leprechaun"),(33,02),hostile -# East exit -MONSTER: ('n',"water nymph"),(74,05),hostile -MONSTER: ('l',"leprechaun"),(74,04),hostile -# South exit -MONSTER: ('l',"leprechaun"),(25,19),hostile -MONSTER: ('n',"water nymph"),(25,18),hostile -# Wandering the streets. -LOOP [ 4 + 1d3 ] { - MONSTER: ('n',"water nymph"),rndcoord($streets),hostile - MONSTER: ('l',"leprechaun"),rndcoord($streets),hostile -} -LOOP [ 7 + 1d3 ] { - MONSTER: (':',"chameleon"),rndcoord($streets),hostile -} - -# -# The "locate" level for the quest. -# -# Here you have to find the entrance to the Assassins' Guild to go -# further towards your assigned quest. -# - -MAZE: "Rog-loca",' ' -GEOMETRY:center,center -# 1 2 3 4 5 6 7 -#123456789012345678901234567890123456789012345678901234567890123456789012345 -MAP - ---------------------------------------------------- -------- - ---.................................................- --.....| - ---...--------........-------.......................--- ---...| - ---.....- ---......- ---..................---- --.-- - ---.....---- -------- --..................-- --..| - ---...----- ----.----.....----.....--- --..|| -----..---- -----..--- |...--- |.......--- --...| -|...--- ----....--- |.--- |.........-- --...|| -|...- ----.....--- ---- |..........---....| -|...---- ----......--- | |...|.......-....|| -|......----- ---.........- | -----...|............| -|..........----- ----...........--- -------......||...........|| -|..............-----................--- |............|||..........| -|------...............................--- |...........|| |.........|| -|.....|..............------.............-----..........|| ||........| -|.....|.............-- ---.........................|| |.......|| -|.....|.............- ---.....................--| ||......| -|-S----------.......---- --.................---- |.....|| -|...........|..........--------..............----- ||....| -|...........|............................----- |....| ------------------------------------------- ------ -ENDMAP -# Dungeon Description -REGION:(00,00,75,20),lit,"ordinary" -# Doors -#DOOR:locked|closed|open,(xx,yy) -# Stairs -STAIR:random,up -STAIR:random,down -# Non diggable walls -NON_DIGGABLE:(00,00,75,20) -# Objects -OBJECT:('?',"teleportation"),(11,18),cursed,0 -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:'l',random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:'N',random,hostile -MONSTER:'N',random,hostile -MONSTER:'N',random,hostile -MONSTER: (':',"chameleon"),random,hostile -MONSTER: (':',"chameleon"),random,hostile -MONSTER: (':',"chameleon"),random,hostile -MONSTER: (':',"chameleon"),random,hostile -MONSTER: (':',"chameleon"),random,hostile - -# -# The "goal" level for the quest. Teleportation and digging are -# disallowed. -# -# You have to reach The Master Assassin via some means other than -# simple searching or digging since there is no path between your -# arrival point and his location. -# -MAZE: "Rog-goal", ' ' -FLAGS: noteleport -GEOMETRY:center,center -# 1 2 3 4 5 6 7 -#123456789012345678901234567890123456789012345678901234567890123456789012345 -MAP ------ -------.......................................|-----------------| -|...| -----.....|.......................................|.................| -|...----...|.....|.......................................|....---------....| -|.---......---..--.................................------------.......|....| -|...............|..................................|..|...|...----........-| -|.....-----....--.................................|-..--..-|.....----S----| -|--S---...|....|.................................|-........-|....|........| -|.........---------.............................|-....}}....-|...|...|....| -|....|.....S......|............................|-.....}}.....-|..--.------| -|-----.....--.....|...........................|-...}}}}}}}}...-|....|.....-- -|...........--....------S-----...............|-....}}}}}}}}....-|..........| -|............--........|...| |..............--.....}}.}}........----------S- -|.............|........|...| |..............|......}}}}}}}}......|...|.....| -|S-.---.---.---.---.---|...| ------------...--........}}.}}.....--..---....| -|.---.---.---.---.-S-..----- |....|.....|....|-....}}}}}}}}....---..S.|--..| -|...|.......|..........|...---....---...S.....|-...}}}}}}}}...-|.S..|...|..| -|...|..|....|..........|............|..--..----|-.....}}.....-|..----...-S-- -|...|---....----.......|----- ......|...---| |-....}}....-|...|..--.--..| ------.....---.....--.---....--...--------..| |-........-|....|.........| - |.............|..........|.............S... |S-------|.....|..-----..| - ---------------------------------------- ...... ---------- ---- -ENDMAP -# Dungeon Description -REGION:(00,00,75,20),lit,"ordinary" -# Stairs -STAIR:levregion(01,00,15,20),(01,18,04,20),up -# Doors -# Non diggable walls -NON_DIGGABLE:(00,00,75,20) -# One trap to keep the gnomes at bay. -TRAP:"spiked pit",(37,07) -# Objects -OBJECT:('(',"skeleton key"),(38,10),blessed,0,name:"The Master Key of Thievery" -OBJECT:('%',"tin"),(26,12),montype:"chameleon" -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('@',"Master Assassin"),(38,10),hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:('l',"leprechaun"),random,hostile -MONSTER:'l',random,hostile -MONSTER:'l',random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:('N',"guardian naga"),random,hostile -MONSTER:'N',random,hostile -MONSTER:'N',random,hostile -MONSTER:'N',random,hostile -MONSTER: (':',"chameleon"),random,hostile -MONSTER: (':',"chameleon"),random,hostile -MONSTER: (':',"chameleon"),random,hostile -MONSTER: (':',"chameleon"),random,hostile -MONSTER: (':',"chameleon"),random,hostile -MONSTER:(';',"shark"),(51,14),hostile -MONSTER:(';',"shark"),(53,09),hostile -MONSTER:(';',"shark"),(55,15),hostile -MONSTER:(';',"shark"),(58,10),hostile - -# -# The "fill" level for the quest. -# -# This level is used to fill out any levels not occupied by specific -# levels as defined above. -# -LEVEL: "Rog-fila" -# -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up - OBJECT: random,random - MONSTER: ('l', "leprechaun"), random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random,random - MONSTER: ('l', "leprechaun"), random, hostile - MONSTER: ('N', "guardian naga"), random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - TRAP: random, random - OBJECT: random,random - MONSTER: ('n', "water nymph"), random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - OBJECT: random, random - TRAP: random, random - TRAP: random, random - MONSTER: 'l', random, hostile - MONSTER: ('N', "guardian naga"), random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random, random - TRAP: random, random - TRAP: random, random - MONSTER: ('l', "leprechaun"), random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - TRAP: random, random - MONSTER: ('l', "leprechaun"), random, hostile - MONSTER: ('n', "water nymph"), random, hostile -} - -RANDOM_CORRIDORS - -# -# currently a & b are the same. -# -LEVEL: "Rog-filb" -# -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up - OBJECT: random,random - MONSTER: ('l', "leprechaun"), random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random,random - MONSTER: ('l', "leprechaun"), random, hostile - MONSTER: ('N', "guardian naga"), random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - TRAP: random, random - OBJECT: random,random - MONSTER: ('n', "water nymph"), random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - OBJECT: random, random - TRAP: random, random - TRAP: random, random - MONSTER: 'l', random, hostile - MONSTER: ('N', "guardian naga"), random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random, random - TRAP: random, random - TRAP: random, random - MONSTER: ('l', "leprechaun"), random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - TRAP: random, random - MONSTER: ('l', "leprechaun"), random, hostile - MONSTER: ('n', "water nymph"), random, hostile -} - -RANDOM_CORRIDORS diff --git a/dat/Sam-fila.lua b/dat/Sam-fila.lua new file mode 100644 index 000000000..84a885d98 --- /dev/null +++ b/dat/Sam-fila.lua @@ -0,0 +1,37 @@ +-- NetHack 3.6 Samurai.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-92 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg=".", bg="P", smoothed=true, joined=true, walled=true }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.monster("d") +des.monster("wolf") +des.monster("wolf") +des.monster("wolf") +des.monster("wolf") +des.monster("wolf") +des.monster("stalker") +-- +des.trap() +des.trap() +des.trap() +des.trap() diff --git a/dat/Sam-filb.lua b/dat/Sam-filb.lua new file mode 100644 index 000000000..640f4b17b --- /dev/null +++ b/dat/Sam-filb.lua @@ -0,0 +1,60 @@ +-- NetHack 3.6 Samurai.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-92 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.map([[ +------------- ------------- +|...........| |...........| +|...-----...|----------------------------------|...-----...| +|...| |...|..................................|...| |...| +|...-----..........................................-----...| +|...........|--S----------------------------S--|...........| +----...--------.|..........................|.--------...---- + |...|........+..........................+........|...| + |...|........+..........................+........|...| +----...--------.|..........................|.--------...---- +|...........|--S----------------------------S--|...........| +|...-----..........................................-----...| +|...| |...|..................................|...| |...| +|...-----...|----------------------------------|...-----...| +|...........| |...........| +------------- ------------- +]]); +des.region(selection.area(00,00,59,15), "unlit") +-- Doors +des.door("closed",16,07) +des.door("closed",16,08) +des.door("closed",43,07) +des.door("closed",43,08) +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.monster("d") +des.monster("wolf") +des.monster("wolf") +des.monster("wolf") +des.monster("wolf") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +-- +des.trap() +des.trap() +des.trap() +des.trap() \ No newline at end of file diff --git a/dat/Sam-goal.lua b/dat/Sam-goal.lua new file mode 100644 index 000000000..ce7215a0a --- /dev/null +++ b/dat/Sam-goal.lua @@ -0,0 +1,111 @@ +-- NetHack 3.6 Samurai.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-92 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport"); + +des.map([[ + + ....................... + ......-------------------...... + ......----.................----...... + ....----.....-------------.....----.... + ....--.....----...........----.....--.... + ...||....---....---------....---....||... + ...|....--....---.......---....--....|... + ....|...||...---...--+--...---...||...|.... + ....|...|....|....|-...-|....|....|...|.... + ....|...|....|....+.....+....|....|...|.... + ....|...|....|....|-...-|....|....|...|.... + ....|...||...---...--+--...---...||...|.... + ...|....--....---.......---....--....|... + ...||....---....---------....---....||... + ....--.....----...........----.....--.... + ....----.....-------------.....----.... + ......----.................----...... + ......-------------------...... + ....................... +]]); +-- Dungeon Description +local place = { {02,11},{42,09} } +local placeidx = math.random(1, #place); + +des.region(selection.area(00,00,44,19), "unlit") +-- Doors +des.door("closed",19,10) +des.door("closed",22,08) +des.door("closed",22,12) +des.door("closed",25,10) +-- Stairs +des.stair({ dir = "up", coord = place[placeidx] }) + +-- Holes in the concentric ring walls +local place = { {22,14},{30,10},{22, 6},{14,10} } +local placeidx = math.random(1, #place); +des.terrain(place[placeidx], ".") +local place = { {22, 4},{35,10},{22,16},{ 9,10} } +local placeidx = math.random(1, #place); +des.terrain(place[placeidx], ".") +local place = { {22, 2},{22,18} } +local placeidx = math.random(1, #place); +des.terrain(place[placeidx], ".") + +-- Non diggable walls +des.non_diggable(selection.area(00,00,44,19)) +-- Objects +des.object({ id = "tsurugi", x=22, y=10, buc="blessed", spe=0, name="The Tsurugi of Muramasa" }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.trap("board",22,09) +des.trap("board",24,10) +des.trap("board",22,11) +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster("Ashikaga Takauji", 22, 10) +des.monster({ id = "samurai", peaceful=0 }) +des.monster({ id = "samurai", peaceful=0 }) +des.monster({ id = "samurai", peaceful=0 }) +des.monster({ id = "samurai", peaceful=0 }) +des.monster({ id = "samurai", peaceful=0 }) +des.monster({ id = "ninja", peaceful=0 }) +des.monster({ id = "ninja", peaceful=0 }) +des.monster({ id = "ninja", peaceful=0 }) +des.monster({ id = "ninja", peaceful=0 }) +des.monster({ id = "ninja", peaceful=0 }) +des.monster("wolf") +des.monster("wolf") +des.monster("wolf") +des.monster("wolf") +des.monster("d") +des.monster("d") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") diff --git a/dat/Sam-loca.lua b/dat/Sam-loca.lua new file mode 100644 index 000000000..ccad8e260 --- /dev/null +++ b/dat/Sam-loca.lua @@ -0,0 +1,141 @@ +-- NetHack 3.6 Samurai.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-92 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "hardfloor"); + +des.map([[ +............................................................................ +............................................................................ +........-----..................................................-----........ +........|...|..................................................|...|........ +........|...---..}..--+------------------------------+--..}..---...|........ +........|-|...|.....|...|....|....|....|....|....|.|...|.....|...|-|........ +..........|...-------...|....|....|....|....|....S.|...-------...|.......... +..........|-|.........------+----+-+-------+-+--------.........|-|.......... +............|..--------.|}........................}|.--------..|............ +............|..+........+..........................+........+..|............ +............|..+........+..........................+........+..|............ +............|..--------.|}........................}|.--------..|............ +..........|-|.........--------+-+-------+-+----+------.........|-|.......... +..........|...-------...|.S....|....|....|....|....|...-------...|.......... +........|-|...|.....|...|.|....|....|....|....|....|...|.....|...|-|........ +........|...---..}..--+------------------------------+--..}..---...|........ +........|...|..................................................|...|........ +........-----..................................................-----........ +............................................................................ +............................................................................ +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +-- Doors +des.door("locked",22,04) +des.door("locked",22,15) +des.door("locked",53,04) +des.door("locked",53,15) +des.door("locked",49,06) +des.door("locked",26,13) +des.door("locked",28,07) +des.door("locked",30,12) +des.door("locked",33,07) +des.door("locked",32,12) +des.door("locked",35,07) +des.door("locked",40,12) +des.door("locked",43,07) +des.door("locked",42,12) +des.door("locked",45,07) +des.door("locked",47,12) +des.door("closed",15,09) +des.door("closed",15,10) +des.door("closed",24,09) +des.door("closed",24,10) +des.door("closed",51,09) +des.door("closed",51,10) +des.door("closed",60,09) +des.door("closed",60,10) +-- Stairs +des.stair("up", 10,10) +des.stair("down", 25,14) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Objects +des.object("*", 25, 05) +des.object("*", 26, 05) +des.object("*", 27, 05) +des.object("*", 28, 05) +des.object("*", 25, 06) +des.object("*", 26, 06) +des.object("*", 27, 06) +des.object("*", 28, 06) +-- +des.object("[", 40, 05) +des.object("[", 41, 05) +des.object("[", 42, 05) +des.object("[", 43, 05) +des.object("[", 40, 06) +des.object("[", 41, 06) +des.object("[", 42, 06) +des.object("[", 43, 06) +-- +des.object(")", 27, 13) +des.object(")", 28, 13) +des.object(")", 29, 13) +des.object(")", 30, 13) +des.object(")", 27, 14) +des.object(")", 28, 14) +des.object(")", 29, 14) +des.object(")", 30, 14) +-- +des.object("(", 37, 13) +des.object("(", 38, 13) +des.object("(", 39, 13) +des.object("(", 40, 13) +des.object("(", 37, 14) +des.object("(", 38, 14) +des.object("(", 39, 14) +des.object("(", 40, 14) +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster({ id = "ninja", x=15, y=05, peaceful=0 }) +des.monster({ id = "ninja", x=16, y=05, peaceful=0 }) +des.monster("wolf", 17, 05) +des.monster("wolf", 18, 05) +des.monster({ id = "ninja", x=19, y=05, peaceful=0 }) +des.monster("wolf", 15, 14) +des.monster("wolf", 16, 14) +des.monster({ id = "ninja", x=17, y=14, peaceful=0 }) +des.monster({ id = "ninja", x=18, y=14, peaceful=0 }) +des.monster("wolf", 56, 05) +des.monster({ id = "ninja", x=57, y=05, peaceful=0 }) +des.monster("wolf", 58, 05) +des.monster("wolf", 59, 05) +des.monster({ id = "ninja", x=56, y=14, peaceful=0 }) +des.monster("wolf", 57, 14) +des.monster({ id = "ninja", x=58, y=14, peaceful=0 }) +des.monster("d", 59, 14) +des.monster("wolf", 60, 14) +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +des.monster("stalker") +-- "guards" for the central courtyard. +des.monster({ id = "samurai", x=30, y=05, peaceful=0 }) +des.monster({ id = "samurai", x=31, y=05, peaceful=0 }) +des.monster({ id = "samurai", x=32, y=05, peaceful=0 }) +des.monster({ id = "samurai", x=32, y=14, peaceful=0 }) +des.monster({ id = "samurai", x=33, y=14, peaceful=0 }) +des.monster({ id = "samurai", x=34, y=14, peaceful=0 }) diff --git a/dat/Sam-strt.lua b/dat/Sam-strt.lua new file mode 100644 index 000000000..108f28f61 --- /dev/null +++ b/dat/Sam-strt.lua @@ -0,0 +1,91 @@ +-- NetHack 3.6 Samurai.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-92 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, Lord Sato +-- and receive your quest assignment. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") + +des.map([[ +..............................................................PP............ +...............................................................PP........... +..........---------------------------------------------------...PPP......... +..........|......|.........|...|..............|...|.........|....PPPPP...... +......... |......|.........S...|..............|...S.........|.....PPPP...... +..........|......|.........|---|..............|---|.........|.....PPP....... +..........+......|.........+...-------++-------...+.........|......PP....... +..........+......|.........|......................|.........|......PP....... +......... |......---------------------++--------------------|........PP..... +..........|.................................................|.........PP.... +..........|.................................................|...........PP.. +..........----------------------------------------...-------|............PP. +..........................................|.................|.............PP +.............. ................. .........|.................|..............P +............. } ............... } ........|.................|............... +.............. ........PP....... .........|.................|............... +.....................PPP..................|.................|............... +......................PP..................-------------------............... +............................................................................ +............................................................................ +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +des.region({ region={18,03, 26,07}, lit=1, type="throne", prefilled=1 }) +-- Portal arrival zone +des.levregion({ region = {62,12,70,17}, type="branch" }) +-- Stairs +des.stair("down", 29,04) +-- Doors +des.door("locked",10,06) +des.door("locked",10,07) +des.door("closed",27,04) +des.door("closed",27,06) +des.door("closed",38,06) +des.door("locked",38,08) +des.door("closed",39,06) +des.door("locked",39,08) +des.door("closed",50,04) +des.door("closed",50,06) +-- Lord Sato +des.monster("Lord Sato", 20, 04) +-- The treasure of Lord Sato +des.object("chest", 20, 04) +-- roshi guards for the audience chamber +des.monster("roshi", 18, 04) +des.monster("roshi", 18, 05) +des.monster("roshi", 18, 06) +des.monster("roshi", 18, 07) +des.monster("roshi", 26, 04) +des.monster("roshi", 26, 05) +des.monster("roshi", 26, 06) +des.monster("roshi", 26, 07) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Monsters on siege duty. +des.monster({ id = "ninja", x=64, y=00, peaceful=0 }) +des.monster("wolf", 65, 01) +des.monster({ id = "ninja", x=67, y=02, peaceful=0 }) +des.monster({ id = "ninja", x=69, y=05, peaceful=0 }) +des.monster({ id = "ninja", x=69, y=06, peaceful=0 }) +des.monster("wolf", 69, 07) +des.monster({ id = "ninja", x=70, y=06, peaceful=0 }) +des.monster({ id = "ninja", x=70, y=07, peaceful=0 }) +des.monster({ id = "ninja", x=72, y=01, peaceful=0 }) +des.monster("wolf", 75, 09) +des.monster({ id = "ninja", x=73, y=05, peaceful=0 }) +des.monster({ id = "ninja", x=68, y=02, peaceful=0 }) +des.monster("stalker") diff --git a/dat/Samurai.des b/dat/Samurai.des deleted file mode 100644 index 1b3fa8785..000000000 --- a/dat/Samurai.des +++ /dev/null @@ -1,440 +0,0 @@ -# NetHack 3.6 Samurai.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1991-92 by M. Stephenson, P. Winner -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, Lord Sato -# and receive your quest assignment. -# -MAZE: "Sam-strt",' ' -FLAGS: noteleport,hardfloor -GEOMETRY:center,center -MAP -..............................................................PP............ -...............................................................PP........... -..........---------------------------------------------------...PPP......... -..........|......|.........|...|..............|...|.........|....PPPPP...... -......... |......|.........S...|..............|...S.........|.....PPPP...... -..........|......|.........|---|..............|---|.........|.....PPP....... -..........+......|.........+...-------++-------...+.........|......PP....... -..........+......|.........|......................|.........|......PP....... -......... |......---------------------++--------------------|........PP..... -..........|.................................................|.........PP.... -..........|.................................................|...........PP.. -..........----------------------------------------...-------|............PP. -..........................................|.................|.............PP -.............. ................. .........|.................|..............P -............. } ............... } ........|.................|............... -.............. ........PP....... .........|.................|............... -.....................PPP..................|.................|............... -......................PP..................-------------------............... -............................................................................ -............................................................................ -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(18,03,26,07),lit,"throne",unfilled -# Portal arrival zone -BRANCH:(62,12,70,17),(0,0,0,0) -# Stairs -STAIR:(29,04),down -# Doors -DOOR:locked,(10,06) -DOOR:locked,(10,07) -DOOR:closed,(27,04) -DOOR:closed,(27,06) -DOOR:closed,(38,06) -DOOR:locked,(38,08) -DOOR:closed,(39,06) -DOOR:locked,(39,08) -DOOR:closed,(50,04) -DOOR:closed,(50,06) -# Lord Sato -MONSTER:('@',"Lord Sato"),(20,04) -# The treasure of Lord Sato -OBJECT:('(',"chest"),(20,04) -# roshi guards for the audience chamber -MONSTER:('@',"roshi"),(18,04) -MONSTER:('@',"roshi"),(18,05) -MONSTER:('@',"roshi"),(18,06) -MONSTER:('@',"roshi"),(18,07) -MONSTER:('@',"roshi"),(26,04) -MONSTER:('@',"roshi"),(26,05) -MONSTER:('@',"roshi"),(26,06) -MONSTER:('@',"roshi"),(26,07) -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Monsters on siege duty. -MONSTER: ('@',"ninja"),(64,00),hostile -MONSTER: ('d',"wolf"),(65,01) -MONSTER: ('@',"ninja"),(67,02),hostile -MONSTER: ('@',"ninja"),(69,05),hostile -MONSTER: ('@',"ninja"),(69,06),hostile -MONSTER: ('d',"wolf"),(69,07) -MONSTER: ('@',"ninja"),(70,06),hostile -MONSTER: ('@',"ninja"),(70,07),hostile -MONSTER: ('@',"ninja"),(72,01),hostile -MONSTER: ('d',"wolf"),(75,09) -MONSTER: ('@',"ninja"),(73,05),hostile -MONSTER: ('@',"ninja"),(68,02),hostile -MONSTER:('E',"stalker"),random - -# -# The "locate" level for the quest. -# -# Here you have to invade the Shogun's Castle to go -# further towards your assigned quest. -# - -MAZE: "Sam-loca",' ' -FLAGS: hardfloor -GEOMETRY:center,center -MAP -............................................................................ -............................................................................ -........-----..................................................-----........ -........|...|..................................................|...|........ -........|...---..}..--+------------------------------+--..}..---...|........ -........|-|...|.....|...|....|....|....|....|....|.|...|.....|...|-|........ -..........|...-------...|....|....|....|....|....S.|...-------...|.......... -..........|-|.........------+----+-+-------+-+--------.........|-|.......... -............|..--------.|}........................}|.--------..|............ -............|..+........+..........................+........+..|............ -............|..+........+..........................+........+..|............ -............|..--------.|}........................}|.--------..|............ -..........|-|.........--------+-+-------+-+----+------.........|-|.......... -..........|...-------...|.S....|....|....|....|....|...-------...|.......... -........|-|...|.....|...|.|....|....|....|....|....|...|.....|...|-|........ -........|...---..}..--+------------------------------+--..}..---...|........ -........|...|..................................................|...|........ -........-----..................................................-----........ -............................................................................ -............................................................................ -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -# Doors -DOOR:locked,(22,04) -DOOR:locked,(22,15) -DOOR:locked,(53,04) -DOOR:locked,(53,15) -DOOR:locked,(49,06) -DOOR:locked,(26,13) -DOOR:locked,(28,07) -DOOR:locked,(30,12) -DOOR:locked,(33,07) -DOOR:locked,(32,12) -DOOR:locked,(35,07) -DOOR:locked,(40,12) -DOOR:locked,(43,07) -DOOR:locked,(42,12) -DOOR:locked,(45,07) -DOOR:locked,(47,12) -DOOR:closed,(15,09) -DOOR:closed,(15,10) -DOOR:closed,(24,09) -DOOR:closed,(24,10) -DOOR:closed,(51,09) -DOOR:closed,(51,10) -DOOR:closed,(60,09) -DOOR:closed,(60,10) -# Stairs -STAIR:(10,10),up -STAIR:(25,14),down -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Objects -OBJECT:'*',(25,05) -OBJECT:'*',(26,05) -OBJECT:'*',(27,05) -OBJECT:'*',(28,05) -OBJECT:'*',(25,06) -OBJECT:'*',(26,06) -OBJECT:'*',(27,06) -OBJECT:'*',(28,06) -# -OBJECT:'[',(40,05) -OBJECT:'[',(41,05) -OBJECT:'[',(42,05) -OBJECT:'[',(43,05) -OBJECT:'[',(40,06) -OBJECT:'[',(41,06) -OBJECT:'[',(42,06) -OBJECT:'[',(43,06) -# -OBJECT:')',(27,13) -OBJECT:')',(28,13) -OBJECT:')',(29,13) -OBJECT:')',(30,13) -OBJECT:')',(27,14) -OBJECT:')',(28,14) -OBJECT:')',(29,14) -OBJECT:')',(30,14) -# -OBJECT:'(',(37,13) -OBJECT:'(',(38,13) -OBJECT:'(',(39,13) -OBJECT:'(',(40,13) -OBJECT:'(',(37,14) -OBJECT:'(',(38,14) -OBJECT:'(',(39,14) -OBJECT:'(',(40,14) -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('@',"ninja"),(15,05),hostile -MONSTER:('@',"ninja"),(16,05),hostile -MONSTER:('d',"wolf"),(17,05) -MONSTER:('d',"wolf"),(18,05) -MONSTER:('@',"ninja"),(19,05),hostile -MONSTER:('d',"wolf"),(15,14) -MONSTER:('d',"wolf"),(16,14) -MONSTER:('@',"ninja"),(17,14),hostile -MONSTER:('@',"ninja"),(18,14),hostile -MONSTER:('d',"wolf"),(56,05) -MONSTER:('@',"ninja"),(57,05),hostile -MONSTER:('d',"wolf"),(58,05) -MONSTER:('d',"wolf"),(59,05) -MONSTER:('@',"ninja"),(56,14),hostile -MONSTER:('d',"wolf"),(57,14) -MONSTER:('@',"ninja"),(58,14),hostile -MONSTER:'d',(59,14) -MONSTER:('d',"wolf"),(60,14) -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -# "guards" for the central courtyard. -MONSTER:('@',"samurai"),(30,05),hostile -MONSTER:('@',"samurai"),(31,05),hostile -MONSTER:('@',"samurai"),(32,05),hostile -MONSTER:('@',"samurai"),(32,14),hostile -MONSTER:('@',"samurai"),(33,14),hostile -MONSTER:('@',"samurai"),(34,14),hostile - -# -# The "goal" level for the quest. -# -# Here you meet Takauji, your nemesis monster. You have to -# defeat him in combat to gain the artifact you have been -# assigned to retrieve. -# - -MAZE: "Sam-goal", ' ' -FLAGS: noteleport -GEOMETRY:center,center -MAP - - ....................... - ......-------------------...... - ......----.................----...... - ....----.....-------------.....----.... - ....--.....----...........----.....--.... - ...||....---....---------....---....||... - ...|....--....---.......---....--....|... - ....|...||...---...--+--...---...||...|.... - ....|...|....|....|-...-|....|....|...|.... - ....|...|....|....+.....+....|....|...|.... - ....|...|....|....|-...-|....|....|...|.... - ....|...||...---...--+--...---...||...|.... - ...|....--....---.......---....--....|... - ...||....---....---------....---....||... - ....--.....----...........----.....--.... - ....----.....-------------.....----.... - ......----.................----...... - ......-------------------...... - ....................... -ENDMAP -# Dungeon Description -$place = { (02,11),(42,09) } -SHUFFLE: $place - -REGION:(00,00,44,19),unlit,"ordinary" -# Doors -DOOR:closed,(19,10) -DOOR:closed,(22,08) -DOOR:closed,(22,12) -DOOR:closed,(25,10) -# Stairs -STAIR:$place[0],up - -# Holes in the concentric ring walls -$place = { (22,14),(30,10),(22, 6),(14,10) } -SHUFFLE:$place -TERRAIN:$place[0],'.' -$place = { (22, 4),(35,10),(22,16),( 9,10) } -SHUFFLE:$place -TERRAIN:$place[0],'.' -$place = { (22, 2),(22,18) } -SHUFFLE:$place -TERRAIN:$place[0],'.' - -# Non diggable walls -NON_DIGGABLE:(00,00,44,19) -# Objects -OBJECT:(')',"tsurugi"),(22,10),blessed,0,name:"The Tsurugi of Muramasa" -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# -TRAP:"board",(22,09) -TRAP:"board",(24,10) -TRAP:"board",(22,11) -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('@',"Ashikaga Takauji"),(22,10) -MONSTER:('@',"samurai"),random,hostile -MONSTER:('@',"samurai"),random,hostile -MONSTER:('@',"samurai"),random,hostile -MONSTER:('@',"samurai"),random,hostile -MONSTER:('@',"samurai"),random,hostile -MONSTER:('@',"ninja"),random,hostile -MONSTER:('@',"ninja"),random,hostile -MONSTER:('@',"ninja"),random,hostile -MONSTER:('@',"ninja"),random,hostile -MONSTER:('@',"ninja"),random,hostile -MONSTER:('d',"wolf"),random -MONSTER:('d',"wolf"),random -MONSTER:('d',"wolf"),random -MONSTER:('d',"wolf"),random -MONSTER:'d',random -MONSTER:'d',random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random -MONSTER:('E',"stalker"),random - - -# -# The "fill" levels for the quest. -# -# These levels are used to fill out any levels not occupied by specific -# levels as defined above. "filla" is the upper filler, between the -# start and locate levels, and "fillb" the lower between the locate -# and goal levels. -# - -MAZE: "Sam-fila", ' ' -INIT_MAP: mines, '.' , 'P', true, true, random, true -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -MONSTER: 'd', random -MONSTER: ('d', "wolf"), random -MONSTER: ('d', "wolf"), random -MONSTER: ('d', "wolf"), random -MONSTER: ('d', "wolf"), random -MONSTER: ('d', "wolf"), random -MONSTER: ('E', "stalker"), random -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random - -MAZE: "Sam-filb", ' ' -GEOMETRY:center,center -MAP -------------- ------------- -|...........| |...........| -|...-----...|----------------------------------|...-----...| -|...| |...|..................................|...| |...| -|...-----..........................................-----...| -|...........|--S----------------------------S--|...........| -----...--------.|..........................|.--------...---- - |...|........+..........................+........|...| - |...|........+..........................+........|...| -----...--------.|..........................|.--------...---- -|...........|--S----------------------------S--|...........| -|...-----..........................................-----...| -|...| |...|..................................|...| |...| -|...-----...|----------------------------------|...-----...| -|...........| |...........| -------------- ------------- -ENDMAP -REGION:(00,00,59,15),unlit,"ordinary" -# Doors -DOOR:closed,(16,07) -DOOR:closed,(16,08) -DOOR:closed,(43,07) -DOOR:closed,(43,08) -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -MONSTER: 'd', random -MONSTER: ('d', "wolf"), random -MONSTER: ('d', "wolf"), random -MONSTER: ('d', "wolf"), random -MONSTER: ('d', "wolf"), random -MONSTER: ('E', "stalker"), random -MONSTER: ('E', "stalker"), random -MONSTER: ('E', "stalker"), random -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random diff --git a/dat/Tou-fila.lua b/dat/Tou-fila.lua new file mode 100644 index 000000000..0a84f8a2e --- /dev/null +++ b/dat/Tou-fila.lua @@ -0,0 +1,35 @@ +-- NetHack 3.6 Tourist.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991,92 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg=".", bg=" ", smoothed=true, joined=true, walled=true }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.trap() +des.trap() +des.trap() +des.trap() +-- +des.monster({ id = "soldier", peaceful = 0 }) +des.monster({ id = "soldier", peaceful = 0 }) +des.monster({ id = "soldier", peaceful = 0 }) +des.monster({ id = "soldier", peaceful = 0 }) +des.monster({ id = "soldier", peaceful = 0 }) +des.monster({ class = "H", peaceful = 0 }) +des.monster({ class = "C", peaceful = 0 }) diff --git a/dat/Tou-filb.lua b/dat/Tou-filb.lua new file mode 100644 index 000000000..9b748a4cd --- /dev/null +++ b/dat/Tou-filb.lua @@ -0,0 +1,39 @@ +-- NetHack 3.6 Tourist.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991,92 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg=".", bg=" ", smoothed=true, joined=true, walled=true }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.trap() +des.trap() +des.trap() +des.trap() +-- +des.monster({ id = "soldier", peaceful = 0 }) +des.monster({ id = "captain", peaceful = 0 }) +des.monster({ id = "captain", peaceful = 0 }) +des.monster({ class = "H", peaceful = 0 }) +des.monster({ class = "H", peaceful = 0 }) +des.monster({ class = "C", peaceful = 0 }) +des.monster("s") diff --git a/dat/Tou-goal.lua b/dat/Tou-goal.lua new file mode 100644 index 000000000..b1fb941ed --- /dev/null +++ b/dat/Tou-goal.lua @@ -0,0 +1,160 @@ +-- NetHack 3.6 Tourist.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991,92 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.map([[ +---------------------------------------------------------------------------- +|.........|.........|..........|..| |.................|........|........|..| +|.........|.........|..........|..| |....--------.....|........|........|..| +|------S--|--+-----------+------..| |....|......|.....|........|........|..| +|.........|.......................| |....|......+.....--+-------------+--..| +|.........|.......................| |....|......|..........................| +|-S-----S-|......----------.......| |....|......|..........................| +|..|..|...|......|........|.......| |....-----------.........----..........| +|..+..+...|......|........|.......| |....|.........|.........|}}|..........| +|..|..|...|......+........|.......| |....|.........+.........|}}|..........| +|..|..|...|......|........|.......S.S....|.........|.........----..........| +|---..----|......|........|.......| |....|.........|.......................| +|.........+......|+F-+F-+F|.......| |....-----------.......................| +|---..----|......|..|..|..|.......| |......................--------------..| +|..|..|...|......--F-F--F--.......| |......................+............|..| +|..+..+...|.......................| |--.---...-----+-----..|............|..| +|--|..----|--+-----------+------..| |.....|...|.........|..|------------|..| +|..+..+...|.........|..........|..| |.....|...|.........|..+............|..| +|..|..|...|.........|..........|..| |.....|...|.........|..|............|..| +---------------------------------------------------------------------------- +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +-- The Inn +des.region(selection.area(01,01,09,02), "lit") +des.region({ region = {01,04,09,05}, lit=1, type = "barracks" }) +des.region(selection.area(01,07,02,10), "unlit") +des.region(selection.area(07,07,09,10), "unlit") +des.region(selection.area(01,14,02,15), "unlit") +des.region(selection.area(07,14,09,15), "unlit") +des.region(selection.area(01,17,02,18), "unlit") +des.region(selection.area(07,17,09,18), "unlit") +-- +des.region({ region = {11,01,19,02}, lit = 0, type = "barracks" }) +des.region(selection.area(21,01,30,02), "unlit") +des.region({ region = {11,17,19,18}, lit = 0, type = "barracks" }) +des.region(selection.area(21,17,30,18), "unlit") +-- Police Station +des.region(selection.area(18,07,25,11), "lit") +des.region(selection.area(18,13,19,13), "unlit") +des.region(selection.area(21,13,22,13), "unlit") +des.region(selection.area(24,13,25,13), "unlit") +-- The town itself +des.region(selection.area(42,03,47,06), "unlit") +des.region(selection.area(42,08,50,11), "unlit") +des.region({ region = {37,16,41,18}, lit = 0, type = "morgue" }) +des.region(selection.area(47,16,55,18), "unlit") +des.region(selection.area(55,01,62,03), "unlit") +des.region(selection.area(64,01,71,03), "unlit") +des.region({ region = {60,14,71,15}, lit = 1, type = "shop" }) +des.region({ region = {60,17,71,18}, lit = 1, type = "shop" }) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Stairs +des.stair("up", 70,08) +-- Doors +des.door("locked",07,03) +des.door("locked",02,06) +des.door("locked",08,06) +des.door("closed",03,08) +des.door("closed",06,08) +des.door("open",10,12) +des.door("closed",03,15) +des.door("closed",06,15) +des.door("closed",03,17) +des.door("closed",06,17) +des.door("closed",13,03) +des.door("random",25,03) +des.door("closed",13,16) +des.door("random",25,16) +des.door("locked",17,09) +des.door("locked",18,12) +des.door("locked",21,12) +des.door("locked",24,12) +des.door("locked",34,10) +des.door("locked",36,10) +des.door("random",48,04) +des.door("random",56,04) +des.door("random",70,04) +des.door("random",51,09) +des.door("random",51,15) +des.door("open",59,14) +des.door("open",59,17) +-- Objects +des.object({ id = "credit card", x=04, y=01, buc="blessed", spe=0, name="The Platinum Yendorian Express Card" }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster({ id = "Master of Thieves", x=04, y=01, peaceful = 0 }) +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("s") +des.monster("s") +-- ladies of the evening +des.monster("succubus", 02, 08) +des.monster("succubus", 08, 08) +des.monster("incubus", 02, 14) +des.monster("incubus", 08, 14) +des.monster("incubus", 02, 17) +des.monster("incubus", 08, 17) +-- Police station (with drunken prisoners) +des.monster({ id = "Kop Kaptain", x=24, y=09, peaceful = 0 }) +des.monster({ id = "Kop Lieutenant", x=20, y=09, peaceful = 0 }) +des.monster({ id = "Kop Lieutenant", x=22, y=11, peaceful = 0 }) +des.monster({ id = "Kop Lieutenant", x=22, y=07, peaceful = 0 }) +des.monster({ id = "Keystone Kop", x=19, y=07, peaceful = 0 }) +des.monster({ id = "Keystone Kop", x=19, y=08, peaceful = 0 }) +des.monster({ id = "Keystone Kop", x=22, y=09, peaceful = 0 }) +des.monster({ id = "Keystone Kop", x=24, y=11, peaceful = 0 }) +des.monster({ id = "Keystone Kop", x=19, y=11, peaceful = 0 }) +des.monster("prisoner", 19, 13) +des.monster("prisoner", 21, 13) +des.monster("prisoner", 24, 13) +-- +des.monster({ id = "watchman", x=33, y=10, peaceful = 0 }) + +des.wallify() diff --git a/dat/Tou-loca.lua b/dat/Tou-loca.lua new file mode 100644 index 000000000..f82f5072f --- /dev/null +++ b/dat/Tou-loca.lua @@ -0,0 +1,157 @@ +-- NetHack 3.6 Tourist.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991,92 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "hardfloor") +des.map([[ +---------------------------------------------------------------------------- +|....|......|..........|......|......|...|....|.....|......|...............| +|....|......|.|------|.|......|......|.|.|....|..}..|......|.|----------|..| +|....|--+----.|......|.|-S---+|+-----|.|.S....|.....|---+--|.|..........+..| +|....|........|......|.|...|.........|.|------|..............|..........|-+| +|....+...}}...+......|.|...|.|-----|.|..............|--+----------------|..| +|----|........|------|.|---|.|.....|......|-----+-|.|.......|...........|--| +|............................|.....|.|--+-|.......|.|.......|...........|..| +|----|.....|-------------|...|--+--|.|....|.......|.|-----------+-------|..| +|....+.....+.........S...|...........|....|-------|........................| +|....|.....|.........|...|.|---------|....|.........|-------|.|----------|.| +|....|.....|---------|---|.|......|..+....|-------|.|.......|.+......S.\.|.| +|....|.....+.........S...|.|......|..|....|.......|.|.......|.|......|...|.| +|-------|..|.........|---|.|+-------------------+-|.|.......+.|----------|.| +|.......+..|---------|.........|.........|..........|.......|.|..........|.| +|.......|..............|--+--|.|.........|.|----+-----------|.|..........|.| +|---------+-|--+-----|-|.....|.|.........|.|........|.|.....+.|..........+.| +|...........|........|.S.....|.|----+----|.|--------|.|.....|.|----------|.| +|...........|........|.|.....|........................|.....|..............| +---------------------------------------------------------------------------- +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +des.non_diggable(selection.area(00,00,75,19)) +-- +des.region({ region={01,01, 04,05}, lit=0, type="morgue", prefilled = 0 }) +des.region({ region={15,03, 20,05}, lit=1, type="shop", prefilled = 0 }) +des.region({ region={62,03, 71,04}, lit=1, type="shop", prefilled = 0 }) +des.region({ region={01,17, 11,18}, lit=1, type="barracks", prefilled = 0 }) +des.region({ region={12,09, 20,10}, lit=1, type="barracks", prefilled = 0 }) +des.region({ region={53,11, 59,14}, lit=1, type="zoo", prefilled = 0 }) +des.region({ region={63,14, 72,16}, lit=1, type="barracks", prefilled = 0 }) +des.region({ region={32,14, 40,16}, lit=1, type="temple", prefilled = 0 }) +-- +des.region({ region = {06,01,11,02}, type = "ordinary" }) +des.region({ region = {24,01,29,02}, type = "ordinary" }) +des.region({ region = {31,01,36,02}, type = "ordinary" }) +des.region({ region = {42,01,45,03}, type = "ordinary" }) +des.region({ region = {53,01,58,02}, type = "ordinary" }) +des.region({ region = {24,04,26,05}, type = "ordinary" }) +des.region({ region = {30,06,34,07}, type = "ordinary" }) +des.region(selection.area(73,05,74,05), "unlit") +des.region({ region = {01,09,04,12}, type = "ordinary" }) +des.region({ region = {01,14,07,15}, type = "ordinary" }) +des.region({ region = {12,12,20,13}, type = "ordinary" }) +des.region({ region = {13,17,20,18}, type = "ordinary" }) +des.region({ region = {22,09,24,10}, type = "ordinary" }) +des.region({ region = {22,12,24,12}, type = "ordinary" }) +des.region({ region = {24,16,28,18}, type = "ordinary" }) +des.region({ region = {28,11,33,12}, type = "ordinary" }) +des.region(selection.area(35,11,36,12), "lit") +des.region({ region = {38,08,41,12}, type = "ordinary" }) +des.region({ region = {43,07,49,08}, type = "ordinary" }) +des.region({ region = {43,12,49,12}, type = "ordinary" }) +des.region({ region = {44,16,51,16}, type = "ordinary" }) +des.region({ region = {53,06,59,07}, type = "ordinary" }) +des.region({ region = {61,06,71,07}, type = "ordinary" }) +des.region({ region = {55,16,59,18}, type = "ordinary" }) +des.region({ region = {63,11,68,12}, type = "ordinary" }) +des.region({ region = {70,11,72,12}, type = "ordinary" }) +-- Stairs +des.stair("up", 10,04) +des.stair("down", 73,05) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +des.door("closed",05,05) +des.door("closed",05,09) +des.door("closed",08,14) +des.door("closed",08,03) +des.door("closed",11,09) +des.door("closed",11,12) +des.door("closed",10,16) +des.door("closed",14,05) +des.door("closed",15,16) +des.door("locked",21,09) +des.door("locked",21,12) +des.door("closed",23,17) +des.door("closed",25,03) +des.door("closed",26,15) +des.door("closed",29,03) +des.door("closed",28,13) +des.door("closed",31,03) +des.door("closed",32,08) +des.door("closed",37,11) +des.door("closed",36,17) +des.door("locked",41,03) +des.door("closed",40,07) +des.door("closed",48,06) +des.door("closed",48,13) +des.door("closed",48,15) +des.door("closed",56,03) +des.door("closed",55,05) +des.door("closed",72,03) +des.door("locked",74,04) +des.door("closed",64,08) +des.door("closed",62,11) +des.door("closed",69,11) +des.door("closed",60,13) +des.door("closed",60,16) +des.door("closed",73,16) + +-- Objects +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Toilet paper +des.object("blank paper", 71, 12) +des.object("blank paper", 71, 12) +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("s") +des.monster("s") diff --git a/dat/Tou-strt.lua b/dat/Tou-strt.lua new file mode 100644 index 000000000..8ca3f6a76 --- /dev/null +++ b/dat/Tou-strt.lua @@ -0,0 +1,131 @@ +-- NetHack 3.6 Tourist.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991,92 by M. Stephenson, P. Winner +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, Twoflower +-- and receive your quest assignment. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") +des.map([[ +.......}}....---------..-------------------------------------------------... +........}}...|.......|..|.-------------------------------------------...|... +.........}}..|.......|..|.|......|......|.............|......|......|...|... +..........}}.|.......|..|.|......+......+.............+......+..\...|...|... +...........}}}..........|.|......|......|.............|......|......|...|... +.............}}.........|.|----S-|--S---|S----------S-|---S--|------|...|... +..............}}}.......|...............................................|... +................}}}.....----S------++--S----------S----------S-----------... +..................}}........... .. ................................... +......-------......}}}}........}}}}..}}}}..}}}}..}}}}....................... +......|.....|.......}}}}}}..}}}} .. }}}}..}}}}..}}}..................... +......|.....+...........}}}}}}........................}}}..}}}}..}}}..}}}... +......|.....|...........................................}}}}..}}}..}}}}.}}}} +......-------............................................................... +............................................................................ +...-------......-------..................................................... +...|.....|......|.....|..................................................... +...|.....+......+.....|..................................................... +...|.....|......|.....|..................................................... +...-------......-------..................................................... +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +des.region({ region={14,01, 20,03}, lit=0, type="morgue", prefilled=0 }) +des.region(selection.area(07,10,11,12), "unlit") +des.region(selection.area(04,16,08,18), "unlit") +des.region(selection.area(17,16,21,18), "unlit") +des.region(selection.area(27,02,32,04), "unlit") +des.region(selection.area(34,02,39,04), "unlit") +des.region(selection.area(41,02,53,04), "unlit") +des.region(selection.area(55,02,60,04), "unlit") +des.region(selection.area(62,02,67,04), "lit") +-- Stairs +des.stair("down", 66,03) +-- Portal arrival point +des.levregion({ region = {68,14,68,14}, type="branch" }) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Doors +des.door("locked",31,05) +des.door("locked",36,05) +des.door("locked",41,05) +des.door("locked",52,05) +des.door("locked",58,05) +des.door("locked",28,07) +des.door("locked",39,07) +des.door("locked",50,07) +des.door("locked",61,07) +des.door("closed",33,03) +des.door("closed",40,03) +des.door("closed",54,03) +des.door("closed",61,03) +des.door("open",12,11) +des.door("open",09,17) +des.door("open",16,17) +des.door("locked",35,07) +des.door("locked",36,07) +-- Monsters on siege duty. +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("giant spider") +des.monster("s") +des.monster("s") +des.monster("forest centaur") +des.monster("forest centaur") +des.monster("forest centaur") +des.monster("forest centaur") +des.monster("forest centaur") +des.monster("forest centaur") +des.monster("forest centaur") +des.monster("forest centaur") +des.monster("C") +-- Twoflower +des.monster("Twoflower", 64, 03) +-- The treasure of Twoflower +des.object("chest", 64, 03) +-- guides for the audience chamber +des.monster("guide", 29, 03) +des.monster("guide", 32, 04) +des.monster("guide", 35, 02) +des.monster("guide", 38, 03) +des.monster("guide", 45, 03) +des.monster("guide", 48, 02) +des.monster("guide", 49, 04) +des.monster("guide", 51, 03) +des.monster("guide", 57, 03) +des.monster("guide", 62, 04) +des.monster("guide", 66, 04) +-- path guards +des.monster("watchman", 35, 08) +des.monster("watchman", 36, 08) +-- river monsters +des.monster("giant eel", 62, 12) +des.monster("piranha", 47, 10) +des.monster("piranha", 29, 11) +des.monster("kraken", 34, 09) +des.monster("kraken", 37, 09) +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() diff --git a/dat/Tourist.des b/dat/Tourist.des deleted file mode 100644 index c88372fd5..000000000 --- a/dat/Tourist.des +++ /dev/null @@ -1,519 +0,0 @@ -# NetHack 3.6 Tourist.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1991,92 by M. Stephenson, P. Winner -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, Twoflower -# and receive your quest assignment. -# -MAZE: "Tou-strt",' ' -FLAGS: noteleport,hardfloor -GEOMETRY:center,center -MAP -.......}}....---------..-------------------------------------------------... -........}}...|.......|..|.-------------------------------------------...|... -.........}}..|.......|..|.|......|......|.............|......|......|...|... -..........}}.|.......|..|.|......+......+.............+......+..\...|...|... -...........}}}..........|.|......|......|.............|......|......|...|... -.............}}.........|.|----S-|--S---|S----------S-|---S--|------|...|... -..............}}}.......|...............................................|... -................}}}.....----S------++--S----------S----------S-----------... -..................}}........... .. ................................... -......-------......}}}}........}}}}..}}}}..}}}}..}}}}....................... -......|.....|.......}}}}}}..}}}} .. }}}}..}}}}..}}}..................... -......|.....+...........}}}}}}........................}}}..}}}}..}}}..}}}... -......|.....|...........................................}}}}..}}}..}}}}.}}}} -......-------............................................................... -............................................................................ -...-------......-------..................................................... -...|.....|......|.....|..................................................... -...|.....+......+.....|..................................................... -...|.....|......|.....|..................................................... -...-------......-------..................................................... -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(14,01,20,03),unlit,"morgue" -REGION:(07,10,11,12),unlit,"ordinary" -REGION:(04,16,08,18),unlit,"ordinary" -REGION:(17,16,21,18),unlit,"ordinary" -REGION:(27,02,32,04),unlit,"ordinary" -REGION:(34,02,39,04),unlit,"ordinary" -REGION:(41,02,53,04),unlit,"ordinary" -REGION:(55,02,60,04),unlit,"ordinary" -REGION:(62,02,67,04),lit,"ordinary" -# Stairs -STAIR:(66,03),down -# Portal arrival point -BRANCH:(68,14,68,14),(0,0,0,0) -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Doors -DOOR:locked,(31,05) -DOOR:locked,(36,05) -DOOR:locked,(41,05) -DOOR:locked,(52,05) -DOOR:locked,(58,05) -DOOR:locked,(28,07) -DOOR:locked,(39,07) -DOOR:locked,(50,07) -DOOR:locked,(61,07) -DOOR:closed,(33,03) -DOOR:closed,(40,03) -DOOR:closed,(54,03) -DOOR:closed,(61,03) -DOOR:open,(12,11) -DOOR:open,(09,17) -DOOR:open,(16,17) -DOOR:locked,(35,07) -DOOR:locked,(36,07) -# Monsters on siege duty. -MONSTER: ('s',"giant spider"),random -MONSTER: ('s',"giant spider"),random -MONSTER: ('s',"giant spider"),random -MONSTER: ('s',"giant spider"),random -MONSTER: ('s',"giant spider"),random -MONSTER: ('s',"giant spider"),random -MONSTER: ('s',"giant spider"),random -MONSTER: ('s',"giant spider"),random -MONSTER: ('s',"giant spider"),random -MONSTER: ('s',"giant spider"),random -MONSTER: ('s',"giant spider"),random -MONSTER: ('s',"giant spider"),random -MONSTER: 's',random -MONSTER: 's',random -MONSTER: ('C',"forest centaur"),random -MONSTER: ('C',"forest centaur"),random -MONSTER: ('C',"forest centaur"),random -MONSTER: ('C',"forest centaur"),random -MONSTER: ('C',"forest centaur"),random -MONSTER: ('C',"forest centaur"),random -MONSTER: ('C',"forest centaur"),random -MONSTER: ('C',"forest centaur"),random -MONSTER: 'C',random -# Twoflower -MONSTER:('@',"Twoflower"),(64,03) -# The treasure of Twoflower -OBJECT:('(',"chest"),(64,03) -# guides for the audience chamber -MONSTER:('@',"guide"),(29,03) -MONSTER:('@',"guide"),(32,04) -MONSTER:('@',"guide"),(35,02) -MONSTER:('@',"guide"),(38,03) -MONSTER:('@',"guide"),(45,03) -MONSTER:('@',"guide"),(48,02) -MONSTER:('@',"guide"),(49,04) -MONSTER:('@',"guide"),(51,03) -MONSTER:('@',"guide"),(57,03) -MONSTER:('@',"guide"),(62,04) -MONSTER:('@',"guide"),(66,04) -# path guards -MONSTER:('@',"watchman"),(35,08) -MONSTER:('@',"watchman"),(36,08) -# river monsters -MONSTER:(';',"giant eel"),(62,12) -MONSTER:(';',"piranha"),(47,10) -MONSTER:(';',"piranha"),(29,11) -MONSTER:(';',"kraken"),(34,09) -MONSTER:(';',"kraken"),(37,09) -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random - -# -# The "locate" level for the quest. -# -# Here you have to find the Thieves' Guild Hall to go -# further towards your assigned quest. -# - -MAZE: "Tou-loca",' ' -FLAGS: hardfloor -GEOMETRY:center,center -MAP ----------------------------------------------------------------------------- -|....|......|..........|......|......|...|....|.....|......|...............| -|....|......|.|------|.|......|......|.|.|....|..}..|......|.|----------|..| -|....|--+----.|......|.|-S---+|+-----|.|.S....|.....|---+--|.|..........+..| -|....|........|......|.|...|.........|.|------|..............|..........|-+| -|....+...}}...+......|.|...|.|-----|.|..............|--+----------------|..| -|----|........|------|.|---|.|.....|......|-----+-|.|.......|...........|--| -|............................|.....|.|--+-|.......|.|.......|...........|..| -|----|.....|-------------|...|--+--|.|....|.......|.|-----------+-------|..| -|....+.....+.........S...|...........|....|-------|........................| -|....|.....|.........|...|.|---------|....|.........|-------|.|----------|.| -|....|.....|---------|---|.|......|..+....|-------|.|.......|.+......S.\.|.| -|....|.....+.........S...|.|......|..|....|.......|.|.......|.|......|...|.| -|-------|..|.........|---|.|+-------------------+-|.|.......+.|----------|.| -|.......+..|---------|.........|.........|..........|.......|.|..........|.| -|.......|..............|--+--|.|.........|.|----+-----------|.|..........|.| -|---------+-|--+-----|-|.....|.|.........|.|........|.|.....+.|..........+.| -|...........|........|.S.....|.|----+----|.|--------|.|.....|.|----------|.| -|...........|........|.|.....|........................|.....|..............| ----------------------------------------------------------------------------- -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -NON_DIGGABLE:(00,00,75,19) -# -REGION:(01,01,04,05),unlit,"morgue" -REGION:(15,03,20,05),lit,"shop" -REGION:(62,03,71,04),lit,"shop" -REGION:(01,17,11,18),lit,"barracks" -REGION:(12,09,20,10),lit,"barracks" -REGION:(53,11,59,14),lit,"zoo" -REGION:(63,14,72,16),lit,"barracks" -REGION:(32,14,40,16),lit,"temple" -# -REGION:(06,01,11,02),random,"ordinary" -REGION:(24,01,29,02),random,"ordinary" -REGION:(31,01,36,02),random,"ordinary" -REGION:(42,01,45,03),random,"ordinary" -REGION:(53,01,58,02),random,"ordinary" -REGION:(24,04,26,05),random,"ordinary" -REGION:(30,06,34,07),random,"ordinary" -REGION:(73,05,74,05),unlit,"ordinary" -REGION:(01,09,04,12),random,"ordinary" -REGION:(01,14,07,15),random,"ordinary" -REGION:(12,12,20,13),random,"ordinary" -REGION:(13,17,20,18),random,"ordinary" -REGION:(22,09,24,10),random,"ordinary" -REGION:(22,12,24,12),random,"ordinary" -REGION:(24,16,28,18),random,"ordinary" -REGION:(28,11,33,12),random,"ordinary" -REGION:(35,11,36,12),lit,"ordinary" -REGION:(38,08,41,12),random,"ordinary" -REGION:(43,07,49,08),random,"ordinary" -REGION:(43,12,49,12),random,"ordinary" -REGION:(44,16,51,16),random,"ordinary" -REGION:(53,06,59,07),random,"ordinary" -REGION:(61,06,71,07),random,"ordinary" -REGION:(55,16,59,18),random,"ordinary" -REGION:(63,11,68,12),random,"ordinary" -REGION:(70,11,72,12),random,"ordinary" -# Stairs -STAIR:(10,04),up -STAIR:(73,05),down -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -DOOR:closed,(05,05) -DOOR:closed,(05,09) -DOOR:closed,(08,14) -DOOR:closed,(08,03) -DOOR:closed,(11,09) -DOOR:closed,(11,12) -DOOR:closed,(10,16) -DOOR:closed,(14,05) -DOOR:closed,(15,16) -DOOR:locked,(21,09) -DOOR:locked,(21,12) -DOOR:closed,(23,17) -DOOR:closed,(25,03) -DOOR:closed,(26,15) -DOOR:closed,(29,03) -DOOR:closed,(28,13) -DOOR:closed,(31,03) -DOOR:closed,(32,08) -DOOR:closed,(37,11) -DOOR:closed,(36,17) -DOOR:locked,(41,03) -DOOR:closed,(40,07) -DOOR:closed,(48,06) -DOOR:closed,(48,13) -DOOR:closed,(48,15) -DOOR:closed,(56,03) -DOOR:closed,(55,05) -DOOR:closed,(72,03) -DOOR:locked,(74,04) -DOOR:closed,(64,08) -DOOR:closed,(62,11) -DOOR:closed,(69,11) -DOOR:closed,(60,13) -DOOR:closed,(60,16) -DOOR:closed,(73,16) - -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Toilet paper -OBJECT:('?',"blank paper"),(71,12) -OBJECT:('?',"blank paper"),(71,12) -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:'s',random -MONSTER:'s',random - -# -# The "goal" level for the quest. -# -# Here you meet the Master of Thieves your nemesis monster. You have to -# defeat the Master of Thieves in combat to gain the artifact you have -# been assigned to retrieve. -# - -MAZE: "Tou-goal", ' ' -GEOMETRY:center,center -MAP ----------------------------------------------------------------------------- -|.........|.........|..........|..| |.................|........|........|..| -|.........|.........|..........|..| |....--------.....|........|........|..| -|------S--|--+-----------+------..| |....|......|.....|........|........|..| -|.........|.......................| |....|......+.....--+-------------+--..| -|.........|.......................| |....|......|..........................| -|-S-----S-|......----------.......| |....|......|..........................| -|..|..|...|......|........|.......| |....-----------.........----..........| -|..+..+...|......|........|.......| |....|.........|.........|}}|..........| -|..|..|...|......+........|.......| |....|.........+.........|}}|..........| -|..|..|...|......|........|.......S.S....|.........|.........----..........| -|---..----|......|........|.......| |....|.........|.......................| -|.........+......|+F-+F-+F|.......| |....-----------.......................| -|---..----|......|..|..|..|.......| |......................--------------..| -|..|..|...|......--F-F--F--.......| |......................+............|..| -|..+..+...|.......................| |--.---...-----+-----..|............|..| -|--|..----|--+-----------+------..| |.....|...|.........|..|------------|..| -|..+..+...|.........|..........|..| |.....|...|.........|..+............|..| -|..|..|...|.........|..........|..| |.....|...|.........|..|............|..| ----------------------------------------------------------------------------- -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -# The Inn -REGION:(01,01,09,02),lit,"ordinary" -REGION:(01,04,09,05),lit,"barracks" -REGION:(01,07,02,10),unlit,"ordinary" -REGION:(07,07,09,10),unlit,"ordinary" -REGION:(01,14,02,15),unlit,"ordinary" -REGION:(07,14,09,15),unlit,"ordinary" -REGION:(01,17,02,18),unlit,"ordinary" -REGION:(07,17,09,18),unlit,"ordinary" -# -REGION:(11,01,19,02),unlit,"barracks" -REGION:(21,01,30,02),unlit,"ordinary" -REGION:(11,17,19,18),unlit,"barracks" -REGION:(21,17,30,18),unlit,"ordinary" -# Police Station -REGION:(18,07,25,11),lit,"ordinary" -REGION:(18,13,19,13),unlit,"ordinary" -REGION:(21,13,22,13),unlit,"ordinary" -REGION:(24,13,25,13),unlit,"ordinary" -# The town itself -REGION:(42,03,47,06),unlit,"ordinary" -REGION:(42,08,50,11),unlit,"ordinary" -REGION:(37,16,41,18),unlit,"morgue" -REGION:(47,16,55,18),unlit,"ordinary" -REGION:(55,01,62,03),unlit,"ordinary" -REGION:(64,01,71,03),unlit,"ordinary" -REGION:(60,14,71,15),lit,"shop" -REGION:(60,17,71,18),lit,"shop" -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Stairs -STAIR:(70,08),up -# Doors -DOOR:locked,(07,03) -DOOR:locked,(02,06) -DOOR:locked,(08,06) -DOOR:closed,(03,08) -DOOR:closed,(06,08) -DOOR:open,(10,12) -DOOR:closed,(03,15) -DOOR:closed,(06,15) -DOOR:closed,(03,17) -DOOR:closed,(06,17) -DOOR:closed,(13,03) -DOOR:random,(25,03) -DOOR:closed,(13,16) -DOOR:random,(25,16) -DOOR:locked,(17,09) -DOOR:locked,(18,12) -DOOR:locked,(21,12) -DOOR:locked,(24,12) -DOOR:locked,(34,10) -DOOR:locked,(36,10) -DOOR:random,(48,04) -DOOR:random,(56,04) -DOOR:random,(70,04) -DOOR:random,(51,09) -DOOR:random,(51,15) -DOOR:open,(59,14) -DOOR:open,(59,17) -# Objects -OBJECT:('(',"credit card"),(04,01),blessed,0,name:"The Platinum Yendorian Express Card" -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('@',"Master of Thieves"),(04,01),hostile -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:('s',"giant spider"),random -MONSTER:'s',random -MONSTER:'s',random -# ladies of the evening -MONSTER:('&',"succubus"),(02,08) -MONSTER:('&',"succubus"),(08,08) -MONSTER:('&',"incubus"),(02,14) -MONSTER:('&',"incubus"),(08,14) -MONSTER:('&',"incubus"),(02,17) -MONSTER:('&',"incubus"),(08,17) -# Police station (with drunken prisoners) -MONSTER:('K',"Kop Kaptain"),(24,09),hostile -MONSTER:('K',"Kop Lieutenant"),(20,09),hostile -MONSTER:('K',"Kop Lieutenant"),(22,11),hostile -MONSTER:('K',"Kop Lieutenant"),(22,07),hostile -MONSTER:('K',"Keystone Kop"),(19,07),hostile -MONSTER:('K',"Keystone Kop"),(19,08),hostile -MONSTER:('K',"Keystone Kop"),(22,09),hostile -MONSTER:('K',"Keystone Kop"),(24,11),hostile -MONSTER:('K',"Keystone Kop"),(19,11),hostile -MONSTER:('@',"prisoner"),(19,13) -MONSTER:('@',"prisoner"),(21,13) -MONSTER:('@',"prisoner"),(24,13) -# -MONSTER:('@',"watchman"),(33,10),hostile - -WALLIFY - -# -# The "fill" level for the quest. -# -# This level is used to fill out any levels not occupied by specific -# levels as defined above. -# - -MAZE: "Tou-fila" , ' ' -INIT_MAP: mines, '.' , ' ', true, true, random, true -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -# -MONSTER: ('@', "soldier"), random, hostile -MONSTER: ('@', "soldier"), random, hostile -MONSTER: ('@', "soldier"), random, hostile -MONSTER: ('@', "soldier"), random, hostile -MONSTER: ('@', "soldier"), random, hostile -MONSTER: 'H', random, hostile -MONSTER: 'C', random, hostile - -MAZE: "Tou-filb" , ' ' -INIT_MAP: mines, '.' , ' ', true, true, random, true -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -# -MONSTER: ('@', "soldier"), random, hostile -MONSTER: ('@', "captain"), random, hostile -MONSTER: ('@', "captain"), random, hostile -MONSTER: 'H', random, hostile -MONSTER: 'H', random, hostile -MONSTER: 'C', random, hostile -MONSTER: 's', random diff --git a/dat/Val-fila.lua b/dat/Val-fila.lua new file mode 100644 index 000000000..caacf0bd3 --- /dev/null +++ b/dat/Val-fila.lua @@ -0,0 +1,40 @@ +-- NetHack 3.6 Valkyrie.des $NHDT-Date: 1553807172 2019/03/28 21:06:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.15 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = "I" }); + +des.level_flags("mazelevel", "icedpools") + +des.level_init({ style="mines", fg=".", bg="I", smoothed=true, joined=true, lit=1, walled=false }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("a") +des.monster({ id = "fire giant", peaceful = 0 }) +-- +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() diff --git a/dat/Val-filb.lua b/dat/Val-filb.lua new file mode 100644 index 000000000..ee6f6027c --- /dev/null +++ b/dat/Val-filb.lua @@ -0,0 +1,42 @@ +-- NetHack 3.6 Valkyrie.des $NHDT-Date: 1553807172 2019/03/28 21:06:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.15 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = "L" }); + +des.level_flags("mazelevel", "icedpools") + +des.level_init({ style="mines", fg=".", bg="L", smoothed=true, joined=true, lit=1, walled=false }) + +-- +des.stair("up") +des.stair("down") +-- +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("a") +des.monster({ id = "fire giant", peaceful = 0 }) +des.monster({ id = "fire giant", peaceful = 0 }) +des.monster({ id = "fire giant", peaceful = 0 }) +-- +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap() +des.trap() diff --git a/dat/Val-goal.lua b/dat/Val-goal.lua new file mode 100644 index 000000000..9d5fe7a47 --- /dev/null +++ b/dat/Val-goal.lua @@ -0,0 +1,102 @@ +-- NetHack 3.6 Valkyrie.des $NHDT-Date: 1553807172 2019/03/28 21:06:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.15 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = "L" }); + +des.level_flags("mazelevel", "icedpools") + +des.level_init({ style="mines", fg=".", bg="L", smoothed=true, joined=true, lit=1, walled=false }) + +des.map([[ +xxxxxx.....................xxxxxxxx +xxxxx.......LLLLL.LLLLL......xxxxxx +xxxx......LLLLLLLLLLLLLLL......xxxx +xxxx.....LLL|---------|LLL.....xxxx +xxxx....LL|--.........--|LL.....xxx +x......LL|-...LLLLLLL...-|LL.....xx +.......LL|...LL.....LL...|LL......x +......LL|-..LL.......LL..-|LL...... +......LL|.................|LL...... +......LL|-..LL.......LL..-|LL...... +.......LL|...LL.....LL...|LL....... +xx.....LL|-...LLLLLLL...-|LL......x +xxx.....LL|--.........--|LL.....xxx +xxxx.....LLL|---------|LLL...xxxxxx +xxxxx.....LLLLLLLLLLLLLLL...xxxxxxx +xxxxxx......LLLLL.LLLLL.....xxxxxxx +xxxxxxxxx..................xxxxxxxx +]]); +-- Dungeon Description +des.region(selection.area(00,00,34,16), "lit") +-- Stairs +-- Note: The up stairs are *intentionally* off of the map. +des.stair("up", 45,10) +-- Non diggable walls +des.non_diggable(selection.area(00,00,34,16)) +-- Drawbridges; northern one opens from the south (portcullis) to further +-- north (lowered span), southern one from the north to further south +des.drawbridge({ x=17, y=02, dir="south", state="random" }) +if math.random(0, 99) < 75 then + des.drawbridge({ x=17, y=14, dir="north", state="open" }) +else + des.drawbridge({ x=17, y=14, dir="north", state="random" }) +end +-- Objects +des.object({ id = "crystal ball", x=17, y=08, buc="blessed", spe=5, name="The Orb of Fate" }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Traps +des.trap("board",13,08) +des.trap("board",21,08) +-- Random traps +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("board") +des.trap() +des.trap() +-- Random monsters. +des.monster("Lord Surtur", 17, 08) +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("a") +des.monster("a") +des.monster({ id = "fire giant", x=10, y=06, peaceful = 0 }) +des.monster({ id = "fire giant", x=10, y=07, peaceful = 0 }) +des.monster({ id = "fire giant", x=10, y=08, peaceful = 0 }) +des.monster({ id = "fire giant", x=10, y=09, peaceful = 0 }) +des.monster({ id = "fire giant", x=10, y=10, peaceful = 0 }) +des.monster({ id = "fire giant", x=24, y=06, peaceful = 0 }) +des.monster({ id = "fire giant", x=24, y=07, peaceful = 0 }) +des.monster({ id = "fire giant", x=24, y=08, peaceful = 0 }) +des.monster({ id = "fire giant", x=24, y=09, peaceful = 0 }) +des.monster({ id = "fire giant", x=24, y=10, peaceful = 0 }) +des.monster({ id = "fire giant", peaceful = 0 }) +des.monster({ id = "fire giant", peaceful = 0 }) +des.monster({ class = "H", peaceful = 0 }) + +-- +-- The "fill" levels for the quest. +-- +-- These levels are used to fill out any levels not occupied by specific +-- levels as defined above. "filla" is the upper filler, between the +-- start and locate levels, and "fillb" the lower between the locate +-- and goal levels. +-- diff --git a/dat/Val-loca.lua b/dat/Val-loca.lua new file mode 100644 index 000000000..2dc7ad6d8 --- /dev/null +++ b/dat/Val-loca.lua @@ -0,0 +1,85 @@ +-- NetHack 3.6 Valkyrie.des $NHDT-Date: 1553807172 2019/03/28 21:06:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.15 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "hardfloor", "icedpools") + +des.level_init({ style="mines", fg=".", bg="I", smoothed=true, joined=false, lit=1, walled=false }) + +des.map([[ +PPPPxxxx xxxxPPPPPx +PLPxxx xPPLLLPP +PPP ....................... PPPLLP +xx ............................ PPPP +x ............................... xxxx + ................................. xx +.................................... x + ................................... +x .................................. x +xx .............................. PP +xPPP .......................... PLP +xPLLP xxPLLP +xPPPPxx xxxxPPPP +]]); +-- Dungeon Description +des.region(selection.area(00,00,39,12), "lit") +-- Stairs +des.stair("up", 48,14) +des.stair("down", 20,06) +-- Non diggable walls +des.non_diggable(selection.area(00,00,39,12)) +-- Objects +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap() +des.trap() +-- Random monsters. +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("fire ant") +des.monster("a") +des.monster({ class = "H", peaceful = 0 }) +des.monster({ id = "fire giant", peaceful = 0 }) +des.monster({ id = "fire giant", peaceful = 0 }) +des.monster({ id = "fire giant", peaceful = 0 }) +des.monster({ id = "fire giant", peaceful = 0 }) +des.monster({ id = "fire giant", peaceful = 0 }) +des.monster({ id = "fire giant", peaceful = 0 }) +des.monster({ id = "fire giant", peaceful = 0 }) +des.monster({ class = "H", peaceful = 0 }) + diff --git a/dat/Val-strt.lua b/dat/Val-strt.lua new file mode 100644 index 000000000..5bb9fce57 --- /dev/null +++ b/dat/Val-strt.lua @@ -0,0 +1,98 @@ +-- NetHack 3.6 Valkyrie.des $NHDT-Date: 1553807172 2019/03/28 21:06:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.15 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1991-2 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, the Norn, +-- and receive your quest assignment. +-- + +des.level_flags("mazelevel", "noteleport", "hardfloor", "icedpools") +des.level_init({ style = "solidfill", fg = "I" }) + +local pools = selection.new() +-- random locations +for i = 1,13 do + pools:set(); +end +-- some bigger ones +pools = pools | selection.grow(selection.set(selection.new()), "west") +pools = pools | selection.grow(selection.set(selection.new()), "north") +pools = pools | selection.grow(selection.set(selection.new()), "random") + +-- Lava pools surrounded by water +des.terrain(pools:clone():grow("all"), "P") +des.terrain(pools, "L") + +des.map([[ +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +xxxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxxxxxx +xxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..{..xxxxxxxxxxxxxxxxxxxx +xxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.....xxxxxxxxxxxxxxxxxxx +xxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxx +xxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxx +xxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxx +xxxxxxxx.....xxxxxxxxxxxxx|----------------|xxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxx +xxxxxxx..xxx...xxxxxxxxxxx|................|xxxxxxxxxx..xxxxxxxxxxxxxxxxxxxx +xxxxxx..xxxxxx......xxxxx.|................|.xxxxxxxxx.xxxxxxxxxxxxxxxxxxxxx +xxxxx..xxxxxxxxxxxx.......+................+...xxxxxxx.xxxxxxxxxxxxxxxxxxxxx +xxxx..xxxxxxxxx.....xxxxx.|................|.x...xxxxx.xxxxxxxxxxxxxxxxxxxxx +xxx..xxxxxxxxx..xxxxxxxxxx|................|xxxx.......xxxxxxxxxxxxxxxxxxxxx +xxxx..xxxxxxx..xxxxxxxxxxx|----------------|xxxxxxxxxx...xxxxxxxxxxxxxxxxxxx +xxxxxx..xxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxx +xxxxxxx......xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxx +xxxxxxxxx...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...x......xxxxxx +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.........xxxxx +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.......xxxxxx +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +]]); +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +des.region(selection.area(27,08,42,12), "lit") +-- Portal arrival point +des.levregion({ region = {66,17,66,17}, type="branch" }) +-- Stairs +des.stair("down", 18,01) +des.feature("fountain", 53,02) +-- Doors +des.door("locked",26,10) +des.door("locked",43,10) +-- Norn +des.monster("Norn", 35, 10) +-- The treasure of the Norn +des.object("chest", 36, 10) +-- valkyrie guards for the audience chamber +des.monster("warrior", 27, 08) +des.monster("warrior", 27, 09) +des.monster("warrior", 27, 11) +des.monster("warrior", 27, 12) +des.monster("warrior", 42, 08) +des.monster("warrior", 42, 09) +des.monster("warrior", 42, 11) +des.monster("warrior", 42, 12) +-- Non diggable walls +des.non_diggable(selection.area(26,07,43,13)) +-- Random traps +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +-- Monsters on siege duty. +des.monster("fire ant", 04, 12) +des.monster("fire ant", 08, 08) +des.monster("fire ant", 14, 04) +des.monster("fire ant", 17, 11) +des.monster("fire ant", 24, 10) +des.monster("fire ant", 45, 10) +des.monster("fire ant", 54, 02) +des.monster("fire ant", 55, 07) +des.monster("fire ant", 58, 14) +des.monster("fire ant", 63, 17) +des.monster({ id = "fire giant", x=18, y=01, peaceful = 0 }) +des.monster({ id = "fire giant", x=10, y=16, peaceful = 0 }) + diff --git a/dat/Valkyrie.des b/dat/Valkyrie.des deleted file mode 100644 index 252c6ce82..000000000 --- a/dat/Valkyrie.des +++ /dev/null @@ -1,353 +0,0 @@ -# NetHack 3.6 Valkyrie.des $NHDT-Date: 1553807172 2019/03/28 21:06:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.15 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1991-2 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, the Norn, -# and receive your quest assignment. -# -MAZE: "Val-strt",' ' -FLAGS: noteleport,hardfloor,icedpools -INIT_MAP:solidfill,'I' - -$pools = selection: random & random & random & random & random & - random & random & random & random & random & random & - random & random & - grow(west, random) & - grow(north, random) & - grow(random & random) -# This works because the random coordinates in $pools are evaluated once, -# when the variable is initialized. -TERRAIN:grow($pools), 'P' -TERRAIN:$pools, 'L' - -GEOMETRY:center,center -MAP -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..{..xxxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.....xxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxx -xxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxx -xxxxxxxx.....xxxxxxxxxxxxx|----------------|xxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxx -xxxxxxx..xxx...xxxxxxxxxxx|................|xxxxxxxxxx..xxxxxxxxxxxxxxxxxxxx -xxxxxx..xxxxxx......xxxxx.|................|.xxxxxxxxx.xxxxxxxxxxxxxxxxxxxxx -xxxxx..xxxxxxxxxxxx.......+................+...xxxxxxx.xxxxxxxxxxxxxxxxxxxxx -xxxx..xxxxxxxxx.....xxxxx.|................|.x...xxxxx.xxxxxxxxxxxxxxxxxxxxx -xxx..xxxxxxxxx..xxxxxxxxxx|................|xxxx.......xxxxxxxxxxxxxxxxxxxxx -xxxx..xxxxxxx..xxxxxxxxxxx|----------------|xxxxxxxxxx...xxxxxxxxxxxxxxxxxxx -xxxxxx..xxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxx -xxxxxxx......xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxx -xxxxxxxxx...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...x......xxxxxx -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.........xxxxx -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.......xxxxxx -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -ENDMAP -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(27,08,42,12),lit,"ordinary" -# Portal arrival point -BRANCH:(66,17,66,17),(0,0,0,0) -# Stairs -STAIR:(18,01),down -FOUNTAIN:(53,02) -# Doors -DOOR:locked,(26,10) -DOOR:locked,(43,10) -# Norn -MONSTER:('@',"Norn"),(35,10) -# The treasure of the Norn -OBJECT:('(',"chest"),(36,10) -# valkyrie guards for the audience chamber -MONSTER:('@',"warrior"),(27,08) -MONSTER:('@',"warrior"),(27,09) -MONSTER:('@',"warrior"),(27,11) -MONSTER:('@',"warrior"),(27,12) -MONSTER:('@',"warrior"),(42,08) -MONSTER:('@',"warrior"),(42,09) -MONSTER:('@',"warrior"),(42,11) -MONSTER:('@',"warrior"),(42,12) -# Non diggable walls -NON_DIGGABLE:(26,07,43,13) -# Random traps -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -# Monsters on siege duty. -MONSTER: ('a',"fire ant"),(04,12) -MONSTER: ('a',"fire ant"),(08,08) -MONSTER: ('a',"fire ant"),(14,04) -MONSTER: ('a',"fire ant"),(17,11) -MONSTER: ('a',"fire ant"),(24,10) -MONSTER: ('a',"fire ant"),(45,10) -MONSTER: ('a',"fire ant"),(54,02) -MONSTER: ('a',"fire ant"),(55,07) -MONSTER: ('a',"fire ant"),(58,14) -MONSTER: ('a',"fire ant"),(63,17) -MONSTER: ('H',"fire giant"),(18,01),hostile -MONSTER: ('H',"fire giant"),(10,16),hostile - -# -# The "locate" level for the quest. -# -# Here you have to find the cave of Surtur to go -# further towards your assigned quest. -# - -MAZE: "Val-loca",' ' -FLAGS: hardfloor,icedpools -INIT_MAP: mines, '.', 'I', true, true, lit, false -GEOMETRY:center,center -MAP -PPPPxxxx xxxxPPPPPx -PLPxxx xPPLLLPP -PPP ....................... PPPLLP -xx ............................ PPPP -x ............................... xxxx - ................................. xx -.................................... x - ................................... -x .................................. x -xx .............................. PP -xPPP .......................... PLP -xPLLP xxPLLP -xPPPPxx xxxxPPPP -ENDMAP -# Dungeon Description -REGION:(00,00,39,12),lit,"ordinary" -# Stairs -STAIR:(48,14),up -STAIR:(20,06),down -# Non diggable walls -NON_DIGGABLE:(00,00,39,12) -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:'a',random -MONSTER:'H',random,hostile -MONSTER:('H',"fire giant"),random,hostile -MONSTER:('H',"fire giant"),random,hostile -MONSTER:('H',"fire giant"),random,hostile -MONSTER:('H',"fire giant"),random,hostile -MONSTER:('H',"fire giant"),random,hostile -MONSTER:('H',"fire giant"),random,hostile -MONSTER:('H',"fire giant"),random,hostile -MONSTER:'H',random,hostile - -# -# The "goal" level for the quest. -# -# Here you meet Lord Surtur your nemesis monster. You have to -# defeat Lord Surtur in combat to gain the artifact you have -# been assigned to retrieve. -# - -MAZE: "Val-goal", 'L' -FLAGS: icedpools -INIT_MAP: mines, '.', 'L', true, true, lit, false -GEOMETRY:center,center -MAP -xxxxxx.....................xxxxxxxx -xxxxx.......LLLLL.LLLLL......xxxxxx -xxxx......LLLLLLLLLLLLLLL......xxxx -xxxx.....LLL|---------|LLL.....xxxx -xxxx....LL|--.........--|LL.....xxx -x......LL|-...LLLLLLL...-|LL.....xx -.......LL|...LL.....LL...|LL......x -......LL|-..LL.......LL..-|LL...... -......LL|.................|LL...... -......LL|-..LL.......LL..-|LL...... -.......LL|...LL.....LL...|LL....... -xx.....LL|-...LLLLLLL...-|LL......x -xxx.....LL|--.........--|LL.....xxx -xxxx.....LLL|---------|LLL...xxxxxx -xxxxx.....LLLLLLLLLLLLLLL...xxxxxxx -xxxxxx......LLLLL.LLLLL.....xxxxxxx -xxxxxxxxx..................xxxxxxxx -ENDMAP -# Dungeon Description -REGION:(00,00,34,16),lit,"ordinary" -# Stairs -# Note: The up stairs are *intentionally* off of the map. -STAIR:(45,10),up -# Non diggable walls -NON_DIGGABLE:(00,00,34,16) -# Drawbridges; northern one opens from the south (portcullis) to further -# north (lowered span), southern one from the north to further south -DRAWBRIDGE:(17,02),south,random -IF [75%] { - DRAWBRIDGE:(17,14),north,open -} ELSE { - DRAWBRIDGE:(17,14),north,random -} -# Objects -OBJECT:('(',"crystal ball"),(17,08),blessed,5,name:"The Orb of Fate" -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Traps -TRAP:"board",(13,08) -TRAP:"board",(21,08) -# Random traps -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"board",random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('H',"Lord Surtur"),(17,08) -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:('a',"fire ant"),random -MONSTER:'a',random -MONSTER:'a',random -MONSTER:('H',"fire giant"),(10,06),hostile -MONSTER:('H',"fire giant"),(10,07),hostile -MONSTER:('H',"fire giant"),(10,08),hostile -MONSTER:('H',"fire giant"),(10,09),hostile -MONSTER:('H',"fire giant"),(10,10),hostile -MONSTER:('H',"fire giant"),(24,06),hostile -MONSTER:('H',"fire giant"),(24,07),hostile -MONSTER:('H',"fire giant"),(24,08),hostile -MONSTER:('H',"fire giant"),(24,09),hostile -MONSTER:('H',"fire giant"),(24,10),hostile -MONSTER:('H',"fire giant"),random,hostile -MONSTER:('H',"fire giant"),random,hostile -MONSTER:'H',random,hostile - -# -# The "fill" levels for the quest. -# -# These levels are used to fill out any levels not occupied by specific -# levels as defined above. "filla" is the upper filler, between the -# start and locate levels, and "fillb" the lower between the locate -# and goal levels. -# - -MAZE: "Val-fila" , 'I' -FLAGS: icedpools -INIT_MAP: mines, '.', 'I', true, true, lit, false -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -MONSTER: ('a', "fire ant"), random -MONSTER: ('a', "fire ant"), random -MONSTER: ('a', "fire ant"), random -MONSTER: ('a', "fire ant"), random -MONSTER: ('a', "fire ant"), random -MONSTER: 'a', random -MONSTER: ('H', "fire giant"), random, hostile -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random - -MAZE: "Val-filb" , 'L' -FLAGS: icedpools -INIT_MAP: mines, '.', 'L', true, true, lit, false -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -MONSTER: ('a', "fire ant"), random -MONSTER: ('a', "fire ant"), random -MONSTER: ('a', "fire ant"), random -MONSTER: 'a', random -MONSTER: ('H', "fire giant"), random, hostile -MONSTER: ('H', "fire giant"), random, hostile -MONSTER: ('H', "fire giant"), random, hostile -# -TRAP: "fire", random -TRAP: "fire", random -TRAP: "fire", random -TRAP: "fire", random -TRAP: "fire", random -TRAP: random, random -TRAP: random, random diff --git a/dat/Wiz-fila.lua b/dat/Wiz-fila.lua new file mode 100644 index 000000000..61c78d75b --- /dev/null +++ b/dat/Wiz-fila.lua @@ -0,0 +1,59 @@ +-- NetHack 3.6 Wizard.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1992 by David Cohrs +-- NetHack may be freely redistributed. See license for details. +-- +-- +des.room({ type = "ordinary", + contents = function() + des.stair("up") + des.object() + des.monster({ class = "i", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.monster({ class = "i", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.object() + des.monster("vampire bat") + des.monster("vampire bat") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.stair("down") + des.object() + des.trap() + des.monster({ class = "i", peaceful=0 }) + des.monster("vampire bat") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.trap() + des.monster({ class = "i", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.monster("vampire bat") + end +}) + +des.random_corridors() diff --git a/dat/Wiz-filb.lua b/dat/Wiz-filb.lua new file mode 100644 index 000000000..41eae6c47 --- /dev/null +++ b/dat/Wiz-filb.lua @@ -0,0 +1,58 @@ +-- NetHack 3.6 Wizard.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1992 by David Cohrs +-- NetHack may be freely redistributed. See license for details. +-- +-- +des.room({ type = "ordinary", + contents = function() + des.stair("up") + des.object() + des.monster({ class = "X", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.monster({ class = "i", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.object() + des.monster({ class = "X", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.stair("down") + des.object() + des.trap() + des.monster({ class = "i", peaceful=0 }) + des.monster("vampire bat") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.object() + des.trap() + des.monster({ class = "i", peaceful=0 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.object() + des.trap() + des.monster("vampire bat") + end +}) + +des.random_corridors() diff --git a/dat/Wiz-goal.lua b/dat/Wiz-goal.lua new file mode 100644 index 000000000..5673410c6 --- /dev/null +++ b/dat/Wiz-goal.lua @@ -0,0 +1,132 @@ +-- NetHack 3.6 Wizard.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1992 by David Cohrs +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.map([[ + + + + ------------- ------------- + |...........| |...........| + -------|...........-------------------...........| + |......S...........|..|..|..|..|..|..|...........| + |......|...........|..|..|..|..|..|..|...........| + |......|...........-F+-F+-F+-F+-F+-F+-...........| + --S----|...........S.................+...........| + |......|...........-F+-F+-F+-F+-F+-F+-...........| + |......|...........|..|..|..|..|..|..|...........| + |......|...........|..|..|..|..|..|..|...........| + -------|...........-------------------...........| + |...........| |...........| + ------------- ------------- + + + + +]]); +-- Dungeon Description +des.region({ region={13,10,18,12}, lit=0, type="temple" }) +des.region(selection.area(13,06,18,08), "lit") +des.region(selection.area(20,04,30,14), "unlit") +des.region(selection.area(32,06,33,07), "unlit") +des.region(selection.area(35,06,36,07), "unlit") +des.region(selection.area(38,06,39,07), "unlit") +des.region(selection.area(41,06,42,07), "unlit") +des.region(selection.area(44,06,45,07), "unlit") +des.region(selection.area(47,06,48,07), "unlit") +des.region(selection.area(32,09,48,09), "unlit") +des.region(selection.area(32,11,33,12), "unlit") +des.region(selection.area(35,11,36,12), "unlit") +des.region(selection.area(38,11,39,12), "unlit") +des.region(selection.area(41,11,42,12), "unlit") +des.region(selection.area(44,11,45,12), "unlit") +des.region(selection.area(47,11,48,12), "unlit") +des.region(selection.area(50,04,60,14), "lit") +-- Doors +des.door("locked",19,06) +des.door("locked",14,09) +des.door("locked",31,09) +des.door("locked",33,08) +des.door("locked",36,08) +des.door("locked",39,08) +des.door("locked",42,08) +des.door("locked",45,08) +des.door("locked",48,08) +des.door("locked",33,10) +des.door("locked",36,10) +des.door("locked",39,10) +des.door("locked",42,10) +des.door("locked",45,10) +des.door("locked",48,10) +des.door("locked",49,09) +-- Stairs +des.stair("up", 55,05) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- The altar. This is not a shrine. +des.altar({ coord={16,11}, aligned="noncoaligned", type="altar" }) +-- Objects +des.object({ id = "amulet of ESP", x=16, y=11, buc="blessed", spe=0, name="The Eye of the Aethiopica" }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster("Dark One", 16, 11) +des.monster({ class = "B",random, peaceful = 0 }) +des.monster({ class = "B",random, peaceful = 0 }) +des.monster({ class = "B",random, peaceful = 0 }) +des.monster({ class = "B",random, peaceful = 0 }) +des.monster({ class = "B",random, peaceful = 0 }) +des.monster({ class = "B",random, peaceful = 0 }) +des.monster({ class = "B",random, peaceful = 0 }) +des.monster({ class = "B",random, peaceful = 0 }) +des.monster({ class = "B",random, peaceful = 0 }) +des.monster({ class = "B",random, peaceful = 0 }) +des.monster({ class = "B",random, peaceful = 0 }) +des.monster({ class = "i",random, peaceful = 0 }) +des.monster({ class = "i",random, peaceful = 0 }) +des.monster({ class = "i",random, peaceful = 0 }) +des.monster({ class = "i",random, peaceful = 0 }) +des.monster({ class = "i",random, peaceful = 0 }) +des.monster({ class = "i",random, peaceful = 0 }) +des.monster({ class = "i",random, peaceful = 0 }) +des.monster("vampire bat") +des.monster("vampire bat") +des.monster("vampire bat") +des.monster("vampire bat") +des.monster("vampire bat") +des.monster("vampire bat") +des.monster("vampire bat") +des.monster("vampire bat") +des.monster({ class = "i",random, peaceful = 0 }) +-- Captive Monsters in the dungeon +des.monster({ id = "rogue", x=35, y=06, peaceful=1, name="Pug" }) +des.monster({ id = "owlbear", x=47, y=06, peaceful=1, asleep=1 }) +des.monster({ id = "wizard", x=32, y=11, peaceful=1, asleep=1, name="Newt" }) +des.monster({ id = "Grey-elf", x=44, y=11, peaceful=1 }) +des.monster({ id = "hill giant", x=47, y=11, peaceful=1, asleep=1 }) +des.monster({ id = "gnomish wizard", x=38, y=06, peaceful=1 }) +des.monster({ id = "prisoner", x=35, y=11, peaceful=1 }) +des.monster({ id = "prisoner", x=41, y=11, peaceful=1, asleep=1 }) diff --git a/dat/Wiz-loca.lua b/dat/Wiz-loca.lua new file mode 100644 index 000000000..288660ca7 --- /dev/null +++ b/dat/Wiz-loca.lua @@ -0,0 +1,151 @@ +-- NetHack 3.6 Wizard.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1992 by David Cohrs +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "hardfloor") + +des.map([[ +............. ....................................................... +.............. .............}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}....... +.............. ..............}.................................}....... +.............. ..............}.-------------------------------.}....... +............... .........C....}.|.............................|.}....... +............... ..........C....}.|.---------------------------.|.}....... +............... .........CCC...}.|.|.........................|.|.}....... +................ ....C....CCC...}.|.|.-----------------------.|.|.}....... +.......C..C..... .....C....CCC...}.|.|.|......+.......+......|.|.|.}....... +.............C..CC.....C....CCC...}.|.|.|......|-------|......|.|.|.}....... +................ ....C....CCC...}.|.|.|......|.......|......|.|.|.}....... +......C..C..... ....C....CCC...}.|.|.|......|-------|......|.|.|.}....... +............C.. ...C....CCC...}.|.|.|......+.......+......|.|.|.}....... +........C...... ....C....CCC...}.|.|.-----------------------.|.|.}....... +....C......C... ........CCC...}.|.|.........................|.|.}....... +......C..C.... .........C....}.|.---------------------------.|.}....... +.............. .........C....}.|.............................|.}....... +............. ..............}.-------------------------------.}....... +............. .............}.................................}....... +............. .............}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}....... +............. ....................................................... +]]); + +des.replace_terrain({ region = { 0, 0,30,20}, fromterrain=".", toterrain="C", chance=15 }) +des.replace_terrain({ region = {68, 0,75,20}, fromterrain=".", toterrain="}", chance=25 }) +des.replace_terrain({ region = {34, 1,68,19}, fromterrain="}", toterrain=".", chance=2 }) + +-- Dungeon Description +des.region(selection.area(00,00,75,20), "lit") +des.region({ region={37,04,65,16}, lit=0, type="ordinary", prefilled=1, irregular=1, + contents = function() + des.door({ state="secret", wall="random" }) + end +}) +des.region({ region={39,06,63,14}, lit=0, type="ordinary", prefilled=1, irregular=1, + contents = function() + des.door({ state="secret", wall="random" }) + end +}) + +des.region({ region={41,08,46,12}, lit=1, type="ordinary", prefilled=1, irregular=1, + contents = function() + local walls = { "north", "south", "west" } + local widx = math.random(1, #walls) + des.door({ state="secret", wall=walls[widx] }) + end +}) + +des.region({ region={56,08,61,12}, lit=1, type="ordinary", prefilled=1, irregular=1, + contents = function() + local walls = { "north", "south", "east" } + local widx = math.random(1, #walls) + des.door({ state="secret", wall=walls[widx] }) + end +}) + +des.region(selection.area(48,08,54,08), "unlit") +des.region(selection.area(48,12,54,12), "unlit") + +des.region({ region={48,10,54,10}, lit=0, type="ordinary", prefilled=1, irregular=1, + contents = function() + des.door({ state="secret", wall="random" }) + end +}) + +-- Doors +des.door("locked",55,08) +des.door("locked",55,12) +des.door("locked",47,08) +des.door("locked",47,12) +-- Stairs +des.terrain({03,17}, ".") +des.stair("up", 03,17) +des.stair("down", 48,10) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,20)) +-- Objects +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap("spiked pit",24,02) +des.trap("spiked pit",07,10) +des.trap("spiked pit",23,05) +des.trap("spiked pit",26,19) +des.trap("spiked pit",72,02) +des.trap("spiked pit",72,12) +des.trap("falling rock",45,16) +des.trap("falling rock",65,13) +des.trap("falling rock",55,06) +des.trap("falling rock",39,11) +des.trap("falling rock",57,09) +des.trap("magic") +des.trap("statue") +des.trap("statue") +des.trap("polymorph") +des.trap("anti magic",53,10) +des.trap("sleep gas") +des.trap("sleep gas") +des.trap("dart") +des.trap("dart") +des.trap("dart") +-- Random monsters. +des.monster({ class = "B", peaceful = 0 }) +des.monster({ class = "B", peaceful = 0 }) +des.monster({ class = "B", peaceful = 0 }) +des.monster({ class = "B", peaceful = 0 }) +des.monster({ class = "B", peaceful = 0 }) +des.monster({ class = "B", peaceful = 0 }) +des.monster({ class = "B", peaceful = 0 }) +des.monster({ class = "B", peaceful = 0 }) +des.monster({ class = "B", peaceful = 0 }) +des.monster({ class = "B", peaceful = 0 }) +des.monster({ class = "B", peaceful = 0 }) +des.monster({ class = "B", peaceful = 0 }) +des.monster({ class = "i", peaceful = 0 }) +des.monster({ class = "i", peaceful = 0 }) +des.monster({ class = "i", peaceful = 0 }) +des.monster({ class = "i", peaceful = 0 }) +des.monster({ class = "i", peaceful = 0 }) +des.monster({ class = "i", peaceful = 0 }) +des.monster({ class = "i", peaceful = 0 }) +des.monster("vampire bat") +des.monster("vampire bat") +des.monster("vampire bat") +des.monster("vampire bat") +des.monster("vampire bat") +des.monster("vampire bat") +des.monster("vampire bat") +des.monster({ class = "i", peaceful = 0 }) diff --git a/dat/Wiz-strt.lua b/dat/Wiz-strt.lua new file mode 100644 index 000000000..19478b249 --- /dev/null +++ b/dat/Wiz-strt.lua @@ -0,0 +1,104 @@ +-- NetHack 3.6 Wizard.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1992 by David Cohrs +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The "start" level for the quest. +-- +-- Here you meet your (besieged) class leader, Neferet the Green +-- and receive your quest assignment. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") + +des.map([[ +............................................................................ +.....................C....CC.C........................C..................... +..........CCC.....................CCC....................................... +........CC........-----------.......C.C...C...C....C........................ +.......C.....---------------------...C..C..C..C............................. +......C..C...------....\....------....C.....C............................... +........C...||....|.........|....||......................................... +.......C....||....|.........+....||......................................... +.......C...||---+--.........|....|||........................................ +......C....||...............|--S--||........................................ +...........||--+--|++----|---|..|.SS..........C......C...................... +........C..||.....|..|...|...|--|.||..CC..C.....C..........C................ +.......C...||.....|..|.--|.|.|....||.................C..C................... +.....C......||....|..|.....|.|.--||..C..C..........C...........}}}.......... +......C.C...||....|..-----.|.....||...C.C.C..............C....}}}}}}........ +.........C...------........|------....C..C.....C..CC.C......}}}}}}}}}}}..... +.........CC..---------------------...C.C..C.....CCCCC.C.......}}}}}}}}...... +.........C........-----------..........C.C.......CCC.........}}}}}}}}}...... +..........C.C.........................C............C...........}}}}}........ +......................CCC.C................................................. +]]); + +-- first do cloud everywhere +des.replace_terrain({ region={0,0, 75,19}, fromterrain=".", toterrain="C", chance=10 }) +-- then replace clouds inside the tower back to floor +des.replace_terrain({ region={13,5, 33,15}, fromterrain="C", toterrain=".", chance=100 }) + +-- Dungeon Description +des.region(selection.area(00,00,75,19), "lit") +des.region(selection.area(35,00,49,03), "unlit") +des.region(selection.area(43,12,49,16), "unlit") +des.region({ region={19,11,33,15}, lit=0, type="ordinary", prefilled=0, irregular=1 }) +des.region(selection.area(30,10,31,10), "unlit") +-- Stairs +des.stair("down", 30,10) +-- Portal arrival point +des.terrain({63,06}, ".") +des.levregion({ region = {63,06,63,06}, type="branch" }) +-- Doors +des.door("closed",31,09) +des.door("closed",16,08) +des.door("closed",28,07) +des.door("locked",34,10) +des.door("locked",35,10) +des.door("closed",15,10) +des.door("locked",19,10) +des.door("locked",20,10) +-- Neferet the Green, the quest leader +des.monster("Neferet the Green", 23, 05) +-- The treasure of the quest leader +des.object("chest", 24, 05) +-- apprentice guards for the audience chamber +des.monster("apprentice", 30, 07) +des.monster("apprentice", 24, 06) +des.monster("apprentice", 15, 06) +des.monster("apprentice", 15, 12) +des.monster("apprentice", 26, 11) +des.monster("apprentice", 27, 11) +des.monster("apprentice", 19, 09) +des.monster("apprentice", 20, 09) +-- Eels in the pond +des.monster("giant eel", 62, 14) +des.monster("giant eel", 69, 15) +des.monster("giant eel", 67, 17) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Monsters on siege duty. +des.monster({ class = "B", x=60, y=09, peaceful = 0 }) +des.monster({ class = "W", x=60, y=10, peaceful = 0 }) +des.monster({ class = "B", x=60, y=11, peaceful = 0 }) +des.monster({ class = "B", x=60, y=12, peaceful = 0 }) +des.monster({ class = "i", x=60, y=13, peaceful = 0 }) +des.monster({ class = "B", x=61, y=10, peaceful = 0 }) +des.monster({ class = "B", x=61, y=11, peaceful = 0 }) +des.monster({ class = "B", x=61, y=12, peaceful = 0 }) +des.monster({ class = "B", x=35, y=03, peaceful = 0 }) +des.monster({ class = "i", x=35, y=17, peaceful = 0 }) +des.monster({ class = "B", x=36, y=17, peaceful = 0 }) +des.monster({ class = "B", x=34, y=16, peaceful = 0 }) +des.monster({ class = "i", x=34, y=17, peaceful = 0 }) +des.monster({ class = "W", x=67, y=02, peaceful = 0 }) +des.monster({ class = "B", x=10, y=19, peaceful = 0 }) diff --git a/dat/Wizard.des b/dat/Wizard.des deleted file mode 100644 index f27f47680..000000000 --- a/dat/Wizard.des +++ /dev/null @@ -1,472 +0,0 @@ -# NetHack 3.6 Wizard.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ -# Copyright (c) 1992 by David Cohrs -# NetHack may be freely redistributed. See license for details. -# -# The "start" level for the quest. -# -# Here you meet your (besieged) class leader, Neferet the Green -# and receive your quest assignment. -# -MAZE: "Wiz-strt",' ' -FLAGS: noteleport,hardfloor -GEOMETRY:center,center -MAP -............................................................................ -.....................C....CC.C........................C..................... -..........CCC.....................CCC....................................... -........CC........-----------.......C.C...C...C....C........................ -.......C.....---------------------...C..C..C..C............................. -......C..C...------....\....------....C.....C............................... -........C...||....|.........|....||......................................... -.......C....||....|.........+....||......................................... -.......C...||---+--.........|....|||........................................ -......C....||...............|--S--||........................................ -...........||--+--|++----|---|..|.SS..........C......C...................... -........C..||.....|..|...|...|--|.||..CC..C.....C..........C................ -.......C...||.....|..|.--|.|.|....||.................C..C................... -.....C......||....|..|.....|.|.--||..C..C..........C...........}}}.......... -......C.C...||....|..-----.|.....||...C.C.C..............C....}}}}}}........ -.........C...------........|------....C..C.....C..CC.C......}}}}}}}}}}}..... -.........CC..---------------------...C.C..C.....CCCCC.C.......}}}}}}}}...... -.........C........-----------..........C.C.......CCC.........}}}}}}}}}...... -..........C.C.........................C............C...........}}}}}........ -......................CCC.C................................................. -ENDMAP - -# first do cloud everywhere -REPLACE_TERRAIN:(0,0, 75,19), '.', 'C', 10% -# then replace clouds inside the tower back to floor -REPLACE_TERRAIN:(13,5, 33,15), 'C', '.', 100% - -# Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(35,00,49,03),unlit,"ordinary" -REGION:(43,12,49,16),unlit,"ordinary" -REGION:(19,11,33,15),unlit,"ordinary",unfilled,irregular -REGION:(30,10,31,10),unlit,"ordinary" -# Stairs -STAIR:(30,10),down -# Portal arrival point -TERRAIN:(63,06),'.' -BRANCH:(63,06,63,06),(0,0,0,0) -# Doors -DOOR:closed,(31,09) -DOOR:closed,(16,08) -DOOR:closed,(28,07) -DOOR:locked,(34,10) -DOOR:locked,(35,10) -DOOR:closed,(15,10) -DOOR:locked,(19,10) -DOOR:locked,(20,10) -# Neferet the Green, the quest leader -MONSTER:('@',"Neferet the Green"),(23,05) -# The treasure of the quest leader -OBJECT:('(',"chest"),(24,05) -# apprentice guards for the audience chamber -MONSTER:('@',"apprentice"),(30,07) -MONSTER:('@',"apprentice"),(24,06) -MONSTER:('@',"apprentice"),(15,06) -MONSTER:('@',"apprentice"),(15,12) -MONSTER:('@',"apprentice"),(26,11) -MONSTER:('@',"apprentice"),(27,11) -MONSTER:('@',"apprentice"),(19,09) -MONSTER:('@',"apprentice"),(20,09) -# Eels in the pond -MONSTER:(';',"giant eel"),(62,14) -MONSTER:(';',"giant eel"),(69,15) -MONSTER:(';',"giant eel"),(67,17) -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Monsters on siege duty. -MONSTER: 'B',(60,09),hostile -MONSTER: 'W',(60,10),hostile -MONSTER: 'B',(60,11),hostile -MONSTER: 'B',(60,12),hostile -MONSTER: 'i',(60,13),hostile -MONSTER: 'B',(61,10),hostile -MONSTER: 'B',(61,11),hostile -MONSTER: 'B',(61,12),hostile -MONSTER: 'B',(35,03),hostile -MONSTER: 'i',(35,17),hostile -MONSTER: 'B',(36,17),hostile -MONSTER: 'B',(34,16),hostile -MONSTER: 'i',(34,17),hostile -MONSTER: 'W',(67,02),hostile -MONSTER: 'B',(10,19),hostile - -# -# The "locate" level for the quest. -# -# Here you have to find the Entrance to the Tower of Darkness to go -# further towards your assigned quest. -# - -MAZE: "Wiz-loca",' ' -FLAGS: hardfloor -GEOMETRY:center,center -MAP -............. ....................................................... -.............. .............}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}....... -.............. ..............}.................................}....... -.............. ..............}.-------------------------------.}....... -............... .........C....}.|.............................|.}....... -............... ..........C....}.|.---------------------------.|.}....... -............... .........CCC...}.|.|.........................|.|.}....... -................ ....C....CCC...}.|.|.-----------------------.|.|.}....... -.......C..C..... .....C....CCC...}.|.|.|......+.......+......|.|.|.}....... -.............C..CC.....C....CCC...}.|.|.|......|-------|......|.|.|.}....... -................ ....C....CCC...}.|.|.|......|.......|......|.|.|.}....... -......C..C..... ....C....CCC...}.|.|.|......|-------|......|.|.|.}....... -............C.. ...C....CCC...}.|.|.|......+.......+......|.|.|.}....... -........C...... ....C....CCC...}.|.|.-----------------------.|.|.}....... -....C......C... ........CCC...}.|.|.........................|.|.}....... -......C..C.... .........C....}.|.---------------------------.|.}....... -.............. .........C....}.|.............................|.}....... -............. ..............}.-------------------------------.}....... -............. .............}.................................}....... -............. .............}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}....... -............. ....................................................... -ENDMAP - -REPLACE_TERRAIN:(0,0,30,20), '.', 'C', 15% -REPLACE_TERRAIN:(68,0,75,20), '.', '}', 25% -REPLACE_TERRAIN:(34,1,68,19), '}', '.', 2% - -# Dungeon Description -REGION:(00,00,75,20),lit,"ordinary" -REGION:(37,04,65,16),unlit,"ordinary",filled,irregular { - ROOMDOOR:true,closed,north|south|west|east,random -} -REGION:(39,06,63,14),unlit,"ordinary",filled,irregular { - ROOMDOOR:true,closed,north|south|west|east,random -} - -REGION:(41,08,46,12),lit,"ordinary",filled,irregular { - ROOMDOOR:true,closed,north|south|west,random -} -REGION:(56,08,61,12),lit,"ordinary",filled,irregular { - ROOMDOOR:true,closed,north|south|east,random -} -REGION:(48,08,54,08),unlit,"ordinary" -REGION:(48,12,54,12),unlit,"ordinary" -REGION:(48,10,54,10),unlit,"ordinary",filled,irregular { - ROOMDOOR:true,closed,north|south|west|east,random -} - -# Doors -DOOR:locked,(55,08) -DOOR:locked,(55,12) -DOOR:locked,(47,08) -DOOR:locked,(47,12) -# Stairs -TERRAIN:(03,17),'.' -STAIR:(03,17),up -STAIR:(48,10),down -# Non diggable walls -NON_DIGGABLE:(00,00,75,20) -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:"spiked pit",(24,02) -TRAP:"spiked pit",(07,10) -TRAP:"spiked pit",(23,05) -TRAP:"spiked pit",(26,19) -TRAP:"spiked pit",(72,02) -TRAP:"spiked pit",(72,12) -TRAP:"falling rock",(45,16) -TRAP:"falling rock",(65,13) -TRAP:"falling rock",(55,06) -TRAP:"falling rock",(39,11) -TRAP:"falling rock",(57,09) -TRAP:"magic",random -TRAP:"statue",random -TRAP:"statue",random -TRAP:"polymorph",random -TRAP:"anti magic",(53,10) -TRAP:"sleep gas",random -TRAP:"sleep gas",random -TRAP:"dart",random -TRAP:"dart",random -TRAP:"dart",random -# Random monsters. -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:'i',random,hostile - -# -# The "goal" level for the quest. -# -# Here you meet the Dark One, your nemesis monster. You have to -# defeat the Dark One in combat to gain the artifact you have -# been assigned to retrieve. -# - -MAZE: "Wiz-goal", ' ' -GEOMETRY:center,center -MAP - - - - ------------- ------------- - |...........| |...........| - -------|...........-------------------...........| - |......S...........|..|..|..|..|..|..|...........| - |......|...........|..|..|..|..|..|..|...........| - |......|...........-F+-F+-F+-F+-F+-F+-...........| - --S----|...........S.................+...........| - |......|...........-F+-F+-F+-F+-F+-F+-...........| - |......|...........|..|..|..|..|..|..|...........| - |......|...........|..|..|..|..|..|..|...........| - -------|...........-------------------...........| - |...........| |...........| - ------------- ------------- - - - - -ENDMAP -# Dungeon Description -REGION:(13,10,18,12),unlit,"temple" -REGION:(13,06,18,08),lit,"ordinary" -REGION:(20,04,30,14),unlit,"ordinary" -REGION:(32,06,33,07),unlit,"ordinary" -REGION:(35,06,36,07),unlit,"ordinary" -REGION:(38,06,39,07),unlit,"ordinary" -REGION:(41,06,42,07),unlit,"ordinary" -REGION:(44,06,45,07),unlit,"ordinary" -REGION:(47,06,48,07),unlit,"ordinary" -REGION:(32,09,48,09),unlit,"ordinary" -REGION:(32,11,33,12),unlit,"ordinary" -REGION:(35,11,36,12),unlit,"ordinary" -REGION:(38,11,39,12),unlit,"ordinary" -REGION:(41,11,42,12),unlit,"ordinary" -REGION:(44,11,45,12),unlit,"ordinary" -REGION:(47,11,48,12),unlit,"ordinary" -REGION:(50,04,60,14),lit,"ordinary" -# Doors -DOOR:locked,(19,06) -DOOR:locked,(14,09) -DOOR:locked,(31,09) -DOOR:locked,(33,08) -DOOR:locked,(36,08) -DOOR:locked,(39,08) -DOOR:locked,(42,08) -DOOR:locked,(45,08) -DOOR:locked,(48,08) -DOOR:locked,(33,10) -DOOR:locked,(36,10) -DOOR:locked,(39,10) -DOOR:locked,(42,10) -DOOR:locked,(45,10) -DOOR:locked,(48,10) -DOOR:locked,(49,09) -# Stairs -STAIR:(55,05),up -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# The altar. This is not a shrine. -ALTAR:(16,11),noncoaligned,altar -# Objects -OBJECT:('"',"amulet of ESP"),(16,11),blessed,0,name:"The Eye of the Aethiopica" -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('@',"Dark One"),(16,11) -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'B',random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:'i',random,hostile -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:'i',random,hostile -# Captive Monsters in the dungeon -MONSTER:('@',"rogue"),(35,06),peaceful,"Pug" -MONSTER:('Y',"owlbear"),(47,06),peaceful,asleep -MONSTER:('@',"wizard"),(32,11),peaceful,asleep,"Newt" -MONSTER:('@',"Grey-elf"),(44,11),peaceful -MONSTER:('H',"hill giant"),(47,11),peaceful,asleep -MONSTER:('G',"gnomish wizard"),(38,06),peaceful -MONSTER:('@',"prisoner"),(35,11),peaceful -MONSTER:('@',"prisoner"),(41,11),peaceful,asleep - -# -# The "fill" levels for the quest. -# -# These levels are used to fill out any levels not occupied by specific -# levels as defined above. "filla" is the upper filler, between the -# start and locate levels, and "fillb" the lower between the locate -# and goal levels. -# - -LEVEL: "Wiz-fila" -# -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up - OBJECT: random,random - MONSTER: 'i', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random,random - MONSTER: 'i', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - OBJECT: random,random - MONSTER: ('B', "vampire bat"), random - MONSTER: ('B', "vampire bat"), random -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - OBJECT: random, random - TRAP: random, random - MONSTER: 'i', random, hostile - MONSTER: ('B', "vampire bat"), random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random, random - TRAP: random, random - MONSTER: 'i', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - MONSTER: ('B', "vampire bat"), random -} - -RANDOM_CORRIDORS - -LEVEL: "Wiz-filb" -# -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up - OBJECT: random,random - MONSTER: 'X', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random,random - MONSTER: 'i', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - OBJECT: random,random - MONSTER: 'X', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - OBJECT: random, random - TRAP: random, random - MONSTER: 'i', random, hostile - MONSTER: ('B', "vampire bat"), random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random, random - TRAP: random, random - MONSTER: 'i', random, hostile -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - MONSTER: ('B', "vampire bat"), random -} - -RANDOM_CORRIDORS diff --git a/dat/air.lua b/dat/air.lua new file mode 100644 index 000000000..ba925c86a --- /dev/null +++ b/dat/air.lua @@ -0,0 +1,108 @@ +-- NetHack 3.6 endgame.des $NHDT-Date: 1546303680 2019/01/01 00:48:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.14 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992,1993 by Izchak Miller, David Cohrs, +-- and Timo Hakulinen +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "shortsighted") +-- The following messages are somewhat obtuse, to make then +-- equally meaningful if the player can see or not. +des.message("What a strange feeling!") +des.message("You notice that there is no gravity here.") +-- The player lands, upon arrival, in the +-- lower-left area. The location of the +-- portal to the next level is randomly chosen. +-- This map has no visible outer boundary, and +-- is all "air". +des.map([[ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +]]); +-- Use up and down regions to partition the level into three parts; +-- teleportation can't cross from one part into another. +-- The up region is where you'll arrive after activating the portal from +-- the preceding level; the exit portal is placed inside the down region. +des.teleport_region({ region = {01,00,24,20}, region_islev = 1, exclude = {25,00,79,20}, exclude_islev=1, dir="up" }) +des.teleport_region({ region = {56,00,79,20}, region_islev = 1, exclude = {01,00,55,20}, exclude_islev=1, dir="down" }) + +-- des.portal(levregion(57,01,78,19),(0,0,0,0),"fire") +des.levregion({ region = {57,01,78,19}, region_islev=1, type="portal", name="fire" }); +des.region(selection.area(00,00,75,19),"lit") +des.monster({ id = "air elemental", peaceful = 0 }) +des.monster({ id = "air elemental", peaceful = 0 }) +des.monster({ id = "air elemental", peaceful = 0 }) +des.monster({ id = "air elemental", peaceful = 0 }) +des.monster({ id = "air elemental", peaceful = 0 }) +des.monster({ id = "air elemental", peaceful = 0 }) +des.monster({ id = "air elemental", peaceful = 0 }) +des.monster({ id = "air elemental", peaceful = 0 }) +des.monster({ id = "air elemental", peaceful = 0 }) +des.monster({ id = "air elemental", peaceful = 0 }) +des.monster({ id = "air elemental", peaceful = 0 }) + +des.monster({ id = "floating eye", peaceful = 0 }) +des.monster({ id = "floating eye", peaceful = 0 }) +des.monster({ id = "floating eye", peaceful = 0 }) + +des.monster({ id = "yellow light", peaceful = 0 }) +des.monster({ id = "yellow light", peaceful = 0 }) +des.monster({ id = "yellow light", peaceful = 0 }) + +des.monster("couatl") + +des.monster("D") +des.monster("D") +des.monster("D") +des.monster("D") +des.monster("D") + +des.monster("E") +des.monster("E") +des.monster("E") +des.monster("J") +des.monster("J") + +des.monster({ id = "djinni", peaceful = 0 }) +des.monster({ id = "djinni", peaceful = 0 }) +des.monster({ id = "djinni", peaceful = 0 }) + +des.monster({ id = "fog cloud", peaceful = 0 }) +des.monster({ id = "fog cloud", peaceful = 0 }) +des.monster({ id = "fog cloud", peaceful = 0 }) +des.monster({ id = "fog cloud", peaceful = 0 }) +des.monster({ id = "fog cloud", peaceful = 0 }) +des.monster({ id = "fog cloud", peaceful = 0 }) +des.monster({ id = "fog cloud", peaceful = 0 }) +des.monster({ id = "fog cloud", peaceful = 0 }) +des.monster({ id = "fog cloud", peaceful = 0 }) +des.monster({ id = "energy vortex", peaceful = 0 }) +des.monster({ id = "energy vortex", peaceful = 0 }) +des.monster({ id = "energy vortex", peaceful = 0 }) +des.monster({ id = "energy vortex", peaceful = 0 }) +des.monster({ id = "energy vortex", peaceful = 0 }) +des.monster({ id = "steam vortex", peaceful = 0 }) +des.monster({ id = "steam vortex", peaceful = 0 }) +des.monster({ id = "steam vortex", peaceful = 0 }) +des.monster({ id = "steam vortex", peaceful = 0 }) +des.monster({ id = "steam vortex", peaceful = 0 }) + diff --git a/dat/asmodeus.lua b/dat/asmodeus.lua new file mode 100644 index 000000000..7191f12cd --- /dev/null +++ b/dat/asmodeus.lua @@ -0,0 +1,88 @@ +-- NetHack 3.6 gehennom.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992 by M. Stephenson and Izchak Miller +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style="mazegrid", bg ="-" }); + +des.level_flags("mazelevel", "noteleport") +-- First part +des.map({ halign = "half-left", valign = "center", map = [[ +--------------------- +|.............|.....| +|.............S.....| +|---+------------...| +|.....|.........|-+-- +|..---|.........|.... +|..|..S.........|.... +|..|..|.........|.... +|..|..|.........|-+-- +|..|..-----------...| +|..S..........|.....| +--------------------- +]] }); + +des.levregion({ region={01,00,6,20}, region_islev=1, exclude={6,1,70,16}, exclude_islev=1, type="stair-up" }); +-- des.stair(levregion(01,00,6,20),levregion(6,1,70,16),up) + +des.levregion({ region={01,00,6,20}, region_islev=1, exclude={6,1,70,16}, exclude_islev=1, type="branch" }); +-- des.branch(levregion(01,00,6,20),levregion(6,1,70,16)) +des.teleport_region({ region = {01,00,6,20}, region_islev=1, exclude={6,1,70,16}, exclude_islev=1 }) + +-- Doors +des.door("closed",04,03) +des.door("locked",18,04) +des.door("closed",18,08) +-- +des.stair("down", 13,07) +-- Non diggable walls +des.non_diggable(selection.area(00,00,20,11)) +-- Entire main area +des.region(selection.area(01,01,20,10),"unlit") +-- The fellow in residence +des.monster("Asmodeus",12,07) +-- Some random weapons and armor. +des.object("[") +des.object("[") +des.object(")") +des.object(")") +des.object("*") +des.object("!") +des.object("!") +des.object("?") +des.object("?") +des.object("?") +-- Some traps. +des.trap("spiked pit", 05,02) +des.trap("fire", 08,06) +des.trap("sleep gas") +des.trap("anti magic") +des.trap("fire") +des.trap("magic") +des.trap("magic") +-- Random monsters. +des.monster("ghost",11,07) +des.monster("horned devil",10,05) +des.monster("L") +-- Some Vampires for good measure +des.monster("V") +des.monster("V") +des.monster("V") +-- Second part +des.map({ halign = "half-right", valign = "center", map = [[ +--------------------------------- +................................| +................................+ +................................| +--------------------------------- +]] }); +des.mazewalk(32,02,"east") +-- Non diggable walls +des.non_diggable(selection.area(00,00,32,04)) +des.door("closed",32,02) +des.monster("&") +des.monster("&") +des.monster("&") +des.trap("anti magic") +des.trap("fire") +des.trap("magic") diff --git a/dat/astral.lua b/dat/astral.lua new file mode 100644 index 000000000..546022320 --- /dev/null +++ b/dat/astral.lua @@ -0,0 +1,187 @@ +-- NetHack 3.6 endgame.des $NHDT-Date: 1546303680 2019/01/01 00:48:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.14 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992,1993 by Izchak Miller, David Cohrs, +-- and Timo Hakulinen +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "nommap", "shortsighted", "solidify") +des.message("You arrive on the Astral Plane!") +des.message("Here the High Temple of %d is located.") +des.message("You sense alarm, hostility, and excitement in the air!") +des.map([[ + --------------- + |.............| + |..---------..| + |..|.......|..| +--------------- |..|.......|..| --------------- +|.............| |..|.......|..| |.............| +|..---------..-| |-------| |..|.......|..| |-------| |-..---------..| +|..|.......|...-| |-.......-| |..|.......|..| |-.......-| |-...|.......|..| +|..|.......|....-|-.........-||..----+----..||-.........-|-....|.......|..| +|..|.......+.....+...........||.............||...........+.....+.......|..| +|..|.......|....-|-.........-|--|.........|--|-.........-|-....|.......|..| +|..|.......|...-| |-.......-| -|---+---|- |-.......-| |-...|.......|..| +|..---------..-| |---+---| |-.......-| |---+---| |-..---------..| +|.............| |...|-----|-.........-|-----|...| |.............| +--------------- |.........|...........|.........| --------------- + -------...|-.........-|...------- + |....|-.......-|....| + ---...|---+---|...--- + |...............| + ----------------- +]]); + +-- chance to alter above map and turn the wings of the bottom-center into +-- a pair of big (5x15) rooms +for i=1,2 do + -- 3.6.[01]: 75% chance that both sides opened up, 25% that neither did; + -- 3.6.2: 60% twice == 36% chance that both sides open up, 24% left side + -- only, 24% right side only, 16% that neither side opens up + local hall = selection.new() + if math.random(0, 99) < 60 then + if i == 1 then + des.terrain(selection.area(17,14, 30,18),".") + des.wallify() + -- temporarily close off the area to be filled so that it doesn't cover + -- the entire entry area + des.terrain(33,18, "|") + hall:floodfill(30,16) + -- re-connect the opened wing with the rest of the map + des.terrain(33,18, ".") + else + des.terrain(selection.area(44,14, 57,18),".") + des.wallify() + des.terrain(41,18, "|") + hall:floodfill(44,16) + des.terrain(41,18, ".") + end + -- extra monsters; was [6 + 3d4] when both wings were opened up at once + for i=1,3 + math.random(2 - 1,2*3) do + des.monster({ id="Angel", coord = { hall:rndcoord(1) }, align="noalign", peaceful=0 }) + if math.random(0,99) < 50 then + des.monster({ coord = { hall:rndcoord(1) }, peaceful=0 }) + end + end + end +end + +-- Rider locations +local place = selection.new(); +place:set(23,9); +place:set(37,14); +place:set(51,9); + +-- Where the player will land on arrival +des.teleport_region({ region = {29,15,45,15}, exclude = {30,15,44,15} }) +-- Lit courts +des.region({ region={01,05,16,14},lit=1,type="ordinary",prefilled=1,irregular=1 }) +des.region({ region={31,01,44,10},lit=1,type="ordinary",prefilled=1,irregular=1 }) +des.region({ region={61,05,74,14},lit=1,type="ordinary",prefilled=1,irregular=1 }) +-- A Sanctum for each alignment +-- The shrines' alignments are shuffled for +-- each game +des.region({ region={04,07,10,11},lit=1,type="temple" }) +des.region({ region={34,03,40,07},lit=1,type="temple" }) +des.region({ region={64,07,70,11},lit=1,type="temple" }) + +des.altar({ x=07, y=09, align=align[1],type="sanctum" }) +des.altar({ x=37, y=05, align=align[2],type="sanctum" }) +des.altar({ x=67, y=09, align=align[3],type="sanctum" }) +-- Doors +des.door("closed",11,09) +des.door("closed",17,09) +des.door("locked",23,12) +des.door("locked",37,08) +des.door("closed",37,11) +des.door("closed",37,17) +des.door("locked",51,12) +des.door("locked",57,09) +des.door("closed",63,09) +-- Non diggable and phazeable everywhere +des.non_diggable(selection.area(00,00,74,19)) +des.non_passwall(selection.area(00,00,74,19)) +-- Moloch's horde +-- West round room +des.monster({ id = "aligned priest",x=18,y=09,align="noalign", peaceful=0 }) +des.monster({ id = "aligned priest",x=19,y=08,align="noalign", peaceful=0 }) +des.monster({ id = "aligned priest",x=19,y=09,align="noalign", peaceful=0 }) +des.monster({ id = "aligned priest",x=19,y=10,align="noalign", peaceful=0 }) +des.monster({ id = "Angel",x=20,y=09,align="noalign", peaceful=0 }) +des.monster({ id = "Angel",x=20,y=10,align="noalign", peaceful=0 }) +des.monster({ id = "Pestilence", coord = { place:rndcoord(1) }, peaceful=0 }) +-- South-central round room +des.monster({ id = "aligned priest",x=36,y=12,align="noalign", peaceful=0 }) +des.monster({ id = "aligned priest",x=37,y=12,align="noalign", peaceful=0 }) +des.monster({ id = "aligned priest",x=38,y=12,align="noalign", peaceful=0 }) +des.monster({ id = "aligned priest",x=36,y=13,align="noalign", peaceful=0 }) +des.monster({ id = "Angel",x=38,y=13,align="noalign", peaceful=0 }) +des.monster({ id = "Angel",x=37,y=13,align="noalign", peaceful=0 }) +des.monster({ id = "Death", coord = { place:rndcoord(1) }, peaceful=0 }) +-- East round room +des.monster({ id = "aligned priest",x=56,y=09,align="noalign", peaceful=0 }) +des.monster({ id = "aligned priest",x=55,y=08,align="noalign", peaceful=0 }) +des.monster({ id = "aligned priest",x=55,y=09,align="noalign", peaceful=0 }) +des.monster({ id = "aligned priest",x=55,y=10,align="noalign", peaceful=0 }) +des.monster({ id = "Angel",x=54,y=09,align="noalign", peaceful=0 }) +des.monster({ id = "Angel",x=54,y=10,align="noalign", peaceful=0 }) +des.monster({ id = "Famine", coord = { place:rndcoord(1) }, peaceful=0 }) +-- +-- The aligned horde +-- +-- We do not know in advance the alignment of the +-- player. The mpeaceful bit will need resetting +-- when the level is created. The setting here is +-- but a place holder. +-- +-- West court +des.monster({ id = "aligned priest",x=12,y=07,align="chaos", peaceful=0 }) +des.monster({ id = "aligned priest",x=13,y=07,align="chaos",peaceful=1 }) +des.monster({ id = "aligned priest",x=14,y=07,align="law", peaceful=0 }) +des.monster({ id = "aligned priest",x=12,y=11,align="law",peaceful=1 }) +des.monster({ id = "aligned priest",x=13,y=11,align="neutral", peaceful=0 }) +des.monster({ id = "aligned priest",x=14,y=11,align="neutral",peaceful=1 }) +des.monster({ id = "Angel",x=11,y=05,align="chaos", peaceful=0 }) +des.monster({ id = "Angel",x=12,y=05,align="chaos",peaceful=1 }) +des.monster({ id = "Angel",x=13,y=05,align="law", peaceful=0 }) +des.monster({ id = "Angel",x=11,y=13,align="law",peaceful=1 }) +des.monster({ id = "Angel",x=12,y=13,align="neutral", peaceful=0 }) +des.monster({ id = "Angel",x=13,y=13,align="neutral",peaceful=1 }) +-- Central court +des.monster({ id = "aligned priest",x=32,y=09,align="chaos", peaceful=0 }) +des.monster({ id = "aligned priest",x=33,y=09,align="chaos",peaceful=1 }) +des.monster({ id = "aligned priest",x=34,y=09,align="law", peaceful=0 }) +des.monster({ id = "aligned priest",x=40,y=09,align="law",peaceful=1 }) +des.monster({ id = "aligned priest",x=41,y=09,align="neutral", peaceful=0 }) +des.monster({ id = "aligned priest",x=42,y=09,align="neutral",peaceful=1 }) +des.monster({ id = "Angel",x=31,y=08,align="chaos", peaceful=0 }) +des.monster({ id = "Angel",x=32,y=08,align="chaos",peaceful=1 }) +des.monster({ id = "Angel",x=31,y=09,align="law", peaceful=0 }) +des.monster({ id = "Angel",x=42,y=08,align="law",peaceful=1 }) +des.monster({ id = "Angel",x=43,y=08,align="neutral", peaceful=0 }) +des.monster({ id = "Angel",x=43,y=09,align="neutral",peaceful=1 }) +-- East court +des.monster({ id = "aligned priest",x=60,y=07,align="chaos", peaceful=0 }) +des.monster({ id = "aligned priest",x=61,y=07,align="chaos",peaceful=1 }) +des.monster({ id = "aligned priest",x=62,y=07,align="law", peaceful=0 }) +des.monster({ id = "aligned priest",x=60,y=11,align="law",peaceful=1 }) +des.monster({ id = "aligned priest",x=61,y=11,align="neutral", peaceful=0 }) +des.monster({ id = "aligned priest",x=62,y=11,align="neutral",peaceful=1 }) +des.monster({ id = "Angel",x=61,y=05,align="chaos", peaceful=0 }) +des.monster({ id = "Angel",x=62,y=05,align="chaos",peaceful=1 }) +des.monster({ id = "Angel",x=63,y=05,align="law", peaceful=0 }) +des.monster({ id = "Angel",x=61,y=13,align="law",peaceful=1 }) +des.monster({ id = "Angel",x=62,y=13,align="neutral", peaceful=0 }) +des.monster({ id = "Angel",x=63,y=13,align="neutral",peaceful=1 }) +-- +-- Assorted nasties +des.monster({ class = "L", peaceful=0 }) +des.monster({ class = "L", peaceful=0 }) +des.monster({ class = "L", peaceful=0 }) +des.monster({ class = "V", peaceful=0 }) +des.monster({ class = "V", peaceful=0 }) +des.monster({ class = "V", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) +des.monster({ class = "D", peaceful=0 }) diff --git a/dat/baalz.lua b/dat/baalz.lua new file mode 100644 index 000000000..04d6a4634 --- /dev/null +++ b/dat/baalz.lua @@ -0,0 +1,72 @@ +-- NetHack 3.6 gehennom.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992 by M. Stephenson and Izchak Miller +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +-- TODO FIXME: see baalz_fixup - the legs get removed currently. + +des.level_flags("mazelevel", "noteleport", "corrmaze") +-- the two pools are fakes used to mark spots which need special wall fixups +-- the two iron bars are eyes and spots to their left will be made diggable +des.map({ halign = "right", valign = "center", map = [[ +------------------------------------------------- +| ---- ---- +| ---- | ----------- | +| ------ | ---------|.........|--P +| F....| -------|...........-------------- +---....|--|..................S............|---- ++...--....S..----------------|............S...| +---....|--|..................|............|---- +| F....| -------|...........-----S-------- +| ------ | ---------|.........|--P +| ---- | ----------- | +| ---- ---- +------------------------------------------------- +]] }); +des.levregion({ region = {01,00,15,20}, region_islev=1, exclude={15,1,70,16}, exclude_islev=1, type="stair-up" }) +des.levregion({ region = {01,00,15,20}, region_islev=1, exclude={15,1,70,16}, exclude_islev=1, type="branch" }) +des.teleport_region({region = {01,00,15,20}, region_islev=1, exclude = {15,1,70,16}, exclude_islev=1 }) +-- this actually leaves the farthest right column diggable +des.non_diggable(selection.area(00,00,47,12)) +des.mazewalk(00,06,"west") +des.stair("down", 44,06) +des.door("locked",00,06) +if math.random(0, 99) < 50 then + des.terrain(34,08,'-') + des.terrain(34,04,'S') + des.terrain(29,05,'|') + des.terrain(29,07,'S') +end +-- The fellow in residence +des.monster("Baalzebub",35,06) +-- Some random weapons and armor. +des.object("[") +des.object("[") +des.object(")") +des.object(")") +des.object("*") +des.object("!") +des.object("!") +des.object("?") +des.object("?") +des.object("?") +-- Some traps. +des.trap("spiked pit") +des.trap("fire") +des.trap("sleep gas") +des.trap("anti magic") +des.trap("fire") +des.trap("magic") +des.trap("magic") +-- Random monsters. +des.monster("ghost",37,07) +des.monster("horned devil",32,05) +des.monster("barbed devil",38,07) +des.monster("L") +-- Some Vampires for good measure +des.monster("V") +des.monster("V") +des.monster("V") + diff --git a/dat/bigrm-1.lua b/dat/bigrm-1.lua new file mode 100644 index 000000000..a644b129e --- /dev/null +++ b/dat/bigrm-1.lua @@ -0,0 +1,72 @@ + +des.level_init({ style = "solidfill", fg = " " }); +des.level_flags("mazelevel"); + +des.map([[ +--------------------------------------------------------------------------- +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +--------------------------------------------------------------------------- +]]); + + +if math.random(0,99) < 75 then + local terrains = { "-", "F", "L", "T", "C" }; + local tidx = math.random(1, #terrains); + local choice = math.random(0, 4); + if choice == 0 then + des.terrain(selection.line(10,8, 65,8), terrains[tidx]); + elseif choice == 1 then + local sel = selection.new(); + sel:line(15,4, 15, 13); + sel:line(59,4, 59, 13); + des.terrain(sel, terrains[tidx]); + elseif choice == 2 then + local sel = selection.new(); + sel:line(10,8, 38, 8); + sel:line(37,8, 65, 8); + sel:line(37,3, 37, 8); + sel:line(37,8, 37,14); + des.terrain(sel, terrains[tidx]); + elseif choice == 3 then + des.terrain(selection.rect(4,4, 70,13), terrains[tidx]); + local sel = selection.new(); + sel:line(25,4, 50,4); + sel:line(25,13, 50,13); + des.terrain(sel, '.'); + else + end +end + +des.region(selection.area(01,01, 73, 16), "lit"); + +des.stair("up"); +des.stair("down"); + +des.non_diggable(); + +for i = 1,15 do + des.object(); +end + +for i = 1,6 do + des.trap(); +end + +for i = 1,28 do + des.monster(); +end diff --git a/dat/bigrm-10.lua b/dat/bigrm-10.lua new file mode 100644 index 000000000..693697137 --- /dev/null +++ b/dat/bigrm-10.lua @@ -0,0 +1,58 @@ + + +des.level_init({ style = "solidfill", fg = " " }); +des.level_flags("mazelevel"); + +des.map([[ +....................................................................... +....................................................................... +....................................................................... +....................................................................... +...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... +...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... +...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... +...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... +...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... +...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... +...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... +...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... +...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... +...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... +...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... +....................................................................... +....................................................................... +....................................................................... +....................................................................... +]]); + +if math.random(0,99) < 40 then + -- occasionally it's not a fog maze + local terrain = { "L", "}", "T", "-", "F" }; + local tidx = math.random(1, #terrain); + -- break it up a bit + des.replace_terrain({ region={0, 0, 70, 18}, fromterrain="C", toterrain=".", chance=5 }); + des.replace_terrain({ region={0, 0, 70, 18}, fromterrain="C", toterrain=terrain[tidx] }); +end; + +des.region(selection.area(00,00,70,18), "lit"); + +-- when falling down on this level, never end up in the fog maze +des.teleport_region({ region = {00,00,70,18}, exclude = {02,03,68,15}, dir = "down" }); + +for i = 1,15 do + des.object(); +end + +for i = 1,6 do + des.trap(); +end + +for i = 1,28 do + des.monster(); +end + +des.mazewalk({ x=4, y=2, dir="south", stocked=0 }); + +-- Stairs up, not in the fog maze +des.levregion({ region = {00,00,70,18}, exclude = {02,03,68,15}, type="stair-up"}); +des.stair("down"); diff --git a/dat/bigrm-2.lua b/dat/bigrm-2.lua new file mode 100644 index 000000000..5d7b3f987 --- /dev/null +++ b/dat/bigrm-2.lua @@ -0,0 +1,57 @@ + +des.level_init({ style = "solidfill", fg = " " }); +des.level_flags("mazelevel"); + +des.map([[ +--------------------------------------------------------------------------- +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +--------------------------------------------------------------------------- +]]); +-- Dungeon Description +des.region(selection.area(01,01,73,16),"lit"); + +local choice = math.random(0, 3) +if choice == 0 then + des.region(selection.area(01,07,22,09),"unlit"); + des.region(selection.area(24,01,50,05),"unlit"); + des.region(selection.area(24,11,50,16),"unlit"); + des.region(selection.area(52,07,73,09),"unlit"); +elseif choice == 1 then + des.region(selection.area(24,01,50,16),"unlit"); +elseif choice == 2 then + des.region(selection.area(01,01,22,16),"unlit"); + des.region(selection.area(52,01,73,16),"unlit"); +end + +-- Stairs +des.stair("up"); +des.stair("down"); +-- Non diggable walls +des.non_diggable(); +-- Objects +for i = 1,15 do + des.object(); +end +-- Random traps +for i = 1,6 do + des.trap(); +end +-- Random monsters. +for i = 1,28 do + des.monster(); +end diff --git a/dat/bigrm-3.lua b/dat/bigrm-3.lua new file mode 100644 index 000000000..2f36fc533 --- /dev/null +++ b/dat/bigrm-3.lua @@ -0,0 +1,71 @@ + +des.level_init({ style = "solidfill", fg = " " }); +des.level_flags("mazelevel"); + +des.map([[ +--------------------------------------------------------------------------- +|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|..............---.......................................---..............| +|...............|.........................................|...............| +|.....|.|.|.|.|---|.|.|.|.|...................|.|.|.|.|.|---|.|.|.|.|.....| +|.....|-------- --------|...................|---------- --------|.....| +|.....|.|.|.|.|---|.|.|.|.|...................|.|.|.|.|.|---|.|.|.|.|.....| +|...............|.........................................|...............| +|..............---.......................................---..............| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.........................................................................| +|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.| +--------------------------------------------------------------------------- +]]); + +-- Dungeon Description +des.region(selection.area(01,01,73,16), "lit"); + +-- Stairs +des.stair("up"); +des.stair("down"); + +-- Non diggable walls +des.non_diggable(); + +for i = 1,15 do + des.object(); +end + +for i = 1,6 do + des.trap(); +end + +des.monster({ x = 01, y = 01 }); +des.monster({ x = 13, y = 01 }); +des.monster({ x = 25, y = 01 }); +des.monster({ x = 37, y = 01 }); +des.monster({ x = 49, y = 01 }); +des.monster({ x = 61, y = 01 }); +des.monster({ x = 73, y = 01 }); +des.monster({ x = 07, y = 07 }); +des.monster({ x = 13, y = 07 }); +des.monster({ x = 25, y = 07 }); +des.monster({ x = 37, y = 07 }); +des.monster({ x = 49, y = 07 }); +des.monster({ x = 61, y = 07 }); +des.monster({ x = 67, y = 07 }); +des.monster({ x = 07, y = 09 }); +des.monster({ x = 13, y = 09 }); +des.monster({ x = 25, y = 09 }); +des.monster({ x = 37, y = 09 }); +des.monster({ x = 49, y = 09 }); +des.monster({ x = 61, y = 09 }); +des.monster({ x = 67, y = 09 }); +des.monster({ x = 01, y = 16 }); +des.monster({ x = 13, y = 16 }); +des.monster({ x = 25, y = 16 }); +des.monster({ x = 37, y = 16 }); +des.monster({ x = 49, y = 16 }); +des.monster({ x = 61, y = 16 }); +des.monster({ x = 73, y = 16 }); diff --git a/dat/bigrm-4.lua b/dat/bigrm-4.lua new file mode 100644 index 000000000..d86f46b48 --- /dev/null +++ b/dat/bigrm-4.lua @@ -0,0 +1,43 @@ + +des.level_init({ style = "solidfill", fg = " " }); +des.level_flags("mazelevel"); + +des.map([[ +----------- ----------- +|.........| |.........| +|.........|-----------| |-----------|.........| +|-|...................|----------| |----------|...................|-| + -|.............................|-------|.............................|- + -|.................................................................|- + -|...............................................................|- + -|.............................................................|- + -|...........................................................|- + -|...........................................................|- + -|.............................................................|- + -|...............................................................|- + -|.................................................................|- + -|.............................|-------|.............................|- +|-|...................|----------| |----------|...................|-| +|.........|-----------| |-----------|.........| +|.........| |.........| +----------- ----------- +]]); + +des.region(selection.area(01,01,73,16), "lit"); + +des.stair("up"); +des.stair("down"); + +des.non_diggable(); + +for i = 1,15 do + des.object(); +end + +for i = 1,6 do + des.trap(); +end + +for i = 1,28 do + des.monster(); +end diff --git a/dat/bigrm-5.lua b/dat/bigrm-5.lua new file mode 100644 index 000000000..c85f55e12 --- /dev/null +++ b/dat/bigrm-5.lua @@ -0,0 +1,44 @@ + +des.level_init({ style = "solidfill", fg = " " }); +des.level_flags("mazelevel"); + +des.map([[ + ------------------ + ---------................--------- + -------................................------- + ------............................................------ + ----......................................................---- + ---............................................................--- + ---................................................................--- +---....................................................................--- +|........................................................................| +|........................................................................| +|........................................................................| +---....................................................................--- + ---................................................................--- + ---............................................................--- + ----......................................................---- + ------............................................------ + -------................................------- + ---------................--------- + ------------------ +]]); + +des.region(selection.area(00,00,72,18), "lit"); + +des.stair("up"); +des.stair("down"); + +des.non_diggable(); + +for i = 1,15 do + des.object(); +end + +for i = 1,6 do + des.trap(); +end + +for i = 1,28 do + des.monster(); +end diff --git a/dat/bigrm-6.lua b/dat/bigrm-6.lua new file mode 100644 index 000000000..6138be67e --- /dev/null +++ b/dat/bigrm-6.lua @@ -0,0 +1,45 @@ + + +des.level_init({ style = "solidfill", fg = " " }); +des.level_flags("mazelevel"); + +des.map([[ + --------- --------- --------- --------- + ---.......--- ---.......--- ---.......--- ---.......--- + --...........-- --...........-- --...........-- --...........-- + --.............-- --.............-- --.............-- --.............-- + -...............- -...............- -...............- -...............- +|-...............---...............---...............---...............-- +|.................-.................-.................-.................| +|........T.................T.................T.................T........| +|.......................................................................| +|......T.{.....................................................{.T......| +|.......................................................................| +|........T.................T.................T.................T........| +|.................-.................-.................-.................| +--...............---...............---...............---...............-- + -...............- -...............- -...............- -...............- + --.............-- --.............-- --.............-- --.............-- + --...........-- --...........-- --...........-- --...........-- + ---.......--- ---.......--- ---.......--- ---.......--- + --------- --------- --------- --------- +]]); + +des.region(selection.area(01,01,72,17), "lit"); + +des.stair("up"); +des.stair("down"); + +des.non_diggable(); + +for i = 1,15 do + des.object(); +end + +for i = 1,6 do + des.trap(); +end + +for i = 1,28 do + des.monster(); +end diff --git a/dat/bigrm-7.lua b/dat/bigrm-7.lua new file mode 100644 index 000000000..e8fccc8cf --- /dev/null +++ b/dat/bigrm-7.lua @@ -0,0 +1,48 @@ + +des.level_init({ style = "solidfill", fg = " " }); +des.level_flags("mazelevel"); + +des.map([[ + ----- + ---------...--- + ---------.........L...--- + ---------.......................--- + ---------.................................--- + ---------...........................................--- + ---------.....................................................--- +|--------...............................................................--| +|.........................................................................| +|.L.....................................................................L.| +|.........................................................................| +|--...............................................................--------| + ---.....................................................--------- + ---...........................................--------- + ---.................................--------- + ---.......................--------- + ---...L.........--------- + ---...--------- + ----- +]]); + +local terrain = { "L", "T", "{", "." }; +local tidx = math.random(1, #terrain); +des.replace_terrain({ region={00,00, 74,18}, fromterrain="L", toterrain=terrain[tidx] }); + +des.region(selection.area(01,01,73,17), "lit"); + +des.stair("up"); +des.stair("down"); + +des.non_diggable(); + +for i = 1,15 do + des.object(); +end + +for i = 1,6 do + des.trap(); +end + +for i = 1,28 do + des.monster(); +end diff --git a/dat/bigrm-8.lua b/dat/bigrm-8.lua new file mode 100644 index 000000000..2851b780d --- /dev/null +++ b/dat/bigrm-8.lua @@ -0,0 +1,50 @@ + + +des.level_init({ style = "solidfill", fg = " " }); +des.level_flags("mazelevel"); + +des.map([[ +---------------------------------------------- +|............................................--- +--.............................................--- + ---......................................FF.....--- + ---...................................FF........--- + ---................................FF...........--- + ---.............................FF..............--- + ---..........................FF.................--- + ---.......................FF....................--- + ---....................FF.......................--- + ---.................FF..........................--- + ---..............FF.............................--- + ---...........FF................................---- + ---........FF...................................--- + ---.....FF......................................--- + ---.............................................-- + ---............................................| + ---------------------------------------------- +]]); + +if math.random(0,99) < 40 then + local terrain = { "L", "}", "T", ".", "-", "C" }; + local tidx = math.random(1, #terrain); + des.replace_terrain({ region={00,00, 74,17}, fromterrain="F", toterrain=terrain[tidx] }); +end; + +des.region(selection.area(01,01,73,16), "lit"); + +des.stair("up"); +des.stair("down"); + +des.non_diggable(); + +for i = 1,15 do + des.object(); +end + +for i = 1,6 do + des.trap(); +end + +for i = 1,28 do + des.monster(); +end diff --git a/dat/bigrm-9.lua b/dat/bigrm-9.lua new file mode 100644 index 000000000..a1fdcd05f --- /dev/null +++ b/dat/bigrm-9.lua @@ -0,0 +1,48 @@ + +des.level_init({ style = "solidfill", fg = " " }); +des.level_flags("mazelevel"); + +des.map([[ +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}................}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}................................}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}............................................}}}}}}}}}}}}}}} +}}}}}}}}}}......................................................}}}}}}}}}} +}}}}}}}............................................................}}}}}}} +}}}}}.......................LLLLLLLLLLLLLLLLLL.......................}}}}} +}}}....................LLLLLLLLLLLLLLLLLLLLLLLLLLL.....................}}} +}....................LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................} +}....................LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................} +}....................LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................} +}}}....................LLLLLLLLLLLLLLLLLLLLLLLLLLL.....................}}} +}}}}}.......................LLLLLLLLLLLLLLLLLL.......................}}}}} +}}}}}}}............................................................}}}}}}} +}}}}}}}}}}......................................................}}}}}}}}}} +}}}}}}}}}}}}}}}............................................}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}................................}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}................}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +]]); + +-- Unlit, except 3 mapgrids around the "pupil" +des.region(selection.area(00,00,73,18),"unlit"); +des.region(selection.area(26,04,47,14),"lit"); +des.region(selection.area(21,05,51,13),"lit"); +des.region(selection.area(19,06,54,12),"lit"); + +des.stair("up"); +des.stair("down"); + +des.non_diggable(); + +for i = 1,15 do + des.object(); +end + +for i = 1,6 do + des.trap(); +end + +for i = 1,28 do + des.monster(); +end diff --git a/dat/bigroom.des b/dat/bigroom.des deleted file mode 100644 index dcec9854b..000000000 --- a/dat/bigroom.des +++ /dev/null @@ -1,723 +0,0 @@ -# NetHack 3.6 bigroom.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1990 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# -# These are the bigroom levels: -# - -MAZE:"bigrm-1",' ' -GEOMETRY:center,center -MAP ---------------------------------------------------------------------------- -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| ---------------------------------------------------------------------------- -ENDMAP - -$terrains = TERRAIN:{'-', 'F', 'L', 'T', 'C'} -SHUFFLE:$terrains - -[50%]: SWITCH [ 4 ] { - CASE 0: - TERRAIN:line (10,8),(65, 8), $terrains[0] - BREAK - CASE 1: - TERRAIN:line (15,4),(15, 13), $terrains[0] - TERRAIN:line (59,4),(59, 13), $terrains[0] - BREAK - CASE 2: - TERRAIN:line (10,8),(38, 8), $terrains[0] - TERRAIN:line (37,8),(65, 8), $terrains[0] - TERRAIN:line (37,3),(37, 8), $terrains[0] - TERRAIN:line (37,8),(37,14), $terrains[0] - BREAK - CASE 3: - TERRAIN:rect (4,4,70,13), $terrains[0] - TERRAIN:line (25, 4),(50, 4), '.' - TERRAIN:line (25,13),(50,13), '.' - BREAK - DEFAULT: -} - -# Dungeon Description -REGION:(01,01,73,16),lit,"ordinary" -# Stairs -STAIR:random,up -STAIR:random,down -# Non diggable walls -NON_DIGGABLE:(00,00,74,17) -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random - -# Here, just play with the lighting... - -MAZE:"bigrm-2",' ' -GEOMETRY:center,center -MAP ---------------------------------------------------------------------------- -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| ---------------------------------------------------------------------------- -ENDMAP -# Dungeon Description -REGION:(01,01,73,16),lit,"ordinary" -SWITCH [ 3 ] { - CASE 0: - REGION:(01,07,22,09),unlit,"ordinary" - REGION:(24,01,50,05),unlit,"ordinary" - REGION:(24,11,50,16),unlit,"ordinary" - REGION:(52,07,73,09),unlit,"ordinary" - BREAK - CASE 1: - REGION:(24,01,50,16),unlit,"ordinary" - BREAK - CASE 2: - REGION:(01,01,22,16),unlit,"ordinary" - REGION:(52,01,73,16),unlit,"ordinary" - BREAK -} -# Stairs -STAIR:random,up -STAIR:random,down -# Non diggable walls -NON_DIGGABLE:(00,00,74,17) -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random - -# Now, let's get fancy... - -MAZE:"bigrm-3",' ' -GEOMETRY:center,center -MAP ---------------------------------------------------------------------------- -|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|..............---.......................................---..............| -|...............|.........................................|...............| -|.....|.|.|.|.|---|.|.|.|.|...................|.|.|.|.|.|---|.|.|.|.|.....| -|.....|-------- --------|...................|---------- --------|.....| -|.....|.|.|.|.|---|.|.|.|.|...................|.|.|.|.|.|---|.|.|.|.|.....| -|...............|.........................................|...............| -|..............---.......................................---..............| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.........................................................................| -|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.| ---------------------------------------------------------------------------- -ENDMAP -# Dungeon Description -REGION:(01,01,73,16),lit,"ordinary" -# Stairs -STAIR:random,up -STAIR:random,down -# Non diggable walls -NON_DIGGABLE:(00,00,74,17) -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:random,(01,01) -MONSTER:random,(13,01) -MONSTER:random,(25,01) -MONSTER:random,(37,01) -MONSTER:random,(49,01) -MONSTER:random,(61,01) -MONSTER:random,(73,01) -MONSTER:random,(07,07) -MONSTER:random,(13,07) -MONSTER:random,(25,07) -MONSTER:random,(37,07) -MONSTER:random,(49,07) -MONSTER:random,(61,07) -MONSTER:random,(67,07) -MONSTER:random,(07,09) -MONSTER:random,(13,09) -MONSTER:random,(25,09) -MONSTER:random,(37,09) -MONSTER:random,(49,09) -MONSTER:random,(61,09) -MONSTER:random,(67,09) -MONSTER:random,(01,16) -MONSTER:random,(13,16) -MONSTER:random,(25,16) -MONSTER:random,(37,16) -MONSTER:random,(49,16) -MONSTER:random,(61,16) -MONSTER:random,(73,16) -MAZE:"bigrm-4",' ' -GEOMETRY:center,center -MAP ------------ ----------- -|.........| |.........| -|.........|-----------| |-----------|.........| -|-|...................|----------| |----------|...................|-| - -|.............................|-------|.............................|- - -|.................................................................|- - -|...............................................................|- - -|.............................................................|- - -|...........................................................|- - -|...........................................................|- - -|.............................................................|- - -|...............................................................|- - -|.................................................................|- - -|.............................|-------|.............................|- -|-|...................|----------| |----------|...................|-| -|.........|-----------| |-----------|.........| -|.........| |.........| ------------ ----------- -ENDMAP -# Dungeon Description -REGION:(01,01,73,16),lit,"ordinary" -# Stairs -STAIR:random,up -STAIR:random,down -# Non diggable walls -NON_DIGGABLE:(00,00,74,17) -# Fountains -FOUNTAIN:(05,02) -FOUNTAIN:(05,15) -FOUNTAIN:(69,02) -FOUNTAIN:(69,15) -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random - -# Try an oval room... - -MAZE:"bigrm-5",' ' -GEOMETRY:center,center -MAP - ------------------ - ---------................--------- - -------................................------- - ------............................................------ - ----......................................................---- - ---............................................................--- - ---................................................................--- ----....................................................................--- -|........................................................................| -|........................................................................| -|........................................................................| ----....................................................................--- - ---................................................................--- - ---............................................................--- - ----......................................................---- - ------............................................------ - -------................................------- - ---------................--------- - ------------------ -ENDMAP -# Dungeon Description -REGION:(00,00,72,18),lit,"ordinary" -# Stairs -STAIR:random,up -STAIR:random,down -# Non diggable walls -NON_DIGGABLE:(00,00,72,18) -# Objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random - - -# The Four Circles - -LEVEL:"bigrm-6" -FLAGS:mazelevel -INIT_MAP:solidfill,' ' -GEOMETRY:center,center -MAP - --------- --------- --------- --------- - ---.......--- ---.......--- ---.......--- ---.......--- - --...........-- --...........-- --...........-- --...........-- - --.............-- --.............-- --.............-- --.............-- - -...............- -...............- -...............- -...............- -|-...............---...............---...............---...............-- -|.................-.................-.................-.................| -|........T.................T.................T.................T........| -|.......................................................................| -|......T.{.....................................................{.T......| -|.......................................................................| -|........T.................T.................T.................T........| -|.................-.................-.................-.................| ---...............---...............---...............---...............-- - -...............- -...............- -...............- -...............- - --.............-- --.............-- --.............-- --.............-- - --...........-- --...........-- --...........-- --...........-- - ---.......--- ---.......--- ---.......--- ---.......--- - --------- --------- --------- --------- -ENDMAP -REGION:(01,01,72,17),lit,"ordinary" - -STAIR:random,up -STAIR:random,down - -NON_DIGGABLE:(00,00,72,18) - -LOOP [15] { - OBJECT:random,random -} -LOOP [6] { - TRAP:random,random -} -LOOP [28] { - MONSTER:random,random -} - - - -# Let's tilt it a bit - -LEVEL:"bigrm-7" -FLAGS:mazelevel -INIT_MAP:solidfill,' ' -GEOMETRY:center,center -MAP - ----- - ---------...--- - ---------.........L...--- - ---------.......................--- - ---------.................................--- - ---------...........................................--- - ---------.....................................................--- -|--------...............................................................--| -|.........................................................................| -|.L.....................................................................L.| -|.........................................................................| -|--...............................................................--------| - ---.....................................................--------- - ---...........................................--------- - ---.................................--------- - ---.......................--------- - ---...L.........--------- - ---...--------- - ----- -ENDMAP - -$terrain = terrain:{ 'L', 'T', '{', '.' } -SHUFFLE:$terrain -REPLACE_TERRAIN:(00,00,74,18),'L',$terrain[0],100% - -REGION:(01,01,73,17),lit,"ordinary" - -STAIR:random,up -STAIR:random,down - -NON_DIGGABLE:(00,00,74,18) - -LOOP [15] { - OBJECT:random,random -} -LOOP [6] { - TRAP:random,random -} -LOOP [28] { - MONSTER:random,random -} - - -# Slanted - -LEVEL:"bigrm-8" -FLAGS:mazelevel -INIT_MAP:solidfill,' ' -GEOMETRY:center,center -MAP ----------------------------------------------- -|............................................--- ---.............................................--- - ---......................................FF.....--- - ---...................................FF........--- - ---................................FF...........--- - ---.............................FF..............--- - ---..........................FF.................--- - ---.......................FF....................--- - ---....................FF.......................--- - ---.................FF..........................--- - ---..............FF.............................--- - ---...........FF................................---- - ---........FF...................................--- - ---.....FF......................................--- - ---.............................................-- - ---............................................| - ---------------------------------------------- -ENDMAP - -IF [40%] { - $terrain = TERRAIN:{ 'L', '}', 'T', '.', '-', 'C' } - SHUFFLE:$terrain - REPLACE_TERRAIN:(0,0,74,17),'F', $terrain[0], 100% -} - -REGION:(01,01,73,16),lit,"ordinary" - -STAIR:random,up -STAIR:random,down - -NON_DIGGABLE:(00,00,74,17) - -LOOP [15] { - OBJECT:random,random -} -LOOP [6] { - TRAP:random,random -} -LOOP [28] { - MONSTER:random,random -} - - - -# The Eye - -LEVEL:"bigrm-9" -FLAGS:mazelevel -GEOMETRY:center,center -MAP -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}................}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}}}}}}}}}}}}}}................................}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}}}}}}}}............................................}}}}}}}}}}}}}}} -}}}}}}}}}}......................................................}}}}}}}}}} -}}}}}}}............................................................}}}}}}} -}}}}}.......................LLLLLLLLLLLLLLLLLL.......................}}}}} -}}}....................LLLLLLLLLLLLLLLLLLLLLLLLLLL.....................}}} -}....................LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................} -}....................LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................} -}....................LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................} -}}}....................LLLLLLLLLLLLLLLLLLLLLLLLLLL.....................}}} -}}}}}.......................LLLLLLLLLLLLLLLLLL.......................}}}}} -}}}}}}}............................................................}}}}}}} -}}}}}}}}}}......................................................}}}}}}}}}} -}}}}}}}}}}}}}}}............................................}}}}}}}}}}}}}}} -}}}}}}}}}}}}}}}}}}}}}................................}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}................}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -ENDMAP - -# Unlit, except 3 mapgrids around the "pupil" -REGION:(00,00,73,18),unlit,"ordinary" -REGION:(26,04,47,14),lit,"ordinary" -REGION:(21,05,51,13),lit,"ordinary" -REGION:(19,06,54,12),lit,"ordinary" - -STAIR:random,up -STAIR:random,down - -LOOP [15] { - OBJECT:random,random -} -LOOP [6] { - TRAP:random,random -} -LOOP [28] { - MONSTER:random,random -} - - -# Fog Maze - -LEVEL:"bigrm-10" -FLAGS:mazelevel -GEOMETRY:center,center -MAP -....................................................................... -....................................................................... -....................................................................... -....................................................................... -...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... -...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... -...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... -...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... -...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... -...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... -...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... -...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... -...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... -...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... -...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... -....................................................................... -....................................................................... -....................................................................... -....................................................................... -ENDMAP - -IF [33%] { - # occasionally it's not a fog maze - $terrain = TERRAIN:{ 'L', '}', 'T', '-', 'F' } - SHUFFLE:$terrain - # break it up a bit - REPLACE_TERRAIN:(0,0,70,18),'C', '.', 5% - REPLACE_TERRAIN:(0,0,70,18),'C', $terrain[0], 100% -} - -REGION:(00,00,70,18),lit,"ordinary" - -# when falling down on this level, never end up in the fog maze -TELEPORT_REGION:(00,00,70,18),(02,03,68,15),down - -LOOP [15] { - OBJECT:random,random -} -LOOP [6] { - TRAP:random,random -} -LOOP [28] { - MONSTER:random,random -} - -MAZEWALK:(4, 2), south, false - -# Stairs up, not in the fog maze -STAIR:(00,00,70,18),(02,03,68,15),up -STAIR:random,down - diff --git a/dat/castle.des b/dat/castle.des deleted file mode 100644 index dd63a1e40..000000000 --- a/dat/castle.des +++ /dev/null @@ -1,249 +0,0 @@ -# NetHack 3.6 castle.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# NetHack may be freely redistributed. See license for details. -# -# This is the stronghold level : -# there are several ways to enter it : -# - opening the drawbridge (wand of opening, knock spell, playing -# the appropriate tune) -# -# - enter via the back entry (this suppose a ring of levitation, boots -# of water walking, etc.) -# -# Note : If you don't play the right tune, you get indications like in the -# MasterMind game... -# -# To motivate the player : there are 4 storerooms (armors, weapons, food and -# gems) and a wand of wishing in one of the 4 towers... - -MAZE:"castle",random -FLAGS: noteleport -GEOMETRY:center,center -MAP -}}}}}}}}}.............................................}}}}}}}}} -}-------}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}-------} -}|.....|-----------------------------------------------|.....|} -}|.....+...............................................+.....|} -}-------------------------------+-----------------------------} -}}}}}}|........|..........+...........|.......S.S.......|}}}}}} -.....}|........|..........|...........|.......|.|.......|}..... -.....}|........------------...........---------S---------}..... -.....}|...{....+..........+.........\.S.................+...... -.....}|........------------...........---------S---------}..... -.....}|........|..........|...........|.......|.|.......|}..... -}}}}}}|........|..........+...........|.......S.S.......|}}}}}} -}-------------------------------+-----------------------------} -}|.....+...............................................+.....|} -}|.....|-----------------------------------------------|.....|} -}-------}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}-------} -}}}}}}}}}.............................................}}}}}}}}} -ENDMAP - -# Random registers initialisation -$object = object: { '[',')','*','%' } -SHUFFLE: $object - -$place = { (04,02),(58,02),(04,14),(58,14) } -SHUFFLE: $place - -$monster = monster: { 'L','N','E','H','M','O','R','T','X','Z' } -SHUFFLE: $monster - - -TELEPORT_REGION:levregion(01,00,10,20),(1,1,61,15),down -TELEPORT_REGION:levregion(69,00,79,20),(1,1,61,15),up -STAIR:levregion(01,00,10,20),(0,0,62,16),up -FOUNTAIN:(10,08) -# Doors -DOOR:closed,(07,03) -DOOR:closed,(55,03) -DOOR:locked,(32,04) -DOOR:locked,(26,05) -DOOR:locked,(46,05) -DOOR:locked,(48,05) -DOOR:locked,(47,07) -DOOR:closed,(15,08) -DOOR:closed,(26,08) -DOOR:locked,(38,08) -DOOR:locked,(56,08) -DOOR:locked,(47,09) -DOOR:locked,(26,11) -DOOR:locked,(46,11) -DOOR:locked,(48,11) -DOOR:locked,(32,12) -DOOR:closed,(07,13) -DOOR:closed,(55,13) -# The drawbridge -DRAWBRIDGE:(05,08),east,closed -# Storeroom number 1 -OBJECT:$object[0],(39,05) -OBJECT:$object[0],(40,05) -OBJECT:$object[0],(41,05) -OBJECT:$object[0],(42,05) -OBJECT:$object[0],(43,05) -OBJECT:$object[0],(44,05) -OBJECT:$object[0],(45,05) -OBJECT:$object[0],(39,06) -OBJECT:$object[0],(40,06) -OBJECT:$object[0],(41,06) -OBJECT:$object[0],(42,06) -OBJECT:$object[0],(43,06) -OBJECT:$object[0],(44,06) -OBJECT:$object[0],(45,06) -# Storeroom number 2 -OBJECT:$object[1],(49,05) -OBJECT:$object[1],(50,05) -OBJECT:$object[1],(51,05) -OBJECT:$object[1],(52,05) -OBJECT:$object[1],(53,05) -OBJECT:$object[1],(54,05) -OBJECT:$object[1],(55,05) -OBJECT:$object[1],(49,06) -OBJECT:$object[1],(50,06) -OBJECT:$object[1],(51,06) -OBJECT:$object[1],(52,06) -OBJECT:$object[1],(53,06) -OBJECT:$object[1],(54,06) -OBJECT:$object[1],(55,06) -# Storeroom number 3 -OBJECT:$object[2],(39,10) -OBJECT:$object[2],(40,10) -OBJECT:$object[2],(41,10) -OBJECT:$object[2],(42,10) -OBJECT:$object[2],(43,10) -OBJECT:$object[2],(44,10) -OBJECT:$object[2],(45,10) -OBJECT:$object[2],(39,11) -OBJECT:$object[2],(40,11) -OBJECT:$object[2],(41,11) -OBJECT:$object[2],(42,11) -OBJECT:$object[2],(43,11) -OBJECT:$object[2],(44,11) -OBJECT:$object[2],(45,11) -# Storeroom number 4 -OBJECT:$object[3],(49,10) -OBJECT:$object[3],(50,10) -OBJECT:$object[3],(51,10) -OBJECT:$object[3],(52,10) -OBJECT:$object[3],(53,10) -OBJECT:$object[3],(54,10) -OBJECT:$object[3],(55,10) -OBJECT:$object[3],(49,11) -OBJECT:$object[3],(50,11) -OBJECT:$object[3],(51,11) -OBJECT:$object[3],(52,11) -OBJECT:$object[3],(53,11) -OBJECT:$object[3],(54,11) -OBJECT:$object[3],(55,11) -# THE WAND OF WISHING in 1 of the 4 towers -CONTAINER:('(',"chest"),not_trapped,$place[0] { -OBJECT:('/',"wishing") -} -# Prevent monsters from eating it. (@'s never eat objects) -ENGRAVING:$place[0],burn,"Elbereth" -OBJECT:('?',"scare monster"),$place[0],cursed -# The treasure of the lord -OBJECT:('(',"chest"),(37,08) -# Traps -TRAP:"trap door",(40,08) -TRAP:"trap door",(44,08) -TRAP:"trap door",(48,08) -TRAP:"trap door",(52,08) -TRAP:"trap door",(55,08) -# Soldiers guarding the entry hall -MONSTER:('@',"soldier"),(08,06) -MONSTER:('@',"soldier"),(09,05) -MONSTER:('@',"soldier"),(11,05) -MONSTER:('@',"soldier"),(12,06) -MONSTER:('@',"soldier"),(08,10) -MONSTER:('@',"soldier"),(09,11) -MONSTER:('@',"soldier"),(11,11) -MONSTER:('@',"soldier"),(12,10) -MONSTER:('@',"lieutenant"),(09,08) -# Soldiers guarding the towers -MONSTER:('@',"soldier"),(03,02) -MONSTER:('@',"soldier"),(05,02) -MONSTER:('@',"soldier"),(57,02) -MONSTER:('@',"soldier"),(59,02) -MONSTER:('@',"soldier"),(03,14) -MONSTER:('@',"soldier"),(05,14) -MONSTER:('@',"soldier"),(57,14) -MONSTER:('@',"soldier"),(59,14) -# The four dragons that are guarding the storerooms -MONSTER:'D',(47,05) -MONSTER:'D',(47,06) -MONSTER:'D',(47,10) -MONSTER:'D',(47,11) -# Sea monsters in the moat -MONSTER:(';',"giant eel"),(05,07) -MONSTER:(';',"giant eel"),(05,09) -MONSTER:(';',"giant eel"),(57,07) -MONSTER:(';',"giant eel"),(57,09) -MONSTER:(';',"shark"),(05,00) -MONSTER:(';',"shark"),(05,16) -MONSTER:(';',"shark"),(57,00) -MONSTER:(';',"shark"),(57,16) -# The throne room and the court monsters -MONSTER:$monster[0],(27,05) -MONSTER:$monster[1],(30,05) -MONSTER:$monster[2],(33,05) -MONSTER:$monster[3],(36,05) -MONSTER:$monster[4],(28,06) -MONSTER:$monster[5],(31,06) -MONSTER:$monster[6],(34,06) -MONSTER:$monster[7],(37,06) -MONSTER:$monster[8],(27,07) -MONSTER:$monster[9],(30,07) -MONSTER:$monster[0],(33,07) -MONSTER:$monster[1],(36,07) -MONSTER:$monster[2],(28,08) -MONSTER:$monster[3],(31,08) -MONSTER:$monster[4],(34,08) -MONSTER:$monster[5],(27,09) -MONSTER:$monster[6],(30,09) -MONSTER:$monster[7],(33,09) -MONSTER:$monster[8],(36,09) -MONSTER:$monster[9],(28,10) -MONSTER:$monster[0],(31,10) -MONSTER:$monster[1],(34,10) -MONSTER:$monster[2],(37,10) -MONSTER:$monster[3],(27,11) -MONSTER:$monster[4],(30,11) -MONSTER:$monster[5],(33,11) -MONSTER:$monster[6],(36,11) -# MazeWalks -MAZEWALK:(00,10),west -MAZEWALK:(62,06),east -# Non diggable walls -NON_DIGGABLE:(00,00,62,16) -# Subrooms: -# Entire castle area -REGION:(00,00,62,16),unlit,"ordinary" -# Courtyards -REGION:(00,05,05,11),lit,"ordinary" -REGION:(57,05,62,11),lit,"ordinary" -# Throne room -REGION:(27,05,37,11),lit,"throne",unfilled -# Antechamber -REGION:(07,05,14,11),lit,"ordinary" -# Storerooms -REGION:(39,05,45,06),lit,"ordinary" -REGION:(39,10,45,11),lit,"ordinary" -REGION:(49,05,55,06),lit,"ordinary" -REGION:(49,10,55,11),lit,"ordinary" -# Corners -REGION:(02,02,06,03),lit,"ordinary" -REGION:(56,02,60,03),lit,"ordinary" -REGION:(02,13,06,14),lit,"ordinary" -REGION:(56,13,60,14),lit,"ordinary" -# Barracks -REGION:(16,05,25,06),lit,"barracks" -REGION:(16,10,25,11),lit,"barracks" -# Hallways -REGION:(08,03,54,03),unlit,"ordinary" -REGION:(08,13,54,13),unlit,"ordinary" -REGION:(16,08,25,08),unlit,"ordinary" -REGION:(39,08,55,08),unlit,"ordinary" -# Storeroom alcoves -REGION:(47,05,47,06),unlit,"ordinary" -REGION:(47,10,47,11),unlit,"ordinary" diff --git a/dat/castle.lua b/dat/castle.lua new file mode 100644 index 000000000..fcf3d25b6 --- /dev/null +++ b/dat/castle.lua @@ -0,0 +1,256 @@ +-- NetHack 3.6 castle.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- This is the stronghold level : +-- there are several ways to enter it : +-- - opening the drawbridge (wand of opening, knock spell, playing +-- the appropriate tune) +-- +-- - enter via the back entry (this suppose a ring of levitation, boots +-- of water walking, etc.) +-- +-- Note : If you don't play the right tune, you get indications like in the +-- MasterMind game... +-- +-- To motivate the player : there are 4 storerooms (armors, weapons, food and +-- gems) and a wand of wishing in one of the 4 towers... + +des.level_init({ style="mazegrid", bg ="-" }); + +des.level_flags("mazelevel", "noteleport") + +des.map([[ +}}}}}}}}}.............................................}}}}}}}}} +}-------}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}-------} +}|.....|-----------------------------------------------|.....|} +}|.....+...............................................+.....|} +}-------------------------------+-----------------------------} +}}}}}}|........|..........+...........|.......S.S.......|}}}}}} +.....}|........|..........|...........|.......|.|.......|}..... +.....}|........------------...........---------S---------}..... +.....}|...{....+..........+.........\.S.................+...... +.....}|........------------...........---------S---------}..... +.....}|........|..........|...........|.......|.|.......|}..... +}}}}}}|........|..........+...........|.......S.S.......|}}}}}} +}-------------------------------+-----------------------------} +}|.....+...............................................+.....|} +}|.....|-----------------------------------------------|.....|} +}-------}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}-------} +}}}}}}}}}.............................................}}}}}}}}} +]]); + +-- Random registers initialisation +local object = { "[", ")", "*", "%" }; +shuffle(object) + +local place = selection.new(); +place:set(04,02); +place:set(58,02); +place:set(04,14); +place:set(58,14); + +local monster = { "L", "N", "E", "H", "M", "O", "R", "T", "X", "Z" } +shuffle(monster) + +des.teleport_region({ region = {01,00,10,20}, region_islev=1, exclude={1,1,61,15}, dir="down" }) +des.teleport_region({ region = {69,00,79,20}, region_islev=1, exclude={1,1,61,15}, dir="up" }) +des.levregion({ region = {01,00,10,20}, region_islev=1, exclude={0,0,62,16}, type="stair-up" }) +des.feature("fountain", 10,08) +-- Doors +des.door("closed",07,03) +des.door("closed",55,03) +des.door("locked",32,04) +des.door("locked",26,05) +des.door("locked",46,05) +des.door("locked",48,05) +des.door("locked",47,07) +des.door("closed",15,08) +des.door("closed",26,08) +des.door("locked",38,08) +des.door("locked",56,08) +des.door("locked",47,09) +des.door("locked",26,11) +des.door("locked",46,11) +des.door("locked",48,11) +des.door("locked",32,12) +des.door("closed",07,13) +des.door("closed",55,13) +-- The drawbridge +des.drawbridge({ dir="east", state="closed", x=05,y=08}) +-- Storeroom number 1 +des.object(object[1],39,05) +des.object(object[1],40,05) +des.object(object[1],41,05) +des.object(object[1],42,05) +des.object(object[1],43,05) +des.object(object[1],44,05) +des.object(object[1],45,05) +des.object(object[1],39,06) +des.object(object[1],40,06) +des.object(object[1],41,06) +des.object(object[1],42,06) +des.object(object[1],43,06) +des.object(object[1],44,06) +des.object(object[1],45,06) +-- Storeroom number 2 +des.object(object[2],49,05) +des.object(object[2],50,05) +des.object(object[2],51,05) +des.object(object[2],52,05) +des.object(object[2],53,05) +des.object(object[2],54,05) +des.object(object[2],55,05) +des.object(object[2],49,06) +des.object(object[2],50,06) +des.object(object[2],51,06) +des.object(object[2],52,06) +des.object(object[2],53,06) +des.object(object[2],54,06) +des.object(object[2],55,06) +-- Storeroom number 3 +des.object(object[3],39,10) +des.object(object[3],40,10) +des.object(object[3],41,10) +des.object(object[3],42,10) +des.object(object[3],43,10) +des.object(object[3],44,10) +des.object(object[3],45,10) +des.object(object[3],39,11) +des.object(object[3],40,11) +des.object(object[3],41,11) +des.object(object[3],42,11) +des.object(object[3],43,11) +des.object(object[3],44,11) +des.object(object[3],45,11) +-- Storeroom number 4 +des.object(object[4],49,10) +des.object(object[4],50,10) +des.object(object[4],51,10) +des.object(object[4],52,10) +des.object(object[4],53,10) +des.object(object[4],54,10) +des.object(object[4],55,10) +des.object(object[4],49,11) +des.object(object[4],50,11) +des.object(object[4],51,11) +des.object(object[4],52,11) +des.object(object[4],53,11) +des.object(object[4],54,11) +des.object(object[4],55,11) +-- THE WAND OF WISHING in 1 of the 4 towers +local px, py = place:rndcoord(1); +des.object({ id = "chest", trapped = 0, x = px, y = py, + contents = function() + des.object("wishing"); + end +}); +-- Prevent monsters from eating it. (@'s never eat objects) +des.engraving({ x = px, y = py, type="burn", text="Elbereth" }) +des.object({ id = "scare monster", x = px, y = py, buc="cursed" }) +-- The treasure of the lord +des.object("chest",37,08) +-- Traps +des.trap("trap door",40,08) +des.trap("trap door",44,08) +des.trap("trap door",48,08) +des.trap("trap door",52,08) +des.trap("trap door",55,08) +-- Soldiers guarding the entry hall +des.monster("soldier",08,06) +des.monster("soldier",09,05) +des.monster("soldier",11,05) +des.monster("soldier",12,06) +des.monster("soldier",08,10) +des.monster("soldier",09,11) +des.monster("soldier",11,11) +des.monster("soldier",12,10) +des.monster("lieutenant",09,08) +-- Soldiers guarding the towers +des.monster("soldier",03,02) +des.monster("soldier",05,02) +des.monster("soldier",57,02) +des.monster("soldier",59,02) +des.monster("soldier",03,14) +des.monster("soldier",05,14) +des.monster("soldier",57,14) +des.monster("soldier",59,14) +-- The four dragons that are guarding the storerooms +des.monster("D",47,05) +des.monster("D",47,06) +des.monster("D",47,10) +des.monster("D",47,11) +-- Sea monsters in the moat +des.monster("giant eel",05,07) +des.monster("giant eel",05,09) +des.monster("giant eel",57,07) +des.monster("giant eel",57,09) +des.monster("shark",05,00) +des.monster("shark",05,16) +des.monster("shark",57,00) +des.monster("shark",57,16) +-- The throne room and the court monsters +des.monster(monster[10],27,05) +des.monster(monster[1],30,05) +des.monster(monster[2],33,05) +des.monster(monster[3],36,05) +des.monster(monster[4],28,06) +des.monster(monster[5],31,06) +des.monster(monster[6],34,06) +des.monster(monster[7],37,06) +des.monster(monster[8],27,07) +des.monster(monster[9],30,07) +des.monster(monster[10],33,07) +des.monster(monster[1],36,07) +des.monster(monster[2],28,08) +des.monster(monster[3],31,08) +des.monster(monster[4],34,08) +des.monster(monster[5],27,09) +des.monster(monster[6],30,09) +des.monster(monster[7],33,09) +des.monster(monster[8],36,09) +des.monster(monster[9],28,10) +des.monster(monster[10],31,10) +des.monster(monster[1],34,10) +des.monster(monster[2],37,10) +des.monster(monster[3],27,11) +des.monster(monster[4],30,11) +des.monster(monster[5],33,11) +des.monster(monster[6],36,11) +-- MazeWalks +des.mazewalk(00,10,"west") +des.mazewalk(62,06,"east") +-- Non diggable walls +des.non_diggable(selection.area(00,00,62,16)) +-- Subrooms: +-- Entire castle area +des.region(selection.area(00,00,62,16),"unlit") +-- Courtyards +des.region(selection.area(00,05,05,11),"lit") +des.region(selection.area(57,05,62,11),"lit") +-- Throne room +des.region({ region={27,05, 37,11},lit=1,type="throne", prefilled=1 }) +-- Antechamber +des.region(selection.area(07,05,14,11),"lit") +-- Storerooms +des.region(selection.area(39,05,45,06),"lit") +des.region(selection.area(39,10,45,11),"lit") +des.region(selection.area(49,05,55,06),"lit") +des.region(selection.area(49,10,55,11),"lit") +-- Corners +des.region(selection.area(02,02,06,03),"lit") +des.region(selection.area(56,02,60,03),"lit") +des.region(selection.area(02,13,06,14),"lit") +des.region(selection.area(56,13,60,14),"lit") +-- Barracks +des.region({ region={16,05, 25,06},lit=1,type="barracks", prefilled=0 }) +des.region({ region={16,10, 25,11},lit=1,type="barracks", prefilled=0 }) +-- Hallways +des.region(selection.area(08,03,54,03),"unlit") +des.region(selection.area(08,13,54,13),"unlit") +des.region(selection.area(16,08,25,08),"unlit") +des.region(selection.area(39,08,55,08),"unlit") +-- Storeroom alcoves +des.region(selection.area(47,05,47,06),"unlit") +des.region(selection.area(47,10,47,11),"unlit") diff --git a/dat/earth.lua b/dat/earth.lua new file mode 100644 index 000000000..62cb6da32 --- /dev/null +++ b/dat/earth.lua @@ -0,0 +1,130 @@ +-- NetHack 3.6 endgame.des $NHDT-Date: 1546303680 2019/01/01 00:48:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.14 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992,1993 by Izchak Miller, David Cohrs, +-- and Timo Hakulinen +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- These are the ENDGAME levels: earth, air, fire, water, and astral. +-- The top-most level, the Astral Level, has 3 temples and shrines. +-- Players are supposed to sacrifice the Amulet of Yendor on the appropriate +-- shrine. + +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "shortsighted") + +des.message("Well done, mortal!") +des.message("But now thou must face the final Test...") +des.message("Prove thyself worthy or perish!") + +-- The player lands, upon arrival, in the +-- lower-right cavern. The location of the +-- portal to the next level is randomly chosen. +-- This map has no visible outer boundary, and +-- is mostly diggable "rock". +des.map([[ + + ... + .... .. + ..... ... .. + .... .... ... + .... ... .... ... . + .. .. ....... . .. + .. ... . + . .. . ... + .. .. . .. . + .. ... . + ... ... + .. ... .. + .... .. + .. ... + .. ..... + ... ... + .... + .. + +]]); + +des.replace_terrain({ region={0,0, 75,19}, fromterrain=" ", toterrain=".", lit=0, chance=5 }) + +-- Since there are no stairs, this forces the hero's initial placement +des.teleport_region({region = {69,16,69,16} }) +des.levregion({ region = {0,0,75,19}, exclude = {65,13,75,19}, type="portal", name="air" }) +-- Some helpful monsters. Making sure a +-- pick axe and at least one wand of digging +-- are available. +des.monster("Elvenking", 67,16) +des.monster("minotaur", 67,14) +-- An assortment of earth-appropriate nasties +-- in each cavern. +des.monster({ id = "earth elemental", x = 52, y = 13, peaceful = 0 }) +des.monster({ id = "earth elemental", x = 53, y = 13, peaceful = 0 }) +des.monster("rock troll", 53,12) +des.monster("stone giant", 54,12) +-- +des.monster("pit viper", 70,05) +des.monster("barbed devil", 69,06) +des.monster("stone giant", 69,08) +des.monster("stone golem", 71,08) +des.monster("pit fiend", 70,09) +des.monster({ id = "earth elemental", x = 70, y = 08, peaceful = 0 }) +-- +des.monster({ id = "earth elemental", x = 60, y = 03, peaceful = 0 }) +des.monster("stone giant", 61,04) +des.monster({ id = "earth elemental", x = 62, y = 04, peaceful = 0 }) +des.monster({ id = "earth elemental", x = 61, y = 05, peaceful = 0 }) +des.monster("scorpion", 62,05) +des.monster("rock piercer", 63,05) +-- +des.monster("umber hulk", 40,05) +des.monster("dust vortex", 42,05) +des.monster("rock troll", 38,06) +des.monster({ id = "earth elemental", x = 39, y = 06, peaceful = 0 }) +des.monster({ id = "earth elemental", x = 41, y = 06, peaceful = 0 }) +des.monster({ id = "earth elemental", x = 38, y = 07, peaceful = 0 }) +des.monster("stone giant", 39,07) +des.monster({ id = "earth elemental", x = 43, y = 07, peaceful = 0 }) +des.monster("stone golem", 37,08) +des.monster("pit viper", 43,08) +des.monster("pit viper", 43,09) +des.monster("rock troll", 44,10) +-- +des.monster({ id = "earth elemental", x = 02, y = 01, peaceful = 0 }) +des.monster({ id = "earth elemental", x = 03, y = 01, peaceful = 0 }) +des.monster("stone golem", 01,02) +des.monster({ id = "earth elemental", x = 02, y = 02, peaceful = 0 }) +des.monster("rock troll", 04,03) +des.monster("rock troll", 03,03) +des.monster("pit fiend", 03,04) +des.monster({ id = "earth elemental", x = 04, y = 05, peaceful = 0 }) +des.monster("pit viper", 05,06) +-- +des.monster({ id = "earth elemental", x = 21, y = 02, peaceful = 0 }) +des.monster({ id = "earth elemental", x = 21, y = 03, peaceful = 0 }) +des.monster("minotaur", 21,04) +des.monster({ id = "earth elemental", x = 21, y = 05, peaceful = 0 }) +des.monster("rock troll", 22,05) +des.monster({ id = "earth elemental", x = 22, y = 06, peaceful = 0 }) +des.monster({ id = "earth elemental", x = 23, y = 06, peaceful = 0 }) +-- +des.monster("pit viper", 14,08) +des.monster("barbed devil", 14,09) +des.monster({ id = "earth elemental", x = 13, y = 10, peaceful = 0 }) +des.monster("rock troll", 12,11) +des.monster({ id = "earth elemental", x = 14, y = 12, peaceful = 0 }) +des.monster({ id = "earth elemental", x = 15, y = 13, peaceful = 0 }) +des.monster("stone giant", 17,13) +des.monster("stone golem", 18,13) +des.monster("pit fiend", 18,12) +des.monster({ id = "earth elemental", x = 18, y = 11, peaceful = 0 }) +des.monster({ id = "earth elemental", x = 18, y = 10, peaceful = 0 }) +-- +des.monster("barbed devil", 02,16) +des.monster({ id = "earth elemental", x = 03, y = 16, peaceful = 0 }) +des.monster("rock troll", 02,17) +des.monster({ id = "earth elemental", x = 04, y = 17, peaceful = 0 }) +des.monster({ id = "earth elemental", x = 04, y = 18, peaceful = 0 }) + +des.object("boulder") + diff --git a/dat/endgame.des b/dat/endgame.des deleted file mode 100644 index ebd9049bd..000000000 --- a/dat/endgame.des +++ /dev/null @@ -1,655 +0,0 @@ -# NetHack 3.6 endgame.des $NHDT-Date: 1546303680 2019/01/01 00:48:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.14 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1992,1993 by Izchak Miller, David Cohrs, -# and Timo Hakulinen -# NetHack may be freely redistributed. See license for details. -# -# These are the ENDGAME levels: earth, air, fire, water, and astral. -# The top-most level, the Astral Level, has 3 temples and shrines. -# Players are supposed to sacrifice the Amulet of Yendor on the appropriate -# shrine. - -MAZE:"earth",' ' -FLAGS: noteleport,hardfloor,shortsighted -MESSAGE: "Well done, mortal!" -MESSAGE: "But now thou must face the final Test..." -MESSAGE: "Prove thyself worthy or perish!" - -GEOMETRY:center,center -# The player lands, upon arrival, in the -# lower-right cavern. The location of the -# portal to the next level is randomly chosen. -# This map has no visible outer boundary, and -# is mostly diggable "rock". -MAP - - ... - .... .. - ..... ... .. - .... .... ... - .... ... .... ... . - .. .. ....... . .. - .. ... . - . .. . ... - .. .. . .. . - .. ... . - ... ... - .. ... .. - .... .. - .. ... - .. ..... - ... ... - .... - .. - -ENDMAP - -REPLACE_TERRAIN:(0,0,75,19), ' ', ('.', unlit), 5% - -# Since there are no stairs, this forces the hero's initial placement -TELEPORT_REGION:(69,16,69,16),(0,0,0,0) -PORTAL:(0,0,75,19),(65,13,75,19),"air" -# Some helpful monsters. Making sure a -# pick axe and at least one wand of digging -# are available. -MONSTER:('@',"Elvenking"),(67,16) -MONSTER:('H',"minotaur"),(67,14) -# An assortment of earth-appropriate nasties -# in each cavern. -MONSTER:('E',"earth elemental"),(52,13),hostile -MONSTER:('E',"earth elemental"),(53,13),hostile -MONSTER:('T',"rock troll"),(53,12) -MONSTER:('H',"stone giant"),(54,12) -# -MONSTER:('S',"pit viper"),(70,05) -MONSTER:('&',"barbed devil"),(69,06) -MONSTER:('H',"stone giant"),(69,08) -MONSTER:(''',"stone golem"),(71,08) -MONSTER:('&',"pit fiend"),(70,09) -MONSTER:('E',"earth elemental"),(70,08),hostile -# -MONSTER:('E',"earth elemental"),(60,03),hostile -MONSTER:('H',"stone giant"),(61,04) -MONSTER:('E',"earth elemental"),(62,04),hostile -MONSTER:('E',"earth elemental"),(61,05),hostile -MONSTER:('s',"scorpion"),(62,05) -MONSTER:('p',"rock piercer"),(63,05) -# -MONSTER:('U',"umber hulk"),(40,05) -MONSTER:('v',"dust vortex"),(42,05) -MONSTER:('T',"rock troll"),(38,06) -MONSTER:('E',"earth elemental"),(39,06),hostile -MONSTER:('E',"earth elemental"),(41,06),hostile -MONSTER:('E',"earth elemental"),(38,07),hostile -MONSTER:('H',"stone giant"),(39,07) -MONSTER:('E',"earth elemental"),(43,07),hostile -MONSTER:(''',"stone golem"),(37,08) -MONSTER:('S',"pit viper"),(43,08) -MONSTER:('S',"pit viper"),(43,09) -MONSTER:('T',"rock troll"),(44,10) -# -MONSTER:('E',"earth elemental"),(02,01),hostile -MONSTER:('E',"earth elemental"),(03,01),hostile -MONSTER:(''',"stone golem"),(01,02) -MONSTER:('E',"earth elemental"),(02,02),hostile -MONSTER:('T',"rock troll"),(04,03) -MONSTER:('T',"rock troll"),(03,03) -MONSTER:('&',"pit fiend"),(03,04) -MONSTER:('E',"earth elemental"),(04,05),hostile -MONSTER:('S',"pit viper"),(05,06) -# -MONSTER:('E',"earth elemental"),(21,02),hostile -MONSTER:('E',"earth elemental"),(21,03),hostile -MONSTER:('H',"minotaur"),(21,04) -MONSTER:('E',"earth elemental"),(21,05),hostile -MONSTER:('T',"rock troll"),(22,05) -MONSTER:('E',"earth elemental"),(22,06),hostile -MONSTER:('E',"earth elemental"),(23,06),hostile -# -MONSTER:('S',"pit viper"),(14,08) -MONSTER:('&',"barbed devil"),(14,09) -MONSTER:('E',"earth elemental"),(13,10),hostile -MONSTER:('T',"rock troll"),(12,11) -MONSTER:('E',"earth elemental"),(14,12),hostile -MONSTER:('E',"earth elemental"),(15,13),hostile -MONSTER:('H',"stone giant"),(17,13) -MONSTER:(''',"stone golem"),(18,13) -MONSTER:('&',"pit fiend"),(18,12) -MONSTER:('E',"earth elemental"),(18,11),hostile -MONSTER:('E',"earth elemental"),(18,10),hostile -# -MONSTER:('&',"barbed devil"),(02,16) -MONSTER:('E',"earth elemental"),(03,16),hostile -MONSTER:('T',"rock troll"),(02,17) -MONSTER:('E',"earth elemental"),(04,17),hostile -MONSTER:('E',"earth elemental"),(04,18),hostile - -OBJECT:('`',"boulder"),random - - -MAZE:"air",' ' -FLAGS: noteleport,hardfloor,shortsighted -# The following messages are somewhat obtuse, to make then -# equally meaningful if the player can see or not. -MESSAGE: "What a strange feeling!" -MESSAGE: "You notice that there is no gravity here." -GEOMETRY:center,center -# The player lands, upon arrival, in the -# lower-left area. The location of the -# portal to the next level is randomly chosen. -# This map has no visible outer boundary, and -# is all "air". -MAP -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -ENDMAP -# Use up and down regions to partition the level into three parts; -# teleportation can't cross from one part into another. -# The up region is where you'll arrive after activating the portal from -# the preceding level; the exit portal is placed inside the down region. -TELEPORT_REGION:levregion(01,00,24,20),levregion(25,00,79,20),up -TELEPORT_REGION:levregion(56,00,79,20),levregion(01,00,55,20),down -PORTAL:levregion(57,01,78,19),(0,0,0,0),"fire" -REGION:(00,00,75,19),lit,"ordinary" -MONSTER:('E',"air elemental"),random,hostile -MONSTER:('E',"air elemental"),random,hostile -MONSTER:('E',"air elemental"),random,hostile -MONSTER:('E',"air elemental"),random,hostile -MONSTER:('E',"air elemental"),random,hostile -MONSTER:('E',"air elemental"),random,hostile -MONSTER:('E',"air elemental"),random,hostile -MONSTER:('E',"air elemental"),random,hostile -MONSTER:('E',"air elemental"),random,hostile -MONSTER:('E',"air elemental"),random,hostile -MONSTER:('E',"air elemental"),random,hostile - -MONSTER:('e',"floating eye"),random,hostile -MONSTER:('e',"floating eye"),random,hostile -MONSTER:('e',"floating eye"),random,hostile - -MONSTER:('y',"yellow light"),random,hostile -MONSTER:('y',"yellow light"),random,hostile -MONSTER:('y',"yellow light"),random,hostile - -MONSTER:('A',"couatl"),random - -MONSTER:'D',random -MONSTER:'D',random -MONSTER:'D',random -MONSTER:'D',random -MONSTER:'D',random - -MONSTER:'E',random -MONSTER:'E',random -MONSTER:'E',random -MONSTER:'J',random -MONSTER:'J',random - -MONSTER:('&',"djinni"),random,hostile -MONSTER:('&',"djinni"),random,hostile -MONSTER:('&',"djinni"),random,hostile - -MONSTER:('v',"fog cloud"),random,hostile -MONSTER:('v',"fog cloud"),random,hostile -MONSTER:('v',"fog cloud"),random,hostile -MONSTER:('v',"fog cloud"),random,hostile -MONSTER:('v',"fog cloud"),random,hostile -MONSTER:('v',"fog cloud"),random,hostile -MONSTER:('v',"fog cloud"),random,hostile -MONSTER:('v',"fog cloud"),random,hostile -MONSTER:('v',"fog cloud"),random,hostile -MONSTER:('v',"energy vortex"),random,hostile -MONSTER:('v',"energy vortex"),random,hostile -MONSTER:('v',"energy vortex"),random,hostile -MONSTER:('v',"energy vortex"),random,hostile -MONSTER:('v',"energy vortex"),random,hostile -MONSTER:('v',"steam vortex"),random,hostile -MONSTER:('v',"steam vortex"),random,hostile -MONSTER:('v',"steam vortex"),random,hostile -MONSTER:('v',"steam vortex"),random,hostile -MONSTER:('v',"steam vortex"),random,hostile - - -MAZE:"fire",' ' -FLAGS: noteleport,hardfloor,shortsighted -GEOMETRY:center,center -# The player lands, upon arrival, in the -# lower-right. The location of the -# portal to the next level is randomly chosen. -# This map has no visible outer boundary, and -# is mostly open area, with lava lakes and bunches of fire traps. -MAP -............................................................................ -....LLLLLLLL............L.......................LLL......................... -...LL...................L......................LLLL................LL....... -...L.............LLLL...LL....LL...............LLLLL.............LLL........ -.LLLL..............LL....L.....LLL..............LLLL..............LLLL...... -..........LLLL...LLLL...LLL....LLL......L........LLLL....LL........LLL...... -........LLLLLLL...LL.....L......L......LL.........LL......LL........LL...L.. -........LL..LLL..LL......LL......LLLL..L.........LL......LLL............LL.. -....L..LL....LLLLL.................LLLLLLL.......L......LL............LLLLLL -....L..L.....LL.LLLL.......L............L........LLLLL.LL......LL.........LL -....LL........L...LL......LL.............LLL.....L...LLL.......LLL.........L -.....LLLLLL........L.......LLL.............L....LL...L.LLL......LLLLLLL..... -..........LLLL............LL.L.............L....L...LL.........LLL..LLL..... -...........................LLLLL...........LL...L...L........LLLL..LLLLLL... -.....LLLL.............LL....LL.......LLL...LL.......L..LLL....LLLLLLL....... -.......LLL.........LLLLLLLLLLL......LLLLL...L...........LL...LL...LL........ -.........LL.......LL.........LL.......LLL....L..LLL....LL.........LL........ -..........LLLLLLLLL...........LL....LLL.......LLLLL.....LL........LL........ -.................L.............LLLLLL............LL...LLLL.........LL....... -.................................LL....................LL................... -ENDMAP -TELEPORT_REGION:(69,16,69,16),(0,0,0,0) -PORTAL:(0,0,75,19),(65,13,75,19),"water" - -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -TRAP:"fire",random -# An assortment of fire-appropriate nasties -MONSTER:('D',"red dragon"),random -MONSTER:('&',"balrog"),random -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('v',"fire vortex"),random -MONSTER:('d',"hell hound"),random -# -MONSTER:('H',"fire giant"),random -MONSTER:('&',"barbed devil"),random -MONSTER:('d',"hell hound"),random -MONSTER:(''',"stone golem"),random -MONSTER:('&',"pit fiend"),random -MONSTER:('E',"fire elemental"),random,hostile -# -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('d',"hell hound"),random -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('s',"scorpion"),random -MONSTER:('H',"fire giant"),random -# -MONSTER:('d',"hell hound"),random -MONSTER:('v',"dust vortex"),random -MONSTER:('v',"fire vortex"),random -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('d',"hell hound"),random -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:(''',"stone golem"),random -MONSTER:('S',"pit viper"),random -MONSTER:('S',"pit viper"),random -MONSTER:('v',"fire vortex"),random -# -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('H',"fire giant"),random -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('v',"fire vortex"),random -MONSTER:('v',"fire vortex"),random -MONSTER:('&',"pit fiend"),random -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('S',"pit viper"),random -# -MONSTER:(':',"salamander"),random,hostile -MONSTER:(':',"salamander"),random,hostile -MONSTER:('H',"minotaur"),random -MONSTER:(':',"salamander"),random,hostile -MONSTER:('v',"steam vortex"),random -MONSTER:(':',"salamander"),random,hostile -MONSTER:(':',"salamander"),random,hostile -# -MONSTER:('H',"fire giant"),random -MONSTER:('&',"barbed devil"),random -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('v',"fire vortex"),random -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('d',"hell hound"),random -MONSTER:('H',"fire giant"),random -MONSTER:('&',"pit fiend"),random -MONSTER:('E',"fire elemental"),random,hostile -MONSTER:('E',"fire elemental"),random,hostile -# -MONSTER:('&',"barbed devil"),random -MONSTER:(':',"salamander"),random,hostile -MONSTER:('v',"steam vortex"),random -MONSTER:(':',"salamander"),random,hostile -MONSTER:(':',"salamander"),random,hostile - -OBJECT:('`',"boulder"),random -OBJECT:('`',"boulder"),random -OBJECT:('`',"boulder"),random -OBJECT:('`',"boulder"),random -OBJECT:('`',"boulder"),random - - -MAZE:"water",' ' -FLAGS: noteleport,hardfloor,shortsighted -MESSAGE: "You find yourself suspended in an air bubble surrounded by water." -GEOMETRY:center,center -# The player lands upon arrival to an air bubble -# within the leftmost third of the level. The -# portal to the next level is randomly located in an air -# bubble within the rightmost third of the level. -# Bubbles are generated by special code in mkmaze.c for now. -MAP -WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW -WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW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WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW -WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW -WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW -WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW -WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW -ENDMAP -TELEPORT_REGION:(0,0,25,19),(0,0,0,0) -PORTAL:(51,0,75,19),(0,0,0,0),"astral" -# A fisherman's dream... -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"electric eel"),random -MONSTER:(';',"electric eel"),random -MONSTER:(';',"electric eel"),random -MONSTER:(';',"electric eel"),random -MONSTER:(';',"electric eel"),random -MONSTER:(';',"electric eel"),random -MONSTER:(';',"electric eel"),random -MONSTER:(';',"electric eel"),random -MONSTER:(';',"kraken"),random -MONSTER:(';',"kraken"),random -MONSTER:(';',"kraken"),random -MONSTER:(';',"kraken"),random -MONSTER:(';',"kraken"),random -MONSTER:(';',"kraken"),random -MONSTER:(';',"kraken"),random -MONSTER:(';',"kraken"),random -MONSTER:(';',"kraken"),random -MONSTER:(';',"shark"),random -MONSTER:(';',"shark"),random -MONSTER:(';',"shark"),random -MONSTER:(';',"shark"),random -MONSTER:(';',"piranha"),random -MONSTER:(';',"piranha"),random -MONSTER:(';',"piranha"),random -MONSTER:(';',"piranha"),random -MONSTER:(';',"jellyfish"),random -MONSTER:(';',"jellyfish"),random -MONSTER:(';',"jellyfish"),random -MONSTER:(';',"jellyfish"),random -MONSTER:';',random -MONSTER:';',random -MONSTER:';',random -MONSTER:';',random -# These guys feel like home here -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile -MONSTER:('E',"water elemental"),random,hostile - - -MAZE:"astral",' ' -FLAGS: noteleport,hardfloor,nommap,shortsighted,solidify -MESSAGE: "You arrive on the Astral Plane!" -MESSAGE: "Here the High Temple of %d is located." -MESSAGE: "You sense alarm, hostility, and excitement in the air!" -GEOMETRY:center,center -MAP - --------------- - |.............| - |..---------..| - |..|.......|..| ---------------- |..|.......|..| --------------- -|.............| |..|.......|..| |.............| -|..---------..-| |-------| |..|.......|..| |-------| |-..---------..| -|..|.......|...-| |-.......-| |..|.......|..| |-.......-| |-...|.......|..| -|..|.......|....-|-.........-||..----+----..||-.........-|-....|.......|..| -|..|.......+.....+...........||.............||...........+.....+.......|..| -|..|.......|....-|-.........-|--|.........|--|-.........-|-....|.......|..| -|..|.......|...-| |-.......-| -|---+---|- |-.......-| |-...|.......|..| -|..---------..-| |---+---| |-.......-| |---+---| |-..---------..| -|.............| |...|-----|-.........-|-----|...| |.............| ---------------- |.........|...........|.........| --------------- - -------...|-.........-|...------- - |....|-.......-|....| - ---...|---+---|...--- - |...............| - ----------------- -ENDMAP - -# chance to alter above map and turn the wings of the bottom-center into -# a pair of big (5x15) rooms -$loopindx = 0 -LOOP [2] { - $loopindx = $loopindx + 1 -# 3.6.[01]: 75% chance that both sides opened up, 25% that neither did; -# 3.6.2: 60% twice == 36% chance that both sides open up, 24% left side -# only, 24% right side only, 16% that neither side opens up - IF [60%] { - IF [$loopindx == 1] { - TERRAIN:fillrect (17,14, 30,18),'.' - WALLIFY -# temporarily close off the area to be filled so that it doesn't cover -# the entire entry area - TERRAIN:(33,18), '|' - $hall = selection:floodfill(30,16) -# re-connect the opened wing with the rest of the map - TERRAIN:(33,18), '.' - } ELSE { - TERRAIN:fillrect (44,14, 57,18),'.' - WALLIFY - TERRAIN:(41,18), '|' - $hall = selection:floodfill(44,16) - TERRAIN:(41,18), '.' - } -# extra monsters; was [6 + 3d4] when both wings were opened up at once - LOOP [3 + 2d3] { - MONSTER:('A',"Angel"),rndcoord($hall),noalign,hostile - [50%]: MONSTER:random,rndcoord($hall),hostile - } - } -} - -# Rider locations -$place = { (23,9),(37,14),(51,9) } -SHUFFLE: $place - -# Where the player will land on arrival -TELEPORT_REGION:(29,15,45,15),(30,15,44,15) -# Lit courts -REGION:(01,05,16,14),lit,"ordinary",filled,irregular -REGION:(31,01,44,10),lit,"ordinary",filled,irregular -REGION:(61,05,74,14),lit,"ordinary",filled,irregular -# A Sanctum for each alignment -# The shrines' alignments are shuffled for -# each game -REGION:(04,07,10,11),lit,"temple" -REGION:(34,03,40,07),lit,"temple" -REGION:(64,07,70,11),lit,"temple" -ALTAR:(07,09),align[0],sanctum -ALTAR:(37,05),align[1],sanctum -ALTAR:(67,09),align[2],sanctum -# Doors -DOOR:closed,(11,09) -DOOR:closed,(17,09) -DOOR:locked,(23,12) -DOOR:locked,(37,08) -DOOR:closed,(37,11) -DOOR:closed,(37,17) -DOOR:locked,(51,12) -DOOR:locked,(57,09) -DOOR:closed,(63,09) -# Non diggable and phazeable everywhere -NON_DIGGABLE:(00,00,74,19) -NON_PASSWALL:(00,00,74,19) -# Moloch's horde -# West round room -MONSTER:('@',"aligned priest"),(18,09),noalign,hostile -MONSTER:('@',"aligned priest"),(19,08),noalign,hostile -MONSTER:('@',"aligned priest"),(19,09),noalign,hostile -MONSTER:('@',"aligned priest"),(19,10),noalign,hostile -MONSTER:('A',"Angel"),(20,09),noalign,hostile -MONSTER:('A',"Angel"),(20,10),noalign,hostile -MONSTER:('&',"Pestilence"),$place[0],hostile -# South-central round room -MONSTER:('@',"aligned priest"),(36,12),noalign,hostile -MONSTER:('@',"aligned priest"),(37,12),noalign,hostile -MONSTER:('@',"aligned priest"),(38,12),noalign,hostile -MONSTER:('@',"aligned priest"),(36,13),noalign,hostile -MONSTER:('A',"Angel"),(38,13),noalign,hostile -MONSTER:('A',"Angel"),(37,13),noalign,hostile -MONSTER:('&',"Death"),$place[1],hostile -# East round room -MONSTER:('@',"aligned priest"),(56,09),noalign,hostile -MONSTER:('@',"aligned priest"),(55,08),noalign,hostile -MONSTER:('@',"aligned priest"),(55,09),noalign,hostile -MONSTER:('@',"aligned priest"),(55,10),noalign,hostile -MONSTER:('A',"Angel"),(54,09),noalign,hostile -MONSTER:('A',"Angel"),(54,10),noalign,hostile -MONSTER:('&',"Famine"),$place[2],hostile -# -# The aligned horde -# -# We do not know in advance the alignment of the -# player. The mpeaceful bit will need resetting -# when the level is created. The setting here is -# but a place holder. -# -# West court -MONSTER:('@',"aligned priest"),(12,07),chaos,hostile -MONSTER:('@',"aligned priest"),(13,07),chaos,peaceful -MONSTER:('@',"aligned priest"),(14,07),law,hostile -MONSTER:('@',"aligned priest"),(12,11),law,peaceful -MONSTER:('@',"aligned priest"),(13,11),neutral,hostile -MONSTER:('@',"aligned priest"),(14,11),neutral,peaceful -MONSTER:('A',"Angel"),(11,05),chaos,hostile -MONSTER:('A',"Angel"),(12,05),chaos,peaceful -MONSTER:('A',"Angel"),(13,05),law,hostile -MONSTER:('A',"Angel"),(11,13),law,peaceful -MONSTER:('A',"Angel"),(12,13),neutral,hostile -MONSTER:('A',"Angel"),(13,13),neutral,peaceful -# Central court -MONSTER:('@',"aligned priest"),(32,09),chaos,hostile -MONSTER:('@',"aligned priest"),(33,09),chaos,peaceful -MONSTER:('@',"aligned priest"),(34,09),law,hostile -MONSTER:('@',"aligned priest"),(40,09),law,peaceful -MONSTER:('@',"aligned priest"),(41,09),neutral,hostile -MONSTER:('@',"aligned priest"),(42,09),neutral,peaceful -MONSTER:('A',"Angel"),(31,08),chaos,hostile -MONSTER:('A',"Angel"),(32,08),chaos,peaceful -MONSTER:('A',"Angel"),(31,09),law,hostile -MONSTER:('A',"Angel"),(42,08),law,peaceful -MONSTER:('A',"Angel"),(43,08),neutral,hostile -MONSTER:('A',"Angel"),(43,09),neutral,peaceful -# East court -MONSTER:('@',"aligned priest"),(60,07),chaos,hostile -MONSTER:('@',"aligned priest"),(61,07),chaos,peaceful -MONSTER:('@',"aligned priest"),(62,07),law,hostile -MONSTER:('@',"aligned priest"),(60,11),law,peaceful -MONSTER:('@',"aligned priest"),(61,11),neutral,hostile -MONSTER:('@',"aligned priest"),(62,11),neutral,peaceful -MONSTER:('A',"Angel"),(61,05),chaos,hostile -MONSTER:('A',"Angel"),(62,05),chaos,peaceful -MONSTER:('A',"Angel"),(63,05),law,hostile -MONSTER:('A',"Angel"),(61,13),law,peaceful -MONSTER:('A',"Angel"),(62,13),neutral,hostile -MONSTER:('A',"Angel"),(63,13),neutral,peaceful -# -# Assorted nasties -MONSTER:'L',random,hostile -MONSTER:'L',random,hostile -MONSTER:'L',random,hostile -MONSTER:'V',random,hostile -MONSTER:'V',random,hostile -MONSTER:'V',random,hostile -MONSTER:'D',random,hostile -MONSTER:'D',random,hostile -MONSTER:'D',random,hostile diff --git a/dat/fakewiz1.lua b/dat/fakewiz1.lua new file mode 100644 index 000000000..856ac3161 --- /dev/null +++ b/dat/fakewiz1.lua @@ -0,0 +1,35 @@ +-- NetHack 3.6 yendor.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992 by M. Stephenson and Izchak Miller +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style="mazegrid", bg ="-" }); + +des.level_flags("mazelevel"); + +des.map([[ +......... +.}}}}}}}. +.}}---}}. +.}--.--}. +.}|...|}. +.}--.--}. +.}}---}}. +.}}}}}}}. +]]); +des.levregion({ region={01,00,79,20}, region_islev=1, exclude={0,0,8,7}, type="stair-up" }) +des.levregion({ region={01,00,79,20}, region_islev=1, exclude={0,0,8,7}, type="stair-down" }) +des.levregion({ region={01,00,79,20}, region_islev=1, exclude={0,0,8,7}, type="branch" }); +des.teleport_region({ region={01,00,79,20}, region_islev=1,exclude={2,2,6,6} }) +des.levregion({ region={4,4,4,4}, type="portal", name="wizard3" }) +des.mazewalk(08,05,"east") +des.region({ region={04,03,06,06},lit=0,type="ordinary",prefilled=0,irregular=1 }) +des.monster("L",04,04) +des.monster("vampire lord",03,04) +des.monster("kraken",06,06) +-- And to make things a little harder. +des.trap("board",04,03) +des.trap("board",04,05) +des.trap("board",03,04) +des.trap("board",05,04) + diff --git a/dat/fakewiz2.lua b/dat/fakewiz2.lua new file mode 100644 index 000000000..d8f73abb3 --- /dev/null +++ b/dat/fakewiz2.lua @@ -0,0 +1,35 @@ +-- NetHack 3.6 yendor.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992 by M. Stephenson and Izchak Miller +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style="mazegrid", bg ="-" }); + +des.level_flags("mazelevel"); + +des.map([[ +......... +.}}}}}}}. +.}}---}}. +.}--.--}. +.}|...|}. +.}--.--}. +.}}---}}. +.}}}}}}}. +]]); +des.levregion({ region={01,00,79,20}, region_islev=1, exclude={0,0,8,7}, type="stair-up" }) +des.levregion({ region={01,00,79,20}, region_islev=1, exclude={0,0,8,7}, type="stair-down" }) +des.levregion({ region={01,00,79,20}, region_islev=1, exclude={0,0,8,7}, type="branch" }); +des.teleport_region({ region={01,00,79,20}, region_islev=1,exclude={2,2,6,6} }) +des.mazewalk(08,05,"east") +des.region({ region={04,03,06,06},lit=0,type="ordinary",prefilled=0,irregular=1 }) +des.monster("L",04,04) +des.monster("vampire lord",03,04) +des.monster("kraken",06,06) +-- And to make things a little harder. +des.trap("board",04,03) +des.trap("board",04,05) +des.trap("board",03,04) +des.trap("board",05,04) +-- treasures +des.object("\"",04,04) diff --git a/dat/fire.lua b/dat/fire.lua new file mode 100644 index 000000000..105ca0fd0 --- /dev/null +++ b/dat/fire.lua @@ -0,0 +1,156 @@ +-- NetHack 3.6 endgame.des $NHDT-Date: 1546303680 2019/01/01 00:48:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.14 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992,1993 by Izchak Miller, David Cohrs, +-- and Timo Hakulinen +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "shortsighted") +-- The player lands, upon arrival, in the +-- lower-right. The location of the +-- portal to the next level is randomly chosen. +-- This map has no visible outer boundary, and +-- is mostly open area, with lava lakes and bunches of fire traps. +des.map([[ +............................................................................ +....LLLLLLLL............L.......................LLL......................... +...LL...................L......................LLLL................LL....... +...L.............LLLL...LL....LL...............LLLLL.............LLL........ +.LLLL..............LL....L.....LLL..............LLLL..............LLLL...... +..........LLLL...LLLL...LLL....LLL......L........LLLL....LL........LLL...... +........LLLLLLL...LL.....L......L......LL.........LL......LL........LL...L.. +........LL..LLL..LL......LL......LLLL..L.........LL......LLL............LL.. +....L..LL....LLLLL.................LLLLLLL.......L......LL............LLLLLL +....L..L.....LL.LLLL.......L............L........LLLLL.LL......LL.........LL +....LL........L...LL......LL.............LLL.....L...LLL.......LLL.........L +.....LLLLLL........L.......LLL.............L....LL...L.LLL......LLLLLLL..... +..........LLLL............LL.L.............L....L...LL.........LLL..LLL..... +...........................LLLLL...........LL...L...L........LLLL..LLLLLL... +.....LLLL.............LL....LL.......LLL...LL.......L..LLL....LLLLLLL....... +.......LLL.........LLLLLLLLLLL......LLLLL...L...........LL...LL...LL........ +.........LL.......LL.........LL.......LLL....L..LLL....LL.........LL........ +..........LLLLLLLLL...........LL....LLL.......LLLLL.....LL........LL........ +.................L.............LLLLLL............LL...LLLL.........LL....... +.................................LL....................LL................... +]]); +des.teleport_region({ region = {69,16,69,16} }) +des.levregion({ region = {0,0,75,19}, exclude = {65,13,75,19}, type="portal", name="water" }) + +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("fire") +-- An assortment of fire-appropriate nasties +des.monster("red dragon") +des.monster("balrog") +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster("fire vortex") +des.monster("hell hound") +-- +des.monster("fire giant") +des.monster("barbed devil") +des.monster("hell hound") +des.monster("stone golem") +des.monster("pit fiend") +des.monster({ id = "fire elemental", peaceful = 0 }) +-- +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster("hell hound") +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster("scorpion") +des.monster("fire giant") +-- +des.monster("hell hound") +des.monster("dust vortex") +des.monster("fire vortex") +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster("hell hound") +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster("stone golem") +des.monster("pit viper") +des.monster("pit viper") +des.monster("fire vortex") +-- +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster("fire giant") +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster("fire vortex") +des.monster("fire vortex") +des.monster("pit fiend") +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster("pit viper") +-- +des.monster({ id = "salamander", peaceful = 0 }) +des.monster({ id = "salamander", peaceful = 0 }) +des.monster("minotaur") +des.monster({ id = "salamander", peaceful = 0 }) +des.monster("steam vortex") +des.monster({ id = "salamander", peaceful = 0 }) +des.monster({ id = "salamander", peaceful = 0 }) +-- +des.monster("fire giant") +des.monster("barbed devil") +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster("fire vortex") +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster("hell hound") +des.monster("fire giant") +des.monster("pit fiend") +des.monster({ id = "fire elemental", peaceful = 0 }) +des.monster({ id = "fire elemental", peaceful = 0 }) +-- +des.monster("barbed devil") +des.monster({ id = "salamander", peaceful = 0 }) +des.monster("steam vortex") +des.monster({ id = "salamander", peaceful = 0 }) +des.monster({ id = "salamander", peaceful = 0 }) + +des.object("boulder") +des.object("boulder") +des.object("boulder") +des.object("boulder") +des.object("boulder") + diff --git a/dat/gehennom.des b/dat/gehennom.des deleted file mode 100644 index 65fab4e28..000000000 --- a/dat/gehennom.des +++ /dev/null @@ -1,713 +0,0 @@ -# NetHack 3.6 gehennom.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1992 by M. Stephenson and Izchak Miller -# NetHack may be freely redistributed. See license for details. -# - -MAZE: "valley", ' ' -FLAGS: noteleport,hardfloor,nommap -GEOMETRY:center,center -MAP ----------------------------------------------------------------------------- -|...S.|..|.....| |.....-| |................| |...............| |...| -|---|.|.--.---.| |......--- ----..........-----.-----....---........---.-.| -| |.|.|..| |.| --........| |.............| |.......---| |-...........--| -| |...S..| |.| |.......-----.......------| |--------..---......------- | -|----------- |.| |-......| |....|...-- |...-----................---- | -|.....S....---.| |.......| |....|...| |..............----------- | -|.....|.|......| |.....--- |......--- |....---.......| | -|.....|.|------| |....-- --....-- |-------- ----....--------------- | -|.....|--......---BBB-| |...-- |.......| |..................| | -|..........||........-| --...| |.......| |...||.............| | -|.....|...-||-........------....| |.......---- |...||.............-- | -|.....|--......---...........--------..........| |.......---------...-- | -|.....| |------| |--.......--| |..B......----- -----....| |.| |....--- | -|.....| |......--| ------..| |----..B......| |.--------.-- |-.....---| -|------ |........| |.|....| |.....----BBBB---------...........---.........| -| |........| |...|..| |.....| |-.............--------...........---| -| --.....-----------.| |....-----.....---------- |.........---- | -| |..|..B...........| |.|..........|.| |.|........| | ----------------------------------------------------------------------------- -ENDMAP - -# Make the path somewhat unpredictable -# If you get "lucky", you may have to go through all three graveyards. -IF [50%] { - TERRAIN:line (50,8),(53,8), '-' - TERRAIN:line (40,8),(43,8), 'B' -} -IF [50%] { - TERRAIN:(27,12),'|' - TERRAIN:line (27,3),(29,3), 'B' - TERRAIN:(28,2), '-' -} -IF [50%] { - TERRAIN:line (16,10),(16,11),'|' - TERRAIN:line (9,13),(14,13), 'B' -} - - -# Dungeon Description -# The shrine to Moloch. -REGION:(01,06,05,14),lit,"temple" -# The Morgues -REGION:(19,01,24,08),unlit,"morgue",filled,irregular -REGION:(09,14,16,18),unlit,"morgue",filled,irregular -REGION:(37,09,43,14),unlit,"morgue",filled,irregular -# Stairs -STAIR:(01,01),down -# Branch location -BRANCH:(66,17,66,17),(0,0,0,0) -TELEPORT_REGION:(58,09,72,18),(0,0,0,0),down - -# Secret Doors -DOOR:locked,(04,01) -DOOR:locked,(08,04) -DOOR:locked,(06,06) - -# The altar of Moloch. -ALTAR:(03,10),noalign,shrine - -# Non diggable walls - everywhere! -NON_DIGGABLE:(00,00,75,19) - -# Objects -# **LOTS** of dead bodies (all human). -# note: no priest(esse)s or monks - maybe Moloch has a *special* -# fate reserved for members of *those* classes. -# -OBJECT:('%',"corpse"),random,montype:"archeologist" -OBJECT:('%',"corpse"),random,montype:"archeologist" -OBJECT:('%',"corpse"),random,montype:"barbarian" -OBJECT:('%',"corpse"),random,montype:"barbarian" -OBJECT:('%',"corpse"),random,montype:"caveman" -OBJECT:('%',"corpse"),random,montype:"cavewoman" -OBJECT:('%',"corpse"),random,montype:"healer" -OBJECT:('%',"corpse"),random,montype:"healer" -OBJECT:('%',"corpse"),random,montype:"knight" -OBJECT:('%',"corpse"),random,montype:"knight" -OBJECT:('%',"corpse"),random,montype:"ranger" -OBJECT:('%',"corpse"),random,montype:"ranger" -OBJECT:('%',"corpse"),random,montype:"rogue" -OBJECT:('%',"corpse"),random,montype:"rogue" -OBJECT:('%',"corpse"),random,montype:"samurai" -OBJECT:('%',"corpse"),random,montype:"samurai" -OBJECT:('%',"corpse"),random,montype:"tourist" -OBJECT:('%',"corpse"),random,montype:"tourist" -OBJECT:('%',"corpse"),random,montype:"valkyrie" -OBJECT:('%',"corpse"),random,montype:"valkyrie" -OBJECT:('%',"corpse"),random,montype:"wizard" -OBJECT:('%',"corpse"),random,montype:"wizard" -# -# Some random weapons and armor. -# -OBJECT:'[',random -OBJECT:'[',random -OBJECT:'[',random -OBJECT:'[',random -OBJECT:')',random -OBJECT:')',random -OBJECT:')',random -OBJECT:')',random -# -# Some random loot. -# -OBJECT:('*',"ruby"),random -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'!',random -OBJECT:'!',random -OBJECT:'!',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'/',random -OBJECT:'/',random -OBJECT:'=',random -OBJECT:'=',random -OBJECT:'+',random -OBJECT:'+',random -OBJECT:'(',random -OBJECT:'(',random -OBJECT:'(',random - -# (Not so) Random traps. -TRAP:"spiked pit", (05,02) -TRAP:"spiked pit", (14,05) -TRAP:"sleep gas", (03,01) -TRAP:"board", (21,12) -TRAP:"board", random -TRAP:"dart", (60,01) -TRAP:"dart", (26,17) -TRAP:"anti magic", random -TRAP:"anti magic", random -TRAP:"magic", random -TRAP:"magic", random - -# Random monsters. -# The ghosts. -MONSTER:(' ',"ghost"),random -MONSTER:(' ',"ghost"),random -MONSTER:(' ',"ghost"),random -MONSTER:(' ',"ghost"),random -MONSTER:(' ',"ghost"),random -MONSTER:(' ',"ghost"),random -# Add a few bats for atmosphere. -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -MONSTER:('B',"vampire bat"),random -# And a lich for good measure. -MONSTER:'L',random -# Some undead nasties for good measure -MONSTER:'V',random -MONSTER:'V',random -MONSTER:'V',random -MONSTER:'Z',random -MONSTER:'Z',random -MONSTER:'Z',random -MONSTER:'Z',random -MONSTER:'M',random -MONSTER:'M',random -MONSTER:'M',random -MONSTER:'M',random -# -# The Juiblex level -# -MAZE:"juiblex",' ' -FLAGS:noteleport,shortsighted -INIT_MAP:mines,'.','}',true,true,unlit,false -# guarantee at least one open spot to ensure successful stair placement -GEOMETRY:left,bottom -MAP -xxxxxxxx -xx...xxx -xxx...xx -xxxx.xxx -xxxxxxxx -ENDMAP -OBJECT:('`',"boulder"),random -GEOMETRY:right,top -MAP -xxxxxxxx -xxxx.xxx -xxx...xx -xx...xxx -xxxxxxxx -ENDMAP -OBJECT:('`',"boulder"),random -# lair -GEOMETRY:center,center -MAP -xx}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}xx -x}}}.}}}}}..}}}..}}}}}..}}}..}}}}}..}}}..}}}}}.}}}x -}}}...}}..}}.}.}}.}}.}}}...}}}.}}}..}}}..}}}}...}}} -x}}}.}}.}}}.}}.}}.}}...}}.}}.....}}.....}....}.}}}x -xx}}}..}}}.}}.}}.}}..}}.....}}.}}}.}}.}}}}}}}}}}}xx -x}}}..}}}}}.}}.}}.}}...}}}}}.....}}.}}}}}}.....}}}x -}}}..}}...}}..}}.}}}.}}}...}}}.}}}.}.}}}}..P.P..}}} -}}.}}}}...}}}}}.}...}}}..P..}}}.}.}}}.}}}}.....}}}} -}.}}}}.}}.}..}.}}}}}}}..P.P..}}}.}}}.}}..}}...}}}}x -x}}}}.}}}}....}}}}}.}}}..P..}}}.}}}}.}}..}}...}}}.} -}}}}..}}.}}..}}}}...}}}}...}}}.}}}}}.}}}}.}}}}}}.}} -}}}...}}...}}}..}}}}}}}}}}}}.....}}}}.}}...}..}.}}} -x}}}..}}.}}}}....}}..}}}..}}.....}}}}.}}}.}....}}}x -xx}}}.}}}}..}}..}}..}}..}}..}}.}}}..}.}..}}}..}}}xx -x}}}.}}}}....}}}}..}}....}}}}}}}...}}}....}}}}.}}}x -}}}...}}}....}}}..}}}....}}}..}}...}}}....}}}...}}} -x}}}.}}}}}..}}}..}}}}}..}}}..}}}}}..}}}..}}}}}.}}}x -xx}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}xx -ENDMAP -# Random registers -$monster = monster: { 'j','b','P','F' } -SHUFFLE: $monster - -$place = { (04,02),(46,02),(04,15),(46,15) } -SHUFFLE: $place - -# Dungeon description -REGION:(00,00,50,17),unlit,"swamp" -MAZEWALK:(00,09),west -MAZEWALK:(50,08),east -STAIR:levregion(01,00,11,20),(0,0,50,17),down -STAIR:levregion(69,00,79,20),(0,0,50,17),up -BRANCH:levregion(01,00,11,20),(0,0,50,17) -TELEPORT_REGION:levregion(01,00,11,20),(0,0,50,17),up -TELEPORT_REGION:levregion(69,00,79,20),(0,0,50,17),down -FOUNTAIN:$place[0] -MONSTER:('m',"giant mimic"),$place[1],m_feature "fountain" -MONSTER:('m',"giant mimic"),$place[2],m_feature "fountain" -MONSTER:('m',"giant mimic"),$place[3],m_feature "fountain" -# The demon of the swamp -MONSTER:('&',"Juiblex"),(25,08) -# And a couple demons -MONSTER:('i',"lemure"),(43,08) -MONSTER:('i',"lemure"),(44,08) -MONSTER:('i',"lemure"),(45,08) -# Some liquids and gems -OBJECT:'*',(43,06) -OBJECT:'*',(45,06) -OBJECT:'!',(43,09) -OBJECT:'!',(44,09) -OBJECT:'!',(45,09) -# And lots of blobby monsters -MONSTER:$monster[0],(25,06) -MONSTER:$monster[1],(24,07) -MONSTER:$monster[2],(26,07) -MONSTER:$monster[3],(23,08) -MONSTER:$monster[3],(27,08) -MONSTER:$monster[2],(24,09) -MONSTER:$monster[1],(26,09) -MONSTER:$monster[0],(25,10) -MONSTER:'j',random -MONSTER:'j',random -MONSTER:'j',random -MONSTER:'j',random -MONSTER:'P',random -MONSTER:'P',random -MONSTER:'P',random -MONSTER:'P',random -MONSTER:'b',random -MONSTER:'b',random -MONSTER:'b',random -MONSTER:'F',random -MONSTER:'F',random -MONSTER:'F',random -MONSTER:'m',random -MONSTER:'m',random -MONSTER:(';',"jellyfish"),random -MONSTER:(';',"jellyfish"),random -# Some random objects -OBJECT:'!',random -OBJECT:'!',random -OBJECT:'!',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:('`',"boulder"),random -# Some traps -TRAP:"sleep gas",random -TRAP:"sleep gas",random -TRAP:"anti magic",random -TRAP:"anti magic",random -TRAP:"magic",random -TRAP:"magic",random -# -# The Orcus Level -# -MAZE:"orcus",random -FLAGS: noteleport,shortsighted -GEOMETRY:right,center -# A ghost town -MAP -.|....|....|....|..............|....|........ -.|....|....|....|..............|....|........ -.|....|....|....|--...-+-------|............. -.|....|....|....|..............+............. -.|.........|....|..............|....|........ -.--+-...-+----+--....-------...--------.-+--- -.....................|.....|................. -.....................|.....|................. -.--+----....-+---....|.....|...----------+--- -.|....|....|....|....---+---...|......|...... -.|.........|....|..............|......|...... -.----...---------.....-----....+......|...... -.|........................|....|......|...... -.----------+-...--+--|....|....----------+--- -.|....|..............|....+....|............. -.|....+.......|......|....|....|............. -.|....|.......|......|....|....|............. -ENDMAP -MAZEWALK:(00,06),west -# Entire main area -REGION:(01,00,44,16),unlit,"ordinary" -STAIR:(33,15),down -STAIR:levregion(01,00,12,20),levregion(20,01,70,20),up -BRANCH:levregion(01,00,12,20),levregion(20,01,70,20) -TELEPORT_REGION:levregion(01,00,12,20),levregion(20,01,70,20) -# Wall "ruins" -OBJECT:('`',"boulder"),(19,02) -OBJECT:('`',"boulder"),(20,02) -OBJECT:('`',"boulder"),(21,02) -OBJECT:('`',"boulder"),(36,02) -OBJECT:('`',"boulder"),(36,03) -OBJECT:('`',"boulder"),(06,04) -OBJECT:('`',"boulder"),(05,05) -OBJECT:('`',"boulder"),(06,05) -OBJECT:('`',"boulder"),(07,05) -OBJECT:('`',"boulder"),(39,05) -OBJECT:('`',"boulder"),(08,08) -OBJECT:('`',"boulder"),(09,08) -OBJECT:('`',"boulder"),(10,08) -OBJECT:('`',"boulder"),(11,08) -OBJECT:('`',"boulder"),(06,10) -OBJECT:('`',"boulder"),(05,11) -OBJECT:('`',"boulder"),(06,11) -OBJECT:('`',"boulder"),(07,11) -OBJECT:('`',"boulder"),(21,11) -OBJECT:('`',"boulder"),(21,12) -OBJECT:('`',"boulder"),(13,13) -OBJECT:('`',"boulder"),(14,13) -OBJECT:('`',"boulder"),(15,13) -OBJECT:('`',"boulder"),(14,14) -# Doors -DOOR:closed,(23,02) -DOOR:open,(31,03) -DOOR:nodoor,(03,05) -DOOR:closed,(09,05) -DOOR:closed,(14,05) -DOOR:closed,(41,05) -DOOR:open,(03,08) -DOOR:nodoor,(13,08) -DOOR:open,(41,08) -DOOR:closed,(24,09) -DOOR:closed,(31,11) -DOOR:open,(11,13) -DOOR:closed,(18,13) -DOOR:closed,(41,13) -DOOR:open,(26,14) -DOOR:closed,(06,15) -# Special rooms -ALTAR:(24,07),noalign,sanctum -REGION:(22,12,25,16),unlit,"morgue" -REGION:(32,09,37,12),lit,"shop" -REGION:(12,00,15,04),lit,"shop" -# Some traps. -TRAP:"spiked pit", random -TRAP:"sleep gas", random -TRAP:"anti magic", random -TRAP:"fire", random -TRAP:"fire", random -TRAP:"fire", random -TRAP:"magic", random -TRAP:"magic", random -# Some random objects -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# The resident nasty -MONSTER:('&',"Orcus"),(33,15) -# And its preferred companions -MONSTER:('Z',"human zombie"),(32,15) -MONSTER:(' ',"shade"),(32,14) -MONSTER:(' ',"shade"),(32,16) -MONSTER:('V',"vampire"),(35,16) -MONSTER:('V',"vampire"),(35,14) -MONSTER:('V',"vampire lord"),(36,14) -MONSTER:('V',"vampire lord"),(36,15) -# Randomly placed companions -MONSTER:('Z',"skeleton"),random -MONSTER:('Z',"skeleton"),random -MONSTER:('Z',"skeleton"),random -MONSTER:('Z',"skeleton"),random -MONSTER:('Z',"skeleton"),random -MONSTER:(' ',"shade"),random -MONSTER:(' ',"shade"),random -MONSTER:(' ',"shade"),random -MONSTER:(' ',"shade"),random -MONSTER:('Z',"giant zombie"),random -MONSTER:('Z',"giant zombie"),random -MONSTER:('Z',"giant zombie"),random -MONSTER:('Z',"ettin zombie"),random -MONSTER:('Z',"ettin zombie"),random -MONSTER:('Z',"ettin zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('Z',"human zombie"),random -MONSTER:('V',"vampire"),random -MONSTER:('V',"vampire"),random -MONSTER:('V',"vampire"),random -MONSTER:('V',"vampire lord"),random -MONSTER:('V',"vampire lord"),random -# A few more for the party -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -# -# The Asmodeus Level -# -MAZE:"asmodeus",random -FLAGS: noteleport -# First part -GEOMETRY:half-left,center -MAP ---------------------- -|.............|.....| -|.............S.....| -|---+------------...| -|.....|.........|-+-- -|..---|.........|.... -|..|..S.........|.... -|..|..|.........|.... -|..|..|.........|-+-- -|..|..-----------...| -|..S..........|.....| ---------------------- -ENDMAP -STAIR:levregion(01,00,6,20),levregion(6,1,70,16),up -BRANCH:levregion(01,00,6,20),levregion(6,1,70,16) -TELEPORT_REGION:levregion(01,00,6,20),levregion(6,1,70,16) - -# Doors -DOOR:closed,(04,03) -DOOR:locked,(18,04) -DOOR:closed,(18,08) -# -STAIR:(13,07),down -# Non diggable walls -NON_DIGGABLE:(00,00,20,11) -# Entire main area -REGION:(01,01,20,10),unlit,"ordinary" -# The fellow in residence -MONSTER:('&',"Asmodeus"),(12,07) -# Some random weapons and armor. -OBJECT:'[',random -OBJECT:'[',random -OBJECT:')',random -OBJECT:')',random -OBJECT:'*',random -OBJECT:'!',random -OBJECT:'!',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'?',random -# Some traps. -TRAP:"spiked pit", (05,02) -TRAP:"fire", (08,06) -TRAP:"sleep gas", random -TRAP:"anti magic", random -TRAP:"fire", random -TRAP:"magic", random -TRAP:"magic", random -# Random monsters. -MONSTER:(' ',"ghost"),(11,07) -MONSTER:('&',"horned devil"),(10,05) -MONSTER:'L',random -# Some Vampires for good measure -MONSTER:'V',random -MONSTER:'V',random -MONSTER:'V',random -# Second part -GEOMETRY:half-right,center -MAP ---------------------------------- -................................| -................................+ -................................| ---------------------------------- -ENDMAP -MAZEWALK:(32,02),east -# Non diggable walls -NON_DIGGABLE:(00,00,32,04) -DOOR:closed,(32,02) -MONSTER:'&',random -MONSTER:'&',random -MONSTER:'&',random -TRAP:"anti magic", random -TRAP:"fire", random -TRAP:"magic", random - -# -# The Baalzebub level -# -MAZE:"baalz",' ' -FLAGS: noteleport,corrmaze -GEOMETRY:right,center -# the two pools are fakes used to mark spots which need special wall fixups -# the two iron bars are eyes and spots to their left will be made diggable -MAP -------------------------------------------------- -| ---- ---- -| ---- | ----------- | -| ------ | ---------|.........|--P -| F....| -------|...........-------------- ----....|--|..................S............|---- -+...--....S..----------------|............S...| ----....|--|..................|............|---- -| F....| -------|...........-----S-------- -| ------ | ---------|.........|--P -| ---- | ----------- | -| ---- ---- -------------------------------------------------- -ENDMAP -STAIR:levregion(01,00,15,20),levregion(15,1,70,16),up -BRANCH:levregion(01,00,15,20),levregion(15,1,70,16) -TELEPORT_REGION:levregion(01,00,15,20),levregion(15,1,70,16) -# this actually leaves the farthest right column diggable -NON_DIGGABLE:(00,00,47,12) -MAZEWALK:(00,06),west -STAIR:(44,06),down -DOOR:locked,(00,06) -IF [50%] { - TERRAIN:(34,08),'-' - TERRAIN:(34,04),'S' - TERRAIN:(29,05),'|' - TERRAIN:(29,07),'S' -} -# The fellow in residence -MONSTER:('&',"Baalzebub"),(35,06) -# Some random weapons and armor. -OBJECT:'[',random -OBJECT:'[',random -OBJECT:')',random -OBJECT:')',random -OBJECT:'*',random -OBJECT:'!',random -OBJECT:'!',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'?',random -# Some traps. -TRAP:"spiked pit", random -TRAP:"fire", random -TRAP:"sleep gas", random -TRAP:"anti magic", random -TRAP:"fire", random -TRAP:"magic", random -TRAP:"magic", random -# Random monsters. -MONSTER:(' ',"ghost"),(37,07) -MONSTER:('&',"horned devil"),(32,05) -MONSTER:('&',"barbed devil"),(38,07) -MONSTER:'L',random -# Some Vampires for good measure -MONSTER:'V',random -MONSTER:'V',random -MONSTER:'V',random -# -# The Sanctum Level -# -MAZE:"sanctum", ' ' -FLAGS: noteleport,hardfloor,nommap -# This is outside the main map, below, so we must do it before adding -# that map and anchoring coordinates to it. This extends the invisible -# barrier up to the top row, which falls outside the drawn map. -NON_PASSWALL:(39,00,41,00) -GEOMETRY:center,center -MAP ----------------------------------------------------------------------------- -| -------------- | -| |............| ------- | -| -------............----- |.....| | -| |......................| --.....| --------- | -| ----......................---------|......---- |.......| | -| |........---------..........|......+.........| ------+---..| | -| ---........|.......|..........--S----|.........| |........|..| | -| |..........|.......|.............| |.........-------..---------- | -| |..........|.......|..........---- |..........|....|..|......| | -| |..........|.......|..........| --.......----+---S---S--..| | -| |..........---------..........| |.......|.............|..| | -| ---...........................| -----+-------S---------S--- | -| |...........................| |...| |......| |....|-- | -| ----.....................---- |...---....--- ---......| | -| |.....................| |..........| |.....---- | -| -------...........----- --...------- |.....| | -| |...........| |...| |.....| | -| ------------- ----- ------- | ----------------------------------------------------------------------------- -ENDMAP -REGION:(15,07,21,10),lit,"temple" -ALTAR:(18,08),noalign,sanctum -REGION:(41,06,48,11),unlit,"morgue",filled,irregular -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Invisible barrier separating the left & right halves of the level -NON_PASSWALL:(37,00,39,19) -# Doors -DOOR:closed,(40,06) -DOOR:locked,(62,06) -DOOR:closed,(46,12) -DOOR:closed,(53,10) -# Surround the temple with fire -TRAP:"fire",(13,05) -TRAP:"fire",(14,05) -TRAP:"fire",(15,05) -TRAP:"fire",(16,05) -TRAP:"fire",(17,05) -TRAP:"fire",(18,05) -TRAP:"fire",(19,05) -TRAP:"fire",(20,05) -TRAP:"fire",(21,05) -TRAP:"fire",(22,05) -TRAP:"fire",(23,05) -TRAP:"fire",(13,12) -TRAP:"fire",(14,12) -TRAP:"fire",(15,12) -TRAP:"fire",(16,12) -TRAP:"fire",(17,12) -TRAP:"fire",(18,12) -TRAP:"fire",(19,12) -TRAP:"fire",(20,12) -TRAP:"fire",(21,12) -TRAP:"fire",(22,12) -TRAP:"fire",(23,12) -TRAP:"fire",(13,06) -TRAP:"fire",(13,07) -TRAP:"fire",(13,08) -TRAP:"fire",(13,09) -TRAP:"fire",(13,10) -TRAP:"fire",(13,11) -TRAP:"fire",(23,06) -TRAP:"fire",(23,07) -TRAP:"fire",(23,08) -TRAP:"fire",(23,09) -TRAP:"fire",(23,10) -TRAP:"fire",(23,11) -# Some traps. -TRAP:"spiked pit", random -TRAP:"fire", random -TRAP:"sleep gas", random -TRAP:"anti magic", random -TRAP:"fire", random -TRAP:"magic", random -# Some random objects -OBJECT:'[',random -OBJECT:'[',random -OBJECT:'[',random -OBJECT:'[',random -OBJECT:')',random -OBJECT:')',random -OBJECT:'*',random -OBJECT:'!',random -OBJECT:'!',random -OBJECT:'!',random -OBJECT:'!',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'?',random -# Some monsters. -MONSTER:('&',"horned devil"),(14,12),hostile -MONSTER:('&',"barbed devil"),(18,08),hostile -MONSTER:('&',"erinys"),(10,04),hostile -MONSTER:('&',"marilith"),(07,09),hostile -MONSTER:('&',"nalfeshnee"),(27,08),hostile -# Moloch's horde -MONSTER:('@',"aligned priest"),(20,03),noalign,hostile -MONSTER:('@',"aligned priest"),(15,04),noalign,hostile -MONSTER:('@',"aligned priest"),(11,05),noalign,hostile -MONSTER:('@',"aligned priest"),(11,07),noalign,hostile -MONSTER:('@',"aligned priest"),(11,09),noalign,hostile -MONSTER:('@',"aligned priest"),(11,12),noalign,hostile -MONSTER:('@',"aligned priest"),(15,13),noalign,hostile -MONSTER:('@',"aligned priest"),(17,13),noalign,hostile -MONSTER:('@',"aligned priest"),(21,13),noalign,hostile -# A few nasties -MONSTER:'L',random -MONSTER:'L',random -MONSTER:'V',random -MONSTER:'V',random -MONSTER:'V',random -STAIR:(63,15),up -# Teleporting to this level is allowed after the invocation creates its -# entrance. Force arrival in that case to be on rightmost third of level. -TELEPORT_REGION:levregion(54,1,79,18),(0,0,0,0),down diff --git a/dat/juiblex.lua b/dat/juiblex.lua new file mode 100644 index 000000000..19c95e884 --- /dev/null +++ b/dat/juiblex.lua @@ -0,0 +1,125 @@ +-- NetHack 3.6 gehennom.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992 by M. Stephenson and Izchak Miller +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "shortsighted") +-- des.level_init(mines,'.','}',true,true,unlit,false) +des.level_init({ style = "mines", fg = ".", bg = "}", smoothed=1, joined=1, lit=0 }); +-- guarantee at least one open spot to ensure successful stair placement +des.map({ halign = "left", valign = "bottom", map = [[ +xxxxxxxx +xx...xxx +xxx...xx +xxxx.xxx +xxxxxxxx +]] }); +des.object("boulder") +des.map({ halign = "right", valign = "top", map = [[ +xxxxxxxx +xxxx.xxx +xxx...xx +xx...xxx +xxxxxxxx +]] }); +des.object("boulder") +-- lair +des.map([[ +xx}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}xx +x}}}.}}}}}..}}}..}}}}}..}}}..}}}}}..}}}..}}}}}.}}}x +}}}...}}..}}.}.}}.}}.}}}...}}}.}}}..}}}..}}}}...}}} +x}}}.}}.}}}.}}.}}.}}...}}.}}.....}}.....}....}.}}}x +xx}}}..}}}.}}.}}.}}..}}.....}}.}}}.}}.}}}}}}}}}}}xx +x}}}..}}}}}.}}.}}.}}...}}}}}.....}}.}}}}}}.....}}}x +}}}..}}...}}..}}.}}}.}}}...}}}.}}}.}.}}}}..P.P..}}} +}}.}}}}...}}}}}.}...}}}..P..}}}.}.}}}.}}}}.....}}}} +}.}}}}.}}.}..}.}}}}}}}..P.P..}}}.}}}.}}..}}...}}}}x +x}}}}.}}}}....}}}}}.}}}..P..}}}.}}}}.}}..}}...}}}.} +}}}}..}}.}}..}}}}...}}}}...}}}.}}}}}.}}}}.}}}}}}.}} +}}}...}}...}}}..}}}}}}}}}}}}.....}}}}.}}...}..}.}}} +x}}}..}}.}}}}....}}..}}}..}}.....}}}}.}}}.}....}}}x +xx}}}.}}}}..}}..}}..}}..}}..}}.}}}..}.}..}}}..}}}xx +x}}}.}}}}....}}}}..}}....}}}}}}}...}}}....}}}}.}}}x +}}}...}}}....}}}..}}}....}}}..}}...}}}....}}}...}}} +x}}}.}}}}}..}}}..}}}}}..}}}..}}}}}..}}}..}}}}}.}}}x +xx}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}xx +]]); +-- Random registers +local monster = { "j","b","P","F" } +shuffle(monster) + +local place = selection.new(); +place:set(04,02); +place:set(46,02); +place:set(04,15); +place:set(46,15); + +-- Dungeon description +des.region({ region={00,00,50,17}, lit=0, type="swamp" }) +des.mazewalk(00,09,"west") +des.mazewalk(50,08,"east") +des.levregion({ region = {01,00,11,20}, region_islev=1, exclude={0,0,50,17}, type="stair-down" }); +des.levregion({ region = {69,00,79,20}, region_islev=1, exclude={0,0,50,17}, type="stair-up" }); +des.levregion({ region = {01,00,11,20}, region_islev=1, exclude={0,0,50,17}, type="branch" }); +des.teleport_region({ region = {01,00,11,20}, region_islev=1, exclude={0,0,50,17},dir="up" }) +des.teleport_region({ region = {69,00,79,20}, region_islev=1, exclude={0,0,50,17},dir="down" }) +des.feature("fountain", place:rndcoord(1)) +des.monster({ id = "giant mimic", coord = { place:rndcoord(1) }, appear_as = "ter:fountain" }) +des.monster({ id = "giant mimic", coord = { place:rndcoord(1) }, appear_as = "ter:fountain" }) +des.monster({ id = "giant mimic", coord = { place:rndcoord(1) }, appear_as = "ter:fountain" }) +-- The demon of the swamp +des.monster("Juiblex",25,08) +-- And a couple demons +des.monster("lemure",43,08) +des.monster("lemure",44,08) +des.monster("lemure",45,08) +-- Some liquids and gems +des.object("*",43,06) +des.object("*",45,06) +des.object("!",43,09) +des.object("!",44,09) +des.object("!",45,09) +-- And lots of blobby monsters +des.monster(monster[4],25,06) +des.monster(monster[1],24,07) +des.monster(monster[2],26,07) +des.monster(monster[3],23,08) +des.monster(monster[3],27,08) +des.monster(monster[2],24,09) +des.monster(monster[1],26,09) +des.monster(monster[4],25,10) +des.monster("j") +des.monster("j") +des.monster("j") +des.monster("j") +des.monster("P") +des.monster("P") +des.monster("P") +des.monster("P") +des.monster("b") +des.monster("b") +des.monster("b") +des.monster("F") +des.monster("F") +des.monster("F") +des.monster("m") +des.monster("m") +des.monster("jellyfish") +des.monster("jellyfish") +-- Some random objects +des.object("!") +des.object("!") +des.object("!") +des.object("%") +des.object("%") +des.object("%") +des.object("boulder") +-- Some traps +des.trap("sleep gas") +des.trap("sleep gas") +des.trap("anti magic") +des.trap("anti magic") +des.trap("magic") +des.trap("magic") diff --git a/dat/knox.des b/dat/knox.des deleted file mode 100644 index 13a56035b..000000000 --- a/dat/knox.des +++ /dev/null @@ -1,153 +0,0 @@ -# NetHack 3.6 knox.des $NHDT-Date: 1547343821 2019/01/13 01:43:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.13 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1992 by Izchak Miller -# NetHack may be freely redistributed. See license for details. -# -MAZE:"knox",' ' -FLAGS: noteleport -GEOMETRY:center,center -# Fort's entry is via a secret door rather than a drawbridge; -# the moat must be manually circumvented. -MAP ----------------------------------------------------------------------------- -| |........|...............................................................| -| |........|.................................................------------..| -| --S----S--.................................................|..........|..| -| # |........}}}}}}}....................}}}}}}}..........|..........|..| -| # |........}-----}....................}-----}..........--+--+--...|..| -| # ---........}|...|}}}}}}}}}}}}}}}}}}}}}}|...|}.................|...|..| -| # |..........}---S------------------------S---}.................|...|..| -| # |..........}}}|...............|..........|}}}.................+...|..| -| --S----..........}|...............S..........|}...................|...|..| -| |.....|..........}|...............|......\...S}...................|...|..| -| |.....+........}}}|...............|..........|}}}.................+...|..| -| |.....|........}---S------------------------S---}.................|...|..| -| |.....|........}|...|}}}}}}}}}}}}}}}}}}}}}}|...|}.................|...|..| -| |..-S----......}-----}....................}-----}..........--+--+--...|..| -| |..|....|......}}}}}}}....................}}}}}}}..........|..........|..| -| |..|....|..................................................|..........|..| -| -----------................................................------------..| -| |..............................................................| ----------------------------------------------------------------------------- -ENDMAP -# Non diggable walls -NON_DIGGABLE:(00,00,75,19) -# Portal arrival point -BRANCH:(08,16,08,16),(0,0,0,0) -# accessible via ^V in wizard mode; arrive near the portal -TELEPORT_REGION:(06,15,09,16),(0,0,0,0),up -TELEPORT_REGION:(06,15,09,16),(0,0,0,0),down -# Throne room, with Croesus on the throne -REGION:(37,08,46,11),lit,"throne" -# 50% chance each to move throne and/or fort's entry secret door up one row -IF [50%] { - MONSTER:('@',"Croesus"),(43,10),hostile -} ELSE { - MONSTER:('@',"Croesus"),(43,09),hostile - TERRAIN:(43,09), '\' - TERRAIN:(43,10), '.' -} -IF [50%] { - TERRAIN:(47,09), 'S' - TERRAIN:(47,10), '|' -} -# The Vault -# Using unfilled morgue for -# identification in mkmaze.c -REGION:(21,08,35,11),lit,"morgue",unfilled -# Vault entrance also varies -IF [50%] { - TERRAIN:(36,09), '|' - TERRAIN:(36,10), 'S' -} -# Corner towers -REGION:(19,06,21,06),lit,"ordinary" -REGION:(46,06,48,06),lit,"ordinary" -REGION:(19,13,21,13),lit,"ordinary" -REGION:(46,13,48,13),lit,"ordinary" -# A welcoming committee -REGION:(03,10,07,13),lit,"zoo",filled,irregular -# arrival chamber; needs to be a real room to control migrating monsters, -# and `unfilled' is a kludge to force an ordinary room to remain a room -REGION:(06,15,09,16),unlit,"ordinary",unfilled - -# 3.6.2: Entering level carrying a lit candle would show the whole entry -# chamber except for its top right corner even though some of the revealed -# spots are farther away than that is. This is because the lit treasure zoo -# is forcing the walls around it to be lit too (see light_region(sp_lev.c)), -# and lit walls show up when light reaches the spot next to them. The unlit -# corner is beyond candle range and isn't flagged as lit so it doesn't show -# up until light reaches it rather than when light gets next to it. -# -# Force left and top walls of the arrival chamber to be unlit in order to -# hide this lighting quirk. -REGION:(05,14,05,17),unlit,"ordinary" -REGION:(05,14,09,14),unlit,"ordinary" -# (Entering the treasure zoo while blind and then regaining sight might -# expose the new oddity of these walls not appearing when on the lit side -# but that's even less likely to occur than the rare instance of entering -# the level with a candle. They'll almost always be mapped from the arrival -# side before entering the treasure zoo. -# -# A prior workaround lit the top right corner wall and then jumped through -# hoops to suppress the extra light in the 3x3 lit area that produced. -# This is simpler and makes the short range candle light behave more like -# it is expected to work.) - -# Barracks -REGION:(62,03,71,04),lit,"barracks",filled,irregular -# Doors -DOOR:closed,(06,14) -DOOR:closed,(09,03) -DOOR:open,(63,05) -DOOR:open,(66,05) -DOOR:open,(68,08) -DOOR:locked,(08,11) -DOOR:open,(68,11) -DOOR:closed,(63,14) -DOOR:closed,(66,14) -DOOR:closed,(04,03) -DOOR:closed,(04,09) -# Soldiers guarding the fort -MONSTER:('@',"soldier"),(12,14) -MONSTER:('@',"soldier"),(12,13) -MONSTER:('@',"soldier"),(11,10) -MONSTER:('@',"soldier"),(13,02) -MONSTER:('@',"soldier"),(14,03) -MONSTER:('@',"soldier"),(20,02) -MONSTER:('@',"soldier"),(30,02) -MONSTER:('@',"soldier"),(40,02) -MONSTER:('@',"soldier"),(30,16) -MONSTER:('@',"soldier"),(32,16) -MONSTER:('@',"soldier"),(40,16) -MONSTER:('@',"soldier"),(54,16) -MONSTER:('@',"soldier"),(54,14) -MONSTER:('@',"soldier"),(54,13) -MONSTER:('@',"soldier"),(57,10) -MONSTER:('@',"soldier"),(57,09) -MONSTER:('@',"lieutenant"),(15,08) -# Possible source of a boulder -MONSTER:('H',"stone giant"),(03,01) -# Four dragons guarding each side -MONSTER:'D',(18,09) -MONSTER:'D',(49,10) -MONSTER:'D',(33,05) -MONSTER:'D',(33,14) -# Eels in the moat -MONSTER:(';',"giant eel"),(17,08) -MONSTER:(';',"giant eel"),(17,11) -MONSTER:(';',"giant eel"),(48,08) -MONSTER:(';',"giant eel"),(48,11) -# The corner rooms treasures -OBJECT:('*',"diamond"),(19,06) -OBJECT:('*',"diamond"),(20,06) -OBJECT:('*',"diamond"),(21,06) -OBJECT:('*',"emerald"),(19,13) -OBJECT:('*',"emerald"),(20,13) -OBJECT:('*',"emerald"),(21,13) -OBJECT:('*',"ruby"),(46,06) -OBJECT:('*',"ruby"),(47,06) -OBJECT:('*',"ruby"),(48,06) -OBJECT:('*',"amethyst"),(46,13) -OBJECT:('*',"amethyst"),(47,13) -OBJECT:('*',"amethyst"),(48,13) diff --git a/dat/knox.lua b/dat/knox.lua new file mode 100644 index 000000000..360edce13 --- /dev/null +++ b/dat/knox.lua @@ -0,0 +1,154 @@ +-- NetHack 3.6 knox.des $NHDT-Date: 1547343821 2019/01/13 01:43:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992 by Izchak Miller +-- NetHack may be freely redistributed. See license for details. +-- +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport") +-- Fort's entry is via a secret door rather than a drawbridge; +-- the moat must be manually circumvented. +des.map([[ +---------------------------------------------------------------------------- +| |........|...............................................................| +| |........|.................................................------------..| +| --S----S--.................................................|..........|..| +| # |........}}}}}}}....................}}}}}}}..........|..........|..| +| # |........}-----}....................}-----}..........--+--+--...|..| +| # ---........}|...|}}}}}}}}}}}}}}}}}}}}}}|...|}.................|...|..| +| # |..........}---S------------------------S---}.................|...|..| +| # |..........}}}|...............|..........|}}}.................+...|..| +| --S----..........}|...............S..........|}...................|...|..| +| |.....|..........}|...............|......\...S}...................|...|..| +| |.....+........}}}|...............|..........|}}}.................+...|..| +| |.....|........}---S------------------------S---}.................|...|..| +| |.....|........}|...|}}}}}}}}}}}}}}}}}}}}}}|...|}.................|...|..| +| |..-S----......}-----}....................}-----}..........--+--+--...|..| +| |..|....|......}}}}}}}....................}}}}}}}..........|..........|..| +| |..|....|..................................................|..........|..| +| -----------................................................------------..| +| |..............................................................| +---------------------------------------------------------------------------- +]]); +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Portal arrival point +des.levregion({ region = {08,16,08,16}, type="branch" }); +-- accessible via ^V in wizard mode; arrive near the portal +des.teleport_region({ region = {06,15,09,16}, dir="up" }) +des.teleport_region({ region = {06,15,09,16}, dir="down" }) +-- Throne room, with Croesus on the throne +des.region({ x1=37,y1=08,x2=46,y2=11, lit=1, type="throne", prefilled=0 }) +-- 50% chance each to move throne and/or fort's entry secret door up one row +if math.random(0, 99) < 50 then + des.monster({ id = "Croesus", x=43, y=10, peaceful = 0 }) +else + des.monster({ id = "Croesus", x=43, y=09, peaceful = 0 }) + des.terrain(43,09, "\\") + des.terrain(43,10, ".") +end +if math.random(0, 99) < 50 then + des.terrain(47,09, "S") + des.terrain(47,10, "|") +end +-- The Vault +-- Using unfilled morgue for +-- identification in mkmaze.c +des.region({ region={21,08,35,11}, lit=1, type="morgue", prefilled=1 }) +-- Vault entrance also varies +if math.random(0, 99) < 50 then + des.terrain(36,09, "|") + des.terrain(36,10, "S") +end +-- Corner towers +des.region(selection.area(19,06,21,06),"lit") +des.region(selection.area(46,06,48,06),"lit") +des.region(selection.area(19,13,21,13),"lit") +des.region(selection.area(46,13,48,13),"lit") +-- A welcoming committee +des.region({ region={03,10,07,13},lit=1,type="zoo",prefilled=0,irregular=1 }) +-- arrival chamber; needs to be a real room to control migrating monsters, +-- and `unfilled' is a kludge to force an ordinary room to remain a room +des.region({ region={06,15,09,16},lit=0,type="ordinary",prefilled=0 }) + +-- 3.6.2: Entering level carrying a lit candle would show the whole entry +-- chamber except for its top right corner even though some of the revealed +-- spots are farther away than that is. This is because the lit treasure zoo +-- is forcing the walls around it to be lit too (see light_region(sp_lev.c)), +-- and lit walls show up when light reaches the spot next to them. The unlit +-- corner is beyond candle range and isn't flagged as lit so it doesn't show +-- up until light reaches it rather than when light gets next to it. +-- +-- Force left and top walls of the arrival chamber to be unlit in order to +-- hide this lighting quirk. +des.region(selection.area(05,14,05,17),"unlit") +des.region(selection.area(05,14,09,14),"unlit") +-- (Entering the treasure zoo while blind and then regaining sight might +-- expose the new oddity of these walls not appearing when on the lit side +-- but that's even less likely to occur than the rare instance of entering +-- the level with a candle. They'll almost always be mapped from the arrival +-- side before entering the treasure zoo. +-- +-- A prior workaround lit the top right corner wall and then jumped through +-- hoops to suppress the extra light in the 3x3 lit area that produced. +-- This is simpler and makes the short range candle light behave more like +-- it is expected to work.) + +-- Barracks +des.region({ region={62,03,71,04},lit=1,type="barracks",prefilled=0,irregular=1 }) +-- Doors +des.door("closed",06,14) +des.door("closed",09,03) +des.door("open",63,05) +des.door("open",66,05) +des.door("open",68,08) +des.door("locked",08,11) +des.door("open",68,11) +des.door("closed",63,14) +des.door("closed",66,14) +des.door("closed",04,03) +des.door("closed",04,09) +-- Soldiers guarding the fort +des.monster("soldier",12,14) +des.monster("soldier",12,13) +des.monster("soldier",11,10) +des.monster("soldier",13,02) +des.monster("soldier",14,03) +des.monster("soldier",20,02) +des.monster("soldier",30,02) +des.monster("soldier",40,02) +des.monster("soldier",30,16) +des.monster("soldier",32,16) +des.monster("soldier",40,16) +des.monster("soldier",54,16) +des.monster("soldier",54,14) +des.monster("soldier",54,13) +des.monster("soldier",57,10) +des.monster("soldier",57,09) +des.monster("lieutenant",15,08) +-- Possible source of a boulder +des.monster("stone giant",03,01) +-- Four dragons guarding each side +des.monster("D",18,09) +des.monster("D",49,10) +des.monster("D",33,05) +des.monster("D",33,14) +-- Eels in the moat +des.monster("giant eel",17,08) +des.monster("giant eel",17,11) +des.monster("giant eel",48,08) +des.monster("giant eel",48,11) +-- The corner rooms treasures +des.object("diamond",19,06) +des.object("diamond",20,06) +des.object("diamond",21,06) +des.object("emerald",19,13) +des.object("emerald",20,13) +des.object("emerald",21,13) +des.object("ruby",46,06) +des.object("ruby",47,06) +des.object("ruby",48,06) +des.object("amethyst",46,13) +des.object("amethyst",47,13) +des.object("amethyst",48,13) diff --git a/dat/medusa-1.lua b/dat/medusa-1.lua new file mode 100644 index 000000000..635763a5b --- /dev/null +++ b/dat/medusa-1.lua @@ -0,0 +1,121 @@ +-- NetHack 3.6 medusa.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1990, 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- These are the Medusa's levels : +-- + +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport") + +des.map([[ +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}.}}}}}..}}}}}......}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}....}}}...}}}}} +}...}}.....}}}}}....}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}...............} +}....}}}}}}}}}}....}}}..}}}}}}}}}}}.......}}}}}}}}}}}}}}}}..}}.....}}}...}} +}....}}}}}}}}.....}}}}..}}}}}}.................}}}}}}}}}}}.}}}}.....}}...}} +}....}}}}}}}}}}}}.}}}}.}}}}}}.-----------------.}}}}}}}}}}}}}}}}}.........} +}....}}}}}}}}}}}}}}}}}}.}}}...|...............S...}}}}}}}}}}}}}}}}}}}....}} +}.....}.}}....}}}}}}}}}.}}....--------+--------....}}}}}}..}}}}}}}}}}}...}} +}......}}}}..}}}}}}}}}}}}}........|.......|........}}}}}....}}}}}}}}}}}}}}} +}.....}}}}}}}}}}}}}}}}}}}}........|.......|........}}}}}...}}}}}}}}}.}}}}}} +}.....}}}}}}}}}}}}}}}}}}}}....--------+--------....}}}}}}.}.}}}}}}}}}}}}}}} +}......}}}}}}}}}}}}}}}}}}}}...S...............|...}}}}}}}}}}}}}}}}}.}}}}}}} +}.......}}}}}}}..}}}}}}}}}}}}.-----------------.}}}}}}}}}}}}}}}}}....}}}}}} +}........}}.}}....}}}}}}}}}}}}.................}}}}}..}}}}}}}}}.......}}}}} +}.......}}}}}}}......}}}}}}}}}}}}}}.......}}}}}}}}}.....}}}}}}...}}..}}}}}} +}.....}}}}}}}}}}}.....}}}}}}}}}}}}}}}}}}}}}}.}}}}}}}..}}}}}}}}}}....}}}}}}} +}}..}}}}}}}}}}}}}....}}}}}}}}}}}}}}}}}}}}}}...}}..}}}}}}}.}}.}}}}..}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +]]); +-- Dungeon Description +des.region(selection.area(00,00,74,19),"lit") +des.region(selection.area(31,07,45,07),"unlit") +-- (must maintain one room definition; `filled=0' forces its room to be kept) +des.region({ region={35,09, 41,10}, lit = 0, type="ordinary", prefilled = 1 }) +des.region(selection.area(31,12,45,12),"unlit") +-- Teleport: down to up stairs island, up to Medusa's island +des.teleport_region({ region = {01,01,05,17}, dir="down" }) +des.teleport_region({ region = {26,04,50,15}, dir="up" }) +-- Stairs +des.stair("up", 05,14) +des.stair("down", 36,10) +-- Doors +des.door("closed",46,07) +des.door("locked",38,08) +des.door("locked",38,11) +des.door("closed",30,12) +-- Branch, not allowed inside Medusa's building. +des.levregion({ region = {01,00,79,20}, exclude = {30,06,46,13}, type = "branch" }) +-- Non diggable walls +des.non_diggable(selection.area(30,06,46,13)) +-- Objects +des.object({ id = "statue", x=36,y=10, buc="uncursed", + montype="knight", historic=1, male = 1, name="Perseus", + contents = function() + if math.random(0,99) < 75 then + des.object({ id = "shield of reflection", buc="cursed", spe=0 }) + end + if math.random(0,99) < 25 then + des.object({ id = "levitation boots", spe=0 }) + end + if math.random(0,99) < 50 then + des.object({ id = "scimitar", buc="blessed", spe=2 }) + end + if math.random(0,99) < 50 then + des.object("sack") + end + end +}); + +-- Specifying explicit contents forces them to be empty. +des.object({ id = "statue", contents = 0 }) +des.object({ id = "statue", contents = 0 }) +des.object({ id = "statue", contents = 0 }) +des.object({ id = "statue", contents = 0 }) +des.object({ id = "statue", contents = 0 }) +des.object({ id = "statue", contents = 0 }) +des.object({ id = "statue", contents = 0 }) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap("board",38,07) +des.trap("board",38,12) +-- Random monsters +des.monster({ id = "Medusa", x=36,y=10, asleep=1 }) +des.monster("giant eel",11,06) +des.monster("giant eel",23,13) +des.monster("giant eel",29,02) +des.monster("jellyfish",02,02) +des.monster("jellyfish",00,08) +des.monster("jellyfish",04,18) +des.monster("water troll",51,03) +des.monster("water troll",64,11) +des.monster({ class = 'S', x=38, y=07 }) +des.monster({ class = 'S', x=38, y=12 }) +des.monster() +des.monster() +des.monster() +des.monster() +des.monster() +des.monster() +des.monster() +des.monster() +des.monster() +des.monster() diff --git a/dat/medusa-2.lua b/dat/medusa-2.lua new file mode 100644 index 000000000..405627f63 --- /dev/null +++ b/dat/medusa-2.lua @@ -0,0 +1,126 @@ +-- NetHack 3.6 medusa.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1990, 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport") + +des.map([[ +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}------}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}-------}}}}}}}}--------------} +}|....|}}}}}}}}}..}.}}..}}}}}}}}}}}}}..}}}}}}-.....--}}}}}}}|............|} +}|....|.}}}}}}}}}}}.}...}}..}}}}}}}}}}}}}}}}}---......}}}}}.|............|} +}S....|.}}}}}}---}}}}}}}}}}}}}}}}}}}}}}}}}}---...|..-}}}}}}.S..----------|} +}|....|.}}}}}}-...}}}}}}}}}.}}...}.}}}}.}}}......----}}}}}}.|............|} +}|....|.}}}}}}-....--}}}}}}}}}}}}}}}}}}}}}}----...--}}}}}}}.|..--------+-|} +}|....|.}}}}}}}......}}}}...}}}}}}.}}}}}}}}}}}---..---}}}}}.|..|..S...|..|} +}|....|.}}}}}}-....-}}}}}}}------}}}}}}}}}}}}}}-...|.-}}}}}.|..|..|...|..|} +}|....|.}}}}}}}}}---}}}}}}}........}}}}}}}}}}---.|....}}}}}.|..|..|...|..|} +}|....|.}}}}}}}}}}}}}}}}}}-....|...-}}}}}}}}--...----.}}}}}.|..|..|...|..|} +}|....|.}}}}}}..}}}}}}}}}}---..--------}}}}}-..---}}}}}}}}}.|..|..-------|} +}|...}|...}}}.}}}}}}...}}}}}--..........}}}}..--}}}}}}}}}}}.|..|.........|} +}|...}S...}}.}}}}}}}}}}}}}}}-..--------}}}}}}}}}}}}}}...}}}.|..--------..S} +}|...}|...}}}}}}}..}}}}}}----..|....-}}}}}}}}}}}}}}}}}..}}}.|............|} +}|....|}}}}}....}}}}..}}.-.......----}}......}}}}}}.......}}|............|} +}------}}}}}}}}}}}}}}}}}}---------}}}}}}}}}}}}}}}}}}}}}}}}}}--------------} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +]]); +-- Dungeon Description +des.region(selection.area(00,00,74,19),"lit") +des.region(selection.area(02,03,05,16),"unlit") +des.region({ region={61,03, 72,16}, lit=0, type="ordinary", prefilled = 1,irregular = 1 }) +des.region(selection.area(71,08,72,11),"unlit") +des.region(selection.area(67,08,69,11),"lit") +-- Teleport: down to up stairs island, up to Medusa's island +des.teleport_region({ region = {02,03,05,16}, dir="down" }) +des.teleport_region({ region = {61,03,72,16}, dir="up" }) +-- Stairs +des.stair("up", 04,09) +des.stair("down", 68,10) +-- Doors +des.door("locked", 71,07) +-- Branch, not allowed on Medusa's island. +des.levregion({ type="branch", region = {01,00,79,20}, exclude = {59,01,73,17} }) +-- Non diggable walls +des.non_diggable(selection.area(01,02,06,17)) +des.non_diggable(selection.area(60,02,73,17)) +-- Objects +des.object({ id = "statue", x=68,y=10,buc="uncursed", + montype="knight", historic=1, male=1,name="Perseus", + contents = function() + if math.random(0,99) < 25 then + des.object({ id = "shield of reflection", buc="cursed", spe=0 }) + end + if math.random(0,99) < 75 then + des.object({ id = "levitation boots", spe=0 }) + end + if math.random(0,99) < 50 then + des.object({ id = "scimitar", buc="blessed", spe=2 }) + end + if math.random(0,99) < 50 then + des.object("sack") + end + end +}); +des.object({ id = "statue", x=64, y=08, contents=0 }) +des.object({ id = "statue", x=65, y=08, contents=0 }) +des.object({ id = "statue", x=64, y=09, contents=0 }) +des.object({ id = "statue", x=65, y=09, contents=0 }) +des.object({ id = "statue", x=64, y=10, contents=0 }) +des.object({ id = "statue", x=65, y=10, contents=0 }) +des.object({ id = "statue", x=64, y=11, contents=0 }) +des.object({ id = "statue", x=65, y=11, contents=0 }) +des.object("boulder",04,04) +des.object("/",52,09) +des.object("boulder",52,09) +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- Traps +des.trap("magic",03,12) +des.trap() +des.trap() +des.trap() +des.trap() +-- Monsters. +des.monster({ id="Medusa",x=68,y=10,asleep=1 }) +des.monster("gremlin",02,14) +des.monster("titan",02,05) +des.monster("electric eel",10,13) +des.monster("electric eel",11,13) +des.monster("electric eel",10,14) +des.monster("electric eel",11,14) +des.monster("electric eel",10,15) +des.monster("electric eel",11,15) +des.monster("jellyfish",01,01) +des.monster("jellyfish",00,08) +des.monster("jellyfish",04,19) +des.monster({ id = "stone golem",x=64,y=08,asleep=1 }) +des.monster({ id = "stone golem",x=65,y=08,asleep=1 }) +des.monster({ id = "stone golem",x=64,y=09,asleep=1 }) +des.monster({ id = "stone golem",x=65,y=09,asleep=1 }) +des.monster({ id = "cobra",x=64,y=10,asleep=1 }) +des.monster({ id = "cobra",x=65,y=10,asleep=1 }) +des.monster("A",72,08) +des.monster({ id = "yellow light",x=72,y=11,asleep=1 }) +des.monster({ x = 17, y = 07 }) +des.monster({ x = 28, y = 11 }) +des.monster({ x = 32, y = 13 }) +des.monster({ x = 49, y = 09 }) +des.monster({ x = 48, y = 07 }) +des.monster({ x = 65, y = 03 }) +des.monster({ x = 70, y = 04 }) +des.monster({ x = 70, y = 15 }) +des.monster({ x = 65, y = 16 }) +des.monster() +des.monster() +des.monster() +des.monster() + diff --git a/dat/medusa-3.lua b/dat/medusa-3.lua new file mode 100644 index 000000000..65961b5e5 --- /dev/null +++ b/dat/medusa-3.lua @@ -0,0 +1,115 @@ +-- NetHack 3.6 medusa.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1990, 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); +des.level_flags("noteleport", "mazelevel", "shortsighted") +-- +-- Here you disturb ravens nesting in the trees. +-- +des.map([[ +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}.}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}T..T.}}}}}}}}}}}}}}}}}}}}..}}}}}}}}.}}}...}}}}}}}.}}}}}......}}}}}}} +}}}}}}.......T.}}}}}}}}}}}..}}}}..T.}}}}}}...T...T..}}...T..}}..-----..}}}}} +}}}...-----....}}}}}}}}}}.T..}}}}}...}}}}}.....T..}}}}}......T..|...|.T..}}} +}}}.T.|...|...T.}}}}}}}.T......}}}}..T..}}.}}}.}}...}}}}}.T.....+...|...}}}} +}}}}..|...|.}}.}}}}}.....}}}T.}}}}.....}}}}}}.T}}}}}}}}}}}}}..T.|...|.}}}}}} +}}}}}.|...|.}}}}}}..T..}}}}}}}}}}}}}T.}}}}}}}}..}}}}}}}}}}}.....-----.}}}}}} +}}}}}.--+--..}}}}}}...}}}}}}}}}}}}}}}}}}}T.}}}}}}}}}}}}}}}}.T.}........}}}}} +}}}}}.......}}}}}}..}}}}}}}}}.}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.}}}.}}.T.}}}}}} +}}.T...T...}}}}T}}}}}}}}}}}....}}}}}}}}}}T}}}}}.T}}...}}}}}}}}}}}}}}...}}}}} +}}}...T}}}}}}}..}}}}}}}}}}}.T...}}}}}}}}.T.}.T.....T....}}}}}}}}}}}}}.}}}}}} +}}}}}}}}}}}}}}}....}}}}}}}...}}.}}}}}}}}}}............T..}}}}}.T.}}}}}}}}}}} +}}}}}}}}}}}}}}}}..T..}}}}}}}}}}}}}}..}}}}}..------+--...T.}}}....}}}}}}}}}}} +}}}}.}..}}}}}}}.T.....}}}}}}}}}}}..T.}}}}.T.|...|...|....}}}}}.}}}}}...}}}}} +}}}.T.}...}..}}}}T.T.}}}}}}.}}}}}}}....}}...|...+...|.}}}}}}}}}}}}}..T...}}} +}}}}..}}}.....}}...}}}}}}}...}}}}}}}}}}}}}T.|...|...|}}}}}}}}}}}....T..}}}}} +}}}}}..}}}.T..}}}.}}}}}}}}.T..}}}}}}}}}}}}}}---S-----}}}}}}}}}}}}}....}}}}}} +}}}}}}}}}}}..}}}}}}}}}}}}}}}.}}}}}}}}}}}}}}}}}T..T}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +]]); + +local place = selection.new(); +place:set(08,06); +place:set(66,05); +place:set(46,15); + +des.region(selection.area(00,00,74,19),"lit") +des.region({ region={49,14, 51,16}, lit=-1, type="ordinary", prefilled = 1 }); +des.region(selection.area(07,05,09,07),"unlit") +des.region(selection.area(65,04,67,06),"unlit") +des.region(selection.area(45,14,47,16),"unlit") +-- Non diggable walls +-- 4th room has diggable walls as Medusa is never placed there +des.non_diggable(selection.area(06,04,10,08)) +des.non_diggable(selection.area(64,03,68,07)) +des.non_diggable(selection.area(44,13,48,17)) +-- All places are accessible also with jumping, so don't bother +-- restricting the placement when teleporting from levels below this. +des.teleport_region({ region = {33,02,38,07}, dir="down" }) +des.levregion({ region = {32,01,39,07}, type="stair-up" }); +local mx, my = place:rndcoord(1); +des.stair("down", mx, my) +des.door("locked",08,08) +des.door("locked",64,05) +des.door("random",50,13) +des.door("locked",48,15) +-- +local px, py = place:rndcoord(1); +des.feature("fountain", px,py); +-- +local px, py = place:rndcoord(1); +des.object({ id="statue",x=px, y=py, buc="uncursed", + montype="knight", historic=1, male=1,name="Perseus", + contents = function() + if math.random(0,99) < 75 then + des.object({ id = "shield of reflection", buc="cursed", spe=0 }) + end + if math.random(0,99) < 25 then + des.object({ id = "levitation boots", spe=0 }) + end + if math.random(0,99) < 50 then + des.object({ id = "scimitar", buc="blessed", spe=2 }) + end + if math.random(0,99) < 50 then + des.object("sack") + end + end +}); +-- +des.object({ id = "statue", contents=0 }) +des.object({ id = "statue", contents=0 }) +des.object({ id = "statue", contents=0 }) +des.object({ id = "statue", contents=0 }) +des.object({ id = "statue", contents=0 }) +des.object({ id = "statue", contents=0 }) +des.object({ id = "statue", contents=0 }) + +for i=1,8 do + des.object() +end +des.object("blank paper",48,18) +des.object("blank paper",48,18) +-- +des.trap("rust") +des.trap("rust") +des.trap("board") +des.trap("board") +des.trap() +-- +des.monster({ id = "Medusa", x=mx, y=my, asleep=1 }) +des.monster("giant eel") +des.monster("giant eel") +des.monster("jellyfish") +des.monster("jellyfish") +des.monster("wood nymph") +des.monster("wood nymph") +des.monster("water nymph") +des.monster("water nymph") + +for i=1,30 do + des.monster({ id = "raven", hostile = 1 }) +end + diff --git a/dat/medusa-4.lua b/dat/medusa-4.lua new file mode 100644 index 000000000..b30540c51 --- /dev/null +++ b/dat/medusa-4.lua @@ -0,0 +1,129 @@ +-- NetHack 3.6 medusa.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1990, 1991 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); +des.level_flags("noteleport", "mazelevel") +-- +-- Here the Medusa rules some slithery monsters from her 'palace', with +-- a yellow dragon nesting in the backyard. +-- +des.map([[ +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}........}}}}}}}}}}}}}}}}}}}}}}}..}}}.....}}}}}}}}}}}----|}}}}} +}}}}}}..----------F-.....}}}}}}}}}}}}}}}}..---...}}}}....T.}}}}}}}....|}}}}} +}}}.....|...F......S}}}}....}}}}}}}...}}.....|}}.}}}}}}}......}}}}|......}}} +}}}.....+...|..{...|}}}}}}}}}}}}.....}}}}|...|}}}}}}}}}}}.}}}}}}}}----.}}}}} +}}......|...|......|}}}}}}}}}......}}}}}}|.......}}}}}}}}}}}}}..}}}}}...}}}} +}}|-+--F|-+--....|F|-|}}}}}....}}}....}}}-----}}.....}}}}}}}......}}}}.}}}}} +}}|...}}|...|....|}}}|}}}}}}}..}}}}}}}}}}}}}}}}}}}}....}}}}}}}}....T.}}}}}}} +}}|...}}F...+....F}}}}}}}..}}}}}}}}}}}}}}...}}}}}}}}}}}}}}}}}}}}}}....}}..}} +}}|...}}|...|....|}}}|}....}}}}}}....}}}...}}}}}...}}}}}}}}}}}}}}}}}.....}}} +}}--+--F|-+--....-F|-|....}}}}}}}}}}.T...}}}}....---}}}}}}}}}}}}}}}}}}}}}}}} +}}......|...|......|}}}}}.}}}}}}}}}....}}}}}}}.....|}}}}}}}}}.}}}}}}}}}}}}}} +}}}}....+...|..{...|.}}}}}}}}}}}}}}}}}}}}}}}}}}.|..|}}}}}}}......}}}}...}}}} +}}}}}}..|...F......|...}}}}}}}}}}..---}}}}}}}}}}--.-}}}}}....}}}}}}....}}}}} +}}}}}}}}-----S----F|....}}}}}}}}}|...|}}}}}}}}}}}}...}}}}}}...}}}}}}..}}}}}} +}}}}}}}}}..............T...}}}}}.|.......}}}}}}}}}}}}}}..}...}.}}}}....}}}}} +}}}}}}}}}}....}}}}...}...}}}}}.......|.}}}}}}}}}}}}}}.......}}}}}}}}}...}}}} +}}}}}}}}}}..}}}}}}}}}}.}}}}}}}}}}-..--.}}}}}}}}..}}}}}}..T...}}}..}}}}}}}}}} +}}}}}}}}}...}}}}}}}}}}}}}}}}}}}}}}}...}}}}}}}....}}}}}}}.}}}..}}}...}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.}}}}}}....}}}}}}}}}}}}}}}}}}}...}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +]]); +-- +local place = selection.new(); +place:set(04,08); +place:set(10,04); +place:set(10,08); +place:set(10,12); +-- +des.region(selection.area(00,00,74,19),"lit") +des.region({ region={13,03, 18,13}, lit=1, type="ordinary", prefilled=1 }) +-- +des.teleport_region({ region = {64,01,74,17}, dir="down" }); +des.teleport_region({ region = {02,02,18,13}, dir="up" }); +-- +des.levregion({ region = {67,01,74,20}, type="stair-up" }); +local mx, my = place:rndcoord(1); +des.stair("down", mx, my) +-- +des.door("locked",04,06) +des.door("locked",04,10) +des.door("locked",08,04) +des.door("locked",08,12) +des.door("locked",10,06) +des.door("locked",10,10) +des.door("locked",12,08) +-- +des.levregion({ region = {27,00,79,20}, type="branch" }); +-- +des.non_diggable(selection.area(01,01,22,14)); +-- +des.object("crystal ball", 07,08) +-- +local px, py = place:rndcoord(1); +des.object({ id="statue",x=px, y=py, buc="uncursed", + montype="knight", historic=1, male=1,name="Perseus", + contents = function() + if math.random(0,99) < 75 then + des.object({ id = "shield of reflection", buc="cursed", spe=0 }) + end + if math.random(0,99) < 25 then + des.object({ id = "levitation boots", spe=0 }) + end + if math.random(0,99) < 50 then + des.object({ id = "scimitar", buc="blessed", spe=2 }) + end + if math.random(0,99) < 50 then + des.object("sack") + end + end +}); +-- +des.object({ id = "statue", contents=0 }) +des.object({ id = "statue", contents=0 }) +des.object({ id = "statue", contents=0 }) +des.object({ id = "statue", contents=0 }) +des.object({ id = "statue", contents=0 }) +des.object({ id = "statue", contents=0 }) +des.object({ id = "statue", contents=0 }) +for i=1,8 do + des.object() +end +-- +for i=1,7 do + des.trap() +end +-- +des.monster("Medusa", mx, my) +des.monster("kraken", 07,07) +-- +-- the nesting dragon +des.monster({ id = "yellow dragon", x=05, y=04, asleep=1 }) +if math.random(0,99) < 50 then + des.monster({ id = "baby yellow dragon", x=04,y=04, asleep=1 }) +end +if math.random(0,99) < 25 then + des.monster({ id = "baby yellow dragon", x=04, y=05, asleep=1 }) +end +des.object({ id = "egg", x=05, y=04, montype="yellow dragon" }); +if math.random(0,99) < 50 then + des.object({ id = "egg", x=05, y=04, montype="yellow dragon" }); +end +if math.random(0,99) < 25 then + des.object({ id = "egg", x=05, y=04, montype="yellow dragon" }); +end +-- +des.monster("giant eel") +des.monster("giant eel") +des.monster("jellyfish") +des.monster("jellyfish") +for i=1,14 do + des.monster("S") +end +for i=1,4 do + des.monster("black naga hatchling") + des.monster("black naga") +end diff --git a/dat/medusa.des b/dat/medusa.des deleted file mode 100644 index b449a29e2..000000000 --- a/dat/medusa.des +++ /dev/null @@ -1,416 +0,0 @@ -# NetHack 3.6 medusa.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1990, 1991 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# -# These are the Medusa's levels : -# - -MAZE:"medusa-1",' ' -FLAGS: noteleport -GEOMETRY:center,center -MAP -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -}}.}}}}}..}}}}}......}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}....}}}...}}}}} -}...}}.....}}}}}....}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}...............} -}....}}}}}}}}}}....}}}..}}}}}}}}}}}.......}}}}}}}}}}}}}}}}..}}.....}}}...}} -}....}}}}}}}}.....}}}}..}}}}}}.................}}}}}}}}}}}.}}}}.....}}...}} -}....}}}}}}}}}}}}.}}}}.}}}}}}.-----------------.}}}}}}}}}}}}}}}}}.........} -}....}}}}}}}}}}}}}}}}}}.}}}...|...............S...}}}}}}}}}}}}}}}}}}}....}} -}.....}.}}....}}}}}}}}}.}}....--------+--------....}}}}}}..}}}}}}}}}}}...}} -}......}}}}..}}}}}}}}}}}}}........|.......|........}}}}}....}}}}}}}}}}}}}}} -}.....}}}}}}}}}}}}}}}}}}}}........|.......|........}}}}}...}}}}}}}}}.}}}}}} -}.....}}}}}}}}}}}}}}}}}}}}....--------+--------....}}}}}}.}.}}}}}}}}}}}}}}} -}......}}}}}}}}}}}}}}}}}}}}...S...............|...}}}}}}}}}}}}}}}}}.}}}}}}} -}.......}}}}}}}..}}}}}}}}}}}}.-----------------.}}}}}}}}}}}}}}}}}....}}}}}} -}........}}.}}....}}}}}}}}}}}}.................}}}}}..}}}}}}}}}.......}}}}} -}.......}}}}}}}......}}}}}}}}}}}}}}.......}}}}}}}}}.....}}}}}}...}}..}}}}}} -}.....}}}}}}}}}}}.....}}}}}}}}}}}}}}}}}}}}}}.}}}}}}}..}}}}}}}}}}....}}}}}}} -}}..}}}}}}}}}}}}}....}}}}}}}}}}}}}}}}}}}}}}...}}..}}}}}}}.}}.}}}}..}}}}}}}} -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -ENDMAP -# Dungeon Description -# (must maintain one room definition; `unfilled' forces its room to be kept) -REGION:(00,00,74,19),lit,"ordinary" -REGION:(31,07,45,07),unlit,"ordinary" -REGION:(35,09,41,10),unlit,"ordinary",unfilled -REGION:(31,12,45,12),unlit,"ordinary" -# Teleport: down to up stairs island, up to Medusa's island -TELEPORT_REGION:(01,01,05,17),(0,0,0,0),down -TELEPORT_REGION:(26,04,50,15),(0,0,0,0),up -# Stairs -STAIR:(05,14),up -STAIR:(36,10),down -# Doors -DOOR:closed,(46,07) -DOOR:locked,(38,08) -DOOR:locked,(38,11) -DOOR:closed,(30,12) -# Branch, not allowed inside Medusa's building. -BRANCH:levregion(01,00,79,20),(30,06,46,13) -# Non diggable walls -NON_DIGGABLE:(30,06,46,13) -# Objects -CONTAINER:('`',"statue"),(36,10),uncursed,montype:"knight",3,name:"Perseus" { - [75%]: OBJECT:('[',"shield of reflection"),cursed,+0 - [25%]: OBJECT:('[',"levitation boots"),+0 - [50%]: OBJECT:(')',"scimitar"),blessed,+2 - [50%]: OBJECT:('(',"sack") -} -# These aren't really containers, but specifying CONTAINER forces them to be -# empty, since CONTAINERs contain only what is explicitly specified. -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:"board",(38,07) -TRAP:"board",(38,12) -# Random monsters -MONSTER:('@',"Medusa"),(36,10),asleep -MONSTER:(';',"giant eel"),(11,06) -MONSTER:(';',"giant eel"),(23,13) -MONSTER:(';',"giant eel"),(29,02) -MONSTER:(';',"jellyfish"),(02,02) -MONSTER:(';',"jellyfish"),(00,08) -MONSTER:(';',"jellyfish"),(04,18) -MONSTER:('T',"water troll"),(51,03) -MONSTER:('T',"water troll"),(64,11) -MONSTER:'S',(38,07) -MONSTER:'S',(38,12) -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random - -MAZE:"medusa-2",' ' -FLAGS: noteleport -GEOMETRY:center,center -MAP -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -}------}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}-------}}}}}}}}--------------} -}|....|}}}}}}}}}..}.}}..}}}}}}}}}}}}}..}}}}}}-.....--}}}}}}}|............|} -}|....|.}}}}}}}}}}}.}...}}..}}}}}}}}}}}}}}}}}---......}}}}}.|............|} -}S....|.}}}}}}---}}}}}}}}}}}}}}}}}}}}}}}}}}---...|..-}}}}}}.S..----------|} -}|....|.}}}}}}-...}}}}}}}}}.}}...}.}}}}.}}}......----}}}}}}.|............|} -}|....|.}}}}}}-....--}}}}}}}}}}}}}}}}}}}}}}----...--}}}}}}}.|..--------+-|} -}|....|.}}}}}}}......}}}}...}}}}}}.}}}}}}}}}}}---..---}}}}}.|..|..S...|..|} -}|....|.}}}}}}-....-}}}}}}}------}}}}}}}}}}}}}}-...|.-}}}}}.|..|..|...|..|} -}|....|.}}}}}}}}}---}}}}}}}........}}}}}}}}}}---.|....}}}}}.|..|..|...|..|} -}|....|.}}}}}}}}}}}}}}}}}}-....|...-}}}}}}}}--...----.}}}}}.|..|..|...|..|} -}|....|.}}}}}}..}}}}}}}}}}---..--------}}}}}-..---}}}}}}}}}.|..|..-------|} -}|...}|...}}}.}}}}}}...}}}}}--..........}}}}..--}}}}}}}}}}}.|..|.........|} -}|...}S...}}.}}}}}}}}}}}}}}}-..--------}}}}}}}}}}}}}}...}}}.|..--------..S} -}|...}|...}}}}}}}..}}}}}}----..|....-}}}}}}}}}}}}}}}}}..}}}.|............|} -}|....|}}}}}....}}}}..}}.-.......----}}......}}}}}}.......}}|............|} -}------}}}}}}}}}}}}}}}}}}---------}}}}}}}}}}}}}}}}}}}}}}}}}}--------------} -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -ENDMAP -# Dungeon Description -REGION:(00,00,74,19),lit,"ordinary" -REGION:(02,03,05,16),unlit,"ordinary" -REGION:(61,03,72,16),unlit,"ordinary",unfilled,irregular -REGION:(71,08,72,11),unlit,"ordinary" -REGION:(67,08,69,11),lit,"ordinary" -# Teleport: down to up stairs island, up to Medusa's island -TELEPORT_REGION:(02,03,05,16),(0,0,0,0),down -TELEPORT_REGION:(61,03,72,16),(0,0,0,0),up -# Stairs -STAIR:(04,09),up -STAIR:(68,10),down -# Doors -DOOR:locked,(71,07) -# Branch, not allowed on Medusa's island. -BRANCH:levregion(01,00,79,20),(59,01,73,17) -# Non diggable walls -NON_DIGGABLE:(01,02,06,17) -NON_DIGGABLE:(60,02,73,17) -# Objects -CONTAINER:('`',"statue"),(68,10),uncursed,montype:"knight",3,name:"Perseus" { - [25%]: OBJECT:('[',"shield of reflection"),cursed,+0 - [75%]: OBJECT:('[',"levitation boots"),+0 - [50%]: OBJECT:(')',"scimitar"),blessed,+2 - [50%]: OBJECT:('(',"sack") -} -CONTAINER:('`',"statue"),(64,08) { } -CONTAINER:('`',"statue"),(65,08) { } -CONTAINER:('`',"statue"),(64,09) { } -CONTAINER:('`',"statue"),(65,09) { } -CONTAINER:('`',"statue"),(64,10) { } -CONTAINER:('`',"statue"),(65,10) { } -CONTAINER:('`',"statue"),(64,11) { } -CONTAINER:('`',"statue"),(65,11) { } -OBJECT:('`',"boulder"),(04,04) -OBJECT:'/',(52,09) -OBJECT:('`',"boulder"),(52,09) -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Traps -TRAP:"magic",(03,12) -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Monsters. -MONSTER:('@',"Medusa"),(68,10),asleep -MONSTER:('g',"gremlin"),(02,14) -MONSTER:('H',"titan"),(02,05) -MONSTER:(';',"electric eel"),(10,13) -MONSTER:(';',"electric eel"),(11,13) -MONSTER:(';',"electric eel"),(10,14) -MONSTER:(';',"electric eel"),(11,14) -MONSTER:(';',"electric eel"),(10,15) -MONSTER:(';',"electric eel"),(11,15) -MONSTER:(';',"jellyfish"),(01,01) -MONSTER:(';',"jellyfish"),(00,08) -MONSTER:(';',"jellyfish"),(04,19) -MONSTER:(''',"stone golem"),(64,08),asleep -MONSTER:(''',"stone golem"),(65,08),asleep -MONSTER:(''',"stone golem"),(64,09),asleep -MONSTER:(''',"stone golem"),(65,09),asleep -MONSTER:('S',"cobra"),(64,10),asleep -MONSTER:('S',"cobra"),(65,10),asleep -MONSTER:'A',(72,08) -MONSTER:('y',"yellow light"),(72,11),asleep -MONSTER:random,(17,07) -MONSTER:random,(28,11) -MONSTER:random,(32,13) -MONSTER:random,(49,09) -MONSTER:random,(48,07) -MONSTER:random,(65,03) -MONSTER:random,(70,04) -MONSTER:random,(70,15) -MONSTER:random,(65,16) -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random - - -LEVEL:"medusa-3" -FLAGS: noteleport,mazelevel,shortsighted -INIT_MAP:solidfill,' ' -GEOMETRY:center,center -# -# Here you disturb ravens nesting in the trees. -# -MAP -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}}}.}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.}}}}}}}}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}T..T.}}}}}}}}}}}}}}}}}}}}..}}}}}}}}.}}}...}}}}}}}.}}}}}......}}}}}}} -}}}}}}.......T.}}}}}}}}}}}..}}}}..T.}}}}}}...T...T..}}...T..}}..-----..}}}}} -}}}...-----....}}}}}}}}}}.T..}}}}}...}}}}}.....T..}}}}}......T..|...|.T..}}} -}}}.T.|...|...T.}}}}}}}.T......}}}}..T..}}.}}}.}}...}}}}}.T.....+...|...}}}} -}}}}..|...|.}}.}}}}}.....}}}T.}}}}.....}}}}}}.T}}}}}}}}}}}}}..T.|...|.}}}}}} -}}}}}.|...|.}}}}}}..T..}}}}}}}}}}}}}T.}}}}}}}}..}}}}}}}}}}}.....-----.}}}}}} -}}}}}.--+--..}}}}}}...}}}}}}}}}}}}}}}}}}}T.}}}}}}}}}}}}}}}}.T.}........}}}}} -}}}}}.......}}}}}}..}}}}}}}}}.}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.}}}.}}.T.}}}}}} -}}.T...T...}}}}T}}}}}}}}}}}....}}}}}}}}}}T}}}}}.T}}...}}}}}}}}}}}}}}...}}}}} -}}}...T}}}}}}}..}}}}}}}}}}}.T...}}}}}}}}.T.}.T.....T....}}}}}}}}}}}}}.}}}}}} -}}}}}}}}}}}}}}}....}}}}}}}...}}.}}}}}}}}}}............T..}}}}}.T.}}}}}}}}}}} -}}}}}}}}}}}}}}}}..T..}}}}}}}}}}}}}}..}}}}}..------+--...T.}}}....}}}}}}}}}}} -}}}}.}..}}}}}}}.T.....}}}}}}}}}}}..T.}}}}.T.|...|...|....}}}}}.}}}}}...}}}}} -}}}.T.}...}..}}}}T.T.}}}}}}.}}}}}}}....}}...|...+...|.}}}}}}}}}}}}}..T...}}} -}}}}..}}}.....}}...}}}}}}}...}}}}}}}}}}}}}T.|...|...|}}}}}}}}}}}....T..}}}}} -}}}}}..}}}.T..}}}.}}}}}}}}.T..}}}}}}}}}}}}}}---S-----}}}}}}}}}}}}}....}}}}}} -}}}}}}}}}}}..}}}}}}}}}}}}}}}.}}}}}}}}}}}}}}}}}T..T}}}}}}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -ENDMAP -$place = { (08,06),(66,05),(46,15) } -SHUFFLE: $place -REGION:(00,00,74,19),lit,"ordinary" -REGION:(49,14,51,16),random,"ordinary",unfilled -REGION:(07,05,09,07),unlit,"ordinary" -REGION:(65,04,67,06),unlit,"ordinary" -REGION:(45,14,47,16),unlit,"ordinary" -# Non diggable walls -# 4th room has diggable walls as Medusa is never placed there -NON_DIGGABLE:(06,04,10,08) -NON_DIGGABLE:(64,03,68,07) -NON_DIGGABLE:(44,13,48,17) -# All places are accessible also with jumping, so don't bother -# restricting the placement when teleporting from levels below this. -TELEPORT_REGION:(33,02,38,07),(0,0,0,0),down -STAIR:(32,01,39,07),(0,0,0,0),up -STAIR:$place[0],down -DOOR:locked,(08,08) -DOOR:locked,(64,05) -DOOR:random,(50,13) -DOOR:locked,(48,15) -# -FOUNTAIN:$place[1] -# -CONTAINER:('`',"statue"),$place[2],uncursed,montype:"knight",3,name:"Perseus" { - [75%]: OBJECT: ('[',"shield of reflection"),cursed,+0 - [25%]: OBJECT: ('[',"levitation boots"),+0 - [50%]: OBJECT: (')',"scimitar"),blessed,+2 - [50%]: OBJECT: ('(',"sack") -} -# -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } - -LOOP [8] { - OBJECT:random,random -} -OBJECT:('?',"blank paper"),(48,18) -OBJECT:('?',"blank paper"),(48,18) -# -TRAP:"rust",random -TRAP:"rust",random -TRAP:"board",random -TRAP:"board",random -TRAP:random,random -# -MONSTER:('@',"Medusa"),$place[0] -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"jellyfish"),random -MONSTER:(';',"jellyfish"),random -MONSTER:('n',"wood nymph"),random -MONSTER:('n',"wood nymph"),random -MONSTER:('n',"water nymph"),random -MONSTER:('n',"water nymph"),random - -LOOP [30] { - MONSTER:('B',"raven"),random,hostile -} - - -LEVEL:"medusa-4" -FLAGS: noteleport,mazelevel -INIT_MAP:solidfill,' ' -GEOMETRY:center,center -# -# Here the Medusa rules some slithery monsters from her 'palace', with -# a yellow dragon nesting in the backyard. -# -MAP -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -}}}}}}}}}}}}}}........}}}}}}}}}}}}}}}}}}}}}}}..}}}.....}}}}}}}}}}}----|}}}}} -}}}}}}..----------F-.....}}}}}}}}}}}}}}}}..---...}}}}....T.}}}}}}}....|}}}}} -}}}.....|...F......S}}}}....}}}}}}}...}}.....|}}.}}}}}}}......}}}}|......}}} -}}}.....+...|..{...|}}}}}}}}}}}}.....}}}}|...|}}}}}}}}}}}.}}}}}}}}----.}}}}} -}}......|...|......|}}}}}}}}}......}}}}}}|.......}}}}}}}}}}}}}..}}}}}...}}}} -}}|-+--F|-+--....|F|-|}}}}}....}}}....}}}-----}}.....}}}}}}}......}}}}.}}}}} -}}|...}}|...|....|}}}|}}}}}}}..}}}}}}}}}}}}}}}}}}}}....}}}}}}}}....T.}}}}}}} -}}|...}}F...+....F}}}}}}}..}}}}}}}}}}}}}}...}}}}}}}}}}}}}}}}}}}}}}....}}..}} -}}|...}}|...|....|}}}|}....}}}}}}....}}}...}}}}}...}}}}}}}}}}}}}}}}}.....}}} -}}--+--F|-+--....-F|-|....}}}}}}}}}}.T...}}}}....---}}}}}}}}}}}}}}}}}}}}}}}} -}}......|...|......|}}}}}.}}}}}}}}}....}}}}}}}.....|}}}}}}}}}.}}}}}}}}}}}}}} -}}}}....+...|..{...|.}}}}}}}}}}}}}}}}}}}}}}}}}}.|..|}}}}}}}......}}}}...}}}} -}}}}}}..|...F......|...}}}}}}}}}}..---}}}}}}}}}}--.-}}}}}....}}}}}}....}}}}} -}}}}}}}}-----S----F|....}}}}}}}}}|...|}}}}}}}}}}}}...}}}}}}...}}}}}}..}}}}}} -}}}}}}}}}..............T...}}}}}.|.......}}}}}}}}}}}}}}..}...}.}}}}....}}}}} -}}}}}}}}}}....}}}}...}...}}}}}.......|.}}}}}}}}}}}}}}.......}}}}}}}}}...}}}} -}}}}}}}}}}..}}}}}}}}}}.}}}}}}}}}}-..--.}}}}}}}}..}}}}}}..T...}}}..}}}}}}}}}} -}}}}}}}}}...}}}}}}}}}}}}}}}}}}}}}}}...}}}}}}}....}}}}}}}.}}}..}}}...}}}}}}}} -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.}}}}}}....}}}}}}}}}}}}}}}}}}}...}}}}}} -}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -ENDMAP -# -$place = { (04,08),(10,04),(10,08),(10,12) } -SHUFFLE: $place -# -REGION:(00,00,74,19),lit,"ordinary" -REGION:(13,03,18,13),lit,"ordinary",unfilled -# -TELEPORT_REGION:(64,01,74,17),(0,0,0,0),down -TELEPORT_REGION:(02,02,18,13),(0,0,0,0),up -# -STAIR:(67,01,74,20),(0,0,0,0),up -STAIR:$place[0],down -# -DOOR:locked,(04,06) -DOOR:locked,(04,10) -DOOR:locked,(08,04) -DOOR:locked,(08,12) -DOOR:locked,(10,06) -DOOR:locked,(10,10) -DOOR:locked,(12,08) -# -BRANCH:levregion(27,00,79,20),(0,0,0,0) -# -NON_DIGGABLE:(01,01,22,14) -# -OBJECT:('(',"crystal ball"),(07,08) -# -CONTAINER:('`',"statue"),$place[1],uncursed,montype:"knight",3,name:"Perseus" { - [75%]: OBJECT: ('[',"shield of reflection"),cursed,+0 - [25%]: OBJECT: ('[',"levitation boots"),+0 - [50%]: OBJECT: (')',"scimitar"),blessed,+2 - [50%]: OBJECT: ('(',"sack") -} -# -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -CONTAINER:('`',"statue"),random { } -LOOP [8] { - OBJECT:random,random -} -# -LOOP [7] { - TRAP:random,random -} -# -MONSTER:('@',"Medusa"),$place[0] -MONSTER:(';',"kraken"),(07,07) -# -# the nesting dragon -MONSTER:('D',"yellow dragon"), (05,04), asleep -[50%]: MONSTER: ('D',"baby yellow dragon"), (04,04), asleep -[25%]: MONSTER: ('D',"baby yellow dragon"), (04,05), asleep -OBJECT:('%',"egg"), (05,04), montype:"yellow dragon" -[50%]: OBJECT: ('%',"egg"), (05,04), montype:"yellow dragon" -[25%]: OBJECT: ('%',"egg"), (05,04), montype:"yellow dragon" -# -MONSTER:(';',"giant eel"),random -MONSTER:(';',"giant eel"),random -MONSTER:(';',"jellyfish"),random -MONSTER:(';',"jellyfish"),random -LOOP [14] { - MONSTER:'S',random -} -LOOP [4] { - MONSTER:('N',"black naga hatchling"), random - MONSTER:('N',"black naga"), random -} diff --git a/dat/minefill.lua b/dat/minefill.lua new file mode 100644 index 000000000..be738098a --- /dev/null +++ b/dat/minefill.lua @@ -0,0 +1,50 @@ +-- NetHack 3.6 mines.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ +-- Copyright (c) 1989-95 by Jean-Christophe Collet +-- Copyright (c) 1991-95 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- + +-- The "fill" level for the mines. +-- +-- This level is used to fill out any levels not occupied by +-- specific levels. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.level_init({ style="mines", fg=".", bg=" ", smoothed=true ,joined=true, lit="random", walled=true }) + +-- +des.stair("up") +des.stair("down") +-- +des.object("*") +des.object("*") +des.object("*") +des.object("(") +des.object() +des.object() +des.object() +-- +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome lord") +des.monster("dwarf") +des.monster("dwarf") +des.monster("G") +des.monster("G") +des.monster("h") +-- +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() diff --git a/dat/minend-1.lua b/dat/minend-1.lua new file mode 100644 index 000000000..109cc0737 --- /dev/null +++ b/dat/minend-1.lua @@ -0,0 +1,118 @@ +-- NetHack 3.6 mines.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ +-- Copyright (c) 1989-95 by Jean-Christophe Collet +-- Copyright (c) 1991-95 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- Mine end level variant 1 +-- "Mimic of the Mines" + +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.map([[ +------------------------------------------------------------------ ------ +| |.......| |.......-...| |.....|. | +| --------- ----.......-------...........| ---...-S- | +| |.......| |..........................-S- --.......| | +| |......------- ---........................|. |.......-- | +| |..--........-----..........................|. -.-..---- | +| --..--.-----........-.....................--- --..-- | +| --..--..| -----------..................---.----------..-- | +| |...--.| |..S...S..............---................-- | +| ----..----- ------------........--- ------------...--- | +| |.........-- ---------- ---...-- ----- | +| --.....---..-- -------- --...---...-- | +| ----..-..-- --..--------------------- --......-- ---........| | +|--....----- --..-..................--- |........| |.......-- | +|.......| --......................S.. --......-- ---..---- | +|--.--.-- ----.................--- ------..------...-- | +| |....S.. |...............-..| ..S...........| | +-------- -------------------- ------------------------ +]]); + +-- Dungeon Description +local place = { {08,16},{13,07},{21,08},{41,14},{50,04},{50,16},{66,01} } +shuffle(place) + +des.region({ region={26,01,32,01},lit=0,type="ordinary",prefilled=0,irregular=1 }) +des.region(selection.area(20,08,21,08),"unlit") +des.region(selection.area(23,08,25,08),"unlit"); +-- Secret doors +des.door("locked",07,16) +des.door("locked",22,08) +des.door("locked",26,08) +des.door("locked",40,14) +des.door("locked",50,03) +des.door("locked",51,16) +des.door("locked",66,02) +-- Stairs +des.stair("up", 36,04) +-- Non diggable walls +des.non_diggable(selection.area(00,00,74,17)) +-- Niches +-- Note: place[6] empty +des.object("diamond",place[7]) +des.object("emerald",place[7]) +des.object("worthless piece of violet glass",place[7]) +des.monster({ class="m", coord=place[7], appear_as="obj:luckstone" }) +des.object("worthless piece of white glass",place[1]) +des.object("emerald",place[1]) +des.object("amethyst",place[1]) +des.monster({ class="m", coord=place[1], appear_as="obj:loadstone" }) +des.object("diamond",place[2]) +des.object("worthless piece of green glass",place[2]) +des.object("amethyst",place[2]) +des.monster({ class="m", coord=place[2], appear_as="obj:flint" }) +des.object("worthless piece of white glass",place[3]) +des.object("emerald",place[3]) +des.object("worthless piece of violet glass",place[3]) +des.monster({ class="m", coord=place[3], appear_as="obj:touchstone" }) +des.object("worthless piece of red glass",place[4]) +des.object("ruby",place[4]) +des.object("loadstone",place[4]) +des.object("ruby",place[5]) +des.object("worthless piece of red glass",place[5]) +des.object("luckstone",place[5]) +-- Random objects +des.object("*") +des.object("*") +des.object("*") +des.object("*") +des.object("*") +des.object("*") +des.object("*") +des.object("(") +des.object("(") +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters +des.monster("gnome king") +des.monster("gnome lord") +des.monster("gnome lord") +des.monster("gnome lord") +des.monster("gnomish wizard") +des.monster("gnomish wizard") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("hobbit") +des.monster("hobbit") +des.monster("dwarf") +des.monster("dwarf") +des.monster("dwarf") +des.monster("h") diff --git a/dat/minend-2.lua b/dat/minend-2.lua new file mode 100644 index 000000000..d8370d102 --- /dev/null +++ b/dat/minend-2.lua @@ -0,0 +1,152 @@ +-- NetHack 3.6 mines.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ +-- Copyright (c) 1989-95 by Jean-Christophe Collet +-- Copyright (c) 1991-95 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- Mine end level variant 2 +-- "Gnome King's Wine Cellar" + +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.map([[ +--------------------------------------------------------------------------- +|...................................................| | +|.|---------S--.--|...|--------------------------|..| | +|.||---| |.||-| |...|..........................|..| | +|.||...| |-|.|.|---...|.............................| .. | +|.||...|-|.....|....|-|..........................|..|. .. | +|.||.....|-S|..|....|............................|..|.. | +|.||--|..|..|..|-|..|----------------------------|..|-. | +|.| |..|..|....|..................................|... | +|.| |..|..|----|..-----------------------------|..|.... | +|.|---|..|--|.......|----------------------------|..|..... | +|...........|----.--|......................| |..|....... | +|-----------|...|.| |------------------|.|.|-----|..|.....|.. | +|-----------|.{.|.|--------------------|.|..........|.....|.... | +|...............|.S......................|-------------..-----... | +|.--------------|.|--------------------|.|......................... | +|.................| |.....................|........ | +--------------------------------------------------------------------------- +]]); + +if math.random(0, 99) < 50 then + des.terrain({55,14},"-") + des.terrain({56,14},"-") + des.terrain({61,15},"|") + des.terrain({52,5}, "S") + des.door("locked", 52,5) +end +if math.random(0, 99) < 50 then + des.terrain({18,1}, "|") + des.terrain(selection.area(7,12, 8,13), ".") +end +if math.random(0, 99) < 50 then + des.terrain({49,4}, "|") + des.terrain({21,5}, ".") +end +if math.random(0, 99) < 50 then + if math.random(0, 99) < 50 then + des.terrain({22,1}, "|") + else + des.terrain({50,7}, "-") + des.terrain({51,7}, "-") + end +end + + +-- Dungeon Description +des.feature("fountain", {14,13}) +des.region(selection.area(23,03,48,06),"lit") +des.region(selection.area(21,06,22,06),"lit") +des.region(selection.area(14,04,14,04),"unlit") +des.region(selection.area(10,05,14,08),"unlit") +des.region(selection.area(10,09,11,09),"unlit") +des.region(selection.area(15,08,16,08),"unlit") +-- Secret doors +des.door("locked",12,02) +des.door("locked",11,06) +-- Stairs +des.stair("up", 36,04) +-- Non diggable walls +des.non_diggable(selection.area(00,00,52,17)) +des.non_diggable(selection.area(53,00,74,00)) +des.non_diggable(selection.area(53,17,74,17)) +des.non_diggable(selection.area(74,01,74,16)) +des.non_diggable(selection.area(53,07,55,07)) +des.non_diggable(selection.area(53,14,61,14)) +-- The Gnome King's wine cellar. +-- the Trespassers sign is a long-running joke +des.engraving({12,03},"engrave","You are now entering the Gnome King's wine cellar.") +des.engraving({12,04},"engrave","Trespassers will be persecuted!") +des.object("booze", 10, 07) +des.object("booze", 10, 07) +des.object("!", 10, 07) +des.object("booze", 10, 08) +des.object("booze", 10, 08) +des.object("!", 10, 08) +des.object("booze", 10, 09) +des.object("booze", 10, 09) +des.object("object detection", 10, 09) +-- Objects +-- The Treasure chamber... +des.object("diamond", 69, 04) +des.object("*", 69, 04) +des.object("diamond", 69, 04) +des.object("*", 69, 04) +des.object("emerald", 70, 04) +des.object("*", 70, 04) +des.object("emerald", 70, 04) +des.object("*", 70, 04) +des.object("emerald", 69, 05) +des.object("*", 69, 05) +des.object("ruby", 69, 05) +des.object("*", 69, 05) +des.object("ruby", 70, 05) +des.object("amethyst", 70, 05) +des.object("*", 70, 05) +des.object("amethyst", 70, 05) +des.object("luckstone", 70, 05) +-- Scattered gems... +des.object("*") +des.object("*") +des.object("*") +des.object("*") +des.object("*") +des.object("*") +des.object("*") +des.object("(") +des.object("(") +des.object() +des.object() +des.object() +-- Random traps +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- Random monsters. +des.monster("gnome king") +des.monster("gnome lord") +des.monster("gnome lord") +des.monster("gnome lord") +des.monster("gnomish wizard") +des.monster("gnomish wizard") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("hobbit") +des.monster("hobbit") +des.monster("dwarf") +des.monster("dwarf") +des.monster("dwarf") +des.monster("h") diff --git a/dat/minend-3.lua b/dat/minend-3.lua new file mode 100644 index 000000000..a40d7448a --- /dev/null +++ b/dat/minend-3.lua @@ -0,0 +1,107 @@ +-- NetHack 3.6 mines.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ +-- Copyright (c) 1989-95 by Jean-Christophe Collet +-- Copyright (c) 1991-95 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- "Catacombs" by Kelly Bailey +-- Relies on some very specific behavior of MAZEWALK. + +des.level_init({ style = "solidfill", fg = "-" }); + +des.level_flags("mazelevel", "nommap") + +des.map({ halign = "center", valign = "bottom", map = [[ + - - - - - - - - - - -- -- - - . - - - - - - - - - -- - - -- - - - - . - - | +------...---------.-----------...-----.-------.------- ----------------| + - - - - - - - - - - - . - - - . - - - - - - - - - - -- - -- - . - - - - - | +------------.---------...-------------------------.--- ------------------| + - - - - - - - - - - . . - - --- - . - - - - - - - - -- -- - - - - |.....| | +--.---------------.......------------------------------- ----------|.....S-| + - - - - |.. ..| - ....... . - - - - |.........| - - - --- - - - - |.....| | +----.----|.....|------.......--------|.........|--------------.------------| + - - - - |..{..| - - -.... . --- - -.S.........S - - - - - - - - - - - - - | +---------|.....|--.---...------------|.........|---------------------------| + - - - - |.. ..| - - - . - - - - - - |.........| - --- . - - - - - - - - - | +----------------------...-------.---------------------...------------------| +---..| - - - - - - - - . --- - - - - - - - - - - - - - . - - --- - - --- - | +-.S..|----.-------.------- ---------.-----------------...----- -----.------- +---..| - - - - - - - -- - - -- . - - - - - . - - - . - . - - -- -- - - - -- +-.S..|--------.---.--- -...---------------...{.--------- --------- +--|. - - - - - - - -- - - - -- . - - - --- - - - . . - - - - -- - - - - - - +]] }); + +local place = { {1,15},{68,6},{1,13} } +shuffle(place) + +des.non_diggable(selection.area(67,3,73,7)) +des.non_diggable(selection.area(0,12,2,16)) +des.feature("fountain", {12,08}) +des.feature("fountain", {51,15}) +des.region(selection.area(0,0,75,16),"unlit") +des.region(selection.area(38,6,46,10),"lit") +des.door("closed",37,8) +des.door("closed",47,8) +des.door("closed",73,5) +des.door("closed",2,15) +des.mazewalk({ x=36, y=8, dir="west", stocked=false }) +des.stair("up", 42,8) +des.wallify() + +-- Objects +des.object("diamond") +des.object("*") +des.object("diamond") +des.object("*") +des.object("emerald") +des.object("*") +des.object("emerald") +des.object("*") +des.object("emerald") +des.object("*") +des.object("ruby") +des.object("*") +des.object("ruby") +des.object("amethyst") +des.object("*") +des.object("amethyst") +des.object("luckstone",place[2]) +des.object("flint",place[1]) +des.object("?") +des.object("?") +des.object("?") +des.object("?") +des.object("?") +des.object("+") +des.object("+") +des.object("+") +des.object("+") +des.object() +des.object() +des.object() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +des.trap() +-- One-time annoyance factor +des.trap("level teleport",place[2]) +des.trap("level teleport",place[1]) +des.monster("M") +des.monster("M") +des.monster("M") +des.monster("M") +des.monster("M") +des.monster("ettin mummy") +des.monster("V") +des.monster("Z") +des.monster("Z") +des.monster("Z") +des.monster("Z") +des.monster("Z") +des.monster("V") +des.monster("e") +des.monster("e") +des.monster("e") +des.monster("e") diff --git a/dat/minetn-1.lua b/dat/minetn-1.lua new file mode 100644 index 000000000..c9cab0732 --- /dev/null +++ b/dat/minetn-1.lua @@ -0,0 +1,145 @@ +-- NetHack 3.6 mines.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ +-- Copyright (c) 1989-95 by Jean-Christophe Collet +-- Copyright (c) 1991-95 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- A tragic accident has occurred in Frontier Town.... +-- +-- Minetown variant 1 +-- Orcish Town - a variant of Frontier Town that has been +-- overrun by orcs. Note the barricades (iron bars). + +des.level_flags("mazelevel") + +des.level_init({ style="mines", fg=".", bg=" ", smoothed=true ,joined=true, lit="random", walled=true }) + +des.map([[ +..................................... +.----------------F------------------. +.|.................................|. +.|.-------------......------------.|. +.|.|...|...|...|......|..|...|...|.|. +.F.|...|...|...|......|..|...|...|.|. +.|.|...|...|...|......|..|...|...|.F. +.|.|...|...|----......------------.|. +.|.---------.......................|. +.|.................................|. +.|.---------.....--...--...........|. +.|.|...|...|----.|.....|.---------.|. +.|.|...|...|...|.|.....|.|..|....|.|. +.|.|...|...|...|.|.....|.|..|....|.|. +.|.|...|...|...|.|.....|.|..|....|.|. +.|.-------------.-------.---------.|. +.|.................................F. +.-----------F------------F----------. +..................................... +]]); + +-- Don't let the player fall into his likely death +des.teleport_region({ region={01,01,20,19}, region_islev=1, exclude={20,00,70,19}, exclude_islev=1 }) +des.region(selection.area(00,00,36,16),"lit") +des.levregion({ type="stair-up", region={01,03,20,19}, region_islev=1, exclude={00,00,36,15}, exclude_islev=1 }); +des.levregion({ type="stair-down", region={61,03,75,19}, region_islev=1, exclude={00,00,36,15} }) + +-- shame we can't make polluted fountains +des.feature("fountain",16,09) +des.feature("fountain",25,09) + +-- the altar's defiled; useful for BUC but never coaligned +des.altar({ x=20,y=13,align="noalign", type="shrine" }) + +-- set up the shop doors; could be broken down +des.door("random",5,8) +des.door("random",9,8) +des.door("random",13,7) +des.door("random",22,5) +des.door("random",27,7) +des.door("random",31,7) +des.door("random",5,10) +des.door("random",9,10) +des.door("random",15,13) +des.door("random",25,13) +des.door("random",31,11) + +-- knock a few holes in the shop interior walls +des.replace_terrain({ region={07,04,11,06}, fromterrain="|", toterrain=".", chance=18 }) +des.replace_terrain({ region={25,04,29,06}, fromterrain="|", toterrain=".", chance=18 }) +des.replace_terrain({ region={07,12,11,14}, fromterrain="|", toterrain=".", chance=18 }) +des.replace_terrain({ region={28,12,28,14}, fromterrain="|", toterrain=".", chance=33 }) + +-- One spot each in most shops... +local place = { {05,04},{09,05},{13,04},{26,04},{31,05},{30,14},{05,14},{10,13},{26,14},{27,13} } +shuffle(place); + +-- scatter some bodies +des.object({ id = "corpse", x=20,y=12, montype="aligned priest" }) +des.object({ id = "corpse", coord = place[1], montype="shopkeeper" }) +des.object({ id = "corpse", coord = place[2], montype="shopkeeper" }) +des.object({ id = "corpse", coord = place[3], montype="shopkeeper" }) +des.object({ id = "corpse", coord = place[4], montype="shopkeeper" }) +des.object({ id = "corpse", coord = place[5], montype="shopkeeper" }) +des.object({ id = "corpse", montype="watchman" }) +des.object({ id = "corpse", montype="watchman" }) +des.object({ id = "corpse", montype="watchman" }) +des.object({ id = "corpse", montype="watchman" }) +des.object({ id = "corpse", montype="watch captain" }) + +-- Rubble! +for i=1,9 + math.random(2 - 1,2*5) do + if math.random(0,99) < 90 then + des.object("boulder") + end + des.object("rock") +end + +-- Guarantee 7 candles since we won't have Izchak available +des.object({ id = "wax candle", coord = place[4], quantity = math.random(1,2) }) + +des.object({ id = "wax candle", coord = place[1], quantity = math.random(2,4) }) +des.object({ id = "wax candle", coord = place[2], quantity = math.random(1,2) }) +des.object({ id = "tallow candle", coord = place[3], quantity = math.random(1,3) }) +des.object({ id = "tallow candle", coord = place[2], quantity = math.random(1,2) }) +des.object({ id = "tallow candle", coord = place[4], quantity = math.random(1,2) }) + +-- go ahead and leave a lamp next to one corpse to be suggestive +-- and some empty wands... +des.object("oil lamp",place[2]) +des.object({ id = "striking", coord = place[1], buc="uncursed", spe=0 }) +des.object({ id = "striking", coord = place[3], buc="uncursed", spe=0 }) +des.object({ id = "striking", coord = place[4], buc="uncursed", spe=0 }) +des.object({ id = "magic missile", coord = place[4], buc="uncursed", spe=0 }) +des.object({ id = "magic missile", coord = place[5], buc="uncursed", spe=0 }) + +-- the Orcish Army + +local inside = selection.floodfill(selection.new(), 18,8) +local near_temple = selection.area(selection.new(), 17,8, 23,14) & inside + +for i=1,5 + math.random(1 - 1,1*10) do + if math.random(0, 99) < 50 then + des.monster({ id = "orc-captain", coord = { inside:rndcoord(1) }, peaceful=0 }); + else + if math.random(0, 99) < 80 then + des.monster({ id = "Uruk-hai", coord = { inside:rndcoord(1) }, peaceful=0 }) + else + des.monster({ id = "Mordor orc", coord = { inside:rndcoord(1) }, peaceful=0 }) + end + end +end +-- shamans can be hanging out in/near the temple +for i=1,math.random(2 - 1,2*3) do + des.monster({ id = "orc shaman", coord = { near_temple:rndcoord(0) }, peaceful=0 }); +end +-- these are not such a big deal +-- to run into outside the bars +for i=1,9 + math.random(2 - 1,2*5) do + if math.random(0, 99) < 90 then + des.monster({ id = "hill orc", peaceful = 0 }) + else + des.monster({ id = "goblin", peaceful = 0 }) + end +end + +-- Hack to force full-level wallification + +des.wallify() diff --git a/dat/minetn-2.lua b/dat/minetn-2.lua new file mode 100644 index 000000000..7031c280f --- /dev/null +++ b/dat/minetn-2.lua @@ -0,0 +1,182 @@ +-- NetHack 3.6 mines.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ +-- Copyright (c) 1989-95 by Jean-Christophe Collet +-- Copyright (c) 1991-95 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- Minetown variant 2 +-- "Town Square" + +des.room({ type = "ordinary", lit=1, x=3, y=3, + xalign="center", yalign="center", w=31, h=15, + contents = function() + des.feature("fountain", 17, 5) + des.feature("fountain", 13, 8) + + if math.random(0,99) < 75 then + des.room({ type = "ordinary", x=2,y=0, w=2,h=2, + contents = function() + des.door({ state="closed", wall="west" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type = "ordinary", lit=0, x=5,y=0, w=2,h=2, + contents = function() + des.door({ state="closed", wall="south" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type = "ordinary", x=8,y=0, w=2,h=2, + contents = function() + des.door({ state="closed", wall="east" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type = "ordinary", lit=1, x=16,y=0, w=2,h=2, + contents = function() + des.door({ state="closed", wall="west" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type = "ordinary", lit=0, x=19,y=0, w=2,h=2, + contents = function() + des.door({ state="closed", wall="south" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type = "ordinary", x=22,y=0, w=2,h=2, + contents = function() + des.door({ state="closed", wall="south" }) + des.monster("gnome") + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type = "ordinary", lit=0, x=25,y=0, w=2,h=2, + contents = function() + des.door({ state="closed", wall="east" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type = "ordinary", lit=1, x=2,y=5, w=2,h=2, + contents = function() + des.door({ state="closed", wall="north" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type = "ordinary", lit=1, x=5,y=5, w=2,h=2, + contents = function() + des.door({ state="closed", wall="south" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type = "ordinary", x=8,y=5, w=2,h=2, + contents = function() + des.door({ state="locked", wall="north" }) + des.monster("gnome") + end + }) + end + + des.room({ type="shop", chance=90, lit=1, x=2,y=10, w=4,h=3, + contents = function() + des.door({ state="closed", wall="west" }) + end + }); + + des.room({ type = "tool shop", chance=90, lit=1, x=23,y=10, w=4,h=3, + contents = function() + des.door({ state="closed", wall="east" }) + end + }); + + des.room({ type = "food shop", chance=90, lit=1, x=24,y=5, w=3,h=4, + contents = function() + des.door({ state="closed", wall="north" }) + end + }); + + des.room({ type = "candle shop", lit=1, x=11,y=10, w=4,h=3, + contents = function() + des.door({ state="closed", wall="east" }) + end + }); + + if math.random(0,99) < 75 then + des.room({ type = "ordinary", lit=0, x=7,y=10, w=3,h=3, + contents = function() + des.door({ state="locked", wall="north" }) + des.monster("gnome") + end + }); + end + + des.room({ type = "temple", lit=1, x=19,y=5, w=4,h=4, + contents = function() + des.door({ state="closed", wall="north" }) + des.altar({ x=02, y=02, align=align[1],type="shrine" }) + des.monster("gnomish wizard") + des.monster("gnomish wizard") + end + }); + + if math.random(0,99) < 75 then + des.room({ type = "ordinary", lit=1, x=18,y=10, w=4,h=3, + contents = function() + des.door({ state="locked", wall="west" }) + des.monster("gnome lord") + end + }); + end + + -- The Town Watch + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watch captain", peaceful = 1 }) + end +}); + +des.room({ contents = function() + des.stair("up") + end +}); + +des.room({ contents = function() + des.stair("down") + des.trap() + des.monster("gnome") + des.monster("gnome") + end +}); + +des.room({ contents = function() + des.monster("dwarf") + end +}); + +des.room({ contents = function() + des.trap() + des.monster("gnome") + end +}); + +des.random_corridors() + diff --git a/dat/minetn-3.lua b/dat/minetn-3.lua new file mode 100644 index 000000000..6217d174e --- /dev/null +++ b/dat/minetn-3.lua @@ -0,0 +1,150 @@ +-- NetHack 3.6 mines.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ +-- Copyright (c) 1989-95 by Jean-Christophe Collet +-- Copyright (c) 1991-95 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- Minetown variant 3 by Kelly Bailey +-- "Alley Town" + +des.room({ type = "ordinary",lit=1,x=3,y=3, + xalign="center",yalign="center",w=31,h=15, + contents = function() + des.feature("fountain", 01,06) + des.feature("fountain", 29,13) + + des.room({ type = "ordinary",x=2,y=2,w=2,h=2, + contents = function() + des.door({ state="closed", wall="south" }) + end + }); + + des.room({ type = "tool shop", chance=30, lit=1,x=5,y=3,w=2,h=3, + contents = function() + des.door({ state="closed", wall="south" }) + end + }) + + des.room({ type = "ordinary",x=2,y=10,w=2,h=3, + contents = function() + des.door({ state ="locked", wall="north" }) + des.monster("G") + end + }) + + des.room({ type = "ordinary", x=5,y=9,w=2,h=2, + contents = function() + des.door({ state="closed", wall="north" }) + end + }) + + des.room({ type = "temple",lit=1,x=10,y=2,w=3,h=4, + contents = function() + des.door({ state="closed", wall="east" }) + des.altar({ x=1, y=1, align = align[1], type="shrine" }) + des.monster("gnomish wizard") + des.monster("gnomish wizard") + end + }) + + des.room({ type = "ordinary",x=11,y=7,w=2,h=2, + contents = function() + des.door({ state="closed", wall="west" }) + end + }) + + des.room({ type = "shop",lit=1,x=10,y=10,w=3,h=3, + contents = function() + des.door({ state="closed", wall="west" }) + end + }) + + des.room({ type = "ordinary",random,x=14,y=8,w=2,h=2, + contents = function() + des.door({ state="locked", wall="north" }) + des.monster("G") + end + }) + + des.room({ type = "ordinary",random,x=14,y=11,w=2,h=2, + contents = function() + des.door({ state="closed", wall="south" }) + end + }) + + des.room({ type = "tool shop", chance=40,lit=1,x=17,y=10,w=3,h=3, + contents = function() + des.door({ state="closed", wall="north" }) + end + }) + + des.room({ type = "ordinary",x=21,y=11,w=2,h=2, + contents = function() + des.door({ state="locked", wall="east" }) + des.monster("G") + end + }) + + des.room({ type = "food shop", chance=90,lit=1,x=26,y=8,w=3,h=2, + contents = function() + des.door({ state="closed", wall="west" }) + end + }) + + des.room({ type = "ordinary",random,x=16,y=2,w=2,h=2, + contents = function() + des.door({ state="closed", wall="west" }) + end + }) + + des.room({ type = "ordinary",random,x=19,y=2,w=2,h=2, + contents = function() + des.door({ state="closed", wall="north" }) + end + }) + + des.room({ type = "wand shop", chance=30,lit=1,x=19,y=5,w=3,h=2, + contents = function() + des.door({ state="closed", wall="west" }) + end + }) + + des.room({ type = "candle shop",lit=1,x=25,y=2,w=3,h=3, + contents = function() + des.door({ state="closed", wall="south" }) + end + }) + + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watch captain", peaceful = 1 }) + + end +}) + +des.room({ type = "ordinary", contents = function() + des.stair("up") + end +}) + +des.room({ type = "ordinary", contents = function() + des.stair("down") + des.trap() + des.monster("gnome") + des.monster("gnome") + end +}) + +des.room({ type = "ordinary", contents = function() + des.monster("dwarf") + end +}) + +des.room({ type = "ordinary", contents = function() + des.trap() + des.monster("gnome") + end +}) + +des.random_corridors() diff --git a/dat/minetn-4.lua b/dat/minetn-4.lua new file mode 100644 index 000000000..717185d67 --- /dev/null +++ b/dat/minetn-4.lua @@ -0,0 +1,133 @@ +-- NetHack 3.6 mines.des $NHDT-Date: 1548631704 2019/01/27 23:28:24 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.30 $ +-- Copyright (c) 1989-95 by Jean-Christophe Collet +-- Copyright (c) 1991-95 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- Minetown variant 4 by Kelly Bailey +-- "College Town" + +des.room({ type = "ordinary", lit=1, x=3,y=3, + xalign="center", yalign="center", w=30, h=15, + contents = function() + des.feature("fountain", 08,07) + des.feature("fountain", 18,07) + + des.room({ type = "book shop", lit=1, x=4, y=2, w=3, h=3, + contents = function() + des.door({ state = "closed", wall="south" }) + end + }) + + des.room({ type = "ordinary", x=8, y=2, w=2, h=2, + contents = function() + des.door({ state = "closed", wall="south" }) + end + }) + + des.room({ type = "temple", lit=1, x=11, y=3, w=5, h=4, + contents = function() + des.door({ state = "closed", wall="south" }) + des.altar({ x=2,y=1,align=align[1], type="shrine" }) + des.monster("gnomish wizard") + des.monster("gnomish wizard") + end + }) + + des.room({ type = "ordinary", x=19, y=2, w=2, h=2, + contents = function() + des.door({ state = "closed", wall="south" }) + des.monster("G") + end + }) + + des.room({ type = "candle shop", lit=1, x=22, y=2, w=3, h=3, + contents = function() + des.door({ state = "closed", wall="south" }) + end + }) + + des.room({ type = "ordinary", x=26, y=2, w=2, h=2, + contents = function() + des.door({ state = "locked", wall="east" }) + des.monster("G") + end + }) + + des.room({ type = "tool shop", chance=90, lit=1, x=4,y=10, w=3,h=3, + contents = function() + des.door({ state = "closed", wall="north" }) + end + }) + + des.room({ type = "ordinary", x=8, y=11, w=2, h=2, + contents = function() + des.door({ state = "locked", wall="south" }) + des.monster("kobold shaman") + des.monster("kobold shaman") + des.monster("kitten") + des.monster("f") + end + }) + + des.room({ type = "food shop", chance=90, lit=1, x=11, y=11, w=3, h=2, + contents = function() + des.door({ state = "closed", wall="east" }) + end + }) + + des.room({ type = "ordinary", x=17, y=11, w=2, h=2, + contents = function() + des.door({ state = "closed", wall="west" }) + end + }) + + des.room({ type = "ordinary", x=20, y=10, w=2, h=2, + contents = function() + des.door({ state = "locked", wall="north" }) + des.monster("G") + end + }) + + des.room({ type = "shop", chance=90, lit=1, x=23, y=10, w=3, h=3, + contents = function() + des.door({ state = "closed", wall="north" }) + end + }) + + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watch captain", peaceful = 1 }) + end +}) + +des.room({ type = "ordinary", + contents = function() + des.stair("up") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.stair("down") + des.trap() + des.monster("gnome") + des.monster("gnome") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.monster("dwarf") + end +}) + +des.room({ type = "ordinary", + contents = function() + des.trap() + des.monster("gnome") + end +}) + +des.random_corridors() diff --git a/dat/minetn-5.lua b/dat/minetn-5.lua new file mode 100644 index 000000000..1f5974864 --- /dev/null +++ b/dat/minetn-5.lua @@ -0,0 +1,137 @@ +-- NetHack 3.6 mines.des $NHDT-Date: 1548631704 2019/01/27 23:28:24 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.30 $ +-- Copyright (c) 1989-95 by Jean-Christophe Collet +-- Copyright (c) 1991-95 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- "Grotto Town" by Kelly Bailey + +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel"); + +des.map([[ +----- --------- +|...--- ------.......-- ------- --------------- +|.....----.........--..| |.....| ------- |.............| +--..-....-.----------..| |.....| |.....| --+---+--.----+- + --.--.....---- ---- |.....| ------ --....---- |..-...--.-.+..| + ---.........---- ----- ---+--- |..+.| ---..-..----..---+-..---..| + ----.-....|..----...-- |.| |..|.| ---+-.....-+--........--+- + -----..|....-.....---- |.| |..|.------......--................| + ------ |..|.............---.-- ----.+..|-.......--..--------+--..-- + |....| --......---...........----- |.|..|-...{....---|.........|..-- + |....| |........-...-...........----.|..|--.......| |.........|...| + ---+--------....-------...---......--.-------....---- -----------...| + ------.---...--...--..-..--...-..---...|.--..-...-....------- |.......-- + |..|-.........-..---..-..---.....--....|........---...-|....| |.------- + |..+...............-+---+-----..--..........--....--...+....| |.|...S. +-----.....{....----...............-...........--...-...-|....| |.|...| +|..............-- --+--.---------.........--..-........------- |.--+------- +-+-----.........| |...|.|....| --.......------...|....---------.....|....| +|...| --..------- |...|.+....| ---...--- --..|...--......-...{..+..-+| +|...| ---- ------|....| ----- -----.....----........|..|.| +----- ------ ------- --------------- +]]); + +if math.random(0, 99) < 75 then + if math.random(0, 99) < 50 then + des.terrain(selection.line(25,8, 25,9), "|") + else + des.terrain(selection.line(16,13, 17,13), "-") + end +end +if math.random(0, 99) < 75 then + if math.random(0, 99) < 50 then + des.terrain(selection.line(36,10, 36,11), "|") + else + des.terrain(selection.line(32,15, 33,15), "-") + end +end +if math.random(0, 99) < 50 then + des.terrain(selection.area(21,4, 22,5), ".") + des.terrain(selection.line(14,9, 14,10), "|") +end +if math.random(0, 99) < 50 then + des.terrain({46,13}, "|") + des.terrain(selection.line(43,5, 47,5), "-") + des.terrain(selection.line(42,6, 46,6), ".") + des.terrain(selection.line(46,7, 47,7), ".") +end +if math.random(0,99) < 50 then + des.terrain(selection.area(69,11, 71,11), "-") +end + +des.stair("up", 01,01) +des.stair("down", 46,03) +des.feature("fountain", 50,09) +des.feature("fountain", 10,15) +des.feature("fountain", 66,18) + +des.region(selection.area(00,00,74,20),"unlit") +des.region(selection.area(09,13,11,17),"lit") +des.region(selection.area(08,14,12,16),"lit") +des.region(selection.area(49,07,51,11),"lit") +des.region(selection.area(48,08,52,10),"lit") +des.region(selection.area(64,17,68,19),"lit") +des.region(selection.area(37,13,39,17),"lit") +des.region(selection.area(36,14,40,17),"lit") +des.region(selection.area(59,02,72,10),"lit") + +des.monster({ id = "watchman", peaceful = 1 }) +des.monster({ id = "watchman", peaceful = 1 }) +des.monster({ id = "watchman", peaceful = 1 }) +des.monster({ id = "watchman", peaceful = 1 }) +des.monster({ id = "watch captain", peaceful = 1 }) +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome lord") +des.monster("gnome lord") +des.monster("dwarf") +des.monster("dwarf") +des.monster("dwarf") + +-- The shops +des.region({ region={25,17, 28,19}, lit=1, type="candle shop", prefilled=0 }) +des.door("closed",24,18) +des.region({ region={59, 9, 67,10}, lit=1, type="shop", prefilled=0 }) +des.door("closed",66,08) +des.region({ region={57,13, 60,15}, lit=1, type="tool shop", prefilled=0 }) +des.door("closed",56,14) +des.region({ region={05,09, 08,10}, lit=1, type="food shop", prefilled=0 }) +des.door("closed",07,11) +-- Gnome homes +des.door("closed",04,14) +des.door("locked",01,17) +des.monster("gnomish wizard", 02, 19) +des.door("locked",20,16) +des.monster("G", 20, 18) +des.door("random",21,14) +des.door("random",25,14) +des.door("random",42,08) +des.door("locked",40,05) +des.monster("G", 38, 07) +des.door("random",59,03) +des.door("random",58,06) +des.door("random",63,03) +des.door("random",63,05) +des.door("locked",71,03) +des.door("locked",71,06) +des.door("closed",69,04) +des.door("closed",67,16) +des.monster("gnomish wizard", 67, 14) +des.object("=", 70, 14) +des.door("locked",69,18) +des.monster("gnome lord", 71, 19) +des.door("locked",73,18) +des.object("chest", 73, 19) +des.door("locked",50,06) +des.object("(", 50, 03) +des.object({ id = "statue", x=38, y=15, montype="gnome king", historic=1 }) +-- Temple +des.region({ region={29,02, 33,04}, lit=1, type="temple" }) +des.door("closed",31,05) +des.altar({ x=31,y=03, align=align[1], type="shrine" }) diff --git a/dat/minetn-6.lua b/dat/minetn-6.lua new file mode 100644 index 000000000..758ce320b --- /dev/null +++ b/dat/minetn-6.lua @@ -0,0 +1,83 @@ +-- NetHack 3.6 mines.des $NHDT-Date: 1548631704 2019/01/27 23:28:24 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.30 $ +-- Copyright (c) 1989-95 by Jean-Christophe Collet +-- Copyright (c) 1991-95 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- "Bustling Town" by Kelly Bailey + +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "inaccessibles") + +des.level_init({ style="mines", fg=".", bg="-", smoothed=true, joined=true,lit=1,walled=true }) + +des.map({ halign = "center", valign = "top", map = [[ +.-----................----------------.- +.|...|................|...|..|...|...|.. +.|...+..--+--.........|...|..|...|...|.. +.|...|..|...|..-----..|...|..|-+---+--.. +.-----..|...|--|...|..--+---+-.........| +........|...|..|...+.............-----.. +........-----..|...|......--+-...|...|.. +.----...|...|+------..{...|..|...+...|.. +.|..+...|...|.............|..|...|...|.. +.|..|...|...|-+-.....---+-------------.| +.----...--+--..|..-+-|.................. +...|........|..|..|..|----....---------. +...|..T.....----..|..|...+....|......|-. +...|-....{........|..|...|....+......|-. +...--..-....T.....--------....|......|-. +.......--.....................---------- +]] }); + +des.region(selection.area(00,00,38,15),"lit") +des.levregion({ type="stair-up", region={01,03,20,19}, region_islev=1, exclude={0,0,39,15} }) +des.levregion({ type="stair-down", region={61,03,75,19}, region_islev=1, exclude={0,0,39,15} }) +des.feature("fountain" ,22,07) +des.feature("fountain", 09,13) +des.region(selection.area(13,5,14,6),"unlit") +des.region({ region={09,07, 11,09}, lit=1, type="candle shop", prefilled=0 }) +des.region({ region={16,04, 18,06}, lit=1, type="tool shop", prefilled=0 }) +des.region({ region={23,01, 25,03}, lit=1, type="shop", prefilled=0 }) +des.region({ region={22,12, 24,13}, lit=1, type="food shop", prefilled=0 }) +des.region({ region={31,12, 36,14}, lit=1, type="temple", prefilled=0 }) +des.altar({ x=35,y=13,align=align[1],type="shrine"}) + +des.door("closed",5,2) +des.door("locked",4,8) +des.door("closed",10,2) +des.door("closed",10,10) +des.door("locked",13,7) +des.door("locked",14,9) +des.door("closed",19,5) +des.door("closed",19,10) +des.door("closed",24,4) +des.door("closed",24,9) +des.door("closed",25,12) +des.door("closed",28,4) +des.door("locked",28,6) +des.door("closed",30,13) +des.door("closed",31,3) +des.door("closed",35,3) +des.door("closed",33,7) + +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome") +des.monster("gnome", 14, 6) +des.monster("gnome lord", 14, 5) +des.monster("gnome", 27, 8) +des.monster("gnome lord") +des.monster("gnome lord") +des.monster("dwarf") +des.monster("dwarf") +des.monster("dwarf") +des.monster({ id = "watchman", peaceful = 1 }) +des.monster({ id = "watchman", peaceful = 1 }) +des.monster({ id = "watchman", peaceful = 1 }) +des.monster({ id = "watch captain", peaceful = 1 }) +des.monster({ id = "watch captain", peaceful = 1 }) + diff --git a/dat/minetn-7.lua b/dat/minetn-7.lua new file mode 100644 index 000000000..dae4a9148 --- /dev/null +++ b/dat/minetn-7.lua @@ -0,0 +1,198 @@ +-- NetHack 3.6 mines.des $NHDT-Date: 1548631704 2019/01/27 23:28:24 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.30 $ +-- Copyright (c) 1989-95 by Jean-Christophe Collet +-- Copyright (c) 1991-95 by M. Stephenson +-- NetHack may be freely redistributed. See license for details. +-- +-- "Bazaar Town" by Kelly Bailey + +des.room({ type="ordinary", lit=1, x=3,y=3, + xalign="center",yalign="center", w=30,h=15, + contents = function() + des.feature("fountain", 12, 07) + des.feature("fountain", 11, 13) + + if math.random(0,99) < 75 then + des.room({ type="ordinary", x=2,y=2, w=4,h=2, + contents = function() + des.door({ state = "closed", wall="south" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type="ordinary", x=7,y=2, w=2,h=2, + contents = function() + des.door({ state = "closed", wall="north" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type="ordinary", x=7,y=5, w=2,h=2, + contents = function() + des.door({ state = "closed", wall="south" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type="ordinary", lit=1, x=10,y=2, w=3,h=4, + contents = function() + des.monster("gnome") + des.monster("monkey") + des.monster("monkey") + des.monster("monkey") + des.door({ state = "closed", wall="south" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type="ordinary", x=14,y=2, w=4,h=2, + contents = function() + des.door({ state = "closed", wall="south", pos=0 }) + des.monster("n") + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type="ordinary", x=16,y=5, w=2,h=2, + contents = function() + des.door({ state = "closed", wall="south" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type="ordinary", lit=0, x=19,y=2, w=2,h=2, + contents = function() + des.door({ state = "locked", wall="east" }) + des.monster("gnome king") + end + }) + end + + des.room({ type="food shop", chance=50, lit=1, x=19,y=5, w=2,h=3, + contents = function() + des.door({ state = "closed", wall="south" }) + end + }) + + if math.random(0,99) < 75 then + des.room({ type="ordinary", x=2,y=7, w=2,h=2, + contents = function() + des.door({ state = "closed", wall="east" }) + end + }) + end + + des.room({ type="tool shop", chance=50, lit=1, x=2,y=10, w=2,h=3, + contents = function() + des.door({ state = "closed", wall="south" }) + end + }) + + des.room({ type="candle shop", lit=1, x=5,y=10, w=3,h=3, + contents = function() + des.door({ state = "closed", wall="north" }) + end + }) + + if math.random(0,99) < 75 then + des.room({ type="ordinary", x=11,y=10, w=2,h=2, + contents = function() + des.door({ state = "locked", wall="west" }) + des.monster("G") + end + }) + end + + des.room({ type="shop", chance=60, lit=1, x=14,y=10, w=2,h=3, + contents = function() + des.door({ state = "closed", wall="north" }) + end + }) + + if math.random(0,99) < 75 then + des.room({ type="ordinary", x=17,y=11, w=4,h=2, + contents = function() + des.door({ state = "closed", wall="north" }) + end + }) + end + + if math.random(0,99) < 75 then + des.room({ type="ordinary", x=22,y=11, w=2,h=2, + contents = function() + des.door({ state = "closed", wall="south" }) + des.feature("sink", 00,00) + end + }) + end + + des.room({ type="food shop", chance=50, lit=1, x=25,y=11, w=3,h=2, + contents = function() + des.door({ state = "closed", wall="east" }) + end + }) + + des.room({ type="tool shop", chance=30, lit=1, x=25,y=2, w=3,h=3, + contents = function() + des.door({ state = "closed", wall="west" }) + end + }) + + des.room({ type="temple", lit=1, x=24,y=6, w=4,h=4, + contents = function() + des.door({ state = "closed", wall = "west" }) + des.altar({ x=02, y=01, align=align[1], type="shrine" }) + des.monster("gnomish wizard") + des.monster("gnomish wizard") + end + }) + + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ id = "watch captain", peaceful = 1 }) + des.monster("gnome") + des.monster("gnome") + des.monster("gnome") + des.monster("gnome lord") + des.monster("monkey") + des.monster("monkey") + + end +}) + +des.room({ type="ordinary", + contents = function() + des.stair("up") + end +}) + +des.room({ type="ordinary", + contents = function() + des.stair("down") + des.trap() + des.monster("gnome") + des.monster("gnome") + end +}) + +des.room({ type="ordinary", + contents = function() + des.monster("dwarf") + end +}) + +des.room({ type="ordinary", + contents = function() + des.trap() + des.monster("gnome") + end +}) + +des.random_corridors() diff --git a/dat/nhlib.lua b/dat/nhlib.lua new file mode 100644 index 000000000..5cd1e6cf2 --- /dev/null +++ b/dat/nhlib.lua @@ -0,0 +1,12 @@ + +math.randomseed( os.time() ) + +function shuffle(list) + for i = #list, 2, -1 do + local j = math.random(i) + list[i], list[j] = list[j], list[i] + end +end + +align = { "law", "neutral", "chaos" }; +shuffle(align); diff --git a/dat/oracle.des b/dat/oracle.des deleted file mode 100644 index 64603a935..000000000 --- a/dat/oracle.des +++ /dev/null @@ -1,65 +0,0 @@ -# NetHack 3.6 oracle.des $NHDT-Date: 1524689580 2018/04/25 20:53:00 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.10 $ -# Copyright (c) 2015 by Pasi Kallinen -# NetHack may be freely redistributed. See license for details. -# -# Oracle level -# - -LEVEL: "oracle" - -ROOM: "ordinary" , lit, (3,3), (center,center), (11,9) { - OBJECT:('`',"statue"),(0,0),montype:'C',1 - OBJECT:('`',"statue"),(0,8),montype:'C',1 - OBJECT:('`',"statue"),(10,0),montype:'C',1 - OBJECT:('`',"statue"),(10,8),montype:'C',1 - OBJECT:('`',"statue"),(5,1),montype:'C',1 - OBJECT:('`',"statue"),(5,7),montype:'C',1 - OBJECT:('`',"statue"),(2,4),montype:'C',1 - OBJECT:('`',"statue"),(8,4),montype:'C',1 - - SUBROOM: "delphi" , lit , (4,3) , (3,3) { - FOUNTAIN: (0, 1) - FOUNTAIN: (1, 0) - FOUNTAIN: (1, 2) - FOUNTAIN: (2, 1) - MONSTER: ('@', "Oracle"), (1,1) - ROOMDOOR: false , nodoor , random, random - } - - MONSTER: random, random - MONSTER: random, random - -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up - OBJECT: random,random -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - OBJECT: random, random - TRAP: random, random - MONSTER: random, random - MONSTER: random, random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - OBJECT: random, random - MONSTER: random, random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - MONSTER: random, random -} - -ROOM: "ordinary" , random, random, random, random { - OBJECT: random, random - TRAP: random, random - MONSTER: random, random -} - -RANDOM_CORRIDORS diff --git a/dat/oracle.lua b/dat/oracle.lua new file mode 100644 index 000000000..1158a18d0 --- /dev/null +++ b/dat/oracle.lua @@ -0,0 +1,63 @@ + +des.room({ type = "ordinary", lit=1, x=3,y=3, xalign="center",yalign="center", w=11,h=9, contents = function() + des.object({ id = "statue", x = 0, y = 0, montype = "C", historic = true }); + des.object({ id = "statue", x = 0, y = 8, montype = "C", historic = true }); + des.object({ id = "statue", x =10, y = 0, montype = "C", historic = true }); + des.object({ id = "statue", x =10, y = 8, montype = "C", historic = true }); + des.object({ id = "statue", x = 5, y = 1, montype = "C", historic = true }); + des.object({ id = "statue", x = 5, y = 7, montype = "C", historic = true }); + des.object({ id = "statue", x = 2, y = 4, montype = "C", historic = true }); + des.object({ id = "statue", x = 8, y = 4, montype = "C", historic = true }); + + des.room({ type = "delphi", lit = 1, x=4,y=3, w=3,h=3, contents = function() + des.feature("fountain", 0, 1); + des.feature("fountain", 1, 0); + des.feature("fountain", 1, 2); + des.feature("fountain", 2, 1); + des.monster("Oracle", 1, 1); + des.door({ state="nodoor", wall="all" }); + end + }); + + des.monster(); + des.monster(); + end +}); + +des.room({ contents = function() + des.stair("up"); + des.object(); + end +}); + +des.room({ contents = function() + des.stair("down"); + des.object(); + des.trap(); + des.monster(); + des.monster(); + end +}); + +des.room({ contents = function() + des.object(); + des.object(); + des.monster(); + end +}); + +des.room({ contents = function() + des.object(); + des.trap(); + des.monster(); + end +}); + +des.room({ contents = function() + des.object(); + des.trap(); + des.monster(); + end +}); + +des.random_corridors(); diff --git a/dat/orcus.lua b/dat/orcus.lua new file mode 100644 index 000000000..203899959 --- /dev/null +++ b/dat/orcus.lua @@ -0,0 +1,142 @@ +-- NetHack 3.6 gehennom.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992 by M. Stephenson and Izchak Miller +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style="mazegrid", bg ="-" }); + +des.level_flags("mazelevel", "noteleport", "shortsighted") +-- A ghost town +des.map({ halign = "right", valign = "center", map = [[ +.|....|....|....|..............|....|........ +.|....|....|....|..............|....|........ +.|....|....|....|--...-+-------|............. +.|....|....|....|..............+............. +.|.........|....|..............|....|........ +.--+-...-+----+--....-------...--------.-+--- +.....................|.....|................. +.....................|.....|................. +.--+----....-+---....|.....|...----------+--- +.|....|....|....|....---+---...|......|...... +.|.........|....|..............|......|...... +.----...---------.....-----....+......|...... +.|........................|....|......|...... +.----------+-...--+--|....|....----------+--- +.|....|..............|....+....|............. +.|....+.......|......|....|....|............. +.|....|.......|......|....|....|............. +]] }); +des.mazewalk(00,06,"west") +-- Entire main area +des.region(selection.area(01,00,44,16),"unlit") +des.stair("down", 33,15) +des.levregion({ region={01,00,12,20}, region_islev=1, exclude={20,01,70,20}, exclude_islev=1, type="stair-up" }); +des.levregion({ region={01,00,12,20}, region_islev=1, exclude={20,01,70,20}, exclude_islev=1, type="branch" }); +des.teleport_region({ region={01,00,12,20}, region_islev=1, exclude={20,01,70,20}, exclude_islev=1 }); +-- Wall "ruins" +des.object("boulder",19,02) +des.object("boulder",20,02) +des.object("boulder",21,02) +des.object("boulder",36,02) +des.object("boulder",36,03) +des.object("boulder",06,04) +des.object("boulder",05,05) +des.object("boulder",06,05) +des.object("boulder",07,05) +des.object("boulder",39,05) +des.object("boulder",08,08) +des.object("boulder",09,08) +des.object("boulder",10,08) +des.object("boulder",11,08) +des.object("boulder",06,10) +des.object("boulder",05,11) +des.object("boulder",06,11) +des.object("boulder",07,11) +des.object("boulder",21,11) +des.object("boulder",21,12) +des.object("boulder",13,13) +des.object("boulder",14,13) +des.object("boulder",15,13) +des.object("boulder",14,14) +-- Doors +des.door("closed",23,02) +des.door("open",31,03) +des.door("nodoor",03,05) +des.door("closed",09,05) +des.door("closed",14,05) +des.door("closed",41,05) +des.door("open",03,08) +des.door("nodoor",13,08) +des.door("open",41,08) +des.door("closed",24,09) +des.door("closed",31,11) +des.door("open",11,13) +des.door("closed",18,13) +des.door("closed",41,13) +des.door("open",26,14) +des.door("closed",06,15) +-- Special rooms +des.altar({ x=24,y=07,align="noalign",type="sanctum" }) +des.region({ region={22,12,25,16},lit=0,type="morgue", prefilled=0 }) +des.region({ region={32,09,37,12},lit=1,type="shop",prefilled=0 }) +des.region({ region={12,00,15,04},lit=1,type="shop",prefilled=0 }) +-- Some traps. +des.trap("spiked pit") +des.trap("sleep gas") +des.trap("anti magic") +des.trap("fire") +des.trap("fire") +des.trap("fire") +des.trap("magic") +des.trap("magic") +-- Some random objects +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +des.object() +-- The resident nasty +des.monster("Orcus",33,15) +-- And its preferred companions +des.monster("human zombie",32,15) +des.monster("shade",32,14) +des.monster("shade",32,16) +des.monster("vampire",35,16) +des.monster("vampire",35,14) +des.monster("vampire lord",36,14) +des.monster("vampire lord",36,15) +-- Randomly placed companions +des.monster("skeleton") +des.monster("skeleton") +des.monster("skeleton") +des.monster("skeleton") +des.monster("skeleton") +des.monster("shade") +des.monster("shade") +des.monster("shade") +des.monster("shade") +des.monster("giant zombie") +des.monster("giant zombie") +des.monster("giant zombie") +des.monster("ettin zombie") +des.monster("ettin zombie") +des.monster("ettin zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("human zombie") +des.monster("vampire") +des.monster("vampire") +des.monster("vampire") +des.monster("vampire lord") +des.monster("vampire lord") +-- A few more for the party +des.monster() +des.monster() +des.monster() +des.monster() +des.monster() diff --git a/dat/sanctum.lua b/dat/sanctum.lua new file mode 100644 index 000000000..bc669a7cd --- /dev/null +++ b/dat/sanctum.lua @@ -0,0 +1,131 @@ +-- NetHack 3.6 gehennom.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992 by M. Stephenson and Izchak Miller +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "nommap") +-- This is outside the main map, below, so we must do it before adding +-- that map and anchoring coordinates to it. This extends the invisible +-- barrier up to the top row, which falls outside the drawn map. +des.non_passwall(selection.area(39,00,41,00)) +des.map([[ +---------------------------------------------------------------------------- +| -------------- | +| |............| ------- | +| -------............----- |.....| | +| |......................| --.....| --------- | +| ----......................---------|......---- |.......| | +| |........---------..........|......+.........| ------+---..| | +| ---........|.......|..........--S----|.........| |........|..| | +| |..........|.......|.............| |.........-------..---------- | +| |..........|.......|..........---- |..........|....|..|......| | +| |..........|.......|..........| --.......----+---S---S--..| | +| |..........---------..........| |.......|.............|..| | +| ---...........................| -----+-------S---------S--- | +| |...........................| |...| |......| |....|-- | +| ----.....................---- |...---....--- ---......| | +| |.....................| |..........| |.....---- | +| -------...........----- --...------- |.....| | +| |...........| |...| |.....| | +| ------------- ----- ------- | +---------------------------------------------------------------------------- +]]); +des.region({ region={15,07, 21,10}, lit=1, type="temple" }) +des.altar({ x=18, y=08, align="noalign", type="sanctum" }) +des.region({ region={41,06, 48,11}, lit=0, type="morgue", prefilled=0, irregular=1 }) +-- Non diggable walls +des.non_diggable(selection.area(00,00,75,19)) +-- Invisible barrier separating the left & right halves of the level +des.non_passwall(selection.area(37,00,39,19)) +-- Doors +des.door("closed",40,06) +des.door("locked",62,06) +des.door("closed",46,12) +des.door("closed",53,10) +-- Surround the temple with fire +des.trap("fire",13,05) +des.trap("fire",14,05) +des.trap("fire",15,05) +des.trap("fire",16,05) +des.trap("fire",17,05) +des.trap("fire",18,05) +des.trap("fire",19,05) +des.trap("fire",20,05) +des.trap("fire",21,05) +des.trap("fire",22,05) +des.trap("fire",23,05) +des.trap("fire",13,12) +des.trap("fire",14,12) +des.trap("fire",15,12) +des.trap("fire",16,12) +des.trap("fire",17,12) +des.trap("fire",18,12) +des.trap("fire",19,12) +des.trap("fire",20,12) +des.trap("fire",21,12) +des.trap("fire",22,12) +des.trap("fire",23,12) +des.trap("fire",13,06) +des.trap("fire",13,07) +des.trap("fire",13,08) +des.trap("fire",13,09) +des.trap("fire",13,10) +des.trap("fire",13,11) +des.trap("fire",23,06) +des.trap("fire",23,07) +des.trap("fire",23,08) +des.trap("fire",23,09) +des.trap("fire",23,10) +des.trap("fire",23,11) +-- Some traps. +des.trap("spiked pit") +des.trap("fire") +des.trap("sleep gas") +des.trap("anti magic") +des.trap("fire") +des.trap("magic") +-- Some random objects +des.object("[") +des.object("[") +des.object("[") +des.object("[") +des.object(")") +des.object(")") +des.object("*") +des.object("!") +des.object("!") +des.object("!") +des.object("!") +des.object("?") +des.object("?") +des.object("?") +des.object("?") +des.object("?") +-- Some monsters. +des.monster({ id = "horned devil", x=14,y=12,peaceful=0 }) +des.monster({ id = "barbed devil", x=18,y=08,peaceful=0 }) +des.monster({ id = "erinys", x=10,y=04,peaceful=0 }) +des.monster({ id = "marilith", x=07,y=09,peaceful=0 }) +des.monster({ id = "nalfeshnee", x=27,y=08,peaceful=0 }) +-- Moloch's horde +des.monster({ id = "aligned priest", x=20,y=03,align="noalign",peaceful=0 }) +des.monster({ id = "aligned priest", x=15,y=04,align="noalign",peaceful=0 }) +des.monster({ id = "aligned priest", x=11,y=05,align="noalign",peaceful=0 }) +des.monster({ id = "aligned priest", x=11,y=07,align="noalign",peaceful=0 }) +des.monster({ id = "aligned priest", x=11,y=09,align="noalign",peaceful=0 }) +des.monster({ id = "aligned priest", x=11,y=12,align="noalign",peaceful=0 }) +des.monster({ id = "aligned priest", x=15,y=13,align="noalign",peaceful=0 }) +des.monster({ id = "aligned priest", x=17,y=13,align="noalign",peaceful=0 }) +des.monster({ id = "aligned priest", x=21,y=13,align="noalign",peaceful=0 }) +-- A few nasties +des.monster("L") +des.monster("L") +des.monster("V") +des.monster("V") +des.monster("V") +des.stair("up", 63,15) +-- Teleporting to this level is allowed after the invocation creates its +-- entrance. Force arrival in that case to be on rightmost third of level. +des.teleport_region({ region = {54,1,79,18}, region_islev=1, dir="down" }) diff --git a/dat/soko1-1.lua b/dat/soko1-1.lua new file mode 100644 index 000000000..efcb3dd13 --- /dev/null +++ b/dat/soko1-1.lua @@ -0,0 +1,107 @@ +-- NetHack 3.6 sokoban.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1998-1999 by Kevin Hugo +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "premapped", "solidify"); +des.map([[ +-------------------------- +|........................| +|.......|---------------.| +-------.------ |.| + |...........| |.| + |...........| |.| +--------.----- |.| +|............| |.| +|............| |.| +-----.-------- ------|.| + |..........| --|.....|.| + |..........| |.+.....|.| + |.........|- |-|.....|.| +-------.---- |.+.....+.| +|........| |-|.....|-- +|........| |.+.....| +|...|----- --|.....| +----- ------- +]]); + +place = selection.new(); +place:set(16,11); +place:set(16,13); +place:set(16,15); + +des.stair("down", 01, 01); +des.region(selection.area(00,00,25,17),"lit"); +des.non_diggable(selection.area(00,00,25,17)); +des.non_passwall(selection.area(00,00,25,17)); + +-- Boulders +des.object("boulder", 03, 05); +des.object("boulder", 05, 05); +des.object("boulder", 07, 05); +des.object("boulder", 09, 05); +des.object("boulder", 11, 05); +-- +des.object("boulder", 04, 07); +des.object("boulder", 04, 08); +des.object("boulder", 06, 07); +des.object("boulder", 09, 07); +des.object("boulder", 11, 07); +-- +des.object("boulder", 03, 12); +des.object("boulder", 04, 10); +des.object("boulder", 05, 12); +des.object("boulder", 06, 10); +des.object("boulder", 07, 11); +des.object("boulder", 08, 10); +des.object("boulder", 09, 12); +-- +des.object("boulder", 03, 14); + +-- Traps +des.trap("hole", 08, 01); +des.trap("hole", 09, 01); +des.trap("hole", 10, 01); +des.trap("hole", 11, 01); +des.trap("hole", 12, 01); +des.trap("hole", 13, 01); +des.trap("hole", 14, 01); +des.trap("hole", 15, 01); +des.trap("hole", 16, 01); +des.trap("hole", 17, 01); +des.trap("hole", 18, 01); +des.trap("hole", 19, 01); +des.trap("hole", 20, 01); +des.trap("hole", 21, 01); +des.trap("hole", 22, 01); +des.trap("hole", 23, 01); + +des.monster({ id = "giant mimic", appear_as = "obj:boulder" }); +des.monster({ id = "giant mimic", appear_as = "obj:boulder" }); + +-- Random objects +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "=" }); +des.object({ class = "/" }); + +-- Rewards +des.door("locked", 23, 13); +des.door("closed", 17, 11); +des.door("closed", 17, 13); +des.door("closed", 17, 15); + +des.region({ region={18,10, 22,16}, lit = 1, type = "zoo", prefilled = 0, irregular = 1 }); + +px, py = selection.rndcoord(place); +if math.random(0, 99) < 50 then + des.object("bag of holding", px, py); +else + des.object("amulet of reflection", px, py); +end +des.engraving({ x = px, y = py, type = "burn", text = "Elbereth" }); +des.object({ id = "scare monster", x = px, y = py, buc = "cursed" }); + diff --git a/dat/soko1-2.lua b/dat/soko1-2.lua new file mode 100644 index 000000000..6a6361d53 --- /dev/null +++ b/dat/soko1-2.lua @@ -0,0 +1,108 @@ +-- NetHack 3.6 sokoban.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1998-1999 by Kevin Hugo +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "premapped", "solidify"); + +des.map([[ + ------------------------ + |......................| + |..-------------------.| +----.| ----- |.| +|..|.-- --...| |.| +|.....|--|....| |.| +|.....|..|....| |.| +--....|......-- |.| + |.......|...| ------|.| + |....|..|...| --|.....|.| + |....|--|...| |.+.....|.| + |.......|..-- |-|.....|.| + ----....|.-- |.+.....+.| + ---.--.| |-|.....|-- + |.....| |.+.....| + |..|..| --|.....| + ------- ------- +]]); + +local place = selection.new(); +place:set(16,10); +place:set(16,12); +place:set(16,14); + +des.stair("down", 06,15); +des.region(selection.area(00,00,25,16),"lit"); +des.non_diggable(selection.area(00,00,25,16)); +des.non_passwall(selection.area(00,00,25,16)); + +-- Boulders +des.object("boulder",04,04); +des.object("boulder",02,06); +des.object("boulder",03,06); +des.object("boulder",04,07); +des.object("boulder",05,07); +des.object("boulder",02,08); +des.object("boulder",05,08); +des.object("boulder",03,09); +des.object("boulder",04,09); +des.object("boulder",03,10); +des.object("boulder",05,10); +des.object("boulder",06,12); +-- +des.object("boulder",07,14); +-- +des.object("boulder",11,05); +des.object("boulder",12,06); +des.object("boulder",10,07); +des.object("boulder",11,07); +des.object("boulder",10,08); +des.object("boulder",12,09); +des.object("boulder",11,10); + +-- Traps +des.trap("hole",05,01) +des.trap("hole",06,01) +des.trap("hole",07,01) +des.trap("hole",08,01) +des.trap("hole",09,01) +des.trap("hole",10,01) +des.trap("hole",11,01) +des.trap("hole",12,01) +des.trap("hole",13,01) +des.trap("hole",14,01) +des.trap("hole",15,01) +des.trap("hole",16,01) +des.trap("hole",17,01) +des.trap("hole",18,01) +des.trap("hole",19,01) +des.trap("hole",20,01) +des.trap("hole",21,01) +des.trap("hole",22,01) + +des.monster({ id = "giant mimic", appear_as = "obj:boulder" }); +des.monster({ id = "giant mimic", appear_as = "obj:boulder" }); + +-- Random objects +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "=" }); +des.object({ class = "/" }); + +-- Rewards +des.door("locked",23,12) +des.door("closed",17,10) +des.door("closed",17,12) +des.door("closed",17,14) +des.region({ region={18,09, 22,15}, lit = 1, type = "zoo", prefilled = 0, irregular = 1 }); + +px, py = selection.rndcoord(place); +if math.random(0, 99) < 50 then + des.object("bag of holding",px,py); +else + des.object("amulet of reflection",px,py); +end +des.engraving({ x = px, y = py, type = "burn", text = "Elbereth" }); +des.object({ id = "scare monster", x = px, y = py, buc = "cursed" }); diff --git a/dat/soko2-1.lua b/dat/soko2-1.lua new file mode 100644 index 000000000..9934819f7 --- /dev/null +++ b/dat/soko2-1.lua @@ -0,0 +1,67 @@ +-- NetHack 3.6 sokoban.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1998-1999 by Kevin Hugo +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "premapped", "solidify"); + +des.map([[ +-------------------- +|........|...|.....| +|.....-..|.-.|.....| +|..|.....|...|.....| +|-.|..-..|.-.|.....| +|...--.......|.....| +|...|...-...-|.....| +|...|..|...--|.....| +|-..|..|----------+| +|..................| +|...|..|------------ +-------- +]]); +des.stair("down", 06,10); +des.stair("up", 16,04); +des.door("locked", 18,08); +des.region(selection.area(00,00, 19,11), "lit"); +des.non_diggable(selection.area(00,00,19,11)); +des.non_passwall(selection.area(00,00,19,11)); + +-- Boulders +des.object("boulder",02,02) +des.object("boulder",03,02) +-- +des.object("boulder",05,03) +des.object("boulder",07,03) +des.object("boulder",07,02) +des.object("boulder",08,02) +-- +des.object("boulder",10,03) +des.object("boulder",11,03) +-- +des.object("boulder",02,07) +des.object("boulder",02,08) +des.object("boulder",03,09) +-- +des.object("boulder",05,07) +des.object("boulder",06,06) + +-- Traps +des.trap("hole",08,09) +des.trap("hole",09,09) +des.trap("hole",10,09) +des.trap("hole",11,09) +des.trap("hole",12,09) +des.trap("hole",13,09) +des.trap("hole",14,09) +des.trap("hole",15,09) +des.trap("hole",16,09) +des.trap("hole",17,09) + +-- Random objects +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "=" }); +des.object({ class = "/" }); diff --git a/dat/soko2-2.lua b/dat/soko2-2.lua new file mode 100644 index 000000000..bb931c15f --- /dev/null +++ b/dat/soko2-2.lua @@ -0,0 +1,68 @@ +-- NetHack 3.6 sokoban.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1998-1999 by Kevin Hugo +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "premapped", "solidify"); + +des.map([[ + -------- +--|.|....| +|........|---------- +|.-...-..|.|.......| +|...-......|.......| +|.-....|...|.......| +|....-.--.-|.......| +|..........|.......| +|.--...|...|.......| +|....-.|---|.......| +--|....|----------+| + |................| + ------------------ +]]); +des.stair("down", 06,11) +des.stair("up", 15,06) +des.door("locked",18,10) +des.region(selection.area(00,00,19,12), "lit"); +des.non_diggable(selection.area(00,00,19,12)); +des.non_passwall(selection.area(00,00,19,12)); + +-- Boulders +des.object("boulder",04,02) +des.object("boulder",04,03) +des.object("boulder",05,03) +des.object("boulder",07,03) +des.object("boulder",08,03) +des.object("boulder",02,04) +des.object("boulder",03,04) +des.object("boulder",05,05) +des.object("boulder",06,06) +des.object("boulder",09,06) +des.object("boulder",03,07) +des.object("boulder",04,07) +des.object("boulder",07,07) +des.object("boulder",06,09) +des.object("boulder",05,10) +des.object("boulder",05,11) + +-- Traps +des.trap("hole",07,11) +des.trap("hole",08,11) +des.trap("hole",09,11) +des.trap("hole",10,11) +des.trap("hole",11,11) +des.trap("hole",12,11) +des.trap("hole",13,11) +des.trap("hole",14,11) +des.trap("hole",15,11) +des.trap("hole",16,11) +des.trap("hole",17,11) + +-- Random objects +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "=" }); +des.object({ class = "/" }); diff --git a/dat/soko3-1.lua b/dat/soko3-1.lua new file mode 100644 index 000000000..cec5eec8b --- /dev/null +++ b/dat/soko3-1.lua @@ -0,0 +1,79 @@ +-- NetHack 3.6 sokoban.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1998-1999 by Kevin Hugo +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "premapped", "solidify"); + +des.map([[ +----------- ----------- +|....|....|-- |.........| +|....|......| |.........| +|.........|-- |.........| +|....|....| |.........| +|-.--------- |.........| +|....|.....| |.........| +|....|.....| |.........| +|..........| |.........| +|....|.....|---------------+| +|....|......................| +----------------------------- +]]); +des.stair("down", 11,02) +des.stair("up", 23,04) +des.door("locked", 27,09) +des.region(selection.area(00,00,28,11), "lit") +des.non_diggable(selection.area(00,00,28,11)) +des.non_passwall(selection.area(00,00,28,11)) + +-- Boulders +des.object("boulder",03,02) +des.object("boulder",04,02) +-- +des.object("boulder",06,02) +des.object("boulder",06,03) +des.object("boulder",07,02) +-- +des.object("boulder",03,06) +des.object("boulder",02,07) +des.object("boulder",03,07) +des.object("boulder",03,08) +des.object("boulder",02,09) +des.object("boulder",03,09) +des.object("boulder",04,09) +-- +des.object("boulder",06,07) +des.object("boulder",06,09) +des.object("boulder",08,07) +des.object("boulder",08,10) +des.object("boulder",09,08) +des.object("boulder",09,09) +des.object("boulder",10,07) +des.object("boulder",10,10) + +-- Traps +des.trap("hole",12,10) +des.trap("hole",13,10) +des.trap("hole",14,10) +des.trap("hole",15,10) +des.trap("hole",16,10) +des.trap("hole",17,10) +des.trap("hole",18,10) +des.trap("hole",19,10) +des.trap("hole",20,10) +des.trap("hole",21,10) +des.trap("hole",22,10) +des.trap("hole",23,10) +des.trap("hole",24,10) +des.trap("hole",25,10) +des.trap("hole",26,10) + +-- Random objects +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "=" }); +des.object({ class = "/" }); + diff --git a/dat/soko3-2.lua b/dat/soko3-2.lua new file mode 100644 index 000000000..fa15d8ba6 --- /dev/null +++ b/dat/soko3-2.lua @@ -0,0 +1,71 @@ +-- NetHack 3.6 sokoban.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1998-1999 by Kevin Hugo +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "premapped", "solidify"); + +des.map([[ + ---- ----------- +-|..|------- |.........| +|..........| |.........| +|..-----.-.| |.........| +|..|...|...| |.........| +|.........-| |.........| +|.......|..| |.........| +|.----..--.| |.........| +|........|.-- |.........| +|.---.-.....------------+| +|...|...-................| +|.........---------------- +----|..|..| + ------- +]]); +des.stair("down", 03,01) +des.stair("up", 20,04) +des.door("locked",24,09) +des.region(selection.area(00,00,25,13), "lit") +des.non_diggable(selection.area(00,00,25,13)) +des.non_passwall(selection.area(00,00,25,13)) + +-- Boulders +des.object("boulder",02,03) +des.object("boulder",08,03) +des.object("boulder",09,04) +des.object("boulder",02,05) +des.object("boulder",04,05) +des.object("boulder",09,05) +des.object("boulder",02,06) +des.object("boulder",05,06) +des.object("boulder",06,07) +des.object("boulder",03,08) +des.object("boulder",07,08) +des.object("boulder",05,09) +des.object("boulder",10,09) +des.object("boulder",07,10) +des.object("boulder",10,10) +des.object("boulder",03,11) + +-- Traps +des.trap("hole",12,10) +des.trap("hole",13,10) +des.trap("hole",14,10) +des.trap("hole",15,10) +des.trap("hole",16,10) +des.trap("hole",17,10) +des.trap("hole",18,10) +des.trap("hole",19,10) +des.trap("hole",20,10) +des.trap("hole",21,10) +des.trap("hole",22,10) +des.trap("hole",23,10) + +-- Random objects +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "=" }); +des.object({ class = "/" }); + diff --git a/dat/soko4-1.lua b/dat/soko4-1.lua new file mode 100644 index 000000000..3257986de --- /dev/null +++ b/dat/soko4-1.lua @@ -0,0 +1,97 @@ +-- NetHack 3.6 sokoban.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1998-1999 by Kevin Hugo +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- In case you haven't played the game Sokoban, you'll learn +-- quickly. This branch isn't particularly difficult, just time +-- consuming. Some players may wish to skip this branch. +-- +-- The following actions are currently permitted without penalty: +-- Carrying or throwing a boulder already in inventory +-- (player or nonplayer). +-- Teleporting boulders. +-- Digging in the floor. +-- The following actions are permitted, but with a luck penalty: +-- Breaking boulders. +-- Stone-to-fleshing boulders. +-- Creating new boulders (e.g., with a scroll of earth). +-- Jumping. +-- Being pulled by a thrown iron ball. +-- Hurtling through the air from Newton's 3rd law. +-- Squeezing past boulders when naked or as a giant. +-- These actions are not permitted: +-- Moving diagonally between two boulders and/or walls. +-- Pushing a boulder diagonally. +-- Picking up boulders (player or nonplayer). +-- Digging or walking through walls. +-- Teleporting within levels or between levels of this branch. +-- Using cursed potions of gain level. +-- Escaping a pit/hole (e.g., by flying, levitation, or +-- passing a dexterity check). +-- Bones files are not permitted. + + +--## Bottom (first) level of Sokoban ### +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "premapped", "solidify"); + +des.map([[ +------ ----- +|....| |...| +|....----...| +|...........| +|..|-|.|-|..| +---------|.--- +|......|.....| +|..----|.....| +--.| |.....| + |.|---|.....| + |...........| + |..|--------- + ---- +]]); +des.levregion({ region = {06,04,06,04}, type = "branch" }) +des.stair("up", 06,06) +des.region(selection.area(00,00,13,12), "lit") +des.non_diggable(selection.area(00,00,13,12)) +des.non_passwall(selection.area(00,00,13,12)) + +-- Boulders +des.object("boulder",02,02) +des.object("boulder",02,03) +-- +des.object("boulder",10,02) +des.object("boulder",09,03) +des.object("boulder",10,04) +-- +des.object("boulder",08,07) +des.object("boulder",09,08) +des.object("boulder",09,09) +des.object("boulder",08,10) +des.object("boulder",10,10) + +-- Traps +des.trap("pit",03,06) +des.trap("pit",04,06) +des.trap("pit",05,06) +des.trap("pit",02,08) +des.trap("pit",02,09) +des.trap("pit",04,10) +des.trap("pit",05,10) +des.trap("pit",06,10) +des.trap("pit",07,10) + +-- A little help +des.object("earth",02,11) +des.object("earth",03,11) + +-- Random objects +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "=" }); +des.object({ class = "/" }); + diff --git a/dat/soko4-2.lua b/dat/soko4-2.lua new file mode 100644 index 000000000..e9df5c050 --- /dev/null +++ b/dat/soko4-2.lua @@ -0,0 +1,68 @@ +-- NetHack 3.6 sokoban.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1998-1999 by Kevin Hugo +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "premapped", "solidify"); + +des.map([[ +-------- ------ +|.|....|-|....| +|.|-..........| +|.||....|.....| +|.||....|.....| +|.|-----|.----- +|.| |......| +|.-----|......| +|.............| +|..|---|......| +---- -------- +]]); +des.levregion({ region = {03,01,03,01}, type = "branch" }) +des.stair("up", 01,01) +des.region(selection.area(00,00,14,10),"lit") +des.non_diggable(selection.area(00,00,14,10)) +des.non_passwall(selection.area(00,00,14,10)) + +-- Boulders +des.object("boulder",05,02) +des.object("boulder",06,02) +des.object("boulder",06,03) +des.object("boulder",07,03) +-- +des.object("boulder",09,05) +des.object("boulder",10,03) +des.object("boulder",11,02) +des.object("boulder",12,03) +-- +des.object("boulder",07,08) +des.object("boulder",08,08) +des.object("boulder",09,08) +des.object("boulder",10,08) + +-- Traps +des.trap("pit",01,02) +des.trap("pit",01,03) +des.trap("pit",01,04) +des.trap("pit",01,05) +des.trap("pit",01,06) +des.trap("pit",01,07) +des.trap("pit",03,08) +des.trap("pit",04,08) +des.trap("pit",05,08) +des.trap("pit",06,08) + +-- A little help +des.object("earth",01,09) +des.object("earth",02,09) + +-- Random objects +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "%" }); +des.object({ class = "=" }); +des.object({ class = "/" }); + + diff --git a/dat/sokoban.des b/dat/sokoban.des deleted file mode 100644 index c4983451d..000000000 --- a/dat/sokoban.des +++ /dev/null @@ -1,637 +0,0 @@ -# NetHack 3.6 sokoban.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ -# Copyright (c) 1998-1999 by Kevin Hugo -# NetHack may be freely redistributed. See license for details. -# -# In case you haven't played the game Sokoban, you'll learn -# quickly. This branch isn't particularly difficult, just time -# consuming. Some players may wish to skip this branch. -# -# The following actions are currently permitted without penalty: -# Carrying or throwing a boulder already in inventory -# (player or nonplayer). -# Teleporting boulders. -# Digging in the floor. -# The following actions are permitted, but with a luck penalty: -# Breaking boulders. -# Stone-to-fleshing boulders. -# Creating new boulders (e.g., with a scroll of earth). -# Jumping. -# Being pulled by a thrown iron ball. -# Hurtling through the air from Newton's 3rd law. -# Squeezing past boulders when naked or as a giant. -# These actions are not permitted: -# Moving diagonally between two boulders and/or walls. -# Pushing a boulder diagonally. -# Picking up boulders (player or nonplayer). -# Digging or walking through walls. -# Teleporting within levels or between levels of this branch. -# Using cursed potions of gain level. -# Escaping a pit/hole (e.g., by flying, levitation, or -# passing a dexterity check). -# Bones files are not permitted. - - -### Bottom (first) level of Sokoban ### -MAZE:"soko4-1",' ' -FLAGS:noteleport,hardfloor,premapped,solidify -GEOMETRY:center,center -#12345678901234567890123456789012345678901234567890 -MAP ------- ----- -|....| |...| -|....----...| -|...........| -|..|-|.|-|..| ----------|.--- -|......|.....| -|..----|.....| ---.| |.....| - |.|---|.....| - |...........| - |..|--------- - ---- -ENDMAP -BRANCH:(06,04,06,04),(0,0,0,0) -STAIR:(06,06),up -REGION:(00,00,13,12),lit,"ordinary" -NON_DIGGABLE:(00,00,13,12) -NON_PASSWALL:(00,00,13,12) - -# Boulders -OBJECT:('`',"boulder"),(02,02) -OBJECT:('`',"boulder"),(02,03) -# -OBJECT:('`',"boulder"),(10,02) -OBJECT:('`',"boulder"),(09,03) -OBJECT:('`',"boulder"),(10,04) -# -OBJECT:('`',"boulder"),(08,07) -OBJECT:('`',"boulder"),(09,08) -OBJECT:('`',"boulder"),(09,09) -OBJECT:('`',"boulder"),(08,10) -OBJECT:('`',"boulder"),(10,10) - -# Traps -TRAP:"pit",(03,06) -TRAP:"pit",(04,06) -TRAP:"pit",(05,06) -TRAP:"pit",(02,08) -TRAP:"pit",(02,09) -TRAP:"pit",(04,10) -TRAP:"pit",(05,10) -TRAP:"pit",(06,10) -TRAP:"pit",(07,10) - -# A little help -OBJECT:('?',"earth"),(02,11) -OBJECT:('?',"earth"),(03,11) - -# Random objects -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'=',random -OBJECT:'/',random - - -MAZE:"soko4-2",' ' -FLAGS:noteleport,hardfloor,premapped,solidify -GEOMETRY:center,center -#12345678901234567890123456789012345678901234567890 -MAP --------- ------ -|.|....|-|....| -|.|-..........| -|.||....|.....| -|.||....|.....| -|.|-----|.----- -|.| |......| -|.-----|......| -|.............| -|..|---|......| ----- -------- -ENDMAP -BRANCH:(03,01,03,01),(0,0,0,0) -STAIR:(01,01),up -REGION:(00,00,14,10),lit,"ordinary" -NON_DIGGABLE:(00,00,14,10) -NON_PASSWALL:(00,00,14,10) - -# Boulders -OBJECT:('`',"boulder"),(05,02) -OBJECT:('`',"boulder"),(06,02) -OBJECT:('`',"boulder"),(06,03) -OBJECT:('`',"boulder"),(07,03) -# -OBJECT:('`',"boulder"),(09,05) -OBJECT:('`',"boulder"),(10,03) -OBJECT:('`',"boulder"),(11,02) -OBJECT:('`',"boulder"),(12,03) -# -OBJECT:('`',"boulder"),(07,08) -OBJECT:('`',"boulder"),(08,08) -OBJECT:('`',"boulder"),(09,08) -OBJECT:('`',"boulder"),(10,08) - -# Traps -TRAP:"pit",(01,02) -TRAP:"pit",(01,03) -TRAP:"pit",(01,04) -TRAP:"pit",(01,05) -TRAP:"pit",(01,06) -TRAP:"pit",(01,07) -TRAP:"pit",(03,08) -TRAP:"pit",(04,08) -TRAP:"pit",(05,08) -TRAP:"pit",(06,08) - -# A little help -OBJECT:('?',"earth"),(01,09) -OBJECT:('?',"earth"),(02,09) - -# Random objects -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'=',random -OBJECT:'/',random - - -### Second level ### -MAZE:"soko3-1",' ' -FLAGS:noteleport,premapped,solidify -GEOMETRY:center,center -#12345678901234567890123456789012345678901234567890 -MAP ------------ ----------- -|....|....|-- |.........| -|....|......| |.........| -|.........|-- |.........| -|....|....| |.........| -|-.--------- |.........| -|....|.....| |.........| -|....|.....| |.........| -|..........| |.........| -|....|.....|---------------+| -|....|......................| ------------------------------ -ENDMAP -STAIR:(11,02),down -STAIR:(23,04),up -DOOR:locked,(27,09) -REGION:(00,00,28,11),lit,"ordinary" -NON_DIGGABLE:(00,00,28,11) -NON_PASSWALL:(00,00,28,11) - -# Boulders -OBJECT:('`',"boulder"),(03,02) -OBJECT:('`',"boulder"),(04,02) -# -OBJECT:('`',"boulder"),(06,02) -OBJECT:('`',"boulder"),(06,03) -OBJECT:('`',"boulder"),(07,02) -# -OBJECT:('`',"boulder"),(03,06) -OBJECT:('`',"boulder"),(02,07) -OBJECT:('`',"boulder"),(03,07) -OBJECT:('`',"boulder"),(03,08) -OBJECT:('`',"boulder"),(02,09) -OBJECT:('`',"boulder"),(03,09) -OBJECT:('`',"boulder"),(04,09) -# -OBJECT:('`',"boulder"),(06,07) -OBJECT:('`',"boulder"),(06,09) -OBJECT:('`',"boulder"),(08,07) -OBJECT:('`',"boulder"),(08,10) -OBJECT:('`',"boulder"),(09,08) -OBJECT:('`',"boulder"),(09,09) -OBJECT:('`',"boulder"),(10,07) -OBJECT:('`',"boulder"),(10,10) - -# Traps -TRAP:"hole",(12,10) -TRAP:"hole",(13,10) -TRAP:"hole",(14,10) -TRAP:"hole",(15,10) -TRAP:"hole",(16,10) -TRAP:"hole",(17,10) -TRAP:"hole",(18,10) -TRAP:"hole",(19,10) -TRAP:"hole",(20,10) -TRAP:"hole",(21,10) -TRAP:"hole",(22,10) -TRAP:"hole",(23,10) -TRAP:"hole",(24,10) -TRAP:"hole",(25,10) -TRAP:"hole",(26,10) - -# Random objects -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'=',random -OBJECT:'/',random - - -MAZE:"soko3-2",' ' -FLAGS:noteleport,premapped,solidify -GEOMETRY:center,center -#12345678901234567890123456789012345678901234567890 -MAP - ---- ----------- --|..|------- |.........| -|..........| |.........| -|..-----.-.| |.........| -|..|...|...| |.........| -|.........-| |.........| -|.......|..| |.........| -|.----..--.| |.........| -|........|.-- |.........| -|.---.-.....------------+| -|...|...-................| -|.........---------------- -----|..|..| - ------- -ENDMAP -STAIR:(03,01),down -STAIR:(20,04),up -DOOR:locked,(24,09) -REGION:(00,00,25,13),lit,"ordinary" -NON_DIGGABLE:(00,00,25,13) -NON_PASSWALL:(00,00,25,13) - -# Boulders -OBJECT:('`',"boulder"),(02,03) -OBJECT:('`',"boulder"),(08,03) -OBJECT:('`',"boulder"),(09,04) -OBJECT:('`',"boulder"),(02,05) -OBJECT:('`',"boulder"),(04,05) -OBJECT:('`',"boulder"),(09,05) -OBJECT:('`',"boulder"),(02,06) -OBJECT:('`',"boulder"),(05,06) -OBJECT:('`',"boulder"),(06,07) -OBJECT:('`',"boulder"),(03,08) -OBJECT:('`',"boulder"),(07,08) -OBJECT:('`',"boulder"),(05,09) -OBJECT:('`',"boulder"),(10,09) -OBJECT:('`',"boulder"),(07,10) -OBJECT:('`',"boulder"),(10,10) -OBJECT:('`',"boulder"),(03,11) - -# Traps -TRAP:"hole",(12,10) -TRAP:"hole",(13,10) -TRAP:"hole",(14,10) -TRAP:"hole",(15,10) -TRAP:"hole",(16,10) -TRAP:"hole",(17,10) -TRAP:"hole",(18,10) -TRAP:"hole",(19,10) -TRAP:"hole",(20,10) -TRAP:"hole",(21,10) -TRAP:"hole",(22,10) -TRAP:"hole",(23,10) - -# Random objects -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'=',random -OBJECT:'/',random - - -### Third level ### -MAZE:"soko2-1",' ' -FLAGS:noteleport,premapped,solidify -GEOMETRY:center,center -#12345678901234567890123456789012345678901234567890 -MAP --------------------- -|........|...|.....| -|.....-..|.-.|.....| -|..|.....|...|.....| -|-.|..-..|.-.|.....| -|...--.......|.....| -|...|...-...-|.....| -|...|..|...--|.....| -|-..|..|----------+| -|..................| -|...|..|------------ --------- -ENDMAP -STAIR:(06,10),down -STAIR:(16,04),up -DOOR:locked,(18,08) -REGION:(00,00,19,11),lit,"ordinary" -NON_DIGGABLE:(00,00,19,11) -NON_PASSWALL:(00,00,19,11) - -# Boulders -OBJECT:('`',"boulder"),(02,02) -OBJECT:('`',"boulder"),(03,02) -# -OBJECT:('`',"boulder"),(05,03) -OBJECT:('`',"boulder"),(07,03) -OBJECT:('`',"boulder"),(07,02) -OBJECT:('`',"boulder"),(08,02) -# -OBJECT:('`',"boulder"),(10,03) -OBJECT:('`',"boulder"),(11,03) -# -OBJECT:('`',"boulder"),(02,07) -OBJECT:('`',"boulder"),(02,08) -OBJECT:('`',"boulder"),(03,09) -# -OBJECT:('`',"boulder"),(05,07) -OBJECT:('`',"boulder"),(06,06) - -# Traps -TRAP:"hole",(08,09) -TRAP:"hole",(09,09) -TRAP:"hole",(10,09) -TRAP:"hole",(11,09) -TRAP:"hole",(12,09) -TRAP:"hole",(13,09) -TRAP:"hole",(14,09) -TRAP:"hole",(15,09) -TRAP:"hole",(16,09) -TRAP:"hole",(17,09) - -# Random objects -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'=',random -OBJECT:'/',random - - -MAZE:"soko2-2",' ' -FLAGS:noteleport,premapped,solidify -GEOMETRY:center,center -#12345678901234567890123456789012345678901234567890 -MAP - -------- ---|.|....| -|........|---------- -|.-...-..|.|.......| -|...-......|.......| -|.-....|...|.......| -|....-.--.-|.......| -|..........|.......| -|.--...|...|.......| -|....-.|---|.......| ---|....|----------+| - |................| - ------------------ -ENDMAP -STAIR:(06,11),down -STAIR:(15,06),up -DOOR:locked,(18,10) -REGION:(00,00,19,12),lit,"ordinary" -NON_DIGGABLE:(00,00,19,12) -NON_PASSWALL:(00,00,19,12) - -# Boulders -OBJECT:('`',"boulder"),(04,02) -OBJECT:('`',"boulder"),(04,03) -OBJECT:('`',"boulder"),(05,03) -OBJECT:('`',"boulder"),(07,03) -OBJECT:('`',"boulder"),(08,03) -OBJECT:('`',"boulder"),(02,04) -OBJECT:('`',"boulder"),(03,04) -OBJECT:('`',"boulder"),(05,05) -OBJECT:('`',"boulder"),(06,06) -OBJECT:('`',"boulder"),(09,06) -OBJECT:('`',"boulder"),(03,07) -OBJECT:('`',"boulder"),(04,07) -OBJECT:('`',"boulder"),(07,07) -OBJECT:('`',"boulder"),(06,09) -OBJECT:('`',"boulder"),(05,10) -OBJECT:('`',"boulder"),(05,11) - -# Traps -TRAP:"hole",(07,11) -TRAP:"hole",(08,11) -TRAP:"hole",(09,11) -TRAP:"hole",(10,11) -TRAP:"hole",(11,11) -TRAP:"hole",(12,11) -TRAP:"hole",(13,11) -TRAP:"hole",(14,11) -TRAP:"hole",(15,11) -TRAP:"hole",(16,11) -TRAP:"hole",(17,11) - -# Random objects -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'=',random -OBJECT:'/',random - - -### Top (last) level of Sokoban ### -MAZE:"soko1-1",' ' -FLAGS:noteleport,premapped,solidify -GEOMETRY:center,center -#12345678901234567890123456789012345678901234567890 -MAP --------------------------- -|........................| -|.......|---------------.| --------.------ |.| - |...........| |.| - |...........| |.| ---------.----- |.| -|............| |.| -|............| |.| ------.-------- ------|.| - |..........| --|.....|.| - |..........| |.+.....|.| - |.........|- |-|.....|.| --------.---- |.+.....+.| -|........| |-|.....|-- -|........| |.+.....| -|...|----- --|.....| ------ ------- -ENDMAP -$place = { (16,11),(16,13),(16,15) } -SHUFFLE: $place - -STAIR:(01,01),down -REGION:(00,00,25,17),lit,"ordinary" -NON_DIGGABLE:(00,00,25,17) -NON_PASSWALL:(00,00,25,17) - -# Boulders -OBJECT:('`',"boulder"),(03,05) -OBJECT:('`',"boulder"),(05,05) -OBJECT:('`',"boulder"),(07,05) -OBJECT:('`',"boulder"),(09,05) -OBJECT:('`',"boulder"),(11,05) -# -OBJECT:('`',"boulder"),(04,07) -OBJECT:('`',"boulder"),(04,08) -OBJECT:('`',"boulder"),(06,07) -OBJECT:('`',"boulder"),(09,07) -OBJECT:('`',"boulder"),(11,07) -# -OBJECT:('`',"boulder"),(03,12) -OBJECT:('`',"boulder"),(04,10) -OBJECT:('`',"boulder"),(05,12) -OBJECT:('`',"boulder"),(06,10) -OBJECT:('`',"boulder"),(07,11) -OBJECT:('`',"boulder"),(08,10) -OBJECT:('`',"boulder"),(09,12) -# -OBJECT:('`',"boulder"),(03,14) - -# Traps -TRAP:"hole",(08,01) -TRAP:"hole",(09,01) -TRAP:"hole",(10,01) -TRAP:"hole",(11,01) -TRAP:"hole",(12,01) -TRAP:"hole",(13,01) -TRAP:"hole",(14,01) -TRAP:"hole",(15,01) -TRAP:"hole",(16,01) -TRAP:"hole",(17,01) -TRAP:"hole",(18,01) -TRAP:"hole",(19,01) -TRAP:"hole",(20,01) -TRAP:"hole",(21,01) -TRAP:"hole",(22,01) -TRAP:"hole",(23,01) - -MONSTER:('m',"giant mimic"), random, m_object "boulder" -MONSTER:('m',"giant mimic"), random, m_object "boulder" - -# Random objects -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'=',random -OBJECT:'/',random - -# Rewards -DOOR:locked,(23,13) -DOOR:closed,(17,11) -DOOR:closed,(17,13) -DOOR:closed,(17,15) -REGION:(18,10,22,16),lit,"zoo",filled,irregular -IF [50%] { - OBJECT:('(',"bag of holding"),$place[0] -} ELSE { - OBJECT:('"',"amulet of reflection"),$place[0] -} -ENGRAVING:$place[0],burn,"Elbereth" -OBJECT:('?', "scare monster"),$place[0],cursed - - -MAZE:"soko1-2",' ' -FLAGS:noteleport,premapped,solidify -GEOMETRY:center,center -#12345678901234567890123456789012345678901234567890 -MAP - ------------------------ - |......................| - |..-------------------.| -----.| ----- |.| -|..|.-- --...| |.| -|.....|--|....| |.| -|.....|..|....| |.| ---....|......-- |.| - |.......|...| ------|.| - |....|..|...| --|.....|.| - |....|--|...| |.+.....|.| - |.......|..-- |-|.....|.| - ----....|.-- |.+.....+.| - ---.--.| |-|.....|-- - |.....| |.+.....| - |..|..| --|.....| - ------- ------- -ENDMAP -$place = { (16,10),(16,12),(16,14) } -SHUFFLE: $place - -STAIR:(06,15),down -REGION:(00,00,25,16),lit,"ordinary" -NON_DIGGABLE:(00,00,25,16) -NON_PASSWALL:(00,00,25,16) - -# Boulders -OBJECT:('`',"boulder"),(04,04) -OBJECT:('`',"boulder"),(02,06) -OBJECT:('`',"boulder"),(03,06) -OBJECT:('`',"boulder"),(04,07) -OBJECT:('`',"boulder"),(05,07) -OBJECT:('`',"boulder"),(02,08) -OBJECT:('`',"boulder"),(05,08) -OBJECT:('`',"boulder"),(03,09) -OBJECT:('`',"boulder"),(04,09) -OBJECT:('`',"boulder"),(03,10) -OBJECT:('`',"boulder"),(05,10) -OBJECT:('`',"boulder"),(06,12) -# -OBJECT:('`',"boulder"),(07,14) -# -OBJECT:('`',"boulder"),(11,05) -OBJECT:('`',"boulder"),(12,06) -OBJECT:('`',"boulder"),(10,07) -OBJECT:('`',"boulder"),(11,07) -OBJECT:('`',"boulder"),(10,08) -OBJECT:('`',"boulder"),(12,09) -OBJECT:('`',"boulder"),(11,10) - -# Traps -TRAP:"hole",(05,01) -TRAP:"hole",(06,01) -TRAP:"hole",(07,01) -TRAP:"hole",(08,01) -TRAP:"hole",(09,01) -TRAP:"hole",(10,01) -TRAP:"hole",(11,01) -TRAP:"hole",(12,01) -TRAP:"hole",(13,01) -TRAP:"hole",(14,01) -TRAP:"hole",(15,01) -TRAP:"hole",(16,01) -TRAP:"hole",(17,01) -TRAP:"hole",(18,01) -TRAP:"hole",(19,01) -TRAP:"hole",(20,01) -TRAP:"hole",(21,01) -TRAP:"hole",(22,01) - -MONSTER:('m',"giant mimic"), random, m_object "boulder" -MONSTER:('m',"giant mimic"), random, m_object "boulder" - -# Random objects -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'%',random -OBJECT:'=',random -OBJECT:'/',random - -# Rewards -DOOR:locked,(23,12) -DOOR:closed,(17,10) -DOOR:closed,(17,12) -DOOR:closed,(17,14) -REGION:(18,09,22,15),lit,"zoo",filled,irregular -IF [50%] { - OBJECT:('(',"bag of holding"),$place[0] -} ELSE { - OBJECT:('"',"amulet of reflection"),$place[0] -} -ENGRAVING:$place[0],burn,"Elbereth" -OBJECT:('?', "scare monster"),$place[0],cursed diff --git a/dat/tower.des b/dat/tower.des deleted file mode 100644 index c58fb8b5e..000000000 --- a/dat/tower.des +++ /dev/null @@ -1,147 +0,0 @@ -# NetHack 3.6 tower.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# NetHack may be freely redistributed. See license for details. -# -# Upper stage of Vlad's tower -MAZE:"tower1",' ' -FLAGS: noteleport,hardfloor,solidify -GEOMETRY:half-left,center -MAP - --- --- --- - |.| |.| |.| ----S---S---S--- -|.......+.+...| ----+-----.----- - |...\.|.+.| ----+-----.----- -|.......+.+...| ----S---S---S--- - |.| |.| |.| - --- --- --- -ENDMAP -$niches = { (03,01), (03,09), (07,01), (07,09), (11,01), (11,09) } -SHUFFLE: $niches -LADDER:(11,05),down -# The lord and his court -MONSTER:('V',"Vlad the Impaler"),(06,05) -MONSTER:'V',$niches[0] -MONSTER:'V',$niches[1] -MONSTER:'V',$niches[2] -MONSTER:'V',$niches[3] -MONSTER:'V',$niches[4] -MONSTER:'V',$niches[5] -# The doors -DOOR:closed,(08,03) -DOOR:closed,(10,03) -DOOR:closed,(03,04) -DOOR:locked,(10,05) -DOOR:locked,(08,07) -DOOR:locked,(10,07) -DOOR:closed,(03,06) -# treasures -OBJECT:('(',"chest"),(07,05) - -OBJECT:('(',"chest"),$niches[0] -OBJECT:('(',"chest"),$niches[1] -OBJECT:('(',"chest"),$niches[2] -OBJECT:('(',"chest"),$niches[3] -CONTAINER:('(',"chest"),$niches[4] { - OBJECT:('(', "wax candle"), quantity:4d2 -} -CONTAINER:('(',"chest"),$niches[5] { - OBJECT:('(', "tallow candle"), quantity:4d2 -} -# We have to protect the tower against outside attacks -NON_DIGGABLE:(00,00,14,10) - - -# Intermediate stage of Vlad's tower -MAZE:"tower2",' ' -FLAGS: noteleport,hardfloor,solidify -GEOMETRY:half-left,center -MAP - --- --- --- - |.| |.| |.| ----S---S---S--- -|.S.........S.| ----.------+---- - |......|..| ---------.------ -|.S......+..S.| ----S---S---S--- - |.| |.| |.| - --- --- --- -ENDMAP -# Random places are the 10 niches -$place = { (03,01),(07,01),(11,01),(01,03),(13,03), - (01,07),(13,07),(03,09),(07,09),(11,09) } -SHUFFLE: $place -LADDER:(11,05),up -LADDER:(03,07),down -DOOR:locked,(10,04) -DOOR:locked,(09,07) -MONSTER:'&',$place[0] -MONSTER:'&',$place[1] -MONSTER:('d',"hell hound pup"),$place[2] -MONSTER:('d',"hell hound pup"),$place[3] -MONSTER:('d',"winter wolf"),$place[4] -CONTAINER:('(',"chest"),$place[5] { - OBJECT:('"',"amulet of life saving") -} -CONTAINER:('(',"chest"),$place[6] { - OBJECT:('"',"amulet of strangulation") -} -OBJECT:('[',"water walking boots"),$place[7] -OBJECT:('[',"crystal plate mail"),$place[8] -OBJECT:('+',"invisibility"),$place[9] -# Walls in the tower are non diggable -NON_DIGGABLE:(00,00,14,10) - - -# Bottom most stage of Vlad's tower -MAZE:"tower3",' ' -FLAGS: noteleport,hardfloor,solidify -GEOMETRY:half-left,center -MAP - --- --- --- - |.| |.| |.| - ---S---S---S--- - |.S.........S.| ------.........----- -|...|.........+...| -|.---.........---.| -|.|.S.........S.|.| -|.---S---S---S---.| -|...|.|.|.|.|.|...| ----.---.---.---.--- - |.............| - --------------- -ENDMAP -# Random places are the 10 niches -$place = { (05,01),(09,01),(13,01),(03,03),(15,03), - (03,07),(15,07),(05,09),(09,09),(13,09) } -SHUFFLE: $place -BRANCH:(02,05,02,05),(00,00,00,00) -LADDER:(05,07),up -# Entry door is, of course, locked -DOOR:locked,(14,05) -# Let's put a dragon behind the door, just for the fun... -MONSTER:'D',(13,05) -MONSTER:random,(12,04) -MONSTER:random,(12,06) -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -MONSTER:random,random -OBJECT:(')',"long sword"),$place[0] -TRAP:random,$place[0] -OBJECT:('(',"lock pick"),$place[1] -TRAP:random,$place[1] -OBJECT:('[',"elven cloak"),$place[2] -TRAP:random,$place[2] -OBJECT:('(',"blindfold"),$place[3] -TRAP:random,$place[3] -# Walls in the tower are non diggable -NON_DIGGABLE:(00,00,18,12) diff --git a/dat/tower1.lua b/dat/tower1.lua new file mode 100644 index 000000000..dcd84f1f6 --- /dev/null +++ b/dat/tower1.lua @@ -0,0 +1,62 @@ +-- NetHack 3.6 tower.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- Upper stage of Vlad's tower +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "solidify") +des.map({ halign = "half-left", valign = "center", map = [[ + --- --- --- + |.| |.| |.| +---S---S---S--- +|.......+.+...| +---+-----.----- + |...\.|.+.| +---+-----.----- +|.......+.+...| +---S---S---S--- + |.| |.| |.| + --- --- --- +]] }); + +local niches = { {03,01}, {03,09}, {07,01}, {07,09}, {11,01}, {11,09} }; +shuffle(niches); + +des.ladder("down", 11,05) +-- The lord and his court +des.monster("Vlad the Impaler", 06, 05) +des.monster("V",niches[1]) +des.monster("V",niches[2]) +des.monster("V",niches[3]) +des.monster("V",niches[4]) +des.monster("V",niches[5]) +des.monster("V",niches[6]) +-- The doors +des.door("closed",08,03) +des.door("closed",10,03) +des.door("closed",03,04) +des.door("locked",10,05) +des.door("locked",08,07) +des.door("locked",10,07) +des.door("closed",03,06) +-- treasures +des.object("chest", 07,05) + +des.object("chest",niches[6]) +des.object("chest",niches[1]) +des.object("chest",niches[2]) +des.object("chest",niches[3]) +des.object({ id = "chest", coord=niches[4], + contents = function() + des.object({ id = "wax candle", quantity=math.random(4,8) }) + end +}); +des.object({ id = "chest", coord=niches[5], + contents = function() + des.object({ id = "tallow candle", quantity=math.random(4,8) }) + end +}); +-- We have to protect the tower against outside attacks +des.non_diggable(selection.area(00,00,14,10)) diff --git a/dat/tower2.lua b/dat/tower2.lua new file mode 100644 index 000000000..0376ec51c --- /dev/null +++ b/dat/tower2.lua @@ -0,0 +1,50 @@ +-- NetHack 3.6 tower.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "solidify") +des.map({ halign = "half-left", valign = "center", map = [[ + --- --- --- + |.| |.| |.| +---S---S---S--- +|.S.........S.| +---.------+---- + |......|..| +--------.------ +|.S......+..S.| +---S---S---S--- + |.| |.| |.| + --- --- --- +]] }); +-- Random places are the 10 niches +local place = { {03,01},{07,01},{11,01},{01,03},{13,03}, + {01,07},{13,07},{03,09},{07,09},{11,09} } +shuffle(place) + +des.ladder("up", 11,05) +des.ladder("down", 03,07) +des.door("locked",10,04) +des.door("locked",09,07) +des.monster("&",place[10]) +des.monster("&",place[1]) +des.monster("hell hound pup",place[2]) +des.monster("hell hound pup",place[3]) +des.monster("winter wolf",place[4]) +des.object({ id = "chest", coord = place[5], + contents = function() + des.object("amulet of life saving") + end +}); +des.object({ id = "chest", coord = place[6], + contents = function() + des.object("amulet of strangulation") + end +}); +des.object("water walking boots",place[7]) +des.object("crystal plate mail",place[8]) +des.object("invisibility",place[9]) +-- Walls in the tower are non diggable +des.non_diggable(selection.area(00,00,14,10)) + diff --git a/dat/tower3.lua b/dat/tower3.lua new file mode 100644 index 000000000..345c5a9c2 --- /dev/null +++ b/dat/tower3.lua @@ -0,0 +1,50 @@ +-- NetHack 3.6 tower.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "solidify") +des.map({ halign = "half-left", valign = "center", map = [[ + --- --- --- + |.| |.| |.| + ---S---S---S--- + |.S.........S.| +-----.........----- +|...|.........+...| +|.---.........---.| +|.|.S.........S.|.| +|.---S---S---S---.| +|...|.|.|.|.|.|...| +---.---.---.---.--- + |.............| + --------------- +]] }); +-- Random places are the 10 niches +local place = { {05,01},{09,01},{13,01},{03,03},{15,03}, + {03,07},{15,07},{05,09},{09,09},{13,09} } + +des.levregion({ type="branch", region={02,05,02,05} }) +des.ladder("up", 05,07) +-- Entry door is, of course, locked +des.door("locked",14,05) +-- Let's put a dragon behind the door, just for the fun... +des.monster("D", 13, 05) +des.monster({ x=12, y=04 }) +des.monster({ x=12, y=06 }) +des.monster() +des.monster() +des.monster() +des.monster() +des.monster() +des.monster() +des.object("long sword",place[4]) +des.trap({ coord = place[4] }) +des.object("lock pick",place[1]) +des.trap({ coord = place[1] }) +des.object("elven cloak",place[2]) +des.trap({ coord = place[2] }) +des.object("blindfold",place[3]) +des.trap({ coord = place[3] }) +-- Walls in the tower are non diggable +des.non_diggable(selection.area(00,00,18,12)) diff --git a/dat/valley.lua b/dat/valley.lua new file mode 100644 index 000000000..5e78e71be --- /dev/null +++ b/dat/valley.lua @@ -0,0 +1,174 @@ +-- NetHack 3.6 gehennom.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992 by M. Stephenson and Izchak Miller +-- NetHack may be freely redistributed. See license for details. +-- +-- + +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "nommap"); + +des.map([[ +---------------------------------------------------------------------------- +|...S.|..|.....| |.....-| |................| |...............| |...| +|---|.|.--.---.| |......--- ----..........-----.-----....---........---.-.| +| |.|.|..| |.| --........| |.............| |.......---| |-...........--| +| |...S..| |.| |.......-----.......------| |--------..---......------- | +|----------- |.| |-......| |....|...-- |...-----................---- | +|.....S....---.| |.......| |....|...| |..............----------- | +|.....|.|......| |.....--- |......--- |....---.......| | +|.....|.|------| |....-- --....-- |-------- ----....--------------- | +|.....|--......---BBB-| |...-- |.......| |..................| | +|..........||........-| --...| |.......| |...||.............| | +|.....|...-||-........------....| |.......---- |...||.............-- | +|.....|--......---...........--------..........| |.......---------...-- | +|.....| |------| |--.......--| |..B......----- -----....| |.| |....--- | +|.....| |......--| ------..| |----..B......| |.--------.-- |-.....---| +|------ |........| |.|....| |.....----BBBB---------...........---.........| +| |........| |...|..| |.....| |-.............--------...........---| +| --.....-----------.| |....-----.....---------- |.........---- | +| |..|..B...........| |.|..........|.| |.|........| | +---------------------------------------------------------------------------- +]]); + +-- Make the path somewhat unpredictable +-- If you get "lucky", you may have to go through all three graveyards. +if math.random(0, 99) < 50 then + des.terrain(selection.line(50,8, 53,8), '-') + des.terrain(selection.line(40,8, 43,8), 'B') +end +if math.random(0, 99) < 50 then + des.terrain({ x=27, y=12, typ='|' }) + des.terrain(selection.line(27,3, 29,3), 'B') + des.terrain({ x=28, y=2, typ='-' }) +end +if math.random(0, 99) < 50 then + des.terrain(selection.line(16,10, 16,11), '|') + des.terrain(selection.line(9,13, 14,13), 'B') +end + + +-- Dungeon Description +-- The shrine to Moloch. +des.region({ region={01,06, 05,14},lit=1,type="temple" }) +-- The Morgues +des.region({ region={19,01, 24,08},lit=0,type="morgue",prefilled=0,irregular=1 }) +des.region({ region={09,14, 16,18},lit=0,type="morgue",prefilled=0,irregular=1 }) +des.region({ region={37,09, 43,14},lit=0,type="morgue",prefilled=0,irregular=1 }) +-- Stairs +des.stair("down", 01,01) +-- Branch location +des.levregion({ type="branch", region={66,17,66,17} }) +des.teleport_region({ region = {58,09,72,18}, dir="down" }) + +-- Secret Doors +des.door("locked",04,01) +des.door("locked",08,04) +des.door("locked",06,06) + +-- The altar of Moloch. +des.altar({ x=03,y=10,align="noalign", type="shrine" }) + +-- Non diggable walls - everywhere! +des.non_diggable(selection.area(00,00,75,19)) + +-- Objects +-- **LOTS** of dead bodies (all human). +-- note: no priest(esse)s or monks - maybe Moloch has a *special* +-- fate reserved for members of *those* classes. +-- +des.object({ id="corpse",montype="archeologist" }) +des.object({ id="corpse",montype="archeologist" }) +des.object({ id="corpse",montype="barbarian" }) +des.object({ id="corpse",montype="barbarian" }) +des.object({ id="corpse",montype="caveman" }) +des.object({ id="corpse",montype="cavewoman" }) +des.object({ id="corpse",montype="healer" }) +des.object({ id="corpse",montype="healer" }) +des.object({ id="corpse",montype="knight" }) +des.object({ id="corpse",montype="knight" }) +des.object({ id="corpse",montype="ranger" }) +des.object({ id="corpse",montype="ranger" }) +des.object({ id="corpse",montype="rogue" }) +des.object({ id="corpse",montype="rogue" }) +des.object({ id="corpse",montype="samurai" }) +des.object({ id="corpse",montype="samurai" }) +des.object({ id="corpse",montype="tourist" }) +des.object({ id="corpse",montype="tourist" }) +des.object({ id="corpse",montype="valkyrie" }) +des.object({ id="corpse",montype="valkyrie" }) +des.object({ id="corpse",montype="wizard" }) +des.object({ id="corpse",montype="wizard" }) +-- +-- Some random weapons and armor. +-- +des.object("[") +des.object("[") +des.object("[") +des.object("[") +des.object(")") +des.object(")") +des.object(")") +des.object(")") +-- +-- Some random loot. +-- +des.object("ruby") +des.object("*") +des.object("*") +des.object("!") +des.object("!") +des.object("!") +des.object("?") +des.object("?") +des.object("?") +des.object("/") +des.object("/") +des.object("=") +des.object("=") +des.object("+") +des.object("+") +des.object("(") +des.object("(") +des.object("(") + +-- (Not so) Random traps. +des.trap("spiked pit", 05,02) +des.trap("spiked pit", 14,05) +des.trap("sleep gas", 03,01) +des.trap("board", 21,12) +des.trap("board") +des.trap("dart", 60,01) +des.trap("dart", 26,17) +des.trap("anti magic") +des.trap("anti magic") +des.trap("magic") +des.trap("magic") + +-- Random monsters. +-- The ghosts. +des.monster("ghost") +des.monster("ghost") +des.monster("ghost") +des.monster("ghost") +des.monster("ghost") +des.monster("ghost") +-- Add a few bats for atmosphere. +des.monster("vampire bat") +des.monster("vampire bat") +des.monster("vampire bat") +-- And a lich for good measure. +des.monster("L") +-- Some undead nasties for good measure +des.monster("V") +des.monster("V") +des.monster("V") +des.monster("Z") +des.monster("Z") +des.monster("Z") +des.monster("Z") +des.monster("M") +des.monster("M") +des.monster("M") +des.monster("M") diff --git a/dat/water.lua b/dat/water.lua new file mode 100644 index 000000000..fdf6a5586 --- /dev/null +++ b/dat/water.lua @@ -0,0 +1,102 @@ +-- NetHack 3.6 endgame.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992,1993 by Izchak Miller, David Cohrs, +-- and Timo Hakulinen +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style = "solidfill", fg = " " }); + +des.level_flags("mazelevel", "noteleport", "hardfloor", "shortsighted") +des.message("You find yourself suspended in an air bubble surrounded by water.") +-- The player lands upon arrival to an air bubble +-- within the leftmost third of the level. The +-- portal to the next level is randomly located in an air +-- bubble within the rightmost third of the level. +-- Bubbles are generated by special code in mkmaze.c for now. +des.map([[ +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW +]]); +des.teleport_region({ region = {0,0,25,19} }) +des.levregion({ type="portal", region={51,0,75,19}, name="astral" }) +-- A fisherman's dream... +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("giant eel") +des.monster("electric eel") +des.monster("electric eel") +des.monster("electric eel") +des.monster("electric eel") +des.monster("electric eel") +des.monster("electric eel") +des.monster("electric eel") +des.monster("electric eel") +des.monster("kraken") +des.monster("kraken") +des.monster("kraken") +des.monster("kraken") +des.monster("kraken") +des.monster("kraken") +des.monster("kraken") +des.monster("kraken") +des.monster("kraken") +des.monster("shark") +des.monster("shark") +des.monster("shark") +des.monster("shark") +des.monster("piranha") +des.monster("piranha") +des.monster("piranha") +des.monster("piranha") +des.monster("jellyfish") +des.monster("jellyfish") +des.monster("jellyfish") +des.monster("jellyfish") +des.monster(";") +des.monster(";") +des.monster(";") +des.monster(";") +-- These guys feel like home here +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) +des.monster({ id = "water elemental", peaceful = 0 }) + diff --git a/dat/wizard1.lua b/dat/wizard1.lua new file mode 100644 index 000000000..a34f20df5 --- /dev/null +++ b/dat/wizard1.lua @@ -0,0 +1,92 @@ +-- NetHack 3.6 yendor.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992 by M. Stephenson and Izchak Miller +-- NetHack may be freely redistributed. See license for details. +-- +-- +-- The top (real) wizard level. +-- Keeping the Moat for old-time's sake +des.level_init({ style="mazegrid", bg ="-" }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") +des.map([[ +----------------------------. +|.......|..|.........|.....|. +|.......S..|.}}}}}}}.|.....|. +|..--S--|..|.}}---}}.|---S-|. +|..|....|..|.}--.--}.|..|..|. +|..|....|..|.}|...|}.|..|..|. +|..--------|.}--.--}.|..|..|. +|..|.......|.}}---}}.|..|..|. +|..S.......|.}}}}}}}.|..|..|. +|..|.......|.........|..|..|. +|..|.......|-----------S-S-|. +|..|.......S...............|. +----------------------------. +]]); +des.levregion({ type="stair-up", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} }) +des.levregion({ type="stair-down", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} }) +des.levregion({ type="branch", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} }) +des.teleport_region({ region={01,00,79,20}, region_islev=1, exclude={0,0,27,12} }) +-- Make it a morgue for rm id in mkmaze.c +-- for the purpose of random sdoor placement +des.region({ region={12,01, 20,09}, lit=0, type="morgue", prefilled=1 }) +-- another region to constrain monster arrival +des.region({ region={01,01, 10,11}, lit=0, type="ordinary", prefilled=0 }) +des.mazewalk(28,05,"east") +des.ladder("down", 06,05) +-- Non diggable walls +-- Walls inside the moat stay diggable +des.non_diggable(selection.area(00,00,11,12)) +des.non_diggable(selection.area(11,00,21,00)) +des.non_diggable(selection.area(11,10,27,12)) +des.non_diggable(selection.area(21,00,27,10)) +-- Non passable walls +des.non_passwall(selection.area(00,00,11,12)) +des.non_passwall(selection.area(11,00,21,00)) +des.non_passwall(selection.area(11,10,27,12)) +des.non_passwall(selection.area(21,00,27,10)) +-- The wizard and his guards +des.monster({ id = "Wizard of Yendor", x=16, y=05, asleep=1 }) +des.monster("hell hound", 15, 05) +des.monster("vampire lord", 17, 05) +-- The local treasure +des.object("Book of the Dead", 16, 05) +-- Surrounding terror +des.monster("kraken", 14, 02) +des.monster("giant eel", 17, 02) +des.monster("kraken", 13, 04) +des.monster("giant eel", 13, 06) +des.monster("kraken", 19, 04) +des.monster("giant eel", 19, 06) +des.monster("kraken", 15, 08) +des.monster("giant eel", 17, 08) +des.monster("piranha", 15, 02) +des.monster("piranha", 19, 08) +-- Random monsters +des.monster("D") +des.monster("H") +des.monster("&") +des.monster("&") +des.monster("&") +des.monster("&") +-- And to make things a little harder. +des.trap("board",16,04) +des.trap("board",16,06) +des.trap("board",15,05) +des.trap("board",17,05) +-- Random traps. +des.trap("spiked pit") +des.trap("sleep gas") +des.trap("anti magic") +des.trap("magic") +-- Some random loot. +des.object("ruby") +des.object("!") +des.object("!") +des.object("?") +des.object("?") +des.object("+") +des.object("+") +des.object("+") + diff --git a/dat/wizard2.lua b/dat/wizard2.lua new file mode 100644 index 000000000..9bcd4ab3b --- /dev/null +++ b/dat/wizard2.lua @@ -0,0 +1,55 @@ +-- NetHack 3.6 yendor.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992 by M. Stephenson and Izchak Miller +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style="mazegrid", bg ="-" }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") +des.map([[ +----------------------------. +|.....|.S....|.............|. +|.....|.-------S--------S--|. +|.....|.|.........|........|. +|..-S--S|.........|........|. +|..|....|.........|------S-|. +|..|....|.........|.....|..|. +|-S-----|.........|.....|..|. +|.......|.........|S--S--..|. +|.......|.........|.|......|. +|-----S----S-------.|......|. +|............|....S.|......|. +----------------------------. +]]); +des.levregion({ type="stair-up", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} }) +des.levregion({ type="stair-down", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} }) +des.levregion({ type="branch", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} }) +des.teleport_region({ region={01,00,79,20}, region_islev=1, exclude={0,0,27,12} }) +-- entire tower in a region, constrains monster migration +des.region({ region={01,01, 26,11}, lit=0, type="ordinary", prefilled=1 }) +des.region({ region={09,03, 17,09}, lit=0, type="zoo", prefilled=0 }) +des.door("closed",15,02) +des.door("closed",11,10) +des.mazewalk(28,05,"east") +des.ladder("up", 12,01) +des.ladder("down", 14,11) +-- Non diggable walls everywhere +des.non_diggable(selection.area(00,00,27,12)) +-- +des.non_passwall(selection.area(00,00,06,12)) +des.non_passwall(selection.area(06,00,27,02)) +des.non_passwall(selection.area(16,02,27,12)) +des.non_passwall(selection.area(06,12,16,12)) +-- Random traps. +des.trap("spiked pit") +des.trap("sleep gas") +des.trap("anti magic") +des.trap("magic") +-- Some random loot. +des.object("!") +des.object("!") +des.object("?") +des.object("?") +des.object("+") +-- treasures +des.object("\"", 04, 06) diff --git a/dat/wizard3.lua b/dat/wizard3.lua new file mode 100644 index 000000000..f5da68944 --- /dev/null +++ b/dat/wizard3.lua @@ -0,0 +1,81 @@ +-- NetHack 3.6 yendor.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ +-- Copyright (c) 1989 by Jean-Christophe Collet +-- Copyright (c) 1992 by M. Stephenson and Izchak Miller +-- NetHack may be freely redistributed. See license for details. +-- +des.level_init({ style="mazegrid", bg ="-" }); + +des.level_flags("mazelevel", "noteleport", "hardfloor") +des.map([[ +----------------------------. +|..|............S..........|. +|..|..------------------S--|. +|..|..|.........|..........|. +|..S..|.}}}}}}}.|..........|. +|..|..|.}}---}}.|-S--------|. +|..|..|.}--.--}.|..|.......|. +|..|..|.}|...|}.|..|.......|. +|..---|.}--.--}.|..|.......|. +|.....|.}}---}}.|..|.......|. +|.....S.}}}}}}}.|..|.......|. +|.....|.........|..|.......|. +----------------------------. +]]); +des.levregion({ type="stair-up", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} }) +des.levregion({ type="stair-down", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} }) +des.levregion({ type="branch", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} }) +des.teleport_region({ region={01,00,79,20}, region_islev=1, exclude={0,0,27,12} }) +des.levregion({ region={25,11,25,11}, type="portal", name="fakewiz1" }); +des.mazewalk(28,09,"east") +des.region({ region={07,03, 15,11}, lit=0 ,type="morgue",prefilled=1 }) +des.region({ region={17,06, 18,11}, lit=0, type="beehive" }) +-- make the entry chamber a real room; it affects monster arrival; +-- `unfilled' is a kludge to force an ordinary room to remain a room +des.region({ region={20,06,26,11},lit=0,type="ordinary",prefilled=1, + contents = function() + local w = "north"; + if math.random(0,99) < 50 then w = "west" end + des.door({ state="secret", wall=w }) + end +}); +des.door("closed",18,05) +des.ladder("up", 11,07) +-- Non diggable walls +-- Walls inside the moat stay diggable +des.non_diggable(selection.area(00,00,06,12)) +des.non_diggable(selection.area(06,00,27,02)) +des.non_diggable(selection.area(16,02,27,12)) +des.non_diggable(selection.area(06,12,16,12)) +-- +des.non_passwall(selection.area(00,00,06,12)) +des.non_passwall(selection.area(06,00,27,02)) +des.non_passwall(selection.area(16,02,27,12)) +des.non_passwall(selection.area(06,12,16,12)) +-- +des.monster("L", 10, 07) +des.monster("vampire lord", 12, 07) +-- Some surrounding horrors +des.monster("kraken", 08, 05) +des.monster("giant eel", 08, 08) +des.monster("kraken", 14, 05) +des.monster("giant eel", 14, 08) +-- Other monsters +des.monster("L") +des.monster("D") +des.monster("D", 26, 09) +des.monster("&") +des.monster("&") +des.monster("&") +-- And to make things a little harder. +des.trap("board",10,07) +des.trap("board",12,07) +des.trap("board",11,06) +des.trap("board",11,08) +-- Some loot +des.object(")") +des.object("!") +des.object("?") +des.object("?") +des.object("(") +-- treasures +des.object("\"", 11, 07) diff --git a/dat/yendor.des b/dat/yendor.des deleted file mode 100644 index 34b780988..000000000 --- a/dat/yendor.des +++ /dev/null @@ -1,281 +0,0 @@ -# NetHack 3.6 yendor.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ -# Copyright (c) 1989 by Jean-Christophe Collet -# Copyright (c) 1992 by M. Stephenson and Izchak Miller -# NetHack may be freely redistributed. See license for details. -# -# The top (real) wizard level. -# Keeping the Moat for old-time's sake -MAZE:"wizard1",random -FLAGS:noteleport,hardfloor -GEOMETRY:center,center -MAP -----------------------------. -|.......|..|.........|.....|. -|.......S..|.}}}}}}}.|.....|. -|..--S--|..|.}}---}}.|---S-|. -|..|....|..|.}--.--}.|..|..|. -|..|....|..|.}|...|}.|..|..|. -|..--------|.}--.--}.|..|..|. -|..|.......|.}}---}}.|..|..|. -|..S.......|.}}}}}}}.|..|..|. -|..|.......|.........|..|..|. -|..|.......|-----------S-S-|. -|..|.......S...............|. -----------------------------. -ENDMAP -STAIR:levregion(01,00,79,20),(0,0,28,12),up -STAIR:levregion(01,00,79,20),(0,0,28,12),down -BRANCH:levregion(01,00,79,20),(0,0,28,12) -TELEPORT_REGION:levregion(01,00,79,20),(0,0,27,12) -# Make it a morgue for rm id in mkmaze.c -# for the purpose of random sdoor placement -REGION:(12,01,20,09),unlit,"morgue",unfilled -# another region to constrain monster arrival -REGION:(01,01,10,11),unlit,"ordinary",unfilled -MAZEWALK:(28,05),east -LADDER:(06,05),down -# Non diggable walls -# Walls inside the moat stay diggable -NON_DIGGABLE:(00,00,11,12) -NON_DIGGABLE:(11,00,21,00) -NON_DIGGABLE:(11,10,27,12) -NON_DIGGABLE:(21,00,27,10) -# Non passable walls -NON_PASSWALL:(00,00,11,12) -NON_PASSWALL:(11,00,21,00) -NON_PASSWALL:(11,10,27,12) -NON_PASSWALL:(21,00,27,10) -# The wizard and his guards -MONSTER:('@',"Wizard of Yendor"),(16,05),asleep -MONSTER:('d',"hell hound"),(15,05) -MONSTER:('V',"vampire lord"),(17,05) -# The local treasure -OBJECT:('+',"Book of the Dead"),(16,05) -# Surrounding terror -MONSTER:(';',"kraken"),(14,02) -MONSTER:(';',"giant eel"),(17,02) -MONSTER:(';',"kraken"),(13,04) -MONSTER:(';',"giant eel"),(13,06) -MONSTER:(';',"kraken"),(19,04) -MONSTER:(';',"giant eel"),(19,06) -MONSTER:(';',"kraken"),(15,08) -MONSTER:(';',"giant eel"),(17,08) -MONSTER:(';',"piranha"),(15,02) -MONSTER:(';',"piranha"),(19,08) -# Random monsters -MONSTER:'D',random -MONSTER:'H',random -MONSTER:'&',random -MONSTER:'&',random -MONSTER:'&',random -MONSTER:'&',random -# And to make things a little harder. -TRAP:"board",(16,04) -TRAP:"board",(16,06) -TRAP:"board",(15,05) -TRAP:"board",(17,05) -# Random traps. -TRAP:"spiked pit",random -TRAP:"sleep gas",random -TRAP:"anti magic",random -TRAP:"magic",random -# Some random loot. -OBJECT:('*',"ruby"),random -OBJECT:'!',random -OBJECT:'!',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'+',random -OBJECT:'+',random -OBJECT:'+',random - - -# The middle wizard level. -MAZE:"wizard2",random -FLAGS:noteleport,hardfloor -GEOMETRY:center,center -MAP -----------------------------. -|.....|.S....|.............|. -|.....|.-------S--------S--|. -|.....|.|.........|........|. -|..-S--S|.........|........|. -|..|....|.........|------S-|. -|..|....|.........|.....|..|. -|-S-----|.........|.....|..|. -|.......|.........|S--S--..|. -|.......|.........|.|......|. -|-----S----S-------.|......|. -|............|....S.|......|. -----------------------------. -ENDMAP -STAIR:levregion(01,00,79,20),(0,0,28,12),up -STAIR:levregion(01,00,79,20),(0,0,28,12),down -BRANCH:levregion(01,00,79,20),(0,0,28,12) -TELEPORT_REGION:levregion(01,00,79,20),(0,0,27,12) -# entire tower in a region, constrains monster migration -REGION:(01,01,26,11),unlit,"ordinary",unfilled -REGION:(09,03,17,09),unlit,"zoo" -DOOR:closed,(15,02) -DOOR:closed,(11,10) -MAZEWALK:(28,05),east -LADDER:(12,01),up -LADDER:(14,11),down -# Non diggable walls everywhere -NON_DIGGABLE:(00,00,27,12) -# -NON_PASSWALL:(00,00,06,12) -NON_PASSWALL:(06,00,27,02) -NON_PASSWALL:(16,02,27,12) -NON_PASSWALL:(06,12,16,12) -# Random traps. -TRAP:"spiked pit",random -TRAP:"sleep gas",random -TRAP:"anti magic",random -TRAP:"magic",random -# Some random loot. -OBJECT:'!',random -OBJECT:'!',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'+',random -# treasures -OBJECT:'"',(04,06) - - -# The bottom wizard level. -# Memorialize the fakewiz setup. -MAZE:"wizard3",random -FLAGS:noteleport,hardfloor -GEOMETRY:center,center -MAP -----------------------------. -|..|............S..........|. -|..|..------------------S--|. -|..|..|.........|..........|. -|..S..|.}}}}}}}.|..........|. -|..|..|.}}---}}.|-S--------|. -|..|..|.}--.--}.|..|.......|. -|..|..|.}|...|}.|..|.......|. -|..---|.}--.--}.|..|.......|. -|.....|.}}---}}.|..|.......|. -|.....S.}}}}}}}.|..|.......|. -|.....|.........|..|.......|. -----------------------------. -ENDMAP -STAIR:levregion(01,00,79,20),(0,0,28,12),up -STAIR:levregion(01,00,79,20),(0,0,28,12),down -BRANCH:levregion(01,00,79,20),(0,0,28,12) -TELEPORT_REGION:levregion(01,00,79,20),(0,0,27,12) -PORTAL:(25,11,25,11),(0,0,0,0),"fakewiz1" -MAZEWALK:(28,09),east -REGION:(07,03,15,11),unlit,"morgue",unfilled -REGION:(17,06,18,11),unlit,"beehive" -# make the entry chamber a real room; it affects monster arrival; -# `unfilled' is a kludge to force an ordinary room to remain a room -REGION:(20,06,26,11),unlit,"ordinary",unfilled { - ROOMDOOR:true, closed, north|west, random -} -DOOR:closed,(18,05) -LADDER:(11,07),up -# Non diggable walls -# Walls inside the moat stay diggable -NON_DIGGABLE:(00,00,06,12) -NON_DIGGABLE:(06,00,27,02) -NON_DIGGABLE:(16,02,27,12) -NON_DIGGABLE:(06,12,16,12) -# -NON_PASSWALL:(00,00,06,12) -NON_PASSWALL:(06,00,27,02) -NON_PASSWALL:(16,02,27,12) -NON_PASSWALL:(06,12,16,12) -# -MONSTER:'L',(10,07) -MONSTER:('V',"vampire lord"),(12,07) -# Some surrounding horrors -MONSTER:(';',"kraken"),(08,05) -MONSTER:(';',"giant eel"),(08,08) -MONSTER:(';',"kraken"),(14,05) -MONSTER:(';',"giant eel"),(14,08) -# Other monsters -MONSTER:'L',random -MONSTER:'D',random -MONSTER:'D',(26,09) -MONSTER:'&',random -MONSTER:'&',random -MONSTER:'&',random -# And to make things a little harder. -TRAP:"board",(10,07) -TRAP:"board",(12,07) -TRAP:"board",(11,06) -TRAP:"board",(11,08) -# Some loot -OBJECT:')',random -OBJECT:'!',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'(',random -# treasures -OBJECT:'"',(11,07) - - -# The former decoy wizard levels. -# There are two of these, and we need to -# distinguish between them for the portal. -MAZE:"fakewiz1",random -GEOMETRY:center,center -MAP -......... -.}}}}}}}. -.}}---}}. -.}--.--}. -.}|...|}. -.}--.--}. -.}}---}}. -.}}}}}}}. -ENDMAP -STAIR:levregion(01,00,79,20),(0,0,8,7),up -STAIR:levregion(01,00,79,20),(0,0,8,7),down -BRANCH:levregion(01,00,79,20),(0,0,8,7) -TELEPORT_REGION:levregion(01,00,79,20),(2,2,6,6) -PORTAL:(4,4,4,4),(0,0,0,0),"wizard3" -MAZEWALK:(08,05),east -REGION:(04,03,06,06),unlit,"ordinary",unfilled,irregular -MONSTER:'L',(04,04) -MONSTER:('V',"vampire lord"),(03,04) -MONSTER:(';',"kraken"),(06,06) -# And to make things a little harder. -TRAP:"board",(04,03) -TRAP:"board",(04,05) -TRAP:"board",(03,04) -TRAP:"board",(05,04) - - -MAZE:"fakewiz2",random -GEOMETRY:center,center -MAP -......... -.}}}}}}}. -.}}---}}. -.}--.--}. -.}|...|}. -.}--.--}. -.}}---}}. -.}}}}}}}. -ENDMAP -STAIR:levregion(01,00,79,20),(0,0,8,7),up -STAIR:levregion(01,00,79,20),(0,0,8,7),down -BRANCH:levregion(01,00,79,20),(0,0,8,7) -TELEPORT_REGION:levregion(01,00,79,20),(2,2,6,6) -MAZEWALK:(08,05),east -REGION:(04,03,06,06),unlit,"ordinary",unfilled,irregular -MONSTER:'L',(04,04) -MONSTER:('V',"vampire lord"),(03,04) -MONSTER:(';',"kraken"),(06,06) -# And to make things a little harder. -TRAP:"board",(04,03) -TRAP:"board",(04,05) -TRAP:"board",(03,04) -TRAP:"board",(05,04) -# treasures -OBJECT:'"',(04,04) diff --git a/doc/lev_comp.6 b/doc/lev_comp.6 deleted file mode 100644 index fdb1945a7..000000000 --- a/doc/lev_comp.6 +++ /dev/null @@ -1,588 +0,0 @@ -.TH LEV_COMP 6 "25 May 2015" NETHACK -.de ND -.ds Nd \\$3 -.. -.de NB -.ds Nb \\$2 -.. -.de NR -.ds Nr \\$2 -.. -.ND $NHDT-Date: 1524689549 2018/04/25 20:52:29 $ -.NB $NHDT-Branch: NetHack-3.6.0 $ -.NR $NHDT-Revision: 1.7 $ -.ds Na Kenneth Lorber -.SH NAME -lev_comp \- NetHack special levels compiler -.SH SYNOPSIS -.B lev_comp -[ -.B \-w -] -[ -.I files -] -.PP -If no arguments are given, it reads standard input. -.SH DESCRIPTION -.PP -.I Lev_comp -is a special level compiler for NetHack version 3.2 and higher. It -takes description files as arguments and produces level files that can -be loaded by NetHack at runtime. -.PP -The purpose of this tool is to provide NetHack administrators and -implementors with a convenient way for adding special levels to the -game, or modifying existing ones, without having to recompile the -entire world. -.PP -The -.B \-w -option causes -.I lev_comp -to perform extra checks on the level and display extra warnings, however -these warnings are sometimes superfluous, so they are not normally displayed. - -.SH GRAMMAR -.PP -.LP -.nf -.ta +8n +8n +8n +8n - -file : /* nothing */ - | levels - ; - -levels : level - | level levels - ; - -level : maze_level - | room_level - ; - -maze_level : maze_def flags lev_init messages regions - ; - -room_level : level_def flags lev_init messages rreg_init rooms corridors_def - ; - -level_def : LEVEL_ID ':' string - ; - -lev_init : /* nothing */ - | LEV_INIT_ID ':' CHAR ',' CHAR ',' BOOLEAN ',' BOOLEAN ',' light_state ',' walled - ; - -walled : BOOLEAN - | RANDOM_TYPE - ; - -flags : /* nothing */ - | FLAGS_ID ':' flag_list - ; - -flag_list : FLAG_TYPE ',' flag_list - | FLAG_TYPE - ; - -messages : /* nothing */ - | message messages - ; - -message : MESSAGE_ID ':' STRING - ; - -rreg_init : /* nothing */ - | rreg_init init_rreg - ; - -init_rreg : RANDOM_OBJECTS_ID ':' object_list - | RANDOM_MONSTERS_ID ':' monster_list - ; - -rooms : /* Nothing - dummy room for use with INIT_MAP */ - | roomlist - ; - -roomlist : aroom - | aroom roomlist - ; - -corridors_def : random_corridors - | corridors - ; - -random_corridors: RAND_CORRIDOR_ID - ; - -corridors : /* nothing */ - | corridors corridor - ; - -corridor : CORRIDOR_ID ':' corr_spec ',' corr_spec - | CORRIDOR_ID ':' corr_spec ',' INTEGER - ; - -corr_spec : '(' INTEGER ',' DIRECTION ',' door_pos ')' - ; - -aroom : room_def room_details - | subroom_def room_details - ; - -subroom_def : SUBROOM_ID ':' room_type ',' light_state ',' subroom_pos ',' room_size ',' string roomfill - ; - -room_def : ROOM_ID ':' room_type ',' light_state ',' room_pos ',' room_align ',' room_size roomfill - ; - -roomfill : /* nothing */ - | ',' BOOLEAN - ; - -room_pos : '(' INTEGER ',' INTEGER ')' - | RANDOM_TYPE - ; - -subroom_pos : '(' INTEGER ',' INTEGER ')' - | RANDOM_TYPE - ; - -room_align : '(' h_justif ',' v_justif ')' - | RANDOM_TYPE - ; - -room_size : '(' INTEGER ',' INTEGER ')' - | RANDOM_TYPE - ; - -room_details : /* nothing */ - | room_details room_detail - ; - -room_detail : room_name - | room_chance - | room_door - | monster_detail - | object_detail - | trap_detail - | altar_detail - | fountain_detail - | sink_detail - | pool_detail - | gold_detail - | engraving_detail - | stair_detail - ; - -room_name : NAME_ID ':' string - ; - -room_chance : CHANCE_ID ':' INTEGER - ; - -room_door : DOOR_ID ':' secret ',' door_state ',' door_wall ',' door_pos - ; - -secret : BOOLEAN - | RANDOM_TYPE - ; - -door_wall : DIRECTION - | RANDOM_TYPE - ; - -door_pos : INTEGER - | RANDOM_TYPE - ; - -maze_def : MAZE_ID ':' string ',' filling - ; - -filling : CHAR - | RANDOM_TYPE - ; - -regions : aregion - | aregion regions - ; - -aregion : map_definition reg_init map_details - ; - -map_definition : NOMAP_ID - | map_geometry MAP_ID - ; - -map_geometry : GEOMETRY_ID ':' h_justif ',' v_justif - ; - -h_justif : LEFT_OR_RIGHT - | CENTER - ; - -v_justif : TOP_OR_BOT - | CENTER - ; - -reg_init : /* nothing */ - | reg_init init_reg - ; - -init_reg : RANDOM_OBJECTS_ID ':' object_list - | RANDOM_PLACES_ID ':' place_list - | RANDOM_MONSTERS_ID ':' monster_list - ; - -object_list : object - | object ',' object_list - ; - -monster_list : monster - | monster ',' monster_list - ; - -place_list : place - | place ',' place_list - ; - -map_details : /* nothing */ - | map_details map_detail - ; - -map_detail : monster_detail - | object_detail - | door_detail - | trap_detail - | drawbridge_detail - | region_detail - | stair_region - | portal_region - | teleprt_region - | branch_region - | altar_detail - | fountain_detail - | mazewalk_detail - | wallify_detail - | ladder_detail - | stair_detail - | gold_detail - | engraving_detail - | diggable_detail - | passwall_detail - ; - -monster_detail : MONSTER_ID chance ':' monster_c ',' m_name ',' coordinate - monster_infos - ; - -monster_infos : /* nothing */ - | monster_infos monster_info - ; - -monster_info : ',' string - | ',' MON_ATTITUDE - | ',' MON_ALERTNESS - | ',' alignment - | ',' MON_APPEARANCE string - ; - -object_detail : OBJECT_ID object_desc - | COBJECT_ID object_desc - ; - -object_desc : chance ':' object_c ',' o_name ',' object_where object_infos - ; - -object_where : coordinate - | CONTAINED - ; - -object_infos : /* nothing */ - | ',' curse_state ',' monster_id ',' enchantment optional_name - | ',' curse_state ',' enchantment optional_name - | ',' monster_id ',' enchantment optional_name - ; - -curse_state : RANDOM_TYPE - | CURSE_TYPE - ; - -monster_id : STRING - ; - -enchantment : RANDOM_TYPE - | INTEGER - ; - -optional_name : /* nothing */ - | ',' NONE - | ',' STRING - ; - -door_detail : DOOR_ID ':' door_state ',' coordinate - ; - -trap_detail : TRAP_ID chance ':' trap_name ',' coordinate - ; - -drawbridge_detail: DRAWBRIDGE_ID ':' coordinate ',' DIRECTION ',' door_state - ; - -mazewalk_detail : MAZEWALK_ID ':' coordinate ',' DIRECTION - ; - -wallify_detail : WALLIFY_ID - ; - -ladder_detail : LADDER_ID ':' coordinate ',' UP_OR_DOWN - ; - -stair_detail : STAIR_ID ':' coordinate ',' UP_OR_DOWN - ; - -stair_region : STAIR_ID ':' lev_region ',' lev_region ',' UP_OR_DOWN - ; - -portal_region : PORTAL_ID ':' lev_region ',' lev_region ',' string - ; - -teleprt_region : TELEPRT_ID ':' lev_region ',' lev_region teleprt_detail - ; - -branch_region : BRANCH_ID ':' lev_region ',' lev_region - ; - -teleprt_detail : /* empty */ - | ',' UP_OR_DOWN - ; - -lev_region : region - | LEV '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')' - ; - -fountain_detail : FOUNTAIN_ID ':' coordinate - ; - -sink_detail : SINK_ID ':' coordinate - ; - -pool_detail : POOL_ID ':' coordinate - ; - -diggable_detail : NON_DIGGABLE_ID ':' region - ; - -passwall_detail : NON_PASSWALL_ID ':' region - ; - -region_detail : REGION_ID ':' region ',' light_state ',' room_type prefilled - ; - -altar_detail : ALTAR_ID ':' coordinate ',' alignment ',' altar_type - ; - -gold_detail : GOLD_ID ':' amount ',' coordinate - ; - -engraving_detail: ENGRAVING_ID ':' coordinate ',' engraving_type ',' string - ; - -monster_c : monster - | RANDOM_TYPE - | m_register - ; - -object_c : object - | RANDOM_TYPE - | o_register - ; - -m_name : string - | RANDOM_TYPE - ; - -o_name : string - | RANDOM_TYPE - ; - -trap_name : string - | RANDOM_TYPE - ; - -room_type : string - | RANDOM_TYPE - ; - -prefilled : /* empty */ - | ',' FILLING - | ',' FILLING ',' BOOLEAN - ; - -coordinate : coord - | p_register - | RANDOM_TYPE - ; - -door_state : DOOR_STATE - | RANDOM_TYPE - ; - -light_state : LIGHT_STATE - | RANDOM_TYPE - ; - -alignment : ALIGNMENT - | a_register - | RANDOM_TYPE - ; - -altar_type : ALTAR_TYPE - | RANDOM_TYPE - ; - -p_register : P_REGISTER '[' INTEGER ']' - ; - -o_register : O_REGISTER '[' INTEGER ']' - ; - -m_register : M_REGISTER '[' INTEGER ']' - ; - -a_register : A_REGISTER '[' INTEGER ']' - ; - -place : coord - ; - -monster : CHAR - ; - -object : CHAR - ; - -string : STRING - ; - -amount : INTEGER - | RANDOM_TYPE - ; - -chance : /* empty */ - | PERCENT - ; - -engraving_type : ENGRAVING_TYPE - | RANDOM_TYPE - ; - -coord : '(' INTEGER ',' INTEGER ')' - ; - -region : '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')' - ; -.fi -.PP -.I NOTE: -.br -Lines beginning with '#' are considered comments. -.PP -The contents of a "MAP" description of a maze is a rectangle showing the exact -level map that should be used for the given part of a maze. -Each character in the map corresponds to a location on the screen. -Different location types are denoted using different ASCII characters. -The following characters are recognized. -To give an idea of how these are used, see the EXAMPLE, below. -The maximum size of a map is normally 76 columns by 21 rows. -.LP -.nf -.ta +8n +8n +8n -\&'-' horizontal wall -\&'|' vertical wall -\&'+' a doorway (state is specified in a DOOR declaration) -\&'A' open air -\&'B' boundary room location (for bounding unwalled irregular regions) -\&'C' cloudy air -\&'I' ice -\&'S' a secret door -\&'H' a secret corridor -\&'{' a fountain -\&'\\' a throne -\&'K' a sink -\&'}' a part of a moat or other deep water -\&'P' a pool -\&'L' lava -\&'W' water (yes, different from a pool) -\&'T' a tree -\&'F' iron bars -\&'#' a corridor -\&'.' a normal room location (unlit unless lit in a REGION declaration) -\&' ' stone -.fi -.SH EXAMPLE -.PP -Here is an example of a description file (a very simple one): -.LP -.nf -.ta +8n +8n +8n -MAZE : "fortress", random -GEOMETRY : center , center -MAP -}}}}}}}}} -}}}|-|}}} -}}|-.-|}} -}|-...-|} -}|.....|} -}|-...-|} -}}|-.-|}} -}}}|-|}}} -}}}}}}}}} -ENDMAP -MONSTER: '@', "Wizard of Yendor", (4,4) -OBJECT: '"', "Amulet of Yendor", (4,4) -# a hell hound flanking the Wiz on a random side -RANDOM_PLACES: (4,3), (4,5), (3,4), (5,4) -MONSTER: 'd', "hell hound", place[0] -# a chest on another random side -OBJECT: '(', "chest", place[1] -# a sack on a random side, with a diamond and maybe a ruby in it -CONTAINER: '(', "sack", place[2] -OBJECT: '*', "diamond", contained -OBJECT[50%]: '*', "ruby", contained -# a random dragon somewhere -MONSTER: 'D', random, random -# 3 out of 4 chance for a random trap in the EAST end -TRAP[75%]: random, (6,4) -# an electric eel below the SOUTH end -MONSTER: ';', "electric eel", (4,8) -# make the walls non-diggable -NON_DIGGABLE: (0,0,8,8) -TELEPORT_REGION: levregion(0,0,79,20), (0,0,8,8) -.fi -.PP -This example will produce a file named "fortress" that can be integrated into -one of the numerous mazes of the game. -.PP -Note especially the final, TELEPORT_REGION specification. This says -that level teleports or other non-stairway arrivals on this level can -land anywhere on the level except the area of the map. This shows the -use of the ``levregion'' prefix allowed in certain region specifications. -Normally, regions apply only to the most recent MAP specification, but -when prefixed with ``levregion'', one can refer to any area of the -level, regardless of the placement of the current MAP in the level. -.SH AUTHOR -.PP -Jean-Christophe Collet, David Cohrs. -.SH "SEE ALSO" -.PP -dgn_comp(6), nethack(6) -.SH BUGS -.PP -Probably infinite. -Most importantly, still needs additional bounds checking. -.SH COPYRIGHT -This file is Copyright (C) \*(Na and was last modified \*(Nd (version -\*(Nb:\*(Nr). -NetHack may be freely redistributed. See license for details. diff --git a/doc/lev_comp.txt b/doc/lev_comp.txt deleted file mode 100644 index 4a28fcea6..000000000 --- a/doc/lev_comp.txt +++ /dev/null @@ -1,726 +0,0 @@ - - - -LEV_COMP(6) 1996 LEV_COMP(6) - - - -NAME - lev_comp - NetHack special levels compiler - -SYNOPSIS - lev_comp [ -w ] [ files ] - - If no arguments are given, it reads standard input. - -DESCRIPTION - Lev_comp is a special level compiler for NetHack version 3.2 - and higher. It takes description files as arguments and - produces level files that can be loaded by NetHack at run- - time. - - The purpose of this tool is to provide NetHack administra- - tors and implementors with a convenient way for adding spe- - cial levels to the game, or modifying existing ones, without - having to recompile the entire world. - - The -w option causes lev_comp to perform extra checks on the - level and display extra warnings, however these warnings are - sometimes superfluous, so they are not normally displayed. - - -GRAMMAR - file : /* nothing */ - | levels - ; - - levels : level - | level levels - ; - - level : maze_level - | room_level - ; - - maze_level : maze_def flags lev_init messages regions - ; - - room_level : level_def flags lev_init messages rreg_init rooms corridors_def - ; - - level_def : LEVEL_ID ':' string - ; - - lev_init : /* nothing */ - | LEV_INIT_ID ':' CHAR ',' CHAR ',' BOOLEAN ',' BOOLEAN ',' light_state ',' walled - ; - - walled : BOOLEAN - | RANDOM_TYPE - - - -May Last change: 16 1 - - - - - - -LEV_COMP(6) 1996 LEV_COMP(6) - - - - ; - - flags : /* nothing */ - | FLAGS_ID ':' flag_list - ; - - flag_list : FLAG_TYPE ',' flag_list - | FLAG_TYPE - ; - - messages : /* nothing */ - | message messages - ; - - message : MESSAGE_ID ':' STRING - ; - - rreg_init : /* nothing */ - | rreg_init init_rreg - ; - - init_rreg : RANDOM_OBJECTS_ID ':' object_list - | RANDOM_MONSTERS_ID ':' monster_list - ; - - rooms : /* Nothing - dummy room for use with INIT_MAP */ - | roomlist - ; - - roomlist : aroom - | aroom roomlist - ; - - corridors_def : random_corridors - | corridors - ; - - random_corridors: RAND_CORRIDOR_ID - ; - - corridors : /* nothing */ - | corridors corridor - ; - - corridor : CORRIDOR_ID ':' corr_spec ',' corr_spec - | CORRIDOR_ID ':' corr_spec ',' INTEGER - ; - - corr_spec : '(' INTEGER ',' DIRECTION ',' door_pos ')' - ; - - aroom : room_def room_details - - - -May Last change: 16 2 - - - - - - -LEV_COMP(6) 1996 LEV_COMP(6) - - - - | subroom_def room_details - ; - - subroom_def : SUBROOM_ID ':' room_type ',' light_state ',' subroom_pos ',' room_size ',' string roomfill - ; - - room_def : ROOM_ID ':' room_type ',' light_state ',' room_pos ',' room_align ',' room_size roomfill - ; - - roomfill : /* nothing */ - | ',' BOOLEAN - ; - - room_pos : '(' INTEGER ',' INTEGER ')' - | RANDOM_TYPE - ; - - subroom_pos : '(' INTEGER ',' INTEGER ')' - | RANDOM_TYPE - ; - - room_align : '(' h_justif ',' v_justif ')' - | RANDOM_TYPE - ; - - room_size : '(' INTEGER ',' INTEGER ')' - | RANDOM_TYPE - ; - - room_details : /* nothing */ - | room_details room_detail - ; - - room_detail : room_name - | room_chance - | room_door - | monster_detail - | object_detail - | trap_detail - | altar_detail - | fountain_detail - | sink_detail - | pool_detail - | gold_detail - | engraving_detail - | stair_detail - ; - - room_name : NAME_ID ':' string - ; - - room_chance : CHANCE_ID ':' INTEGER - - - -May Last change: 16 3 - - - - - - -LEV_COMP(6) 1996 LEV_COMP(6) - - - - ; - - room_door : DOOR_ID ':' secret ',' door_state ',' door_wall ',' door_pos - ; - - secret : BOOLEAN - | RANDOM_TYPE - ; - - door_wall : DIRECTION - | RANDOM_TYPE - ; - - door_pos : INTEGER - | RANDOM_TYPE - ; - - maze_def : MAZE_ID ':' string ',' filling - ; - - filling : CHAR - | RANDOM_TYPE - ; - - regions : aregion - | aregion regions - ; - - aregion : map_definition reg_init map_details - ; - - map_definition : NOMAP_ID - | map_geometry MAP_ID - ; - - map_geometry : GEOMETRY_ID ':' h_justif ',' v_justif - ; - - h_justif : LEFT_OR_RIGHT - | CENTER - ; - - v_justif : TOP_OR_BOT - | CENTER - ; - - reg_init : /* nothing */ - | reg_init init_reg - ; - - init_reg : RANDOM_OBJECTS_ID ':' object_list - | RANDOM_PLACES_ID ':' place_list - - - -May Last change: 16 4 - - - - - - -LEV_COMP(6) 1996 LEV_COMP(6) - - - - | RANDOM_MONSTERS_ID ':' monster_list - ; - - object_list : object - | object ',' object_list - ; - - monster_list : monster - | monster ',' monster_list - ; - - place_list : place - | place ',' place_list - ; - - map_details : /* nothing */ - | map_details map_detail - ; - - map_detail : monster_detail - | object_detail - | door_detail - | trap_detail - | drawbridge_detail - | region_detail - | stair_region - | portal_region - | teleprt_region - | branch_region - | altar_detail - | fountain_detail - | mazewalk_detail - | wallify_detail - | ladder_detail - | stair_detail - | gold_detail - | engraving_detail - | diggable_detail - | passwall_detail - ; - - monster_detail : MONSTER_ID chance ':' monster_c ',' m_name ',' coordinate - monster_infos - ; - - monster_infos : /* nothing */ - | monster_infos monster_info - ; - - monster_info : ',' string - | ',' MON_ATTITUDE - | ',' MON_ALERTNESS - - - -May Last change: 16 5 - - - - - - -LEV_COMP(6) 1996 LEV_COMP(6) - - - - | ',' alignment - | ',' MON_APPEARANCE string - ; - - object_detail : OBJECT_ID object_desc - | COBJECT_ID object_desc - ; - - object_desc : chance ':' object_c ',' o_name ',' object_where object_infos - ; - - object_where : coordinate - | CONTAINED - ; - - object_infos : /* nothing */ - | ',' curse_state ',' monster_id ',' enchantment optional_name - | ',' curse_state ',' enchantment optional_name - | ',' monster_id ',' enchantment optional_name - ; - - curse_state : RANDOM_TYPE - | CURSE_TYPE - ; - - monster_id : STRING - ; - - enchantment : RANDOM_TYPE - | INTEGER - ; - - optional_name : /* nothing */ - | ',' NONE - | ',' STRING - ; - - door_detail : DOOR_ID ':' door_state ',' coordinate - ; - - trap_detail : TRAP_ID chance ':' trap_name ',' coordinate - ; - - drawbridge_detail: DRAWBRIDGE_ID ':' coordinate ',' DIRECTION ',' door_state - ; - - mazewalk_detail : MAZEWALK_ID ':' coordinate ',' DIRECTION - ; - - wallify_detail : WALLIFY_ID - ; - - - - -May Last change: 16 6 - - - - - - -LEV_COMP(6) 1996 LEV_COMP(6) - - - - ladder_detail : LADDER_ID ':' coordinate ',' UP_OR_DOWN - ; - - stair_detail : STAIR_ID ':' coordinate ',' UP_OR_DOWN - ; - - stair_region : STAIR_ID ':' lev_region ',' lev_region ',' UP_OR_DOWN - ; - - portal_region : PORTAL_ID ':' lev_region ',' lev_region ',' string - ; - - teleprt_region : TELEPRT_ID ':' lev_region ',' lev_region teleprt_detail - ; - - branch_region : BRANCH_ID ':' lev_region ',' lev_region - ; - - teleprt_detail : /* empty */ - | ',' UP_OR_DOWN - ; - - lev_region : region - | LEV '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')' - ; - - fountain_detail : FOUNTAIN_ID ':' coordinate - ; - - sink_detail : SINK_ID ':' coordinate - ; - - pool_detail : POOL_ID ':' coordinate - ; - - diggable_detail : NON_DIGGABLE_ID ':' region - ; - - passwall_detail : NON_PASSWALL_ID ':' region - ; - - region_detail : REGION_ID ':' region ',' light_state ',' room_type prefilled - ; - - altar_detail : ALTAR_ID ':' coordinate ',' alignment ',' altar_type - ; - - gold_detail : GOLD_ID ':' amount ',' coordinate - ; - - engraving_detail: ENGRAVING_ID ':' coordinate ',' engraving_type ',' string - ; - - - -May Last change: 16 7 - - - - - - -LEV_COMP(6) 1996 LEV_COMP(6) - - - - monster_c : monster - | RANDOM_TYPE - | m_register - ; - - object_c : object - | RANDOM_TYPE - | o_register - ; - - m_name : string - | RANDOM_TYPE - ; - - o_name : string - | RANDOM_TYPE - ; - - trap_name : string - | RANDOM_TYPE - ; - - room_type : string - | RANDOM_TYPE - ; - - prefilled : /* empty */ - | ',' FILLING - | ',' FILLING ',' BOOLEAN - ; - - coordinate : coord - | p_register - | RANDOM_TYPE - ; - - door_state : DOOR_STATE - | RANDOM_TYPE - ; - - light_state : LIGHT_STATE - | RANDOM_TYPE - ; - - alignment : ALIGNMENT - | a_register - | RANDOM_TYPE - ; - - altar_type : ALTAR_TYPE - | RANDOM_TYPE - ; - - - -May Last change: 16 8 - - - - - - -LEV_COMP(6) 1996 LEV_COMP(6) - - - - p_register : P_REGISTER '[' INTEGER ']' - ; - - o_register : O_REGISTER '[' INTEGER ']' - ; - - m_register : M_REGISTER '[' INTEGER ']' - ; - - a_register : A_REGISTER '[' INTEGER ']' - ; - - place : coord - ; - - monster : CHAR - ; - - object : CHAR - ; - - string : STRING - ; - - amount : INTEGER - | RANDOM_TYPE - ; - - chance : /* empty */ - | PERCENT - ; - - engraving_type : ENGRAVING_TYPE - | RANDOM_TYPE - ; - - coord : '(' INTEGER ',' INTEGER ')' - ; - - region : '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')' - ; - - NOTE: - Lines beginning with '#' are considered comments. - - The contents of a "MAP" description of a maze is a rectangle - showing the exact level map that should be used for the - given part of a maze. Each character in the map corresponds - to a location on the screen. Different location types are - denoted using different ASCII characters. The following - characters are recognized. To give an idea of how these are - used, see the EXAMPLE, below. The maximum size of a map is - - - -May Last change: 16 9 - - - - - - -LEV_COMP(6) 1996 LEV_COMP(6) - - - - normally 76 columns by 21 rows. - - '-' horizontal wall - '|' vertical wall - '+' a doorway (state is specified in a DOOR declaration) - 'A' open air - 'B' boundary room location (for bounding unwalled irregular regions) - 'C' cloudy air - 'I' ice - 'S' a secret door - 'H' a secret corridor - '{' a fountain - '\' a throne - 'K' a sink (if SINKS is defined, else a room location) - '}' a part of a moat or other deep water - 'P' a pool - 'L' lava - 'W' water (yes, different from a pool) - 'T' a tree - 'F' iron bars - '#' a corridor - '.' a normal room location (unlit unless lit in a REGION declaration) - ' ' stone - -EXAMPLE - Here is an example of a description file (a very simple - one): - - MAZE : "fortress", random - GEOMETRY : center , center - MAP - }}}}}}}}} - }}}|-|}}} - }}|-.-|}} - }|-...-|} - }|.....|} - }|-...-|} - }}|-.-|}} - }}}|-|}}} - }}}}}}}}} - ENDMAP - MONSTER: '@', "Wizard of Yendor", (4,4) - OBJECT: '"', "Amulet of Yendor", (4,4) - # a hell hound flanking the Wiz on a random side - RANDOM_PLACES: (4,3), (4,5), (3,4), (5,4) - MONSTER: 'd', "hell hound", place[0] - # a chest on another random side - OBJECT: '(', "chest", place[1] - # a sack on a random side, with a diamond and maybe a ruby in it - CONTAINER: '(', "sack", place[2] - OBJECT: '*', "diamond", contained - OBJECT[50%]: '*', "ruby", contained - - - -May Last change: 16 10 - - - - - - -LEV_COMP(6) 1996 LEV_COMP(6) - - - - # a random dragon somewhere - MONSTER: 'D', random, random - # 3 out of 4 chance for a random trap in the EAST end - TRAP[75%]: random, (6,4) - # an electric eel below the SOUTH end - MONSTER: ';', "electric eel", (4,8) - # make the walls non-diggable - NON_DIGGABLE: (0,0,8,8) - TELEPORT_REGION: levregion(0,0,79,20), (0,0,8,8) - - This example will produce a file named "fortress" that can - be integrated into one of the numerous mazes of the game. - - Note especially the final, TELEPORT_REGION specification. - This says that level teleports or other non-stairway - arrivals on this level can land anywhere on the level except - the area of the map. This shows the use of the ``levre- - gion'' prefix allowed in certain region specifications. - Normally, regions apply only to the most recent MAP specifi- - cation, but when prefixed with ``levregion'', one can refer - to any area of the level, regardless of the placement of the - current MAP in the level. - -AUTHOR - Jean-Christophe Collet, David Cohrs. - -SEE ALSO - dgn_comp(6), nethack(6) - -BUGS - Probably infinite. Most importantly, still needs additional - bounds checking. - - - - - - - - - - - - - - - - - - - - - - - -May Last change: 16 11 - - - diff --git a/include/align.h b/include/align.h index 1c5d40872..47ad97f5d 100644 --- a/include/align.h +++ b/include/align.h @@ -33,6 +33,7 @@ typedef struct align { /* alignment & record */ #define AM_SPLEV_CO 3 #define AM_SPLEV_NONCO 7 +#define AM_SPLEV_RANDOM 8 #define Amask2align(x) \ ((aligntyp)((!(x)) ? A_NONE : ((x) == AM_LAWFUL) ? A_LAWFUL \ diff --git a/include/decl.h b/include/decl.h index 1ff73009c..92262b274 100644 --- a/include/decl.h +++ b/include/decl.h @@ -417,12 +417,9 @@ E struct restore_info restoreinfo; E NEARDATA struct savefile_info sfcap, sfrestinfo, sfsaveinfo; -struct opvar { - xchar spovartyp; /* one of SPOVAR_foo */ - union { - char *str; - long l; - } vardata; +struct selectionvar { + int wid, hei; + char *map; }; struct autopickup_exception { @@ -867,7 +864,7 @@ struct instance_globals { d_level save_dlevel; /* do_name.c */ - struct opvar *gloc_filter_map; + struct selectionvar *gloc_filter_map; int gloc_filter_floodfill_match_glyph; int via_naming; @@ -1178,6 +1175,7 @@ struct instance_globals { int num_lregions; /* positions touched by level elements explicitly defined in the des-file */ char SpLev_Map[COLNO][ROWNO]; + struct sp_coder *coder; xchar xstart, ystart; char xsize, ysize; boolean splev_init_present; @@ -1187,7 +1185,6 @@ struct instance_globals { struct obj *container_obj[MAX_CONTAINMENT]; int container_idx; struct monst *invent_carrying_monster; - aligntyp ralign[3]; /* spells.c */ int spl_sortmode; /* index into spl_sortchoices[] */ diff --git a/include/extern.h b/include/extern.h index 829a65b52..694b2214a 100644 --- a/include/extern.h +++ b/include/extern.h @@ -254,6 +254,7 @@ E void NDECL(sanity_check); E char* FDECL(key2txt, (UCHAR_P, char *)); E char FDECL(yn_function, (const char *, const char *, CHAR_P)); E boolean FDECL(paranoid_query, (BOOLEAN_P, const char *)); +E void FDECL(makemap_prepost, (BOOLEAN_P, BOOLEAN_P)); /* ### dbridge.c ### */ @@ -915,8 +916,10 @@ E char *FDECL(mungspaces, (char *)); E char *FDECL(trimspaces, (char *)); E char *FDECL(strip_newline, (char *)); E char *FDECL(stripchars, (char *, const char *, const char *)); +E char *FDECL(stripdigits, (char *)); E char *FDECL(eos, (char *)); E boolean FDECL(str_end_is, (const char *, const char *)); +E int FDECL(str_lines_maxlen, (const char *)); E char *FDECL(strkitten, (char *, CHAR_P)); E void FDECL(copynchars, (char *, const char *, int)); E char FDECL(chrcasecpy, (int, int)); @@ -1262,6 +1265,7 @@ E void FDECL(add_subroom, (struct mkroom *, int, int, int, int, BOOLEAN_P, SCHAR_P, BOOLEAN_P)); E void NDECL(makecorridors); E void FDECL(add_door, (int, int, struct mkroom *)); +E void NDECL(clear_level_structures); E void NDECL(mklev); #ifdef SPECIALIZATION E void FDECL(topologize, (struct mkroom *, BOOLEAN_P)); @@ -1646,6 +1650,28 @@ E void NDECL(init_lan_features); E char *NDECL(lan_username); #endif +/* ### nhlsel.c ### */ +E struct selectionvar *FDECL(l_selection_check, (lua_State *, int)); +E int FDECL(l_selection_register, (lua_State *)); + +/* ### nhlua.c ### */ +E boolean FDECL(load_lua, (const char *)); +E void FDECL(nhl_error, (lua_State *, const char *)); +E void FDECL(lcheck_param_table, (lua_State *)); +E schar FDECL(get_table_mapchr, (lua_State *, const char *)); +E schar FDECL(get_table_mapchr_opt, (lua_State *, const char *, SCHAR_P)); +E schar FDECL(splev_chr2typ, (CHAR_P)); +E schar FDECL(check_mapchr, (const char *)); +E int FDECL(get_table_int, (lua_State *, const char *)); +E int FDECL(get_table_int_opt, (lua_State *, const char *, int)); +E char *FDECL(get_table_str, (lua_State *, const char *)); +E char *FDECL(get_table_str_opt, (lua_State *, const char *, char *)); +E int FDECL(get_table_boolean, (lua_State *, const char *)); +E int FDECL(get_table_boolean_opt, (lua_State *, const char *, int)); +E int FDECL(get_table_option, (lua_State *, const char *, const char *, const char *const *)); +E int FDECL(str_lines_max_width, (const char *)); +E char *FDECL(stripdigits, (char *)); + /* ### nhregex.c ### */ E struct nhregex *NDECL(regex_init); E boolean FDECL(regex_compile, (const char *, struct nhregex *)); @@ -2371,11 +2397,26 @@ E boolean FDECL(dig_corridor, (coord *, coord *, BOOLEAN_P, SCHAR_P, SCHAR_P)); E void FDECL(fill_room, (struct mkroom *, BOOLEAN_P)); E boolean FDECL(load_special, (const char *)); -E xchar FDECL(selection_getpoint, (int, int, struct opvar *)); -E struct opvar *FDECL(selection_opvar, (char *)); -E void FDECL(opvar_free_x, (struct opvar *)); +E xchar FDECL(selection_getpoint, (int, int, struct selectionvar *)); +E struct selectionvar *NDECL(selection_new); +E void FDECL(selection_free, (struct selectionvar *)); +#if !defined(IN_SP_LEV_C) E void FDECL(set_selection_floodfillchk, (int FDECL((*), (int,int)))); -E void FDECL(selection_floodfill, (struct opvar *, int, int, BOOLEAN_P)); +#endif +E void FDECL(selection_floodfill, (struct selectionvar *, int, int, BOOLEAN_P)); +E void FDECL(get_location_coord, (schar *, schar *, int, struct mkroom *, long)); +E void FDECL(selection_setpoint, (int, int, struct selectionvar *, XCHAR_P)); +E struct selectionvar * FDECL(selection_not, (struct selectionvar *)); +E void FDECL(selection_filter_percent, (struct selectionvar *, int)); +E int FDECL(selection_rndcoord, (struct selectionvar *, schar *, schar *, BOOLEAN_P)); +E void FDECL(selection_do_grow, (struct selectionvar *, int)); +E void FDECL(selection_do_line, (SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P, struct selectionvar *)); +E void FDECL(selection_do_randline, (SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P, struct selectionvar *)); +E struct selectionvar *FDECL(selection_filter_mapchar, (struct selectionvar *, XCHAR_P, int)); +E void FDECL(set_floodfillchk_match_under, (XCHAR_P)); +E void FDECL(selection_do_ellipse, (struct selectionvar *, int, int, int, int, int)); +E void NDECL(update_croom); +E void FDECL(l_register_des, (lua_State *)); /* ### spell.c ### */ diff --git a/include/global.h b/include/global.h index e6f0ec4a4..98d5265df 100644 --- a/include/global.h +++ b/include/global.h @@ -46,7 +46,7 @@ #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 */ +#define LEV_EXT ".lua" /* extension for special level files */ /* Assorted definitions that may depend on selections in config.h. */ diff --git a/include/ntconf.h b/include/ntconf.h index c2b0b3af0..b3ec581bd 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -284,4 +284,9 @@ extern void FDECL(nhassert_failed, (const char * exp, const char * file, #define nethack_enter(argc, argv) nethack_enter_winnt() extern void FDECL(nethack_exit, (int)) NORETURN; extern boolean FDECL(file_exists, (const char *)); + +#ifndef SYSTEM_H +#include "system.h" +#endif + #endif /* NTCONF_H */ diff --git a/include/sp_lev.h b/include/sp_lev.h index f3ffe6a94..060be4400 100644 --- a/include/sp_lev.h +++ b/include/sp_lev.h @@ -42,148 +42,9 @@ enum lvlinit_types { LVLINIT_ROGUE }; -/* max. # of random registers */ -#define MAX_REGISTERS 10 - /* max. nested depth of subrooms */ #define MAX_NESTED_ROOMS 5 -/* max. # of opcodes per special level */ -#define SPCODER_MAX_RUNTIME 65536 - -/* Opcodes for creating the level - * If you change these, also change opcodestr[] in util/lev_main.c - */ -enum opcode_defs { - SPO_NULL = 0, - SPO_MESSAGE, - SPO_MONSTER, - SPO_OBJECT, - SPO_ENGRAVING, - SPO_ROOM, - SPO_SUBROOM, - SPO_DOOR, - SPO_STAIR, - SPO_LADDER, - SPO_ALTAR, - SPO_FOUNTAIN, - SPO_SINK, - SPO_POOL, - SPO_TRAP, - SPO_GOLD, - SPO_CORRIDOR, - SPO_LEVREGION, - SPO_DRAWBRIDGE, - SPO_MAZEWALK, - SPO_NON_DIGGABLE, - SPO_NON_PASSWALL, - SPO_WALLIFY, - SPO_MAP, - SPO_ROOM_DOOR, - SPO_REGION, - SPO_MINERALIZE, - SPO_CMP, - SPO_JMP, - SPO_JL, - SPO_JLE, - SPO_JG, - SPO_JGE, - SPO_JE, - SPO_JNE, - SPO_TERRAIN, - SPO_REPLACETERRAIN, - SPO_EXIT, - SPO_ENDROOM, - SPO_POP_CONTAINER, - SPO_PUSH, - SPO_POP, - SPO_RN2, - SPO_DEC, - SPO_INC, - SPO_MATH_ADD, - SPO_MATH_SUB, - SPO_MATH_MUL, - SPO_MATH_DIV, - SPO_MATH_MOD, - SPO_MATH_SIGN, - SPO_COPY, - SPO_END_MONINVENT, - SPO_GRAVE, - SPO_FRAME_PUSH, - SPO_FRAME_POP, - SPO_CALL, - SPO_RETURN, - SPO_INITLEVEL, - SPO_LEVEL_FLAGS, - SPO_VAR_INIT, /* variable_name data */ - SPO_SHUFFLE_ARRAY, - SPO_DICE, - - SPO_SEL_ADD, - SPO_SEL_POINT, - SPO_SEL_RECT, - SPO_SEL_FILLRECT, - SPO_SEL_LINE, - SPO_SEL_RNDLINE, - SPO_SEL_GROW, - SPO_SEL_FLOOD, - SPO_SEL_RNDCOORD, - SPO_SEL_ELLIPSE, - SPO_SEL_FILTER, - SPO_SEL_GRADIENT, - SPO_SEL_COMPLEMENT, - - MAX_SP_OPCODES -}; - -/* MONSTER and OBJECT can take a variable number of parameters, - * they also pop different # of values from the stack. So, - * first we pop a value that tells what the _next_ value will - * mean. - */ -/* MONSTER */ -enum sp_mon_var_flags { - SP_M_V_PEACEFUL = 0, - SP_M_V_ALIGN, - SP_M_V_ASLEEP, - SP_M_V_APPEAR, - SP_M_V_NAME, - SP_M_V_FEMALE, - SP_M_V_INVIS, - SP_M_V_CANCELLED, - SP_M_V_REVIVED, - SP_M_V_AVENGE, - SP_M_V_FLEEING, - SP_M_V_BLINDED, - SP_M_V_PARALYZED, - SP_M_V_STUNNED, - SP_M_V_CONFUSED, - SP_M_V_SEENTRAPS, - - SP_M_V_END -}; - -/* OBJECT */ -enum sp_obj_var_flags { - SP_O_V_SPE = 0, - SP_O_V_CURSE, - SP_O_V_CORPSENM, - SP_O_V_NAME, - SP_O_V_QUAN, - SP_O_V_BURIED, - SP_O_V_LIT, - SP_O_V_ERODED, - SP_O_V_LOCKED, - SP_O_V_TRAPPED, - SP_O_V_RECHARGED, - SP_O_V_INVIS, - SP_O_V_GREASED, - SP_O_V_BROKEN, - SP_O_V_COORD, - - SP_O_V_END -}; - /* When creating objects, we need to know whether * it's a container and/or contents. */ @@ -199,25 +60,6 @@ enum sp_obj_var_flags { #define SEL_GRADIENT_RADIAL 0 #define SEL_GRADIENT_SQUARE 1 -/* variable types */ -#define SPOVAR_NULL 0x00 -#define SPOVAR_INT 0x01 /* l */ -#define SPOVAR_STRING 0x02 /* str */ -#define SPOVAR_VARIABLE 0x03 /* str (contains the variable name) */ -#define SPOVAR_COORD \ - 0x04 /* coordinate, encoded in l; use SP_COORD_X() and SP_COORD_Y() */ -#define SPOVAR_REGION 0x05 /* region, encoded in l; use SP_REGION_X1() etc \ - */ -#define SPOVAR_MAPCHAR 0x06 /* map char, in l */ -#define SPOVAR_MONST \ - 0x07 /* monster class & specific monster, encoded in l; use SP_MONST_... \ - */ -#define SPOVAR_OBJ \ - 0x08 /* object class & specific object type, encoded in l; use \ - SP_OBJ_... */ -#define SPOVAR_SEL 0x09 /* selection. char[COLNO][ROWNO] in str */ -#define SPOVAR_ARRAY 0x40 /* used in splev_var & lc_vardefs, not in opvar */ - #define SP_COORD_IS_RANDOM 0x01000000L /* Humidity flags for get_location() and friends, used with * SP_COORD_PACK_RANDOM() */ @@ -234,76 +76,18 @@ enum sp_obj_var_flags { #define SP_COORD_PACK(x, y) (((x) & 0xff) + (((y) & 0xff) << 16)) #define SP_COORD_PACK_RANDOM(f) (SP_COORD_IS_RANDOM | (f)) -#define SP_REGION_X1(l) (l & 0xff) -#define SP_REGION_Y1(l) ((l >> 8) & 0xff) -#define SP_REGION_X2(l) ((l >> 16) & 0xff) -#define SP_REGION_Y2(l) ((l >> 24) & 0xff) -#define SP_REGION_PACK(x1, y1, x2, y2) \ - (((x1) & 0xff) + (((y1) & 0xff) << 8) + (((x2) & 0xff) << 16) \ - + (((y2) & 0xff) << 24)) - -/* permonst index, object index, and lit value might be negative; - * add 10 to accept -1 through -9 while forcing non-negative for bit shift - */ -#define SP_MONST_CLASS(l) ((l) & 0xff) -#define SP_MONST_PM(l) ((((l) >> 8) & 0xffff) - 10) -#define SP_MONST_PACK(pm, cls) (((10 + (pm)) << 8) | ((cls) & 0xff)) - -#define SP_OBJ_CLASS(l) ((l) & 0xff) -#define SP_OBJ_TYP(l) ((((l) >> 8) & 0xffff) - 10) -#define SP_OBJ_PACK(ob, cls) (((10 + (ob)) << 8) | ((cls) & 0xff)) - -#define SP_MAPCHAR_TYP(l) ((l) & 0xff) -#define SP_MAPCHAR_LIT(l) ((((l) >> 8) & 0xffff) - 10) -#define SP_MAPCHAR_PACK(typ, lit) (((10 + (lit)) << 8) | ((typ) & 0xff)) - -struct splev_var { - struct splev_var *next; - char *name; - xchar svtyp; /* SPOVAR_foo */ - union { - struct opvar *value; - struct opvar **arrayvalues; - } data; - long array_len; -}; - -struct splevstack { - long depth; - long depth_alloc; - struct opvar **stackdata; -}; - -struct sp_frame { - struct sp_frame *next; - struct splevstack *stack; - struct splev_var *variables; - long n_opcode; -}; - struct sp_coder { - struct splevstack *stack; - struct sp_frame *frame; int premapped; boolean solidify; struct mkroom *croom; + int room_stack; struct mkroom *tmproomlist[MAX_NESTED_ROOMS + 1]; boolean failed_room[MAX_NESTED_ROOMS + 1]; int n_subroom; - boolean exit_script; int lvl_is_joined; boolean check_inaccessibles; - - int opcode; /* current opcode */ - struct opvar *opdat; /* current push data (req. opcode == SPO_PUSH) */ }; -/* special level coder CPU flags */ -#define SP_CPUFLAG_LT 1 -#define SP_CPUFLAG_GT 2 -#define SP_CPUFLAG_EQ 4 -#define SP_CPUFLAG_ZERO 8 - /* * Structures manipulated by the special levels loader & compiler */ @@ -315,15 +99,6 @@ typedef struct { int x, y; } unpacked_coord; -typedef struct { - int cmp_what; - int cmp_val; -} opcmp; - -typedef struct { - long jmp_target; -} opjmp; - typedef struct { xchar init_style; /* one of LVLINIT_foo */ long flags; @@ -416,122 +191,4 @@ typedef struct { char **map; } mazepart; -typedef struct { - int opcode; - struct opvar *opdat; -} _opcode; - -typedef struct { - _opcode *opcodes; - long n_opcodes; -} sp_lev; - -typedef struct { - xchar x, y, direction, count, lit; - char typ; -} spill; - -/* only used by lev_comp */ -struct lc_funcdefs_parm { - char *name; - char parmtype; - struct lc_funcdefs_parm *next; -}; - -struct lc_funcdefs { - struct lc_funcdefs *next; - char *name; - long addr; - sp_lev code; - long n_called; - struct lc_funcdefs_parm *params; - long n_params; -}; - -struct lc_vardefs { - struct lc_vardefs *next; - char *name; - long var_type; /* SPOVAR_foo */ - long n_used; -}; - -struct lc_breakdef { - struct lc_breakdef *next; - struct opvar *breakpoint; - int break_depth; -}; - -/* - * Quick! Avert your eyes while you still have a chance! - */ -#ifdef SPEC_LEV -/* compiling lev_comp rather than nethack */ -/* clang format off */ -#ifdef USE_OLDARGS -#ifndef VA_TYPE -typedef const char *vA; -#define VA_TYPE -#endif -/* hack to avoid "warning: cast to 'vA' (aka 'const char *') from smaller - integer type 'int' [-Wint-to-pointer-cast]" */ -#define vA_(a) ((vA) (long) a) -#undef VA_ARGS /* redefine with the maximum number actually used */ -#undef VA_SHIFT /* ditto */ -#undef VA_PASS1 -#define VA_ARGS \ - arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, \ - arg12, arg13, arg14 -/* Unlike in the core, lev_comp's VA_SHIFT should be completely safe, - because callers always pass all these arguments. */ -#define VA_SHIFT() \ - (arg1 = arg2, arg2 = arg3, arg3 = arg4, arg4 = arg5, arg5 = arg6, \ - arg6 = arg7, arg7 = arg8, arg8 = arg9, arg9 = arg10, arg10 = arg11, \ - arg11 = arg12, arg12 = arg13, arg13 = arg14, arg14 = 0) -/* standard NULL may be either (void *)0 or plain 0, both of - which would need to be explicitly cast to (char *) here */ -#define VA_PASS1(a1) \ - vA_(a1), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), \ - vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0) -#define VA_PASS2(a1,a2) \ - vA_(a1), vA_(a2), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), \ - vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0) -#define VA_PASS3(a1,a2,a3) \ - vA_(a1), vA_(a2), vA_(a3), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), \ - vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0) -#define VA_PASS4(a1,a2,a3,a4) \ - vA_(a1), vA_(a2), vA_(a3), vA_(a4), vA_(0), vA_(0), vA_(0), vA_(0), \ - vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0) -#define VA_PASS5(a1,a2,a3,a4,a5) \ - vA_(a1), vA_(a2), vA_(a3), vA_(a4), vA_(a5), vA_(0), vA_(0), vA_(0), \ - vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0) -#define VA_PASS7(a1,a2,a3,a4,a5,a6,a7) \ - vA_(a1), vA_(a2), vA_(a3), vA_(a4), vA_(a5), vA_(a6), vA_(a7), vA_(0), \ - vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0) -#define VA_PASS8(a1,a2,a3,a4,a5,a6,a7,a8) \ - vA_(a1), vA_(a2), vA_(a3), vA_(a4), vA_(a5), vA_(a6), vA_(a7), vA_(a8), \ - vA_(0), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0) -#define VA_PASS9(a1,a2,a3,a4,a5,a6,a7,a8,a9) \ - vA_(a1), vA_(a2), vA_(a3), vA_(a4), vA_(a5), vA_(a6), vA_(a7), vA_(a8), \ - vA_(a9), vA_(0), vA_(0), vA_(0), vA_(0), vA_(0) -#define VA_PASS14(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \ - vA_(a1), vA_(a2), vA_(a3), vA_(a4), vA_(a5), vA_(a6), vA_(a7), vA_(a8), \ - vA_(a9), vA_(a10), vA_(a11), vA_(a12), vA_(a13), vA_(a14) -#else /*!USE_OLDARGS*/ -/* USE_STDARG and USE_VARARGS don't need to pass dummy arguments - or cast real ones */ -#define VA_PASS1(a1) a1 -#define VA_PASS2(a1,a2) a1, a2 -#define VA_PASS3(a1,a2,a3) a1, a2, a3 -#define VA_PASS4(a1,a2,a3,a4) a1, a2, a3, a4 -#define VA_PASS5(a1,a2,a3,a4,a5) a1, a2, a3, a4, a5 -#define VA_PASS7(a1,a2,a3,a4,a5,a6,a7) a1, a2, a3, a4, a5, a6, a7 -#define VA_PASS8(a1,a2,a3,a4,a5,a6,a7,a8) a1, a2, a3, a4, a5, a6, a7, a8 -#define VA_PASS9(a1,a2,a3,a4,a5,a6,a7,a8,a9) a1, a2, a3, a4, a5, a6, a7, a8, a9 -#define VA_PASS14(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \ - a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 -#endif /*?USE_OLDARGS*/ -/* clang format on */ -/* You were warned to avert your eyes.... */ -#endif /*SPEC_LEV*/ - #endif /* SP_LEV_H */ diff --git a/include/system.h b/include/system.h index a2cb51f40..bb0ee071d 100644 --- a/include/system.h +++ b/include/system.h @@ -6,8 +6,8 @@ #ifndef SYSTEM_H #define SYSTEM_H +#if !defined(WIN32) #if !defined(__cplusplus) && !defined(__GO32__) - #define E extern /* some old may not define off_t and size_t; if your system is @@ -339,7 +339,7 @@ E int FDECL(memcmp, (const void *, const void *, size_t)); E void *FDECL(memcpy, (void *, const void *, size_t)); E void *FDECL(memset, (void *, int, size_t)); #else -#if defined(AZTEC_50) || defined(NHSTDC) || defined(WIN32) +#if defined(AZTEC_50) || defined(NHSTDC)) E int FDECL(memcmp, (const void *, const void *, size_t)); E void *FDECL(memcpy, (void *, const void *, size_t)); E void *FDECL(memset, (void *, int, size_t)); @@ -453,7 +453,7 @@ E char *FDECL(rindex, (const char *, int)); * If your system defines sprintf, et al, in stdio.h, add to the initial * #if. */ -#if defined(ULTRIX) || defined(__DECC) || defined(__SASC_60) || defined(WIN32) +#if defined(ULTRIX) || defined(__DECC) || defined(__SASC_60) #define SPRINTF_PROTO #endif #if (defined(SUNOS4) && defined(__STDC__)) || defined(_AIX32) @@ -567,5 +567,10 @@ E int FDECL(atoi, (const char *)); #undef E #endif /* !__cplusplus && !__GO32__ */ +#endif /* WIN32 */ + +#include "lua.h" +#include "lualib.h" +#include "lauxlib.h" #endif /* SYSTEM_H */ diff --git a/src/cmd.c b/src/cmd.c index 0b7471715..51d2f0577 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -148,6 +148,7 @@ STATIC_PTR int NDECL(wiz_where); STATIC_PTR int NDECL(wiz_detect); STATIC_PTR int NDECL(wiz_panic); STATIC_PTR int NDECL(wiz_polyself); +STATIC_PTR int NDECL(wiz_load_lua); STATIC_PTR int NDECL(wiz_level_tele); STATIC_PTR int NDECL(wiz_level_change); STATIC_PTR int NDECL(wiz_show_seenv); @@ -785,16 +786,14 @@ wiz_identify(VOID_ARGS) return 0; } -/* #wizmakemap - discard current dungeon level and replace with a new one */ -STATIC_PTR int -wiz_makemap(VOID_ARGS) +void +makemap_prepost(pre, wiztower) +boolean pre, wiztower; { NHFILE tmpnhfp; + struct monst *mtmp; - if (wizard) { - struct monst *mtmp; - boolean was_in_W_tower = In_W_tower(u.ux, u.uy, &u.uz); - + if (pre) { rm_mapseen(ledger_no(&u.uz)); for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { if (mtmp->isgd) { /* vault is going away; get rid of guard */ @@ -844,14 +843,14 @@ wiz_makemap(VOID_ARGS) angel on Astral or setting off alarm on Ft.Ludios are handled by goto_level(do.c) so won't occur for replacement levels */ mklev(); - + } else { vision_reset(); g.vision_full_recalc = 1; cls(); /* was using safe_teleds() but that doesn't honor arrival region on levels which have such; we don't force stairs, just area */ u_on_rndspot((u.uhave.amulet ? 1 : 0) /* 'going up' flag */ - | (was_in_W_tower ? 2 : 0)); + | (wiztower ? 2 : 0)); losedogs(); /* u_on_rndspot() might pick a spot that has a monster, or losedogs() might pick the hero's spot (only if there isn't already a monster @@ -870,6 +869,21 @@ wiz_makemap(VOID_ARGS) #ifdef INSURANCE save_currentstate(); #endif + } +} + +/* #wizmakemap - discard current dungeon level and replace with a new one */ +STATIC_PTR int +wiz_makemap(VOID_ARGS) +{ + if (wizard) { + boolean was_in_W_tower = In_W_tower(u.ux, u.uy, &u.uz); + makemap_prepost(TRUE, was_in_W_tower); + /* create a new level; various things like bestowing a guardian + angel on Astral or setting off alarm on Ft.Ludios are handled + by goto_level(do.c) so won't occur for replacement levels */ + mklev(); + makemap_prepost(FALSE, was_in_W_tower); } else { pline(unavailcmd, "#wizmakemap"); } @@ -930,6 +944,70 @@ wiz_detect(VOID_ARGS) return 0; } +STATIC_PTR int +wiz_load_lua(VOID_ARGS) +{ + if (wizard) { + char buf[BUFSZ]; + getlin("Load which lua file?", buf); + if (buf[0] == '\033' || buf[0] == '\0') + return 0; + if (!strchr(buf, '.')) + strcat(buf, ".lua"); + (void) load_lua(buf); + } else + pline("Unavailable command 'wiz_load_lua'."); + return 0; +} + +STATIC_PTR int +wiz_load_splua(VOID_ARGS) +{ + if (wizard) { + boolean was_in_W_tower = In_W_tower(u.ux, u.uy, &u.uz); + char buf[BUFSZ]; + int ridx; + + getlin("Load which des lua file?", buf); + if (buf[0] == '\033' || buf[0] == '\0') + return 0; + if (!strchr(buf, '.')) + strcat(buf, ".lua"); + makemap_prepost(TRUE, was_in_W_tower); + + /* TODO: need to split some of this out of mklev(), makelevel(), makemaz() */ + g.in_mklev = TRUE; + oinit(); /* assign level dependent obj probabilities */ + clear_level_structures(); + + (void) load_special(buf); + + bound_digging(); + mineralize(-1, -1, -1, -1, FALSE); + g.in_mklev = FALSE; + if (g.level.flags.has_morgue) + g.level.flags.graveyard = 1; + if (!g.level.flags.is_maze_lev) { + struct mkroom *croom; + for (croom = &g.rooms[0]; croom != &g.rooms[g.nroom]; croom++) +#ifdef SPECIALIZATION + topologize(croom, FALSE); +#else + topologize(croom); +#endif + } + set_wall_state(); + /* for many room types, g.rooms[].rtype is zeroed once the room has been + entered; g.rooms[].orig_rtype always retains original rtype value */ + for (ridx = 0; ridx < SIZE(g.rooms); ridx++) + g.rooms[ridx].orig_rtype = g.rooms[ridx].rtype; + + makemap_prepost(FALSE, was_in_W_tower); + } else + pline("Unavailable command 'wiz_load_splua'."); + return 0; +} + /* ^V command - level teleport */ STATIC_PTR int wiz_level_tele(VOID_ARGS) @@ -3452,6 +3530,10 @@ struct ext_func_tab extcmdlist[] = { wiz_intrinsic, IFBURIED | AUTOCOMPLETE | WIZMODECMD }, { C('v'), "wizlevelport", "teleport to another level", wiz_level_tele, IFBURIED | AUTOCOMPLETE | WIZMODECMD }, + { '\0', "wizloaddes", "load and execute a des-file lua script", + wiz_load_splua, IFBURIED | WIZMODECMD }, + { '\0', "wizloadlua", "load and execute a lua script", + wiz_load_lua, IFBURIED | WIZMODECMD }, { '\0', "wizmakemap", "recreate the current level", wiz_makemap, IFBURIED | WIZMODECMD }, { C('f'), "wizmap", "map the level", diff --git a/src/decl.c b/src/decl.c index d24e9937a..56ee65810 100644 --- a/src/decl.c +++ b/src/decl.c @@ -617,7 +617,8 @@ const struct instance_globals g_init = { NULL, /* lev_message */ NULL, /* lregions */ 0, /* num_lregions */ - UNDEFINED_VALUES, /* SplLev_Map */ + UNDEFINED_VALUES, /* SpLev_Map */ + NULL, /* coder */ UNDEFINED_VALUE, /* xstart */ UNDEFINED_VALUE, /* ystart */ UNDEFINED_VALUE, /* xsize */ @@ -629,7 +630,6 @@ const struct instance_globals g_init = { { UNDEFINED_PTR }, /* container_obj */ 0, /* container_idx */ NULL, /* invent_carrying_monster */ - { AM_CHAOTIC, AM_NEUTRAL, AM_LAWFUL }, /* ralign */ /* spells.c */ 0, /* spl_sortmode */ diff --git a/src/do_name.c b/src/do_name.c index 0200cbba5..a0cc25fa0 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -306,7 +306,7 @@ gloc_filter_init() { if (iflags.getloc_filter == GFILTER_AREA) { if (!g.gloc_filter_map) { - g.gloc_filter_map = selection_opvar((char *) 0); + g.gloc_filter_map = selection_new(); } /* special case: if we're in a doorway, try to figure out which direction we're moving, and use that side of the doorway */ @@ -326,8 +326,8 @@ void gloc_filter_done() { if (g.gloc_filter_map) { - opvar_free_x(g.gloc_filter_map); - g.gloc_filter_map = (struct opvar *) 0; + selection_free(g.gloc_filter_map); + g.gloc_filter_map = (struct selectionvar *) 0; } } diff --git a/src/hacklib.c b/src/hacklib.c index 48d6a4254..ac4527018 100644 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -22,8 +22,10 @@ char * trimspaces (char *) char * strip_newline (char *) char * stripchars (char *, const char *, const char *) + char * stripdigits (char *) char * eos (char *) boolean str_end_is (const char *, const char *) + int str_lines_maxlen (const char *) char * strkitten (char *,char) void copynchars (char *,const char *,int) char chrcasecpy (int,int) @@ -224,6 +226,31 @@ const char *str, *chkstr; return FALSE; } +/* return the max line length from buffer comprising of newline-separated strings */ +int +str_lines_maxlen(str) +const char *str; +{ + const char *s1, *s2; + int len, max_len = 0; + + s1 = str; + while (s1 && *s1) { + s2 = index(s1, '\n'); + if (s2) { + len = (int) (s2 - s1); + s1 = s2 + 1; + } else { + len = (int) strlen(s1); + s1 = (char *) 0; + } + if (len > max_len) + max_len = len; + } + + return max_len; +} + /* append a character to a string (in place): strcat(s, {c,'\0'}); */ char * strkitten(s, c) @@ -468,6 +495,21 @@ const char *stuff_to_strip, *orig; return bp; } +/* remove digits from string */ +char * +stripdigits(s) +char *s; +{ + char *s1, *s2; + + for (s1 = s2 = s; *s1; s1++) + if (*s1 < '0' || *s1 > '9') + *s2++ = *s1; + *s2 = '\0'; + + return s; +} + /* substitute a word or phrase in a string (in place) */ /* caller is responsible for ensuring that bp points to big enough buffer */ char * diff --git a/src/mklev.c b/src/mklev.c index a0903be9d..631a908b1 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -14,7 +14,6 @@ STATIC_DCL void FDECL(mksink, (struct mkroom *)); STATIC_DCL void FDECL(mkaltar, (struct mkroom *)); STATIC_DCL void FDECL(mkgrave, (struct mkroom *)); STATIC_DCL void NDECL(makevtele); -STATIC_DCL void NDECL(clear_level_structures); STATIC_DCL void NDECL(makelevel); STATIC_DCL boolean FDECL(bydoor, (XCHAR_P, XCHAR_P)); STATIC_DCL struct mkroom *FDECL(find_branch_room, (coord *)); @@ -354,6 +353,14 @@ register struct mkroom *aroom; register int tmp; int i; + if (aroom->doorct) { + for (i = 0; i < aroom->doorct; i++) { + tmp = aroom->fdoor + i; + if (g.doors[tmp].x == x && g.doors[tmp].y == y) + return; + } + } + if (aroom->doorct == 0) aroom->fdoor = g.doorindex; @@ -573,7 +580,7 @@ makevtele() * special) but it's easier to put it all in one place than make sure * each type initializes what it needs to separately. */ -STATIC_OVL void +void clear_level_structures() { static struct rm zerorm = { cmap_to_glyph(S_stone), @@ -637,6 +644,14 @@ clear_level_structures() xdnladder = ydnladder = xupladder = yupladder = 0; g.made_branch = FALSE; clear_regions(); + g.xstart = 1; + g.ystart = 0; + g.xsize = COLNO - 1; + g.ysize = ROWNO; + if (g.lev_message) { + free(g.lev_message); + g.lev_message = (char *) 0; + } } STATIC_OVL void diff --git a/src/mkmap.c b/src/mkmap.c index 59eec1949..832f4f4fe 100644 --- a/src/mkmap.c +++ b/src/mkmap.c @@ -28,8 +28,10 @@ schar bg_typ; register int i, j; for (i = 1; i < COLNO; i++) - for (j = 0; j < ROWNO; j++) + for (j = 0; j < ROWNO; j++) { levl[i][j].typ = bg_typ; + levl[i][j].lit = FALSE; + } } STATIC_OVL void diff --git a/src/nhlsel.c b/src/nhlsel.c new file mode 100644 index 000000000..73ea5003b --- /dev/null +++ b/src/nhlsel.c @@ -0,0 +1,723 @@ +/* NetHack 3.6 nhlua.c $NHDT-Date: 1524287226 2018/04/21 05:07:06 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.98 $ */ +/* Copyright (c) 2018 by Pasi Kallinen */ +/* NetHack may be freely redistributed. See license for details. */ + +#include "hack.h" +#include "sp_lev.h" + +/* lua_CFunction prototypes */ +STATIC_DCL int FDECL(l_selection_new, (lua_State *)); +STATIC_DCL int FDECL(l_selection_clone, (lua_State *)); +STATIC_DCL int FDECL(l_selection_getpoint, (lua_State *)); +STATIC_DCL int FDECL(l_selection_setpoint, (lua_State *)); +STATIC_DCL int FDECL(l_selection_not, (lua_State *)); +STATIC_DCL int FDECL(l_selection_filter_percent, (lua_State *)); +STATIC_DCL int FDECL(l_selection_rndcoord, (lua_State *)); +STATIC_DCL int FDECL(l_selection_line, (lua_State *)); +STATIC_DCL int FDECL(l_selection_randline, (lua_State *)); +STATIC_DCL int FDECL(l_selection_rect, (lua_State *)); +STATIC_DCL int FDECL(l_selection_fillrect, (lua_State *)); +STATIC_DCL int FDECL(l_selection_fillrect, (lua_State *)); +STATIC_DCL int FDECL(l_selection_grow, (lua_State *)); +STATIC_DCL int FDECL(l_selection_filter_mapchar, (lua_State *)); +STATIC_DCL int FDECL(l_selection_flood, (lua_State *)); +STATIC_DCL int FDECL(l_selection_circle, (lua_State *)); +STATIC_DCL int FDECL(l_selection_ellipse, (lua_State *)); +STATIC_DCL int FDECL(l_selection_gradient, (lua_State *)); +STATIC_DCL int FDECL(l_selection_iterate, (lua_State *)); +STATIC_DCL int FDECL(l_selection_gc, (lua_State *)); +STATIC_DCL int FDECL(l_selection_not, (lua_State *)); +STATIC_DCL int FDECL(l_selection_and, (lua_State *)); +STATIC_DCL int FDECL(l_selection_or, (lua_State *)); +STATIC_DCL int FDECL(l_selection_xor, (lua_State *)); +STATIC_DCL int FDECL(l_selection_not, (lua_State *)); +STATIC_DCL int FDECL(l_selection_add, (lua_State *)); +STATIC_DCL int FDECL(l_selection_sub, (lua_State *)); +STATIC_DCL int FDECL(l_selection_ipairs, (lua_State *)); + +struct selectionvar * +l_selection_check(L, index) +lua_State *L; +int index; +{ + struct selectionvar *sel; + + luaL_checktype(L, index, LUA_TUSERDATA); + sel = (struct selectionvar *)luaL_checkudata(L, index, "selection"); + if (!sel) + nhl_error(L, "Selection error"); + return sel; +} + +static int +l_selection_gc(L) +lua_State *L; +{ + struct selectionvar *sel = l_selection_check(L, 1); + if (sel) + selection_free(sel); + return 0; +} + +static struct selectionvar * +l_selection_to(L, index) +lua_State *L; +int index; +{ + struct selectionvar *sel = (struct selectionvar *)lua_touserdata(L, index); + if (!sel) + nhl_error(L, "Selection error"); + return sel; +} + +static struct selectionvar * +l_selection_push(L) +lua_State *L; +{ + struct selectionvar *tmp = selection_new(); + struct selectionvar *sel = (struct selectionvar *)lua_newuserdata(L, sizeof(struct selectionvar)); + luaL_getmetatable(L, "selection"); + lua_setmetatable(L, -2); + + sel->wid = tmp->wid; + sel->hei = tmp->hei; + sel->map = dupstr(tmp->map); + selection_free(tmp); + + return sel; +} + +/* local sel = selection.new(); */ +static int +l_selection_new(L) +lua_State *L; +{ + (void) l_selection_push(L); + return 1; +} + +/* local sel = selection.clone(sel); */ +static int +l_selection_clone(L) +lua_State *L; +{ + struct selectionvar *sel = l_selection_check(L, 1); + struct selectionvar *tmp; + /* int x,y; */ /* REVIEW: unreferenced */ + lua_pop(L, 1); + (void) l_selection_new(L); + tmp = l_selection_check(L, 1); + if (tmp->map) + free(tmp->map); + tmp->map = dupstr(sel->map); + tmp->wid = sel->wid; + tmp->hei = sel->hei; + return 1; +} + +/* selection.set(sel, x, y); */ +/* selection.set(sel, x, y, value); */ +/* local sel = selection.set(); */ +/* local sel = sel:set(); */ +/* local sel = selection.set(sel); */ +/* TODO: allow setting multiple coordinates at once: set({x,y}, {x,y}, ...); */ +static int +l_selection_setpoint(L) +lua_State *L; +{ + struct selectionvar *sel = (struct selectionvar *) 0; + /* REVIEW: initializer added */ + schar x = -1, y = -1; + int val = 1; + int argc = lua_gettop(L); + long coord; + + if (argc == 0) { + (void) l_selection_new(L); + } else if (argc == 1) { + sel = l_selection_check(L, 1); + } else if (argc == 2) { + x = (schar) luaL_checkinteger(L, 1); + y = (schar) luaL_checkinteger(L, 2); + lua_pop(L, 2); + (void) l_selection_new(L); + sel = l_selection_check(L, 1); + } else { + sel = l_selection_check(L, 1); + x = (schar) luaL_checkinteger(L, 2); + y = (schar) luaL_checkinteger(L, 3); + val = (int) luaL_optinteger(L, 4, 1); + } + + if (!sel || !sel->map) { + nhl_error(L, "Selection setpoint error"); + return 0; + } + + if (x == -1 && y == -1) + coord = SP_COORD_PACK_RANDOM(0); + else + coord = SP_COORD_PACK(x,y); + get_location_coord(&x, &y, ANY_LOC, g.coder ? g.coder->croom : NULL, coord); + selection_setpoint(x, y, sel, val); + lua_settop(L, 1); + return 1; +} + +/* local value = selection.get(sel, x, y); */ +static int +l_selection_getpoint(L) +lua_State *L; +{ + struct selectionvar *sel = l_selection_check(L, 1); + schar x = (schar) luaL_checkinteger(L, 2); + schar y = (schar) luaL_checkinteger(L, 3); + int val; + long coord; + + if (x == -1 && y == -1) + coord = SP_COORD_PACK_RANDOM(0); + else + coord = SP_COORD_PACK(x,y); + get_location_coord(&x, &y, ANY_LOC, g.coder ? g.coder->croom : NULL, coord); + + val = selection_getpoint(x, y, sel); + lua_settop(L, 0); + lua_pushnumber(L, val); + return 1; +} + +/* local s = selection.negate(sel); */ +/* local s = selection.negate(); */ +static int +l_selection_not(L) +lua_State *L; +{ + int argc = lua_gettop(L); + struct selectionvar *sel; + + if (argc == 0) + (void) l_selection_new(L); + sel = l_selection_check(L, 1); + selection_not(sel); + lua_settop(L, 1); + return 1; +} + +/* local sel = selection.area(4,5, 40,10) & selection.rect(7,8, 60,14); */ +static int +l_selection_and(L) +lua_State *L; +{ + int x,y; + struct selectionvar *sela = l_selection_check(L, 1); + struct selectionvar *selb = l_selection_check(L, 2); + + for (x = 0; x < sela->wid; x++) + for (y = 0; y < sela->hei; y++) { + int val = selection_getpoint(x, y, sela) & selection_getpoint(x, y, selb); + selection_setpoint(x, y, sela, val); + } + + lua_settop(L, 1); + return 1; +} + +/* local sel = selection.area(4,5, 40,10) | selection.rect(7,8, 60,14); */ +static int +l_selection_or(L) +lua_State *L; +{ + int x,y; + struct selectionvar *sela = l_selection_check(L, 1); + struct selectionvar *selb = l_selection_check(L, 2); + + for (x = 0; x < sela->wid; x++) + for (y = 0; y < sela->hei; y++) { + int val = selection_getpoint(x, y, sela) | selection_getpoint(x, y, selb); + selection_setpoint(x, y, sela, val); + } + + lua_settop(L, 1); + return 1; +} + +/* local sel = selection.area(4,5, 40,10) ~ selection.rect(7,8, 60,14); */ +static int +l_selection_xor(L) +lua_State *L; +{ + int x,y; + struct selectionvar *sela = l_selection_check(L, 1); + struct selectionvar *selb = l_selection_check(L, 2); + + for (x = 0; x < sela->wid; x++) + for (y = 0; y < sela->hei; y++) { + int val = selection_getpoint(x, y, sela) ^ selection_getpoint(x, y, selb); + selection_setpoint(x, y, sela, val); + } + + lua_settop(L, 1); + return 1; +} + + +/* local s = selection.percentage(sel, 50); */ +static int +l_selection_filter_percent(L) +lua_State *L; +{ + struct selectionvar *sel = l_selection_check(L, 1); + int p = (int) luaL_checkinteger(L, 2); + selection_filter_percent(sel, p); + lua_settop(L, 1); + return 1; +} + +/* local x,y = selection.rndcoord(sel); */ +/* local x,y = selection.rndcoord(sel, 1); */ +static int +l_selection_rndcoord(L) +lua_State *L; +{ + struct selectionvar *sel = l_selection_check(L, 1); + int removeit = (int) luaL_optinteger(L, 2, 0); + schar x, y; + selection_rndcoord(sel, &x, &y, removeit); + update_croom(); + if (g.coder && g.coder->croom) { + x -= g.coder->croom->lx; + y -= g.coder->croom->ly; + } else { + x -= g.xstart; + y -= g.ystart; + } + lua_settop(L, 0); + lua_pushnumber(L, x); + lua_pushnumber(L, y); + return 2; +} + +/* local s = selection.line(sel, x1,y1, x2,y2); */ +/* local s = selection.line(x1,y1, x2,y2); */ +/* s:line(x1,y1, x2,y2); */ +static int +l_selection_line(L) +lua_State *L; +{ + int argc = lua_gettop(L); + struct selectionvar *sel; + schar x1; + schar y1; + schar x2; + schar y2; + + if (argc == 4) { + (void) l_selection_new(L); + x1 = (schar) luaL_checkinteger(L, 1); + y1 = (schar) luaL_checkinteger(L, 2); + x2 = (schar) luaL_checkinteger(L, 3); + y2 = (schar) luaL_checkinteger(L, 4); + sel = l_selection_check(L, 5); + lua_remove(L, 1); + lua_remove(L, 1); + lua_remove(L, 1); + lua_remove(L, 1); + } else { + sel = l_selection_check(L, 1); + x1 = (schar) luaL_checkinteger(L, 2); + y1 = (schar) luaL_checkinteger(L, 3); + x2 = (schar) luaL_checkinteger(L, 4); + y2 = (schar) luaL_checkinteger(L, 5); + } + + get_location_coord(&x1, &y1, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x1,y1)); + get_location_coord(&x2, &y2, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x2,y2)); + + selection_do_line(x1,y1,x2,y2, sel); + lua_settop(L, 1); + return 1; +} + +/* local s = selection.rect(sel, x1,y1, x2,y2); */ +static int +l_selection_rect(L) +lua_State *L; +{ + int argc = lua_gettop(L); + struct selectionvar *sel; + schar x1; + schar y1; + schar x2; + schar y2; + + if (argc == 4) { + (void) l_selection_new(L); + x1 = (schar) luaL_checkinteger(L, 1); + y1 = (schar) luaL_checkinteger(L, 2); + x2 = (schar) luaL_checkinteger(L, 3); + y2 = (schar) luaL_checkinteger(L, 4); + sel = l_selection_check(L, 5); + lua_remove(L, 1); + lua_remove(L, 1); + lua_remove(L, 1); + lua_remove(L, 1); + } else { + sel = l_selection_check(L, 1); + x1 = (schar) luaL_checkinteger(L, 2); + y1 = (schar) luaL_checkinteger(L, 3); + x2 = (schar) luaL_checkinteger(L, 4); + y2 = (schar) luaL_checkinteger(L, 5); + } + + get_location_coord(&x1, &y1, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x1,y1)); + get_location_coord(&x2, &y2, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x2,y2)); + + selection_do_line(x1,y1,x2,y1, sel); + selection_do_line(x1,y1,x1,y2, sel); + selection_do_line(x2,y1,x2,y2, sel); + selection_do_line(x1,y2,x2,y2, sel); + lua_settop(L, 1); + return 1; +} + +/* local s = selection.fillrect(sel, x1,y1, x2,y2); */ +/* local s = selection.fillrect(x1,y1, x2,y2); */ +/* s:fillrect(x1,y1, x2,y2); */ +/* selection.area(x1,y1, x2,y2); */ +static int +l_selection_fillrect(L) +lua_State *L; +{ + int argc = lua_gettop(L); + struct selectionvar *sel; + int y; + schar x1; + schar y1; + schar x2; + schar y2; + + if (argc == 4) { + (void) l_selection_new(L); + x1 = (schar) luaL_checkinteger(L, 1); + y1 = (schar) luaL_checkinteger(L, 2); + x2 = (schar) luaL_checkinteger(L, 3); + y2 = (schar) luaL_checkinteger(L, 4); + sel = l_selection_check(L, 5); + lua_remove(L, 1); + lua_remove(L, 1); + lua_remove(L, 1); + lua_remove(L, 1); + } else { + sel = l_selection_check(L, 1); + x1 = (schar) luaL_checkinteger(L, 2); + y1 = (schar) luaL_checkinteger(L, 3); + x2 = (schar) luaL_checkinteger(L, 4); + y2 = (schar) luaL_checkinteger(L, 5); + } + + get_location_coord(&x1, &y1, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x1,y1)); + get_location_coord(&x2, &y2, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x2,y2)); + + if (x1 == x2) { + for (y = y1; y <= y2; y++) + selection_setpoint(x1, y, sel, 1); + } else { + for (y = y1; y <= y2; y++) + selection_do_line(x1,y,x2,y, sel); + } + lua_settop(L, 1); + return 1; +} + +/* local s = selection.randline(sel, x1,y1, x2,y2, roughness); */ +/* local s = selection.randline(x1,y1, x2,y2, roughness); */ +/* TODO: selection.randline(x1,y1, x2,y2, roughness); */ +/* TODO: selection.randline({x1,y1}, {x2,y2}, roughness); */ +static int +l_selection_randline(L) +lua_State *L; +{ + int argc = lua_gettop(L); + struct selectionvar *sel = (struct selectionvar *) 0; + /* REVIEW: initializer added */ + schar x1, y1, x2, y2; + int roughness = 7; + + if (argc == 6) { + sel = l_selection_check(L, 1); + x1 = (schar) luaL_checkinteger(L, 2); + y1 = (schar) luaL_checkinteger(L, 3); + x2 = (schar) luaL_checkinteger(L, 4); + y2 = (schar) luaL_checkinteger(L, 5); + roughness = (int) luaL_checkinteger(L, 6); + } else if (argc == 5 && lua_type(L, 1) == LUA_TNUMBER) { + x1 = (schar) luaL_checkinteger(L, 1); + y1 = (schar) luaL_checkinteger(L, 2); + x2 = (schar) luaL_checkinteger(L, 3); + y2 = (schar) luaL_checkinteger(L, 4); + roughness = (int) luaL_checkinteger(L, 5); + lua_pop(L, 5); + (void) l_selection_new(L); + sel = l_selection_check(L, 1); + } + + get_location_coord(&x1, &y1, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x1,y1)); + get_location_coord(&x2, &y2, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x2,y2)); + + selection_do_randline(x1,y1, x2,y2, roughness, 12, sel); + lua_settop(L, 1); + return 1; +} + +/* local s = selection.grow(sel); */ +/* local s = selection.grow(sel, "north"); */ +static int +l_selection_grow(L) +lua_State *L; +{ + const char *const growdirs[] = { "all", "random", "north", "west", "east", "south", NULL }; + const int growdirs2i[] = { W_ANY, -1, W_NORTH, W_WEST, W_EAST, W_SOUTH, 0 }; + + struct selectionvar *sel = l_selection_check(L, 1); + int dir = growdirs2i[luaL_checkoption(L, 2, "all", growdirs)]; + selection_do_grow(sel, dir); + lua_settop(L, 1); + return 1; +} + + +/* local s = selection.filter_mapchar(sel, mapchar, lit); */ +static int +l_selection_filter_mapchar(L) +lua_State *L; +{ + struct selectionvar *sel = l_selection_check(L, 1); + char *mapchr = dupstr(luaL_checkstring(L, 2)); + xchar typ = check_mapchr(mapchr); + int lit = (int) luaL_optinteger(L, 3, -2); /* TODO: special lit values */ + struct selectionvar *tmp = selection_filter_mapchar(sel, typ, lit); + + if (typ == INVALID_TYPE) + nhl_error(L, "Erroneous map char"); + + if (sel->map) + free(sel->map); + sel->map = tmp->map; + if (tmp) + free(tmp); + if (mapchr) + free(mapchr); + + lua_settop(L, 1); + return 1; +} + + +/* local s = selection.floodfill(sel, x, y); */ +/* local s = selection.floodfill(x,y); */ +static int +l_selection_flood(L) +lua_State *L; +{ + int argc = lua_gettop(L); + struct selectionvar *sel = (struct selectionvar *) 0; + /* REVIEW: initializer added */ + schar x, y; + + if (argc == 3) { + sel = l_selection_check(L, 1); + x = (schar) luaL_checkinteger(L, 2); + y = (schar) luaL_checkinteger(L, 3); + } else if (argc == 2) { + x = (schar) luaL_checkinteger(L, 1); + y = (schar) luaL_checkinteger(L, 2); + lua_pop(L, 2); + (void) l_selection_new(L); + sel = l_selection_check(L, 1); + } else { + nhl_error(L, "wrong parameters"); + } + + get_location_coord(&x, &y, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x,y)); + + if (isok(x,y)) { + set_floodfillchk_match_under(levl[x][y].typ); + selection_floodfill(sel, x, y, FALSE); + } + lua_settop(L, 1); + return 1; +} + + +/* local s = selection.circle(x,y, radius); */ +/* local s = selection.circle(x, y, radius, filled); */ +/* local s = selection.circle(sel, x, y, radius); */ +/* local s = selection.circle(sel, x, y, radius, filled); */ +static int +l_selection_circle(L) +lua_State *L; +{ + int argc = lua_gettop(L); + struct selectionvar *sel = (struct selectionvar *) 0; + /* REVIEW: initializer added */ + schar x, y; + int r, filled = 0; + + if (argc == 3) { + x = (schar) luaL_checkinteger(L, 1); + y = (schar) luaL_checkinteger(L, 2); + r = (int) luaL_checkinteger(L, 3); + lua_pop(L, 3); + (void) l_selection_new(L); + sel = l_selection_check(L, 1); + filled = 0; + } else if (argc == 4 && lua_type(L, 1) == LUA_TNUMBER) { + x = (schar) luaL_checkinteger(L, 1); + y = (schar) luaL_checkinteger(L, 2); + r = (int) luaL_checkinteger(L, 3); + filled = (int) luaL_checkinteger(L, 4); /* TODO: boolean*/ + lua_pop(L, 4); + (void) l_selection_new(L); + sel = l_selection_check(L, 1); + } else if (argc == 4 || argc == 5) { + sel = l_selection_check(L, 1); + x = (schar) luaL_checkinteger(L, 2); + y = (schar) luaL_checkinteger(L, 3); + r = (int) luaL_checkinteger(L, 4); + filled = (int) luaL_optinteger(L, 5, 0); /* TODO: boolean */ + } else { + nhl_error(L, "wrong parameters"); + } + + get_location_coord(&x, &y, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x,y)); + + selection_do_ellipse(sel, x,y, r,r, !filled); + + lua_settop(L, 1); + return 1; +} + +/* local s = selection.ellipse(x, y, radius1, radius2); */ +/* local s = selection.ellipse(x, y, radius1, radius2, filled); */ +/* local s = selection.ellipse(sel, x, y, radius1, radius2); */ +/* local s = selection.ellipse(sel, x, y, radius1, radius2, filled); */ +static int +l_selection_ellipse(L) +lua_State *L; +{ + int argc = lua_gettop(L); + struct selectionvar *sel = (struct selectionvar *) 0; + /* REVIEW: initializer added */ + schar x, y; + int r1, r2, filled = 0; + + if (argc == 4) { + x = (schar) luaL_checkinteger(L, 1); + y = (schar) luaL_checkinteger(L, 2); + r1 = (int) luaL_checkinteger(L, 3); + r2 = (int) luaL_checkinteger(L, 4); + lua_pop(L, 4); + (void) l_selection_new(L); + sel = l_selection_check(L, 1); + filled = 0; + } else if (argc == 5 && lua_type(L, 1) == LUA_TNUMBER) { + x = (schar) luaL_checkinteger(L, 1); + y = (schar) luaL_checkinteger(L, 2); + r1 = (int) luaL_checkinteger(L, 3); + r2 = (int) luaL_checkinteger(L, 4); + filled = (int) luaL_optinteger(L, 5, 0); /* TODO: boolean */ + lua_pop(L, 5); + (void) l_selection_new(L); + sel = l_selection_check(L, 1); + } else if (argc == 5 || argc == 6) { + sel = l_selection_check(L, 1); + x = (schar) luaL_checkinteger(L, 2); + y = (schar) luaL_checkinteger(L, 3); + r1 = (int) luaL_checkinteger(L, 4); + r2 = (int) luaL_checkinteger(L, 5); + filled = (int) luaL_optinteger(L, 6, 0); /* TODO: boolean */ + } else { + nhl_error(L, "wrong parameters"); + } + + get_location_coord(&x, &y, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x,y)); + + selection_do_ellipse(sel, x,y, r1,r2, !filled); + + lua_settop(L, 1); + return 1; +} + + +static const struct luaL_Reg l_selection_methods[] = { + { "new", l_selection_new }, + { "clone", l_selection_clone }, + { "get", l_selection_getpoint }, + { "set", l_selection_setpoint }, + { "negate", l_selection_not }, + { "percentage", l_selection_filter_percent }, + { "rndcoord", l_selection_rndcoord }, + { "line", l_selection_line }, + { "randline", l_selection_randline }, + { "rect", l_selection_rect }, + { "fillrect", l_selection_fillrect }, + { "area", l_selection_fillrect }, + { "grow", l_selection_grow }, + { "filter_mapchar", l_selection_filter_mapchar }, + { "floodfill", l_selection_flood }, + { "circle", l_selection_circle }, + { "ellipse", l_selection_ellipse }, + /* TODO: + { "gradient", l_selection_gradient }, + { "iterate", l_selection_iterate }, + */ + { NULL, NULL } +}; + +static const luaL_Reg l_selection_meta[] = { + { "__gc", l_selection_gc }, + { "__unm", l_selection_not }, + { "__band", l_selection_and }, + { "__bor", l_selection_or }, + { "__bxor", l_selection_xor }, + { "__bnot", l_selection_not }, + /* TODO: http://lua-users.org/wiki/MetatableEvents + { "__add", l_selection_add }, + { "__sub", l_selection_sub }, + { "__ipairs", l_selection_ipairs }, + */ + { NULL, NULL } +}; + +int +l_selection_register(L) +lua_State *L; +{ + int lib_id, meta_id; + + /* newclass = {} */ + lua_createtable(L, 0, 0); + lib_id = lua_gettop(L); + + /* metatable = {} */ + luaL_newmetatable(L, "selection"); + meta_id = lua_gettop(L); + luaL_setfuncs(L, l_selection_meta, 0); + + /* metatable.__index = _methods */ + luaL_newlib(L, l_selection_methods); + lua_setfield(L, meta_id, "__index"); + + /* metatable.__metatable = _meta */ + luaL_newlib(L, l_selection_meta); + lua_setfield(L, meta_id, "__metatable"); + + /* class.__metatable = metatable */ + lua_setmetatable(L, lib_id); + + /* _G["selection"] = newclass */ + lua_setglobal(L, "selection"); + + return 0; +} diff --git a/src/nhlua.c b/src/nhlua.c new file mode 100644 index 000000000..609b6ecf5 --- /dev/null +++ b/src/nhlua.c @@ -0,0 +1,883 @@ +/* NetHack 3.6 nhlua.c $NHDT-Date: 1524287226 2018/04/21 05:07:06 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.98 $ */ +/* Copyright (c) 2018 by Pasi Kallinen */ +/* NetHack may be freely redistributed. See license for details. */ + +#include "hack.h" +#include "dlb.h" + +/* +#- include +#- include +#- include +*/ + +/* */ + +/* lua_CFunction prototypes */ +STATIC_DCL int FDECL(nhl_test, (lua_State *)); +STATIC_DCL int FDECL(nhl_getmap, (lua_State *)); +STATIC_DCL int FDECL(nhl_setmap, (lua_State *)); +STATIC_DCL int FDECL(nhl_pline, (lua_State *)); +STATIC_DCL int FDECL(nhl_verbalize, (lua_State *)); +STATIC_DCL int FDECL(nhl_menu, (lua_State *)); +STATIC_DCL int FDECL(nhl_getlin, (lua_State *)); +STATIC_DCL int FDECL(nhl_makeplural, (lua_State *)); +STATIC_DCL int FDECL(nhl_makesingular, (lua_State *)); +STATIC_DCL int FDECL(nhl_s_suffix, (lua_State *)); +STATIC_DCL int FDECL(nhl_ing_suffix, (lua_State *)); +STATIC_DCL int FDECL(nhl_an, (lua_State *)); +STATIC_DCL int FDECL(nhl_meta_u_index, (lua_State *)); +STATIC_DCL int FDECL(nhl_meta_u_newindex, (lua_State *)); +STATIC_DCL int FDECL(traceback_handler, (lua_State *)); + +void +nhl_error(L, msg) +lua_State *L; +const char *msg; +{ + lua_Debug ar; + char buf[BUFSZ]; + lua_getstack(L, 1, &ar); + lua_getinfo(L, "lS", &ar); + Sprintf(buf, "%s (line %i%s)", msg, ar.currentline, ar.source); + lua_pushstring(L, buf); + lua_error(L); +} + +/* Check that parameters are nothing but single table, + or if no parameters given, put empty table there */ +void +lcheck_param_table(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc < 1) + lua_createtable(L, 0, 0); + + /* discard any extra arguments passed in */ + lua_settop(L, 1); + + luaL_checktype(L, 1, LUA_TTABLE); +} + +schar +get_table_mapchr(L, name) +lua_State *L; +const char *name; +{ + char *ter; + xchar typ; + + ter = get_table_str(L, name); + typ = check_mapchr(ter); + if (typ == INVALID_TYPE) + nhl_error(L, "Erroneous map char"); + if (ter) + free(ter); + return typ; +} + +schar +get_table_mapchr_opt(L, name, defval) +lua_State *L; +const char *name; +schar defval; +{ + char *ter; + xchar typ; + + ter = get_table_str_opt(L, name, ""); + if (name && *ter) { + typ = check_mapchr(ter); + if (typ == INVALID_TYPE) + nhl_error(L, "Erroneous map char"); + } else + typ = defval; + if (ter) + free(ter); + return typ; +} + +void +nhl_add_table_entry_int(L, name, value) +lua_State *L; +const char *name; +int value; +{ + lua_pushstring(L, name); + lua_pushinteger(L, value); + lua_rawset(L, -3); +} + +void +nhl_add_table_entry_str(L, name, value) +lua_State *L; +const char *name; +const char *value; +{ + lua_pushstring(L, name); + lua_pushstring(L, dupstr(value)); + lua_rawset(L, -3); +} +void +nhl_add_table_entry_bool(L, name, value) +lua_State *L; +const char *name; +boolean value; +{ + lua_pushstring(L, name); + lua_pushboolean(L, value); + lua_rawset(L, -3); +} + +/* converting from special level "map character" to levl location type + and back. order here is important. */ +const struct { + char ch; + schar typ; +} char2typ[] = { + { ' ', STONE }, + { '#', CORR }, + { '.', ROOM }, + { '-', HWALL }, + { '-', TLCORNER }, + { '-', TRCORNER }, + { '-', BLCORNER }, + { '-', BRCORNER }, + { '-', CROSSWALL }, + { '-', TUWALL }, + { '-', TDWALL }, + { '-', TLWALL }, + { '-', TRWALL }, + { '-', DBWALL }, + { '|', VWALL }, + { '+', DOOR }, + { 'A', AIR }, + { 'C', CLOUD }, + { 'S', SDOOR }, + { 'H', SCORR }, + { '{', FOUNTAIN }, + { '\\', THRONE }, + { 'K', SINK }, + { '}', MOAT }, + { 'P', POOL }, + { 'L', LAVAPOOL }, + { 'I', ICE }, + { 'W', WATER }, + { 'T', TREE }, + { 'F', IRONBARS }, /* Fe = iron */ + { 'x', MAX_TYPE }, /* "see-through" */ + { 'B', CROSSWALL }, /* hack: boundary location */ + { '\0', STONE }, +}; + +schar +splev_chr2typ(c) +char c; +{ + int i; + + for (i = 0; char2typ[i].ch; i++) + if (c == char2typ[i].ch) + return char2typ[i].typ; + return (INVALID_TYPE); +} + +schar +check_mapchr(s) +const char *s; +{ + if (s && strlen(s) == 1) + return splev_chr2typ(s[0]); + return INVALID_TYPE; +} + +char +splev_typ2chr(typ) +schar typ; +{ + int i; + + for (i = 0; char2typ[i].typ < MAX_TYPE; i++) + if (typ == char2typ[i].typ) + return char2typ[i].ch; + return 'x'; +} + +/* local loc = getmap(x,y) */ +static int +nhl_getmap(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 2) { + int x = (int) lua_tonumber(L, 1); + int y = (int) lua_tonumber(L, 2); + + if (x >= 0 && x < COLNO && y >= 0 && y < ROWNO) { + char buf[BUFSZ]; + lua_newtable(L); + + /* FIXME: some should be boolean values */ + nhl_add_table_entry_int(L, "glyph", levl[x][y].glyph); + nhl_add_table_entry_int(L, "typ", levl[x][y].typ); + Sprintf(buf, "%c", splev_typ2chr(levl[x][y].typ)); + nhl_add_table_entry_str(L, "mapchr", buf); + nhl_add_table_entry_int(L, "seenv", levl[x][y].seenv); + nhl_add_table_entry_bool(L, "horizontal", levl[x][y].horizontal); + nhl_add_table_entry_bool(L, "lit", levl[x][y].lit); + nhl_add_table_entry_bool(L, "waslit", levl[x][y].waslit); + nhl_add_table_entry_int(L, "roomno", levl[x][y].roomno); + nhl_add_table_entry_bool(L, "edge", levl[x][y].edge); + nhl_add_table_entry_bool(L, "candig", levl[x][y].candig); + + /* TODO: FIXME: levl[x][y].flags */ + + lua_pushliteral(L, "flags"); + lua_newtable(L); + + if (IS_DOOR(levl[x][y].typ)) { + nhl_add_table_entry_bool(L, "nodoor", (levl[x][y].flags & D_NODOOR)); + nhl_add_table_entry_bool(L, "broken", (levl[x][y].flags & D_BROKEN)); + nhl_add_table_entry_bool(L, "isopen", (levl[x][y].flags & D_ISOPEN)); + nhl_add_table_entry_bool(L, "closed", (levl[x][y].flags & D_CLOSED)); + nhl_add_table_entry_bool(L, "locked", (levl[x][y].flags & D_LOCKED)); + nhl_add_table_entry_bool(L, "trapped", (levl[x][y].flags & D_TRAPPED)); + } else if (IS_ALTAR(levl[x][y].typ)) { + /* TODO: bits 0, 1, 2 */ + nhl_add_table_entry_bool(L, "shrine", (levl[x][y].flags & AM_SHRINE)); + } else if (IS_THRONE(levl[x][y].typ)) { + nhl_add_table_entry_bool(L, "looted", (levl[x][y].flags & T_LOOTED)); + } else if (levl[x][y].typ == TREE) { + nhl_add_table_entry_bool(L, "looted", (levl[x][y].flags & TREE_LOOTED)); + nhl_add_table_entry_bool(L, "swarm", (levl[x][y].flags & TREE_SWARM)); + } else if (IS_FOUNTAIN(levl[x][y].typ)) { + nhl_add_table_entry_bool(L, "looted", (levl[x][y].flags & F_LOOTED)); + nhl_add_table_entry_bool(L, "warned", (levl[x][y].flags & F_WARNED)); + } else if (IS_SINK(levl[x][y].typ)) { + nhl_add_table_entry_bool(L, "pudding", (levl[x][y].flags & S_LPUDDING)); + nhl_add_table_entry_bool(L, "dishwasher", (levl[x][y].flags & S_LDWASHER)); + nhl_add_table_entry_bool(L, "ring", (levl[x][y].flags & S_LRING)); + } + /* TODO: drawbridges, walls, ladders, room=>ICED_xxx */ + + lua_settable(L, -3); + + return 1; + } else { + /* TODO: return zerorm instead? */ + nhl_error(L, "Coordinates out of range"); + return 0; + } + } else { + nhl_error(L, "Incorrect arguments"); + return 0; + } + return 1; +} + +/* pline("It hits!") */ +static int +nhl_pline(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 1) + pline("%s", luaL_checkstring(L, 1)); + else + nhl_error(L, "Wrong args"); + + return 0; +} + +/* verbalize("Fool!") */ +static int +nhl_verbalize(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 1) + verbalize("%s", luaL_checkstring(L, 1)); + else + nhl_error(L, "Wrong args"); + + return 0; +} + +/* + str = getlin("What do you want to call this dungeon level?"); + */ +static int +nhl_getlin(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 1) { + const char *prompt = luaL_checkstring(L, 1); + char buf[BUFSZ]; + + getlin(prompt, buf); + lua_pushstring(L, buf); + return 1; + } + + nhl_error(L, "Wrong args"); + return 0; +} + +/* + selected = menu("prompt", default, pickX, { "a" = "option a", "b" = "option b", ...}) + pickX = 0,1,2, or "none", "one", "any" (PICK_X in code) + + selected = menu("prompt", default, pickX, + { {key:"a", text:"option a"}, {key:"b", text:"option b"}, ... } ) */ +static int +nhl_menu(L) +lua_State *L; +{ + int argc = lua_gettop(L); + const char *prompt; + const char *defval = ""; + const char *const pickX[] = {"none", "one", "any"}; /* PICK_NONE, PICK_ONE, PICK_ANY */ + int pick = PICK_ONE, pick_cnt; + winid tmpwin; + anything any; + menu_item *picks = (menu_item *) 0; + + if (argc < 2 || argc > 4) { + nhl_error(L, "Wrong args"); + return 0; + } + + prompt = luaL_checkstring(L, 1); + if (lua_isstring(L, 2)) + defval = luaL_checkstring(L, 2); + if (lua_isstring(L, 3)) + pick = luaL_checkoption(L, 3, "one", pickX); + luaL_checktype(L, argc, LUA_TTABLE); + + tmpwin = create_nhwindow(NHW_MENU); + start_menu(tmpwin); + + lua_pushnil(L); /* first key */ + while (lua_next(L, argc) != 0) { + const char *str = ""; + const char *key = ""; + + /* key @ index -2, value @ index -1 */ + if (lua_istable(L, -1)) { + lua_pushliteral(L, "key"); + lua_gettable(L, -2); + key = lua_tostring(L, -1); + lua_pop(L, 1); + + lua_pushliteral(L, "text"); + lua_gettable(L, -2); + str = lua_tostring(L, -1); + lua_pop(L, 1); + + /* TODO: glyph, attr, accel, group accel (all optional) */ + } else if (lua_isstring(L, -1)) { + str = luaL_checkstring(L, -1); + key = luaL_checkstring(L, -2); + } + + any = cg.zeroany; + if (*key) + any.a_char = key[0]; + add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, str, + (*defval && *key && defval[0] == key[0]) ? MENU_SELECTED : MENU_UNSELECTED); + + lua_pop(L, 1); /* removes 'value'; keeps 'key' for next iteration */ + } + + end_menu(tmpwin, prompt); + pick_cnt = select_menu(tmpwin, pick, &picks); + destroy_nhwindow(tmpwin); + + if (pick_cnt > 0) { + char buf[2]; + buf[0] = picks[0].item.a_char; + + if (pick == PICK_ONE && pick_cnt > 1 && *defval && defval[0] == picks[0].item.a_char) + buf[0] = picks[1].item.a_char; + + buf[1] = '\0'; + lua_pushstring(L, buf); + /* TODO: pick any */ + } else { + char buf[2]; + buf[0] = defval[0]; + buf[1] = '\0'; + lua_pushstring(L, buf); + } + + return 1; +} + +/* makeplural("zorkmid") */ +static int +nhl_makeplural(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 1) + lua_pushstring(L, makeplural(luaL_checkstring(L, 1))); + else + nhl_error(L, "Wrong args"); + + return 1; +} + +/* makesingular("zorkmids") */ +static int +nhl_makesingular(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 1) + lua_pushstring(L, makesingular(luaL_checkstring(L, 1))); + else + nhl_error(L, "Wrong args"); + + return 1; +} + +/* s_suffix("foo") */ +static int +nhl_s_suffix(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 1) + lua_pushstring(L, s_suffix(luaL_checkstring(L, 1))); + else + nhl_error(L, "Wrong args"); + + return 1; +} + +/* ing_suffix("foo") */ +static int +nhl_ing_suffix(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 1) + lua_pushstring(L, ing_suffix(luaL_checkstring(L, 1))); + else + nhl_error(L, "Wrong args"); + + return 1; +} + +/* an("foo") */ +static int +nhl_an(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 1) + lua_pushstring(L, an(luaL_checkstring(L, 1))); + else + nhl_error(L, "Wrong args"); + + return 1; +} + +/* get mandatory integer value from table */ +int +get_table_int(L, name) +lua_State *L; +const char *name; +{ + int ret; + + lua_getfield(L, 1, name); + ret = (int) luaL_checkinteger(L, -1); + lua_pop(L, 1); + return ret; +} + +/* get optional integer value from table */ +int +get_table_int_opt(L, name, defval) +lua_State *L; +const char *name; +int defval; +{ + int ret = defval; + + lua_getfield(L, 1, name); + if (!lua_isnil(L, -1)) { + ret = (int) luaL_checkinteger(L, -1); + } + lua_pop(L, 1); + return ret; +} + +char * +get_table_str(L, name) +lua_State *L; +const char *name; +{ + char *ret; + + lua_getfield(L, 1, name); + ret = dupstr(luaL_checkstring(L, -1)); + lua_pop(L, 1); + return ret; +} + +/* get optional string value from table. + return value must be freed by caller. */ +char * +get_table_str_opt(L, name, defval) +lua_State *L; +const char *name; +char *defval; +{ + const char *ret; + + lua_getfield(L, 1, name); + ret = luaL_optstring(L, -1, defval); + lua_pop(L, 1); + return ret ? dupstr(ret) : NULL; +} + +int +get_table_boolean(L, name) +lua_State *L; +const char *name; +{ + int ltyp; + int ret = -1; + + lua_getfield(L, 1, name); + ltyp = lua_type(L, -1); + if (ltyp == LUA_TSTRING) { + const char *const boolstr[] = { "true", "false", "yes", "no", NULL }; + const int boolstr2i[] = { TRUE, FALSE, TRUE, FALSE, -1 }; + ret = luaL_checkoption(L, -1, NULL, boolstr); + } else if (ltyp == LUA_TBOOLEAN) { + ret = lua_toboolean(L, -1); + } else if (ltyp == LUA_TNUMBER) { + ret = (int) luaL_checkinteger(L, -1); + if ( ret < 0 || ret > 1) + ret = -1; + } + lua_pop(L, 1); + if (ret == -1) + nhl_error(L, "Expected a boolean"); + return ret; +} + +int +get_table_boolean_opt(L, name, defval) +lua_State *L; +const char *name; +int defval; +{ + int ret = defval; + + lua_getfield(L, 1, name); + if (lua_type(L, -1) != LUA_TNIL) { + lua_pop(L, 1); + return get_table_boolean(L, name); + } + lua_pop(L, 1); + return ret; +} + +int +get_table_option(L, name, defval, opts) +lua_State *L; +const char *name; +const char *defval; +const char *const opts[]; /* NULL-terminated list */ +{ + int ret; + + lua_getfield(L, 1, name); + ret = luaL_checkoption(L, -1, defval, opts); + lua_pop(L, 1); + return ret; +} + +/* + test( { x = 123, y = 456 } ); +*/ +static int +nhl_test(L) +lua_State *L; +{ + /* discard any extra arguments passed in */ + lua_settop(L, 1); + + luaL_checktype(L, 1, LUA_TTABLE); + + int x = get_table_int(L, "x"); + int y = get_table_int(L, "y"); + char *name = get_table_str_opt(L, "name", "Player"); + + pline("TEST:{ x=%i, y=%i, name=\"%s\" }", x,y, name); + + free(name); + + return 1; +} + +static const struct luaL_Reg nhl_functions[] = { + {"test", nhl_test}, + + {"getmap", nhl_getmap}, + /*{"setmap", nhl_setmap},*/ + + {"pline", nhl_pline}, + {"verbalize", nhl_verbalize}, + {"menu", nhl_menu}, + {"getlin", nhl_getlin}, + + {"makeplural", nhl_makeplural}, + {"makesingular", nhl_makesingular}, + {"s_suffix", nhl_s_suffix}, + {"ing_suffix", nhl_ing_suffix}, + {"an", nhl_an}, + {NULL, NULL} +}; + +static const struct { + const char *name; + long value; +} nhl_consts[] = { + { "COLNO", COLNO }, + { "ROWNO", ROWNO }, + { NULL, 0 }, +}; + +/* register and init the constants table */ +void +init_nhc_data(L) +lua_State *L; +{ + int i; + + lua_newtable(L); + + for (i = 0; nhl_consts[i].name; i++) { + lua_pushstring(L, nhl_consts[i].name); + lua_pushinteger(L, nhl_consts[i].value); + lua_rawset(L, -3); + } + + lua_setglobal(L, "nhc"); +} + +int +nhl_push_anything(L, anytype, src) +lua_State *L; +int anytype; +void *src; +{ + anything any = cg.zeroany; + switch (anytype) { + case ANY_INT: any.a_int = *(int *)src; lua_pushinteger(L, any.a_int); break; + case ANY_UCHAR: any.a_uchar = *(uchar *)src; lua_pushinteger(L, any.a_uchar); break; + case ANY_SCHAR: any.a_schar = *(schar *)src; lua_pushinteger(L, any.a_schar); break; + } + return 1; +} + +static int +nhl_meta_u_index(L) +lua_State *L; +{ + const char *tkey = luaL_checkstring(L, 2); + const struct { + const char *name; + void *ptr; + int type; + } ustruct[] = { + { "ux", &(u.ux), ANY_UCHAR }, + { "uy", &(u.uy), ANY_UCHAR }, + { "dx", &(u.dx), ANY_SCHAR }, + { "dy", &(u.dy), ANY_SCHAR }, + { "dz", &(u.dz), ANY_SCHAR }, + { "tx", &(u.tx), ANY_UCHAR }, + { "ty", &(u.ty), ANY_UCHAR }, + { "ulevel", &(u.ulevel), ANY_INT }, + { "ulevelmax", &(u.ulevelmax), ANY_INT }, + { "uhunger", &(u.uhunger), ANY_INT }, + { "nv_range", &(u.nv_range), ANY_INT }, + { "xray_range", &(u.xray_range), ANY_INT }, + { "umonster", &(u.umonster), ANY_INT }, + { "umonnum", &(u.umonnum), ANY_INT }, + { "mh", &(u.mh), ANY_INT }, + { "mhmax", &(u.mhmax), ANY_INT }, + { "mtimedone", &(u.mtimedone), ANY_INT }, + }; + int i; + + /* FIXME: doesn't really work, eg. negative values for u.dx */ + for (i = 0; i < SIZE(ustruct); i++) + if (!strcmp(tkey, ustruct[i].name)) { + return nhl_push_anything(L, ustruct[i].type, ustruct[i].ptr); + } + + nhl_error(L, "Unknown u table index"); + return 0; +} + +static int +nhl_meta_u_newindex(L) +lua_State *L; +{ + nhl_error(L, "Cannot set u table values"); + return 0; +} + +void +init_u_data(L) +lua_State *L; +{ + lua_newtable(L); + lua_newtable(L); + lua_pushcfunction(L, nhl_meta_u_index); + lua_setfield(L, -2, "__index"); + lua_pushcfunction(L, nhl_meta_u_newindex); + lua_setfield(L, -2, "__newindex"); + lua_setmetatable(L, -2); + lua_setglobal(L, "u"); +} + +int +nhl_set_package_path(L, path) +lua_State *L; +const char *path; +{ + lua_getglobal(L, "package"); + lua_pushstring(L, path); + lua_setfield(L, -2, "path"); + lua_pop(L, 1); + return 0; +} + +static int +traceback_handler(L) +lua_State *L; +{ + luaL_traceback(L, L, lua_tostring(L, 1), 0); + return 1; +} + +boolean +nhl_loadlua(L, fname) +lua_State *L; +const char *fname; +{ + boolean ret = TRUE; + dlb *fh; + char *buf = (char *) 0; + long buflen; + int c, llret; + long bufidx = 0; + + fh = dlb_fopen(fname, "r"); + if (!fh) { + impossible("nhl_loadlua: Error loading %s", fname); + ret = FALSE; + goto give_up; + } + + dlb_fseek(fh, 0L, SEEK_END); + buflen = dlb_ftell(fh); + buf = (char *) alloc(sizeof(char) * (buflen + 1)); + if (!buf) { + impossible("alloc: Error allocating %i bytes for loading lua file %s", buflen, fname); + ret = FALSE; + goto give_up; + } + dlb_fseek(fh, 0L, SEEK_SET); + + do { + c = dlb_fgetc(fh); + if (c == EOF) + break; + buf[bufidx++] = (char) c; + } while (bufidx < buflen); + buf[bufidx] = '\0'; + (void) dlb_fclose(fh); + + llret = luaL_loadstring(L, buf); + if (llret != LUA_OK) { + impossible("luaL_loadstring: Error loading %s (errcode %i)", fname, llret); + ret = FALSE; + goto give_up; + } else { + lua_pushcfunction(L, traceback_handler); + lua_insert(L, 1); + if (lua_pcall(L, 0, LUA_MULTRET, -2)) { + impossible("Lua error: %s", lua_tostring(L, -1)); + ret = FALSE; + goto give_up; + } + } + +give_up: + if (buf) { + free(buf); + buf = (char *) 0; + buflen = 0; + } + return ret; +} + +boolean +load_lua(name) +const char *name; +{ + boolean ret = TRUE; + lua_State *L = luaL_newstate(); + luaL_openlibs(L); + + nhl_set_package_path(L, "./?.lua"); + + /* register nh -table, and functions for it */ + lua_newtable(L); + luaL_setfuncs(L, nhl_functions, 0); + lua_setglobal(L, "nh"); + + /* init nhc -table */ + init_nhc_data(L); + + /* init u -table */ + init_u_data(L); + + l_selection_register(L); + l_register_des(L); + + if (!nhl_loadlua(L, "nhlib.lua")) { + ret = FALSE; + goto give_up; + } + + if (!nhl_loadlua(L, name)) { + ret = FALSE; + goto give_up; + } + +give_up: + lua_close(L); + + return ret; +} diff --git a/src/save.c b/src/save.c index c62fc51c8..c60eb4d51 100644 --- a/src/save.c +++ b/src/save.c @@ -662,10 +662,14 @@ xchar lev; saveobjchn(nhfp, g.billobjs); if (release_data(nhfp)) { int x,y; - + /* TODO: maybe use clear_level_structures() */ for (y = 0; y < ROWNO; y++) - for (x = 0; x < COLNO; x++) + for (x = 0; x < COLNO; x++) { g.level.monsters[x][y] = 0; + g.level.objects[x][y] = 0; + levl[x][y].seenv = 0; + levl[x][y].glyph = cmap_to_glyph(S_stone); + } fmon = 0; g.ftrap = 0; fobj = 0; diff --git a/src/sp_lev.c b/src/sp_lev.c index cce71f3cb..331f9965d 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -9,8 +9,9 @@ * It contains also the special level loader. */ +#define IN_SP_LEV_C + #include "hack.h" -#include "dlb.h" #include "sp_lev.h" #ifdef _MSC_VER @@ -22,34 +23,12 @@ typedef void FDECL((*select_iter_func), (int, int, genericptr)); extern void FDECL(mkmap, (lev_init *)); +STATIC_DCL void NDECL(create_des_coder); STATIC_DCL void NDECL(solidify_map); -STATIC_DCL void FDECL(splev_stack_init, (struct splevstack *)); -STATIC_DCL void FDECL(splev_stack_done, (struct splevstack *)); -STATIC_DCL void FDECL(splev_stack_push, (struct splevstack *, - struct opvar *)); -STATIC_DCL struct opvar *FDECL(splev_stack_pop, (struct splevstack *)); -STATIC_DCL struct splevstack *FDECL(splev_stack_reverse, - (struct splevstack *)); -STATIC_DCL struct opvar *FDECL(opvar_new_str, (char *)); -STATIC_DCL struct opvar *FDECL(opvar_new_int, (long)); -STATIC_DCL struct opvar *FDECL(opvar_new_coord, (int, int)); -#if 0 -STATIC_DCL struct opvar * FDECL(opvar_new_region, (int,int, int,int)); -#endif /*0*/ -STATIC_DCL struct opvar *FDECL(opvar_clone, (struct opvar *)); -STATIC_DCL struct opvar *FDECL(opvar_var_conversion, (struct sp_coder *, - struct opvar *)); -STATIC_DCL struct splev_var *FDECL(opvar_var_defined, (struct sp_coder *, - char *)); -STATIC_DCL struct opvar *FDECL(splev_stack_getdat, (struct sp_coder *, - XCHAR_P)); -STATIC_DCL struct opvar *FDECL(splev_stack_getdat_any, (struct sp_coder *)); -STATIC_DCL void FDECL(variable_list_del, (struct splev_var *)); STATIC_DCL void FDECL(lvlfill_maze_grid, (int, int, int, int, SCHAR_P)); STATIC_DCL void FDECL(lvlfill_solid, (SCHAR_P, SCHAR_P)); STATIC_DCL void FDECL(set_wall_property, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, int)); -STATIC_DCL void NDECL(shuffle_alignments); STATIC_DCL void NDECL(count_features); STATIC_DCL void NDECL(remove_boundary_syms); STATIC_DCL void FDECL(set_door_orientation, (int, int)); @@ -61,8 +40,6 @@ STATIC_DCL int NDECL(rndtrap); STATIC_DCL void FDECL(get_location, (schar *, schar *, int, struct mkroom *)); STATIC_DCL boolean FDECL(is_ok_location, (SCHAR_P, SCHAR_P, int)); STATIC_DCL unpacked_coord FDECL(get_unpacked_coord, (long, int)); -STATIC_DCL void FDECL(get_location_coord, (schar *, schar *, int, - struct mkroom *, long)); STATIC_DCL void FDECL(get_room_loc, (schar *, schar *, struct mkroom *)); STATIC_DCL void FDECL(get_free_room_loc, (schar *, schar *, struct mkroom *, packed_coord)); @@ -86,69 +63,21 @@ STATIC_DCL void FDECL(light_region, (region *)); STATIC_DCL void FDECL(wallify_map, (int, int, int, int)); STATIC_DCL void FDECL(maze1xy, (coord *, int)); STATIC_DCL void NDECL(fill_empty_maze); -STATIC_DCL boolean FDECL(sp_level_loader, (dlb *, sp_lev *)); -STATIC_DCL boolean FDECL(sp_level_free, (sp_lev *)); STATIC_DCL void FDECL(splev_initlev, (lev_init *)); -STATIC_DCL struct sp_frame *FDECL(frame_new, (long)); -STATIC_DCL void FDECL(frame_del, (struct sp_frame *)); -STATIC_DCL void FDECL(spo_frame_push, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_frame_pop, (struct sp_coder *)); STATIC_DCL long FDECL(sp_code_jmpaddr, (long, long)); -STATIC_DCL void FDECL(spo_call, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_return, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_end_moninvent, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_pop_container, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_message, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_monster, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_object, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_level_flags, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_initlevel, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_engraving, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_mineralize, (struct sp_coder *)); +STATIC_DCL void NDECL(spo_end_moninvent); +STATIC_DCL void NDECL(spo_pop_container); STATIC_DCL void FDECL(spo_room, (struct sp_coder *)); STATIC_DCL void FDECL(spo_endroom, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_stair, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_ladder, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_grave, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_altar, (struct sp_coder *)); STATIC_DCL void FDECL(spo_trap, (struct sp_coder *)); STATIC_DCL void FDECL(spo_gold, (struct sp_coder *)); STATIC_DCL void FDECL(spo_corridor, (struct sp_coder *)); -STATIC_DCL void FDECL(selection_setpoint, (int, int, struct opvar *, XCHAR_P)); -STATIC_DCL struct opvar *FDECL(selection_not, (struct opvar *)); -STATIC_DCL struct opvar *FDECL(selection_logical_oper, (struct opvar *, - struct opvar *, CHAR_P)); -STATIC_DCL struct opvar *FDECL(selection_filter_mapchar, (struct opvar *, - struct opvar *)); -STATIC_DCL void FDECL(selection_filter_percent, (struct opvar *, int)); -STATIC_DCL int FDECL(selection_rndcoord, (struct opvar *, schar *, schar *, - BOOLEAN_P)); -STATIC_DCL void FDECL(selection_do_grow, (struct opvar *, int)); -STATIC_DCL int FDECL(floodfillchk_match_under, (int, int)); -STATIC_DCL int FDECL(floodfillchk_match_accessible, (int, int)); -STATIC_DCL boolean FDECL(sel_flood_havepoint, (int, int, - xchar *, xchar *, int)); -STATIC_DCL void FDECL(selection_do_ellipse, (struct opvar *, int, int, - int, int, int)); -STATIC_DCL long FDECL(line_dist_coord, (long, long, long, long, long, long)); -STATIC_DCL void FDECL(selection_do_gradient, (struct opvar *, long, long, long, - long, long, long, long, long)); -STATIC_DCL void FDECL(selection_do_line, (SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P, - struct opvar *)); -STATIC_DCL void FDECL(selection_do_randline, (SCHAR_P, SCHAR_P, SCHAR_P, - SCHAR_P, SCHAR_P, SCHAR_P, - struct opvar *)); -STATIC_DCL void FDECL(selection_iterate, (struct opvar *, select_iter_func, - genericptr_t)); STATIC_DCL void FDECL(sel_set_ter, (int, int, genericptr_t)); STATIC_DCL void FDECL(sel_set_feature, (int, int, genericptr_t)); STATIC_DCL void FDECL(sel_set_door, (int, int, genericptr_t)); -STATIC_DCL void FDECL(spo_door, (struct sp_coder *)); STATIC_DCL void FDECL(spo_feature, (struct sp_coder *)); STATIC_DCL void FDECL(spo_terrain, (struct sp_coder *)); STATIC_DCL void FDECL(spo_replace_terrain, (struct sp_coder *)); -STATIC_DCL boolean FDECL(generate_way_out_method, (int, int, struct opvar *)); -STATIC_DCL void NDECL(ensure_way_out); STATIC_DCL void FDECL(spo_levregion, (struct sp_coder *)); STATIC_DCL void FDECL(spo_region, (struct sp_coder *)); STATIC_DCL void FDECL(spo_drawbridge, (struct sp_coder *)); @@ -157,15 +86,43 @@ STATIC_DCL void FDECL(spo_wall_property, (struct sp_coder *)); STATIC_DCL void FDECL(spo_room_door, (struct sp_coder *)); STATIC_DCL void FDECL(sel_set_wallify, (int, int, genericptr_t)); STATIC_DCL void FDECL(spo_wallify, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_map, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_jmp, (struct sp_coder *, sp_lev *)); -STATIC_DCL void FDECL(spo_conditional_jump, (struct sp_coder *, sp_lev *)); -STATIC_DCL void FDECL(spo_var_init, (struct sp_coder *)); -#if 0 -STATIC_DCL long FDECL(opvar_array_length, (struct sp_coder *)); -#endif /*0*/ -STATIC_DCL void FDECL(spo_shuffle_array, (struct sp_coder *)); -STATIC_DCL boolean FDECL(sp_level_coder, (sp_lev *)); +STATIC_DCL int FDECL(get_coord, (lua_State *, int, int *, int *)); +STATIC_DCL int FDECL(get_table_region, (lua_State *, const char *, int *, int *, int *, int *, BOOLEAN_P)); + +/* lua_CFunction prototypes */ +int FDECL(lspo_altar, (lua_State *)); +int FDECL(lspo_branch, (lua_State *)); +int FDECL(lspo_corridor, (lua_State *)); +int FDECL(lspo_door, (lua_State *)); +int FDECL(lspo_drawbridge, (lua_State *)); +int FDECL(lspo_engraving, (lua_State *)); +int FDECL(lspo_feature, (lua_State *)); +int FDECL(lspo_gold, (lua_State *)); +int FDECL(lspo_grave, (lua_State *)); +int FDECL(lspo_ladder, (lua_State *)); +int FDECL(lspo_level_flags, (lua_State *)); +int FDECL(lspo_level_init, (lua_State *)); +int FDECL(lspo_levregion, (lua_State *)); +int FDECL(lspo_map, (lua_State *)); +int FDECL(lspo_mazewalk, (lua_State *)); +int FDECL(lspo_message, (lua_State *)); +int FDECL(lspo_mineralize, (lua_State *)); +int FDECL(lspo_monster, (lua_State *)); +int FDECL(lspo_non_diggable, (lua_State *)); +int FDECL(lspo_non_passwall, (lua_State *)); +int FDECL(lspo_object, (lua_State *)); +int FDECL(lspo_portal, (lua_State *)); +int FDECL(lspo_random_corridors, (lua_State *)); +int FDECL(lspo_region, (lua_State *)); +int FDECL(lspo_replace_terrain, (lua_State *)); +int FDECL(lspo_reset_level, (lua_State *)); +int FDECL(lspo_room, (lua_State *)); +int FDECL(lspo_stair, (lua_State *)); +int FDECL(lspo_teleport_region, (lua_State *)); +int FDECL(lspo_terrain, (lua_State *)); +int FDECL(lspo_trap, (lua_State *)); +int FDECL(lspo_wall_property, (lua_State *)); +int FDECL(lspo_wallify, (lua_State *)); #define LEFT 1 #define H_LEFT 2 @@ -181,17 +138,13 @@ STATIC_DCL boolean FDECL(sp_level_coder, (sp_lev *)); #define XLIM 4 #define YLIM 3 -#define Fread (void) dlb_fread -#define Fgetc (schar) dlb_fgetc #define New(type) (type *) alloc(sizeof(type)) #define NewTab(type, size) (type **) alloc(sizeof(type *) * (unsigned) size) #define Free(ptr) if (ptr) free((genericptr_t) (ptr)) extern struct engr *head_engr; -#define SPLEV_STACK_RESERVE 128 - -void +STATIC_OVL void solidify_map() { xchar x, y; @@ -202,382 +155,7 @@ solidify_map() levl[x][y].wall_info |= (W_NONDIGGABLE | W_NONPASSWALL); } -void -splev_stack_init(st) -struct splevstack *st; -{ - if (st) { - st->depth = 0; - st->depth_alloc = SPLEV_STACK_RESERVE; - st->stackdata = - (struct opvar **) alloc(st->depth_alloc * sizeof (struct opvar *)); - } -} - -void -splev_stack_done(st) -struct splevstack *st; -{ - if (st) { - int i; - - if (st->stackdata && st->depth) { - for (i = 0; i < st->depth; i++) { - switch (st->stackdata[i]->spovartyp) { - default: - case SPOVAR_NULL: - case SPOVAR_COORD: - case SPOVAR_REGION: - case SPOVAR_MAPCHAR: - case SPOVAR_MONST: - case SPOVAR_OBJ: - case SPOVAR_INT: - break; - case SPOVAR_VARIABLE: - case SPOVAR_STRING: - case SPOVAR_SEL: - Free(st->stackdata[i]->vardata.str); - st->stackdata[i]->vardata.str = NULL; - break; - } - Free(st->stackdata[i]); - st->stackdata[i] = NULL; - } - } - Free(st->stackdata); - st->stackdata = NULL; - st->depth = st->depth_alloc = 0; - Free(st); - } -} - -void -splev_stack_push(st, v) -struct splevstack *st; -struct opvar *v; -{ - if (!st || !v) - return; - if (!st->stackdata) - panic("splev_stack_push: no stackdata allocated?"); - - if (st->depth >= st->depth_alloc) { - struct opvar **tmp = (struct opvar **) alloc( - (st->depth_alloc + SPLEV_STACK_RESERVE) * sizeof (struct opvar *)); - - (void) memcpy(tmp, st->stackdata, - st->depth_alloc * sizeof(struct opvar *)); - Free(st->stackdata); - st->stackdata = tmp; - st->depth_alloc += SPLEV_STACK_RESERVE; - } - - st->stackdata[st->depth] = v; - st->depth++; -} - -struct opvar * -splev_stack_pop(st) -struct splevstack *st; -{ - struct opvar *ret = NULL; - - if (!st) - return ret; - if (!st->stackdata) - panic("splev_stack_pop: no stackdata allocated?"); - - if (st->depth) { - st->depth--; - ret = st->stackdata[st->depth]; - st->stackdata[st->depth] = NULL; - return ret; - } else - impossible("splev_stack_pop: empty stack?"); - return ret; -} - -struct splevstack * -splev_stack_reverse(st) -struct splevstack *st; -{ - long i; - struct opvar *tmp; - - if (!st) - return NULL; - if (!st->stackdata) - panic("splev_stack_reverse: no stackdata allocated?"); - for (i = 0; i < (st->depth / 2); i++) { - tmp = st->stackdata[i]; - st->stackdata[i] = st->stackdata[st->depth - i - 1]; - st->stackdata[st->depth - i - 1] = tmp; - } - return st; -} - -#define OV_typ(o) (o->spovartyp) -#define OV_i(o) (o->vardata.l) -#define OV_s(o) (o->vardata.str) - -#define OV_pop_i(x) (x = splev_stack_getdat(coder, SPOVAR_INT)) -#define OV_pop_c(x) (x = splev_stack_getdat(coder, SPOVAR_COORD)) -#define OV_pop_r(x) (x = splev_stack_getdat(coder, SPOVAR_REGION)) -#define OV_pop_s(x) (x = splev_stack_getdat(coder, SPOVAR_STRING)) -#define OV_pop(x) (x = splev_stack_getdat_any(coder)) -#define OV_pop_typ(x, typ) (x = splev_stack_getdat(coder, typ)) - -struct opvar * -opvar_new_str(s) -char *s; -{ - struct opvar *tmpov = (struct opvar *) alloc(sizeof (struct opvar)); - - tmpov->spovartyp = SPOVAR_STRING; - if (s) { - int len = strlen(s); - tmpov->vardata.str = (char *) alloc(len + 1); - (void) memcpy((genericptr_t) tmpov->vardata.str, (genericptr_t) s, - len); - tmpov->vardata.str[len] = '\0'; - } else - tmpov->vardata.str = NULL; - return tmpov; -} - -struct opvar * -opvar_new_int(i) -long i; -{ - struct opvar *tmpov = (struct opvar *) alloc(sizeof (struct opvar)); - - tmpov->spovartyp = SPOVAR_INT; - tmpov->vardata.l = i; - return tmpov; -} - -struct opvar * -opvar_new_coord(x, y) -int x, y; -{ - struct opvar *tmpov = (struct opvar *) alloc(sizeof (struct opvar)); - - tmpov->spovartyp = SPOVAR_COORD; - tmpov->vardata.l = SP_COORD_PACK(x, y); - return tmpov; -} - -#if 0 -struct opvar * -opvar_new_region(x1,y1,x2,y2) - int x1,y1,x2,y2; -{ - struct opvar *tmpov = (struct opvar *) alloc(sizeof (struct opvar)); - - tmpov->spovartyp = SPOVAR_REGION; - tmpov->vardata.l = SP_REGION_PACK(x1,y1,x2,y2); - return tmpov; -} -#endif /*0*/ - -void -opvar_free_x(ov) -struct opvar *ov; -{ - if (!ov) - return; - switch (ov->spovartyp) { - case SPOVAR_COORD: - case SPOVAR_REGION: - case SPOVAR_MAPCHAR: - case SPOVAR_MONST: - case SPOVAR_OBJ: - case SPOVAR_INT: - break; - case SPOVAR_VARIABLE: - case SPOVAR_STRING: - case SPOVAR_SEL: - Free(ov->vardata.str); - break; - default: - impossible("Unknown opvar value type (%i)!", ov->spovartyp); - } - Free(ov); -} - -/* - * Name of current function for use in messages: - * __func__ -- C99 standard; - * __FUNCTION__ -- gcc extension, starting before C99 and continuing after; - * picked up by other compilers (or vice versa?); - * __FUNC__ -- supported by Borland; - * nhFunc -- slightly intrusive but fully portable nethack construct - * for any version of any compiler. - */ -#define opvar_free(ov) \ - do { \ - if (ov) { \ - opvar_free_x(ov); \ - ov = NULL; \ - } else \ - impossible("opvar_free(), %s", nhFunc); \ - } while (0) - -struct opvar * -opvar_clone(ov) -struct opvar *ov; -{ - struct opvar *tmpov; - - if (!ov) - panic("no opvar to clone"); - tmpov = (struct opvar *) alloc(sizeof(struct opvar)); - tmpov->spovartyp = ov->spovartyp; - switch (ov->spovartyp) { - case SPOVAR_COORD: - case SPOVAR_REGION: - case SPOVAR_MAPCHAR: - case SPOVAR_MONST: - case SPOVAR_OBJ: - case SPOVAR_INT: - tmpov->vardata.l = ov->vardata.l; - break; - case SPOVAR_VARIABLE: - case SPOVAR_STRING: - case SPOVAR_SEL: - tmpov->vardata.str = dupstr(ov->vardata.str); - break; - default: - impossible("Unknown push value type (%i)!", ov->spovartyp); - } - return tmpov; -} - -struct opvar * -opvar_var_conversion(coder, ov) -struct sp_coder *coder; -struct opvar *ov; -{ - static const char nhFunc[] = "opvar_var_conversion"; - struct splev_var *tmp; - struct opvar *tmpov; - struct opvar *array_idx = NULL; - - if (!coder || !ov) - return NULL; - if (ov->spovartyp != SPOVAR_VARIABLE) - return ov; - tmp = coder->frame->variables; - while (tmp) { - if (!strcmp(tmp->name, OV_s(ov))) { - if ((tmp->svtyp & SPOVAR_ARRAY)) { - array_idx = opvar_var_conversion(coder, - splev_stack_pop(coder->stack)); - if (!array_idx || OV_typ(array_idx) != SPOVAR_INT) - panic("array idx not an int"); - if (tmp->array_len < 1) - panic("array len < 1"); - OV_i(array_idx) = (OV_i(array_idx) % tmp->array_len); - tmpov = opvar_clone(tmp->data.arrayvalues[OV_i(array_idx)]); - opvar_free(array_idx); - return tmpov; - } else { - tmpov = opvar_clone(tmp->data.value); - return tmpov; - } - } - tmp = tmp->next; - } - return NULL; -} - -struct splev_var * -opvar_var_defined(coder, name) -struct sp_coder *coder; -char *name; -{ - struct splev_var *tmp; - - if (!coder) - return NULL; - tmp = coder->frame->variables; - while (tmp) { - if (!strcmp(tmp->name, name)) - return tmp; - tmp = tmp->next; - } - return NULL; -} - -struct opvar * -splev_stack_getdat(coder, typ) -struct sp_coder *coder; -xchar typ; -{ - static const char nhFunc[] = "splev_stack_getdat"; - if (coder && coder->stack) { - struct opvar *tmp = splev_stack_pop(coder->stack); - struct opvar *ret = NULL; - - if (!tmp) - panic("no value type %i in stack.", typ); - if (tmp->spovartyp == SPOVAR_VARIABLE) { - ret = opvar_var_conversion(coder, tmp); - opvar_free(tmp); - tmp = ret; - } - if (tmp->spovartyp == typ) - return tmp; - else opvar_free(tmp); - } - return NULL; -} - -struct opvar * -splev_stack_getdat_any(coder) -struct sp_coder *coder; -{ - static const char nhFunc[] = "splev_stack_getdat_any"; - if (coder && coder->stack) { - struct opvar *tmp = splev_stack_pop(coder->stack); - if (tmp && tmp->spovartyp == SPOVAR_VARIABLE) { - struct opvar *ret = opvar_var_conversion(coder, tmp); - opvar_free(tmp); - return ret; - } - return tmp; - } - return NULL; -} - -void -variable_list_del(varlist) -struct splev_var *varlist; -{ - static const char nhFunc[] = "variable_list_del"; - struct splev_var *tmp = varlist; - - if (!tmp) - return; - while (tmp) { - Free(tmp->name); - if ((tmp->svtyp & SPOVAR_ARRAY)) { - long idx = tmp->array_len; - - while (idx-- > 0) { - opvar_free(tmp->data.arrayvalues[idx]); - }; - Free(tmp->data.arrayvalues); - } else { - opvar_free(tmp->data.value); - } - tmp = varlist->next; - Free(varlist); - varlist = tmp; - } -} - -void +STATIC_OVL void lvlfill_maze_grid(x1, y1, x2, y2, filling) int x1, y1, x2, y2; schar filling; @@ -594,7 +172,7 @@ schar filling; } } -void +STATIC_OVL void lvlfill_solid(filling, lit) schar filling; schar lit; @@ -604,9 +182,28 @@ schar lit; for (x = 2; x <= g.x_maze_max; x++) for (y = 0; y <= g.y_maze_max; y++) { SET_TYPLIT(x, y, filling, lit); + /* TODO: consolidate this w lspo_map ? */ + levl[x][y].flags = 0; + levl[x][y].horizontal = 0; + levl[x][y].roomno = 0; + levl[x][y].edge = 0; } } +void +sel_set_wall_property(x, y, arg) +int x, y; +genericptr_t arg; +{ + int prop = *(int *)arg; + + if (IS_STWALL(levl[x][y].typ) || IS_TREE(levl[x][y].typ) + /* 3.6.2: made iron bars eligible to be flagged nondiggable + (checked by chewing(hack.c) and zap_over_floor(zap.c)) */ + || levl[x][y].typ == IRONBARS) + levl[x][y].wall_info |= prop; +} + /* * Make walls of the area (x1, y1, x2, y2) non diggable/non passwall-able */ @@ -616,7 +213,7 @@ xchar x1, y1, x2, y2; int prop; { register xchar x, y; - struct rm *lev; + /* struct rm *lev; */ /* REVIEW: unreferenced */ x1 = max(x1, 1); x2 = min(x2, COLNO - 1); @@ -624,33 +221,10 @@ int prop; y2 = min(y2, ROWNO - 1); for (y = y1; y <= y2; y++) for (x = x1; x <= x2; x++) { - lev = &levl[x][y]; - if (IS_STWALL(lev->typ) || IS_TREE(lev->typ) - /* 3.6.2: made iron bars eligible to be flagged nondiggable - (checked by chewing(hack.c) and zap_over_floor(zap.c)) */ - || lev->typ == IRONBARS) - lev->wall_info |= prop; + sel_set_wall_property(x, y, (genericptr_t)&prop); } } -STATIC_OVL void -shuffle_alignments() -{ - int i; - aligntyp atmp; - - /* shuffle 3 alignments */ - i = rn2(3); - atmp = g.ralign[2]; - g.ralign[2] = g.ralign[i]; - g.ralign[i] = atmp; - if (rn2(2)) { - atmp = g.ralign[1]; - g.ralign[1] = g.ralign[0]; - g.ralign[0] = atmp; - } -} - /* * Count the different features (sinks, fountains) in the level. */ @@ -670,7 +244,7 @@ count_features() } } -void +STATIC_OVL void remove_boundary_syms() { /* @@ -775,7 +349,7 @@ link_doors_rooms() } } -void +STATIC_OVL void fill_rooms() { int tmpi, m; @@ -945,7 +519,7 @@ register int humidity; return FALSE; } -unpacked_coord +STATIC_OVL unpacked_coord get_unpacked_coord(loc, defhumidity) long loc; int defhumidity; @@ -967,7 +541,7 @@ int defhumidity; return c; } -STATIC_OVL void +void get_location_coord(x, y, humidity, croom, crd) schar *x, *y; int humidity; @@ -1375,7 +949,7 @@ struct mkroom *broom; y = broom->ly - 1; x = broom->lx + ((dpos == -1) ? rn2(1 + (broom->hx - broom->lx)) : dpos); - if (IS_ROCK(levl[x][y - 1].typ)) + if (!isok(x,y - 1)) goto redoloop; goto outdirloop; case 1: @@ -1384,7 +958,7 @@ struct mkroom *broom; y = broom->hy + 1; x = broom->lx + ((dpos == -1) ? rn2(1 + (broom->hx - broom->lx)) : dpos); - if (IS_ROCK(levl[x][y + 1].typ)) + if (!isok(x,y + 1)) goto redoloop; goto outdirloop; case 2: @@ -1393,7 +967,7 @@ struct mkroom *broom; x = broom->lx - 1; y = broom->ly + ((dpos == -1) ? rn2(1 + (broom->hy - broom->ly)) : dpos); - if (IS_ROCK(levl[x - 1][y].typ)) + if (!isok(x - 1,y)) goto redoloop; goto outdirloop; case 3: @@ -1402,7 +976,7 @@ struct mkroom *broom; x = broom->hx + 1; y = broom->ly + ((dpos == -1) ? rn2(1 + (broom->hy - broom->ly)) : dpos); - if (IS_ROCK(levl[x + 1][y].typ)) + if (!isok(x + 1,y)) goto redoloop; goto outdirloop; default: @@ -1581,9 +1155,9 @@ struct mkroom *croom; ? Align2amask(u.ualignbase[A_ORIGINAL]) : (m->align == AM_SPLEV_NONCO) ? Align2amask(noncoalignment(u.ualignbase[A_ORIGINAL])) - : (m->align <= -(MAX_REGISTERS + 1)) + : (m->align == AM_SPLEV_RANDOM) ? induced_align(80) - : (m->align < 0 ? g.ralign[-m->align - 1] : m->align); + : m->align; if (!class) pm = (struct permonst *) 0; @@ -1619,7 +1193,7 @@ struct mkroom *croom; if (MON_AT(x, y) && enexto(&cc, x, y, pm)) x = cc.x, y = cc.y; - if (m->align != -(MAX_REGISTERS + 2)) + if (m->align != AM_SPLEV_RANDOM) mtmp = mk_roamer(pm, Amask2align(amask), x, y, m->peaceful); else if (PM_ARCHEOLOGIST <= m->id && m->id <= PM_WIZARD) mtmp = mk_mplayer(pm, x, y, FALSE); @@ -1906,10 +1480,6 @@ struct mkroom *croom; otmp->otrapped = o->trapped; if (o->greased) otmp->greased = 1; -#ifdef INVISIBLE_OBJECTS - if (o->invis) - otmp->oinvis = 1; -#endif if (o->quan > 0 && objects[otmp->otyp].oc_merge) { otmp->quan = o->quan; @@ -1917,7 +1487,7 @@ struct mkroom *croom; } /* contents */ - if (o->containment & SP_OBJ_CONTENT) { + if (o->containment & SP_OBJ_CONTENT || g.invent_carrying_monster) { if (!g.container_idx) { if (!g.invent_carrying_monster) { /*impossible("create_object: no container");*/ @@ -2103,9 +1673,9 @@ struct mkroom *croom; ? Align2amask(u.ualignbase[A_ORIGINAL]) : (a->align == AM_SPLEV_NONCO) ? Align2amask(noncoalignment(u.ualignbase[A_ORIGINAL])) - : (a->align == -(MAX_REGISTERS + 1)) + : (a->align == AM_SPLEV_RANDOM) ? induced_align(80) - : (a->align < 0 ? g.ralign[-a->align - 1] : a->align); + : a->align; levl[x][y].typ = ALTAR; levl[x][y].altarmask = amask; @@ -2123,7 +1693,7 @@ struct mkroom *croom; } } -void +STATIC_OVL void replace_terrain(terr, croom) replaceterrain *terr; struct mkroom *croom; @@ -2162,13 +1732,13 @@ int cnt; int xx, yy; switch (wall) { - case W_NORTH: + case W_SOUTH: dy = 0; dx = 1; xx = croom->lx; yy = croom->hy + 1; break; - case W_SOUTH: + case W_NORTH: dy = 0; dx = 1; xx = croom->lx; @@ -2381,7 +1951,6 @@ corridor *c; if (!search_door(&g.rooms[c->src.room], &org.x, &org.y, c->src.wall, c->src.door)) return; - if (c->dest.room != -1) { if (!search_door(&g.rooms[c->dest.room], &dest.x, &dest.y, c->dest.wall, c->dest.door)) @@ -2486,7 +2055,7 @@ boolean prefilled; } } -struct mkroom * +STATIC_OVL struct mkroom * build_room(r, mkr) room *r; struct mkroom *mkr; @@ -2663,105 +2232,7 @@ fill_empty_maze() } } -/* - * special level loader - */ -STATIC_OVL boolean -sp_level_loader(fd, lvl) -dlb *fd; -sp_lev *lvl; -{ - long n_opcode = 0; - struct opvar *opdat; - int opcode; - - Fread((genericptr_t) & (lvl->n_opcodes), 1, sizeof(lvl->n_opcodes), fd); - lvl->opcodes = (_opcode *) alloc(sizeof(_opcode) * (lvl->n_opcodes)); - - while (n_opcode < lvl->n_opcodes) { - Fread((genericptr_t) &lvl->opcodes[n_opcode].opcode, 1, - sizeof(lvl->opcodes[n_opcode].opcode), fd); - opcode = lvl->opcodes[n_opcode].opcode; - - opdat = NULL; - - if (opcode < SPO_NULL || opcode >= MAX_SP_OPCODES) - panic("sp_level_loader: impossible opcode %i.", opcode); - - if (opcode == SPO_PUSH) { - int nsize; - struct opvar *ov = (struct opvar *) alloc(sizeof(struct opvar)); - - opdat = ov; - ov->spovartyp = SPO_NULL; - ov->vardata.l = 0; - Fread((genericptr_t) & (ov->spovartyp), 1, sizeof(ov->spovartyp), - fd); - - switch (ov->spovartyp) { - case SPOVAR_NULL: - break; - case SPOVAR_COORD: - case SPOVAR_REGION: - case SPOVAR_MAPCHAR: - case SPOVAR_MONST: - case SPOVAR_OBJ: - case SPOVAR_INT: - Fread((genericptr_t) & (ov->vardata.l), 1, - sizeof(ov->vardata.l), fd); - break; - case SPOVAR_VARIABLE: - case SPOVAR_STRING: - case SPOVAR_SEL: { - char *opd; - - Fread((genericptr_t) &nsize, 1, sizeof(nsize), fd); - opd = (char *) alloc(nsize + 1); - - if (nsize) - Fread(opd, 1, nsize, fd); - opd[nsize] = 0; - ov->vardata.str = opd; - break; - } - default: - panic("sp_level_loader: unknown opvar type %i", - ov->spovartyp); - } - } - - lvl->opcodes[n_opcode].opdat = opdat; - n_opcode++; - } /*while*/ - - return TRUE; -} - -/* Frees the memory allocated for special level creation structs */ -STATIC_OVL boolean -sp_level_free(lvl) -sp_lev *lvl; -{ - static const char nhFunc[] = "sp_level_free"; - long n_opcode = 0; - - while (n_opcode < lvl->n_opcodes) { - int opcode = lvl->opcodes[n_opcode].opcode; - struct opvar *opdat = lvl->opcodes[n_opcode].opdat; - - if (opcode < SPO_NULL || opcode >= MAX_SP_OPCODES) - panic("sp_level_free: unknown opcode %i", opcode); - - if (opdat) - opvar_free(opdat); - n_opcode++; - } - Free(lvl->opcodes); - lvl->opcodes = NULL; - return TRUE; -} - -void +STATIC_OVL void splev_initlev(linit) lev_init *linit; { @@ -2777,7 +2248,7 @@ lev_init *linit; lvlfill_solid(linit->filling, linit->lit); break; case LVLINIT_MAZEGRID: - lvlfill_maze_grid(2, 0, g.x_maze_max, g.y_maze_max, linit->filling); + lvlfill_maze_grid(2, 0, g.x_maze_max, g.y_maze_max, linit->bg); break; case LVLINIT_ROGUE: makeroguerooms(); @@ -2793,132 +2264,18 @@ lev_init *linit; } } -struct sp_frame * -frame_new(execptr) -long execptr; -{ - struct sp_frame *frame = - (struct sp_frame *) alloc(sizeof(struct sp_frame)); - - frame->next = NULL; - frame->variables = NULL; - frame->n_opcode = execptr; - frame->stack = (struct splevstack *) alloc(sizeof(struct splevstack)); - splev_stack_init(frame->stack); - return frame; -} - -void -frame_del(frame) -struct sp_frame *frame; -{ - if (!frame) - return; - if (frame->stack) { - splev_stack_done(frame->stack); - frame->stack = NULL; - } - if (frame->variables) { - variable_list_del(frame->variables); - frame->variables = NULL; - } - Free(frame); -} - -void -spo_frame_push(coder) -struct sp_coder *coder; -{ - struct sp_frame *tmpframe = frame_new(coder->frame->n_opcode); - - tmpframe->next = coder->frame; - coder->frame = tmpframe; -} - -void -spo_frame_pop(coder) -struct sp_coder *coder; -{ - if (coder->frame && coder->frame->next) { - struct sp_frame *tmpframe = coder->frame->next; - - frame_del(coder->frame); - coder->frame = tmpframe; - coder->stack = coder->frame->stack; - } -} - -long +STATIC_OVL long sp_code_jmpaddr(curpos, jmpaddr) long curpos, jmpaddr; { return (curpos + jmpaddr); } -void -spo_call(coder) -struct sp_coder *coder; -{ - static const char nhFunc[] = "spo_call"; - struct opvar *addr; - struct opvar *params; - struct sp_frame *tmpframe; - if (!OV_pop_i(addr) || !OV_pop_i(params)) - return; - if (OV_i(params) < 0) - return; - - tmpframe = frame_new(sp_code_jmpaddr(coder->frame->n_opcode, - OV_i(addr) - 1)); - - while (OV_i(params)-- > 0) { - splev_stack_push(tmpframe->stack, splev_stack_getdat_any(coder)); - } - splev_stack_reverse(tmpframe->stack); - - /* push a frame */ - tmpframe->next = coder->frame; - coder->frame = tmpframe; - - opvar_free(addr); - opvar_free(params); -} - -void -spo_return(coder) -struct sp_coder *coder; -{ - static const char nhFunc[] = "spo_return"; - struct opvar *params; - - if (!coder->frame || !coder->frame->next) - panic("return: no frame."); - if (!OV_pop_i(params)) - return; - if (OV_i(params) < 0) - return; - - while (OV_i(params)-- > 0) { - splev_stack_push(coder->frame->next->stack, - splev_stack_pop(coder->stack)); - } - - /* pop the frame */ - if (coder->frame->next) { - struct sp_frame *tmpframe = coder->frame->next; - frame_del(coder->frame); - coder->frame = tmpframe; - coder->stack = coder->frame->stack; - } - - opvar_free(params); -} /*ARGUSED*/ -void -spo_end_moninvent(coder) -struct sp_coder *coder UNUSED; +STATIC_OVL void +spo_end_moninvent() { if (g.invent_carrying_monster) m_dowear(g.invent_carrying_monster, TRUE); @@ -2926,9 +2283,8 @@ struct sp_coder *coder UNUSED; } /*ARGUSED*/ -void -spo_pop_container(coder) -struct sp_coder *coder UNUSED; +STATIC_OVL void +spo_pop_container() { if (g.container_idx > 0) { g.container_idx--; @@ -2936,20 +2292,24 @@ struct sp_coder *coder UNUSED; } } -void -spo_message(coder) -struct sp_coder *coder; +/* message("What a strange feeling!"); */ +int +lspo_message(L) +lua_State *L; { - static const char nhFunc[] = "spo_message"; - struct opvar *op; - char *msg, *levmsg; + char *levmsg; int old_n, n; - if (!OV_pop_s(op)) - return; - msg = OV_s(op); - if (!msg) - return; + int argc = lua_gettop(L); + + if (argc < 1) { + nhl_error(L, "Wrong parameters"); + return 0; + } + + create_des_coder(); + + const char *msg = luaL_checkstring(L, 1); old_n = g.lev_message ? (strlen(g.lev_message) + 1) : 0; n = strlen(msg); @@ -2964,25 +2324,89 @@ struct sp_coder *coder; levmsg[old_n + n] = '\0'; Free(g.lev_message); g.lev_message = levmsg; - opvar_free(op); + + return 0; /* number of results */ } -void -spo_monster(coder) -struct sp_coder *coder; +int +get_table_align(L) +lua_State *L; { - static const char nhFunc[] = "spo_monster"; - int nparams = 0; - struct opvar *varparam; - struct opvar *id, *mcoord, *has_inv; + const char *const aligns[] = { "noalign", "law", "neutral", "chaos", "coaligned", "noncoaligned", "random", NULL }; + const int aligns2i[] = { AM_NONE, AM_LAWFUL, AM_NEUTRAL, AM_CHAOTIC, AM_SPLEV_CO, AM_SPLEV_NONCO, AM_SPLEV_RANDOM, 0 }; + + int a = aligns2i[get_table_option(L, "align", "random", aligns)]; + + return a; +} + +int +get_table_monclass(L) +lua_State *L; +{ + char *s = get_table_str_opt(L, "class", NULL); + int ret = -1; + + if (s && strlen(s) == 1) + ret = (int) *s; + Free(s); + + return ret; +} + +int +find_montype(L, s) +lua_State *L; +const char *s; +{ + int i; + + for (i = LOW_PM; i < NUMMONS; i++) + if (!strcmpi(mons[i].mname, s)) + return i; + return NON_PM; +} + +int +get_table_montype(L) +lua_State *L; +{ + char *s = get_table_str_opt(L, "id", NULL); + int ret = NON_PM /*, i */ /* REVIEW: unreferenced */; + + if (s) { + ret = find_montype(L, s); + Free(s); + if (ret == NON_PM) + nhl_error(L, "Unknown monster id"); + } + return ret; +} + +/* monster(); */ +/* monster("wood nymph"); */ +/* monster("D"); */ +/* monster("giant eel",11,06); */ +/* monster("hill giant", {08,06}); */ +/* monster({ id = "giant mimic", appear_as = "obj:boulder" }); */ +/* monster({ class = "H", peaceful = 0 }); */ +int +lspo_monster(L) +lua_State *L; +{ + int argc = lua_gettop(L); monster tmpmons; + int mx = -1, my = -1; + char *mappear = NULL; + + create_des_coder(); tmpmons.peaceful = -1; tmpmons.asleep = -1; - tmpmons.name.str = (char *) 0; + tmpmons.name.str = NULL; tmpmons.appear = 0; tmpmons.appear_as.str = (char *) 0; - tmpmons.align = -MAX_REGISTERS - 2; + tmpmons.align = AM_SPLEV_RANDOM; tmpmons.female = 0; tmpmons.invis = 0; tmpmons.cancelled = 0; @@ -2996,134 +2420,240 @@ struct sp_coder *coder; tmpmons.seentraps = 0; tmpmons.has_invent = 0; - if (!OV_pop_i(has_inv)) - return; + if (argc == 1 && lua_type(L, 1) == LUA_TSTRING) { + const char *paramstr = luaL_checkstring(L, 1); - if (!OV_pop_i(varparam)) - return; - - while ((nparams++ < (SP_M_V_END + 1)) && (OV_typ(varparam) == SPOVAR_INT) - && (OV_i(varparam) >= 0) && (OV_i(varparam) < SP_M_V_END)) { - struct opvar *parm = NULL; - - OV_pop(parm); - switch (OV_i(varparam)) { - case SP_M_V_NAME: - if ((OV_typ(parm) == SPOVAR_STRING) && !tmpmons.name.str) - tmpmons.name.str = dupstr(OV_s(parm)); - break; - case SP_M_V_APPEAR: - if ((OV_typ(parm) == SPOVAR_INT) && !tmpmons.appear_as.str) { - tmpmons.appear = OV_i(parm); - opvar_free(parm); - OV_pop(parm); - tmpmons.appear_as.str = dupstr(OV_s(parm)); - } - break; - case SP_M_V_ASLEEP: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.asleep = OV_i(parm); - break; - case SP_M_V_ALIGN: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.align = OV_i(parm); - break; - case SP_M_V_PEACEFUL: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.peaceful = OV_i(parm); - break; - case SP_M_V_FEMALE: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.female = OV_i(parm); - break; - case SP_M_V_INVIS: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.invis = OV_i(parm); - break; - case SP_M_V_CANCELLED: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.cancelled = OV_i(parm); - break; - case SP_M_V_REVIVED: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.revived = OV_i(parm); - break; - case SP_M_V_AVENGE: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.avenge = OV_i(parm); - break; - case SP_M_V_FLEEING: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.fleeing = OV_i(parm); - break; - case SP_M_V_BLINDED: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.blinded = OV_i(parm); - break; - case SP_M_V_PARALYZED: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.paralyzed = OV_i(parm); - break; - case SP_M_V_STUNNED: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.stunned = OV_i(parm); - break; - case SP_M_V_CONFUSED: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.confused = OV_i(parm); - break; - case SP_M_V_SEENTRAPS: - if (OV_typ(parm) == SPOVAR_INT) - tmpmons.seentraps = OV_i(parm); - break; - case SP_M_V_END: - nparams = SP_M_V_END + 1; - break; - default: - impossible("MONSTER with unknown variable param type!"); - break; + if (strlen(paramstr) == 1) { + tmpmons.class = *paramstr; + tmpmons.id = NON_PM; + } else { + tmpmons.class = -1; + tmpmons.id = find_montype(L, paramstr); } - opvar_free(parm); - if (OV_i(varparam) != SP_M_V_END) { - opvar_free(varparam); - OV_pop(varparam); + } else if (argc == 2 && lua_type(L, 1) == LUA_TSTRING + && lua_type(L, 2) == LUA_TTABLE) { + const char *paramstr = luaL_checkstring(L, 1); + + get_coord(L, 2, &mx, &my); + + if (strlen(paramstr) == 1) { + tmpmons.class = *paramstr; + tmpmons.id = NON_PM; + } else { + tmpmons.class = -1; + tmpmons.id = find_montype(L, paramstr); + } + + } else if (argc == 3) { + const char *paramstr = luaL_checkstring(L, 1); + + mx = luaL_checkinteger(L, 2); + my = luaL_checkinteger(L, 3); + + if (strlen(paramstr) == 1) { + tmpmons.class = *paramstr; + tmpmons.id = NON_PM; + } else { + tmpmons.class = -1; + tmpmons.id = find_montype(L, paramstr); + } + } else { + lcheck_param_table(L); + + tmpmons.peaceful = get_table_int_opt(L, "peaceful", -1); /* TODO: alias hostile=!peaceful */ + tmpmons.asleep = get_table_int_opt(L, "asleep", -1); + tmpmons.name.str = get_table_str_opt(L, "name", NULL); + tmpmons.appear = 0; + tmpmons.appear_as.str = (char *) 0; + tmpmons.align = get_table_align(L); + tmpmons.female = get_table_int_opt(L, "female", 0); + tmpmons.invis = get_table_int_opt(L, "invisible", 0); + tmpmons.cancelled = get_table_int_opt(L, "cancelled", 0); + tmpmons.revived = get_table_int_opt(L, "revived", 0); + tmpmons.avenge = get_table_int_opt(L, "avenge", 0); + tmpmons.fleeing = get_table_int_opt(L, "fleeing", 0); + tmpmons.blinded = get_table_int_opt(L, "blinded", 0); + tmpmons.paralyzed = get_table_int_opt(L, "paralyzed", 0); + tmpmons.stunned = get_table_int_opt(L, "stunned", 0); + tmpmons.confused = get_table_int_opt(L, "confused", 0); + tmpmons.seentraps = 0; /* TODO: list of trap names to bitfield */ + tmpmons.has_invent = 0; + + mappear = get_table_str_opt(L, "appear_as", NULL); + if (mappear) { + if (!strncmp("obj:", mappear, 4)) { + tmpmons.appear = M_AP_OBJECT; + } else if (!strncmp("mon:", mappear, 4)) { + tmpmons.appear = M_AP_MONSTER; + } else if (!strncmp("ter:", mappear, 4)) { + tmpmons.appear = M_AP_FURNITURE; + } else { + nhl_error(L, "Unknown appear_as type"); + } + tmpmons.appear_as.str = dupstr(&mappear[4]); + Free(mappear); + } + + mx = get_table_int_opt(L, "x", -1); + my = get_table_int_opt(L, "y", -1); + + if (mx == -1 && my == -1) { + lua_getfield(L, 1, "coord"); + get_coord(L, -1, &mx, &my); + lua_pop(L, 1); + } + + tmpmons.id = get_table_montype(L); + tmpmons.class = get_table_monclass(L); + + lua_getfield(L, 1, "inventory"); + if (!lua_isnil(L, -1)) { + tmpmons.has_invent = 1; } } - if (!OV_pop_c(mcoord)) - panic("no monster coord?"); + if (mx == -1 && my == -1) + tmpmons.coord = SP_COORD_PACK_RANDOM(0); + else + tmpmons.coord = SP_COORD_PACK(mx, my); - if (!OV_pop_typ(id, SPOVAR_MONST)) - panic("no mon type"); + if (tmpmons.id != NON_PM && tmpmons.class == -1) + tmpmons.class = def_monsyms[mons[tmpmons.id].mlet].sym; - tmpmons.id = SP_MONST_PM(OV_i(id)); - tmpmons.class = SP_MONST_CLASS(OV_i(id)); - tmpmons.coord = OV_i(mcoord); - tmpmons.has_invent = OV_i(has_inv); + create_monster(&tmpmons, g.coder->croom); - create_monster(&tmpmons, coder->croom); + if (tmpmons.has_invent && lua_type(L, -1) == LUA_TFUNCTION) { + lua_remove(L, -2); + lua_call(L, 0, 0); + spo_end_moninvent(); + } else + lua_pop(L, 1); Free(tmpmons.name.str); Free(tmpmons.appear_as.str); - opvar_free(id); - opvar_free(mcoord); - opvar_free(has_inv); - opvar_free(varparam); + + return 0; } -void -spo_object(coder) -struct sp_coder *coder; +/* the hash key 'name' is an integer or "random", + or if not existent, also return rndval. + */ +int +get_table_int_or_random(L, name, rndval) +lua_State *L; +const char *name; +int rndval; +{ + int ret; + + lua_getfield(L, 1, name); + if (lua_type(L, -1) == LUA_TNIL) { + lua_pop(L, 1); + return rndval; + } + if (!lua_isnumber(L, -1)) { + const char *tmp = lua_tostring(L, -1); + + if (tmp && !strcmpi("random", tmp)) { + lua_pop(L, 1); + return rndval; + } + char buf[BUFSZ]; + Sprintf(buf, "Expected integer or \"random\" for \"%s\", got %s", name, tmp); + nhl_error(L, buf); + lua_pop(L, 1); + return 0; + } + ret = luaL_optinteger(L, -1, rndval); + lua_pop(L, 1); + return ret; +} + +int +get_table_buc(L) +lua_State *L; +{ + const char *const bucs[] = { "random", "blessed", "uncursed", "cursed", NULL }; + const int bucs2i[] = { 0, 1, 2, 3, 0 }; + + int curse_state = bucs2i[get_table_option(L, "buc", "random", bucs)]; + return curse_state; +} + +int +get_table_objclass(L) +lua_State *L; +{ + char *s = get_table_str_opt(L, "class", NULL); + int ret = -1; + + if (s && strlen(s) == 1) + ret = (int) *s; + Free(s); + return ret; +} + +int +find_objtype(L, s) +lua_State *L; +const char *s; +{ + if (s) { + int i; + const char *objname; + + /* find by object name */ + for (i = 0; i < NUM_OBJECTS; i++) { + objname = obj_descr[i].oc_name; + if (objname && !strcmpi(s, objname)) + return i; + } + + /* find by object description */ + for (i = 0; i < NUM_OBJECTS; i++) { + objname = obj_descr[i].oc_descr; + if (objname && !strcmpi(s, objname)) + return i; + } + + nhl_error(L, "Unknown object id"); + } + return STRANGE_OBJECT; +} + +int +get_table_objtype(L) +lua_State *L; +{ + char *s = get_table_str_opt(L, "id", NULL); + int ret = find_objtype(L, s); + + Free(s); + return ret; +} + +/* object(); */ +/* object("sack"); */ +/* object("scimitar", 6,7); */ +/* object("scimitar", {6,7}); */ +/* object({ class = "%" }); */ +/* object({ id = "boulder", x = 03, y = 12}); */ +/* object({ id = "boulder", coord = {03,12} }); */ +int +lspo_object(L) +lua_State *L; { - static const char nhFunc[] = "spo_object"; int nparams = 0; long quancnt; - struct opvar *varparam; - struct opvar *id, *containment; object tmpobj; + int ox = -1, oy = -1; + int argc = lua_gettop(L); + int maybe_contents = 0; + + create_des_coder(); tmpobj.spe = -127; - tmpobj.curse_state = -1; + tmpobj.curse_state = 0; tmpobj.corpsenm = NON_PM; tmpobj.name.str = (char *) 0; tmpobj.quan = -1; @@ -3133,329 +2663,426 @@ struct sp_coder *coder; tmpobj.locked = 0; tmpobj.trapped = -1; tmpobj.recharged = 0; - tmpobj.invis = 0; tmpobj.greased = 0; tmpobj.broken = 0; - tmpobj.coord = SP_COORD_PACK_RANDOM(0); - if (!OV_pop_i(containment)) - return; + if (argc == 1 && lua_type(L, 1) == LUA_TSTRING) { + const char *paramstr = luaL_checkstring(L, 1); - if (!OV_pop_i(varparam)) - return; - - while ((nparams++ < (SP_O_V_END + 1)) && (OV_typ(varparam) == SPOVAR_INT) - && (OV_i(varparam) >= 0) && (OV_i(varparam) < SP_O_V_END)) { - struct opvar *parm; - - OV_pop(parm); - switch (OV_i(varparam)) { - case SP_O_V_NAME: - if ((OV_typ(parm) == SPOVAR_STRING) && !tmpobj.name.str) - tmpobj.name.str = dupstr(OV_s(parm)); - break; - case SP_O_V_CORPSENM: - if (OV_typ(parm) == SPOVAR_MONST) { - char monclass = SP_MONST_CLASS(OV_i(parm)); - int monid = SP_MONST_PM(OV_i(parm)); - - if (monid >= LOW_PM && monid < NUMMONS) { - tmpobj.corpsenm = monid; - break; /* we're done! */ - } else { - struct permonst *pm = (struct permonst *) 0; - - if (def_char_to_monclass(monclass) != MAXMCLASSES) { - pm = mkclass(def_char_to_monclass(monclass), G_NOGEN); - } else { - pm = rndmonst(); - } - if (pm) - tmpobj.corpsenm = monsndx(pm); - } - } - break; - case SP_O_V_CURSE: - if (OV_typ(parm) == SPOVAR_INT) - tmpobj.curse_state = OV_i(parm); - break; - case SP_O_V_SPE: - if (OV_typ(parm) == SPOVAR_INT) - tmpobj.spe = OV_i(parm); - break; - case SP_O_V_QUAN: - if (OV_typ(parm) == SPOVAR_INT) - tmpobj.quan = OV_i(parm); - break; - case SP_O_V_BURIED: - if (OV_typ(parm) == SPOVAR_INT) - tmpobj.buried = OV_i(parm); - break; - case SP_O_V_LIT: - if (OV_typ(parm) == SPOVAR_INT) - tmpobj.lit = OV_i(parm); - break; - case SP_O_V_ERODED: - if (OV_typ(parm) == SPOVAR_INT) - tmpobj.eroded = OV_i(parm); - break; - case SP_O_V_LOCKED: - if (OV_typ(parm) == SPOVAR_INT) - tmpobj.locked = OV_i(parm); - break; - case SP_O_V_TRAPPED: - if (OV_typ(parm) == SPOVAR_INT) - tmpobj.trapped = OV_i(parm); - break; - case SP_O_V_RECHARGED: - if (OV_typ(parm) == SPOVAR_INT) - tmpobj.recharged = OV_i(parm); - break; - case SP_O_V_INVIS: - if (OV_typ(parm) == SPOVAR_INT) - tmpobj.invis = OV_i(parm); - break; - case SP_O_V_GREASED: - if (OV_typ(parm) == SPOVAR_INT) - tmpobj.greased = OV_i(parm); - break; - case SP_O_V_BROKEN: - if (OV_typ(parm) == SPOVAR_INT) - tmpobj.broken = OV_i(parm); - break; - case SP_O_V_COORD: - if (OV_typ(parm) != SPOVAR_COORD) - panic("no coord for obj?"); - tmpobj.coord = OV_i(parm); - break; - case SP_O_V_END: - nparams = SP_O_V_END + 1; - break; - default: - impossible("OBJECT with unknown variable param type!"); - break; + if (strlen(paramstr) == 1) { + tmpobj.class = *paramstr; + tmpobj.id = STRANGE_OBJECT; + } else { + tmpobj.class = -1; + tmpobj.id = find_objtype(L, paramstr); } - opvar_free(parm); - if (OV_i(varparam) != SP_O_V_END) { - opvar_free(varparam); - OV_pop(varparam); + } else if (argc == 2 && lua_type(L, 1) == LUA_TSTRING + && lua_type(L, 2) == LUA_TTABLE) { + const char *paramstr = luaL_checkstring(L, 1); + + get_coord(L, 2, &ox, &oy); + + if (strlen(paramstr) == 1) { + tmpobj.class = *paramstr; + tmpobj.id = STRANGE_OBJECT; + } else { + tmpobj.class = -1; + tmpobj.id = find_objtype(L, paramstr); + } + } else if (argc == 3) { + const char *paramstr = luaL_checkstring(L, 1); + + ox = luaL_checkinteger(L, 2); + oy = luaL_checkinteger(L, 3); + + if (strlen(paramstr) == 1) { + tmpobj.class = *paramstr; + tmpobj.id = STRANGE_OBJECT; + } else { + tmpobj.class = -1; + tmpobj.id = find_objtype(L, paramstr); + } + } else { + lcheck_param_table(L); + + tmpobj.spe = get_table_int_or_random(L, "spe", -127); + tmpobj.curse_state = get_table_buc(L); + tmpobj.corpsenm = NON_PM; + tmpobj.name.str = get_table_str_opt(L, "name", (char *) 0); + tmpobj.quan = get_table_int_or_random(L, "quantity", -1); + tmpobj.buried = get_table_boolean_opt(L, "buried", 0); + tmpobj.lit = get_table_boolean_opt(L, "lit", 0); + tmpobj.eroded = get_table_int_opt(L, "eroded", 0); + tmpobj.locked = get_table_boolean_opt(L, "locked", 0); + tmpobj.trapped = get_table_int_opt(L, "trapped", -1); + tmpobj.recharged = get_table_int_opt(L, "recharged", 0); + tmpobj.greased = get_table_boolean_opt(L, "greased", 0); + tmpobj.broken = get_table_boolean_opt(L, "broken", 0); + + ox = get_table_int_opt(L, "x", -1); + oy = get_table_int_opt(L, "y", -1); + + if (ox == -1 && oy == -1) { + lua_getfield(L, 1, "coord"); + get_coord(L, -1, &ox, &oy); + lua_pop(L, 1); + } + + tmpobj.id = get_table_objtype(L); + tmpobj.class = get_table_objclass(L); + maybe_contents = 1; + } + + if (ox == -1 && oy == -1) + tmpobj.coord = SP_COORD_PACK_RANDOM(0); + else + tmpobj.coord = SP_COORD_PACK(ox, oy); + + if (tmpobj.class == -1 && tmpobj.id > STRANGE_OBJECT) + tmpobj.class = objects[tmpobj.id].oc_class; + else if (tmpobj.class > -1 && tmpobj.id == STRANGE_OBJECT) + tmpobj.id = -1; + + if (tmpobj.id == STATUE || tmpobj.id == EGG || tmpobj.id == CORPSE || tmpobj.id == TIN) { + int flags = 0; + const char *montype = get_table_str_opt(L, "montype", NULL); + if (montype) { + struct permonst *pm = NULL; + if (strlen(montype) == 1 && def_char_to_monclass(*montype) != MAXMCLASSES) { + pm = mkclass(def_char_to_monclass(*montype), G_NOGEN); + } else { + int i; + for (i = LOW_PM; i < NUMMONS; i++) + if (!strcmpi(mons[i].mname, montype)) { + pm = &mons[i]; + break; + } + } + if (pm) + tmpobj.corpsenm = monsndx(pm); + else + nhl_error(L, "Unknown montype"); + } + if (tmpobj.id == STATUE) { + flags |= (get_table_boolean_opt(L, "historic", 0) ? STATUE_HISTORIC : 0x00); + flags |= (get_table_boolean_opt(L, "male", 0) ? STATUE_MALE : 0x00); + flags |= (get_table_boolean_opt(L, "female", 0) ? STATUE_FEMALE : 0x00); + tmpobj.spe = flags; + } else if (tmpobj.id == EGG) { + tmpobj.spe = get_table_boolean_opt(L, "laid_by_you", 0) ? 1 : 0; } } - if (!OV_pop_typ(id, SPOVAR_OBJ)) - panic("no obj type"); - - tmpobj.id = SP_OBJ_TYP(OV_i(id)); - tmpobj.class = SP_OBJ_CLASS(OV_i(id)); - tmpobj.containment = OV_i(containment); - quancnt = (tmpobj.id > STRANGE_OBJECT) ? tmpobj.quan : 0; + if (g.container_idx) + tmpobj.containment |= SP_OBJ_CONTENT; + + if (maybe_contents) { + lua_getfield(L, 1, "contents"); + if (!lua_isnil(L, -1)) + tmpobj.containment |= SP_OBJ_CONTAINER; + } + do { - create_object(&tmpobj, coder->croom); + create_object(&tmpobj, g.coder->croom); quancnt--; } while ((quancnt > 0) && ((tmpobj.id > STRANGE_OBJECT) && !objects[tmpobj.id].oc_merge)); + if (lua_type(L, -1) == LUA_TFUNCTION) { + lua_remove(L, -2); + lua_call(L, 0, 0); + } else + lua_pop(L, 1); + + if ((tmpobj.containment & SP_OBJ_CONTAINER) != 0) + spo_pop_container(); + Free(tmpobj.name.str); - opvar_free(varparam); - opvar_free(id); - opvar_free(containment); + + return 0; } -void -spo_level_flags(coder) -struct sp_coder *coder; +/* level_flags("noteleport", "mazelevel", ... ); */ +int +lspo_level_flags(L) +lua_State *L; { - static const char nhFunc[] = "spo_level_flags"; - struct opvar *flagdata; - long lflags; + int argc = lua_gettop(L); + int i; - if (!OV_pop_i(flagdata)) - return; - lflags = OV_i(flagdata); + create_des_coder(); - if (lflags & NOTELEPORT) - g.level.flags.noteleport = 1; - if (lflags & HARDFLOOR) - g.level.flags.hardfloor = 1; - if (lflags & NOMMAP) - g.level.flags.nommap = 1; - if (lflags & SHORTSIGHTED) - g.level.flags.shortsighted = 1; - if (lflags & ARBOREAL) - g.level.flags.arboreal = 1; - if (lflags & MAZELEVEL) - g.level.flags.is_maze_lev = 1; - if (lflags & PREMAPPED) - coder->premapped = TRUE; - if (lflags & SHROUD) - g.level.flags.hero_memory = 0; - if (lflags & GRAVEYARD) - g.level.flags.graveyard = 1; - if (lflags & ICEDPOOLS) - g.icedpools = TRUE; - if (lflags & SOLIDIFY) - coder->solidify = TRUE; - if (lflags & CORRMAZE) - g.level.flags.corrmaze = TRUE; - if (lflags & CHECK_INACCESSIBLES) - coder->check_inaccessibles = TRUE; + if (argc < 1) + nhl_error(L, "expected string params"); - opvar_free(flagdata); + for (i = 1; i <= argc; i++) { + const char *s = luaL_checkstring(L, i); + + if (!strcmpi(s, "noteleport")) + g.level.flags.noteleport = 1; + else if (!strcmpi(s, "hardfloor")) + g.level.flags.hardfloor = 1; + else if (!strcmpi(s, "nommap")) + g.level.flags.nommap = 1; + else if (!strcmpi(s, "shortsighted")) + g.level.flags.shortsighted = 1; + else if (!strcmpi(s, "arboreal")) + g.level.flags.arboreal = 1; + else if (!strcmpi(s, "mazelevel")) + g.level.flags.is_maze_lev = 1; + else if (!strcmpi(s, "shroud")) + g.level.flags.hero_memory = 1; + else if (!strcmpi(s, "graveyard")) + g.level.flags.graveyard = 1; + else if (!strcmpi(s, "icedpools")) + g.icedpools = 1; + else if (!strcmpi(s, "corrmaze")) + g.level.flags.corrmaze = 1; + else if (!strcmpi(s, "premapped")) + g.coder->premapped = 1; + else if (!strcmpi(s, "solidify")) + g.coder->solidify = 1; + else if (!strcmpi(s, "inaccessibles")) + g.coder->check_inaccessibles = 1; + else { + char buf[BUFSZ]; + Sprintf(buf, "Unknown level flag %s", s); + nhl_error(L, buf); + } + } + + return 0; } -void -spo_initlevel(coder) -struct sp_coder *coder; +/* level_init({ style = "solidfill", fg = " " }); */ +/* level_init({ style = "mines", fg = ".", bg = "}", smoothed=1, joined=1, lit=0 }) */ +int +lspo_level_init(L) +lua_State *L; { - static const char nhFunc[] = "spo_initlevel"; lev_init init_lev; - struct opvar *init_style, *fg, *bg, *smoothed, *joined, *lit, *walled, - *filling; + const char *const initstyles[] = { "solidfill", "mazegrid", "rogue", "mines", NULL }; + const int initstyles2i[] = { LVLINIT_SOLIDFILL, LVLINIT_MAZEGRID, LVLINIT_ROGUE, LVLINIT_MINES }; - if (!OV_pop_i(fg) || !OV_pop_i(bg) || !OV_pop_i(smoothed) - || !OV_pop_i(joined) || !OV_pop_i(lit) || !OV_pop_i(walled) - || !OV_pop_i(filling) || !OV_pop_i(init_style)) - return; + create_des_coder(); + + lcheck_param_table(L); g.splev_init_present = TRUE; - init_lev.init_style = OV_i(init_style); - init_lev.fg = OV_i(fg); - init_lev.bg = OV_i(bg); - init_lev.smoothed = OV_i(smoothed); - init_lev.joined = OV_i(joined); - init_lev.lit = OV_i(lit); - init_lev.walled = OV_i(walled); - init_lev.filling = OV_i(filling); + init_lev.init_style = initstyles2i[get_table_option(L, "style", "solidfill", initstyles)]; + init_lev.fg = get_table_mapchr_opt(L, "fg", ROOM); + init_lev.bg = get_table_mapchr_opt(L, "bg", STONE); + init_lev.smoothed = get_table_boolean_opt(L, "smoothed", 0); + init_lev.joined = get_table_boolean_opt(L, "joined", 0); + init_lev.lit = get_table_int_or_random(L, "lit", -1); /* TODO: allow lit=BOOL */ + init_lev.walled = get_table_boolean_opt(L, "walled", 0); + init_lev.filling = get_table_mapchr_opt(L, "filling", init_lev.fg); - coder->lvl_is_joined = OV_i(joined); + g.coder->lvl_is_joined = init_lev.joined; splev_initlev(&init_lev); - opvar_free(init_style); - opvar_free(fg); - opvar_free(bg); - opvar_free(smoothed); - opvar_free(joined); - opvar_free(lit); - opvar_free(walled); - opvar_free(filling); + return 0; } -void -spo_engraving(coder) -struct sp_coder *coder; +/* engraving({ x = 1, y = 1, type="burn", text="Foo" }); */ +/* engraving({x,y}, "engrave", "Foo"); */ +int +lspo_engraving(L) +lua_State *L; { - static const char nhFunc[] = "spo_engraving"; - struct opvar *etyp, *txt, *ecoord; + int etyp; + char *txt = (char *) 0; + long ecoord; + const char *const engrtypes[] = { "dust", "engrave", "burn", "mark", "blood", NULL }; + const int engrtypes2i[] = { DUST, ENGRAVE, BURN, MARK, ENGR_BLOOD, 0 }; xchar x, y; + int argc = lua_gettop(L); - if (!OV_pop_i(etyp) || !OV_pop_s(txt) || !OV_pop_c(ecoord)) - return; + create_des_coder(); - get_location_coord(&x, &y, DRY, coder->croom, OV_i(ecoord)); - make_engr_at(x, y, OV_s(txt), 0L, OV_i(etyp)); + if (argc == 1) { + lcheck_param_table(L); - opvar_free(etyp); - opvar_free(txt); - opvar_free(ecoord); + etyp = engrtypes2i[get_table_option(L, "type", "engrave", engrtypes)]; + x = get_table_int_opt(L, "x", -1); + y = get_table_int_opt(L, "y", -1); + txt = get_table_str(L, "text"); + } else if (argc == 3) { + int ex, ey; + get_coord(L, 1, &ex, &ey); + x = ex; + y = ey; + etyp = engrtypes2i[luaL_checkoption(L, 2, "engrave", engrtypes)]; + txt = dupstr(luaL_checkstring(L, 3)); + } else { + nhl_error(L, "Wrong parameters"); + } + + if (x == -1 && y == -1) + ecoord = SP_COORD_PACK_RANDOM(0); + else + ecoord = SP_COORD_PACK(x, y); + + get_location_coord(&x, &y, DRY, g.coder->croom, ecoord); + make_engr_at(x, y, txt, 0L, etyp); + Free(txt); + return 0; } -void -spo_mineralize(coder) -struct sp_coder *coder; +int +lspo_mineralize(L) +lua_State *L; { - static const char nhFunc[] = "spo_mineralize"; - struct opvar *kelp_pool, *kelp_moat, *gold_prob, *gem_prob; + int gem_prob, gold_prob, kelp_moat, kelp_pool; - if (!OV_pop_i(gem_prob) || !OV_pop_i(gold_prob) || !OV_pop_i(kelp_moat) - || !OV_pop_i(kelp_pool)) - return; + create_des_coder(); - mineralize(OV_i(kelp_pool), OV_i(kelp_moat), OV_i(gold_prob), - OV_i(gem_prob), TRUE); + lcheck_param_table(L); + gem_prob = get_table_int_opt(L, "gem_prob", 0); + gold_prob = get_table_int_opt(L, "gold_prob", 0); + kelp_moat = get_table_int_opt(L, "kelp_moat", 0); + kelp_pool = get_table_int_opt(L, "kelp_pool", 0); - opvar_free(gem_prob); - opvar_free(gold_prob); - opvar_free(kelp_moat); - opvar_free(kelp_pool); + mineralize(kelp_pool, kelp_moat, gold_prob, gem_prob, TRUE); + + return 0; } -void -spo_room(coder) -struct sp_coder *coder; -{ - static const char nhFunc[] = "spo_room"; +const struct { + const char *name; + int type; +} room_types[] = { + /* for historical reasons, room types are not contiguous numbers */ + /* (type 1 is skipped) */ + { "ordinary", OROOM }, + { "throne", COURT }, + { "swamp", SWAMP }, + { "vault", VAULT }, + { "beehive", BEEHIVE }, + { "morgue", MORGUE }, + { "barracks", BARRACKS }, + { "zoo", ZOO }, + { "delphi", DELPHI }, + { "temple", TEMPLE }, + { "anthole", ANTHOLE }, + { "cocknest", COCKNEST }, + { "leprehall", LEPREHALL }, + { "shop", SHOPBASE }, + { "armor shop", ARMORSHOP }, + { "scroll shop", SCROLLSHOP }, + { "potion shop", POTIONSHOP }, + { "weapon shop", WEAPONSHOP }, + { "food shop", FOODSHOP }, + { "ring shop", RINGSHOP }, + { "wand shop", WANDSHOP }, + { "tool shop", TOOLSHOP }, + { "book shop", BOOKSHOP }, + { "health food shop", FODDERSHOP }, + { "candle shop", CANDLESHOP }, + { 0, 0 } +}; - if (coder->n_subroom > MAX_NESTED_ROOMS) { +int +get_table_roomtype_opt(L, name, defval) +lua_State *L; +const char *name; +int defval; +{ + char *roomstr = get_table_str_opt(L, name, ""); + if (roomstr && *roomstr) { + int i; + for (i = 0; room_types[i].name; i++) + if (!strcmpi(roomstr, room_types[i].name)) { + Free(roomstr); + return room_types[i].type; + } + } + Free(roomstr); + return defval; +} + +/* room({ type="ordinary", lit=1, x=3,y=3, xalign="center",yalign="center", w=11,h=9 }); */ +int +lspo_room(L) +lua_State *L; +{ + create_des_coder(); + + lcheck_param_table(L); + + if (g.coder->n_subroom > MAX_NESTED_ROOMS) { panic("Too deeply nested rooms?!"); } else { - struct opvar *rflags, *h, *w, *yalign, *xalign, *y, *x, *rlit, - *chance, *rtype; + const char *const left_or_right[] = { "left", "half-left", "center", "half-right", "right", "none", "random", NULL }; + const int l_or_r2i[] = { LEFT, H_LEFT, CENTER, H_RIGHT, RIGHT, -1, -1, -1 }; + const char *const top_or_bot[] = { "top", "center", "bottom", "none", "random", NULL }; + const int t_or_b2i[] = { TOP, CENTER, BOTTOM, -1, -1, -1 }; room tmproom; struct mkroom *tmpcr; - if (!OV_pop_i(h) || !OV_pop_i(w) || !OV_pop_i(y) || !OV_pop_i(x) - || !OV_pop_i(yalign) || !OV_pop_i(xalign) || !OV_pop_i(rflags) - || !OV_pop_i(rlit) || !OV_pop_i(chance) || !OV_pop_i(rtype)) - return; + tmproom.x = get_table_int_opt(L, "x", -1); + tmproom.y = get_table_int_opt(L, "y", -1); + if ((tmproom.x == -1 || tmproom.y == -1) && tmproom.x != tmproom.y) + nhl_error(L, "Room must have both x and y"); - tmproom.x = OV_i(x); - tmproom.y = OV_i(y); - tmproom.w = OV_i(w); - tmproom.h = OV_i(h); - tmproom.xalign = OV_i(xalign); - tmproom.yalign = OV_i(yalign); - tmproom.rtype = OV_i(rtype); - tmproom.chance = OV_i(chance); - tmproom.rlit = OV_i(rlit); - tmproom.filled = (OV_i(rflags) & (1 << 0)); - /*tmproom.irregular = (OV_i(rflags) & (1 << 1));*/ - tmproom.joined = !(OV_i(rflags) & (1 << 2)); + tmproom.w = get_table_int_opt(L, "w", -1); + tmproom.h = get_table_int_opt(L, "h", -1); - opvar_free(x); - opvar_free(y); - opvar_free(w); - opvar_free(h); - opvar_free(xalign); - opvar_free(yalign); - opvar_free(rtype); - opvar_free(chance); - opvar_free(rlit); - opvar_free(rflags); + if ((tmproom.w == -1 || tmproom.h == -1) && tmproom.w != tmproom.h) + nhl_error(L, "Room must have both w and h"); - if (!coder->failed_room[coder->n_subroom - 1]) { - tmpcr = build_room(&tmproom, coder->croom); + tmproom.xalign = l_or_r2i[get_table_option(L, "xalign", "random", left_or_right)]; + tmproom.yalign = t_or_b2i[get_table_option(L, "yalign", "random", top_or_bot)]; + tmproom.rtype = get_table_roomtype_opt(L, "type", OROOM); + tmproom.chance = get_table_int_opt(L, "chance", 100); + tmproom.rlit = get_table_int_opt(L, "lit", -1); + tmproom.filled = get_table_int_opt(L, "filled", 1); + tmproom.joined = get_table_int_opt(L, "joined", 1); + + if (!g.coder->failed_room[g.coder->n_subroom - 1]) { + tmpcr = build_room(&tmproom, g.coder->croom); if (tmpcr) { - coder->tmproomlist[coder->n_subroom] = tmpcr; - coder->failed_room[coder->n_subroom] = FALSE; - coder->n_subroom++; - return; + g.coder->tmproomlist[g.coder->n_subroom] = tmpcr; + g.coder->failed_room[g.coder->n_subroom] = FALSE; + g.coder->n_subroom++; + update_croom(); + lua_getfield(L, 1, "contents"); + if (lua_type(L, -1) == LUA_TFUNCTION) { + lua_remove(L, -2); + lua_call(L, 0, 0); + } else + lua_pop(L, 1); + spo_endroom(g.coder); + return 0; } } /* failed to create parent room, so fail this too */ } - coder->tmproomlist[coder->n_subroom] = (struct mkroom *) 0; - coder->failed_room[coder->n_subroom] = TRUE; - coder->n_subroom++; + g.coder->tmproomlist[g.coder->n_subroom] = (struct mkroom *) 0; + g.coder->failed_room[g.coder->n_subroom] = TRUE; + g.coder->n_subroom++; + update_croom(); + spo_endroom(g.coder); + + return 0; } -void +STATIC_OVL void spo_endroom(coder) struct sp_coder *coder; { - if (coder->n_subroom > 1) { - coder->n_subroom--; - coder->tmproomlist[coder->n_subroom] = NULL; - coder->failed_room[coder->n_subroom] = TRUE; + if (g.coder->n_subroom > 1) { + g.coder->n_subroom--; + g.coder->tmproomlist[g.coder->n_subroom] = NULL; + g.coder->failed_room[g.coder->n_subroom] = TRUE; } else { /* no subroom, get out of top-level room */ /* Need to ensure xstart/ystart/xsize/ysize have something sensible, in case there's some stuff to be created outside the outermost - room, - and there's no MAP. - */ + room, and there's no MAP. */ if (g.xsize <= 1 && g.ysize <= 1) { g.xstart = 1; g.ystart = 0; @@ -3463,46 +3090,129 @@ struct sp_coder *coder; g.ysize = ROWNO; } } + update_croom(); } -void -spo_stair(coder) -struct sp_coder *coder; +/* stair("up"); */ +/* stair({ dir = "down" }); */ +/* stair({ dir = "down", x = 4, y = 7 }); */ +/* stair({ dir = "down", coord = {x,y} }); */ +/* stair("down", 4, 7); */ +/* TODO: stair(selection, "down"); */ +/* TODO: stair("up", {x,y}); */ +int +lspo_stair(L) +lua_State *L; { - static const char nhFunc[] = "spo_stair"; - xchar x, y; - struct opvar *up, *scoord; + int argc = lua_gettop(L); + xchar x = -1, y = -1; struct trap *badtrap; - if (!OV_pop_i(up) || !OV_pop_c(scoord)) - return; + const char *const stairdirs[] = { "down", "up", NULL }; + const int stairdirs2i[] = { 0, 1 }; - get_location_coord(&x, &y, DRY, coder->croom, OV_i(scoord)); + long scoord; + int ax = -1,ay = -1; + int up; + int ltype = lua_type(L, 1); + + create_des_coder(); + + if (argc == 1 && ltype == LUA_TSTRING) + up = stairdirs2i[luaL_checkoption(L, 1, "down", stairdirs)]; + else if (argc == 3 && ltype == LUA_TSTRING) { + up = stairdirs2i[luaL_checkoption(L, 1, "down", stairdirs)]; + ax = luaL_checkinteger(L, 2); + ay = luaL_checkinteger(L, 3); + } else { + lcheck_param_table(L); + + ax = get_table_int_opt(L, "x", -1); + ay = get_table_int_opt(L, "y", -1); + + if (ax == -1 && ay == -1) { + lua_getfield(L, 1, "coord"); + get_coord(L, -1, &ax, &ay); + lua_pop(L, 1); + } + + up = stairdirs2i[get_table_option(L, "dir", "down", stairdirs)]; + } + + x = ax; + y = ay; + + if (x == -1 && y == -1) + scoord = SP_COORD_PACK_RANDOM(0); + else + scoord = SP_COORD_PACK(x, y); + + get_location_coord(&x, &y, DRY, g.coder->croom, scoord); if ((badtrap = t_at(x, y)) != 0) deltrap(badtrap); - mkstairs(x, y, (char) OV_i(up), coder->croom); + mkstairs(x, y, (char) up, g.coder->croom); g.SpLev_Map[x][y] = 1; - opvar_free(scoord); - opvar_free(up); + return 0; } -void -spo_ladder(coder) -struct sp_coder *coder; +/* ladder("down"); */ +/* ladder("up", 6,10); */ +/* ladder({ x=11, y=05, dir="down" }); */ +int +lspo_ladder(L) +lua_State *L; { - static const char nhFunc[] = "spo_ladder"; - xchar x, y; - struct opvar *up, *lcoord; + int argc = lua_gettop(L); + xchar x = -1, y = -1; + struct trap *badtrap; - if (!OV_pop_i(up) || !OV_pop_c(lcoord)) - return; + const char *const stairdirs[] = { "down", "up", NULL }; + const int stairdirs2i[] = { 0, 1 }; - get_location_coord(&x, &y, DRY, coder->croom, OV_i(lcoord)); + long scoord; + int ax, ay; + int up; + int ltype = lua_type(L, 1); + create_des_coder(); + + if (argc == 1 && ltype == LUA_TSTRING) + up = stairdirs2i[luaL_checkoption(L, 1, "down", stairdirs)]; + else if (argc == 3 && ltype == LUA_TSTRING) { + up = stairdirs2i[luaL_checkoption(L, 1, "down", stairdirs)]; + ax = luaL_checkinteger(L, 2); + ay = luaL_checkinteger(L, 3); + } else { + lcheck_param_table(L); + + ax = get_table_int_opt(L, "x", -1); + ay = get_table_int_opt(L, "y", -1); + + if (ax == -1 && ay == -1) { + lua_getfield(L, 1, "coord"); + get_coord(L, -1, &ax, &ay); + lua_pop(L, 1); + } + + up = stairdirs2i[get_table_option(L, "dir", "down", stairdirs)]; + } + + x = ax; + y = ay; + + if (x == -1 && y == -1) + scoord = SP_COORD_PACK_RANDOM(0); + else + scoord = SP_COORD_PACK(ax, ay); + + get_location_coord(&x, &y, DRY, g.coder->croom, scoord); + + if ((badtrap = t_at(x, y)) != 0) + deltrap(badtrap); levl[x][y].typ = LADDER; g.SpLev_Map[x][y] = 1; - if (OV_i(up)) { + if (up) { xupladder = x; yupladder = y; levl[x][y].ladder = LA_UP; @@ -3511,212 +3221,388 @@ struct sp_coder *coder; ydnladder = y; levl[x][y].ladder = LA_DOWN; } - opvar_free(lcoord); - opvar_free(up); + + return 0; } -void -spo_grave(coder) -struct sp_coder *coder; +int +lspo_grave(L) +lua_State *L; { - static const char nhFunc[] = "spo_grave"; - struct opvar *gcoord, *typ, *txt; schar x, y; + long scoord; + int ax,ay; + char *txt; - if (!OV_pop_i(typ) || !OV_pop_s(txt) || !OV_pop_c(gcoord)) - return; + create_des_coder(); - get_location_coord(&x, &y, DRY, coder->croom, OV_i(gcoord)); + lcheck_param_table(L); + + x = ax = get_table_int_opt(L, "x", -1); + y = ay = get_table_int_opt(L, "y", -1); + txt = get_table_str_opt(L, "text", NULL); + + if (x == -1 && y == -1) + scoord = SP_COORD_PACK_RANDOM(0); + else + scoord = SP_COORD_PACK(ax, ay); + + get_location_coord(&x, &y, DRY, g.coder->croom, scoord); if (isok(x, y) && !t_at(x, y)) { levl[x][y].typ = GRAVE; - switch (OV_i(typ)) { - case 2: - make_grave(x, y, OV_s(txt)); - break; - case 1: + if (txt) + make_grave(x, y, txt); + else make_grave(x, y, NULL); - break; - default: - del_engr_at(x, y); - break; + } + + Free(txt); + + return 0; +} + +/* altar({ x=NN, y=NN, align=ALIGNMENT, type=SHRINE }); */ +/* des.altar({ coord = {5, 10}, align="noalign", type="altar" }); */ +int +lspo_altar(L) +lua_State *L; +{ + const char *const shrines[] = { "altar", "shrine", "sanctum", NULL }; + const int shrines2i[] = { 0, 1, 2, 0 }; + + altar tmpaltar; + + int x, y; + long acoord; + int shrine; + int align; + + create_des_coder(); + + lcheck_param_table(L); + + x = get_table_int_opt(L, "x", -1); + y = get_table_int_opt(L, "y", -1); + + if (x == -1 && y == -1) { + lua_getfield(L, 1, "coord"); + get_coord(L, -1, &x, &y); + lua_pop(L, 1); + } + + align = get_table_align(L); + shrine = shrines2i[get_table_option(L, "type", "altar", shrines)]; + + if (x == -1 && y == -1) + acoord = SP_COORD_PACK_RANDOM(0); + else + acoord = SP_COORD_PACK(x, y); + + tmpaltar.coord = acoord; + tmpaltar.align = align; + tmpaltar.shrine = shrine; + + create_altar(&tmpaltar, g.coder->croom); + + return 0; +} + +const struct { + const char *name; + int type; +} trap_types[] = { { "arrow", ARROW_TRAP }, + { "dart", DART_TRAP }, + { "falling rock", ROCKTRAP }, + { "board", SQKY_BOARD }, + { "bear", BEAR_TRAP }, + { "land mine", LANDMINE }, + { "rolling boulder", ROLLING_BOULDER_TRAP }, + { "sleep gas", SLP_GAS_TRAP }, + { "rust", RUST_TRAP }, + { "fire", FIRE_TRAP }, + { "pit", PIT }, + { "spiked pit", SPIKED_PIT }, + { "hole", HOLE }, + { "trap door", TRAPDOOR }, + { "teleport", TELEP_TRAP }, + { "level teleport", LEVEL_TELEP }, + { "magic portal", MAGIC_PORTAL }, + { "web", WEB }, + { "statue", STATUE_TRAP }, + { "magic", MAGIC_TRAP }, + { "anti magic", ANTI_MAGIC }, + { "polymorph", POLY_TRAP }, + { "vibrating square", VIBRATING_SQUARE }, + { 0, 0 } }; + +int +get_table_traptype_opt(L, name, defval) +lua_State *L; +const char *name; +int defval; +{ + char *trapstr = get_table_str_opt(L, name, ""); + if (trapstr && *trapstr) { + int i; + for (i = 0; trap_types[i].name; i++) + if (!strcmpi(trapstr, trap_types[i].name)) { + Free(trapstr); + return trap_types[i].type; + } + } + Free(trapstr); + return defval; +} + +/* trap({ type = "hole", x = 1, y = 1 }); */ +/* trap("hole", 3, 4); */ +/* trap("level teleport", {5, 8}); */ +/* trap("rust") */ +/* trap(); */ +int +lspo_trap(L) +lua_State *L; +{ + spltrap tmptrap; + int x, y; + /* long tcoord; */ /* REVIEW: unreferenced */ + int argc = lua_gettop(L); + + create_des_coder(); + + if (argc == 1 && lua_type(L, 1) == LUA_TSTRING) { + const char *trapstr = luaL_checkstring(L, 1); + int i; + + tmptrap.type = -1; + for (i = 0; trap_types[i].name; i++) + if (!strcmpi(trapstr, trap_types[i].name)) { + tmptrap.type = trap_types[i].type; + break; + } + x = y = -1; + } else if (argc == 2 && lua_type(L, 1) == LUA_TSTRING + && lua_type(L, 2) == LUA_TTABLE) { + const char *trapstr = luaL_checkstring(L, 1); + int i; + + tmptrap.type = -1; + for (i = 0; trap_types[i].name; i++) + if (!strcmpi(trapstr, trap_types[i].name)) { + tmptrap.type = trap_types[i].type; + break; + } + get_coord(L, 2, &x, &y); + } else if (argc == 3) { + const char *trapstr = luaL_checkstring(L, 1); + int i; + tmptrap.type = -1; + for (i = 0; trap_types[i].name; i++) + if (!strcmpi(trapstr, trap_types[i].name)) { + tmptrap.type = trap_types[i].type; + break; + } + x = luaL_checkinteger(L, 2); + y = luaL_checkinteger(L, 3); + + if (tmptrap.type == -1) + nhl_error(L, "Unknown trap type"); + + } else { + lcheck_param_table(L); + + x = get_table_int_opt(L, "x", -1); + y = get_table_int_opt(L, "y", -1); + tmptrap.type = get_table_traptype_opt(L, "type", -1); + + if (x == -1 && y == -1) { + lua_getfield(L, 1, "coord"); + get_coord(L, -1, &x, &y); + lua_pop(L, 1); } } - opvar_free(gcoord); - opvar_free(typ); - opvar_free(txt); + if (x == -1 && y == -1) + tmptrap.coord = SP_COORD_PACK_RANDOM(0); + else + tmptrap.coord = SP_COORD_PACK(x, y); + + create_trap(&tmptrap, g.coder->croom); + + return 0; } -void -spo_altar(coder) -struct sp_coder *coder; +/* gold({ amount = 500, x = 2, y = 5 });*/ +int +lspo_gold(L) +lua_State *L; { - static const char nhFunc[] = "spo_altar"; - struct opvar *al, *shrine, *acoord; - altar tmpaltar; - - if (!OV_pop_i(al) || !OV_pop_i(shrine) || !OV_pop_c(acoord)) - return; - - tmpaltar.coord = OV_i(acoord); - tmpaltar.align = OV_i(al); - tmpaltar.shrine = OV_i(shrine); - - create_altar(&tmpaltar, coder->croom); - - opvar_free(acoord); - opvar_free(shrine); - opvar_free(al); -} - -void -spo_trap(coder) -struct sp_coder *coder; -{ - static const char nhFunc[] = "spo_trap"; - struct opvar *type; - struct opvar *tcoord; - spltrap tmptrap; - - if (!OV_pop_i(type) || !OV_pop_c(tcoord)) - return; - - tmptrap.coord = OV_i(tcoord); - tmptrap.type = OV_i(type); - - create_trap(&tmptrap, coder->croom); - opvar_free(tcoord); - opvar_free(type); -} - -void -spo_gold(coder) -struct sp_coder *coder; -{ - static const char nhFunc[] = "spo_gold"; - struct opvar *gcoord, *amt; schar x, y; long amount; + long gcoord; + int gx, gy; - if (!OV_pop_c(gcoord) || !OV_pop_i(amt)) - return; - amount = OV_i(amt); - get_location_coord(&x, &y, DRY, coder->croom, OV_i(gcoord)); - if (amount == -1) + create_des_coder(); + + lcheck_param_table(L); + + x = gx = get_table_int_opt(L, "x", -1); + y = gy = get_table_int_opt(L, "y", -1); + + if (x == -1 && y == -1) + gcoord = SP_COORD_PACK_RANDOM(0); + else + gcoord = SP_COORD_PACK(gx, gy); + amount = get_table_int_opt(L, "amount", -1); + get_location_coord(&x, &y, DRY, g.coder->croom, gcoord); + if (amount < 0) amount = rnd(200); mkgold(amount, x, y); - opvar_free(gcoord); - opvar_free(amt); + + return 0; } -void -spo_corridor(coder) -struct sp_coder *coder; +/* corridor({ srcroom=1, srcdoor=2, srcwall="north", destroom=2, destdoor=1, destwall="west" });*/ +int +lspo_corridor(L) +lua_State *L; { - static const char nhFunc[] = "spo_corridor"; - struct opvar *deswall, *desdoor, *desroom, *srcwall, *srcdoor, *srcroom; + const char *const walldirs[] = { "all", "random", "north", "west", "east", "south", NULL }; + const int walldirs2i[] = { W_ANY, -1, W_NORTH, W_WEST, W_EAST, W_SOUTH, 0 }; corridor tc; - if (!OV_pop_i(deswall) || !OV_pop_i(desdoor) || !OV_pop_i(desroom) - || !OV_pop_i(srcwall) || !OV_pop_i(srcdoor) || !OV_pop_i(srcroom)) - return; + create_des_coder(); - tc.src.room = OV_i(srcroom); - tc.src.door = OV_i(srcdoor); - tc.src.wall = OV_i(srcwall); - tc.dest.room = OV_i(desroom); - tc.dest.door = OV_i(desdoor); - tc.dest.wall = OV_i(deswall); + lcheck_param_table(L); + + tc.src.room = get_table_int(L, "srcroom"); + tc.src.door = get_table_int(L, "srcdoor"); + tc.src.wall = walldirs2i[get_table_option(L, "srcwall", "all", walldirs)]; + tc.dest.room = get_table_int(L, "destroom"); + tc.dest.door = get_table_int(L, "destdoor"); + tc.dest.wall = walldirs2i[get_table_option(L, "destwall", "all", walldirs)]; create_corridor(&tc); - opvar_free(deswall); - opvar_free(desdoor); - opvar_free(desroom); - opvar_free(srcwall); - opvar_free(srcdoor); - opvar_free(srcroom); + return 0; } -struct opvar * -selection_opvar(nbuf) -char *nbuf; +/* random_corridors(); */ +int +lspo_random_corridors(L) +lua_State *L; { - struct opvar *ov; - char buf[(COLNO * ROWNO) + 1]; + corridor tc; - if (!nbuf) { - (void) memset(buf, 1, sizeof(buf)); - buf[(COLNO * ROWNO)] = '\0'; - ov = opvar_new_str(buf); - } else { - ov = opvar_new_str(nbuf); - } - ov->spovartyp = SPOVAR_SEL; - return ov; + create_des_coder(); + + tc.src.room = -1; + tc.src.door = -1; + tc.src.wall = -1; + tc.dest.room = -1; + tc.dest.door = -1; + tc.dest.wall = -1; + + create_corridor(&tc); + + return 0; } -xchar -selection_getpoint(x, y, ov) -int x, y; -struct opvar *ov; +/* selection */ +struct selectionvar * +selection_new() { - if (!ov || ov->spovartyp != SPOVAR_SEL) - return 0; - if (x < 0 || y < 0 || x >= COLNO || y >= ROWNO) - return 0; + struct selectionvar *tmps = (struct selectionvar *) alloc(sizeof (struct selectionvar)); - return (ov->vardata.str[COLNO * y + x] - 1); + tmps->wid = COLNO; + tmps->hei = ROWNO; + tmps->map = (char *)alloc((COLNO * ROWNO) + 1); + (void) memset(tmps->map, 1, (COLNO * ROWNO)); + tmps->map[(COLNO * ROWNO)] = '\0'; + + return tmps; } void -selection_setpoint(x, y, ov, c) +selection_free(sel) +struct selectionvar *sel; +{ + if (!sel) + return; + Free(sel->map); + sel->map = NULL; + sel->wid = sel->hei = 0; +} + +struct selectionvar * +selection_clone(sel) +struct selectionvar *sel; +{ + struct selectionvar *tmps = (struct selectionvar *) alloc(sizeof (struct selectionvar)); + + tmps->wid = sel->wid; + tmps->hei = sel->hei; + tmps->map = dupstr(sel->map); + + return tmps; +} + +xchar +selection_getpoint(x, y, sel) int x, y; -struct opvar *ov; +struct selectionvar *sel; +{ + if (!sel || !sel->map) + return 0; + if (x < 0 || y < 0 || x >= sel->wid || y >= sel->hei) + return 0; + + return (sel->map[sel->wid * y + x] - 1); +} + +void +selection_setpoint(x, y, sel, c) +int x, y; +struct selectionvar *sel; xchar c; { - if (!ov || ov->spovartyp != SPOVAR_SEL) + if (!sel || !sel->map) return; - if (x < 0 || y < 0 || x >= COLNO || y >= ROWNO) + if (x < 0 || y < 0 || x >= sel->wid || y >= sel->hei) return; - ov->vardata.str[COLNO * y + x] = (char) (c + 1); + sel->map[sel->wid * y + x] = (char) (c + 1); } -struct opvar * +struct selectionvar * selection_not(s) -struct opvar *s; +struct selectionvar *s; { - struct opvar *ov; int x, y; - ov = selection_opvar((char *) 0); - if (!ov) - return NULL; - for (x = 0; x < COLNO; x++) - for (y = 0; y < ROWNO; y++) - if (!selection_getpoint(x, y, s)) - selection_setpoint(x, y, ov, 1); + for (x = 0; x < s->wid; x++) + for (y = 0; y < s->hei; y++) + selection_setpoint(x, y, s, selection_getpoint(x, y, s) ? 0 : 1); - return ov; + return s; } -struct opvar * +struct selectionvar * selection_logical_oper(s1, s2, oper) -struct opvar *s1, *s2; +struct selectionvar *s1, *s2; char oper; { - struct opvar *ov; + struct selectionvar *ov; int x, y; - ov = selection_opvar((char *) 0); + ov = selection_new(); if (!ov) return NULL; - for (x = 0; x < COLNO; x++) - for (y = 0; y < ROWNO; y++) { + for (x = 0; x < ov->wid; x++) + for (y = 0; y < ov->hei; y++) { switch (oper) { default: case '|': @@ -3735,23 +3621,21 @@ char oper; return ov; } -struct opvar * -selection_filter_mapchar(ov, mc) -struct opvar *ov; -struct opvar *mc; +struct selectionvar * +selection_filter_mapchar(ov, typ, lit) +struct selectionvar *ov; +xchar typ; +int lit; { int x, y; - schar mapc; - xchar lit; - struct opvar *ret = selection_opvar((char *) 0); + struct selectionvar *ret = selection_new(); - if (!ov || !mc || !ret) + if (!ov || !ret) return NULL; - mapc = SP_MAPCHAR_TYP(OV_i(mc)); - lit = SP_MAPCHAR_LIT(OV_i(mc)); - for (x = 0; x < COLNO; x++) - for (y = 0; y < ROWNO; y++) - if (selection_getpoint(x, y, ov) && (levl[x][y].typ == mapc)) { + + for (x = 0; x < ret->wid; x++) + for (y = 0; y < ret->hei; y++) + if (selection_getpoint(x, y, ov) && (levl[x][y].typ == typ)) { switch (lit) { default: case -2: @@ -3772,22 +3656,22 @@ struct opvar *mc; void selection_filter_percent(ov, percent) -struct opvar *ov; +struct selectionvar *ov; int percent; { int x, y; if (!ov) return; - for (x = 0; x < COLNO; x++) - for (y = 0; y < ROWNO; y++) + for (x = 0; x < ov->wid; x++) + for (y = 0; y < ov->hei; y++) if (selection_getpoint(x, y, ov) && (rn2(100) >= percent)) selection_setpoint(x, y, ov, 0); } -STATIC_OVL int +int selection_rndcoord(ov, x, y, removeit) -struct opvar *ov; +struct selectionvar *ov; schar *x, *y; boolean removeit; { @@ -3795,20 +3679,21 @@ boolean removeit; int c; int dx, dy; - for (dx = 0; dx < COLNO; dx++) - for (dy = 0; dy < ROWNO; dy++) - if (isok(dx, dy) && selection_getpoint(dx, dy, ov)) + for (dx = 0; dx < ov->wid; dx++) + for (dy = 0; dy < ov->hei; dy++) + if (selection_getpoint(dx, dy, ov)) idx++; if (idx) { c = rn2(idx); - for (dx = 0; dx < COLNO; dx++) - for (dy = 0; dy < ROWNO; dy++) - if (isok(dx, dy) && selection_getpoint(dx, dy, ov)) { + for (dx = 0; dx < ov->wid; dx++) + for (dy = 0; dy < ov->hei; dy++) + if (selection_getpoint(dx, dy, ov)) { if (!c) { *x = dx; *y = dy; - if (removeit) selection_setpoint(dx, dy, ov, 0); + if (removeit) + selection_setpoint(dx, dy, ov, 0); return 1; } c--; @@ -3820,21 +3705,17 @@ boolean removeit; void selection_do_grow(ov, dir) -struct opvar *ov; +struct selectionvar *ov; int dir; { int x, y; - char tmp[COLNO][ROWNO]; + struct selectionvar *tmp = selection_new(); - if (ov->spovartyp != SPOVAR_SEL) - return; - if (!ov) + if (!ov || !tmp) return; - (void) memset(tmp, 0, sizeof tmp); - - for (x = 1; x < COLNO; x++) - for (y = 0; y < ROWNO; y++) { + for (x = 1; x < ov->wid; x++) + for (y = 0; y < ov->hei; y++) { /* note: dir is a mask of multiple directions, but the only way to specify diagonals is by including the two adjacent orthogonal directions, which effectively specifies three- @@ -3851,14 +3732,16 @@ int dir; || ((dir & W_SOUTH) && selection_getpoint(x, y - 1, ov)) || (((dir & (W_SOUTH | W_WEST)) == (W_SOUTH | W_WEST)) && selection_getpoint(x + 1, y - 1, ov))) { - tmp[x][y] = 1; + selection_setpoint(x, y, tmp, 1); } } - for (x = 1; x < COLNO; x++) - for (y = 0; y < ROWNO; y++) - if (tmp[x][y]) + for (x = 1; x < ov->wid; x++) + for (y = 0; y < ov->hei; y++) + if (selection_getpoint(x, y, tmp)) selection_setpoint(x, y, ov, 1); + + selection_free(tmp); } STATIC_VAR int FDECL((*selection_flood_check_func), (int, int)); @@ -3878,6 +3761,14 @@ int x,y; return (floodfillchk_match_under_typ == levl[x][y].typ); } +void +set_floodfillchk_match_under(typ) +xchar typ; +{ + floodfillchk_match_under_typ = typ; + set_selection_floodfillchk(floodfillchk_match_under); +} + STATIC_OVL int floodfillchk_match_accessible(x, y) int x, y; @@ -3906,12 +3797,11 @@ int n; void selection_floodfill(ov, x, y, diagonals) -struct opvar *ov; +struct selectionvar *ov; int x, y; boolean diagonals; { - static const char nhFunc[] = "selection_floodfill"; - struct opvar *tmp = selection_opvar((char *) 0); + struct selectionvar *tmp = selection_new(); #define SEL_FLOOD_STACK (COLNO * ROWNO) #define SEL_FLOOD(nx, ny) \ do { \ @@ -3936,7 +3826,7 @@ boolean diagonals; xchar dy[SEL_FLOOD_STACK]; if (selection_flood_check_func == (int FDECL((*), (int, int))) 0) { - opvar_free(tmp); + selection_free(tmp); return; } SEL_FLOOD(x, y); @@ -3962,13 +3852,13 @@ boolean diagonals; #undef SEL_FLOOD #undef SEL_FLOOD_STACK #undef SEL_FLOOD_CHKDIR - opvar_free(tmp); + selection_free(tmp); } /* McIlroy's Ellipse Algorithm */ void selection_do_ellipse(ov, xc, yc, a, b, filled) -struct opvar *ov; +struct selectionvar *ov; int xc, yc, a, b, filled; { /* e(x,y) = b^2*x^2 + a^2*y^2 - a^2*b^2 */ int x = 0, y = b; @@ -4080,7 +3970,7 @@ long x1, y1, x2, y2, x3, y3; void selection_do_gradient(ov, x, y, x2, y2, gtyp, mind, maxd, limit) -struct opvar *ov; +struct selectionvar *ov; long x, y, x2, y2, gtyp, mind, maxd, limit; { long dx, dy, dofs; @@ -4132,7 +4022,7 @@ long x, y, x2, y2, gtyp, mind, maxd, limit; void selection_do_line(x1, y1, x2, y2, ov) schar x1, y1, x2, y2; -struct opvar *ov; +struct selectionvar *ov; { int d0, dx, dy, ai, bi, xi, yi; @@ -4186,7 +4076,7 @@ struct opvar *ov; void selection_do_randline(x1, y1, x2, y2, rough, rec, ov) schar x1, y1, x2, y2, rough, rec; -struct opvar *ov; +struct selectionvar *ov; { int mx, my; int dx, dy; @@ -4227,20 +4117,49 @@ struct opvar *ov; void selection_iterate(ov, func, arg) -struct opvar *ov; +struct selectionvar *ov; select_iter_func func; genericptr_t arg; { int x, y; + if (!ov) + return; + /* yes, this is very naive, but it's not _that_ expensive. */ - for (x = 0; x < COLNO; x++) - for (y = 0; y < ROWNO; y++) + for (x = 0; x < ov->wid; x++) + for (y = 0; y < ov->hei; y++) if (selection_getpoint(x, y, ov)) (*func)(x, y, arg); } + void +stackDump(L) +lua_State *L; +{ + int i; + int top = lua_gettop(L); + for (i = 1; i <= top; i++) { /* repeat for each level */ + int t = lua_type(L, i); + switch (t) { + case LUA_TSTRING: /* strings */ + pline("%i:\"%s\"", i, lua_tostring(L, i)); + break; + case LUA_TBOOLEAN: /* booleans */ + pline("%i:%s", i, lua_toboolean(L, i) ? "true" : "false"); + break; + case LUA_TNUMBER: /* numbers */ + pline("%i:%g", i, lua_tonumber(L, i)); + break; + default: /* other values */ + pline("%i:%s", i, lua_typename(L, t)); + break; + } + } +} + +STATIC_OVL void sel_set_ter(x, y, arg) int x, y; genericptr_t arg; @@ -4258,7 +4177,7 @@ genericptr_t arg; } } -void +STATIC_OVL void sel_set_feature(x, y, arg) int x, y; genericptr_t arg; @@ -4268,7 +4187,7 @@ genericptr_t arg; levl[x][y].typ = (*(int *) arg); } -void +STATIC_OVL void sel_set_door(dx, dy, arg) int dx, dy; genericptr_t arg; @@ -4288,121 +4207,239 @@ genericptr_t arg; g.SpLev_Map[x][y] = 1; } -void -spo_door(coder) -struct sp_coder *coder; +/* door({ x = 1, y = 1, state = "nodoor" }); */ +/* door({ wall = "north", pos = 3, state="secret" }); */ +/* door("nodoor", 1, 2); */ +int +lspo_door(L) +lua_State *L; { - static const char nhFunc[] = "spo_door"; - struct opvar *msk, *sel; + int msk; + schar x,y; xchar typ; + const char *const doorstates[] = { "random", "open", "closed", "locked", "nodoor", "broken", "secret", NULL }; + const int doorstates2i[] = { -1, D_ISOPEN, D_CLOSED, D_LOCKED, D_NODOOR, D_BROKEN, D_SECRET }; + int argc = lua_gettop(L); - if (!OV_pop_i(msk) || !OV_pop_typ(sel, SPOVAR_SEL)) - return; + create_des_coder(); - typ = OV_i(msk) == -1 ? rnddoor() : (xchar) OV_i(msk); + if (argc == 3) { + msk = doorstates2i[luaL_checkoption(L, 1, "random", doorstates)]; + x = luaL_checkinteger(L, 2); + y = luaL_checkinteger(L, 3); - selection_iterate(sel, sel_set_door, (genericptr_t) &typ); + } else { + lcheck_param_table(L); - opvar_free(sel); - opvar_free(msk); + x = get_table_int_opt(L, "x", -1); + y = get_table_int_opt(L, "y", -1); + msk = doorstates2i[get_table_option(L, "state", "random", doorstates)]; + } + + typ = (msk == -1) ? rnddoor() : (xchar) msk; + + if (x == -1 && y == -1) { + const char *const walldirs[] = { "all", "random", "north", "west", "east", "south", NULL }; + const int walldirs2i[] = { W_ANY, W_ANY, W_NORTH, W_WEST, W_EAST, W_SOUTH, 0 }; + room_door tmpd; + + tmpd.secret = (typ == D_SECRET) ? 1 : 0; + tmpd.mask = msk; + tmpd.pos = get_table_int_opt(L, "pos", -1); + tmpd.wall = walldirs2i[get_table_option(L, "wall", "all", walldirs)]; + + create_door(&tmpd, g.coder->croom); + link_doors_rooms(); + } else { + /*selection_iterate(sel, sel_set_door, (genericptr_t) &typ);*/ + get_location_coord(&x, &y, ANY_LOC, g.coder->croom, SP_COORD_PACK(x,y)); + if (!isok(x,y)) + nhl_error(L, "door coord not ok"); + sel_set_door(x, y, (genericptr_t) &typ); + } + + return 0; } -void -spo_feature(coder) -struct sp_coder *coder; +/* feature("fountain", x, y); */ +/* feature("fountain", {x,y}); */ +/* feature({ type="fountain", x=NN, y=NN }); */ +int +lspo_feature(L) +lua_State *L; { - static const char nhFunc[] = "spo_feature"; - struct opvar *sel; + const char *const features[] = { "fountain", "sink", "pool", NULL }; + const int features2i[] = { FOUNTAIN, SINK, POOL, STONE }; + schar x,y; int typ; + int argc = lua_gettop(L); - if (!OV_pop_typ(sel, SPOVAR_SEL)) - return; + create_des_coder(); - switch (coder->opcode) { + if (argc == 2 && lua_type(L, 1) == LUA_TSTRING + && lua_type(L, 2) == LUA_TTABLE) { + int fx, fy; + typ = features2i[luaL_checkoption(L, 1, NULL, features)]; + get_coord(L, 2, &fx, &fy); + x = fx; + y = fy; + } else if (argc == 3) { + typ = features2i[luaL_checkoption(L, 1, NULL, features)]; + x = luaL_checkinteger(L, 2); + y = luaL_checkinteger(L, 3); + } else { + lcheck_param_table(L); + + x = get_table_int(L, "x"); + y = get_table_int(L, "y"); + typ = features2i[get_table_option(L, "type", NULL, features)]; + } + + get_location_coord(&x, &y, ANY_LOC, g.coder->croom, SP_COORD_PACK(x,y)); + + switch (typ) { default: - impossible("spo_feature called with wrong opcode %i.", coder->opcode); break; - case SPO_FOUNTAIN: + case FOUNTAIN: typ = FOUNTAIN; break; - case SPO_SINK: + case SINK: typ = SINK; break; - case SPO_POOL: + case POOL: typ = POOL; break; } - selection_iterate(sel, sel_set_feature, (genericptr_t) &typ); - opvar_free(sel); + if (typ == STONE) + impossible("feature has unknown type param."); + else + sel_set_feature(x, y, (genericptr_t) &typ); + + return 0; } -void -spo_terrain(coder) -struct sp_coder *coder; +/* terrain({ x=NN, y=NN, typ=MAPCHAR, lit=BOOL }); */ +/* terrain({ selection=SELECTION, typ=MAPCHAR, lit=BOOL }); */ +/* terrain( SELECTION, MAPCHAR [, BOOL ] ); */ +/* terrain({x,y}, MAPCHAR); */ +/* terrain(x,y, MAPCHAR); */ +int +lspo_terrain(L) +lua_State *L; { - static const char nhFunc[] = "spo_terrain"; terrain tmpterrain; - struct opvar *ter, *sel; + xchar x, y; + /* char *ter; */ /* REVIEW: unreferenced */ + struct selectionvar *sel = NULL; + int argc = lua_gettop(L); - if (!OV_pop_typ(ter, SPOVAR_MAPCHAR) || !OV_pop_typ(sel, SPOVAR_SEL)) - return; + create_des_coder(); - tmpterrain.ter = SP_MAPCHAR_TYP(OV_i(ter)); - tmpterrain.tlit = SP_MAPCHAR_LIT(OV_i(ter)); - selection_iterate(sel, sel_set_ter, (genericptr_t) &tmpterrain); + if (argc == 1) { + lcheck_param_table(L); - opvar_free(ter); - opvar_free(sel); + x = get_table_int_opt(L, "x", -1); + y = get_table_int_opt(L, "y", -1); + if (x == -1 && y == -1) { + lua_getfield(L, 1, "selection"); + sel = l_selection_check(L, -1); + lua_pop(L, 1); + } + tmpterrain.ter = get_table_mapchr(L, "typ"); + tmpterrain.tlit = get_table_int_opt(L, "lit", 0); + } else if (argc == 2 && lua_type(L, 1) == LUA_TTABLE + && lua_type(L, 2) == LUA_TSTRING) { + int tx, ty; + tmpterrain.ter = check_mapchr(luaL_checkstring(L, 2)); + lua_pop(L, 1); + get_coord(L, 1, &tx, &ty); + x = tx; + y = ty; + } else if (argc == 2) { + sel = l_selection_check(L, 1); + tmpterrain.ter = check_mapchr(luaL_checkstring(L, 2)); + tmpterrain.tlit = luaL_optinteger(L, 3, 0); /* FIXME: this can never be here, argc==2 */ + } else if (argc == 3) { + x = luaL_checkinteger(L, 1); + y = luaL_checkinteger(L, 2); + tmpterrain.ter = check_mapchr(luaL_checkstring(L, 3)); + tmpterrain.tlit = 0; + } else { + nhl_error(L, "wrong parameters"); + } + + if (tmpterrain.ter == INVALID_TYPE) + nhl_error(L, "Erroneous map char"); + + if (sel) { + selection_iterate(sel, sel_set_ter, (genericptr_t) &tmpterrain); + } else { + get_location_coord(&x, &y, ANY_LOC, g.coder->croom, SP_COORD_PACK(x,y)); + sel_set_ter(x,y, (genericptr_t) &tmpterrain); + } + + return 0; } -void -spo_replace_terrain(coder) -struct sp_coder *coder; +/* TODO: better parameters, allow selection instead of x1,y1,x2,y2 nonsense. + TODO: or remove, if terrain + selection can do this better? +*/ +/* replace_terrain({ x1=NN,y1=NN, x2=NN,y2=NN, fromterrain=MAPCHAR, toterrain=MAPCHAR, lit=N, chance=NN }); */ +/* replace_terrain({ region={x1,y1, x2,y2}, fromterrain=MAPCHAR, toterrain=MAPCHAR, lit=N, chance=NN }); */ +int +lspo_replace_terrain(L) +lua_State *L; { - static const char nhFunc[] = "spo_replace_terrain"; replaceterrain rt; - struct opvar *reg, *from_ter, *to_ter, *chance; + /* char *toter, *fromter; */ /* REVIEW: unreferenced */ + xchar totyp, fromtyp; - if (!OV_pop_i(chance) || !OV_pop_typ(to_ter, SPOVAR_MAPCHAR) - || !OV_pop_typ(from_ter, SPOVAR_MAPCHAR) || !OV_pop_r(reg)) - return; + create_des_coder(); - rt.chance = OV_i(chance); - rt.tolit = SP_MAPCHAR_LIT(OV_i(to_ter)); - rt.toter = SP_MAPCHAR_TYP(OV_i(to_ter)); - rt.fromter = SP_MAPCHAR_TYP(OV_i(from_ter)); - /* TODO: use SP_MAPCHAR_LIT(OV_i(from_ter)) too */ - rt.x1 = SP_REGION_X1(OV_i(reg)); - rt.y1 = SP_REGION_Y1(OV_i(reg)); - rt.x2 = SP_REGION_X2(OV_i(reg)); - rt.y2 = SP_REGION_Y2(OV_i(reg)); + lcheck_param_table(L); - replace_terrain(&rt, coder->croom); + totyp = get_table_mapchr(L, "toterrain"); - opvar_free(reg); - opvar_free(from_ter); - opvar_free(to_ter); - opvar_free(chance); + fromtyp = get_table_mapchr(L, "fromterrain"); + + rt.chance = get_table_int_opt(L, "chance", 100); + rt.tolit = get_table_int_opt(L, "lit", 1); + rt.toter = totyp; + rt.fromter = fromtyp; + rt.x1 = get_table_int_opt(L, "x1", -1); + rt.y1 = get_table_int_opt(L, "y1", -1); + rt.x2 = get_table_int_opt(L, "x2", -1); + rt.y2 = get_table_int_opt(L, "y2", -1); + + if (rt.x1 == -1 && rt.y1 == -1 && rt.x2 == -1 && rt.y2 == -1) { + int rx1, ry1, rx2, ry2; + get_table_region(L, "region", &rx1, &ry1, &rx2, &ry2, FALSE); + rt.x1 = rx1; rt.y1 = ry1; + rt.x2 = rx2; rt.y2 = ry2; + } + + replace_terrain(&rt, g.coder->croom); + + return 0; } STATIC_OVL boolean generate_way_out_method(nx,ny, ov) int nx,ny; -struct opvar *ov; +struct selectionvar *ov; { - static const char nhFunc[] = "generate_way_out_method"; const int escapeitems[] = { PICK_AXE, DWARVISH_MATTOCK, WAN_DIGGING, WAN_TELEPORTATION, SCR_TELEPORTATION, RIN_TELEPORTATION }; - struct opvar *ov2 = selection_opvar((char *) 0), *ov3; + struct selectionvar *ov2 = selection_new(), *ov3; schar x, y; boolean res = TRUE; selection_floodfill(ov2, nx, ny, TRUE); - ov3 = opvar_clone(ov2); + ov3 = selection_clone(ov2); /* try to make a secret door */ while (selection_rndcoord(ov3, &x, &y, TRUE)) { @@ -4438,8 +4475,8 @@ struct opvar *ov; /* try to make a hole or a trapdoor */ if (Can_fall_thru(&u.uz)) { - opvar_free(ov3); - ov3 = opvar_clone(ov2); + selection_free(ov3); + ov3 = selection_clone(ov2); while (selection_rndcoord(ov3, &x, &y, TRUE)) { if (maketrap(x,y, rn2(2) ? HOLE : TRAPDOOR)) goto gotitdone; @@ -4454,16 +4491,15 @@ struct opvar *ov; res = FALSE; gotitdone: - opvar_free(ov2); - opvar_free(ov3); + selection_free(ov2); + selection_free(ov3); return res; } STATIC_OVL void ensure_way_out() { - static const char nhFunc[] = "ensure_way_out"; - struct opvar *ov = selection_opvar((char *) 0); + struct selectionvar *ov = selection_new(); struct trap *ttmp = g.ftrap; int x,y; boolean ret = TRUE; @@ -4500,55 +4536,108 @@ ensure_way_out() } outhere: ; } while (!ret); - opvar_free(ov); + selection_free(ov); +} + +int +get_table_intarray_entry(L, tableidx, entrynum) +lua_State *L; +int tableidx, entrynum; +{ + int ret = 0; + if (tableidx < 0) + tableidx--; + + lua_pushinteger(L, entrynum); + lua_gettable(L, tableidx); + if (lua_isnumber(L, -1)) { + ret = lua_tonumber(L, -1); + } else { + char buf[BUFSZ]; + Sprintf(buf, "Array entry #%i is %s, expected number", + 1, luaL_typename(L, -1)); + nhl_error(L, buf); + } + lua_pop(L, 1); + return ret; +} + +STATIC_OVL int +get_table_region(L, name, x1,y1, x2,y2, optional) +lua_State *L; +const char *name; +int *x1, *y1, *x2, *y2; +boolean optional; +{ + int arrlen /*, i*/ /* REVIEW: unreferenced */; + /* int retvals[4]; */ /* REVIEW: unreferenced */ + + lua_getfield(L, 1, name); + if (optional && lua_type(L, -1) == LUA_TNIL) { + lua_pop(L, 1); + return 1; + } + + luaL_checktype(L, -1, LUA_TTABLE); + + lua_len(L, -1); + arrlen = lua_tonumber(L, -1); + lua_pop(L, 1); + if (arrlen != 4) { + nhl_error(L, "Not a region"); + lua_pop(L, 1); + return 0; + } + + *x1 = get_table_intarray_entry(L, -1, 1); + *y1 = get_table_intarray_entry(L, -1, 2); + *x2 = get_table_intarray_entry(L, -1, 3); + *y2 = get_table_intarray_entry(L, -1, 4); + + lua_pop(L, 1); + return 1; +} + +STATIC_OVL int +get_coord(L, index, x, y) +lua_State *L; +int index; +int *x, *y; +{ + if (lua_type(L, index) == LUA_TTABLE) { + int arrlen; + + lua_len(L, index); + arrlen = lua_tonumber(L, -1); + lua_pop(L, 1); + if (arrlen != 2) { + nhl_error(L, "Not a coordinate"); + return 0; + } + + *x = get_table_intarray_entry(L, index, 1); + *y = get_table_intarray_entry(L, index, 2); + + return 1; + } + return 0; } void -spo_levregion(coder) -struct sp_coder *coder; +levregion_add(lregion) +lev_region *lregion; { - static const char nhFunc[] = "spo_levregion"; - struct opvar *rname, *padding, *rtype, *del_islev, *dy2, *dx2, *dy1, *dx1, - *in_islev, *iy2, *ix2, *iy1, *ix1; - - lev_region *tmplregion; - - if (!OV_pop_s(rname) || !OV_pop_i(padding) || !OV_pop_i(rtype) - || !OV_pop_i(del_islev) || !OV_pop_i(dy2) || !OV_pop_i(dx2) - || !OV_pop_i(dy1) || !OV_pop_i(dx1) || !OV_pop_i(in_islev) - || !OV_pop_i(iy2) || !OV_pop_i(ix2) || !OV_pop_i(iy1) - || !OV_pop_i(ix1)) - return; - - tmplregion = (lev_region *) alloc(sizeof(lev_region)); - - tmplregion->inarea.x1 = OV_i(ix1); - tmplregion->inarea.y1 = OV_i(iy1); - tmplregion->inarea.x2 = OV_i(ix2); - tmplregion->inarea.y2 = OV_i(iy2); - - tmplregion->delarea.x1 = OV_i(dx1); - tmplregion->delarea.y1 = OV_i(dy1); - tmplregion->delarea.x2 = OV_i(dx2); - tmplregion->delarea.y2 = OV_i(dy2); - - tmplregion->in_islev = OV_i(in_islev); - tmplregion->del_islev = OV_i(del_islev); - tmplregion->rtype = OV_i(rtype); - tmplregion->padding = OV_i(padding); - tmplregion->rname.str = dupstr(OV_s(rname)); - - if (!tmplregion->in_islev) { - get_location(&tmplregion->inarea.x1, &tmplregion->inarea.y1, ANY_LOC, + if (!lregion->in_islev) { + get_location(&lregion->inarea.x1, &lregion->inarea.y1, ANY_LOC, (struct mkroom *) 0); - get_location(&tmplregion->inarea.x2, &tmplregion->inarea.y2, ANY_LOC, + get_location(&lregion->inarea.x2, &lregion->inarea.y2, ANY_LOC, (struct mkroom *) 0); } - if (!tmplregion->del_islev) { - get_location(&tmplregion->delarea.x1, &tmplregion->delarea.y1, + if (!lregion->del_islev) { + get_location(&lregion->delarea.x1, &lregion->delarea.y1, ANY_LOC, (struct mkroom *) 0); - get_location(&tmplregion->delarea.x2, &tmplregion->delarea.y2, + get_location(&lregion->delarea.x2, &lregion->delarea.y2, ANY_LOC, (struct mkroom *) 0); } if (g.num_lregions) { @@ -4565,59 +4654,176 @@ struct sp_coder *coder; g.num_lregions = 1; g.lregions = (lev_region *) alloc(sizeof(lev_region)); } - (void) memcpy(&g.lregions[g.num_lregions - 1], tmplregion, + (void) memcpy(&g.lregions[g.num_lregions - 1], lregion, sizeof(lev_region)); - free(tmplregion); - - opvar_free(dx1); - opvar_free(dy1); - opvar_free(dx2); - opvar_free(dy2); - - opvar_free(ix1); - opvar_free(iy1); - opvar_free(ix2); - opvar_free(iy2); - - opvar_free(del_islev); - opvar_free(in_islev); - opvar_free(rname); - opvar_free(rtype); - opvar_free(padding); } -void -spo_region(coder) -struct sp_coder *coder; +/* teleport_region({ region = { x1,y1, x2,y2} }); */ +/* teleport_region({ region = { x1,y1, x2,y2}, [ region_islev = 1, ] exclude = { x1,y1, x2,y2}, [ exclude_islen = 1, ] [ dir = "up" ] }); */ +/* TODO: maybe allow using selection, with a new selection method "getextents()"? */ +int +lspo_teleport_region(L) +lua_State *L; +{ + const char *const teledirs[] = { "both", "down", "up", NULL }; + const int teledirs2i[] = { LR_TELE, LR_DOWNTELE, LR_UPTELE, -1 }; + lev_region tmplregion; + int x1,y1,x2,y2; + + create_des_coder(); + + lcheck_param_table(L); + + get_table_region(L, "region", &x1, &y1, &x2, &y2, FALSE); + tmplregion.inarea.x1 = x1; + tmplregion.inarea.y1 = y1; + tmplregion.inarea.x2 = x2; + tmplregion.inarea.y2 = y2; + + x1 = y1 = x2 = y2 = 0; + get_table_region(L, "exclude", &x1, &y1, &x2, &y2, TRUE); + tmplregion.delarea.x1 = x1; + tmplregion.delarea.y1 = y1; + tmplregion.delarea.x2 = x2; + tmplregion.delarea.y2 = y2; + + tmplregion.in_islev = get_table_boolean_opt(L, "region_islev", 0); + tmplregion.del_islev = get_table_boolean_opt(L, "exclude_islev", 0); + + tmplregion.rtype = teledirs2i[get_table_option(L, "dir", "both", teledirs)]; + tmplregion.padding = 0; + tmplregion.rname.str = NULL; + + levregion_add(&tmplregion); + + return 0; +} + +/* TODO: FIXME + from lev_comp SPO_LEVREGION was called as: + - STAIR:(x1,y1,x2,y2),(x1,y1,x2,y2),dir + - PORTAL:(x1,y1,x2,y2),(x1,y1,x2,y2),string + - BRANCH:(x1,y1,x2,y2),(x1,y1,x2,y2),dir + +*/ +/* levregion({ region = { x1,y1, x2,y2 }, exclude = { x1,y1, x2,y2 }, type = "portal", name="air" }); */ +/* TODO: allow region to be optional, defaulting to whole level */ +int +lspo_levregion(L) +lua_State *L; +{ + const char *const regiontypes[] = { "stair-down", "stair-up", "portal", "branch", "teleport", "teleport-up", "teleport-down", NULL }; + const int regiontypes2i[] = { LR_DOWNSTAIR, LR_UPSTAIR, LR_PORTAL, LR_BRANCH, LR_TELE, LR_UPTELE, LR_DOWNTELE, 0 }; + lev_region tmplregion; + int x1,y1,x2,y2; + + create_des_coder(); + + lcheck_param_table(L); + + get_table_region(L, "region", &x1, &y1, &x2, &y2, FALSE); + + tmplregion.inarea.x1 = x1; + tmplregion.inarea.y1 = y1; + tmplregion.inarea.x2 = x2; + tmplregion.inarea.y2 = y2; + + x1 = y1 = x2 = y2 = 0; + get_table_region(L, "exclude", &x1, &y1, &x2, &y2, TRUE); + + tmplregion.delarea.x1 = x1; + tmplregion.delarea.y1 = y1; + tmplregion.delarea.x2 = x2; + tmplregion.delarea.y2 = y2; + + tmplregion.in_islev = get_table_boolean_opt(L, "region_islev", 0); + tmplregion.del_islev = get_table_boolean_opt(L, "exclude_islev", 0); + tmplregion.rtype = regiontypes2i[get_table_option(L, "type", "stair-down", regiontypes)]; + tmplregion.padding = get_table_int_opt(L, "padding", 0); + tmplregion.rname.str = get_table_str_opt(L, "name", NULL); + + levregion_add(&tmplregion); + + return 0; +} + + +void +sel_set_lit(x, y, arg) +int x, y; +genericptr_t arg; +{ + int lit = *(int *)arg; + + levl[x][y].lit = (levl[x][y].typ == LAVAPOOL) ? 1 : lit; +} + +/* region(selection, lit); */ +/* region({ x1=NN, y1=NN, x2=NN, y2=NN, lit=BOOL, type=ROOMTYPE, joined=BOOL, irregular=BOOL, prefilled=BOOL [ , contents = FUNCTION ] }); */ +/* region({ region={x1,y1, x2,y2}, type="ordinary" }); */ +int +lspo_region(L) +lua_State *L; { - static const char nhFunc[] = "spo_region"; - struct opvar *rtype, *rlit, *rflags, *area; xchar dx1, dy1, dx2, dy2; register struct mkroom *troom; - boolean prefilled, room_not_needed, irregular, joined; + boolean prefilled = FALSE, room_not_needed, irregular = FALSE, joined = TRUE; + int rtype = OROOM, rlit = 1; + int argc = lua_gettop(L); - if (!OV_pop_i(rflags) || !OV_pop_i(rtype) || !OV_pop_i(rlit) - || !OV_pop_r(area)) - return; + create_des_coder(); - prefilled = !(OV_i(rflags) & (1 << 0)); - irregular = (OV_i(rflags) & (1 << 1)); - joined = !(OV_i(rflags) & (1 << 2)); + if (argc <= 1) { + lcheck_param_table(L); - if (OV_i(rtype) > MAXRTYPE) { - OV_i(rtype) -= MAXRTYPE + 1; - prefilled = TRUE; - } else - prefilled = FALSE; + /* TODO: check the prefilled, what was the default in lev_comp? */ + /* "unfilled" == 0, "filled" == 1, missing = "filled" */ - if (OV_i(rlit) < 0) - OV_i(rlit) = - (rnd(1 + abs(depth(&u.uz))) < 11 && rn2(77)) ? TRUE : FALSE; + /* TODO: "unfilled" ==> prefilled=1 */ + prefilled = get_table_boolean_opt(L, "prefilled", 0); + irregular = get_table_boolean_opt(L, "irregular", 0); + joined = get_table_boolean_opt(L, "joined", 1); + rtype = get_table_roomtype_opt(L, "type", OROOM); + rlit = get_table_int_opt(L, "lit", -1); + dx1 = get_table_int_opt(L, "x1", -1); /* TODO: area */ + dy1 = get_table_int_opt(L, "y1", -1); + dx2 = get_table_int_opt(L, "x2", -1); + dy2 = get_table_int_opt(L, "y2", -1); - dx1 = SP_REGION_X1(OV_i(area)); - dy1 = SP_REGION_Y1(OV_i(area)); - dx2 = SP_REGION_X2(OV_i(area)); - dy2 = SP_REGION_Y2(OV_i(area)); + if (dx1 == -1 && dy1 == -1 && dx2 == -1 && dy2 == -1) { + int rx1, ry1, rx2, ry2; + get_table_region(L, "region", &rx1, &ry1, &rx2, &ry2, FALSE); + dx1 = rx1; dy1 = ry1; + dx2 = rx2; dy2 = ry2; + } + if (dx1 == -1 && dy1 == -1 && dx2 == -1 && dy2 == -1) { + nhl_error(L, "region needs region"); + } + + } else if (argc == 2) { + /* region(selection, "lit"); */ + const char *const lits[] = { "unlit", "lit", NULL }; + struct selectionvar *sel = l_selection_check(L, 1); + + rlit = luaL_checkoption(L, 2, "lit", lits); + + /* + TODO: adjust region size for wall, but only if lit + TODO: lit=random + */ + if (rlit) + selection_do_grow(sel, W_ANY); + selection_iterate(sel, sel_set_lit, (genericptr_t) &rlit); + + /* TODO: skip the rest of this function? */ + return 0; + } else { + nhl_error(L, "Wrong parameters"); + return 0; + } + + if (rlit < 0) + rlit = (rnd(1 + abs(depth(&u.uz))) < 11 && rn2(77)) ? TRUE : FALSE; get_location(&dx1, &dy1, ANY_LOC, (struct mkroom *) 0); get_location(&dx2, &dy2, ANY_LOC, (struct mkroom *) 0); @@ -4625,30 +4831,25 @@ struct sp_coder *coder; /* for an ordinary room, `prefilled' is a flag to force an actual room to be created (such rooms are used to control placement of migrating monster arrivals) */ - room_not_needed = (OV_i(rtype) == OROOM && !irregular && !prefilled); + room_not_needed = (rtype == OROOM && !irregular && !prefilled); if (room_not_needed || g.nroom >= MAXNROFROOMS) { region tmpregion; if (!room_not_needed) impossible("Too many rooms on new level!"); - tmpregion.rlit = OV_i(rlit); + tmpregion.rlit = rlit; tmpregion.x1 = dx1; tmpregion.y1 = dy1; tmpregion.x2 = dx2; tmpregion.y2 = dy2; light_region(&tmpregion); - opvar_free(area); - opvar_free(rflags); - opvar_free(rlit); - opvar_free(rtype); - - return; + return 0; } troom = &g.rooms[g.nroom]; /* mark rooms that must be filled, but do it later */ - if (OV_i(rtype) != OROOM) + if (rtype != OROOM) troom->needfill = (prefilled ? 2 : 1); troom->needjoining = joined; @@ -4657,13 +4858,12 @@ struct sp_coder *coder; g.min_rx = g.max_rx = dx1; g.min_ry = g.max_ry = dy1; g.smeq[g.nroom] = g.nroom; - flood_fill_rm(dx1, dy1, g.nroom + ROOMOFFSET, OV_i(rlit), TRUE); - add_room(g.min_rx, g.min_ry, g.max_rx, g.max_ry, FALSE, OV_i(rtype), - TRUE); - troom->rlit = OV_i(rlit); + flood_fill_rm(dx1, dy1, g.nroom + ROOMOFFSET, rlit, TRUE); + add_room(g.min_rx, g.min_ry, g.max_rx, g.max_ry, FALSE, rtype, TRUE); + troom->rlit = rlit; troom->irregular = TRUE; } else { - add_room(dx1, dy1, dx2, dy2, OV_i(rlit), OV_i(rtype), TRUE); + add_room(dx1, dy1, dx2, dy2, rlit, rtype, TRUE); #ifdef SPECIALIZATION topologize(troom, FALSE); /* set roomno */ #else @@ -4672,68 +4872,111 @@ struct sp_coder *coder; } if (!room_not_needed) { - if (coder->n_subroom > 1) + if (g.coder->n_subroom > 1) impossible("region as subroom"); else { - coder->tmproomlist[coder->n_subroom] = troom; - coder->failed_room[coder->n_subroom] = FALSE; - coder->n_subroom++; + g.coder->tmproomlist[g.coder->n_subroom] = troom; + g.coder->failed_room[g.coder->n_subroom] = FALSE; + g.coder->n_subroom++; + update_croom(); + lua_getfield(L, 1, "contents"); + if (lua_type(L, -1) == LUA_TFUNCTION) { + lua_remove(L, -2); + lua_call(L, 0, 0); + } else + lua_pop(L, 1); + spo_endroom(g.coder); } } - opvar_free(area); - opvar_free(rflags); - opvar_free(rlit); - opvar_free(rtype); + return 0; } -void -spo_drawbridge(coder) -struct sp_coder *coder; +/* drawbridge({ dir="east", state="closed", x=05,y=08}); */ +int +lspo_drawbridge(L) +lua_State *L; { - static const char nhFunc[] = "spo_drawbridge"; + const char *const mwdirs[] = { "north", "south", "west", "east", "random", NULL }; + const int mwdirs2i[] = { DB_NORTH, DB_SOUTH, DB_WEST, DB_EAST, -1, -2 }; + const char *const dbopens[] = { "open", "closed", "random", NULL }; + const int dbopens2i[] = { 1, 0, -1, -2 }; xchar x, y; - int dopen; - struct opvar *dir, *db_open, *dcoord; +/* int dbopen; */ + int mx, my, dir; + int db_open; + long dcoord; - if (!OV_pop_i(dir) || !OV_pop_i(db_open) || !OV_pop_c(dcoord)) - return; + create_des_coder(); - get_location_coord(&x, &y, DRY | WET | HOT, coder->croom, OV_i(dcoord)); - if ((dopen = OV_i(db_open)) == -1) - dopen = !rn2(2); - if (!create_drawbridge(x, y, OV_i(dir), dopen ? TRUE : FALSE)) + lcheck_param_table(L); + + mx = get_table_int(L, "x"); + my = get_table_int(L, "y"); + dir = mwdirs2i[get_table_option(L, "dir", "random", mwdirs)]; + dcoord = SP_COORD_PACK(mx, my); + db_open = dbopens2i[get_table_option(L, "state", "random", dbopens)]; + x = mx; + y = my; + + get_location_coord(&x, &y, DRY | WET | HOT, g.coder->croom, dcoord); + /* REVIEW: from here down was using dbopen previously */ + if (db_open == -1) + db_open = !rn2(2); + if (!create_drawbridge(x, y, dir, db_open ? TRUE : FALSE)) impossible("Cannot create drawbridge."); g.SpLev_Map[x][y] = 1; - opvar_free(dcoord); - opvar_free(db_open); - opvar_free(dir); + return 0; } -void -spo_mazewalk(coder) -struct sp_coder *coder; +/* mazewalk({ x = NN, y = NN, typ = ".", dir = "north", stocked = 0 }); */ +/* mazewalk(x,y,dir); */ +int +lspo_mazewalk(L) +lua_State *L; { - static const char nhFunc[] = "spo_mazewalk"; + const char *const mwdirs[] = { "north", "south", "east", "west", "random", NULL }; + const int mwdirs2i[] = { W_NORTH, W_SOUTH, W_EAST, W_WEST, -1, -2 }; xchar x, y; - struct opvar *ftyp, *fstocked, *fdir, *mcoord; - int dir; + int mx, my; + xchar ftyp = ROOM; + int fstocked = 1, dir = -1; + long mcoord; + int argc = lua_gettop(L); - if (!OV_pop_i(ftyp) || !OV_pop_i(fstocked) || !OV_pop_i(fdir) - || !OV_pop_c(mcoord)) - return; + create_des_coder(); - dir = OV_i(fdir); + if (argc == 3) { + mx = luaL_checkinteger(L, 1); + my = luaL_checkinteger(L, 2); + dir = mwdirs2i[luaL_checkoption(L, 3, "random", mwdirs)]; + } else { + lcheck_param_table(L); - get_location_coord(&x, &y, ANY_LOC, coder->croom, OV_i(mcoord)); - if (!isok(x, y)) - return; - - if (OV_i(ftyp) < 1) { - OV_i(ftyp) = g.level.flags.corrmaze ? CORR : ROOM; + mx = get_table_int(L, "x"); + my = get_table_int(L, "y"); + ftyp = get_table_mapchr_opt(L, "typ", ROOM); + fstocked = get_table_boolean_opt(L, "stocked", 1); + dir = mwdirs2i[get_table_option(L, "dir", "random", mwdirs)]; } + mcoord = SP_COORD_PACK(mx, my); + x = mx; + y = my; + + get_location_coord(&x, &y, ANY_LOC, g.coder->croom, mcoord); + + if (!isok(x, y)) + return 0; + + if (ftyp < 1) { + ftyp = g.level.flags.corrmaze ? CORR : ROOM; + } + + if (dir == -1) + dir = mwdirs2i[rn2(4)]; + /* don't use move() - it doesn't use W_NORTH, etc. */ switch (dir) { case W_NORTH: @@ -4749,11 +4992,11 @@ struct sp_coder *coder; --x; break; default: - impossible("spo_mazewalk: Bad MAZEWALK direction"); + impossible("mazewalk: Bad direction"); } if (!IS_DOOR(levl[x][y].typ)) { - levl[x][y].typ = OV_i(ftyp); + levl[x][y].typ = ftyp; levl[x][y].flags = 0; } @@ -4769,7 +5012,7 @@ struct sp_coder *coder; x--; /* no need for IS_DOOR check; out of map bounds */ - levl[x][y].typ = OV_i(ftyp); + levl[x][y].typ = ftyp; levl[x][y].flags = 0; } @@ -4780,70 +5023,121 @@ struct sp_coder *coder; y--; } - walkfrom(x, y, OV_i(ftyp)); - if (OV_i(fstocked)) + walkfrom(x, y, ftyp); + if (fstocked) fill_empty_maze(); - opvar_free(mcoord); - opvar_free(fdir); - opvar_free(fstocked); - opvar_free(ftyp); + return 0; } -void -spo_wall_property(coder) -struct sp_coder *coder; +/* wall_property({ x1=0, y1=0, x2=78, y2=20, property="nondiggable" }); */ +/* wall_property({ region = {1,0, 78,20}, property="nonpasswall" }); */ +int +lspo_wall_property(L) +lua_State *L; { - static const char nhFunc[] = "spo_wall_property"; - struct opvar *r; - xchar dx1, dy1, dx2, dy2; - int wprop = (coder->opcode == SPO_NON_DIGGABLE) - ? W_NONDIGGABLE - : W_NONPASSWALL; + const char *const wprops[] = { "nondiggable", "nonpasswall", NULL }; + const int wprop2i[] = { W_NONDIGGABLE, W_NONPASSWALL, -1 }; + schar dx1 = -1, dy1 = -1, dx2 = -1, dy2 = -1; + int wprop; - if (!OV_pop_r(r)) - return; + create_des_coder(); - dx1 = SP_REGION_X1(OV_i(r)); - dy1 = SP_REGION_Y1(OV_i(r)); - dx2 = SP_REGION_X2(OV_i(r)); - dy2 = SP_REGION_Y2(OV_i(r)); + lcheck_param_table(L); + + dx1 = get_table_int_opt(L, "x1", -1); + dy1 = get_table_int_opt(L, "y1", -1); + dx2 = get_table_int_opt(L, "x2", -1); + dy2 = get_table_int_opt(L, "y2", -1); + + if (dx1 == -1 && dy1 == -1 && dx2 == -1 && dy2 == -1) { + int rx1, ry1, rx2, ry2; + get_table_region(L, "region", &rx1, &ry1, &rx2, &ry2, FALSE); + dx1 = rx1; dy1 = ry1; + dx2 = rx2; dy2 = ry2; + } + + wprop = wprop2i[get_table_option(L, "property", "nondiggable", wprops)]; + + if (dx1 == -1) + dx1 = g.xstart - 1; + if (dy1 == -1) + dy1 = g.ystart - 1; + if (dx2 == -1) + dx2 = g.xstart + g.xsize + 1; + if (dy2 == -1) + dy2 = g.ystart + g.ysize + 1; get_location(&dx1, &dy1, ANY_LOC, (struct mkroom *) 0); get_location(&dx2, &dy2, ANY_LOC, (struct mkroom *) 0); set_wall_property(dx1, dy1, dx2, dy2, wprop); - opvar_free(r); + return 0; } -void -spo_room_door(coder) -struct sp_coder *coder; +/* non_diggable(selection); */ +/* non_diggable(); */ +int +lspo_non_diggable(L) +lua_State *L; { - static const char nhFunc[] = "spo_room_door"; - struct opvar *wall, *secret, *mask, *pos; - room_door tmpd; + int prop = W_NONDIGGABLE; + int argc = lua_gettop(L); + struct selectionvar *sel = (struct selectionvar *) 0; + /* REVIEW: compiler warning, + all assignments conditional + so initializer was added */ - if (!OV_pop_i(wall) || !OV_pop_i(secret) || !OV_pop_i(mask) - || !OV_pop_i(pos) || !coder->croom) - return; + create_des_coder(); - tmpd.secret = OV_i(secret); - tmpd.mask = OV_i(mask); - tmpd.pos = OV_i(pos); - tmpd.wall = OV_i(wall); + if (argc == 1) + sel = l_selection_check(L, -1); + else if (argc == 0) { + sel = selection_new(); + selection_not(sel); + } - create_door(&tmpd, coder->croom); + if (sel) + selection_iterate(sel, sel_set_wall_property, (genericptr_t) &prop); - opvar_free(wall); - opvar_free(secret); - opvar_free(mask); - opvar_free(pos); + /* TODO: Free(sel)? */ + + return 0; +} + +/* non_passwall(selection); */ +/* non_passwall(); */ +int +lspo_non_passwall(L) +lua_State *L; +{ + int prop = W_NONPASSWALL; + int argc = lua_gettop(L); + struct selectionvar *sel = (struct selectionvar *) 0; + /* REVIEW: compiler warning, + all assignments conditional + so initializer was added */ + + create_des_coder(); + + if (argc == 1) + sel = l_selection_check(L, -1); + else if (argc == 0) { + sel = selection_new(); + selection_not(sel); + } + + if (sel) + selection_iterate(sel, sel_set_wall_property, (genericptr_t) &prop); + + /* TODO: Free(sel)? */ + + return 0; } /*ARGSUSED*/ -void +STATIC_OVL void sel_set_wallify(x, y, arg) int x, y; genericptr_t arg UNUSED; @@ -4851,78 +5145,141 @@ genericptr_t arg UNUSED; wallify_map(x, y, x, y); } -void -spo_wallify(coder) -struct sp_coder *coder; +/* TODO: wallify(selection) */ +/* wallify({ x1=NN,y1=NN, x2=NN,y2=NN }); */ +/* wallify(); */ +int +lspo_wallify(L) +lua_State *L; { - static const char nhFunc[] = "spo_wallify"; - struct opvar *typ, *r; - int dx1, dy1, dx2, dy2; + int dx1 = -1, dy1 = -1, dx2 = -1, dy2 = -1; - if (!OV_pop_i(typ)) - return; - switch (OV_i(typ)) { - default: - case 0: - if (!OV_pop_r(r)) - return; - dx1 = (xchar) SP_REGION_X1(OV_i(r)); - dy1 = (xchar) SP_REGION_Y1(OV_i(r)); - dx2 = (xchar) SP_REGION_X2(OV_i(r)); - dy2 = (xchar) SP_REGION_Y2(OV_i(r)); - wallify_map(dx1 < 0 ? (g.xstart - 1) : dx1, - dy1 < 0 ? (g.ystart - 1) : dy1, - dx2 < 0 ? (g.xstart + g.xsize + 1) : dx2, - dy2 < 0 ? (g.ystart + g.ysize + 1) : dy2); - break; - case 1: - if (!OV_pop_typ(r, SPOVAR_SEL)) - return; - selection_iterate(r, sel_set_wallify, NULL); - break; + /* TODO: clamp coord values */ + /* TODO: maybe allow wallify({x1,y1}, {x2,y2}) */ + /* TODO: is_table_coord(), is_table_area(), get_table_coord(), get_table_area() */ + + create_des_coder(); + + if (lua_gettop(L) == 1) { + dx1 = get_table_int(L, "x1"); + dy1 = get_table_int(L, "y1"); + dx2 = get_table_int(L, "x2"); + dy2 = get_table_int(L, "y2"); } - opvar_free(r); - opvar_free(typ); + + wallify_map(dx1 < 0 ? (g.xstart - 1) : dx1, + dy1 < 0 ? (g.ystart - 1) : dy1, + dx2 < 0 ? (g.xstart + g.xsize + 1) : dx2, + dy2 < 0 ? (g.ystart + g.ysize + 1) : dy2); + + return 0; } -void -spo_map(coder) -struct sp_coder *coder; +/* reset_level is only needed for testing purposes */ +int +lspo_reset_level(L) +lua_State *L; +{ + boolean wtower = In_W_tower(u.ux, u.uy, &u.uz); + + create_des_coder(); + makemap_prepost(TRUE, wtower); + clear_level_structures(); + return 0; /* REVIEW: warning, int fn must return value + so added "return 0; " */ +} + +/* map({ x = 10, y = 10, map = [[...]] }); */ +/* map({ halign = "center", valign = "center", map = [[...]] }); */ +/* map([[...]]) */ +int +lspo_map(L) +lua_State *L; { - static const char nhFunc[] = "spo_map"; mazepart tmpmazepart; - struct opvar *mpxs, *mpys, *mpmap, *mpa, *mpkeepr, *mpzalign; - xchar halign, valign; + /* xchar halign, valign; */ /* REVIEW: unreferenced */ xchar tmpxstart, tmpystart, tmpxsize, tmpysize; - unpacked_coord upc; + /* unpacked_coord upc; */ /* REVIEW: unreferenced */ - if (!OV_pop_i(mpxs) || !OV_pop_i(mpys) || !OV_pop_s(mpmap) - || !OV_pop_i(mpkeepr) || !OV_pop_i(mpzalign) || !OV_pop_c(mpa)) - return; + /* +TODO: allow passing an array of strings as map data +TODO: handle if map lines aren't same length +TODO: g.coder->croom needs to be updated + */ - tmpmazepart.xsize = OV_i(mpxs); - tmpmazepart.ysize = OV_i(mpys); - tmpmazepart.zaligntyp = OV_i(mpzalign); + const char *const left_or_right[] = { "left", "half-left", "center", "half-right", "right", "none", NULL }; + const int l_or_r2i[] = { LEFT, H_LEFT, CENTER, H_RIGHT, RIGHT, -1, -1 }; + const char *const top_or_bot[] = { "top", "center", "bottom", "none", NULL }; + const int t_or_b2i[] = { TOP, CENTER, BOTTOM, -1, -1 }; + int lr, tb, keepregion = 1, x, y; + char *tmps, *mapdata; + int mapwid, maphei = 0; + int argc = lua_gettop(L); - upc = get_unpacked_coord(OV_i(mpa), ANY_LOC); - tmpmazepart.halign = upc.x; - tmpmazepart.valign = upc.y; + create_des_coder(); + if (argc == 1 && lua_type(L, 1) == LUA_TSTRING) { + lr = tb = CENTER; + mapdata = dupstr(luaL_checkstring(L, 1)); + } else { + lcheck_param_table(L); + lr = l_or_r2i[get_table_option(L, "halign", "none", left_or_right)]; + tb = t_or_b2i[get_table_option(L, "valign", "none", top_or_bot)]; + keepregion = get_table_boolean_opt(L, "keepregion", 1); /* TODO: maybe rename? */ + x = get_table_int_opt(L, "x", -1); + y = get_table_int_opt(L, "y", -1); + mapdata = get_table_str(L, "map"); + } + + (void) stripdigits(mapdata); + mapwid = str_lines_maxlen(mapdata); + tmps = mapdata; + while (tmps && *tmps) { + char *s1 = index(tmps, '\n'); + if (maphei > MAP_Y_LIM) + break; + if (s1) + s1++; + tmps = s1; + maphei++; + } + + /* keepregion restricts the coordinates of the commands coming after the map + into the map region */ + /* for keepregion */ tmpxsize = g.xsize; tmpysize = g.ysize; tmpxstart = g.xstart; tmpystart = g.ystart; - halign = tmpmazepart.halign; - valign = tmpmazepart.valign; - g.xsize = tmpmazepart.xsize; - g.ysize = tmpmazepart.ysize; - switch (tmpmazepart.zaligntyp) { - default: - case 0: - break; - case 1: - switch ((int) halign) { + + g.xsize = tmpmazepart.xsize = mapwid; + g.ysize = tmpmazepart.ysize = maphei; + tmpmazepart.halign = lr; + tmpmazepart.valign = tb; + + if (lr == -1 && tb == -1) { + if (isok(x,y)) { + /* x,y is given, place map starting at x,y */ + if (g.coder->croom) { + /* in a room? adjust to room relative coords */ + g.xstart = x + g.coder->croom->lx; + g.ystart = y + g.coder->croom->ly; + g.xsize = min(tmpmazepart.xsize, (g.coder->croom->hx - g.coder->croom->lx)); + g.ysize = min(tmpmazepart.ysize, (g.coder->croom->hy - g.coder->croom->ly)); + } else { + g.xsize = tmpmazepart.xsize; + g.ysize = tmpmazepart.ysize; + g.xstart = x; + g.ystart = y; + } + } else { + nhl_error(L, "Map requires either x,y or halign,valign params"); + return 0; + } + } else { + /* place map starting at halign,valign */ + switch (lr) { case LEFT: g.xstart = g.splev_init_present ? 1 : 3; break; @@ -4939,7 +5296,7 @@ struct sp_coder *coder; g.xstart = g.x_maze_max - g.xsize - 1; break; } - switch ((int) valign) { + switch (tb) { case TOP: g.ystart = 3; break; @@ -4954,29 +5311,15 @@ struct sp_coder *coder; g.xstart++; if (!(g.ystart % 2)) g.ystart++; - break; - case 2: - if (!coder->croom) { - g.xstart = 1; - g.ystart = 0; - g.xsize = COLNO - 1 - tmpmazepart.xsize; - g.ysize = ROWNO - tmpmazepart.ysize; - } - get_location_coord(&halign, &valign, ANY_LOC, coder->croom, - OV_i(mpa)); - g.xsize = tmpmazepart.xsize; - g.ysize = tmpmazepart.ysize; - g.xstart = halign; - g.ystart = valign; - break; } + if (g.ystart < 0 || g.ystart + g.ysize > ROWNO) { /* try to move the start a bit */ g.ystart += (g.ystart > 0) ? -2 : 2; if (g.ysize == ROWNO) g.ystart = 0; if (g.ystart < 0 || g.ystart + g.ysize > ROWNO) - panic("reading special level with g.ysize too large"); + g.ystart = 0; } if (g.xsize <= 1 && g.ysize <= 1) { g.xstart = 1; @@ -4984,13 +5327,18 @@ struct sp_coder *coder; g.xsize = COLNO - 1; g.ysize = ROWNO; } else { - xchar x, y, mptyp; + char mpchr; + xchar mptyp; /* Load the map */ - for (y = g.ystart; y < g.ystart + g.ysize; y++) - for (x = g.xstart; x < g.xstart + g.xsize; x++) { - mptyp = (mpmap->vardata.str[(y - g.ystart) * g.xsize - + (x - g.xstart)] - 1); + for (y = g.ystart; y < min(ROWNO, g.ystart + g.ysize); y++) + for (x = g.xstart; x < min(COLNO, g.xstart + g.xsize); x++) { + mpchr = (mapdata[(y - g.ystart) * (mapwid+1) + (x - g.xstart)]); + mptyp = splev_chr2typ(mpchr); + if (mptyp == INVALID_TYPE) { + /* TODO: warn about illegal map char */ + continue; + } if (mptyp >= MAX_TYPE) continue; levl[x][y].typ = mptyp; @@ -5024,291 +5372,47 @@ struct sp_coder *coder; else if (g.splev_init_present && levl[x][y].typ == ICE) levl[x][y].icedpool = g.icedpools ? ICED_POOL : ICED_MOAT; } - if (coder->lvl_is_joined) + if (g.coder->lvl_is_joined) remove_rooms(g.xstart, g.ystart, g.xstart + g.xsize, g.ystart + g.ysize); } - if (!OV_i(mpkeepr)) { + if (!keepregion) { g.xstart = tmpxstart; g.ystart = tmpystart; g.xsize = tmpxsize; g.ysize = tmpysize; } - opvar_free(mpxs); - opvar_free(mpys); - opvar_free(mpmap); - opvar_free(mpa); - opvar_free(mpkeepr); - opvar_free(mpzalign); + Free(mapdata); + + return 0; } void -spo_jmp(coder, lvl) -struct sp_coder *coder; -sp_lev *lvl; +update_croom() { - static const char nhFunc[] = "spo_jmp"; - struct opvar *tmpa; - long a; - - if (!OV_pop_i(tmpa)) - return; - a = sp_code_jmpaddr(coder->frame->n_opcode, (OV_i(tmpa) - 1)); - if ((a >= 0) && (a < lvl->n_opcodes) && (a != coder->frame->n_opcode)) - coder->frame->n_opcode = a; - opvar_free(tmpa); -} - -void -spo_conditional_jump(coder, lvl) -struct sp_coder *coder; -sp_lev *lvl; -{ - static const char nhFunc[] = "spo_conditional_jump"; - struct opvar *oa, *oc; - long a, c; - int test = 0; - - if (!OV_pop_i(oa) || !OV_pop_i(oc)) + if (!g.coder) return; - a = sp_code_jmpaddr(coder->frame->n_opcode, (OV_i(oa) - 1)); - c = OV_i(oc); - - switch (coder->opcode) { - default: - impossible("spo_conditional_jump: illegal opcode"); - break; - case SPO_JL: - test = (c & SP_CPUFLAG_LT); - break; - case SPO_JLE: - test = (c & (SP_CPUFLAG_LT | SP_CPUFLAG_EQ)); - break; - case SPO_JG: - test = (c & SP_CPUFLAG_GT); - break; - case SPO_JGE: - test = (c & (SP_CPUFLAG_GT | SP_CPUFLAG_EQ)); - break; - case SPO_JE: - test = (c & SP_CPUFLAG_EQ); - break; - case SPO_JNE: - test = (c & ~SP_CPUFLAG_EQ); - break; - } - - if ((test) && (a >= 0) && (a < lvl->n_opcodes) - && (a != coder->frame->n_opcode)) - coder->frame->n_opcode = a; - - opvar_free(oa); - opvar_free(oc); + if (g.coder->n_subroom) + g.coder->croom = g.coder->tmproomlist[g.coder->n_subroom - 1]; + else + g.coder->croom = NULL; } -void -spo_var_init(coder) -struct sp_coder *coder; +struct sp_coder * +sp_level_coder_init() { - static const char nhFunc[] = "spo_var_init"; - struct opvar *vname; - struct opvar *arraylen; - struct opvar *vvalue; - struct splev_var *tmpvar; - struct splev_var *tmp2; - long idx; - - OV_pop_s(vname); - OV_pop_i(arraylen); - - if (!vname || !arraylen) - panic("no values for SPO_VAR_INIT"); - - tmpvar = opvar_var_defined(coder, OV_s(vname)); - - if (tmpvar) { - /* variable redefinition */ - if (OV_i(arraylen) < 0) { - /* copy variable */ - if (tmpvar->array_len) { - idx = tmpvar->array_len; - while (idx-- > 0) { - opvar_free(tmpvar->data.arrayvalues[idx]); - } - Free(tmpvar->data.arrayvalues); - } else { - opvar_free(tmpvar->data.value); - } - tmpvar->data.arrayvalues = NULL; - goto copy_variable; - } else if (OV_i(arraylen)) { - /* redefined array */ - idx = tmpvar->array_len; - while (idx-- > 0) { - opvar_free(tmpvar->data.arrayvalues[idx]); - } - Free(tmpvar->data.arrayvalues); - tmpvar->data.arrayvalues = NULL; - goto create_new_array; - } else { - /* redefined single value */ - OV_pop(vvalue); - if (tmpvar->svtyp != vvalue->spovartyp) - panic("redefining variable as different type"); - opvar_free(tmpvar->data.value); - tmpvar->data.value = vvalue; - tmpvar->array_len = 0; - } - } else { - /* new variable definition */ - tmpvar = (struct splev_var *) alloc(sizeof(struct splev_var)); - tmpvar->next = coder->frame->variables; - tmpvar->name = dupstr(OV_s(vname)); - coder->frame->variables = tmpvar; - - if (OV_i(arraylen) < 0) { - /* copy variable */ - copy_variable: - OV_pop(vvalue); - tmp2 = opvar_var_defined(coder, OV_s(vvalue)); - if (!tmp2) - panic("no copyable var"); - tmpvar->svtyp = tmp2->svtyp; - tmpvar->array_len = tmp2->array_len; - if (tmpvar->array_len) { - idx = tmpvar->array_len; - tmpvar->data.arrayvalues = - (struct opvar **) alloc(sizeof(struct opvar *) * idx); - while (idx-- > 0) { - tmpvar->data.arrayvalues[idx] = - opvar_clone(tmp2->data.arrayvalues[idx]); - } - } else { - tmpvar->data.value = opvar_clone(tmp2->data.value); - } - opvar_free(vvalue); - } else if (OV_i(arraylen)) { - /* new array */ - create_new_array: - idx = OV_i(arraylen); - tmpvar->array_len = idx; - tmpvar->data.arrayvalues = - (struct opvar **) alloc(sizeof(struct opvar *) * idx); - while (idx-- > 0) { - OV_pop(vvalue); - if (!vvalue) - panic("no value for arrayvariable"); - tmpvar->data.arrayvalues[idx] = vvalue; - } - tmpvar->svtyp = SPOVAR_ARRAY; - } else { - /* new single value */ - OV_pop(vvalue); - if (!vvalue) - panic("no value for variable"); - tmpvar->svtyp = OV_typ(vvalue); - tmpvar->data.value = vvalue; - tmpvar->array_len = 0; - } - } - - opvar_free(vname); - opvar_free(arraylen); - -} - -#if 0 -STATIC_OVL long -opvar_array_length(coder) -struct sp_coder *coder; -{ - static const char nhFunc[] = "opvar_array_length"; - struct opvar *vname; - struct splev_var *tmp; - long len = 0; - - if (!coder) - return 0; - - vname = splev_stack_pop(coder->stack); - if (!vname) - return 0; - if (vname->spovartyp != SPOVAR_VARIABLE) - goto pass; - - tmp = coder->frame->variables; - while (tmp) { - if (!strcmp(tmp->name, OV_s(vname))) { - if ((tmp->svtyp & SPOVAR_ARRAY)) { - len = tmp->array_len; - if (len < 1) - len = 0; - } - goto pass; - } - tmp = tmp->next; - } - -pass: - opvar_free(vname); - return len; -} -#endif /*0*/ - -void -spo_shuffle_array(coder) -struct sp_coder *coder; -{ - static const char nhFunc[] = "spo_shuffle_array"; - struct opvar *vname; - struct splev_var *tmp; - struct opvar *tmp2; - long i, j; - - if (!OV_pop_s(vname)) - return; - - tmp = opvar_var_defined(coder, OV_s(vname)); - if (!tmp || (tmp->array_len < 1)) { - opvar_free(vname); - return; - } - for (i = tmp->array_len - 1; i > 0; i--) { - if ((j = rn2(i + 1)) == i) - continue; - tmp2 = tmp->data.arrayvalues[j]; - tmp->data.arrayvalues[j] = tmp->data.arrayvalues[i]; - tmp->data.arrayvalues[i] = tmp2; - } - - opvar_free(vname); -} - -/* Special level coder, creates the special level from the sp_lev codes. - * Does not free the allocated memory. - */ -STATIC_OVL boolean -sp_level_coder(lvl) -sp_lev *lvl; -{ - static const char nhFunc[] = "sp_level_coder"; - unsigned long exec_opcodes = 0; int tmpi; - long room_stack = 0; - unsigned long max_execution = SPCODER_MAX_RUNTIME; struct sp_coder *coder = (struct sp_coder *) alloc(sizeof (struct sp_coder)); - coder->frame = frame_new(0); - coder->stack = NULL; coder->premapped = FALSE; coder->solidify = FALSE; coder->check_inaccessibles = FALSE; coder->croom = NULL; coder->n_subroom = 1; - coder->exit_script = FALSE; coder->lvl_is_joined = 0; + coder->room_stack = 0; g.splev_init_present = FALSE; g.icedpools = FALSE; @@ -5317,19 +5421,12 @@ sp_lev *lvl; once either level is created, these values can be forgotten */ g.mines_prize_count = g.soko_prize_count = 0; - if (wizard) { - char *met = nh_getenv("SPCODER_MAX_RUNTIME"); - - if (met && met[0] == '1') - max_execution = (1 << 30) - 1; - } - for (tmpi = 0; tmpi <= MAX_NESTED_ROOMS; tmpi++) { coder->tmproomlist[tmpi] = (struct mkroom *) 0; coder->failed_room[tmpi] = FALSE; } - shuffle_alignments(); + update_croom(); for (tmpi = 0; tmpi < MAX_CONTAINMENT; tmpi++) g.container_obj[tmpi] = NULL; @@ -5346,642 +5443,99 @@ sp_lev *lvl; g.xsize = COLNO - 1; g.ysize = ROWNO; - while (coder->frame->n_opcode < lvl->n_opcodes && !coder->exit_script) { - coder->opcode = lvl->opcodes[coder->frame->n_opcode].opcode; - coder->opdat = lvl->opcodes[coder->frame->n_opcode].opdat; + return coder; +} - coder->stack = coder->frame->stack; - if (exec_opcodes++ > max_execution) { - impossible("Level script is taking too much time, stopping."); - coder->exit_script = TRUE; - } +static const struct luaL_Reg nhl_functions[] = { + { "message", lspo_message }, + { "monster", lspo_monster }, + { "object", lspo_object }, + { "level_flags", lspo_level_flags }, + { "level_init", lspo_level_init }, + { "engraving", lspo_engraving }, + { "mineralize", lspo_mineralize }, + { "door", lspo_door }, + { "stair", lspo_stair }, + { "ladder", lspo_ladder }, + { "grave", lspo_grave }, + { "altar", lspo_altar }, + { "map", lspo_map }, + { "feature", lspo_feature }, + { "terrain", lspo_terrain }, + { "replace_terrain", lspo_replace_terrain }, + { "room", lspo_room }, + { "corridor", lspo_corridor }, + { "random_corridors", lspo_random_corridors }, + { "gold", lspo_gold }, + { "trap", lspo_trap }, + { "mazewalk", lspo_mazewalk }, + { "drawbridge", lspo_drawbridge }, + { "region", lspo_region }, + { "levregion", lspo_levregion }, + { "wallify", lspo_wallify }, + { "wall_property", lspo_wall_property }, + { "non_diggable", lspo_non_diggable }, + { "non_passwall", lspo_non_passwall }, + { "teleport_region", lspo_teleport_region }, + { "reset_level", lspo_reset_level }, + /* TODO: { "branch", lspo_branch }, */ + /* TODO: { "portal", lspo_portal }, */ + { NULL, NULL } +}; - if (coder->failed_room[coder->n_subroom - 1] - && coder->opcode != SPO_ENDROOM && coder->opcode != SPO_ROOM - && coder->opcode != SPO_SUBROOM) - goto next_opcode; +/* TODO: - coder->croom = coder->tmproomlist[coder->n_subroom - 1]; + - if des-file used MAZE_ID to start a level, the level needs des.level_flags("mazelevel") + - expose g.coder->croom or g.[xy]start and g.xy[size] to lua. + - detect a "subroom" automatically. + - new function get_mapchar(x,y) to return the mapchar on map + - many params should accept their normal type (eg, int or bool), AND "random" + - automatically add shuffle(array) + - automatically add align = { "law", "neutral", "chaos" } and shuffle it. (remove from lua files) + - grab the header comments from des-files and add add them to the lua files - switch (coder->opcode) { - case SPO_NULL: - break; - case SPO_EXIT: - coder->exit_script = TRUE; - break; - case SPO_FRAME_PUSH: - spo_frame_push(coder); - break; - case SPO_FRAME_POP: - spo_frame_pop(coder); - break; - case SPO_CALL: - spo_call(coder); - break; - case SPO_RETURN: - spo_return(coder); - break; - case SPO_END_MONINVENT: - spo_end_moninvent(coder); - break; - case SPO_POP_CONTAINER: - spo_pop_container(coder); - break; - case SPO_POP: { - struct opvar *ov = splev_stack_pop(coder->stack); +*/ - opvar_free(ov); - break; - } - case SPO_PUSH: - splev_stack_push(coder->stack, opvar_clone(coder->opdat)); - break; - case SPO_MESSAGE: - spo_message(coder); - break; - case SPO_MONSTER: - spo_monster(coder); - break; - case SPO_OBJECT: - spo_object(coder); - break; - case SPO_LEVEL_FLAGS: - spo_level_flags(coder); - break; - case SPO_INITLEVEL: - spo_initlevel(coder); - break; - case SPO_ENGRAVING: - spo_engraving(coder); - break; - case SPO_MINERALIZE: - spo_mineralize(coder); - break; - case SPO_SUBROOM: - case SPO_ROOM: - if (!coder->failed_room[coder->n_subroom - 1]) { - spo_room(coder); - } else - room_stack++; - break; - case SPO_ENDROOM: - if (coder->failed_room[coder->n_subroom - 1]) { - if (!room_stack) - spo_endroom(coder); - else - room_stack--; - } else { - spo_endroom(coder); - } - break; - case SPO_DOOR: - spo_door(coder); - break; - case SPO_STAIR: - spo_stair(coder); - break; - case SPO_LADDER: - spo_ladder(coder); - break; - case SPO_GRAVE: - spo_grave(coder); - break; - case SPO_ALTAR: - spo_altar(coder); - break; - case SPO_SINK: - case SPO_POOL: - case SPO_FOUNTAIN: - spo_feature(coder); - break; - case SPO_TRAP: - spo_trap(coder); - break; - case SPO_GOLD: - spo_gold(coder); - break; - case SPO_CORRIDOR: - spo_corridor(coder); - break; - case SPO_TERRAIN: - spo_terrain(coder); - break; - case SPO_REPLACETERRAIN: - spo_replace_terrain(coder); - break; - case SPO_LEVREGION: - spo_levregion(coder); - break; - case SPO_REGION: - spo_region(coder); - break; - case SPO_DRAWBRIDGE: - spo_drawbridge(coder); - break; - case SPO_MAZEWALK: - spo_mazewalk(coder); - break; - case SPO_NON_PASSWALL: - case SPO_NON_DIGGABLE: - spo_wall_property(coder); - break; - case SPO_ROOM_DOOR: - spo_room_door(coder); - break; - case SPO_WALLIFY: - spo_wallify(coder); - break; - case SPO_COPY: { - struct opvar *a = splev_stack_pop(coder->stack); +void +l_register_des(L) +lua_State *L; +{ + /* register des -table, and functions for it */ + lua_newtable(L); + luaL_setfuncs(L, nhl_functions, 0); + lua_setglobal(L, "des"); +} - splev_stack_push(coder->stack, opvar_clone(a)); - splev_stack_push(coder->stack, opvar_clone(a)); - opvar_free(a); - break; - } - case SPO_DEC: { - struct opvar *a; +STATIC_OVL void +create_des_coder() +{ + if (!g.coder) + g.coder = sp_level_coder_init(); +} - if (!OV_pop_i(a)) - break; - OV_i(a)--; - splev_stack_push(coder->stack, a); - break; - } - case SPO_INC: { - struct opvar *a; +/* + * General loader + */ +boolean +load_special(name) +const char *name; +{ + boolean result = FALSE; - if (!OV_pop_i(a)) - break; - OV_i(a)++; - splev_stack_push(coder->stack, a); - break; - } - case SPO_MATH_SIGN: { - struct opvar *a; + create_des_coder(); - if (!OV_pop_i(a)) - break; - OV_i(a) = ((OV_i(a) < 0) ? -1 : ((OV_i(a) > 0) ? 1 : 0)); - splev_stack_push(coder->stack, a); - break; - } - case SPO_MATH_ADD: { - struct opvar *a, *b; - - if (!OV_pop(b) || !OV_pop(a)) - break; - if (OV_typ(b) == OV_typ(a)) { - if (OV_typ(a) == SPOVAR_INT) { - OV_i(a) = OV_i(a) + OV_i(b); - splev_stack_push(coder->stack, a); - opvar_free(b); - } else if (OV_typ(a) == SPOVAR_STRING) { - struct opvar *c; - char *tmpbuf = (char *) alloc(strlen(OV_s(a)) - + strlen(OV_s(b)) + 1); - - (void) sprintf(tmpbuf, "%s%s", OV_s(a), OV_s(b)); - c = opvar_new_str(tmpbuf); - splev_stack_push(coder->stack, c); - opvar_free(a); - opvar_free(b); - Free(tmpbuf); - } else { - splev_stack_push(coder->stack, a); - opvar_free(b); - impossible("adding weird types"); - } - } else { - splev_stack_push(coder->stack, a); - opvar_free(b); - impossible("adding different types"); - } - break; - } - case SPO_MATH_SUB: { - struct opvar *a, *b; - - if (!OV_pop_i(b) || !OV_pop_i(a)) - break; - OV_i(a) = OV_i(a) - OV_i(b); - splev_stack_push(coder->stack, a); - opvar_free(b); - break; - } - case SPO_MATH_MUL: { - struct opvar *a, *b; - - if (!OV_pop_i(b) || !OV_pop_i(a)) - break; - OV_i(a) = OV_i(a) * OV_i(b); - splev_stack_push(coder->stack, a); - opvar_free(b); - break; - } - case SPO_MATH_DIV: { - struct opvar *a, *b; - - if (!OV_pop_i(b) || !OV_pop_i(a)) - break; - if (OV_i(b) >= 1) { - OV_i(a) = OV_i(a) / OV_i(b); - } else { - OV_i(a) = 0; - } - splev_stack_push(coder->stack, a); - opvar_free(b); - break; - } - case SPO_MATH_MOD: { - struct opvar *a, *b; - - if (!OV_pop_i(b) || !OV_pop_i(a)) - break; - if (OV_i(b) > 0) { - OV_i(a) = OV_i(a) % OV_i(b); - } else { - OV_i(a) = 0; - } - splev_stack_push(coder->stack, a); - opvar_free(b); - break; - } - case SPO_CMP: { - struct opvar *a; - struct opvar *b; - struct opvar *c; - long val = 0; - - OV_pop(b); - OV_pop(a); - if (!a || !b) { - impossible("spo_cmp: no values in stack"); - break; - } - if (OV_typ(a) != OV_typ(b)) { - impossible("spo_cmp: trying to compare differing datatypes"); - break; - } - switch (OV_typ(a)) { - case SPOVAR_COORD: - case SPOVAR_REGION: - case SPOVAR_MAPCHAR: - case SPOVAR_MONST: - case SPOVAR_OBJ: - case SPOVAR_INT: - if (OV_i(b) > OV_i(a)) - val |= SP_CPUFLAG_LT; - if (OV_i(b) < OV_i(a)) - val |= SP_CPUFLAG_GT; - if (OV_i(b) == OV_i(a)) - val |= SP_CPUFLAG_EQ; - c = opvar_new_int(val); - break; - case SPOVAR_STRING: - c = opvar_new_int(!strcmp(OV_s(b), OV_s(a)) - ? SP_CPUFLAG_EQ - : 0); - break; - default: - c = opvar_new_int(0); - break; - } - splev_stack_push(coder->stack, c); - opvar_free(a); - opvar_free(b); - break; - } - case SPO_JMP: - spo_jmp(coder, lvl); - break; - case SPO_JL: - case SPO_JLE: - case SPO_JG: - case SPO_JGE: - case SPO_JE: - case SPO_JNE: - spo_conditional_jump(coder, lvl); - break; - case SPO_RN2: { - struct opvar *tmpv; - struct opvar *t; - - if (!OV_pop_i(tmpv)) - break; - t = opvar_new_int((OV_i(tmpv) > 1) ? rn2(OV_i(tmpv)) : 0); - splev_stack_push(coder->stack, t); - opvar_free(tmpv); - break; - } - case SPO_DICE: { - struct opvar *a, *b, *t; - - if (!OV_pop_i(b) || !OV_pop_i(a)) - break; - if (OV_i(b) < 1) - OV_i(b) = 1; - if (OV_i(a) < 1) - OV_i(a) = 1; - t = opvar_new_int(d(OV_i(a), OV_i(b))); - splev_stack_push(coder->stack, t); - opvar_free(a); - opvar_free(b); - break; - } - case SPO_MAP: - spo_map(coder); - break; - case SPO_VAR_INIT: - spo_var_init(coder); - break; - case SPO_SHUFFLE_ARRAY: - spo_shuffle_array(coder); - break; - case SPO_SEL_ADD: /* actually, logical or */ - { - struct opvar *sel1, *sel2, *pt; - - if (!OV_pop_typ(sel1, SPOVAR_SEL)) - panic("no sel1 for add"); - if (!OV_pop_typ(sel2, SPOVAR_SEL)) - panic("no sel2 for add"); - pt = selection_logical_oper(sel1, sel2, '|'); - opvar_free(sel1); - opvar_free(sel2); - splev_stack_push(coder->stack, pt); - break; - } - case SPO_SEL_COMPLEMENT: { - struct opvar *sel, *pt; - - if (!OV_pop_typ(sel, SPOVAR_SEL)) - panic("no sel for not"); - pt = selection_not(sel); - opvar_free(sel); - splev_stack_push(coder->stack, pt); - break; - } - case SPO_SEL_FILTER: /* sorta like logical and */ - { - struct opvar *filtertype; - - if (!OV_pop_i(filtertype)) - panic("no sel filter type"); - switch (OV_i(filtertype)) { - case SPOFILTER_PERCENT: { - struct opvar *tmp1, *sel; - - if (!OV_pop_i(tmp1)) - panic("no sel filter percent"); - if (!OV_pop_typ(sel, SPOVAR_SEL)) - panic("no sel filter"); - selection_filter_percent(sel, OV_i(tmp1)); - splev_stack_push(coder->stack, sel); - opvar_free(tmp1); - break; - } - case SPOFILTER_SELECTION: /* logical and */ - { - struct opvar *pt, *sel1, *sel2; - - if (!OV_pop_typ(sel1, SPOVAR_SEL)) - panic("no sel filter sel1"); - if (!OV_pop_typ(sel2, SPOVAR_SEL)) - panic("no sel filter sel2"); - pt = selection_logical_oper(sel1, sel2, '&'); - splev_stack_push(coder->stack, pt); - opvar_free(sel1); - opvar_free(sel2); - break; - } - case SPOFILTER_MAPCHAR: { - struct opvar *pt, *tmp1, *sel; - - if (!OV_pop_typ(sel, SPOVAR_SEL)) - panic("no sel filter"); - if (!OV_pop_typ(tmp1, SPOVAR_MAPCHAR)) - panic("no sel filter mapchar"); - pt = selection_filter_mapchar(sel, tmp1); - splev_stack_push(coder->stack, pt); - opvar_free(tmp1); - opvar_free(sel); - break; - } - default: - panic("unknown sel filter type"); - } - opvar_free(filtertype); - break; - } - case SPO_SEL_POINT: { - struct opvar *tmp; - struct opvar *pt = selection_opvar((char *) 0); - schar x, y; - - if (!OV_pop_c(tmp)) - panic("no ter sel coord"); - get_location_coord(&x, &y, ANY_LOC, coder->croom, OV_i(tmp)); - selection_setpoint(x, y, pt, 1); - splev_stack_push(coder->stack, pt); - opvar_free(tmp); - break; - } - case SPO_SEL_RECT: - case SPO_SEL_FILLRECT: { - struct opvar *tmp, *pt = selection_opvar((char *) 0); - schar x, y, x1, y1, x2, y2; - - if (!OV_pop_r(tmp)) - panic("no ter sel region"); - x1 = min(SP_REGION_X1(OV_i(tmp)), SP_REGION_X2(OV_i(tmp))); - y1 = min(SP_REGION_Y1(OV_i(tmp)), SP_REGION_Y2(OV_i(tmp))); - x2 = max(SP_REGION_X1(OV_i(tmp)), SP_REGION_X2(OV_i(tmp))); - y2 = max(SP_REGION_Y1(OV_i(tmp)), SP_REGION_Y2(OV_i(tmp))); - get_location(&x1, &y1, ANY_LOC, coder->croom); - get_location(&x2, &y2, ANY_LOC, coder->croom); - x1 = (x1 < 0) ? 0 : x1; - y1 = (y1 < 0) ? 0 : y1; - x2 = (x2 >= COLNO) ? COLNO - 1 : x2; - y2 = (y2 >= ROWNO) ? ROWNO - 1 : y2; - if (coder->opcode == SPO_SEL_RECT) { - for (x = x1; x <= x2; x++) { - selection_setpoint(x, y1, pt, 1); - selection_setpoint(x, y2, pt, 1); - } - for (y = y1; y <= y2; y++) { - selection_setpoint(x1, y, pt, 1); - selection_setpoint(x2, y, pt, 1); - } - } else { - for (x = x1; x <= x2; x++) - for (y = y1; y <= y2; y++) - selection_setpoint(x, y, pt, 1); - } - splev_stack_push(coder->stack, pt); - opvar_free(tmp); - break; - } - case SPO_SEL_LINE: { - struct opvar *tmp = NULL, *tmp2 = NULL, - *pt = selection_opvar((char *) 0); - schar x1, y1, x2, y2; - - if (!OV_pop_c(tmp)) - panic("no ter sel linecoord1"); - if (!OV_pop_c(tmp2)) - panic("no ter sel linecoord2"); - get_location_coord(&x1, &y1, ANY_LOC, coder->croom, OV_i(tmp)); - get_location_coord(&x2, &y2, ANY_LOC, coder->croom, OV_i(tmp2)); - x1 = (x1 < 0) ? 0 : x1; - y1 = (y1 < 0) ? 0 : y1; - x2 = (x2 >= COLNO) ? COLNO - 1 : x2; - y2 = (y2 >= ROWNO) ? ROWNO - 1 : y2; - selection_do_line(x1, y1, x2, y2, pt); - splev_stack_push(coder->stack, pt); - opvar_free(tmp); - opvar_free(tmp2); - break; - } - case SPO_SEL_RNDLINE: { - struct opvar *tmp = NULL, *tmp2 = NULL, *tmp3, - *pt = selection_opvar((char *) 0); - schar x1, y1, x2, y2; - - if (!OV_pop_i(tmp3)) - panic("no ter sel randline1"); - if (!OV_pop_c(tmp)) - panic("no ter sel randline2"); - if (!OV_pop_c(tmp2)) - panic("no ter sel randline3"); - get_location_coord(&x1, &y1, ANY_LOC, coder->croom, OV_i(tmp)); - get_location_coord(&x2, &y2, ANY_LOC, coder->croom, OV_i(tmp2)); - x1 = (x1 < 0) ? 0 : x1; - y1 = (y1 < 0) ? 0 : y1; - x2 = (x2 >= COLNO) ? COLNO - 1 : x2; - y2 = (y2 >= ROWNO) ? ROWNO - 1 : y2; - selection_do_randline(x1, y1, x2, y2, OV_i(tmp3), 12, pt); - splev_stack_push(coder->stack, pt); - opvar_free(tmp); - opvar_free(tmp2); - opvar_free(tmp3); - break; - } - case SPO_SEL_GROW: { - struct opvar *dirs, *pt; - - if (!OV_pop_i(dirs)) - panic("no dirs for grow"); - if (!OV_pop_typ(pt, SPOVAR_SEL)) - panic("no selection for grow"); - selection_do_grow(pt, OV_i(dirs)); - splev_stack_push(coder->stack, pt); - opvar_free(dirs); - break; - } - case SPO_SEL_FLOOD: { - struct opvar *tmp; - schar x, y; - - if (!OV_pop_c(tmp)) - panic("no ter sel flood coord"); - get_location_coord(&x, &y, ANY_LOC, coder->croom, OV_i(tmp)); - if (isok(x, y)) { - struct opvar *pt = selection_opvar((char *) 0); - - set_selection_floodfillchk(floodfillchk_match_under); - floodfillchk_match_under_typ = levl[x][y].typ; - selection_floodfill(pt, x, y, FALSE); - splev_stack_push(coder->stack, pt); - } - opvar_free(tmp); - break; - } - case SPO_SEL_RNDCOORD: { - struct opvar *pt; - schar x, y; - - if (!OV_pop_typ(pt, SPOVAR_SEL)) - panic("no selection for rndcoord"); - if (selection_rndcoord(pt, &x, &y, FALSE)) { - x -= g.xstart; - y -= g.ystart; - } - splev_stack_push(coder->stack, opvar_new_coord(x, y)); - opvar_free(pt); - break; - } - case SPO_SEL_ELLIPSE: { - struct opvar *filled, *xaxis, *yaxis, *pt; - struct opvar *sel = selection_opvar((char *) 0); - schar x, y; - - if (!OV_pop_i(filled)) - panic("no filled for ellipse"); - if (!OV_pop_i(yaxis)) - panic("no yaxis for ellipse"); - if (!OV_pop_i(xaxis)) - panic("no xaxis for ellipse"); - if (!OV_pop_c(pt)) - panic("no pt for ellipse"); - get_location_coord(&x, &y, ANY_LOC, coder->croom, OV_i(pt)); - selection_do_ellipse(sel, x, y, OV_i(xaxis), OV_i(yaxis), - OV_i(filled)); - splev_stack_push(coder->stack, sel); - opvar_free(filled); - opvar_free(yaxis); - opvar_free(xaxis); - opvar_free(pt); - break; - } - case SPO_SEL_GRADIENT: { - struct opvar *gtyp, *glim, *mind, *maxd, *gcoord, *coord2; - struct opvar *sel; - schar x, y, x2, y2; - - if (!OV_pop_i(gtyp)) - panic("no gtyp for grad"); - if (!OV_pop_i(glim)) - panic("no glim for grad"); - if (!OV_pop_c(coord2)) - panic("no coord2 for grad"); - if (!OV_pop_c(gcoord)) - panic("no coord for grad"); - if (!OV_pop_i(maxd)) - panic("no maxd for grad"); - if (!OV_pop_i(mind)) - panic("no mind for grad"); - get_location_coord(&x, &y, ANY_LOC, coder->croom, OV_i(gcoord)); - get_location_coord(&x2, &y2, ANY_LOC, coder->croom, OV_i(coord2)); - - sel = selection_opvar((char *) 0); - selection_do_gradient(sel, x, y, x2, y2, OV_i(gtyp), OV_i(mind), - OV_i(maxd), OV_i(glim)); - splev_stack_push(coder->stack, sel); - - opvar_free(gtyp); - opvar_free(glim); - opvar_free(gcoord); - opvar_free(coord2); - opvar_free(maxd); - opvar_free(mind); - break; - } - default: - panic("sp_level_coder: Unknown opcode %i", coder->opcode); - } - - next_opcode: - coder->frame->n_opcode++; - } /*while*/ + if (!load_lua(name)) + goto give_up; link_doors_rooms(); fill_rooms(); remove_boundary_syms(); - if (coder->check_inaccessibles) + /* TODO: ensure_way_out() needs rewrite */ + if (g.coder->check_inaccessibles) ensure_way_out(); + /* FIXME: Ideally, we want this call to only cover areas of the map * which were not inserted directly by the special level file (see * the insect legs on Baalzebub's level, for instance). Since that @@ -5993,59 +5547,21 @@ sp_lev *lvl; count_features(); - if (coder->solidify) + if (g.coder->solidify) solidify_map(); /* This must be done before sokoban_detect(), * otherwise branch stairs won't be premapped. */ fixup_special(); - if (coder->premapped) + if (g.coder->premapped) sokoban_detect(); - if (coder->frame) { - struct sp_frame *tmpframe; - do { - tmpframe = coder->frame->next; - frame_del(coder->frame); - coder->frame = tmpframe; - } while (coder->frame); - } - Free(coder); - - return TRUE; -} - -/* - * General loader - */ -boolean -load_special(name) -const char *name; -{ - dlb *fd; - sp_lev *lvl = NULL; - boolean result = FALSE; - struct version_info vers_info; - - fd = dlb_fopen(name, RDBMODE); - if (!fd) - return FALSE; - Fread((genericptr_t) &vers_info, sizeof vers_info, 1, fd); - if (!check_version(&vers_info, name, TRUE, UTD_CHECKSIZES)) { - (void) dlb_fclose(fd); - goto give_up; - } - - lvl = (sp_lev *) alloc(sizeof (sp_lev)); - result = sp_level_loader(fd, lvl); - (void) dlb_fclose(fd); - if (result) - result = sp_level_coder(lvl); - sp_level_free(lvl); - Free(lvl); - + result = TRUE; give_up: + Free(g.coder); + g.coder = NULL; + return result; } diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index 82237eb6e..0a2b0eea5 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -1,5 +1,5 @@ # NetHack 3.6 Makefile.GCC $NHDT-Date: 1519600525 2018/02/25 23:15:25 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.34 $ -# Copyright (c) NetHack PC Development Team 1996-2006. +# Copyright (c) NetHack PC Development Team 1996-2019. # PC NetHack 3.6 Makefile for djgpp V2 # # Gnu gcc compiler for msdos (djgpp) @@ -25,6 +25,28 @@ GAME = nethack # The GNU Make has a problem if you include a drive spec below (unfortunately). GAMEDIR =../binary +# Optional PDCurses support +# Uncomment these and set them appropriately if you want to +# include curses port support alongside TTY support in your +# NetHack.exe binary. +# +# You'll have to set PDCURSES_H to the correct location of the +# PDCurses header (.h) files and PDCURSES_C to the location +# of your PDCurses C files which must already be resident on +# your machine. +# +ADD_CURSES=Y +PDCURSES_TOP=../../pdcurses + +#--------------------------------------------------------------- +# Location of LUA +ADD_LUA=Y +LUATOP=../../lua-535 + +# +#============================================================================== +# This marks the end of the BUILD DECISIONS section. +#============================================================================== # # Directories, gcc likes unix style directory specs # @@ -38,6 +60,7 @@ SRC = ../src SSHR = ../sys/share UTIL = ../util WIN = ../win/tty +WCURSES = ../win/curses WSHR = ../win/share # @@ -67,7 +90,8 @@ LIBRARIES = $(LIBS) $(TERMLIB) # If you have yacc/lex or a work-alike set YACC_LEX to Y # YACC_LEX = N -ifeq ($(YACC_LEX),Y) + +ifeq "$(YACC_LEX)" "Y" DO_YACC = YACC_ACT DO_LEX = LEX_ACT endif @@ -138,97 +162,39 @@ SUPPRESS_GRAPHICS = GAMEFILE = $(GAMEDIR)/$(GAME).exe # Changing this conditional block is not recommended -ifeq ($(USE_DLB),Y) +ifeq "$(USE_DLB)" "Y" DLBFLG = -DDLB else DLBFLG = endif -# -# Flags. -# -ifeq ($(SUPPRESS_GRAPHICS),Y) TERMLIB = # Build NetHack suitable for blind players -# Debugging -#cflags = -pg -c -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS -#LFLAGS = -pg - -cflags = -c -O -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS -LFLAGS = - -else - -# Debugging -#cflags = -g -c -I../include $(DLBFLG) -DUSE_TILES -#LFLAGS = -g - -# Normal -cflags = -c -O -I../include $(DLBFLG) -DUSE_TILES -LFLAGS = -endif - -#========================================== -#================ RULES ================== -#========================================== - -.SUFFIXES: .exe .o .til .uu .c .y .l - -#========================================== -# Rules for files in src -#========================================== - -$(OBJ)/%.o : /%.c - $(CC) $(cflags) -o$@ $< - -$(OBJ)/%.o : $(SRC)/%.c - $(CC) $(cflags) -o$@ $< - -#========================================== -# Rules for files in sys/share -#========================================== - -$(OBJ)/%.o : $(SSHR)/%.c - $(CC) $(cflags) -o$@ $< - -#========================================== -# Rules for files in sys/msdos -#========================================== - -$(OBJ)/%.o : $(MSYS)/%.c - $(CC) $(cflags) -I../sys/msdos -o$@ $< - -#========================================== -# Rules for files in util -#========================================== - -$(OBJ)/%.o : $(UTIL)/%.c - $(CC) $(cflags) -o$@ $< - -#========================================== -# Rules for files in win/share -#========================================== - -$(OBJ)/%.o : $(WSHR)/%.c - $(CC) $(cflags) -I../win/share -o$@ $< - -#{$(WSHR)}.txt{$(DAT)}.txt: -# copy $< $@ - -#========================================== -# Rules for files in win/tty -#========================================== - -$(OBJ)/%.o : $(TTY)/%.c - $(CC) $(cflags) -o$@ $< - #========================================== #================ MACROS ================== #========================================== # This section creates shorthand macros for many objects # referenced later on in the Makefile. # +# Have windows path styles available for use in commands +# +W_OBJ =$(subst /,\, $(OBJ)) +W_INCL =$(subst /,\, $(INCL)) +W_DAT =$(subst /,\, $(DAT)) +W_DOC =$(subst /,\, $(DOC)) +W_UTIL =$(subst /,\, $(UTIL)) +W_SRC =$(subst /,\, $(SRC)) +W_SSYS =$(subst /,\, $(SSYS)) +W_MSWSYS =$(subst /,\, $(MSWSYS)) +W_TTY =$(subst /,\, $(TTY)) +W_MSWIN =$(subst /,\, $(MSWIN)) +ifeq "$(ADD_CURSES)" "Y" +W_WCURSES =$(subst /,\, $(WCURSES)) +endif +W_WSHR =$(subst /,\, $(WSHR)) +W_GAMEDIR =$(subst /,\, $(GAMEDIR)) + # # Shorten up the location for some files # @@ -245,15 +211,19 @@ VGAOBJ = $(O)vidvga.o $(O)vidvesa.o MAKESRC = makedefs.c +ifneq "$(ADD_LUA)" "Y" SPLEVSRC = lev_yacc.c lev_$(LEX).c lev_main.c panic.c +endif DGNCOMPSRC = dgn_yacc.c dgn_$(LEX).c dgn_main.c -MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o +MAKEDEFSOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o +ifneq "$(ADD_LUA)" "Y" SPLEVOBJS = $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o $(O)alloc.o \ $(O)monst.o $(O)objects.o $(O)panic.o \ $(O)drawing.o $(O)decl.o $(O)stubvid.o +endif DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o $(O)alloc.o \ $(O)panic.o @@ -339,21 +309,97 @@ VOBJ19 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o $(O)vision.o VOBJ20 = $(O)vis_tab.o $(O)weapon.o $(O)were.o $(O)wield.o $(O)windows.o VOBJ21 = $(O)wintty.o $(O)wizard.o $(O)worm.o $(O)worn.o $(O)write.o VOBJ22 = $(O)zap.o $(O)light.o $(O)dlb.o $(O)dig.o $(O)teleport.o -VOBJ23 = $(O)region.o $(O)sys.o $(REGEX) +VOBJ23 = $(O)region.o $(O)sys.o $(REGEX) $(O)isaac64.o +VOBJ24 = $(O)sfbase.o $(O)sfdata.o +VOBJ25 = $(O)sfstruct.o $(O)sfascii.o $(O)sflendian.o SOBJ = $(O)msdos.o $(O)pcsys.o $(O)tty.o $(O)unix.o \ $(O)video.o $(O)vidtxt.o $(O)pckeys.o VVOBJ = $(O)version.o +ifeq "$(ADD_LUA)" "Y" +LUAOBJ = $(O)nhlua.o $(O)nhlsel.o +endif + +ifeq "$(ADD_CURSES)" "Y" +CURSESOBJ= $(O)cursdial.o $(O)cursinit.o $(O)cursinvt.o $(O)cursmain.o \ + $(O)cursmesg.o $(O)cursmisc.o $(O)cursstat.o $(O)curswins.o +else +CURSESOBJ= +endif + VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \ $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ - $(VOBJ21) $(VOBJ22) $(VOBJ23) + $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \ + $(CURSESOBJ) $(LUAOBJ) ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(TILOBJ2) $(VVOBJ) +ifeq "$(ADD_LUA)" "Y" +#===============-================================================= +# LUA library +# Source from http://www.lua.org/ftp/lua-5.3.5.tar.gz +#================================================================= + +LUASRC = $(LUATOP)/src +LUALIB = $(O)lua535s.a +LUADLL = $(O)lua535.a +LUAINCL = -I$(LUASRC) +#LUAFLAGS = unix added -lm here? +LUATARGETS = lua.exe luac.exe $(LUADLL) $(LUALIB) + +LUASRCFILES = lapi.c lauxlib.c lbaselib.c lbitlib.c lcode.c \ + lcorolib.c lctype.c ldblib.c ldebug.c ldo.c \ + ldump.c lfunc.c lgc.c linit.c liolib.c llex.c \ + lmathlib.c lmem.c loadlib.c lobject.c lopcodes.c \ + loslib.c lparser.c lstate.c lstring.c lstrlib.c \ + ltable.c ltablib.c ltm.c lundump.c lutf8lib.c \ + lvm.c lzio.c + +LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o \ + $(O)lcode.o $(O)lcorolib.o $(O)lctype.o $(O)ldblib.o \ + $(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \ + $(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o \ + $(O)lmathlib.o $(O)lmem.o $(O)loadlib.o $(O)lobject.o \ + $(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o \ + $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \ + $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o +endif + +ifeq "$(ADD_CURSES)" "Y" +#========================================== +# PDCurses build macros +#========================================== +PDCURSES_CURSES_H = $(PDCURSES_TOP)/curses.h +PDCURSES_CURSPRIV_H = $(PDCURSES_TOP)/curspriv.h +PDCURSES_HEADERS = $(PDCURSES_CURSES_H) $(PDCURSES_CURSPRIV_H) +PDCSRC = $(PDCURSES_TOP)/pdcurses +PDCDOS = $(PDCURSES_TOP)/dos +PDCLIBOBJS = $(O)addch.o $(O)addchstr.o $(O)addstr.o $(O)attr.o $(O)beep.o \ + $(O)bkgd.o $(O)border.o $(O)clear.o $(O)color.o $(O)delch.o $(O)deleteln.o \ + $(O)getch.o $(O)getstr.o $(O)getyx.o $(O)inch.o $(O)inchstr.o \ + $(O)initscr.o $(O)inopts.o $(O)insch.o $(O)insstr.o $(O)instr.o $(O)kernel.o \ + $(O)keyname.o $(O)mouse.o $(O)move.o $(O)outopts.o $(O)overlay.o $(O)pad.o \ + $(O)panel.o $(O)printw.o $(O)refresh.o $(O)scanw.o $(O)scr_dump.o $(O)scroll.o \ + $(O)slk.o $(O)termattr.o $(O)touch.o $(O)util.o $(O)window.o \ + $(O)debug.o + +PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o \ + $(O)pdcscrn.o $(O)pdcsetsc.o $(O)pdcutil.o + +#PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o $(O)pdcscrn.o \ +# $(O)pdcsetsc.o $(O)pdcutil.o + +PDCLIB = $(O)pdcurses.a + +PDCINCL = -I$(PDCURSES_TOP) -I$(PDCSRC) -I$(PDCDOS) +else +PDCLIB = +endif + #========================================== # Header file macros #========================================== @@ -410,6 +456,117 @@ DJ1 = $(dir $(DJGPP)) CWSDPMI = $(subst /,\,$(DJ1))bin\CWSDPMI.* endif +#========================================== +# More compiler setup macros +#========================================== +# +ifeq "$(ADD_CURSES)" "Y" +CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE" +else +CURSESDEF= +CURSESLIB= +endif + +INCLDIR=-I../include -I../sys/msdos $(LUAINCL) + +# Debugging +#cflags = -pg -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS +#LFLAGS = -pg + +cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS +LFLAGS = + +# Debugging +#cflags = -g -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES +#LFLAGS = -g + +# Normal +cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES +LFLAGS = + +#========================================== +#================ RULES ================== +#========================================== + +.SUFFIXES: .exe .o .til .uu .c .y .l + +#========================================== +# Rules for files in src +#========================================== + +$(OBJ)/%.o : /%.c + $(CC) $(cflags) -o$@ $< + +$(OBJ)/%.o : $(SRC)/%.c + $(CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in sys/share +#========================================== + +$(OBJ)/%.o : $(SSHR)/%.c + $(CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in sys/msdos +#========================================== + +$(OBJ)/%.o : $(MSYS)/%.c + $(CC) $(cflags) -I../sys/msdos -o$@ $< + +#========================================== +# Rules for files in util +#========================================== + +$(OBJ)/%.o : $(UTIL)/%.c + $(CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in win/share +#========================================== + +$(OBJ)/%.o : $(WSHR)/%.c + $(CC) $(cflags) -I../win/share -o$@ $< + +#{$(WSHR)}.txt{$(DAT)}.txt: +# copy $< $@ + +#========================================== +# Rules for files in win/tty +#========================================== + +$(OBJ)/%.o : $(TTY)/%.c + $(CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in win/curses +#========================================== + +$(OBJ)/%.o : $(WCURSES)/%.c + $(CC) -DPDC_NCMOUSE $(PDCINCL) $(cflags) -o$@ $< + +#========================================== +# Rules for files in PDCurses +#========================================== + +$(OBJ)/%.o : $(PDCURSES_TOP)/%.c + $(CC) $(PDCINCL) $(cflags) -o$@ $< + +$(OBJ)/%.o : $(PDCSRC)/%.c + $(CC) $(PDCINCL) $(cflags) -o$@ $< + +$(OBJ)/%.o : $(PDCDOS)/%.c + $(CC) $(PDCINCL) $(cflags) -o$@ $< + +ifeq "$(ADD_LUA)" "Y" +#========================================== +# Rules for LUA files +#========================================== + +$(OBJ)/%.o : $(LUASRC)/%.c + $(CC) $(cflags) -o$@ $< +endif + #========================================== # Primary Targets. #========================================== @@ -425,9 +582,14 @@ default: $(GAMEFILE) util: $(O)utility.tag -$(O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \ - $(INCL)/pm.h monstr.c vis_tab.c \ - $(U)lev_comp.exe $(U)dgn_comp.exe $(TILEUTIL) +ifneq "$(ADD_LUA)" "Y" +LEVCOMPEXE = $(U)lev_comp.exe +else +LEVCOMPEXE = +endif +$(O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \ + $(INCL)/pm.h monstr.c vis_tab.c $(LEVCOMPEXE) \ + $(U)dgn_comp.exe $(TILEUTIL) $(subst /,\,echo utilities made > $@) tileutil: $(U)gif2txt.exe $(U)txt2ppm.exe @@ -444,7 +606,11 @@ ifeq ($(USE_DLB),Y) else @$(subst /,\,copy $(DAT)/*. $(GAMEDIR)) @$(subst /,\,copy $(DAT)/*.dat $(GAMEDIR)) +ifeq "$(ADD_LUA)" "Y" + @$(subst /,\,copy $(DAT)/*.lua $(GAMEDIR)) +else @$(subst /,\,copy $(DAT)/*.lev $(GAMEDIR)) +endif @$(subst /,\,copy $(MSYS)/msdoshlp.txt $(GAMEDIR)) @$(subst /,\,if exist $(GAMEDIR)/makefile. del $(GAMEDIR)/makefile.) endif @@ -455,7 +621,7 @@ endif @$(subst /,\,if exist $(DAT)/symbols copy $(DAT)/symbols $(GAMEDIR)) @$(subst /,\,copy $(SSHR)/NetHack.cnf $(GAMEDIR)/defaults.nh) -@$(subst /,\,touch $(GAMEDIR)/record) - @$(subst /,\,copy $(DOC)/guidebo*.txt $(GAMEDIR)) + @$(subst /,\,copy $(DOC)/guideb*.txt $(GAMEDIR)) @$(subst /,\,copy ../sys/winnt/sysconf $(GAMEDIR)) @$(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR)) ifdef CWSDPMI @@ -469,7 +635,8 @@ endif # The main target. #========================================== -$(GAMEFILE): $(O)obj.tag $(PATCHLEV_H) $(O)utility.tag $(ALLOBJ) $(O)$(GAME).lnk +$(GAMEFILE): $(O)obj.tag $(PATCHLEV_H) $(PDCLIB) $(LUATARGETS) \ + $(O)utility.tag $(ALLOBJ) $(O)$(GAME).lnk @if exist temp.a del temp.a @ar ru temp.a $(VOBJ01) @ar ru temp.a $(VOBJ02) @@ -494,11 +661,20 @@ $(GAMEFILE): $(O)obj.tag $(PATCHLEV_H) $(O)utility.tag $(ALLOBJ) $(O)$(GAME).lnk @ar ru temp.a $(VOBJ21) @ar ru temp.a $(VOBJ22) @ar ru temp.a $(VOBJ23) + @ar ru temp.a $(VOBJ24) + @ar ru temp.a $(VOBJ25) @ar ru temp.a $(SOBJ) @ar ru temp.a $(TILOBJ) @ar ru temp.a $(TILOBJ2) @ar ru temp.a $(VVOBJ) - $(LINK) $(LFLAGS) -o$(GAME).exe temp.a $(LIBRARIES) $(ZLIB) +ifeq "$(ADD_LUA)" "Y" + @ar ru temp.a $(LUAOBJ) +endif +ifeq "$(ADD_CURSES)" "Y" + @ar ru temp.a $(CURSESOBJ) +endif + $(LINK) $(LFLAGS) -o$(GAME).exe temp.a \ + $(PDCLIB) $(LUALIB) $(LIBRARIES) $(ZLIB) @$(subst /,\,stubedit $(GAME).exe minstack=2048K) @$(subst /,\,copy $(GAME).exe $(GAMEFILE)) @$(subst /,\,del $(GAME).exe) @@ -527,86 +703,18 @@ $(O)$(GAME).lnk: $(ALLOBJ) echo $(VOBJ21) >> $(subst /,\,$@) echo $(VOBJ22) >> $(subst /,\,$@) echo $(VOBJ23) >> $(subst /,\,$@) + echo $(VOBJ24) >> $(subst /,\,$@) + echo $(VOBJ25) >> $(subst /,\,$@) echo $(SOBJ) >> $(subst /,\,$@) echo $(TILOBJ) >> $(subst /,\,$@) echo $(TILOBJ2) >> $(subst /,\,$@) echo $(VVOBJ) >> $(subst /,\,$@) - - -#========================================== -# Housekeeping. -#========================================== - -clean: - $(subst /,\,if exist $(O)*.o del $(O)*.o) - $(subst /,\,if exist $(O)dat.tag del $(O)dat.tag) - $(subst /,\,if exist $(O)install.tag del $(O)install.tag) - $(subst /,\,if exist $(O)$(GAME).lnk del $(O)$(GAME).lnk) - $(subst /,\,if exist $(O)obj.tag del $(O)obj.tag) - $(subst /,\,if exist $(O)sp_lev.tag del $(O)sp_lev.tag) - $(subst /,\,if exist $(O)thintile.tag del $(O)thintile.tag) - $(subst /,\,if exist $(O)utility.tag del $(O)utility.tag) - $(subst /,\,if exist temp.a del temp.a) - -spotless: clean - - $(subst /,\,if exist $(U)lev_flex.c del $(U)lev_flex.c) - $(subst /,\,if exist $(U)lev_lex.c del $(U)lev_lex.c) - $(subst /,\,if exist $(U)lev_yacc.c del $(U)lev_yacc.c) - $(subst /,\,if exist $(U)dgn_flex.c del $(U)dgn_flex.c) - $(subst /,\,if exist $(U)dgn_lex.c del $(U)dgn_lex.c) - $(subst /,\,if exist $(U)dgn_yacc.c del $(U)lev_yacc.c) - $(subst /,\,if exist $(U)makedefs.exe del $(U)makedefs.exe) - $(subst /,\,if exist $(U)lev_comp.exe del $(U)lev_comp.exe) - $(subst /,\,if exist $(U)dgn_comp.exe del $(U)dgn_comp.exe) - $(subst /,\,if exist $(U)recover.exe del $(U)recover.exe) - $(subst /,\,if exist $(U)tilemap.exe del $(U)tilemap.exe) - $(subst /,\,if exist $(U)tile2bmp.exe del $(U)tile2bmp.exe) - $(subst /,\,if exist $(U)tile2bin.exe del $(U)tile2bin.exe) - $(subst /,\,if exist $(U)til2bin2.exe del $(U)til2bin2.exe) - $(subst /,\,if exist $(U)thintile.exe del $(U)thintile.exe) - $(subst /,\,if exist $(U)dlb_main.exe del $(U)dlb_main.exe) - $(subst /,\,if exist $(INCL)/vis_tab.h del $(INCL)/vis_tab.h) - $(subst /,\,if exist $(INCL)/onames.h del $(INCL)/onames.h) - $(subst /,\,if exist $(INCL)/pm.h del $(INCL)/pm.h) - $(subst /,\,if exist $(INCL)/date.h del $(INCL)/date.h) - $(subst /,\,if exist $(INCL)/dgn_comp.h del $(INCL)/dgn_comp.h) - $(subst /,\,if exist $(INCL)/lev_comp.h del $(INCL)/lev_comp.h) - $(subst /,\,if exist $(SRC)/monstr.c del $(SRC)/monstr.c) - $(subst /,\,if exist $(SRC)/vis_tab.c del $(SRC)/vis_tab.c) - $(subst /,\,if exist $(SRC)/tile.c del $(SRC)/tile.c) - $(subst /,\,if exist $(DAT)/options del $(DAT)/options) - $(subst /,\,if exist $(DAT)/data del $(DAT)/data) - $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors) - $(subst /,\,if exist $(DAT)/dungeon.pdf del $(DAT)/dungeon.pdf) - $(subst /,\,if exist $(DAT)/dungeon del $(DAT)/dungeon) - $(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles) - $(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat) - $(subst /,\,if exist $(DAT)/bogusmon del $(DAT)/bogusmon) - $(subst /,\,if exist $(DAT)/engrave del $(DAT)/engrave) - $(subst /,\,if exist $(DAT)/epitaph del $(DAT)/epitaph) - $(subst /,\,if exist $(DAT)/dlb.lst del $(DAT)/dlb.lst) - $(subst /,\,if exist $(DAT)/nhdat del $(DAT)/nhdat) - $(subst /,\,if exist $(DAT)/*.lev del $(DAT)/*.lev) - $(subst /,\,if exist $(TILE_BMP) del $(TILE_BMP)) - $(subst /,\,if exist $(WSHR)/monthin.txt del $(WSHR)/monthin.txt) - $(subst /,\,if exist $(WSHR)/objthin.txt del $(WSHR)/objthin.txt) - $(subst /,\,if exist $(WSHR)/oththin.txt del $(WSHR)/oththin.txt) - -#========================================== -# Create directory for holding object files -#========================================== - -$(O)obj.tag: - -$(subst /,\,@if not exist $(OBJ)/*.* mkdir $(OBJ)) - @$(subst /,\,@echo directory created > $@) - -#=========================================== -# Work around some djgpp long file name woes -#=========================================== - -$(PATCHLEV_H): - @$(subst /,\,if not exist $@ copy $(INCL)/patchlevel.h $(INCL)/patchlev.h) +ifeq "$(ADD_LUA)" "Y" + echo $(LUAOBJ) >> $(subst /,\,$@) +endif +ifeq "$(ADD_CURSES)" "Y" + echo $(CURSESOBJ) >> $(subst /,\,$@) +endif #========================================== #=========== SECONDARY TARGETS ============ @@ -640,12 +748,13 @@ vis_tab.c: $(U)makedefs.exe # Makedefs Stuff #========================================== -$(U)makedefs.exe: $(MAKEOBJS) - $(LINK) $(LFLAGS) -o$@ $(MAKEOBJS) +$(U)makedefs.exe: $(MAKEDEFSOBJS) + $(LINK) $(LFLAGS) -o$@ $(MAKEDEFSOBJS) $(O)makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/objclass.h \ $(INCL)/monsym.h $(INCL)/qtext.h $(U)makedefs.c +ifneq "$(ADD_LUA)" "Y" #========================================== # Level Compiler Dependencies #========================================== @@ -718,6 +827,7 @@ else @$(subst /,\,copy $(SSHR)/lev_lex.c $@) @$(subst /,\,echo.>>$@) endif +endif #========================================== # Dungeon Dependencies @@ -900,6 +1010,13 @@ $(O)viewtib.o: $(MSYS)/viewtib.c endif +#========================================== +# PDCurses Library +#========================================== + +$(O)pdcurses.a : $(PDCLIBOBJS) $(PDCOBJS) + ar rcs $@ $(PDCLIBOBJS) $(PDCOBJS) + #========================================== # Other Util Dependencies. #========================================== @@ -954,7 +1071,9 @@ $(DAT)/engrave: $(O)utility.tag $(DAT)/engrave.txt $(DAT)/epitaph: $(O)utility.tag $(DAT)/epitaph.txt @$(subst /,\,$(U)makedefs.exe -s) -$(O)sp_lev.tag: $(O)utility.tag $(DAT)/bigroom.des $(DAT)/castle.des \ +ifneq "$(ADD_LUA)" "Y" +$(O)sp_lev.tag: $(O)utility.tag \ + $(DAT)/bigroom.des $(DAT)/castle.des \ $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \ $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \ $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \ @@ -988,6 +1107,9 @@ $(O)sp_lev.tag: $(O)utility.tag $(DAT)/bigroom.des $(DAT)/castle.des \ @$(subst /,\,$(U)lev_comp valkyrie.des) @$(subst /,\,$(U)lev_comp wizard.des) @$(subst /,\,cd $(SRC)) +else +$(O)sp_lev.tag: $(O)utility.tag +endif @$(subst /,\,echo sp_levs done > $@) $(DAT)/dungeon: $(O)utility.tag $(DAT)/dungeon.def @@ -1011,7 +1133,11 @@ $(DAT)/nhdat: $(U)dlb_main.exe $(DAT)/data $(DAT)/rumors $(DAT)/dungeon \ @$(LS) data dungeon oracles options quest.dat rumors help hh >dlb.lst @$(LS) cmdhelp history opthelp wizhelp license msdoshlp.txt >>dlb.lst @$(LS) bogusmon engrave epitaph tribute >>dlb.lst +ifeq "$(ADD_LUA)" "Y" + $(LS) $(subst /,\,*.lua) >>dlb.lst +else $(LS) $(subst /,\,*.lev) >>dlb.lst +endif @$(subst /,\,$(U)dlb_main cvIf dlb.lst nhdat) @$(subst /,\,cd $(SRC)) @@ -1021,6 +1147,100 @@ $(U)dlb_main.exe: $(DLBOBJS) $(O)dlb_main.o: $(U)dlb_main.c $(INCL)/config.h $(DLB_H) $(CC) $(cflags) -o$@ $(U)dlb_main.c +#============================================================= +# LUA +#============================================================= + +lua.exe: $(O)lua.o $(LUALIB) + $(link) $(LFLAGS) -o$@ $(O)lua.o $(LUALIB) + +luac.exe: $(O)luac.o $(O)lua535s.a + $(link) $(LFLAGSU) -o$@ $(O)luac.o $(LUALIB) + +$(O)lua535.a: $(LUAOBJFILES) + $(cc) -shared -Wl,--export-all-symbols \ + -Wl,--add-stdcall-alias -o $@ $< + +$(O)lua535s.a: $(LUAOBJFILES) + ar rcs $@ $(LUAOBJFILES) + +$(O)lua.o: $(LUASRC)/lua.c +$(O)luac.o: $(LUASRC)/luac.c + +#========================================== +# Housekeeping. +#========================================== + +clean: + $(subst /,\,if exist $(O)*.o del $(O)*.o) + $(subst /,\,if exist $(O)dat.tag del $(O)dat.tag) + $(subst /,\,if exist $(O)install.tag del $(O)install.tag) + $(subst /,\,if exist $(O)$(GAME).lnk del $(O)$(GAME).lnk) + $(subst /,\,if exist $(O)obj.tag del $(O)obj.tag) + $(subst /,\,if exist $(O)sp_lev.tag del $(O)sp_lev.tag) + $(subst /,\,if exist $(O)thintile.tag del $(O)thintile.tag) + $(subst /,\,if exist $(O)utility.tag del $(O)utility.tag) + $(subst /,\,if exist temp.a del temp.a) + +spotless: clean + + $(subst /,\,if exist $(U)dgn_flex.c del $(U)dgn_flex.c) + $(subst /,\,if exist $(U)dgn_lex.c del $(U)dgn_lex.c) + $(subst /,\,if exist $(U)makedefs.exe del $(U)makedefs.exe) + $(subst /,\,if exist $(U)dgn_comp.exe del $(U)dgn_comp.exe) + $(subst /,\,if exist $(U)recover.exe del $(U)recover.exe) + $(subst /,\,if exist $(U)tilemap.exe del $(U)tilemap.exe) + $(subst /,\,if exist $(U)tile2bmp.exe del $(U)tile2bmp.exe) + $(subst /,\,if exist $(U)tile2bin.exe del $(U)tile2bin.exe) + $(subst /,\,if exist $(U)til2bin2.exe del $(U)til2bin2.exe) + $(subst /,\,if exist $(U)thintile.exe del $(U)thintile.exe) + $(subst /,\,if exist $(U)dlb_main.exe del $(U)dlb_main.exe) + $(subst /,\,if exist $(INCL)/vis_tab.h del $(INCL)/vis_tab.h) + $(subst /,\,if exist $(INCL)/onames.h del $(INCL)/onames.h) + $(subst /,\,if exist $(INCL)/pm.h del $(INCL)/pm.h) + $(subst /,\,if exist $(INCL)/date.h del $(INCL)/date.h) + $(subst /,\,if exist $(INCL)/dgn_comp.h del $(INCL)/dgn_comp.h) +ifneq "$(ADD_LUA)" "Y" + $(subst /,\,if exist $(INCL)/lev_comp.h del $(INCL)/lev_comp.h) +endif + $(subst /,\,if exist $(SRC)/monstr.c del $(SRC)/monstr.c) + $(subst /,\,if exist $(SRC)/vis_tab.c del $(SRC)/vis_tab.c) + $(subst /,\,if exist $(SRC)/tile.c del $(SRC)/tile.c) + $(subst /,\,if exist $(DAT)/options del $(DAT)/options) + $(subst /,\,if exist $(DAT)/data del $(DAT)/data) + $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors) + $(subst /,\,if exist $(DAT)/dungeon.pdf del $(DAT)/dungeon.pdf) + $(subst /,\,if exist $(DAT)/dungeon del $(DAT)/dungeon) + $(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles) + $(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat) + $(subst /,\,if exist $(DAT)/bogusmon del $(DAT)/bogusmon) + $(subst /,\,if exist $(DAT)/engrave del $(DAT)/engrave) + $(subst /,\,if exist $(DAT)/epitaph del $(DAT)/epitaph) + $(subst /,\,if exist $(DAT)/dlb.lst del $(DAT)/dlb.lst) + $(subst /,\,if exist $(DAT)/nhdat del $(DAT)/nhdat) +ifneq "$(ADD_LUA)" "Y" + $(subst /,\,if exist $(DAT)/*.lev del $(DAT)/*.lev) +endif + $(subst /,\,if exist $(TILE_BMP) del $(TILE_BMP)) + $(subst /,\,if exist $(WSHR)/monthin.txt del $(WSHR)/monthin.txt) + $(subst /,\,if exist $(WSHR)/objthin.txt del $(WSHR)/objthin.txt) + $(subst /,\,if exist $(WSHR)/oththin.txt del $(WSHR)/oththin.txt) + +#========================================== +# Create directory for holding object files +#========================================== + +$(O)obj.tag: + -$(subst /,\,@if not exist $(OBJ)/*.* mkdir $(OBJ)) + @$(subst /,\,@echo directory created > $@) + +#=========================================== +# Work around some djgpp long file name woes +#=========================================== + +$(PATCHLEV_H): + @$(subst /,\,if not exist $@ copy $(INCL)/patchlevel.h $(INCL)/patchlev.h) + #========================================== # Game Dependencies #========================================== @@ -1269,6 +1489,8 @@ $(O)mplayer.o: mplayer.c $(HACK_H) $(O)mthrowu.o: mthrowu.c $(HACK_H) $(O)muse.o: muse.c $(HACK_H) $(O)music.o: music.c $(HACK_H) #interp.c +$(O)nhlua.o: nhlua.c $(HACK_H) +$(O)nhlsel.o: nhlsel.c $(HACK_H) $(O)o_init.o: o_init.c $(HACK_H) $(INCL)/lev.h $(O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h diff --git a/sys/msdos/setup.bat b/sys/msdos/setup.bat index 403b3a69c..0613be865 100755 --- a/sys/msdos/setup.bat +++ b/sys/msdos/setup.bat @@ -16,10 +16,9 @@ goto err_set echo Checking to see if directories are set up properly ... if not exist ..\..\include\hack.h goto err_dir if not exist ..\..\src\hack.c goto err_dir -if not exist ..\..\dat\wizard.des goto err_dir +if not exist ..\..\dat\wizard1.lua goto err_dir if not exist ..\..\util\makedefs.c goto err_dir if not exist ..\..\win\tty\wintty.c goto err_dir -if not exist ..\share\lev_yacc.c goto err_dir echo Directories OK. if not exist ..\..\binary\* mkdir ..\..\binary diff --git a/sys/msdos/vidvesa.c b/sys/msdos/vidvesa.c index e9b7bb183..65ae2e845 100644 --- a/sys/msdos/vidvesa.c +++ b/sys/msdos/vidvesa.c @@ -62,7 +62,7 @@ extern int attrib_text_normal; /* text mode normal attribute */ extern int attrib_gr_normal; /* graphics mode normal attribute */ extern int attrib_gr_intense; /* graphics mode intense attribute */ extern boolean inmap; /* in the map window */ -extern boolean restoring; +/* extern boolean g.restoring; */ /* * Global Variables @@ -609,7 +609,7 @@ int x, y; clipx = clipxmax - (viewport_size - 1); } if (clipx != oldx) { - if (on_level(&u.uz0, &u.uz) && !restoring) + if (on_level(&u.uz0, &u.uz) && !g.restoring) /* (void) doredraw(); */ vesa_redrawmap(); } diff --git a/sys/msdos/vidvga.c b/sys/msdos/vidvga.c index 4e8a18206..13c873737 100644 --- a/sys/msdos/vidvga.c +++ b/sys/msdos/vidvga.c @@ -435,7 +435,7 @@ static void vga_cliparound(x, y) int x, y; { - extern boolean restoring; +/* extern boolean g.restoring; */ int oldx = clipx; if (!iflags.tile_view || iflags.over_view || iflags.traditional_view) @@ -449,7 +449,7 @@ int x, y; clipx = clipxmax - (viewport_size - 1); } if (clipx != oldx) { - if (on_level(&u.uz0, &u.uz) && !restoring) + if (on_level(&u.uz0, &u.uz) && !g.restoring) /* (void) doredraw(); */ vga_redrawmap(1); } diff --git a/sys/share/lev_lex.c b/sys/share/lev_lex.c deleted file mode 100644 index acf03dbaf..000000000 --- a/sys/share/lev_lex.c +++ /dev/null @@ -1,3310 +0,0 @@ - -#line 3 "lev_lex.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex via 'flex -S flexhack.skl' - * where flexhack.skl is a nethack-specific alternate skeleton derived - * from flex 2.6.0's skel.c (which in turn was generated from flex.skl). - * - * Support for C++, re-entrancy, and table serialization stripped out. - * NetHack's usage doesn't need them and we want to reduce the size and - * complexity of this skeleton as well as of the generated scanner code. - */ -#define FLEXHACK_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 0 - -#include "config.h" - -#include - -/* we don't care if actual types happen to have more bits than their names; - the tables will just take up more space, possibly slowing the parse; - still, allow config.h to override these via typedef+#define if desired */ -#ifndef FLEX_INT32_T -typedef int flex_int32_t; -#endif -#ifndef FLEX_INT16_T -typedef short int flex_int16_t; -#endif -#ifndef FLEX_UINT16_T -typedef unsigned short int flex_uint16_t; -#endif - -#define yyconst const - -#define FDECL_dummy /*empty*/ - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (uchar) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character - * in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern yy_size_t yyleng; -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - -}; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart FDECL(FDECL_dummy, (FILE *input_file )); -void yy_switch_to_buffer FDECL(FDECL_dummy, (YY_BUFFER_STATE new_buffer )); -YY_BUFFER_STATE yy_create_buffer FDECL(FDECL_dummy, (FILE *file,int size )); -void yy_delete_buffer FDECL(FDECL_dummy, (YY_BUFFER_STATE b )); -void yy_flush_buffer FDECL(FDECL_dummy, (YY_BUFFER_STATE b )); -void yypush_buffer_state FDECL(FDECL_dummy, (YY_BUFFER_STATE new_buffer )); -void yypop_buffer_state FDECL(FDECL_dummy, (void )); - -static void yyensure_buffer_stack FDECL(FDECL_dummy, (void )); -static void yy_load_buffer_state FDECL(FDECL_dummy, (void )); -static void yy_init_buffer FDECL(FDECL_dummy, (YY_BUFFER_STATE b,FILE *file )); - -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE yy_scan_buffer FDECL(FDECL_dummy, (char *base,yy_size_t size )); -YY_BUFFER_STATE yy_scan_string FDECL(FDECL_dummy, (yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes FDECL(FDECL_dummy, (yyconst char *bytes,yy_size_t len )); - -void *yyalloc FDECL(FDECL_dummy, (yy_size_t )); -void *yyrealloc FDECL(FDECL_dummy, (void *,yy_size_t )); -void yyfree FDECL(FDECL_dummy, (void * )); - -#define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ) { \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ) { \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -typedef unsigned char YY_CHAR; - -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; - -typedef int yy_state_type; - -extern int yylineno; - -int yylineno = 1; - -extern char *yytext; -#ifdef yytext_ptr -#undef yytext_ptr -#endif -#define yytext_ptr yytext - -static yy_state_type yy_get_previous_state FDECL(FDECL_dummy, (void )); -static yy_state_type yy_try_NUL_trans FDECL(FDECL_dummy, (yy_state_type current_state )); -static int yy_get_next_buffer FDECL(FDECL_dummy, (void )); -static void yy_fatal_error FDECL(FDECL_dummy, (yyconst char msg[] )) NORETURN; - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 200 -#define YY_END_OF_BUFFER 201 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[1057] = - { 0, - 0, 0, 0, 0, 201, 199, 195, 194, 199, 199, - 199, 199, 199, 199, 198, 184, 192, 199, 193, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 199, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 195, 199, 198, 2, 199, 195, 199, 199, 198, 184, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 195, 199, 195, 194, 188, 0, 185, 186, - 0, 0, 182, 198, 181, 183, 184, 198, 190, 189, - - 187, 191, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 39, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 55, 198, 198, 0, 0, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 154, 198, 198, 195, 0, 0, 3, 198, - 2, 2, 0, 195, 0, 182, 198, 181, 184, 198, - 198, 198, 198, 39, 198, 198, 198, 198, 198, 198, - 195, 0, 2, 0, 0, 197, 0, 197, 179, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 54, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 0, 198, 104, 198, 83, - - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 79, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 81, - 198, 198, 198, 198, 198, 139, 198, 198, 198, 198, - 128, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 16, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 126, 198, 198, 198, 198, 198, 198, 198, - - 198, 80, 198, 198, 198, 198, 198, 198, 198, 198, - 196, 198, 198, 198, 58, 198, 198, 198, 22, 198, - 40, 198, 41, 198, 198, 198, 198, 49, 198, 198, - 198, 198, 56, 6, 198, 198, 198, 53, 198, 198, - 198, 36, 198, 198, 198, 198, 42, 198, 35, 198, - 198, 198, 198, 198, 21, 198, 0, 180, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 160, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 155, 158, 114, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 69, 198, 198, 198, - - 198, 198, 198, 198, 198, 198, 121, 198, 198, 67, - 198, 198, 198, 198, 161, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 119, 198, 198, 198, 198, 107, - 198, 198, 198, 198, 198, 198, 198, 65, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 157, 198, 198, 198, - 198, 198, 116, 15, 0, 198, 198, 198, 198, 198, - 28, 198, 59, 198, 198, 198, 198, 198, 13, 198, - 198, 198, 50, 198, 198, 7, 198, 198, 198, 198, - 5, 198, 198, 198, 198, 198, 198, 198, 198, 198, - - 30, 198, 198, 198, 198, 198, 120, 153, 198, 198, - 198, 147, 198, 198, 162, 198, 198, 198, 198, 198, - 141, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 156, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 11, 198, - 198, 198, 198, 198, 198, 198, 113, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 125, 198, 12, 198, 198, 198, 198, 198, 198, 198, - 82, 115, 198, 198, 198, 198, 198, 198, 198, 198, - - 129, 198, 198, 198, 198, 33, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 29, 198, 198, 198, 198, - 198, 198, 17, 31, 198, 27, 198, 198, 198, 198, - 57, 198, 198, 198, 198, 146, 97, 198, 198, 127, - 111, 86, 198, 123, 72, 108, 198, 198, 198, 198, - 165, 198, 198, 87, 198, 94, 130, 198, 74, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 135, 198, 198, 109, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 110, 168, 198, 198, - 198, 16, 198, 198, 198, 198, 77, 198, 117, 198, - - 198, 198, 198, 198, 112, 198, 198, 198, 152, 173, - 198, 198, 78, 198, 198, 198, 198, 198, 198, 198, - 198, 1, 57, 198, 198, 198, 60, 198, 198, 198, - 198, 198, 198, 198, 4, 198, 19, 198, 198, 198, - 198, 198, 62, 43, 198, 46, 26, 198, 163, 99, - 198, 198, 198, 198, 198, 73, 159, 198, 198, 98, - 198, 198, 198, 93, 198, 198, 198, 198, 145, 198, - 198, 198, 198, 198, 136, 198, 198, 198, 198, 198, - 20, 63, 140, 138, 198, 198, 198, 198, 198, 198, - 198, 198, 118, 198, 132, 96, 198, 151, 198, 198, - - 198, 198, 198, 101, 47, 89, 198, 198, 198, 198, - 198, 198, 45, 198, 198, 34, 61, 14, 8, 25, - 198, 198, 198, 198, 198, 23, 198, 169, 198, 198, - 198, 102, 177, 198, 66, 198, 75, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 150, - 9, 198, 198, 198, 198, 198, 144, 198, 85, 68, - 198, 71, 198, 198, 198, 198, 176, 164, 131, 134, - 198, 106, 18, 198, 51, 198, 198, 198, 198, 198, - 198, 95, 142, 198, 198, 70, 174, 122, 198, 167, - 198, 175, 198, 92, 133, 84, 148, 149, 171, 198, - - 198, 198, 100, 172, 91, 198, 64, 198, 10, 137, - 24, 52, 198, 198, 198, 198, 198, 76, 88, 124, - 105, 198, 198, 198, 166, 103, 198, 198, 198, 198, - 198, 198, 198, 198, 90, 198, 37, 38, 198, 198, - 198, 198, 143, 170, 198, 198, 198, 178, 198, 198, - 198, 198, 48, 32, 44, 0 - } ; - -static yyconst YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 5, 6, 7, 8, 9, 10, 1, 11, 1, - 1, 1, 12, 1, 13, 14, 1, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 1, 1, 16, - 17, 18, 1, 1, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 1, 48, 1, 49, 50, 51, 52, - - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 14, 14, 14, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst YY_CHAR yy_meta[75] = - { 0, - 1, 2, 3, 2, 2, 1, 1, 2, 1, 1, - 1, 2, 4, 2, 4, 1, 1, 1, 5, 5, - 5, 6, 6, 5, 6, 5, 5, 6, 5, 5, - 6, 6, 6, 5, 6, 6, 5, 5, 6, 6, - 5, 6, 6, 6, 1, 2, 1, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 5, 6, 6 - } ; - -static yyconst flex_uint16_t yy_base[1064] = - { 0, - 0, 73, 102, 77, 1254, 1255, 75, 1255, 1250, 1235, - 1244, 0, 1204, 1234, 1233, 78, 66, 1230, 1229, 1215, - 1208, 57, 63, 59, 64, 101, 0, 63, 79, 119, - 94, 1223, 1209, 122, 123, 121, 1222, 104, 105, 100, - 124, 90, 129, 137, 1174, 84, 117, 1176, 139, 150, - 151, 151, 156, 1169, 163, 168, 166, 56, 1184, 1183, - 232, 1232, 216, 1255, 1231, 242, 248, 251, 264, 196, - 155, 167, 208, 228, 241, 1218, 249, 242, 195, 277, - 284, 223, 319, 334, 257, 1255, 1255, 1225, 1255, 0, - 1220, 1219, 1214, 0, 1213, 1255, 298, 1212, 1255, 1255, - - 1255, 1255, 1188, 263, 1188, 264, 1200, 1190, 1203, 1184, - 1195, 1192, 1199, 270, 1185, 1183, 1185, 1195, 0, 1186, - 1190, 1171, 1177, 1165, 1171, 1175, 1174, 1174, 280, 1176, - 292, 1171, 301, 1169, 1162, 1168, 1180, 1178, 1170, 259, - 0, 1177, 1165, 203, 304, 272, 1121, 1143, 1132, 1138, - 1141, 288, 1121, 1125, 1121, 1124, 1123, 1135, 1117, 1119, - 308, 1115, 1109, 1106, 1111, 1110, 1116, 1120, 1111, 1113, - 1111, 1111, 234, 281, 296, 299, 1117, 282, 1103, 1111, - 1096, 81, 315, 1115, 324, 26, 1103, 1102, 1102, 1093, - 330, 1103, 1107, 1093, 1109, 1104, 1107, 281, 333, 1100, - - 1102, 1098, 1090, 342, 323, 321, 1082, 1081, 1083, 1084, - 345, 350, 0, 1081, 332, 407, 1143, 1142, 1255, 363, - 1255, 1255, 1141, 411, 415, 416, 1128, 0, 412, 390, - 396, 404, 415, 1127, 410, 420, 421, 422, 423, 424, - 0, 0, 1255, 1138, 0, 1255, 1129, 1128, 1123, 1118, - 1104, 1116, 1111, 1095, 1096, 1112, 1094, 1088, 1105, 1091, - 1088, 1100, 0, 1092, 1102, 1091, 1099, 1080, 1081, 1096, - 1094, 1082, 1092, 1077, 1090, 1075, 1088, 1091, 1061, 1085, - 1077, 1068, 1083, 1077, 1073, 1071, 1077, 1071, 1072, 1062, - 1059, 1073, 1059, 1060, 1063, 435, 1037, 0, 1042, 0, - - 1027, 1036, 1026, 1028, 1019, 1023, 1021, 1015, 1023, 385, - 1030, 1012, 1016, 1027, 1010, 1016, 1011, 1020, 1007, 1005, - 1009, 0, 1002, 1001, 1011, 1001, 1014, 998, 1015, 383, - 1010, 999, 392, 1012, 989, 1005, 1006, 1000, 988, 0, - 1003, 1003, 996, 999, 989, 0, 982, 983, 991, 994, - 0, 987, 992, 981, 993, 983, 988, 987, 378, 986, - 970, 977, 973, 974, 404, 966, 408, 980, 970, 982, - 979, 968, 966, 970, 974, 392, 956, 967, 967, 971, - 952, 969, 953, 956, 964, 950, 395, 958, 946, 964, - 950, 945, 0, 946, 956, 939, 950, 943, 948, 936, - - 935, 0, 462, 448, 453, 971, 454, 456, 434, 455, - 1255, 965, 979, 970, 0, 979, 970, 957, 0, 975, - 0, 975, 0, 956, 954, 953, 967, 0, 966, 940, - 964, 956, 0, 944, 965, 947, 944, 0, 947, 452, - 959, 0, 960, 945, 944, 957, 953, 950, 0, 937, - 939, 950, 936, 950, 0, 941, 468, 1255, 905, 900, - 899, 911, 908, 909, 894, 908, 907, 895, 904, 903, - 0, 902, 901, 886, 892, 898, 893, 889, 879, 886, - 893, 0, 0, 0, 881, 895, 890, 889, 881, 422, - 887, 882, 886, 880, 883, 868, 0, 921, 879, 858, - - 874, 866, 878, 861, 872, 873, 0, 872, 856, 0, - 870, 873, 859, 862, 0, 429, 852, 850, 844, 850, - 858, 851, 864, 849, 0, 855, 842, 849, 857, 0, - 847, 853, 856, 836, 854, 417, 853, 0, 841, 830, - 831, 835, 844, 828, 842, 846, 842, 824, 829, 821, - 837, 832, 821, 824, 836, 820, 0, 817, 822, 824, - 426, 823, 0, 1255, 876, 463, 859, 466, 475, 476, - 0, 851, 0, 849, 853, 844, 837, 832, 0, 852, - 843, 831, 0, 837, 831, 0, 847, 840, 845, 840, - 0, 835, 842, 822, 829, 827, 825, 835, 822, 824, - - 0, 820, 826, 818, 823, 825, 0, 0, 795, 783, - 793, 0, 792, 791, 0, 782, 780, 789, 780, 773, - 0, 785, 785, 781, 782, 767, 784, 780, 764, 760, - 440, 0, 776, 776, 774, 760, 763, 770, 770, 749, - 768, 435, 760, 756, 758, 754, 763, 758, 745, 761, - 757, 758, 758, 741, 741, 754, 740, 752, 0, 751, - 739, 753, 746, 734, 735, 749, 0, 731, 743, 727, - 721, 739, 728, 734, 730, 732, 727, 721, 737, 732, - 0, 721, 0, 714, 714, 713, 712, 712, 725, 725, - 443, 0, 723, 722, 717, 720, 705, 711, 708, 712, - - 0, 717, 733, 483, 490, 0, 734, 732, 726, 736, - 735, 734, 727, 723, 739, 0, 724, 712, 81, 122, - 205, 226, 0, 0, 311, 0, 350, 460, 483, 476, - 0, 472, 478, 468, 463, 0, 0, 461, 464, 0, - 0, 0, 457, 0, 0, 0, 456, 458, 467, 447, - 0, 469, 470, 0, 458, 0, 0, 474, 0, 471, - 470, 466, 480, 478, 478, 475, 470, 472, 482, 473, - 470, 488, 479, 0, 483, 489, 0, 473, 475, 493, - 488, 476, 481, 495, 489, 488, 0, 0, 491, 503, - 489, 0, 480, 486, 492, 489, 0, 496, 514, 505, - - 495, 510, 497, 503, 0, 499, 509, 510, 0, 0, - 511, 515, 0, 518, 509, 520, 520, 521, 522, 508, - 528, 0, 563, 564, 557, 545, 0, 560, 551, 552, - 553, 543, 553, 559, 0, 562, 0, 565, 554, 571, - 545, 558, 0, 0, 557, 0, 0, 536, 0, 0, - 544, 545, 546, 548, 548, 0, 0, 539, 535, 0, - 544, 537, 540, 0, 554, 554, 547, 543, 0, 552, - 546, 554, 566, 553, 0, 551, 565, 551, 568, 568, - 0, 0, 0, 0, 565, 559, 561, 572, 566, 574, - 555, 576, 1255, 577, 0, 0, 579, 0, 583, 570, - - 579, 575, 563, 0, 0, 0, 585, 586, 587, 587, - 581, 606, 0, 618, 619, 0, 0, 0, 0, 0, - 601, 627, 606, 615, 611, 0, 602, 0, 599, 600, - 591, 0, 0, 591, 0, 595, 0, 604, 589, 602, - 593, 611, 594, 605, 610, 598, 603, 613, 601, 0, - 0, 608, 614, 606, 605, 620, 0, 621, 0, 0, - 622, 0, 611, 614, 621, 618, 0, 0, 0, 0, - 627, 0, 0, 657, 0, 658, 662, 664, 648, 662, - 650, 0, 0, 619, 634, 0, 0, 0, 621, 0, - 630, 0, 641, 0, 0, 0, 0, 0, 0, 630, - - 640, 626, 0, 0, 0, 628, 0, 628, 0, 0, - 0, 0, 667, 668, 663, 664, 678, 0, 0, 0, - 0, 642, 650, 652, 0, 0, 652, 683, 677, 681, - 673, 685, 658, 660, 0, 661, 0, 0, 692, 696, - 689, 650, 0, 0, 685, 692, 687, 0, 685, 690, - 691, 687, 0, 0, 0, 1255, 724, 726, 732, 735, - 741, 746, 751 - } ; - -static yyconst flex_int16_t yy_def[1064] = - { 0, - 1056, 1, 1, 3, 1056, 1056, 1056, 1056, 1056, 1056, - 1057, 1058, 1059, 1056, 1060, 1060, 1056, 1056, 1056, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1056, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1056, 1061, 1060, 1056, 1056, 1062, 1062, 1062, 1060, 69, - 69, 69, 69, 1060, 69, 69, 69, 69, 69, 69, - 69, 69, 1062, 1061, 1056, 1056, 1056, 1057, 1056, 1058, - 1056, 1063, 1056, 1060, 1060, 1056, 1060, 1060, 1056, 1056, - - 1056, 1056, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1056, 1056, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1056, 1061, 1061, 1056, 1060, - 1056, 1056, 1056, 83, 83, 83, 69, 69, 69, 69, - 69, 1060, 69, 69, 69, 69, 69, 69, 69, 69, - 83, 84, 1056, 1061, 84, 1056, 1056, 1056, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1056, 1060, 1060, 1060, 1060, - - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - - 1060, 1060, 1060, 69, 69, 1060, 69, 69, 69, 69, - 1056, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1056, 1056, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1056, 1056, 69, 1060, 69, 69, 69, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - - 1060, 1060, 1060, 69, 69, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 69, 69, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1056, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 0, 1056, 1056, 1056, 1056, - 1056, 1056, 1056 - } ; - -static yyconst flex_uint16_t yy_nxt[1330] = - { 0, - 6, 7, 8, 9, 7, 10, 11, 6, 12, 6, - 13, 14, 15, 6, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 27, 27, 29, - 30, 31, 32, 33, 27, 34, 35, 36, 27, 27, - 37, 27, 27, 27, 38, 6, 6, 27, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 27, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 27, 27, 27, 61, 105, 85, 61, 61, 85, - 62, 83, 99, 100, 84, 107, 119, 96, 110, 106, - 111, 356, 97, 113, 120, 108, 114, 121, 109, 357, - - 112, 122, 115, 63, 64, 65, 66, 63, 144, 67, - 836, 123, 128, 68, 69, 67, 70, 212, 145, 213, - 71, 72, 73, 116, 74, 75, 129, 76, 77, 98, - 76, 78, 175, 117, 347, 79, 118, 124, 80, 81, - 132, 125, 82, 140, 133, 126, 176, 67, 135, 136, - 348, 127, 163, 141, 134, 164, 142, 837, 165, 152, - 137, 138, 153, 139, 146, 154, 147, 177, 155, 227, - 148, 149, 156, 76, 150, 151, 157, 166, 178, 158, - 159, 227, 179, 160, 230, 170, 161, 181, 167, 171, - 168, 182, 162, 172, 169, 183, 173, 185, 186, 189, - - 192, 184, 104, 190, 194, 96, 187, 144, 195, 227, - 229, 198, 188, 191, 193, 199, 203, 145, 209, 200, - 204, 196, 227, 205, 201, 202, 231, 131, 210, 838, - 206, 211, 207, 216, 220, 208, 216, 227, 125, 217, - 106, 240, 126, 85, 222, 223, 224, 98, 127, 1056, - 222, 223, 1056, 222, 223, 227, 227, 110, 85, 232, - 235, 85, 839, 227, 122, 226, 222, 223, 225, 112, - 233, 225, 234, 114, 123, 225, 227, 225, 228, 115, - 120, 251, 227, 227, 227, 252, 331, 227, 292, 227, - 227, 227, 227, 227, 293, 254, 332, 227, 227, 255, - - 227, 227, 236, 237, 227, 263, 140, 96, 264, 225, - 278, 279, 97, 296, 238, 138, 141, 239, 145, 142, - 216, 222, 223, 241, 281, 284, 242, 282, 297, 333, - 342, 298, 374, 334, 285, 227, 243, 244, 245, 299, - 305, 245, 375, 335, 306, 245, 245, 245, 245, 98, - 307, 343, 245, 245, 245, 336, 316, 245, 840, 245, - 245, 337, 245, 245, 338, 339, 340, 245, 317, 318, - 245, 245, 841, 319, 245, 349, 350, 353, 362, 245, - 388, 363, 351, 376, 354, 386, 355, 377, 387, 389, - 364, 365, 383, 394, 384, 366, 403, 367, 401, 402, - - 396, 385, 378, 397, 227, 245, 273, 398, 216, 399, - 227, 216, 85, 395, 217, 224, 1056, 1056, 225, 225, - 225, 96, 225, 225, 227, 406, 229, 404, 260, 227, - 226, 270, 405, 407, 227, 227, 227, 227, 227, 457, - 408, 470, 490, 494, 518, 519, 471, 537, 227, 409, - 491, 549, 288, 410, 524, 527, 525, 550, 287, 538, - 528, 495, 227, 98, 564, 565, 566, 227, 227, 227, - 227, 569, 457, 592, 634, 415, 676, 227, 424, 677, - 227, 458, 568, 657, 570, 593, 700, 635, 658, 227, - 227, 754, 842, 701, 765, 704, 811, 227, 571, 812, - - 766, 601, 705, 755, 227, 843, 844, 845, 823, 846, - 847, 848, 849, 824, 458, 850, 851, 852, 853, 854, - 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, - 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, - 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, - 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, - 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, - 905, 906, 907, 908, 909, 910, 911, 227, 227, 912, - 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, - 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, - - 933, 934, 935, 936, 937, 938, 847, 939, 940, 941, - 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, - 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, - 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, - 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, - 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, - 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, - 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, - 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, - 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, - - 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, - 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, - 1052, 1053, 1054, 1055, 88, 88, 88, 88, 88, 88, - 90, 90, 91, 91, 835, 91, 91, 91, 94, 94, - 94, 218, 218, 218, 218, 218, 218, 225, 225, 225, - 225, 247, 247, 834, 247, 247, 247, 833, 832, 831, - 830, 829, 828, 827, 826, 825, 822, 821, 820, 819, - 818, 817, 816, 815, 814, 813, 810, 809, 808, 807, - 806, 805, 804, 803, 802, 801, 800, 799, 798, 797, - 796, 795, 794, 793, 792, 791, 790, 789, 788, 787, - - 786, 785, 784, 783, 782, 781, 780, 779, 778, 777, - 776, 775, 774, 773, 772, 771, 770, 769, 768, 767, - 764, 763, 762, 761, 760, 759, 758, 757, 756, 753, - 752, 751, 750, 749, 748, 747, 746, 745, 744, 743, - 742, 741, 740, 739, 738, 737, 736, 735, 734, 733, - 732, 731, 730, 729, 728, 727, 726, 725, 724, 723, - 722, 721, 720, 719, 718, 717, 716, 715, 714, 713, - 712, 711, 710, 709, 708, 707, 706, 703, 564, 702, - 699, 698, 697, 696, 695, 694, 693, 692, 691, 690, - 689, 688, 687, 686, 685, 684, 683, 682, 681, 680, - - 679, 678, 675, 674, 673, 672, 671, 670, 669, 668, - 667, 666, 665, 664, 663, 662, 661, 660, 659, 656, - 655, 654, 653, 652, 651, 650, 649, 648, 647, 646, - 645, 644, 643, 642, 641, 640, 639, 638, 637, 636, - 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, - 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, - 613, 612, 611, 610, 609, 608, 607, 606, 605, 604, - 603, 602, 601, 600, 599, 598, 597, 596, 595, 594, - 591, 590, 589, 588, 587, 586, 585, 584, 583, 582, - 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, - - 571, 567, 563, 562, 561, 560, 559, 558, 557, 556, - 555, 554, 553, 552, 551, 548, 547, 546, 545, 544, - 543, 542, 541, 540, 539, 536, 535, 534, 533, 532, - 531, 530, 529, 526, 523, 522, 521, 520, 438, 517, - 516, 515, 514, 513, 512, 511, 510, 509, 508, 507, - 506, 505, 504, 503, 502, 501, 500, 499, 498, 497, - 496, 493, 492, 489, 488, 487, 486, 485, 484, 483, - 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, - 472, 469, 468, 467, 466, 465, 464, 463, 462, 461, - 460, 459, 456, 455, 454, 453, 452, 451, 450, 449, - - 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, - 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, - 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, - 418, 417, 416, 415, 414, 413, 412, 249, 411, 411, - 243, 227, 227, 222, 219, 219, 400, 393, 392, 391, - 390, 382, 381, 380, 379, 373, 372, 371, 370, 369, - 368, 361, 360, 359, 358, 352, 346, 345, 344, 341, - 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, - 320, 315, 314, 313, 312, 311, 310, 309, 308, 304, - 303, 302, 301, 300, 295, 294, 291, 290, 289, 288, - - 287, 286, 283, 280, 277, 276, 275, 274, 273, 272, - 271, 270, 269, 268, 267, 266, 265, 262, 261, 260, - 259, 258, 257, 256, 253, 250, 249, 95, 93, 248, - 246, 89, 227, 221, 219, 215, 214, 197, 180, 174, - 143, 131, 130, 104, 103, 102, 101, 95, 93, 92, - 89, 87, 86, 1056, 5, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056 - } ; - -static yyconst flex_int16_t yy_chk[1330] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 22, 7, 2, 4, 7, - 2, 4, 17, 17, 4, 23, 28, 16, 24, 22, - 24, 186, 16, 25, 28, 23, 25, 29, 23, 186, - - 24, 29, 25, 2, 3, 3, 3, 4, 38, 3, - 719, 29, 31, 3, 3, 3, 3, 58, 38, 58, - 3, 3, 3, 26, 3, 3, 31, 3, 3, 16, - 3, 3, 46, 26, 182, 3, 26, 30, 3, 3, - 34, 30, 3, 36, 34, 30, 46, 3, 35, 35, - 182, 30, 42, 36, 34, 42, 36, 720, 42, 40, - 35, 35, 40, 35, 39, 40, 39, 47, 40, 71, - 39, 39, 41, 3, 39, 39, 41, 43, 47, 41, - 41, 72, 47, 41, 71, 44, 41, 49, 43, 44, - 43, 49, 41, 44, 43, 49, 44, 50, 50, 51, - - 52, 49, 72, 51, 53, 70, 50, 144, 53, 79, - 70, 55, 50, 51, 52, 55, 56, 144, 57, 55, - 56, 53, 73, 56, 55, 55, 73, 79, 57, 721, - 56, 57, 56, 61, 63, 56, 61, 82, 63, 61, - 73, 82, 63, 66, 66, 66, 66, 70, 63, 67, - 67, 67, 68, 68, 68, 75, 78, 74, 85, 74, - 78, 85, 722, 77, 78, 68, 69, 69, 69, 74, - 75, 69, 77, 75, 78, 69, 69, 69, 69, 75, - 77, 104, 69, 69, 69, 104, 173, 69, 140, 69, - 69, 80, 69, 69, 140, 106, 173, 69, 81, 106, - - 69, 69, 80, 80, 69, 114, 81, 97, 114, 69, - 129, 129, 97, 145, 80, 80, 81, 80, 145, 81, - 83, 83, 83, 83, 131, 133, 83, 131, 146, 174, - 178, 146, 198, 174, 133, 69, 84, 84, 84, 146, - 152, 84, 198, 174, 152, 84, 84, 84, 84, 97, - 152, 178, 84, 84, 84, 175, 161, 84, 725, 84, - 84, 175, 84, 84, 176, 176, 176, 84, 161, 161, - 84, 84, 727, 161, 84, 183, 183, 185, 191, 84, - 206, 191, 183, 199, 185, 205, 185, 199, 205, 206, - 191, 191, 204, 211, 204, 191, 220, 191, 215, 215, - - 212, 204, 199, 212, 230, 84, 220, 212, 216, 212, - 231, 216, 224, 211, 216, 224, 225, 226, 224, 225, - 226, 229, 225, 226, 235, 232, 229, 230, 232, 233, - 226, 235, 231, 233, 236, 237, 238, 239, 240, 296, - 238, 310, 330, 333, 359, 359, 310, 376, 409, 239, - 330, 387, 237, 240, 365, 367, 365, 387, 236, 376, - 367, 333, 404, 229, 403, 403, 404, 405, 407, 410, - 408, 409, 457, 440, 490, 405, 536, 566, 407, 536, - 568, 296, 408, 516, 410, 440, 561, 490, 516, 569, - 570, 631, 728, 561, 642, 569, 691, 704, 566, 691, - - 642, 568, 570, 631, 705, 729, 730, 732, 704, 733, - 734, 735, 738, 705, 457, 739, 743, 747, 748, 749, - 750, 752, 753, 755, 758, 760, 761, 762, 763, 764, - 765, 766, 767, 768, 769, 770, 771, 772, 773, 775, - 776, 778, 779, 780, 781, 782, 783, 784, 785, 786, - 789, 790, 791, 793, 794, 795, 796, 798, 799, 800, - 801, 802, 803, 804, 806, 807, 808, 811, 812, 814, - 815, 816, 817, 818, 819, 820, 821, 823, 824, 825, - 826, 828, 829, 830, 831, 832, 833, 834, 836, 838, - 839, 840, 841, 842, 845, 848, 851, 852, 853, 854, - - 855, 858, 859, 861, 862, 863, 824, 865, 866, 867, - 868, 870, 871, 872, 873, 874, 876, 877, 878, 879, - 880, 885, 886, 887, 888, 889, 890, 891, 892, 894, - 897, 899, 900, 901, 902, 903, 907, 908, 909, 910, - 911, 912, 914, 915, 921, 922, 923, 924, 925, 927, - 929, 930, 931, 934, 936, 938, 939, 940, 941, 942, - 943, 944, 945, 946, 947, 948, 949, 952, 953, 954, - 955, 956, 958, 961, 963, 964, 965, 966, 971, 974, - 976, 977, 978, 979, 980, 981, 984, 985, 989, 991, - 993, 1000, 1001, 1002, 1006, 1008, 1013, 1014, 1015, 1016, - - 1017, 1022, 1023, 1024, 1027, 1028, 1029, 1030, 1031, 1032, - 1033, 1034, 1036, 1039, 1040, 1041, 1042, 1045, 1046, 1047, - 1049, 1050, 1051, 1052, 1057, 1057, 1057, 1057, 1057, 1057, - 1058, 1058, 1059, 1059, 718, 1059, 1059, 1059, 1060, 1060, - 1060, 1061, 1061, 1061, 1061, 1061, 1061, 1062, 1062, 1062, - 1062, 1063, 1063, 717, 1063, 1063, 1063, 715, 714, 713, - 712, 711, 710, 709, 708, 707, 703, 702, 700, 699, - 698, 697, 696, 695, 694, 693, 690, 689, 688, 687, - 686, 685, 684, 682, 680, 679, 678, 677, 676, 675, - 674, 673, 672, 671, 670, 669, 668, 666, 665, 664, - - 663, 662, 661, 660, 658, 657, 656, 655, 654, 653, - 652, 651, 650, 649, 648, 647, 646, 645, 644, 643, - 641, 640, 639, 638, 637, 636, 635, 634, 633, 630, - 629, 628, 627, 626, 625, 624, 623, 622, 620, 619, - 618, 617, 616, 614, 613, 611, 610, 609, 606, 605, - 604, 603, 602, 600, 599, 598, 597, 596, 595, 594, - 593, 592, 590, 589, 588, 587, 585, 584, 582, 581, - 580, 578, 577, 576, 575, 574, 572, 567, 565, 562, - 560, 559, 558, 556, 555, 554, 553, 552, 551, 550, - 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, - - 539, 537, 535, 534, 533, 532, 531, 529, 528, 527, - 526, 524, 523, 522, 521, 520, 519, 518, 517, 514, - 513, 512, 511, 509, 508, 506, 505, 504, 503, 502, - 501, 500, 499, 498, 496, 495, 494, 493, 492, 491, - 489, 488, 487, 486, 485, 481, 480, 479, 478, 477, - 476, 475, 474, 473, 472, 470, 469, 468, 467, 466, - 465, 464, 463, 462, 461, 460, 459, 456, 454, 453, - 452, 451, 450, 448, 447, 446, 445, 444, 443, 441, - 439, 437, 436, 435, 434, 432, 431, 430, 429, 427, - 426, 425, 424, 422, 420, 418, 417, 416, 414, 413, - - 412, 406, 401, 400, 399, 398, 397, 396, 395, 394, - 392, 391, 390, 389, 388, 386, 385, 384, 383, 382, - 381, 380, 379, 378, 377, 375, 374, 373, 372, 371, - 370, 369, 368, 366, 364, 363, 362, 361, 360, 358, - 357, 356, 355, 354, 353, 352, 350, 349, 348, 347, - 345, 344, 343, 342, 341, 339, 338, 337, 336, 335, - 334, 332, 331, 329, 328, 327, 326, 325, 324, 323, - 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, - 311, 309, 308, 307, 306, 305, 304, 303, 302, 301, - 299, 297, 295, 294, 293, 292, 291, 290, 289, 288, - - 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, - 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, - 267, 266, 265, 264, 262, 261, 260, 259, 258, 257, - 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, - 244, 234, 227, 223, 218, 217, 214, 210, 209, 208, - 207, 203, 202, 201, 200, 197, 196, 195, 194, 193, - 192, 190, 189, 188, 187, 184, 181, 180, 179, 177, - 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, - 162, 160, 159, 158, 157, 156, 155, 154, 153, 151, - 150, 149, 148, 147, 143, 142, 139, 138, 137, 136, - - 135, 134, 132, 130, 128, 127, 126, 125, 124, 123, - 122, 121, 120, 118, 117, 116, 115, 113, 112, 111, - 110, 109, 108, 107, 105, 103, 98, 95, 93, 92, - 91, 88, 76, 65, 62, 60, 59, 54, 48, 45, - 37, 33, 32, 21, 20, 19, 18, 15, 14, 13, - 11, 10, 9, 5, 1056, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int yy_flex_debug; -int yy_flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yytext; -/* NetHack 3.6 lev_comp.l $NHDT-Date: 1543372935 2018/11/28 02:42:15 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.29 $ */ -/* Copyright (c) 1989 by Jean-Christophe Collet */ -/* NetHack may be freely redistributed. See license for details. */ - -#define LEV_LEX_C - -#include "hack.h" -#include "lev_comp.h" -#include "sp_lev.h" - -/* Most of these don't exist in flex, yywrap is macro and - * yyunput is properly declared in flex.skel. - */ -#if !defined(FLEX_SCANNER) && !defined(FLEXHACK_SCANNER) -int FDECL(yyback, (int *,int)); -int NDECL(yylook); -int NDECL(yyinput); -int NDECL(yywrap); -int NDECL(yylex); - /* Traditional lexes let yyunput() and yyoutput() default to int; - * newer ones may declare them as void since they don't return - * values. For even more fun, the lex supplied as part of the - * newer unbundled compiler for SunOS 4.x adds the void declarations - * (under __STDC__ or _cplusplus ifdefs -- otherwise they remain - * int) while the bundled lex and the one with the older unbundled - * compiler do not. To detect this, we need help from outside -- - * sys/unix/Makefile.utl. - * - * Digital UNIX is difficult and still has int in spite of all - * other signs. - */ -# if defined(NeXT) || defined(SVR4) || defined(_AIX32) -# define VOIDYYPUT -# endif -# if !defined(VOIDYYPUT) && defined(POSIX_TYPES) -# if !defined(BOS) && !defined(HISX) && !defined(_M_UNIX) && !defined(VMS) -# define VOIDYYPUT -# endif -# endif -# if !defined(VOIDYYPUT) && defined(WEIRD_LEX) -# if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX > 1) -# define VOIDYYPUT -# endif -# endif -# if defined(VOIDYYPUT) && defined(__osf__) -# undef VOIDYYPUT -# endif -# ifdef VOIDYYPUT -void FDECL(yyunput, (int)); -void FDECL(yyoutput, (int)); -# else -int FDECL(yyunput, (int)); -int FDECL(yyoutput, (int)); -# endif - -#else /* !FLEX_SCANNER && !FLEXHACK_SCANNER */ -/* most recent flex allows suppressing yyunput() altogether when not needed */ -#define YY_NO_UNPUT -#define YY_NO_INPUT -#endif - -#if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER) -/* older flex wants this */ -#define YY_MALLOC_DECL genericptr_t FDECL(malloc, (size_t)); \ - genericptr_t FDECL(realloc, (genericptr_t, size_t)); -/* newer flex assumes so needs this in case it's been suppressed */ -YY_MALLOC_DECL -#endif - -void FDECL(init_yyin, (FILE *)); -void FDECL(init_yyout, (FILE *)); - -long NDECL(handle_varstring_check); -long FDECL(corefunc_str_check, (char *, long)); - -extern void VDECL(lc_error, (const char *, ...)); -extern struct lc_vardefs *FDECL(vardef_defined,(struct lc_vardefs *,char *, int)); - -extern struct lc_vardefs *vardefs; - -extern long FDECL(method_defined, (char *, long, long *)); - -void FDECL(savetoken, (char *)); -void NDECL(newline); -void FDECL(advancepos, (char *)); - -/* - * This doesn't always get put in lev_comp.h - * (esp. when using older versions of bison). - */ -extern YYSTYPE yylval; - -int nh_line_number = 1; -int token_start_pos = 0; -char curr_token[512]; -static char map[4096]; -static int map_cnt = 0; - -FILE *orig_yyin = NULL; - -#define ST_RET(x) do { savetoken(yytext); return x; } while (0); -#define ST_RETF(y, x) do { savetoken(yytext); y; return x; } while (0); - -#define INITIAL 0 -#define MAPC 1 - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int yylex_destroy FDECL(FDECL_dummy, (void )); -int yyget_debug FDECL(FDECL_dummy, (void )); -void yyset_debug FDECL(FDECL_dummy, (int debug_flag )); -YY_EXTRA_TYPE yyget_extra FDECL(FDECL_dummy, (void )); -void yyset_extra FDECL(FDECL_dummy, (YY_EXTRA_TYPE user_defined )); -FILE *yyget_in FDECL(FDECL_dummy, (void )); -void yyset_in FDECL(FDECL_dummy, (FILE * _in_str )); -FILE *yyget_out FDECL(FDECL_dummy, (void )); -void yyset_out FDECL(FDECL_dummy, (FILE * _out_str )); -yy_size_t yyget_leng FDECL(FDECL_dummy, (void )); -char *yyget_text FDECL(FDECL_dummy, (void )); -int yyget_lineno FDECL(FDECL_dummy, (void )); -void yyset_lineno FDECL(FDECL_dummy, (int _line_number )); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -extern int yywrap FDECL(FDECL_dummy, (void )); -#endif - -#ifndef YY_NO_UNPUT - -void yyunput FDECL(FDECL_dummy, (int c,char *buf_ptr )); -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy FDECL(FDECL_dummy, (char *,yyconst char *,int )); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen FDECL(FDECL_dummy, (yyconst char * )); -#endif - -#ifndef YY_NO_INPUT - -static int input FDECL(FDECL_dummy, (void )); - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int yylex FDECL(FDECL_dummy, (void)); - -#define YY_DECL int yylex () -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - if ( yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } - - yy_load_buffer_state( ); - } - - { - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yytext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1057 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 1255 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -YY_RULE_SETUP -{ - savetoken(yytext); - BEGIN(INITIAL); - yylval.map = (char *) alloc(map_cnt + 1); - (void) strncpy(yylval.map, map, map_cnt); - yylval.map[map_cnt] = 0; - map_cnt = 0; - return MAP_ID; - } - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP -{ - int len = yyleng; - savetoken(yytext); - /* convert \r\n to \n */ - if (len >= 2 && yytext[len - 2] == '\r') - len -= 1; - (void) strncpy(map + map_cnt, yytext, len); - map_cnt += len; - map[map_cnt - 1] = '\n'; - map[map_cnt] = '\0'; - newline(); - } - YY_BREAK -case 3: -/* rule 3 can match eol */ -YY_RULE_SETUP -{ savetoken(yytext); newline(); } - YY_BREAK -case 4: -YY_RULE_SETUP -ST_RET(MESSAGE_ID); - YY_BREAK -case 5: -YY_RULE_SETUP -ST_RET(NOMAP_ID); - YY_BREAK -case 6: -YY_RULE_SETUP -ST_RET(MAZE_ID); - YY_BREAK -case 7: -YY_RULE_SETUP -ST_RET(LEVEL_ID); - YY_BREAK -case 8: -YY_RULE_SETUP -ST_RET(LEV_INIT_ID); - YY_BREAK -case 9: -YY_RULE_SETUP -ST_RET(MAZE_GRID_ID); - YY_BREAK -case 10: -YY_RULE_SETUP -ST_RET(SOLID_FILL_ID); - YY_BREAK -case 11: -YY_RULE_SETUP -ST_RET(MINES_ID); - YY_BREAK -case 12: -YY_RULE_SETUP -ST_RET(ROGUELEV_ID); - YY_BREAK -case 13: -YY_RULE_SETUP -ST_RET(FLAGS_ID); - YY_BREAK -case 14: -YY_RULE_SETUP -ST_RET(GEOMETRY_ID); - YY_BREAK -case 15: -/* rule 15 can match eol */ -YY_RULE_SETUP -{ savetoken(yytext); BEGIN(MAPC); newline(); } - YY_BREAK -case 16: -YY_RULE_SETUP -ST_RET(object_ID); - YY_BREAK -case 17: -YY_RULE_SETUP -ST_RET(OBJECT_ID); - YY_BREAK -case 18: -YY_RULE_SETUP -ST_RET(COBJECT_ID); - YY_BREAK -case 19: -YY_RULE_SETUP -ST_RET(MONSTER_ID); - YY_BREAK -case 20: -YY_RULE_SETUP -ST_RET(monster_ID); - YY_BREAK -case 21: -YY_RULE_SETUP -ST_RET(TRAP_ID); - YY_BREAK -case 22: -YY_RULE_SETUP -ST_RET(DOOR_ID); - YY_BREAK -case 23: -YY_RULE_SETUP -ST_RET(ROOMDOOR_ID); - YY_BREAK -case 24: -YY_RULE_SETUP -ST_RET(DRAWBRIDGE_ID); - YY_BREAK -case 25: -YY_RULE_SETUP -ST_RET(MAZEWALK_ID); - YY_BREAK -case 26: -YY_RULE_SETUP -ST_RET(WALLIFY_ID); - YY_BREAK -case 27: -YY_RULE_SETUP -ST_RET(REGION_ID); - YY_BREAK -case 28: -YY_RULE_SETUP -ST_RET(ALTAR_ID); - YY_BREAK -case 29: -YY_RULE_SETUP -ST_RET(LADDER_ID); - YY_BREAK -case 30: -YY_RULE_SETUP -ST_RET(STAIR_ID); - YY_BREAK -case 31: -YY_RULE_SETUP -ST_RET(PORTAL_ID); - YY_BREAK -case 32: -YY_RULE_SETUP -ST_RET(TELEPRT_ID); - YY_BREAK -case 33: -YY_RULE_SETUP -ST_RET(BRANCH_ID); - YY_BREAK -case 34: -YY_RULE_SETUP -ST_RET(FOUNTAIN_ID); - YY_BREAK -case 35: -YY_RULE_SETUP -ST_RET(SINK_ID); - YY_BREAK -case 36: -YY_RULE_SETUP -ST_RET(POOL_ID); - YY_BREAK -case 37: -YY_RULE_SETUP -ST_RET(NON_DIGGABLE_ID); - YY_BREAK -case 38: -YY_RULE_SETUP -ST_RET(NON_PASSWALL_ID); - YY_BREAK -case 39: -YY_RULE_SETUP -ST_RET(IF_ID); - YY_BREAK -case 40: -YY_RULE_SETUP -ST_RET(ELSE_ID); - YY_BREAK -case 41: -YY_RULE_SETUP -ST_RET(EXIT_ID); - YY_BREAK -case 42: -YY_RULE_SETUP -ST_RET(ROOM_ID); - YY_BREAK -case 43: -YY_RULE_SETUP -ST_RET(SUBROOM_ID); - YY_BREAK -case 44: -YY_RULE_SETUP -ST_RET(RAND_CORRIDOR_ID); - YY_BREAK -case 45: -YY_RULE_SETUP -ST_RET(CORRIDOR_ID); - YY_BREAK -case 46: -YY_RULE_SETUP -ST_RET(TERRAIN_ID); - YY_BREAK -case 47: -YY_RULE_SETUP -ST_RET(terrain_ID); - YY_BREAK -case 48: -YY_RULE_SETUP -ST_RET(REPLACE_TERRAIN_ID); - YY_BREAK -case 49: -YY_RULE_SETUP -ST_RET(GOLD_ID); - YY_BREAK -case 50: -YY_RULE_SETUP -ST_RET(GRAVE_ID); - YY_BREAK -case 51: -YY_RULE_SETUP -ST_RET(ENGRAVING_ID); - YY_BREAK -case 52: -YY_RULE_SETUP -ST_RET(MINERALIZE_ID); - YY_BREAK -case 53: -YY_RULE_SETUP -ST_RET(NAME_ID); - YY_BREAK -case 54: -YY_RULE_SETUP -ST_RET(FOR_ID); - YY_BREAK -case 55: -YY_RULE_SETUP -ST_RET(TO_ID); - YY_BREAK -case 56: -YY_RULE_SETUP -ST_RET(LOOP_ID); - YY_BREAK -case 57: -YY_RULE_SETUP -ST_RET(SWITCH_ID); - YY_BREAK -case 58: -YY_RULE_SETUP -ST_RET(CASE_ID); - YY_BREAK -case 59: -YY_RULE_SETUP -ST_RET(BREAK_ID); - YY_BREAK -case 60: -YY_RULE_SETUP -ST_RET(DEFAULT_ID); - YY_BREAK -case 61: -YY_RULE_SETUP -ST_RET(FUNCTION_ID); - YY_BREAK -case 62: -YY_RULE_SETUP -ST_RET(SHUFFLE_ID); - YY_BREAK -case 63: -YY_RULE_SETUP -ST_RET(MONTYPE_ID); - YY_BREAK -case 64: -YY_RULE_SETUP -ST_RET(selection_ID); - YY_BREAK -case 65: -YY_RULE_SETUP -ST_RET(rect_ID); - YY_BREAK -case 66: -YY_RULE_SETUP -ST_RET(fillrect_ID); - YY_BREAK -case 67: -YY_RULE_SETUP -ST_RET(line_ID); - YY_BREAK -case 68: -YY_RULE_SETUP -ST_RET(randline_ID); - YY_BREAK -case 69: -YY_RULE_SETUP -ST_RET(grow_ID); - YY_BREAK -case 70: -YY_RULE_SETUP -ST_RET(flood_ID); - YY_BREAK -case 71: -YY_RULE_SETUP -ST_RET(rndcoord_ID); - YY_BREAK -case 72: -YY_RULE_SETUP -ST_RET(circle_ID); - YY_BREAK -case 73: -YY_RULE_SETUP -ST_RET(ellipse_ID); - YY_BREAK -case 74: -YY_RULE_SETUP -ST_RET(filter_ID); - YY_BREAK -case 75: -YY_RULE_SETUP -ST_RET(gradient_ID); - YY_BREAK -case 76: -YY_RULE_SETUP -ST_RET(complement_ID); - YY_BREAK -case 77: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=SEL_GRADIENT_RADIAL; return GRADIENT_TYPE; } - YY_BREAK -case 78: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=SEL_GRADIENT_SQUARE; return GRADIENT_TYPE; } - YY_BREAK -case 79: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=DRY; return HUMIDITY_TYPE; } - YY_BREAK -case 80: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=WET; return HUMIDITY_TYPE; } - YY_BREAK -case 81: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=HOT; return HUMIDITY_TYPE; } - YY_BREAK -case 82: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=SOLID; return HUMIDITY_TYPE; } - YY_BREAK -case 83: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=ANY_LOC; return HUMIDITY_TYPE; } - YY_BREAK -case 84: -YY_RULE_SETUP -ST_RET(LEV); - YY_BREAK -case 85: -YY_RULE_SETUP -ST_RET(QUANTITY_ID); - YY_BREAK -case 86: -YY_RULE_SETUP -ST_RET(BURIED_ID); - YY_BREAK -case 87: -YY_RULE_SETUP -ST_RET(ERODED_ID); - YY_BREAK -case 88: -YY_RULE_SETUP -ST_RET(ERODEPROOF_ID); - YY_BREAK -case 89: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return TRAPPED_STATE; } - YY_BREAK -case 90: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=0; return TRAPPED_STATE; } - YY_BREAK -case 91: -YY_RULE_SETUP -ST_RET(RECHARGED_ID); - YY_BREAK -case 92: -YY_RULE_SETUP -ST_RET(INVIS_ID); - YY_BREAK -case 93: -YY_RULE_SETUP -ST_RET(GREASED_ID); - YY_BREAK -case 94: -YY_RULE_SETUP -ST_RET(FEMALE_ID); - YY_BREAK -case 95: -YY_RULE_SETUP -ST_RET(CANCELLED_ID); - YY_BREAK -case 96: -YY_RULE_SETUP -ST_RET(REVIVED_ID); - YY_BREAK -case 97: -YY_RULE_SETUP -ST_RET(AVENGE_ID); - YY_BREAK -case 98: -YY_RULE_SETUP -ST_RET(FLEEING_ID); - YY_BREAK -case 99: -YY_RULE_SETUP -ST_RET(BLINDED_ID); - YY_BREAK -case 100: -YY_RULE_SETUP -ST_RET(PARALYZED_ID); - YY_BREAK -case 101: -YY_RULE_SETUP -ST_RET(STUNNED_ID); - YY_BREAK -case 102: -YY_RULE_SETUP -ST_RET(CONFUSED_ID); - YY_BREAK -case 103: -YY_RULE_SETUP -ST_RET(SEENTRAPS_ID); - YY_BREAK -case 104: -YY_RULE_SETUP -ST_RET(ALL_ID); - YY_BREAK -case 105: -YY_RULE_SETUP -ST_RETF((yylval.i=1), HORIZ_OR_VERT); - YY_BREAK -case 106: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=2; return HORIZ_OR_VERT; } - YY_BREAK -case 107: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=D_ISOPEN; return DOOR_STATE; } - YY_BREAK -case 108: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=D_CLOSED; return DOOR_STATE; } - YY_BREAK -case 109: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=D_LOCKED; return DOOR_STATE; } - YY_BREAK -case 110: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=D_NODOOR; return DOOR_STATE; } - YY_BREAK -case 111: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=D_BROKEN; return DOOR_STATE; } - YY_BREAK -case 112: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=D_SECRET; return DOOR_STATE; } - YY_BREAK -case 113: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=W_NORTH; return DIRECTION; } - YY_BREAK -case 114: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=W_EAST; return DIRECTION; } - YY_BREAK -case 115: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=W_SOUTH; return DIRECTION; } - YY_BREAK -case 116: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=W_WEST; return DIRECTION; } - YY_BREAK -case 117: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = -1; return RANDOM_TYPE; } - YY_BREAK -case 118: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = -1; return RANDOM_TYPE_BRACKET; } - YY_BREAK -case 119: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = -2; return NONE; } - YY_BREAK -case 120: -YY_RULE_SETUP -ST_RET(A_REGISTER); - YY_BREAK -case 121: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return LEFT_OR_RIGHT; } - YY_BREAK -case 122: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=2; return LEFT_OR_RIGHT; } - YY_BREAK -case 123: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=3; return CENTER; } - YY_BREAK -case 124: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=4; return LEFT_OR_RIGHT; } - YY_BREAK -case 125: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=5; return LEFT_OR_RIGHT; } - YY_BREAK -case 126: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return TOP_OR_BOT; } - YY_BREAK -case 127: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=5; return TOP_OR_BOT; } - YY_BREAK -case 128: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return LIGHT_STATE; } - YY_BREAK -case 129: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=0; return LIGHT_STATE; } - YY_BREAK -case 130: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return FILLING; } - YY_BREAK -case 131: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=0; return FILLING; } - YY_BREAK -case 132: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=0; return IRREGULAR; } - YY_BREAK -case 133: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return IRREGULAR; } - YY_BREAK -case 134: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return JOINED; } - YY_BREAK -case 135: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=0; return JOINED; } - YY_BREAK -case 136: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return LIMITED; } - YY_BREAK -case 137: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=0; return LIMITED; } - YY_BREAK -case 138: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i= AM_NONE; return ALIGNMENT; } - YY_BREAK -case 139: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i= AM_LAWFUL; return ALIGNMENT; } - YY_BREAK -case 140: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i= AM_NEUTRAL; return ALIGNMENT; } - YY_BREAK -case 141: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i= AM_CHAOTIC; return ALIGNMENT; } - YY_BREAK -case 142: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i= AM_SPLEV_CO; return ALIGNMENT; } - YY_BREAK -case 143: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i= AM_SPLEV_NONCO; return ALIGNMENT; } - YY_BREAK -case 144: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return MON_ATTITUDE; } - YY_BREAK -case 145: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=0; return MON_ATTITUDE; } - YY_BREAK -case 146: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return MON_ALERTNESS; } - YY_BREAK -case 147: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=0; return MON_ALERTNESS; } - YY_BREAK -case 148: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i= M_AP_FURNITURE; return MON_APPEARANCE; } - YY_BREAK -case 149: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i= M_AP_MONSTER; return MON_APPEARANCE; } - YY_BREAK -case 150: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i= M_AP_OBJECT; return MON_APPEARANCE; } - YY_BREAK -case 151: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=2; return ALTAR_TYPE; } - YY_BREAK -case 152: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return ALTAR_TYPE; } - YY_BREAK -case 153: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=0; return ALTAR_TYPE; } - YY_BREAK -case 154: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return UP_OR_DOWN; } - YY_BREAK -case 155: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=0; return UP_OR_DOWN; } - YY_BREAK -case 156: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=0; return BOOLEAN; } - YY_BREAK -case 157: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return BOOLEAN; } - YY_BREAK -case 158: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=DUST; return ENGRAVING_TYPE; } - YY_BREAK -case 159: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=ENGRAVE; return ENGRAVING_TYPE; } - YY_BREAK -case 160: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=BURN; return ENGRAVING_TYPE; } - YY_BREAK -case 161: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=MARK; return ENGRAVING_TYPE; } - YY_BREAK -case 162: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=ENGR_BLOOD; return ENGRAVING_TYPE; } - YY_BREAK -case 163: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=1; return CURSE_TYPE; } - YY_BREAK -case 164: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=2; return CURSE_TYPE; } - YY_BREAK -case 165: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=3; return CURSE_TYPE; } - YY_BREAK -case 166: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=NOTELEPORT; return FLAG_TYPE; } - YY_BREAK -case 167: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=HARDFLOOR; return FLAG_TYPE; } - YY_BREAK -case 168: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=NOMMAP; return FLAG_TYPE; } - YY_BREAK -case 169: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=ARBOREAL; return FLAG_TYPE; } /* KMH */ - YY_BREAK -case 170: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=SHORTSIGHTED; return FLAG_TYPE; } - YY_BREAK -case 171: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=MAZELEVEL; return FLAG_TYPE; } - YY_BREAK -case 172: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=PREMAPPED; return FLAG_TYPE; } - YY_BREAK -case 173: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=SHROUD; return FLAG_TYPE; } - YY_BREAK -case 174: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=GRAVEYARD; return FLAG_TYPE; } - YY_BREAK -case 175: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=ICEDPOOLS; return FLAG_TYPE; } - YY_BREAK -case 176: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=SOLIDIFY; return FLAG_TYPE; } - YY_BREAK -case 177: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=CORRMAZE; return FLAG_TYPE; } - YY_BREAK -case 178: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=CHECK_INACCESSIBLES; return FLAG_TYPE; } - YY_BREAK -case 179: -YY_RULE_SETUP -{ char *p = index(yytext, 'd'); - savetoken(yytext); - if (p) { - *p++ = '\0'; - yylval.dice.num = atoi(yytext); - yylval.dice.die = atoi(p); - } else { - yylval.dice.num = yylval.dice.die = 1; - } - return DICE; - } - YY_BREAK -case 180: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = atoi(yytext + 1); - if (yylval.i < 0 || yylval.i > 100) - lc_error("Unexpected percentile '%li%%'", yylval.i); - return PERCENT; } - YY_BREAK -case 181: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=atoi(yytext); return MINUS_INTEGER; } - YY_BREAK -case 182: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=atoi(yytext); return PLUS_INTEGER; } - YY_BREAK -case 183: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = atoi(yytext); - if (yylval.i < 0 || yylval.i > 100) - lc_error("Unexpected percentile '%li%%'", yylval.i); - return SPERCENT; } - YY_BREAK -case 184: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i=atoi(yytext); return INTEGER; } - YY_BREAK -case 185: -/* rule 185 can match eol */ -YY_RULE_SETUP -{ savetoken(yytext); - yytext[yyleng - 1] = '\0'; /* discard the trailing \" */ - yylval.map = dupstr(yytext + 1); /* skip the first \" */ - return STRING; } - YY_BREAK -case 186: -YY_RULE_SETUP -{ savetoken(yytext); return handle_varstring_check(); } - YY_BREAK -case 187: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = SPO_JE; return COMPARE_TYPE; } - YY_BREAK -case 188: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = SPO_JNE; return COMPARE_TYPE; } - YY_BREAK -case 189: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = SPO_JNE; return COMPARE_TYPE; } - YY_BREAK -case 190: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = SPO_JLE; return COMPARE_TYPE; } - YY_BREAK -case 191: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = SPO_JGE; return COMPARE_TYPE; } - YY_BREAK -case 192: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = SPO_JL; return COMPARE_TYPE; } - YY_BREAK -case 193: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = SPO_JG; return COMPARE_TYPE; } - YY_BREAK -case 194: -/* rule 194 can match eol */ -YY_RULE_SETUP -{ newline(); } - YY_BREAK -case 195: -YY_RULE_SETUP -{ advancepos(yytext); } - YY_BREAK -case 196: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = yytext[2]; return CHAR; } - YY_BREAK -case 197: -YY_RULE_SETUP -{ savetoken(yytext); yylval.i = yytext[1]; return CHAR; } - YY_BREAK -case 198: -YY_RULE_SETUP -ST_RET(UNKNOWN_TYPE); - YY_BREAK -case 199: -YY_RULE_SETUP -{ savetoken(yytext); return yytext[0]; } - YY_BREAK -case 200: -YY_RULE_SETUP -ECHO; - YY_BREAK -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(MAPC): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( yywrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer () -{ - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = (yytext_ptr); - yy_size_t number_to_move, i; - int ret_val; - - if ((yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { - /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) { - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - } else { - yy_size_t num_to_read; - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - /* [pr] This could probably be (b->yy_buf_size < number_to_move) - * since the allocated size is actually b->yy_buf_size + 2. - * The old code calculated num_to_read above (with same formula - * as is used below), then used (num_to_read <= 0) here, which - * got broken when num_to_read was changed to an unsigned type. */ - while (b->yy_buf_size <= number_to_move + 1) { - /* Not enough room in the buffer - grow it. */ - - int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) { - b->yy_buf_size += b->yy_buf_size / 4; - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if (! b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - } - - num_to_read = b->yy_buf_size - number_to_move - 1; - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ((yy_n_chars) == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ); - } else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) - > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) - yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); - if (! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before EOB char was reached */ - -static yy_state_type yy_get_previous_state () -{ - yy_state_type yy_current_state; - char *yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - - for (yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp) { - - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1057 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - -static yy_state_type yy_try_NUL_trans (yy_current_state ) - yy_state_type yy_current_state; -{ - int yy_is_jam; - char *yy_cp = (yy_c_buf_p); - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1057 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 1056); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - -void yyunput (c,yy_bp ) - int c; - char * yy_bp; -{ - char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up yytext */ - *yy_cp = (yy_hold_char); - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - yy_size_t number_to_move = (yy_n_chars) + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; -} - -#endif - -#ifndef YY_NO_INPUT -static int input () -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( ) ) - return EOF; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - return input(); - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(uchar *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); - - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - -void yyrestart (input_file ) - FILE * input_file; -{ - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } - - yy_init_buffer(YY_CURRENT_BUFFER,input_file ); - yy_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ -void yy_switch_to_buffer (new_buffer ) - YY_BUFFER_STATE new_buffer; -{ - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void yy_load_buffer_state () -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ -YY_BUFFER_STATE yy_create_buffer (file,size ) - FILE * file; - int size; -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - if (!size) - size = YY_BUF_SIZE; - - b->yy_buf_size = (yy_size_t)size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() - * - */ -void yy_delete_buffer (b ) - YY_BUFFER_STATE b; -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ); - - yyfree((void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. - */ -static void yy_init_buffer (b,file ) - YY_BUFFER_STATE b; - FILE * file; -{ - int oerrno = errno; - - yy_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ -void yy_flush_buffer (b ) - YY_BUFFER_STATE b; -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void yypush_buffer_state (new_buffer ) - YY_BUFFER_STATE new_buffer; -{ - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void yypop_buffer_state () -{ - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void yyensure_buffer_stack () -{ - yy_size_t num_to_alloc; - - if (!(yy_buffer_stack)) { - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ -#if 1 /* [PR] avoid C++-style comment; older C compilers choke on it */ - num_to_alloc = 2; /* also changed to match the comment... */ -#else - num_to_alloc = 1; // After all that talk, this was set to 1 anyways... -#endif - (yy_buffer_stack) = (struct yy_buffer_state**) - yyalloc(num_to_alloc * sizeof(struct yy_buffer_state*) ); - if (!(yy_buffer_stack)) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - (void) memset((yy_buffer_stack), 0, - num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) { - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**) - yyrealloc((yy_buffer_stack),num_to_alloc * sizeof(struct yy_buffer_state*) ); - if (!(yy_buffer_stack)) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - /* zero only the new slots.*/ - (void) memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, - grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified - * character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_buffer (base,size ) - char * base; - yy_size_t size; -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to yylex() - * will scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * yy_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_scan_string (yystr ) - yyconst char * yystr; -{ - - return yy_scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to - * yylex() will scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a - * bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_bytes (yybytes,_yybytes_len ) - yyconst char * yybytes; - yy_size_t _yybytes_len; -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yyalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (msg ) - yyconst char* msg; -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int yyget_lineno () -{ - - return yylineno; -} - -/** Get the input stream. - * - */ -FILE *yyget_in () -{ - return yyin; -} - -/** Get the output stream. - * - */ -FILE *yyget_out () -{ - return yyout; -} - -/** Get the length of the current token. - * - */ -yy_size_t yyget_leng () -{ - return yyleng; -} - -/** Get the current token. - * - */ - -char *yyget_text () -{ - return yytext; -} - -/** Set the current line number. - * @param _line_number line number - * - */ -void yyset_lineno (_line_number ) - int _line_number; -{ - - yylineno = _line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * - * @see yy_switch_to_buffer - */ -void yyset_in (_in_str ) - FILE * _in_str; -{ - yyin = _in_str ; -} - -void yyset_out (_out_str ) - FILE * _out_str; -{ - yyout = _out_str ; -} - -int yyget_debug () -{ - return yy_flex_debug; -} - -void yyset_debug (_bdebug ) - int _bdebug; -{ - yy_flex_debug = _bdebug ; -} - -static int yy_init_globals () -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; -} - -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy () -{ - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner - * so the next time yylex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (s1,s2,n ) - char* s1; - yyconst char * s2; - int n; -{ - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (s ) - yyconst char * s; -{ - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *yyalloc (size ) - yy_size_t size; -{ - - return (void *) malloc( size ); -} - -void *yyrealloc (ptr,size ) - void * ptr; - yy_size_t size; -{ - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void yyfree (ptr ) - void * ptr; -{ - - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -} - -#ifdef AMIGA -long * -alloc(n) - unsigned n; -{ - return (long *) malloc(n); -} -#endif - -/* routine to switch to another input file; needed for flex */ -void -init_yyin( input_f ) -FILE *input_f; -{ -#if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER) - if (yyin) - yyrestart(input_f); - else -#endif - yyin = input_f; - - if (!orig_yyin) - orig_yyin = yyin; -} -/* analogous routine (for completeness) */ -void -init_yyout( output_f ) -FILE *output_f; -{ - yyout = output_f; -} - -long -handle_varstring_check() -{ - struct lc_vardefs *vd; - - yylval.map = dupstr(yytext); - if ((vd = vardef_defined(vardefs, yytext, 1)) != 0) { - long l = vd->var_type; - int a = ((l & SPOVAR_ARRAY) == SPOVAR_ARRAY); - - l &= ~SPOVAR_ARRAY; - if (l == SPOVAR_INT) - return (a ? VARSTRING_INT_ARRAY : VARSTRING_INT); - if (l == SPOVAR_STRING) - return (a ? VARSTRING_STRING_ARRAY : VARSTRING_STRING); - if (l == SPOVAR_VARIABLE) - return (a ? VARSTRING_VAR_ARRAY : VARSTRING_VAR); - if (l == SPOVAR_COORD) - return (a ? VARSTRING_COORD_ARRAY : VARSTRING_COORD); - if (l == SPOVAR_REGION) - return (a ? VARSTRING_REGION_ARRAY : VARSTRING_REGION); - if (l == SPOVAR_MAPCHAR) - return (a ? VARSTRING_MAPCHAR_ARRAY : VARSTRING_MAPCHAR); - if (l == SPOVAR_MONST) - return (a ? VARSTRING_MONST_ARRAY : VARSTRING_MONST); - if (l == SPOVAR_OBJ) - return (a ? VARSTRING_OBJ_ARRAY : VARSTRING_OBJ); - if (l == SPOVAR_SEL) - return (a ? VARSTRING_SEL_ARRAY : VARSTRING_SEL); - } - return VARSTRING; -} - -void -newline() -{ - nh_line_number++; - token_start_pos = 0; - (void) memset((genericptr_t) curr_token, 0, 512); -} - -void -savetoken(s) -char *s; -{ - Sprintf(curr_token, "%s", s); - advancepos(s); -} - -void -advancepos(s) -char *s; -{ - token_start_pos += strlen(s); -} - -/*lev_comp.l*/ - diff --git a/sys/share/lev_yacc.c b/sys/share/lev_yacc.c deleted file mode 100644 index b6ac4d935..000000000 --- a/sys/share/lev_yacc.c +++ /dev/null @@ -1,4985 +0,0 @@ -#ifndef lint -/* static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; */ -/* static char nhsccsid[] = "@(#)yaccpar 1.9.0-nh (NetHack) 12/03/2015"; */ -#endif -#define YYBYACC 1 -#define YYMAJOR 1 -#define YYMINOR 9 -#define YYSUBMINOR "0-nh" - -#define yyclearin (yychar=(-1)) -#define yyerrok (yyerrflag=0) -#define YYRECOVERING (yyerrflag!=0) -#define YYPREFIX "yy" -/* NetHack 3.6 lev_comp.y $NHDT-Date: 1551901401 2019/03/06 19:43:21 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.26 $ */ -/* Copyright (c) 1989 by Jean-Christophe Collet */ -/* NetHack may be freely redistributed. See license for details. */ - -/* - * This file contains the Level Compiler code - * It may handle special mazes & special room-levels - */ - -/* In case we're using bison in AIX. This definition must be - * placed before any other C-language construct in the file - * excluding comments and preprocessor directives (thanks IBM - * for this wonderful feature...). - * - * Note: some cpps barf on this 'undefined control' (#pragma). - * Addition of the leading space seems to prevent barfage for now, - * and AIX will still see the directive. - */ -#ifdef _AIX - #pragma alloca /* keep leading space! */ -#endif - -#define SPEC_LEV /* for USE_OLDARGS (sp_lev.h) */ -#include "hack.h" -#include "sp_lev.h" - -#define ERR (-1) -/* many types of things are put in chars for transference to NetHack. - * since some systems will use signed chars, limit everybody to the - * same number for portability. - */ -#define MAX_OF_TYPE 128 - -#define MAX_NESTED_IFS 20 -#define MAX_SWITCH_CASES 20 - -#define New(type) \ - (type *) memset((genericptr_t) alloc(sizeof (type)), 0, sizeof (type)) -#define NewTab(type, size) (type **) alloc(sizeof (type *) * size) -#define Free(ptr) free((genericptr_t) ptr) - -extern void VDECL(lc_error, (const char *, ...)); -extern void VDECL(lc_warning, (const char *, ...)); -extern void FDECL(yyerror, (const char *)); -extern void FDECL(yywarning, (const char *)); -extern int NDECL(yylex); -int NDECL(yyparse); - -extern int FDECL(get_floor_type, (CHAR_P)); -extern int FDECL(get_room_type, (char *)); -extern int FDECL(get_trap_type, (char *)); -extern int FDECL(get_monster_id, (char *,CHAR_P)); -extern int FDECL(get_object_id, (char *,CHAR_P)); -extern boolean FDECL(check_monster_char, (CHAR_P)); -extern boolean FDECL(check_object_char, (CHAR_P)); -extern char FDECL(what_map_char, (CHAR_P)); -extern void FDECL(scan_map, (char *, sp_lev *)); -extern void FDECL(add_opcode, (sp_lev *, int, genericptr_t)); -extern genericptr_t FDECL(get_last_opcode_data1, (sp_lev *, int)); -extern genericptr_t FDECL(get_last_opcode_data2, (sp_lev *, int, int)); -extern boolean FDECL(check_subrooms, (sp_lev *)); -extern boolean FDECL(write_level_file, (char *,sp_lev *)); -extern struct opvar *FDECL(set_opvar_int, (struct opvar *, long)); -extern void VDECL(add_opvars, (sp_lev *, const char *, ...)); -extern void FDECL(start_level_def, (sp_lev * *, char *)); - -extern struct lc_funcdefs *FDECL(funcdef_new, (long,char *)); -extern void FDECL(funcdef_free_all, (struct lc_funcdefs *)); -extern struct lc_funcdefs *FDECL(funcdef_defined, (struct lc_funcdefs *, - char *, int)); -extern char *FDECL(funcdef_paramtypes, (struct lc_funcdefs *)); -extern char *FDECL(decode_parm_str, (char *)); - -extern struct lc_vardefs *FDECL(vardef_new, (long,char *)); -extern void FDECL(vardef_free_all, (struct lc_vardefs *)); -extern struct lc_vardefs *FDECL(vardef_defined, (struct lc_vardefs *, - char *, int)); - -extern void NDECL(break_stmt_start); -extern void FDECL(break_stmt_end, (sp_lev *)); -extern void FDECL(break_stmt_new, (sp_lev *, long)); - -extern void FDECL(splev_add_from, (sp_lev *, sp_lev *)); - -extern void FDECL(check_vardef_type, (struct lc_vardefs *, char *, long)); -extern void FDECL(vardef_used, (struct lc_vardefs *, char *)); -extern struct lc_vardefs *FDECL(add_vardef_type, (struct lc_vardefs *, - char *, long)); - -extern int FDECL(reverse_jmp_opcode, (int)); - -struct coord { - long x; - long y; -}; - -struct forloopdef { - char *varname; - long jmp_point; -}; -static struct forloopdef forloop_list[MAX_NESTED_IFS]; -static short n_forloops = 0; - - -sp_lev *splev = NULL; - -static struct opvar *if_list[MAX_NESTED_IFS]; - -static short n_if_list = 0; - -unsigned int max_x_map, max_y_map; -int obj_containment = 0; - -int in_container_obj = 0; - -/* integer value is possibly an inconstant value (eg. dice notation - or a variable) */ -int is_inconstant_number = 0; - -int in_switch_statement = 0; -static struct opvar *switch_check_jump = NULL; -static struct opvar *switch_default_case = NULL; -static struct opvar *switch_case_list[MAX_SWITCH_CASES]; -static long switch_case_value[MAX_SWITCH_CASES]; -int n_switch_case_list = 0; - -int allow_break_statements = 0; -struct lc_breakdef *break_list = NULL; - -extern struct lc_vardefs *vardefs; /* variable definitions */ - - -struct lc_vardefs *function_tmp_var_defs = NULL; -extern struct lc_funcdefs *function_definitions; -struct lc_funcdefs *curr_function = NULL; -struct lc_funcdefs_parm * curr_function_param = NULL; -int in_function_definition = 0; -sp_lev *function_splev_backup = NULL; - -extern int fatal_error; -extern int got_errors; -extern int line_number; -extern const char *fname; - -extern char curr_token[512]; - -typedef union -{ - long i; - char *map; - struct { - long room; - long wall; - long door; - } corpos; - struct { - long area; - long x1; - long y1; - long x2; - long y2; - } lregn; - struct { - long x; - long y; - } crd; - struct { - long ter; - long lit; - } terr; - struct { - long height; - long width; - } sze; - struct { - long die; - long num; - } dice; - struct { - long cfunc; - char *varstr; - } meth; -} YYSTYPE; -#define CHAR 257 -#define INTEGER 258 -#define BOOLEAN 259 -#define PERCENT 260 -#define SPERCENT 261 -#define MINUS_INTEGER 262 -#define PLUS_INTEGER 263 -#define MAZE_GRID_ID 264 -#define SOLID_FILL_ID 265 -#define MINES_ID 266 -#define ROGUELEV_ID 267 -#define MESSAGE_ID 268 -#define MAZE_ID 269 -#define LEVEL_ID 270 -#define LEV_INIT_ID 271 -#define GEOMETRY_ID 272 -#define NOMAP_ID 273 -#define OBJECT_ID 274 -#define COBJECT_ID 275 -#define MONSTER_ID 276 -#define TRAP_ID 277 -#define DOOR_ID 278 -#define DRAWBRIDGE_ID 279 -#define object_ID 280 -#define monster_ID 281 -#define terrain_ID 282 -#define MAZEWALK_ID 283 -#define WALLIFY_ID 284 -#define REGION_ID 285 -#define FILLING 286 -#define IRREGULAR 287 -#define JOINED 288 -#define ALTAR_ID 289 -#define LADDER_ID 290 -#define STAIR_ID 291 -#define NON_DIGGABLE_ID 292 -#define NON_PASSWALL_ID 293 -#define ROOM_ID 294 -#define PORTAL_ID 295 -#define TELEPRT_ID 296 -#define BRANCH_ID 297 -#define LEV 298 -#define MINERALIZE_ID 299 -#define CORRIDOR_ID 300 -#define GOLD_ID 301 -#define ENGRAVING_ID 302 -#define FOUNTAIN_ID 303 -#define POOL_ID 304 -#define SINK_ID 305 -#define NONE 306 -#define RAND_CORRIDOR_ID 307 -#define DOOR_STATE 308 -#define LIGHT_STATE 309 -#define CURSE_TYPE 310 -#define ENGRAVING_TYPE 311 -#define DIRECTION 312 -#define RANDOM_TYPE 313 -#define RANDOM_TYPE_BRACKET 314 -#define A_REGISTER 315 -#define ALIGNMENT 316 -#define LEFT_OR_RIGHT 317 -#define CENTER 318 -#define TOP_OR_BOT 319 -#define ALTAR_TYPE 320 -#define UP_OR_DOWN 321 -#define SUBROOM_ID 322 -#define NAME_ID 323 -#define FLAGS_ID 324 -#define FLAG_TYPE 325 -#define MON_ATTITUDE 326 -#define MON_ALERTNESS 327 -#define MON_APPEARANCE 328 -#define ROOMDOOR_ID 329 -#define IF_ID 330 -#define ELSE_ID 331 -#define TERRAIN_ID 332 -#define HORIZ_OR_VERT 333 -#define REPLACE_TERRAIN_ID 334 -#define EXIT_ID 335 -#define SHUFFLE_ID 336 -#define QUANTITY_ID 337 -#define BURIED_ID 338 -#define LOOP_ID 339 -#define FOR_ID 340 -#define TO_ID 341 -#define SWITCH_ID 342 -#define CASE_ID 343 -#define BREAK_ID 344 -#define DEFAULT_ID 345 -#define ERODED_ID 346 -#define TRAPPED_STATE 347 -#define RECHARGED_ID 348 -#define INVIS_ID 349 -#define GREASED_ID 350 -#define FEMALE_ID 351 -#define CANCELLED_ID 352 -#define REVIVED_ID 353 -#define AVENGE_ID 354 -#define FLEEING_ID 355 -#define BLINDED_ID 356 -#define PARALYZED_ID 357 -#define STUNNED_ID 358 -#define CONFUSED_ID 359 -#define SEENTRAPS_ID 360 -#define ALL_ID 361 -#define MONTYPE_ID 362 -#define GRAVE_ID 363 -#define ERODEPROOF_ID 364 -#define FUNCTION_ID 365 -#define MSG_OUTPUT_TYPE 366 -#define COMPARE_TYPE 367 -#define UNKNOWN_TYPE 368 -#define rect_ID 369 -#define fillrect_ID 370 -#define line_ID 371 -#define randline_ID 372 -#define grow_ID 373 -#define selection_ID 374 -#define flood_ID 375 -#define rndcoord_ID 376 -#define circle_ID 377 -#define ellipse_ID 378 -#define filter_ID 379 -#define complement_ID 380 -#define gradient_ID 381 -#define GRADIENT_TYPE 382 -#define LIMITED 383 -#define HUMIDITY_TYPE 384 -#define STRING 385 -#define MAP_ID 386 -#define NQSTRING 387 -#define VARSTRING 388 -#define CFUNC 389 -#define CFUNC_INT 390 -#define CFUNC_STR 391 -#define CFUNC_COORD 392 -#define CFUNC_REGION 393 -#define VARSTRING_INT 394 -#define VARSTRING_INT_ARRAY 395 -#define VARSTRING_STRING 396 -#define VARSTRING_STRING_ARRAY 397 -#define VARSTRING_VAR 398 -#define VARSTRING_VAR_ARRAY 399 -#define VARSTRING_COORD 400 -#define VARSTRING_COORD_ARRAY 401 -#define VARSTRING_REGION 402 -#define VARSTRING_REGION_ARRAY 403 -#define VARSTRING_MAPCHAR 404 -#define VARSTRING_MAPCHAR_ARRAY 405 -#define VARSTRING_MONST 406 -#define VARSTRING_MONST_ARRAY 407 -#define VARSTRING_OBJ 408 -#define VARSTRING_OBJ_ARRAY 409 -#define VARSTRING_SEL 410 -#define VARSTRING_SEL_ARRAY 411 -#define METHOD_INT 412 -#define METHOD_INT_ARRAY 413 -#define METHOD_STRING 414 -#define METHOD_STRING_ARRAY 415 -#define METHOD_VAR 416 -#define METHOD_VAR_ARRAY 417 -#define METHOD_COORD 418 -#define METHOD_COORD_ARRAY 419 -#define METHOD_REGION 420 -#define METHOD_REGION_ARRAY 421 -#define METHOD_MAPCHAR 422 -#define METHOD_MAPCHAR_ARRAY 423 -#define METHOD_MONST 424 -#define METHOD_MONST_ARRAY 425 -#define METHOD_OBJ 426 -#define METHOD_OBJ_ARRAY 427 -#define METHOD_SEL 428 -#define METHOD_SEL_ARRAY 429 -#define DICE 430 -#define YYERRCODE 256 -short yylhs[] = { -1, - 0, 0, 73, 73, 74, 57, 57, 56, 56, 76, - 76, 76, 76, 55, 55, 54, 54, 46, 46, 14, - 14, 75, 75, 26, 26, 22, 22, 23, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 59, 59, 59, 59, 59, 59, 59, 59, - 59, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 60, 60, 60, 61, 61, 85, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, - 84, 38, 38, 44, 44, 43, 43, 42, 42, 41, - 41, 39, 39, 40, 40, 129, 130, 100, 101, 98, - 45, 45, 31, 31, 31, 131, 133, 93, 134, 134, - 136, 135, 137, 135, 99, 138, 138, 139, 140, 94, - 141, 95, 142, 97, 144, 96, 143, 145, 143, 79, - 110, 110, 110, 83, 83, 65, 146, 147, 113, 148, - 112, 10, 10, 68, 68, 69, 69, 70, 70, 71, - 71, 87, 87, 15, 15, 13, 13, 16, 16, 11, - 11, 103, 103, 103, 1, 1, 2, 2, 105, 150, - 105, 149, 20, 20, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 35, 35, 35, 106, 152, 106, 151, 18, 18, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 120, 88, 104, 104, 121, 121, - 102, 117, 118, 109, 119, 82, 17, 17, 91, 114, - 108, 72, 72, 116, 115, 86, 107, 154, 111, 24, - 24, 80, 81, 81, 81, 92, 89, 90, 90, 3, - 3, 4, 4, 29, 29, 28, 28, 27, 27, 27, - 5, 5, 6, 6, 7, 7, 7, 12, 12, 12, - 8, 8, 9, 155, 155, 155, 132, 77, 77, 77, - 77, 32, 32, 32, 30, 30, 127, 127, 127, 33, - 124, 124, 124, 34, 34, 125, 125, 125, 36, 36, - 36, 36, 126, 126, 126, 37, 37, 37, 37, 123, - 123, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 50, 50, 157, 158, 158, 128, 128, 64, - 64, 63, 63, 62, 62, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 48, 48, 156, 47, 47, 47, - 153, 153, 153, 153, 51, 51, 52, 52, 53, 53, - 25, 25, 67, 67, 66, -}; -short yylen[] = { 2, - 0, 1, 1, 2, 3, 3, 5, 1, 1, 5, - 5, 3, 16, 0, 2, 0, 2, 0, 2, 1, - 1, 0, 3, 3, 1, 0, 2, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 10, 9, -}; -short yydefred[] = { 0, - 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, - 4, 0, 6, 0, 133, 0, 0, 0, 192, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 130, 0, 0, 0, 136, 145, 0, 0, 0, 0, - 93, 82, 73, 83, 74, 84, 75, 85, 76, 86, - 77, 87, 78, 88, 79, 89, 80, 90, 81, 5, - 0, 92, 91, 0, 30, 0, 29, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 149, - 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 155, 0, 0, 0, 0, 94, - 95, 0, 0, 0, 0, 342, 0, 345, 0, 387, - 0, 343, 0, 153, 0, 27, 0, 9, 8, 7, - 0, 304, 305, 0, 0, 340, 0, 0, 0, 12, - 313, 0, 195, 196, 0, 0, 310, 0, 0, 308, - 0, 337, 339, 0, 336, 334, 0, 333, 228, 224, - 225, 330, 332, 0, 329, 327, 0, 326, 0, 0, - 281, 280, 0, 291, 292, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 383, 250, 0, 366, 0, 318, 0, 317, 0, 0, - 0, 0, 0, 403, 0, 0, 266, 267, 283, 282, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 259, 261, 260, 390, 388, 389, 163, 162, - 0, 184, 185, 0, 0, 0, 0, 96, 0, 0, - 0, 0, 126, 0, 0, 0, 0, 135, 0, 0, - 0, 0, 0, 0, 0, 362, 0, 0, 0, 396, - 398, 395, 397, 399, 400, 0, 0, 0, 0, 0, - 0, 103, 0, 0, 104, 0, 150, 24, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 367, 368, 0, 0, 0, 376, 0, - 0, 0, 382, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 132, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 156, 0, 0, 151, 0, 0, 0, 0, 344, 352, - 0, 0, 0, 0, 349, 350, 351, 129, 0, 154, - 0, 0, 120, 118, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 341, 11, 262, 0, 10, - 0, 0, 314, 0, 0, 0, 198, 197, 0, 173, - 194, 0, 0, 0, 226, 0, 0, 203, 201, 245, - 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 324, 0, 0, 322, 0, 321, 0, 0, 0, 384, - 386, 0, 0, 293, 294, 0, 297, 0, 295, 0, - 296, 251, 0, 0, 0, 252, 0, 175, 0, 0, - 0, 0, 0, 256, 0, 0, 165, 164, 276, 401, - 402, 0, 177, 0, 0, 0, 0, 0, 265, 0, - 0, 147, 0, 0, 137, 274, 0, 0, 0, 356, - 0, 346, 134, 363, 98, 0, 0, 105, 0, 111, - 0, 106, 0, 107, 0, 102, 0, 101, 0, 100, - 28, 306, 0, 0, 316, 309, 0, 311, 0, 0, - 335, 393, 391, 392, 239, 236, 230, 0, 0, 235, - 0, 240, 0, 242, 243, 0, 238, 229, 244, 232, - 394, 0, 328, 0, 0, 0, 369, 0, 0, 0, - 371, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 319, 0, 0, 0, 0, 0, 0, 167, 0, 0, - 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, - 0, 0, 152, 146, 0, 0, 0, 127, 0, 0, - 0, 0, 121, 119, 112, 0, 114, 0, 116, 0, - 0, 0, 312, 193, 338, 0, 0, 0, 0, 0, - 331, 0, 246, 0, 0, 189, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 302, 301, - 272, 0, 0, 253, 0, 179, 0, 0, 254, 258, - 0, 0, 0, 0, 181, 0, 0, 187, 0, 186, - 159, 0, 0, 353, 354, 355, 0, 357, 0, 110, - 0, 109, 0, 108, 0, 0, 0, 234, 237, 241, - 231, 0, 298, 206, 207, 0, 211, 210, 212, 213, - 214, 0, 0, 0, 218, 219, 0, 299, 208, 204, - 0, 0, 248, 0, 372, 0, 377, 0, 373, 0, - 323, 374, 375, 0, 0, 0, 268, 303, 0, 0, - 0, 0, 0, 0, 190, 191, 0, 0, 0, 168, - 0, 0, 0, 0, 0, 0, 128, 113, 115, 117, - 263, 0, 0, 0, 0, 0, 0, 0, 19, 0, - 0, 325, 0, 0, 288, 289, 290, 0, 285, 0, - 0, 0, 174, 0, 0, 278, 166, 176, 0, 0, - 182, 264, 0, 143, 138, 140, 0, 300, 215, 216, - 217, 222, 0, 220, 378, 0, 379, 0, 0, 0, - 271, 269, 0, 0, 0, 170, 0, 169, 141, 0, - 0, 0, 0, 0, 0, 320, 287, 0, 405, 178, - 0, 180, 0, 144, 0, 223, 380, 15, 0, 404, - 171, 142, 0, 0, 0, 0, 20, 21, 0, 0, - 0, 13, 17, 381, -}; -short yydgoto[] = { 3, - 209, 449, 233, 271, 236, 486, 490, 671, 491, 351, - 757, 729, 689, 859, 294, 467, 614, 354, 578, 584, - 730, 80, 337, 822, 512, 133, 788, 789, 747, 345, - 81, 210, 258, 476, 814, 228, 218, 636, 425, 426, - 427, 428, 640, 638, 387, 733, 290, 375, 253, 696, - 329, 330, 331, 861, 835, 190, 4, 82, 83, 84, - 172, 314, 315, 316, 280, 264, 265, 500, 515, 678, - 687, 440, 5, 6, 10, 85, 254, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 277, 318, 478, 229, 219, 259, 529, 408, 697, - 173, 278, 626, 765, 766, 843, 830, 524, 130, 187, - 521, 319, 401, 295, 517, 272, 800, 841, 230, 359, - 220, 355, 580, 790, 196, 182, 530, 531, -}; -short yysindex[] = { 68, - 17, 31, 0, -217, 0, 68, -257, -226, 112, 5680, - 0, 136, 0, -136, 0, 170, 185, 201, 0, 225, - 229, 238, 244, 248, 251, 255, 266, 272, 275, 283, - 304, 309, 346, 366, 378, 380, 382, 383, 396, 397, - 398, 400, 401, 404, 405, 413, 415, -46, 417, 420, - 0, 426, 108, 489, 0, 0, 428, 101, -35, 449, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 432, 0, 0, 430, 0, 5680, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -190, 450, 0, -234, 62, -13, 41, 41, 40, -252, - -121, 109, 109, 1644, -34, 109, 109, 92, -34, -34, - -249, -20, -20, -20, -35, 458, -35, 109, 1644, 1644, - 1644, -160, -249, -174, 0, 1644, -34, 288, -35, 0, - 0, 439, 414, 109, 467, 0, -22, 0, 421, 0, - -9, 0, -14, 0, 163, 0, 385, 0, 0, 0, - -136, 0, 0, 423, 465, 0, 471, 473, 475, 0, - 0, 137, 0, 0, 490, 271, 0, 441, 496, 0, - 503, 0, 0, 276, 0, 0, 452, 0, 0, 0, - 0, 0, 0, 292, 0, 0, 470, 0, 512, 0, - 0, 0, 518, 0, 0, 523, 524, 526, -34, -34, - 109, 109, 540, 109, 542, 544, 545, 1644, 548, 5537, - 0, 0, 533, 0, 331, 0, 500, 0, 555, 558, - 559, 564, 347, 0, 571, 582, 0, 0, 0, 0, - 367, 584, 379, 592, 594, 595, 141, 596, 402, 597, - 588, 611, 0, 0, 0, 0, 0, 0, 0, 0, - 617, 0, 0, 628, 385, 638, 640, 0, 593, -35, - -35, 644, 0, 649, 159, -35, -35, 0, -35, -35, - -35, -35, -35, 651, 650, 0, 141, 465, 5680, 0, - 0, 0, 0, 0, 0, 642, -1, 4, 643, 647, - 653, 0, 141, 465, 0, 5680, 0, 0, -35, -234, - 445, 14, 455, 654, 614, 1644, 678, -35, 38, 476, - 338, 682, -35, 688, 385, 690, -35, 109, 385, 109, - 1644, 424, 431, 0, 0, 694, 696, 1298, 0, 109, - 109, 5435, 0, 360, 704, 1644, 702, -35, -165, -83, - 429, 491, 703, -20, 433, 0, 707, -24, 708, -20, - -20, -20, -35, 709, 10, 109, -91, -19, -121, 0, - 0, 9, 9, 0, 45, 655, -254, 560, 0, 0, - 75, 148, 79, 79, 0, 0, 0, 0, -14, 0, - 1644, 711, 0, 0, 16, 25, 27, 29, 141, 465, - 22, -10, -28, 631, 427, 0, 0, 0, 501, 0, - 715, 137, 0, 719, 505, 459, 0, 0, 503, 0, - 0, 381, 499, 2, 0, 403, 508, 0, 0, 0, - 0, 721, 723, 109, 109, 662, 743, 748, 746, 749, - 0, 750, 5448, 0, 701, 0, 751, 752, 753, 0, - 0, 554, 536, 0, 0, 754, 0, 726, 0, 774, - 0, 0, 775, 579, 785, 0, -165, 0, 581, 796, - 583, 798, 800, 0, 802, 535, 0, 0, 0, 0, - 0, 804, 0, 591, 806, 807, 521, 598, 0, 810, - 385, 0, 811, -35, 0, 0, 465, 801, 815, 0, - 814, 0, 0, 0, 0, 604, -35, 0, -234, 0, - -21, 0, 824, 0, 57, 0, 98, 0, 23, 0, - 0, 0, 825, 621, 0, 0, 827, 0, 493, 839, - 0, 0, 0, 0, 0, 0, 0, 823, 826, 0, - 828, 0, 830, 0, 0, 832, 0, 0, 0, 0, - 0, 841, 0, 848, -121, 641, 0, 857, 590, 1644, - 0, -35, -35, 1644, 859, -35, 1644, 1644, 864, 861, - 0, -249, 648, -148, 652, 135, 586, 0, 867, -5, - 868, 528, 587, 0, -35, 870, -234, 871, 6, 72, - 385, 9, 0, 0, 141, 793, 1, 0, 560, 166, - 141, 465, 0, 0, 0, 32, 0, 33, 0, 35, - -165, 873, 0, 0, 0, -234, -35, -35, -35, 40, - 0, 5526, 0, 876, -35, 0, 880, 174, 686, 881, - -165, 569, 882, 883, -35, 685, 900, 852, 0, 0, - 0, 902, 691, 0, 693, 0, 110, 908, 0, 0, - 928, -184, 465, 716, 0, 717, 900, 0, 929, 0, - 0, 932, 90, 0, 0, 0, 385, 0, 57, 0, - 98, 0, 23, 0, 936, 722, 465, 0, 0, 0, - 0, 56, 0, 0, 0, -234, 0, 0, 0, 0, - 0, 920, 921, 924, 0, 0, 925, 0, 0, 0, - 465, 727, 0, 141, 0, 699, 0, -35, 0, 945, - 0, 0, 0, 481, 943, 59, 0, 0, 744, 957, - 965, 963, 6, -35, 0, 0, 967, 977, 982, 0, - -184, 767, -50, 971, 905, 90, 0, 0, 0, 0, - 0, 987, 724, 465, -35, -35, -35, -261, 0, 991, - 576, 0, -35, 777, 0, 0, 0, 989, 0, 385, - 992, 780, 0, 38, 900, 0, 0, 0, 781, 385, - 0, 0, 983, 0, 0, 0, 784, 0, 0, 0, - 0, 0, 916, 0, 0, 758, 0, 93, 1004, 59, - 0, 0, 788, 1006, 1007, 0, 1010, 0, 0, 5680, - 1009, -261, 1016, 675, 1020, 0, 0, 1025, 0, 0, - 385, 0, 5680, 0, -165, 0, 0, 0, 1023, 0, - 0, 0, 1024, 109, -149, 1026, 0, 0, 876, 109, - 1028, 0, 0, 0, -}; -short yyrindex[] = { 1071, - 0, 0, 0, 5225, 0, 1072, 0, 0, 0, 53, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2985, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3174, 0, 0, - 0, 0, 0, 0, 3331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, 0, - 0, 0, 0, 0, 0, 0, 1255, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1444, 0, 0, 909, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 961, 0, 0, 0, 0, - 0, 0, 0, 1601, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2828, 0, 5061, - 0, 0, 0, 0, 959, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1790, 0, 0, 0, 0, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -69, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -69, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1043, 0, 0, 4715, 0, - 0, 0, 0, 0, -}; -short yygindex[] = { 0, - 410, 294, 0, 487, -329, -480, 0, 0, 438, 645, - 330, 0, 0, 0, 0, -474, 0, 0, 0, 0, - 0, -86, -287, 0, 0, 901, 0, 273, -629, 657, - 1047, -296, -297, -509, 264, -504, -494, 0, 0, 0, - 0, 0, 0, 0, 0, 242, -384, -137, 849, 0, - 0, 0, 0, 0, 0, 0, 0, 1046, 934, -371, - 0, 0, 0, 684, 710, 0, -48, 0, 0, 0, - 351, 0, 1100, 0, 0, 0, -133, 790, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -58, -130, -355, -375, 679, -84, 0, 0, 0, - 0, -167, 0, 345, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 949, 0, 0, 0, 0, - 975, 0, 0, 0, 792, 680, 504, 0, -}; -#define YYTABLESIZE 6091 -short yytable[] = { 186, - 181, 299, 211, 195, 177, 255, 252, 400, 237, 238, - 507, 518, 260, 261, 266, 499, 608, 177, 206, 273, - 514, 283, 284, 285, 282, 177, 206, 313, 296, 224, - 424, 423, 311, 309, 677, 310, 528, 312, 177, 639, - 302, 206, 637, 327, 59, 686, 519, 520, 518, 279, - 635, 332, 26, 439, 334, 26, 548, 760, 526, 537, - 231, 214, 518, 269, 267, 268, 188, 455, 539, 516, - 541, 459, 543, 755, 7, 699, 701, 550, 703, 224, - 214, 313, 297, 308, 292, 122, 311, 309, 8, 310, - 523, 312, 124, 123, 549, 125, 214, 286, 281, 812, - 335, 287, 288, 274, 275, 276, 9, 366, 367, 857, - 369, 313, 547, 773, 656, 313, 311, 309, 305, 310, - 311, 312, 189, 813, 317, 312, 333, 12, 756, 313, - 192, 263, 232, 406, 311, 270, 834, 224, 293, 312, - 538, 193, 194, 484, 545, 690, 603, 485, 206, 540, - 192, 542, 289, 544, 364, 365, 700, 702, 13, 704, - 705, 193, 194, 858, 669, 826, 122, 532, 14, 14, - 348, 670, 348, 124, 123, 643, 125, 313, 673, 131, - 740, 26, 311, 309, 313, 310, 234, 312, 132, 311, - 309, 235, 310, 770, 312, 313, 769, 430, 169, 410, - 311, 309, 327, 310, 768, 312, 643, 286, 444, 666, - 313, 287, 288, 15, 737, 311, 309, 736, 310, 510, - 312, 511, 176, 461, 458, 505, 460, 134, 471, 487, - 468, 488, 489, 623, 477, 176, 469, 470, 481, 304, - 533, 405, 135, 176, 633, 634, 222, 411, 412, 434, - 413, 414, 415, 416, 417, 653, 422, 528, 136, 562, - 304, 176, 509, 563, 564, 471, 692, 286, 305, 429, - 438, 287, 288, 26, 711, 26, 527, 262, 212, 471, - 435, 360, 137, 535, 360, 328, 138, 361, 498, 446, - 361, 201, 202, 513, 453, 139, 222, 212, 457, 201, - 202, 140, 223, 203, 204, 141, 26, 676, 142, 565, - 566, 567, 143, 212, 201, 202, 201, 202, 685, 483, - 579, 26, 26, 144, 568, 197, 198, 199, 200, 145, - 587, 588, 146, 691, 213, 495, 1, 2, 569, 570, - 147, 502, 503, 504, 785, 786, 787, 571, 572, 573, - 574, 575, 223, 213, 222, 447, 448, 307, 178, 179, - 317, 148, 205, 576, 853, 577, 149, 256, 257, 213, - 192, 178, 179, 347, 225, 474, 475, 205, 803, 178, - 179, 193, 194, 466, 688, 522, 207, 208, 192, 262, - 694, 695, 178, 179, 180, 226, 227, 178, 179, 193, - 194, 207, 208, 150, 201, 202, 215, 180, 632, 767, - 223, 347, 474, 475, 347, 180, 347, 347, 347, 347, - 176, 201, 202, 151, 225, 215, 203, 204, 180, 216, - 217, 180, 763, 180, 764, 152, 320, 153, 321, 154, - 155, 215, 322, 323, 324, 226, 227, 681, 216, 217, - 26, 26, 657, 156, 157, 158, 660, 159, 160, 663, - 664, 161, 162, 313, 347, 625, 347, 205, 311, 309, - 163, 310, 164, 312, 166, 201, 202, 167, 631, 708, - 709, 710, 225, 168, 205, 174, 683, 175, 183, 184, - 185, 207, 208, 191, 325, 313, 347, 279, 347, 300, - 311, 309, 821, 310, 301, 312, 303, 336, 207, 208, - 340, 306, 828, 339, 341, 707, 342, 313, 343, 552, - 344, 731, 311, 309, 26, 783, 26, 312, 347, 346, - 348, 348, 352, 658, 659, 313, 326, 662, 205, 349, - 311, 309, 353, 310, 313, 312, 350, 192, 356, 311, - 309, 558, 310, 851, 312, 358, 178, 179, 193, 194, - 357, 360, 207, 208, 256, 257, 361, 362, 348, 363, - 376, 348, 313, 348, 348, 348, 348, 311, 309, 368, - 310, 370, 312, 371, 372, 774, 796, 374, 377, 342, - 378, 561, 180, 342, 342, 342, 734, 342, 379, 342, - 583, 380, 381, 382, 383, 313, 744, 809, 810, 811, - 311, 309, 313, 310, 384, 312, 817, 311, 309, 816, - 310, 348, 312, 348, 313, 385, 386, 388, 601, 311, - 309, 396, 310, 347, 312, 390, 389, 391, 392, 393, - 395, 347, 347, 347, 347, 347, 347, 347, 347, 347, - 347, 347, 347, 348, 397, 348, 347, 347, 347, 394, - 398, 741, 347, 347, 347, 347, 347, 347, 347, 347, - 347, 399, 347, 347, 347, 347, 347, 347, 347, 781, - 347, 402, 63, 403, 65, 404, 67, 407, 69, 409, - 71, 418, 73, 419, 75, 347, 77, 442, 79, 421, - 431, 437, 347, 347, 432, 347, 443, 347, 347, 347, - 433, 441, 347, 347, 347, 347, 347, 347, 347, 307, - 856, 445, 313, 451, 818, 452, 863, 311, 309, 738, - 310, 454, 312, 456, 450, 462, 347, 464, 347, 465, - 347, 479, 463, 844, 480, 482, 494, 525, 493, 492, - 497, 501, 506, 496, 536, 551, 852, 553, 554, 556, - 347, 347, 557, 307, 585, 560, 586, 347, 347, 347, - 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - 347, 347, 347, 347, 347, 589, 590, 582, 591, 592, - 348, 596, 593, 594, 597, 598, 599, 602, 348, 348, - 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, - 307, 600, 307, 348, 348, 348, 603, 604, 605, 348, - 348, 348, 348, 348, 348, 348, 348, 348, 607, 348, - 348, 348, 348, 348, 348, 348, 606, 348, 609, 610, - 611, 612, 307, 613, 307, 615, 616, 617, 618, 619, - 620, 621, 348, 622, 595, 628, 624, 629, 627, 348, - 348, 630, 348, 255, 348, 348, 348, 643, 641, 348, - 348, 348, 348, 348, 348, 348, 170, 642, 644, 645, - 646, 651, 62, 647, 64, 648, 66, 649, 68, 650, - 70, 652, 72, 348, 74, 348, 76, 348, 78, 654, - 655, 466, 661, 665, 666, 668, 674, 680, 370, 672, - 675, 673, 679, 682, 684, 693, 706, 348, 348, 732, - 735, 739, 742, 743, 348, 348, 348, 348, 348, 348, - 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, - 348, 348, 745, 746, 748, 749, 370, 61, 750, 370, - 751, 753, 370, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 754, 761, 758, 759, 762, 771, 775, 776, 307, - 772, 777, 778, 779, 780, 782, 784, 307, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 307, 307, 370, - 792, 791, 307, 307, 307, 793, 794, 797, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 798, 307, 307, - 307, 307, 307, 307, 307, 799, 307, 802, 804, 805, - 807, 815, 820, 370, 819, 823, 808, 824, 827, 832, - 829, 307, 831, 833, 836, 838, 839, 840, 307, 307, - 842, 307, 845, 307, 307, 307, 847, 848, 307, 307, - 849, 307, 307, 307, 307, 850, 854, 855, 864, 860, - 1, 3, 364, 365, 172, 26, 315, 358, 188, 359, - 148, 284, 307, 16, 307, 139, 752, 825, 667, 728, - 801, 338, 837, 559, 165, 846, 373, 385, 555, 171, - 862, 298, 534, 795, 508, 11, 307, 307, 420, 546, - 806, 291, 221, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 436, 698, 581, 0, 0, 0, 0, 385, 0, - 0, 385, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 370, 0, - 0, 0, 0, 0, 0, 0, 370, 370, 370, 370, - 370, 370, 370, 370, 370, 370, 370, 370, 385, 0, - 0, 370, 370, 370, 0, 0, 0, 370, 370, 370, - 370, 370, 370, 370, 370, 370, 0, 370, 370, 370, - 370, 370, 370, 370, 0, 370, 0, 0, 0, 0, - 0, 0, 385, 0, 0, 0, 0, 0, 0, 0, - 370, 0, 0, 0, 0, 0, 0, 370, 370, 0, - 370, 0, 370, 370, 370, 0, 0, 370, 370, 0, - 370, 370, 370, 370, 233, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 370, 0, 370, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 370, 370, 0, 233, 0, - 0, 0, 370, 370, 370, 370, 370, 370, 370, 370, - 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 250, 0, 0, - 0, 0, 0, 0, 0, 233, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 385, 0, 0, - 0, 0, 0, 0, 0, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 233, 0, 233, - 385, 385, 385, 0, 0, 0, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 0, 385, 385, 385, 385, - 385, 385, 385, 0, 385, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 385, - 0, 0, 0, 0, 0, 0, 385, 385, 0, 385, - 0, 385, 385, 385, 0, 0, 385, 385, 0, 385, - 385, 385, 385, 205, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 385, 0, 385, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 385, 385, 0, 205, 0, 0, - 0, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 0, - 0, 0, 0, 0, 233, 0, 0, 0, 0, 0, - 0, 0, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 205, 0, 0, 233, 233, 233, - 0, 0, 0, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 0, 233, 233, 233, 233, 233, 233, 233, - 0, 233, 0, 0, 0, 0, 205, 0, 205, 0, - 0, 0, 0, 0, 0, 0, 233, 0, 0, 0, - 0, 0, 0, 233, 233, 0, 233, 0, 233, 233, - 233, 0, 0, 233, 233, 0, 233, 233, 233, 233, - 209, 0, 0, 0, 0, 0, 0, 0, 0, 466, - 201, 202, 0, 0, 0, 0, 0, 233, 0, 233, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 233, 233, 0, 209, 0, 0, 0, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 239, 240, 241, 242, - 243, 0, 244, 205, 245, 246, 247, 248, 249, 0, - 0, 0, 0, 250, 0, 0, 0, 0, 0, 0, - 0, 209, 0, 0, 0, 0, 0, 207, 208, 0, - 0, 0, 0, 205, 0, 0, 0, 251, 0, 0, - 0, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 209, 0, 209, 205, 205, 205, 0, - 0, 0, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 0, 205, 205, 205, 205, 205, 205, 205, 0, - 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 205, 0, 0, 0, 0, - 0, 0, 205, 205, 0, 205, 0, 205, 205, 205, - 0, 0, 205, 205, 0, 205, 205, 205, 205, 221, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 205, 0, 205, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 205, 205, 0, 221, 0, 0, 0, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 205, 205, 205, 205, 205, 0, 0, 0, 0, 0, - 209, 0, 0, 0, 0, 0, 0, 0, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 221, 0, 0, 209, 209, 209, 0, 0, 0, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 0, 209, - 209, 209, 209, 209, 209, 209, 0, 209, 0, 0, - 0, 0, 221, 0, 221, 0, 0, 0, 0, 0, - 0, 0, 209, 0, 0, 0, 0, 0, 0, 209, - 209, 0, 209, 0, 209, 209, 209, 0, 0, 209, - 209, 0, 209, 209, 209, 209, 199, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 201, 202, 0, 0, - 0, 0, 0, 209, 0, 209, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 209, 209, 0, - 0, 0, 0, 0, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 239, 240, 241, 242, 243, 0, 244, 205, - 245, 246, 247, 248, 249, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 199, 0, 0, - 0, 0, 0, 207, 208, 0, 0, 0, 0, 221, - 0, 0, 0, 251, 0, 0, 0, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 200, - 0, 199, 221, 221, 221, 0, 0, 0, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 0, 221, 221, - 221, 221, 221, 221, 221, 0, 221, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 221, 0, 0, 0, 0, 0, 0, 221, 221, - 0, 221, 0, 221, 221, 221, 0, 0, 221, 221, - 0, 221, 221, 221, 221, 227, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 221, 0, 221, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 221, 221, 0, 0, - 0, 0, 0, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 0, 0, 0, 0, 0, 199, 0, 0, 0, - 0, 0, 0, 0, 199, 199, 199, 199, 199, 199, - 199, 199, 199, 199, 199, 199, 227, 0, 0, 199, - 199, 199, 0, 0, 0, 199, 199, 199, 199, 199, - 199, 199, 199, 199, 0, 199, 199, 199, 199, 199, - 199, 199, 0, 199, 0, 0, 0, 0, 227, 0, - 227, 0, 0, 0, 0, 0, 0, 0, 199, 0, - 0, 0, 0, 0, 0, 199, 199, 0, 199, 0, - 199, 199, 199, 0, 0, 199, 199, 0, 199, 199, - 199, 199, 157, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 199, - 0, 199, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 199, 199, 0, 0, 0, 0, 0, - 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, - 199, 199, 199, 199, 199, 199, 199, 199, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 157, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 227, 0, 0, 0, 0, - 0, 0, 0, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 0, 0, 157, 227, 227, - 227, 0, 0, 0, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 0, 227, 227, 227, 227, 227, 227, - 227, 0, 227, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 227, 0, 0, - 0, 0, 0, 0, 227, 227, 0, 227, 0, 227, - 227, 227, 0, 0, 227, 227, 0, 227, 227, 227, - 227, 202, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 227, 0, - 227, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 227, 227, 0, 0, 0, 0, 0, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 0, 0, 0, - 0, 0, 157, 0, 0, 0, 0, 0, 0, 0, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 202, 0, 0, 157, 157, 157, 0, 0, - 0, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 0, 157, 157, 157, 157, 157, 157, 157, 0, 157, - 0, 0, 0, 0, 202, 0, 202, 0, 0, 0, - 0, 0, 0, 0, 157, 0, 0, 0, 0, 0, - 0, 157, 157, 158, 157, 0, 157, 157, 157, 0, - 0, 157, 157, 0, 157, 157, 157, 157, 284, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 157, 0, 157, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, - 157, 0, 0, 0, 0, 0, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 284, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 202, 0, 0, 0, 0, 0, 0, 0, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 284, 0, 284, 202, 202, 202, 0, 0, 0, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 0, - 202, 202, 202, 202, 202, 202, 202, 0, 202, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 202, 0, 0, 0, 0, 0, 0, - 202, 202, 0, 202, 0, 202, 202, 202, 0, 0, - 202, 202, 0, 202, 202, 202, 202, 286, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 202, 0, 202, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 202, 202, - 0, 0, 0, 0, 0, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 0, 0, 0, 0, 0, 284, 0, - 0, 0, 0, 0, 0, 0, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 286, 0, - 0, 284, 284, 284, 0, 0, 0, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 0, 284, 284, 284, - 284, 284, 284, 284, 0, 284, 0, 0, 0, 0, - 286, 0, 286, 0, 0, 0, 0, 0, 0, 0, - 284, 0, 0, 0, 0, 0, 0, 284, 284, 0, - 284, 0, 284, 284, 284, 0, 0, 284, 284, 0, - 284, 284, 284, 284, 249, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 284, 0, 284, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 284, 284, 0, 0, 0, - 0, 0, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 249, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 286, 0, 0, - 0, 0, 0, 0, 0, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 0, 0, 249, - 286, 286, 286, 0, 0, 0, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 0, 286, 286, 286, 286, - 286, 286, 286, 0, 286, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 286, - 0, 0, 0, 0, 0, 0, 286, 286, 0, 286, - 0, 286, 286, 286, 0, 0, 286, 286, 0, 286, - 286, 286, 286, 279, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 286, 0, 286, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 286, 286, 0, 0, 0, 0, - 0, 286, 286, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 0, - 0, 0, 0, 0, 249, 0, 0, 0, 0, 0, - 0, 0, 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 279, 0, 0, 249, 249, 249, - 0, 0, 0, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 0, 249, 249, 249, 249, 249, 249, 249, - 0, 249, 0, 0, 0, 0, 0, 0, 279, 0, - 0, 0, 0, 0, 0, 0, 249, 0, 0, 0, - 0, 0, 0, 249, 249, 0, 249, 0, 249, 249, - 249, 0, 0, 249, 249, 0, 249, 249, 249, 249, - 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 249, 0, 249, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 249, 249, 0, 0, 0, 0, 0, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 161, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 279, 0, 0, 0, 0, 0, 0, - 0, 279, 279, 279, 279, 279, 279, 279, 279, 279, - 279, 279, 279, 0, 0, 161, 279, 279, 279, 0, - 0, 0, 279, 279, 279, 279, 279, 279, 279, 279, - 279, 0, 279, 279, 279, 279, 279, 279, 279, 0, - 279, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 279, 0, 0, 0, 0, - 0, 0, 279, 279, 0, 279, 0, 279, 279, 279, - 0, 0, 279, 279, 0, 279, 279, 279, 279, 160, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 279, 0, 279, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 279, 279, 0, 0, 0, 0, 0, 279, 279, 279, - 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, - 279, 279, 279, 279, 279, 0, 0, 0, 0, 0, - 161, 0, 0, 0, 0, 0, 0, 0, 161, 161, - 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, - 160, 0, 0, 161, 161, 161, 0, 0, 0, 161, - 161, 161, 161, 161, 161, 161, 161, 161, 0, 161, - 161, 161, 161, 161, 161, 161, 0, 161, 0, 0, - 0, 0, 0, 0, 160, 0, 0, 0, 0, 0, - 0, 0, 161, 0, 0, 0, 0, 0, 0, 161, - 161, 0, 161, 0, 161, 161, 161, 0, 0, 161, - 161, 0, 161, 161, 161, 161, 275, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 161, 0, 161, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 161, 161, 0, - 0, 0, 0, 0, 161, 161, 161, 161, 161, 161, - 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, - 161, 161, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 275, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, - 0, 0, 0, 0, 0, 0, 0, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 0, - 0, 275, 160, 160, 160, 0, 0, 0, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 0, 160, 160, - 160, 160, 160, 160, 160, 0, 160, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 160, 0, 0, 0, 0, 0, 0, 160, 160, - 0, 160, 0, 160, 160, 160, 0, 0, 160, 160, - 0, 160, 160, 160, 160, 97, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 160, 0, 160, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 160, 160, 0, 0, - 0, 0, 0, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 0, 0, 0, 0, 0, 275, 0, 0, 0, - 0, 0, 0, 0, 275, 275, 275, 275, 275, 275, - 275, 275, 275, 275, 275, 275, 97, 0, 0, 275, - 275, 275, 0, 0, 0, 275, 275, 275, 275, 275, - 275, 275, 275, 275, 0, 275, 275, 275, 275, 275, - 275, 275, 0, 275, 0, 0, 0, 0, 0, 0, - 97, 0, 0, 0, 0, 0, 0, 0, 275, 0, - 0, 0, 0, 0, 0, 275, 275, 0, 275, 0, - 275, 275, 275, 0, 0, 275, 275, 0, 275, 275, - 275, 275, 99, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, - 0, 275, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 275, 275, 0, 0, 0, 0, 0, - 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, - 275, 275, 275, 275, 275, 275, 275, 275, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 97, 0, 0, 0, 0, - 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 0, 0, 99, 97, 97, - 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, - 97, 0, 97, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 97, 0, 0, - 0, 0, 0, 0, 97, 97, 0, 97, 0, 97, - 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, - 97, 247, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 97, 0, - 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 97, 97, 0, 0, 0, 0, 0, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, - 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, - 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 247, 0, 0, 99, 99, 99, 0, 0, - 0, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 0, 99, 99, 99, 99, 99, 99, 99, 0, 99, - 0, 0, 0, 0, 0, 0, 247, 0, 0, 0, - 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, - 0, 99, 99, 0, 99, 0, 99, 99, 99, 0, - 0, 99, 99, 0, 99, 99, 99, 99, 257, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 99, 0, 99, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, - 99, 0, 0, 0, 0, 0, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 257, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 247, 0, 0, 0, 0, 0, 0, 0, 247, - 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, - 247, 0, 0, 257, 247, 247, 247, 0, 0, 0, - 247, 247, 247, 247, 247, 247, 247, 247, 247, 0, - 247, 247, 247, 247, 247, 247, 247, 0, 247, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 247, 0, 0, 0, 0, 0, 0, - 247, 247, 0, 247, 0, 247, 247, 247, 0, 0, - 247, 247, 0, 247, 247, 247, 247, 273, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 247, 0, 247, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, - 0, 0, 0, 0, 0, 247, 247, 247, 247, 247, - 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, - 247, 247, 247, 0, 0, 0, 0, 0, 257, 0, - 0, 0, 0, 0, 0, 0, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 273, 0, - 0, 257, 257, 257, 0, 0, 0, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 0, 257, 257, 257, - 257, 257, 257, 257, 0, 257, 0, 0, 0, 0, - 0, 0, 273, 0, 0, 0, 0, 0, 0, 0, - 257, 0, 0, 0, 0, 0, 0, 257, 257, 0, - 257, 0, 257, 257, 257, 0, 0, 257, 257, 0, - 257, 257, 257, 257, 18, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 257, 0, 257, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 257, 257, 0, 0, 0, - 0, 0, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 273, 0, 0, - 0, 0, 0, 0, 0, 273, 273, 273, 273, 273, - 273, 273, 273, 273, 273, 273, 273, 0, 0, 18, - 273, 273, 273, 0, 0, 0, 273, 273, 273, 273, - 273, 273, 273, 273, 273, 0, 273, 273, 273, 273, - 273, 273, 273, 0, 273, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 273, - 0, 0, 0, 0, 0, 0, 273, 273, 0, 273, - 0, 273, 273, 273, 0, 0, 273, 273, 0, 273, - 273, 273, 273, 277, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 273, 0, 273, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 273, 273, 0, 0, 0, 0, - 0, 273, 273, 273, 273, 273, 273, 273, 273, 273, - 273, 273, 273, 273, 273, 273, 273, 273, 273, 0, - 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, - 0, 0, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 277, 0, 0, 18, 18, 18, - 0, 0, 0, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 0, 18, 18, 18, 18, 18, 18, 18, - 0, 18, 0, 0, 0, 0, 0, 0, 277, 0, - 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, - 0, 0, 0, 18, 18, 0, 18, 0, 18, 18, - 18, 0, 0, 18, 18, 0, 18, 18, 18, 18, - 270, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 18, 0, 18, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 18, 18, 0, 0, 0, 0, 0, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 270, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 277, 0, 0, 0, 0, 0, 0, - 0, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 0, 0, 270, 277, 277, 277, 0, - 0, 0, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 0, 277, 277, 277, 277, 277, 277, 277, 0, - 277, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 22, 277, 0, 0, 0, 0, - 0, 0, 277, 277, 0, 277, 0, 277, 277, 277, - 0, 0, 277, 277, 0, 277, 277, 277, 277, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 277, 0, 277, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 277, 277, 0, 0, 0, 0, 0, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 22, 0, 0, 0, 0, - 270, 0, 0, 0, 0, 0, 0, 0, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, - 0, 0, 0, 270, 270, 270, 0, 0, 0, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 0, 270, - 270, 270, 270, 270, 270, 270, 0, 270, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 25, 270, 0, 0, 0, 0, 0, 0, 270, - 270, 0, 270, 0, 270, 270, 270, 0, 0, 270, - 270, 0, 270, 270, 270, 270, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 270, 0, 270, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 270, 270, 0, - 0, 0, 0, 0, 270, 270, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, - 270, 270, 25, 0, 473, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 22, 0, 0, 250, 0, 0, - 0, 0, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 0, 0, 0, 22, 22, 22, - 0, 0, 0, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 0, 22, 22, 22, 22, 22, 22, 22, - 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, - 0, 0, 0, 22, 22, 0, 22, 0, 22, 22, - 22, 0, 0, 22, 22, 0, 22, 0, 22, 0, - 0, 0, 0, 0, 0, 0, 250, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 22, 0, 22, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 22, 22, 0, 0, 0, 0, 0, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 0, 0, 0, 0, - 0, 25, 0, 0, 0, 0, 0, 0, 0, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 0, 0, 0, 25, 25, 25, 0, 0, 0, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, - 25, 25, 25, 25, 25, 25, 25, 0, 25, 0, - 0, 471, 0, 0, 0, 472, 0, 0, 0, 0, - 0, 0, 0, 25, 595, 347, 0, 0, 0, 0, - 25, 25, 0, 25, 0, 25, 25, 25, 0, 0, - 25, 25, 0, 25, 0, 25, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 25, 0, 25, 201, 202, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 201, 202, 0, 0, 0, 0, 0, 0, 25, 25, - 59, 0, 0, 0, 0, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 0, 347, 0, 0, 0, 0, 0, - 0, 0, 0, 239, 240, 241, 242, 243, 0, 244, - 205, 245, 246, 247, 248, 249, 239, 240, 241, 242, - 243, 0, 244, 205, 245, 246, 247, 248, 249, 0, - 0, 0, 0, 0, 207, 208, 0, 0, 474, 475, - 712, 713, 0, 0, 251, 0, 0, 207, 208, 201, - 202, 714, 715, 716, 0, 0, 0, 251, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 717, 0, 718, 719, 720, 721, - 722, 723, 724, 725, 726, 727, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 239, 240, 241, 242, 243, - 192, 244, 205, 245, 246, 247, 248, 249, 0, 0, - 0, 193, 194, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 207, 208, 0, 15, - 0, 0, 0, 0, 0, 0, 251, 16, 0, 0, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, - 0, 0, 26, 27, 28, 0, 0, 0, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 0, 38, 39, - 40, 41, 42, 43, 44, 0, 45, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 46, 0, 0, 0, 0, 0, 0, 47, 48, - 0, 49, 0, 50, 51, 52, 0, 0, 53, 54, - 0, 55, 0, 56, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 57, 0, 58, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 60, 61, 0, 0, - 0, 0, 0, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, -}; -short yycheck[] = { 86, - 59, 169, 136, 134, 40, 40, 144, 295, 142, 143, - 395, 40, 146, 147, 148, 40, 497, 40, 40, 40, - 40, 159, 160, 161, 158, 40, 40, 37, 166, 40, - 328, 328, 42, 43, 40, 45, 408, 47, 40, 549, - 174, 40, 547, 40, 91, 40, 402, 403, 40, 40, - 545, 185, 0, 40, 185, 125, 432, 687, 313, 44, - 313, 40, 40, 313, 149, 150, 257, 355, 44, 399, - 44, 359, 44, 258, 58, 44, 44, 433, 44, 40, - 40, 37, 167, 93, 259, 44, 42, 43, 58, 45, - 46, 47, 44, 44, 123, 44, 40, 258, 157, 361, - 185, 262, 263, 152, 153, 154, 324, 241, 242, 259, - 244, 37, 123, 58, 589, 37, 42, 43, 177, 45, - 42, 47, 313, 385, 183, 47, 185, 385, 313, 37, - 385, 40, 385, 301, 42, 385, 44, 40, 313, 47, - 125, 396, 397, 309, 123, 620, 91, 313, 40, 125, - 385, 125, 313, 125, 239, 240, 125, 125, 385, 125, - 641, 396, 397, 313, 313, 795, 125, 93, 41, 58, - 43, 320, 45, 125, 125, 41, 125, 37, 44, 44, - 661, 0, 42, 43, 37, 45, 308, 47, 325, 42, - 43, 313, 45, 703, 47, 37, 701, 328, 91, 41, - 42, 43, 40, 45, 699, 47, 41, 258, 346, 44, - 37, 262, 263, 260, 41, 42, 43, 44, 45, 311, - 47, 313, 258, 361, 358, 393, 360, 58, 257, 313, - 368, 315, 316, 521, 372, 258, 370, 371, 376, 262, - 93, 300, 58, 258, 541, 543, 257, 306, 307, 336, - 309, 310, 311, 312, 313, 585, 258, 629, 58, 258, - 262, 258, 396, 262, 263, 257, 622, 258, 327, 328, - 257, 262, 263, 343, 650, 345, 407, 298, 257, 257, - 339, 41, 58, 421, 44, 123, 58, 41, 313, 348, - 44, 313, 314, 313, 353, 58, 257, 257, 357, 313, - 314, 58, 313, 317, 318, 58, 125, 313, 58, 308, - 309, 310, 58, 257, 313, 314, 313, 314, 313, 378, - 454, 269, 270, 58, 323, 264, 265, 266, 267, 58, - 464, 465, 58, 621, 313, 384, 269, 270, 337, 338, - 58, 390, 391, 392, 286, 287, 288, 346, 347, 348, - 349, 350, 313, 313, 257, 318, 319, 367, 394, 395, - 419, 58, 376, 362, 845, 364, 58, 402, 403, 313, - 385, 394, 395, 0, 385, 404, 405, 376, 763, 394, - 395, 396, 397, 312, 313, 341, 400, 401, 385, 298, - 390, 391, 394, 395, 430, 406, 407, 394, 395, 396, - 397, 400, 401, 58, 313, 314, 385, 430, 539, 697, - 313, 38, 404, 405, 41, 430, 43, 44, 45, 46, - 258, 313, 314, 58, 385, 385, 317, 318, 430, 408, - 409, 430, 343, 430, 345, 58, 274, 58, 276, 58, - 58, 385, 280, 281, 282, 406, 407, 615, 408, 409, - 269, 270, 590, 58, 58, 58, 594, 58, 58, 597, - 598, 58, 58, 37, 91, 524, 93, 376, 42, 43, - 58, 45, 58, 47, 58, 313, 314, 58, 537, 647, - 648, 649, 385, 58, 376, 58, 617, 387, 40, 58, - 61, 400, 401, 44, 332, 37, 123, 40, 125, 61, - 42, 43, 790, 45, 91, 47, 40, 123, 400, 401, - 46, 91, 800, 91, 44, 646, 44, 37, 44, 93, - 384, 652, 42, 43, 343, 45, 345, 47, 258, 40, - 0, 91, 257, 592, 593, 37, 374, 596, 376, 44, - 42, 43, 91, 45, 37, 47, 44, 385, 257, 42, - 43, 93, 45, 841, 47, 44, 394, 395, 396, 397, - 91, 44, 400, 401, 402, 403, 44, 44, 38, 44, - 38, 41, 37, 43, 44, 45, 46, 42, 43, 40, - 45, 40, 47, 40, 40, 716, 754, 40, 258, 37, - 91, 93, 430, 41, 42, 43, 655, 45, 44, 47, - 93, 44, 44, 40, 258, 37, 665, 775, 776, 777, - 42, 43, 37, 45, 44, 47, 41, 42, 43, 44, - 45, 91, 47, 93, 37, 44, 260, 44, 93, 42, - 43, 44, 45, 260, 47, 44, 258, 44, 44, 44, - 44, 268, 269, 270, 271, 272, 273, 274, 275, 276, - 277, 278, 279, 123, 44, 125, 283, 284, 285, 258, - 44, 93, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 44, 299, 300, 301, 302, 303, 304, 305, 738, - 307, 44, 395, 44, 397, 93, 399, 44, 401, 41, - 403, 41, 405, 44, 407, 322, 409, 44, 411, 58, - 58, 257, 329, 330, 58, 332, 93, 334, 335, 336, - 58, 257, 339, 340, 341, 342, 343, 344, 345, 0, - 854, 44, 37, 386, 783, 44, 860, 42, 43, 44, - 45, 44, 47, 44, 259, 312, 363, 44, 365, 44, - 367, 382, 312, 830, 41, 44, 44, 93, 258, 321, - 44, 44, 44, 321, 44, 125, 843, 257, 44, 41, - 387, 388, 258, 44, 44, 385, 44, 394, 395, 396, - 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, - 407, 408, 409, 410, 411, 124, 44, 385, 41, 44, - 260, 91, 44, 44, 44, 44, 44, 44, 268, 269, - 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - 91, 258, 93, 283, 284, 285, 91, 44, 44, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 44, 299, - 300, 301, 302, 303, 304, 305, 258, 307, 258, 44, - 258, 44, 123, 44, 125, 44, 312, 44, 258, 44, - 44, 331, 322, 44, 257, 41, 46, 44, 58, 329, - 330, 258, 332, 40, 334, 335, 336, 41, 44, 339, - 340, 341, 342, 343, 344, 345, 388, 257, 386, 41, - 58, 41, 394, 58, 396, 58, 398, 58, 400, 58, - 402, 44, 404, 363, 406, 365, 408, 367, 410, 259, - 44, 312, 44, 40, 44, 258, 321, 321, 0, 258, - 44, 44, 385, 44, 44, 123, 44, 387, 388, 44, - 41, 41, 41, 41, 394, 395, 396, 397, 398, 399, - 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, - 410, 411, 258, 44, 93, 44, 38, 388, 258, 41, - 258, 44, 44, 394, 395, 396, 397, 398, 399, 400, - 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, - 411, 44, 44, 258, 258, 44, 41, 58, 58, 260, - 259, 58, 58, 257, 286, 41, 44, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 91, - 44, 258, 283, 284, 285, 41, 44, 41, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 41, 299, 300, - 301, 302, 303, 304, 305, 44, 307, 261, 58, 125, - 44, 41, 44, 125, 258, 44, 313, 258, 258, 124, - 58, 322, 259, 286, 41, 258, 41, 41, 329, 330, - 41, 332, 44, 334, 335, 336, 41, 383, 339, 340, - 41, 342, 343, 344, 345, 41, 44, 44, 41, 44, - 0, 0, 41, 41, 386, 125, 93, 41, 44, 41, - 123, 123, 363, 41, 365, 125, 677, 794, 602, 652, - 761, 191, 820, 449, 48, 832, 248, 0, 442, 54, - 859, 168, 419, 753, 395, 6, 387, 388, 319, 431, - 766, 163, 138, 394, 395, 396, 397, 398, 399, 400, - 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, - 411, 340, 629, 454, -1, -1, -1, -1, 41, -1, - -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 260, -1, - -1, -1, -1, -1, -1, -1, 268, 269, 270, 271, - 272, 273, 274, 275, 276, 277, 278, 279, 91, -1, - -1, 283, 284, 285, -1, -1, -1, 289, 290, 291, - 292, 293, 294, 295, 296, 297, -1, 299, 300, 301, - 302, 303, 304, 305, -1, 307, -1, -1, -1, -1, - -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, - 322, -1, -1, -1, -1, -1, -1, 329, 330, -1, - 332, -1, 334, 335, 336, -1, -1, 339, 340, -1, - 342, 343, 344, 345, 0, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 363, -1, 365, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 387, 388, -1, 44, -1, - -1, -1, 394, 395, 396, 397, 398, 399, 400, 401, - 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, - -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 260, -1, -1, - -1, -1, -1, -1, -1, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 123, -1, 125, - 283, 284, 285, -1, -1, -1, 289, 290, 291, 292, - 293, 294, 295, 296, 297, -1, 299, 300, 301, 302, - 303, 304, 305, -1, 307, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 322, - -1, -1, -1, -1, -1, -1, 329, 330, -1, 332, - -1, 334, 335, 336, -1, -1, 339, 340, -1, 342, - 343, 344, 345, 0, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 363, -1, 365, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 387, 388, -1, 44, -1, -1, - -1, 394, 395, 396, 397, 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, 408, 409, 410, 411, -1, - -1, -1, -1, -1, 260, -1, -1, -1, -1, -1, - -1, -1, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 91, -1, -1, 283, 284, 285, - -1, -1, -1, 289, 290, 291, 292, 293, 294, 295, - 296, 297, -1, 299, 300, 301, 302, 303, 304, 305, - -1, 307, -1, -1, -1, -1, 123, -1, 125, -1, - -1, -1, -1, -1, -1, -1, 322, -1, -1, -1, - -1, -1, -1, 329, 330, -1, 332, -1, 334, 335, - 336, -1, -1, 339, 340, -1, 342, 343, 344, 345, - 0, -1, -1, -1, -1, -1, -1, -1, -1, 312, - 313, 314, -1, -1, -1, -1, -1, 363, -1, 365, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 387, 388, -1, 44, -1, -1, -1, 394, 395, - 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, - 406, 407, 408, 409, 410, 411, 369, 370, 371, 372, - 373, -1, 375, 376, 377, 378, 379, 380, 381, -1, - -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, - -1, 91, -1, -1, -1, -1, -1, 400, 401, -1, - -1, -1, -1, 260, -1, -1, -1, 410, -1, -1, - -1, 268, 269, 270, 271, 272, 273, 274, 275, 276, - 277, 278, 279, 123, -1, 125, 283, 284, 285, -1, - -1, -1, 289, 290, 291, 292, 293, 294, 295, 296, - 297, -1, 299, 300, 301, 302, 303, 304, 305, -1, - 307, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 322, -1, -1, -1, -1, - -1, -1, 329, 330, -1, 332, -1, 334, 335, 336, - -1, -1, 339, 340, -1, 342, 343, 344, 345, 0, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 363, -1, 365, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 387, 388, -1, 44, -1, -1, -1, 394, 395, 396, - 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, - 407, 408, 409, 410, 411, -1, -1, -1, -1, -1, - 260, -1, -1, -1, -1, -1, -1, -1, 268, 269, - 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - 91, -1, -1, 283, 284, 285, -1, -1, -1, 289, - 290, 291, 292, 293, 294, 295, 296, 297, -1, 299, - 300, 301, 302, 303, 304, 305, -1, 307, -1, -1, - -1, -1, 123, -1, 125, -1, -1, -1, -1, -1, - -1, -1, 322, -1, -1, -1, -1, -1, -1, 329, - 330, -1, 332, -1, 334, 335, 336, -1, -1, 339, - 340, -1, 342, 343, 344, 345, 0, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 313, 314, -1, -1, - -1, -1, -1, 363, -1, 365, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 387, 388, -1, - -1, -1, -1, -1, 394, 395, 396, 397, 398, 399, - 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, - 410, 411, 369, 370, 371, 372, 373, -1, 375, 376, - 377, 378, 379, 380, 381, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, - -1, -1, -1, 400, 401, -1, -1, -1, -1, 260, - -1, -1, -1, 410, -1, -1, -1, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 123, - -1, 125, 283, 284, 285, -1, -1, -1, 289, 290, - 291, 292, 293, 294, 295, 296, 297, -1, 299, 300, - 301, 302, 303, 304, 305, -1, 307, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 322, -1, -1, -1, -1, -1, -1, 329, 330, - -1, 332, -1, 334, 335, 336, -1, -1, 339, 340, - -1, 342, 343, 344, 345, 0, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 363, -1, 365, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 387, 388, -1, -1, - -1, -1, -1, 394, 395, 396, 397, 398, 399, 400, - 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, - 411, -1, -1, -1, -1, -1, 260, -1, -1, -1, - -1, -1, -1, -1, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 91, -1, -1, 283, - 284, 285, -1, -1, -1, 289, 290, 291, 292, 293, - 294, 295, 296, 297, -1, 299, 300, 301, 302, 303, - 304, 305, -1, 307, -1, -1, -1, -1, 123, -1, - 125, -1, -1, -1, -1, -1, -1, -1, 322, -1, - -1, -1, -1, -1, -1, 329, 330, -1, 332, -1, - 334, 335, 336, -1, -1, 339, 340, -1, 342, 343, - 344, 345, 0, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 363, - -1, 365, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 387, 388, -1, -1, -1, -1, -1, - 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, - 404, 405, 406, 407, 408, 409, 410, 411, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 260, -1, -1, -1, -1, - -1, -1, -1, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, -1, -1, 125, 283, 284, - 285, -1, -1, -1, 289, 290, 291, 292, 293, 294, - 295, 296, 297, -1, 299, 300, 301, 302, 303, 304, - 305, -1, 307, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 322, -1, -1, - -1, -1, -1, -1, 329, 330, -1, 332, -1, 334, - 335, 336, -1, -1, 339, 340, -1, 342, 343, 344, - 345, 0, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 363, -1, - 365, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 387, 388, -1, -1, -1, -1, -1, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, -1, -1, -1, - -1, -1, 260, -1, -1, -1, -1, -1, -1, -1, - 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, - 278, 279, 91, -1, -1, 283, 284, 285, -1, -1, - -1, 289, 290, 291, 292, 293, 294, 295, 296, 297, - -1, 299, 300, 301, 302, 303, 304, 305, -1, 307, - -1, -1, -1, -1, 123, -1, 125, -1, -1, -1, - -1, -1, -1, -1, 322, -1, -1, -1, -1, -1, - -1, 329, 330, 331, 332, -1, 334, 335, 336, -1, - -1, 339, 340, -1, 342, 343, 344, 345, 0, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 363, -1, 365, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 387, - 388, -1, -1, -1, -1, -1, 394, 395, 396, 397, - 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, - 408, 409, 410, 411, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 260, -1, -1, -1, -1, -1, -1, -1, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 123, -1, 125, 283, 284, 285, -1, -1, -1, - 289, 290, 291, 292, 293, 294, 295, 296, 297, -1, - 299, 300, 301, 302, 303, 304, 305, -1, 307, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 322, -1, -1, -1, -1, -1, -1, - 329, 330, -1, 332, -1, 334, 335, 336, -1, -1, - 339, 340, -1, 342, 343, 344, 345, 0, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 363, -1, 365, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 387, 388, - -1, -1, -1, -1, -1, 394, 395, 396, 397, 398, - 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, - 409, 410, 411, -1, -1, -1, -1, -1, 260, -1, - -1, -1, -1, -1, -1, -1, 268, 269, 270, 271, - 272, 273, 274, 275, 276, 277, 278, 279, 91, -1, - -1, 283, 284, 285, -1, -1, -1, 289, 290, 291, - 292, 293, 294, 295, 296, 297, -1, 299, 300, 301, - 302, 303, 304, 305, -1, 307, -1, -1, -1, -1, - 123, -1, 125, -1, -1, -1, -1, -1, -1, -1, - 322, -1, -1, -1, -1, -1, -1, 329, 330, -1, - 332, -1, 334, 335, 336, -1, -1, 339, 340, -1, - 342, 343, 344, 345, 0, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 363, -1, 365, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 387, 388, -1, -1, -1, - -1, -1, 394, 395, 396, 397, 398, 399, 400, 401, - 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 260, -1, -1, - -1, -1, -1, -1, -1, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, -1, -1, 125, - 283, 284, 285, -1, -1, -1, 289, 290, 291, 292, - 293, 294, 295, 296, 297, -1, 299, 300, 301, 302, - 303, 304, 305, -1, 307, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 322, - -1, -1, -1, -1, -1, -1, 329, 330, -1, 332, - -1, 334, 335, 336, -1, -1, 339, 340, -1, 342, - 343, 344, 345, 0, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 363, -1, 365, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 387, 388, -1, -1, -1, -1, - -1, 394, 395, 396, 397, 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, 408, 409, 410, 411, -1, - -1, -1, -1, -1, 260, -1, -1, -1, -1, -1, - -1, -1, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 91, -1, -1, 283, 284, 285, - -1, -1, -1, 289, 290, 291, 292, 293, 294, 295, - 296, 297, -1, 299, 300, 301, 302, 303, 304, 305, - -1, 307, -1, -1, -1, -1, -1, -1, 125, -1, - -1, -1, -1, -1, -1, -1, 322, -1, -1, -1, - -1, -1, -1, 329, 330, -1, 332, -1, 334, 335, - 336, -1, -1, 339, 340, -1, 342, 343, 344, 345, - 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 363, -1, 365, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 387, 388, -1, -1, -1, -1, -1, 394, 395, - 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, - 406, 407, 408, 409, 410, 411, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 260, -1, -1, -1, -1, -1, -1, - -1, 268, 269, 270, 271, 272, 273, 274, 275, 276, - 277, 278, 279, -1, -1, 125, 283, 284, 285, -1, - -1, -1, 289, 290, 291, 292, 293, 294, 295, 296, - 297, -1, 299, 300, 301, 302, 303, 304, 305, -1, - 307, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 322, -1, -1, -1, -1, - -1, -1, 329, 330, -1, 332, -1, 334, 335, 336, - -1, -1, 339, 340, -1, 342, 343, 344, 345, 0, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 363, -1, 365, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 387, 388, -1, -1, -1, -1, -1, 394, 395, 396, - 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, - 407, 408, 409, 410, 411, -1, -1, -1, -1, -1, - 260, -1, -1, -1, -1, -1, -1, -1, 268, 269, - 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - 91, -1, -1, 283, 284, 285, -1, -1, -1, 289, - 290, 291, 292, 293, 294, 295, 296, 297, -1, 299, - 300, 301, 302, 303, 304, 305, -1, 307, -1, -1, - -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, - -1, -1, 322, -1, -1, -1, -1, -1, -1, 329, - 330, -1, 332, -1, 334, 335, 336, -1, -1, 339, - 340, -1, 342, 343, 344, 345, 0, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 363, -1, 365, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 387, 388, -1, - -1, -1, -1, -1, 394, 395, 396, 397, 398, 399, - 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, - 410, 411, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 260, - -1, -1, -1, -1, -1, -1, -1, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, -1, - -1, 125, 283, 284, 285, -1, -1, -1, 289, 290, - 291, 292, 293, 294, 295, 296, 297, -1, 299, 300, - 301, 302, 303, 304, 305, -1, 307, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 322, -1, -1, -1, -1, -1, -1, 329, 330, - -1, 332, -1, 334, 335, 336, -1, -1, 339, 340, - -1, 342, 343, 344, 345, 0, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 363, -1, 365, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 387, 388, -1, -1, - -1, -1, -1, 394, 395, 396, 397, 398, 399, 400, - 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, - 411, -1, -1, -1, -1, -1, 260, -1, -1, -1, - -1, -1, -1, -1, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 91, -1, -1, 283, - 284, 285, -1, -1, -1, 289, 290, 291, 292, 293, - 294, 295, 296, 297, -1, 299, 300, 301, 302, 303, - 304, 305, -1, 307, -1, -1, -1, -1, -1, -1, - 125, -1, -1, -1, -1, -1, -1, -1, 322, -1, - -1, -1, -1, -1, -1, 329, 330, -1, 332, -1, - 334, 335, 336, -1, -1, 339, 340, -1, 342, 343, - 344, 345, 0, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 363, - -1, 365, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 387, 388, -1, -1, -1, -1, -1, - 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, - 404, 405, 406, 407, 408, 409, 410, 411, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 260, -1, -1, -1, -1, - -1, -1, -1, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, -1, -1, 125, 283, 284, - 285, -1, -1, -1, 289, 290, 291, 292, 293, 294, - 295, 296, 297, -1, 299, 300, 301, 302, 303, 304, - 305, -1, 307, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 322, -1, -1, - -1, -1, -1, -1, 329, 330, -1, 332, -1, 334, - 335, 336, -1, -1, 339, 340, -1, 342, 343, 344, - 345, 0, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 363, -1, - 365, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 387, 388, -1, -1, -1, -1, -1, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, -1, -1, -1, - -1, -1, 260, -1, -1, -1, -1, -1, -1, -1, - 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, - 278, 279, 91, -1, -1, 283, 284, 285, -1, -1, - -1, 289, 290, 291, 292, 293, 294, 295, 296, 297, - -1, 299, 300, 301, 302, 303, 304, 305, -1, 307, - -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, - -1, -1, -1, -1, 322, -1, -1, -1, -1, -1, - -1, 329, 330, -1, 332, -1, 334, 335, 336, -1, - -1, 339, 340, -1, 342, 343, 344, 345, 0, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 363, -1, 365, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 387, - 388, -1, -1, -1, -1, -1, 394, 395, 396, 397, - 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, - 408, 409, 410, 411, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 260, -1, -1, -1, -1, -1, -1, -1, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, -1, -1, 125, 283, 284, 285, -1, -1, -1, - 289, 290, 291, 292, 293, 294, 295, 296, 297, -1, - 299, 300, 301, 302, 303, 304, 305, -1, 307, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 322, -1, -1, -1, -1, -1, -1, - 329, 330, -1, 332, -1, 334, 335, 336, -1, -1, - 339, 340, -1, 342, 343, 344, 345, 0, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 363, -1, 365, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 387, 388, - -1, -1, -1, -1, -1, 394, 395, 396, 397, 398, - 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, - 409, 410, 411, -1, -1, -1, -1, -1, 260, -1, - -1, -1, -1, -1, -1, -1, 268, 269, 270, 271, - 272, 273, 274, 275, 276, 277, 278, 279, 91, -1, - -1, 283, 284, 285, -1, -1, -1, 289, 290, 291, - 292, 293, 294, 295, 296, 297, -1, 299, 300, 301, - 302, 303, 304, 305, -1, 307, -1, -1, -1, -1, - -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, - 322, -1, -1, -1, -1, -1, -1, 329, 330, -1, - 332, -1, 334, 335, 336, -1, -1, 339, 340, -1, - 342, 343, 344, 345, 0, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 363, -1, 365, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 387, 388, -1, -1, -1, - -1, -1, 394, 395, 396, 397, 398, 399, 400, 401, - 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 260, -1, -1, - -1, -1, -1, -1, -1, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, -1, -1, 125, - 283, 284, 285, -1, -1, -1, 289, 290, 291, 292, - 293, 294, 295, 296, 297, -1, 299, 300, 301, 302, - 303, 304, 305, -1, 307, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 322, - -1, -1, -1, -1, -1, -1, 329, 330, -1, 332, - -1, 334, 335, 336, -1, -1, 339, 340, -1, 342, - 343, 344, 345, 0, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 363, -1, 365, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 387, 388, -1, -1, -1, -1, - -1, 394, 395, 396, 397, 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, 408, 409, 410, 411, -1, - -1, -1, -1, -1, 260, -1, -1, -1, -1, -1, - -1, -1, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 91, -1, -1, 283, 284, 285, - -1, -1, -1, 289, 290, 291, 292, 293, 294, 295, - 296, 297, -1, 299, 300, 301, 302, 303, 304, 305, - -1, 307, -1, -1, -1, -1, -1, -1, 125, -1, - -1, -1, -1, -1, -1, -1, 322, -1, -1, -1, - -1, -1, -1, 329, 330, -1, 332, -1, 334, 335, - 336, -1, -1, 339, 340, -1, 342, 343, 344, 345, - 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 363, -1, 365, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 387, 388, -1, -1, -1, -1, -1, 394, 395, - 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, - 406, 407, 408, 409, 410, 411, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 260, -1, -1, -1, -1, -1, -1, - -1, 268, 269, 270, 271, 272, 273, 274, 275, 276, - 277, 278, 279, -1, -1, 125, 283, 284, 285, -1, - -1, -1, 289, 290, 291, 292, 293, 294, 295, 296, - 297, -1, 299, 300, 301, 302, 303, 304, 305, -1, - 307, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 0, 322, -1, -1, -1, -1, - -1, -1, 329, 330, -1, 332, -1, 334, 335, 336, - -1, -1, 339, 340, -1, 342, 343, 344, 345, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 363, -1, 365, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 387, 388, -1, -1, -1, -1, -1, 394, 395, 396, - 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, - 407, 408, 409, 410, 411, 91, -1, -1, -1, -1, - 260, -1, -1, -1, -1, -1, -1, -1, 268, 269, - 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - -1, -1, -1, 283, 284, 285, -1, -1, -1, 289, - 290, 291, 292, 293, 294, 295, 296, 297, -1, 299, - 300, 301, 302, 303, 304, 305, -1, 307, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 0, 322, -1, -1, -1, -1, -1, -1, 329, - 330, -1, 332, -1, 334, 335, 336, -1, -1, 339, - 340, -1, 342, 343, 344, 345, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 363, -1, 365, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 387, 388, -1, - -1, -1, -1, -1, 394, 395, 396, 397, 398, 399, - 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, - 410, 411, 91, -1, 40, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 260, -1, -1, 40, -1, -1, - -1, -1, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, -1, -1, -1, 283, 284, 285, - -1, -1, -1, 289, 290, 291, 292, 293, 294, 295, - 296, 297, -1, 299, 300, 301, 302, 303, 304, 305, - -1, 307, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 322, -1, -1, -1, - -1, -1, -1, 329, 330, -1, 332, -1, 334, 335, - 336, -1, -1, 339, 340, -1, 342, -1, 344, -1, - -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 363, -1, 365, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 387, 388, -1, -1, -1, -1, -1, 394, 395, - 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, - 406, 407, 408, 409, 410, 411, -1, -1, -1, -1, - -1, 260, -1, -1, -1, -1, -1, -1, -1, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, -1, -1, -1, 283, 284, 285, -1, -1, -1, - 289, 290, 291, 292, 293, 294, 295, 296, 297, -1, - 299, 300, 301, 302, 303, 304, 305, -1, 307, -1, - -1, 257, -1, -1, -1, 261, -1, -1, -1, -1, - -1, -1, -1, 322, 257, 258, -1, -1, -1, -1, - 329, 330, -1, 332, -1, 334, 335, 336, -1, -1, - 339, 340, -1, 342, -1, 344, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 363, -1, 365, 313, 314, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 313, 314, -1, -1, -1, -1, -1, -1, 387, 388, - 91, -1, -1, -1, -1, 394, 395, 396, 397, 398, - 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, - 409, 410, 411, -1, 258, -1, -1, -1, -1, -1, - -1, -1, -1, 369, 370, 371, 372, 373, -1, 375, - 376, 377, 378, 379, 380, 381, 369, 370, 371, 372, - 373, -1, 375, 376, 377, 378, 379, 380, 381, -1, - -1, -1, -1, -1, 400, 401, -1, -1, 404, 405, - 315, 316, -1, -1, 410, -1, -1, 400, 401, 313, - 314, 326, 327, 328, -1, -1, -1, 410, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 349, -1, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 369, 370, 371, 372, 373, - 385, 375, 376, 377, 378, 379, 380, 381, -1, -1, - -1, 396, 397, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 400, 401, -1, 260, - -1, -1, -1, -1, -1, -1, 410, 268, -1, -1, - 271, 272, 273, 274, 275, 276, 277, 278, 279, -1, - -1, -1, 283, 284, 285, -1, -1, -1, 289, 290, - 291, 292, 293, 294, 295, 296, 297, -1, 299, 300, - 301, 302, 303, 304, 305, -1, 307, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 322, -1, -1, -1, -1, -1, -1, 329, 330, - -1, 332, -1, 334, 335, 336, -1, -1, 339, 340, - -1, 342, -1, 344, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 363, -1, 365, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 387, 388, -1, -1, - -1, -1, -1, 394, 395, 396, 397, 398, 399, 400, - 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, - 411, -}; -#define YYFINAL 3 -#ifndef YYDEBUG -#define YYDEBUG 0 -#endif -#define YYMAXTOKEN 430 -#if YYDEBUG -char *yyname[] = { -"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'","','","'-'","'.'","'/'",0,0,0,0,0,0, -0,0,0,0,"':'",0,0,"'='",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,"'['",0,"']'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'", -"'|'","'}'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"CHAR","INTEGER","BOOLEAN","PERCENT", -"SPERCENT","MINUS_INTEGER","PLUS_INTEGER","MAZE_GRID_ID","SOLID_FILL_ID", -"MINES_ID","ROGUELEV_ID","MESSAGE_ID","MAZE_ID","LEVEL_ID","LEV_INIT_ID", -"GEOMETRY_ID","NOMAP_ID","OBJECT_ID","COBJECT_ID","MONSTER_ID","TRAP_ID", -"DOOR_ID","DRAWBRIDGE_ID","object_ID","monster_ID","terrain_ID","MAZEWALK_ID", -"WALLIFY_ID","REGION_ID","FILLING","IRREGULAR","JOINED","ALTAR_ID","LADDER_ID", -"STAIR_ID","NON_DIGGABLE_ID","NON_PASSWALL_ID","ROOM_ID","PORTAL_ID", -"TELEPRT_ID","BRANCH_ID","LEV","MINERALIZE_ID","CORRIDOR_ID","GOLD_ID", -"ENGRAVING_ID","FOUNTAIN_ID","POOL_ID","SINK_ID","NONE","RAND_CORRIDOR_ID", -"DOOR_STATE","LIGHT_STATE","CURSE_TYPE","ENGRAVING_TYPE","DIRECTION", -"RANDOM_TYPE","RANDOM_TYPE_BRACKET","A_REGISTER","ALIGNMENT","LEFT_OR_RIGHT", -"CENTER","TOP_OR_BOT","ALTAR_TYPE","UP_OR_DOWN","SUBROOM_ID","NAME_ID", -"FLAGS_ID","FLAG_TYPE","MON_ATTITUDE","MON_ALERTNESS","MON_APPEARANCE", -"ROOMDOOR_ID","IF_ID","ELSE_ID","TERRAIN_ID","HORIZ_OR_VERT", -"REPLACE_TERRAIN_ID","EXIT_ID","SHUFFLE_ID","QUANTITY_ID","BURIED_ID","LOOP_ID", -"FOR_ID","TO_ID","SWITCH_ID","CASE_ID","BREAK_ID","DEFAULT_ID","ERODED_ID", -"TRAPPED_STATE","RECHARGED_ID","INVIS_ID","GREASED_ID","FEMALE_ID", -"CANCELLED_ID","REVIVED_ID","AVENGE_ID","FLEEING_ID","BLINDED_ID", -"PARALYZED_ID","STUNNED_ID","CONFUSED_ID","SEENTRAPS_ID","ALL_ID","MONTYPE_ID", -"GRAVE_ID","ERODEPROOF_ID","FUNCTION_ID","MSG_OUTPUT_TYPE","COMPARE_TYPE", -"UNKNOWN_TYPE","rect_ID","fillrect_ID","line_ID","randline_ID","grow_ID", -"selection_ID","flood_ID","rndcoord_ID","circle_ID","ellipse_ID","filter_ID", -"complement_ID","gradient_ID","GRADIENT_TYPE","LIMITED","HUMIDITY_TYPE", -"STRING","MAP_ID","NQSTRING","VARSTRING","CFUNC","CFUNC_INT","CFUNC_STR", -"CFUNC_COORD","CFUNC_REGION","VARSTRING_INT","VARSTRING_INT_ARRAY", -"VARSTRING_STRING","VARSTRING_STRING_ARRAY","VARSTRING_VAR", -"VARSTRING_VAR_ARRAY","VARSTRING_COORD","VARSTRING_COORD_ARRAY", -"VARSTRING_REGION","VARSTRING_REGION_ARRAY","VARSTRING_MAPCHAR", -"VARSTRING_MAPCHAR_ARRAY","VARSTRING_MONST","VARSTRING_MONST_ARRAY", -"VARSTRING_OBJ","VARSTRING_OBJ_ARRAY","VARSTRING_SEL","VARSTRING_SEL_ARRAY", -"METHOD_INT","METHOD_INT_ARRAY","METHOD_STRING","METHOD_STRING_ARRAY", -"METHOD_VAR","METHOD_VAR_ARRAY","METHOD_COORD","METHOD_COORD_ARRAY", -"METHOD_REGION","METHOD_REGION_ARRAY","METHOD_MAPCHAR","METHOD_MAPCHAR_ARRAY", -"METHOD_MONST","METHOD_MONST_ARRAY","METHOD_OBJ","METHOD_OBJ_ARRAY", -"METHOD_SEL","METHOD_SEL_ARRAY","DICE", -}; -char *yyrule[] = { -"$accept : file", -"file :", -"file : levels", -"levels : level", -"levels : level levels", -"level : level_def flags levstatements", -"level_def : LEVEL_ID ':' STRING", -"level_def : MAZE_ID ':' STRING ',' mazefiller", -"mazefiller : RANDOM_TYPE", -"mazefiller : CHAR", -"lev_init : LEV_INIT_ID ':' SOLID_FILL_ID ',' terrain_type", -"lev_init : LEV_INIT_ID ':' MAZE_GRID_ID ',' CHAR", -"lev_init : LEV_INIT_ID ':' ROGUELEV_ID", -"lev_init : LEV_INIT_ID ':' MINES_ID ',' CHAR ',' CHAR ',' BOOLEAN ',' BOOLEAN ',' light_state ',' walled opt_fillchar", -"opt_limited :", -"opt_limited : ',' LIMITED", -"opt_coord_or_var :", -"opt_coord_or_var : ',' coord_or_var", -"opt_fillchar :", -"opt_fillchar : ',' CHAR", -"walled : BOOLEAN", -"walled : RANDOM_TYPE", -"flags :", -"flags : FLAGS_ID ':' flag_list", -"flag_list : FLAG_TYPE ',' flag_list", -"flag_list : FLAG_TYPE", -"levstatements :", -"levstatements : levstatement levstatements", -"stmt_block : '{' levstatements '}'", -"levstatement : message", -"levstatement : lev_init", -"levstatement : altar_detail", -"levstatement : grave_detail", -"levstatement : branch_region", -"levstatement : corridor", -"levstatement : variable_define", -"levstatement : shuffle_detail", -"levstatement : diggable_detail", -"levstatement : door_detail", -"levstatement : drawbridge_detail", -"levstatement : engraving_detail", -"levstatement : mineralize", -"levstatement : fountain_detail", -"levstatement : gold_detail", -"levstatement : switchstatement", -"levstatement : forstatement", -"levstatement : loopstatement", -"levstatement : ifstatement", -"levstatement : chancestatement", -"levstatement : exitstatement", -"levstatement : breakstatement", -"levstatement : function_define", -"levstatement : function_call", -"levstatement : ladder_detail", -"levstatement : map_definition", -"levstatement : mazewalk_detail", -"levstatement : monster_detail", -"levstatement : object_detail", -"levstatement : passwall_detail", -"levstatement : pool_detail", -"levstatement : portal_region", -"levstatement : random_corridors", -"levstatement : region_detail", -"levstatement : room_def", -"levstatement : subroom_def", -"levstatement : sink_detail", -"levstatement : terrain_detail", -"levstatement : replace_terrain_detail", -"levstatement : stair_detail", -"levstatement : stair_region", -"levstatement : teleprt_region", -"levstatement : trap_detail", -"levstatement : wallify_detail", -"any_var_array : VARSTRING_INT_ARRAY", -"any_var_array : VARSTRING_STRING_ARRAY", -"any_var_array : VARSTRING_VAR_ARRAY", -"any_var_array : VARSTRING_COORD_ARRAY", -"any_var_array : VARSTRING_REGION_ARRAY", -"any_var_array : VARSTRING_MAPCHAR_ARRAY", -"any_var_array : VARSTRING_MONST_ARRAY", -"any_var_array : VARSTRING_OBJ_ARRAY", -"any_var_array : VARSTRING_SEL_ARRAY", -"any_var : VARSTRING_INT", -"any_var : VARSTRING_STRING", -"any_var : VARSTRING_VAR", -"any_var : VARSTRING_COORD", -"any_var : VARSTRING_REGION", -"any_var : VARSTRING_MAPCHAR", -"any_var : VARSTRING_MONST", -"any_var : VARSTRING_OBJ", -"any_var : VARSTRING_SEL", -"any_var_or_arr : any_var_array", -"any_var_or_arr : any_var", -"any_var_or_arr : VARSTRING", -"any_var_or_unk : VARSTRING", -"any_var_or_unk : any_var", -"shuffle_detail : SHUFFLE_ID ':' any_var_array", -"variable_define : any_var_or_arr '=' math_expr_var", -"variable_define : any_var_or_arr '=' selection_ID ':' ter_selection", -"variable_define : any_var_or_arr '=' string_expr", -"variable_define : any_var_or_arr '=' terrainid ':' mapchar_or_var", -"variable_define : any_var_or_arr '=' monsterid ':' monster_or_var", -"variable_define : any_var_or_arr '=' objectid ':' object_or_var", -"variable_define : any_var_or_arr '=' coord_or_var", -"variable_define : any_var_or_arr '=' region_or_var", -"variable_define : any_var_or_arr '=' '{' integer_list '}'", -"variable_define : any_var_or_arr '=' '{' encodecoord_list '}'", -"variable_define : any_var_or_arr '=' '{' encoderegion_list '}'", -"variable_define : any_var_or_arr '=' terrainid ':' '{' mapchar_list '}'", -"variable_define : any_var_or_arr '=' monsterid ':' '{' encodemonster_list '}'", -"variable_define : any_var_or_arr '=' objectid ':' '{' encodeobj_list '}'", -"variable_define : any_var_or_arr '=' '{' string_list '}'", -"encodeobj_list : encodeobj", -"encodeobj_list : encodeobj_list ',' encodeobj", -"encodemonster_list : encodemonster", -"encodemonster_list : encodemonster_list ',' encodemonster", -"mapchar_list : mapchar", -"mapchar_list : mapchar_list ',' mapchar", -"encoderegion_list : encoderegion", -"encoderegion_list : encoderegion_list ',' encoderegion", -"encodecoord_list : encodecoord", -"encodecoord_list : encodecoord_list ',' encodecoord", -"integer_list : math_expr_var", -"integer_list : integer_list ',' math_expr_var", -"string_list : string_expr", -"string_list : string_list ',' string_expr", -"$$1 :", -"$$2 :", -"function_define : FUNCTION_ID NQSTRING '(' $$1 func_params_list ')' $$2 stmt_block", -"function_call : NQSTRING '(' func_call_params_list ')'", -"exitstatement : EXIT_ID", -"opt_percent :", -"opt_percent : PERCENT", -"comparestmt : PERCENT", -"comparestmt : '[' math_expr_var COMPARE_TYPE math_expr_var ']'", -"comparestmt : '[' math_expr_var ']'", -"$$3 :", -"$$4 :", -"switchstatement : SWITCH_ID $$3 '[' integer_or_var ']' $$4 '{' switchcases '}'", -"switchcases :", -"switchcases : switchcase switchcases", -"$$5 :", -"switchcase : CASE_ID all_integers ':' $$5 levstatements", -"$$6 :", -"switchcase : DEFAULT_ID ':' $$6 levstatements", -"breakstatement : BREAK_ID", -"for_to_span : '.' '.'", -"for_to_span : TO_ID", -"forstmt_start : FOR_ID any_var_or_unk '=' math_expr_var for_to_span math_expr_var", -"$$7 :", -"forstatement : forstmt_start $$7 stmt_block", -"$$8 :", -"loopstatement : LOOP_ID '[' integer_or_var ']' $$8 stmt_block", -"$$9 :", -"chancestatement : comparestmt ':' $$9 levstatement", -"$$10 :", -"ifstatement : IF_ID comparestmt $$10 if_ending", -"if_ending : stmt_block", -"$$11 :", -"if_ending : stmt_block $$11 ELSE_ID stmt_block", -"message : MESSAGE_ID ':' string_expr", -"random_corridors : RAND_CORRIDOR_ID", -"random_corridors : RAND_CORRIDOR_ID ':' all_integers", -"random_corridors : RAND_CORRIDOR_ID ':' RANDOM_TYPE", -"corridor : CORRIDOR_ID ':' corr_spec ',' corr_spec", -"corridor : CORRIDOR_ID ':' corr_spec ',' all_integers", -"corr_spec : '(' INTEGER ',' DIRECTION ',' door_pos ')'", -"room_begin : room_type opt_percent ',' light_state", -"$$12 :", -"subroom_def : SUBROOM_ID ':' room_begin ',' subroom_pos ',' room_size optroomregionflags $$12 stmt_block", -"$$13 :", -"room_def : ROOM_ID ':' room_begin ',' room_pos ',' room_align ',' room_size optroomregionflags $$13 stmt_block", -"roomfill :", -"roomfill : ',' BOOLEAN", -"room_pos : '(' INTEGER ',' INTEGER ')'", -"room_pos : RANDOM_TYPE", -"subroom_pos : '(' INTEGER ',' INTEGER ')'", -"subroom_pos : RANDOM_TYPE", -"room_align : '(' h_justif ',' v_justif ')'", -"room_align : RANDOM_TYPE", -"room_size : '(' INTEGER ',' INTEGER ')'", -"room_size : RANDOM_TYPE", -"door_detail : ROOMDOOR_ID ':' secret ',' door_state ',' door_wall ',' door_pos", -"door_detail : DOOR_ID ':' door_state ',' ter_selection", -"secret : BOOLEAN", -"secret : RANDOM_TYPE", -"door_wall : dir_list", -"door_wall : RANDOM_TYPE", -"dir_list : DIRECTION", -"dir_list : DIRECTION '|' dir_list", -"door_pos : INTEGER", -"door_pos : RANDOM_TYPE", -"map_definition : NOMAP_ID", -"map_definition : GEOMETRY_ID ':' h_justif ',' v_justif roomfill MAP_ID", -"map_definition : GEOMETRY_ID ':' coord_or_var roomfill MAP_ID", -"h_justif : LEFT_OR_RIGHT", -"h_justif : CENTER", -"v_justif : TOP_OR_BOT", -"v_justif : CENTER", -"monster_detail : MONSTER_ID ':' monster_desc", -"$$14 :", -"monster_detail : MONSTER_ID ':' monster_desc $$14 stmt_block", -"monster_desc : monster_or_var ',' coord_or_var monster_infos", -"monster_infos :", -"monster_infos : monster_infos ',' monster_info", -"monster_info : string_expr", -"monster_info : MON_ATTITUDE", -"monster_info : MON_ALERTNESS", -"monster_info : alignment_prfx", -"monster_info : MON_APPEARANCE string_expr", -"monster_info : FEMALE_ID", -"monster_info : INVIS_ID", -"monster_info : CANCELLED_ID", -"monster_info : REVIVED_ID", -"monster_info : AVENGE_ID", -"monster_info : FLEEING_ID ':' integer_or_var", -"monster_info : BLINDED_ID ':' integer_or_var", -"monster_info : PARALYZED_ID ':' integer_or_var", -"monster_info : STUNNED_ID", -"monster_info : CONFUSED_ID", -"monster_info : SEENTRAPS_ID ':' seen_trap_mask", -"seen_trap_mask : STRING", -"seen_trap_mask : ALL_ID", -"seen_trap_mask : STRING '|' seen_trap_mask", -"object_detail : OBJECT_ID ':' object_desc", -"$$15 :", -"object_detail : COBJECT_ID ':' object_desc $$15 stmt_block", -"object_desc : object_or_var object_infos", -"object_infos :", -"object_infos : object_infos ',' object_info", -"object_info : CURSE_TYPE", -"object_info : MONTYPE_ID ':' monster_or_var", -"object_info : all_ints_push", -"object_info : NAME_ID ':' string_expr", -"object_info : QUANTITY_ID ':' integer_or_var", -"object_info : BURIED_ID", -"object_info : LIGHT_STATE", -"object_info : ERODED_ID ':' integer_or_var", -"object_info : ERODEPROOF_ID", -"object_info : DOOR_STATE", -"object_info : TRAPPED_STATE", -"object_info : RECHARGED_ID ':' integer_or_var", -"object_info : INVIS_ID", -"object_info : GREASED_ID", -"object_info : coord_or_var", -"trap_detail : TRAP_ID ':' trap_name ',' coord_or_var", -"drawbridge_detail : DRAWBRIDGE_ID ':' coord_or_var ',' DIRECTION ',' door_state", -"mazewalk_detail : MAZEWALK_ID ':' coord_or_var ',' DIRECTION", -"mazewalk_detail : MAZEWALK_ID ':' coord_or_var ',' DIRECTION ',' BOOLEAN opt_fillchar", -"wallify_detail : WALLIFY_ID", -"wallify_detail : WALLIFY_ID ':' ter_selection", -"ladder_detail : LADDER_ID ':' coord_or_var ',' UP_OR_DOWN", -"stair_detail : STAIR_ID ':' coord_or_var ',' UP_OR_DOWN", -"stair_region : STAIR_ID ':' lev_region ',' lev_region ',' UP_OR_DOWN", -"portal_region : PORTAL_ID ':' lev_region ',' lev_region ',' STRING", -"teleprt_region : TELEPRT_ID ':' lev_region ',' lev_region teleprt_detail", -"branch_region : BRANCH_ID ':' lev_region ',' lev_region", -"teleprt_detail :", -"teleprt_detail : ',' UP_OR_DOWN", -"fountain_detail : FOUNTAIN_ID ':' ter_selection", -"sink_detail : SINK_ID ':' ter_selection", -"pool_detail : POOL_ID ':' ter_selection", -"terrain_type : CHAR", -"terrain_type : '(' CHAR ',' light_state ')'", -"replace_terrain_detail : REPLACE_TERRAIN_ID ':' region_or_var ',' mapchar_or_var ',' mapchar_or_var ',' SPERCENT", -"terrain_detail : TERRAIN_ID ':' ter_selection ',' mapchar_or_var", -"diggable_detail : NON_DIGGABLE_ID ':' region_or_var", -"passwall_detail : NON_PASSWALL_ID ':' region_or_var", -"$$16 :", -"region_detail : REGION_ID ':' region_or_var ',' light_state ',' room_type optroomregionflags $$16 region_detail_end", -"region_detail_end :", -"region_detail_end : stmt_block", -"altar_detail : ALTAR_ID ':' coord_or_var ',' alignment ',' altar_type", -"grave_detail : GRAVE_ID ':' coord_or_var ',' string_expr", -"grave_detail : GRAVE_ID ':' coord_or_var ',' RANDOM_TYPE", -"grave_detail : GRAVE_ID ':' coord_or_var", -"gold_detail : GOLD_ID ':' math_expr_var ',' coord_or_var", -"engraving_detail : ENGRAVING_ID ':' coord_or_var ',' engraving_type ',' string_expr", -"mineralize : MINERALIZE_ID ':' integer_or_var ',' integer_or_var ',' integer_or_var ',' integer_or_var", -"mineralize : MINERALIZE_ID", -"trap_name : STRING", -"trap_name : RANDOM_TYPE", -"room_type : STRING", -"room_type : RANDOM_TYPE", -"optroomregionflags :", -"optroomregionflags : ',' roomregionflags", -"roomregionflags : roomregionflag", -"roomregionflags : roomregionflag ',' roomregionflags", -"roomregionflag : FILLING", -"roomregionflag : IRREGULAR", -"roomregionflag : JOINED", -"door_state : DOOR_STATE", -"door_state : RANDOM_TYPE", -"light_state : LIGHT_STATE", -"light_state : RANDOM_TYPE", -"alignment : ALIGNMENT", -"alignment : a_register", -"alignment : RANDOM_TYPE", -"alignment_prfx : ALIGNMENT", -"alignment_prfx : a_register", -"alignment_prfx : A_REGISTER ':' RANDOM_TYPE", -"altar_type : ALTAR_TYPE", -"altar_type : RANDOM_TYPE", -"a_register : A_REGISTER '[' INTEGER ']'", -"string_or_var : STRING", -"string_or_var : VARSTRING_STRING", -"string_or_var : VARSTRING_STRING_ARRAY '[' math_expr_var ']'", -"integer_or_var : math_expr_var", -"coord_or_var : encodecoord", -"coord_or_var : rndcoord_ID '(' ter_selection ')'", -"coord_or_var : VARSTRING_COORD", -"coord_or_var : VARSTRING_COORD_ARRAY '[' math_expr_var ']'", -"encodecoord : '(' INTEGER ',' INTEGER ')'", -"encodecoord : RANDOM_TYPE", -"encodecoord : RANDOM_TYPE_BRACKET humidity_flags ']'", -"humidity_flags : HUMIDITY_TYPE", -"humidity_flags : HUMIDITY_TYPE ',' humidity_flags", -"region_or_var : encoderegion", -"region_or_var : VARSTRING_REGION", -"region_or_var : VARSTRING_REGION_ARRAY '[' math_expr_var ']'", -"encoderegion : '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')'", -"mapchar_or_var : mapchar", -"mapchar_or_var : VARSTRING_MAPCHAR", -"mapchar_or_var : VARSTRING_MAPCHAR_ARRAY '[' math_expr_var ']'", -"mapchar : CHAR", -"mapchar : '(' CHAR ',' light_state ')'", -"monster_or_var : encodemonster", -"monster_or_var : VARSTRING_MONST", -"monster_or_var : VARSTRING_MONST_ARRAY '[' math_expr_var ']'", -"encodemonster : STRING", -"encodemonster : CHAR", -"encodemonster : '(' CHAR ',' STRING ')'", -"encodemonster : RANDOM_TYPE", -"object_or_var : encodeobj", -"object_or_var : VARSTRING_OBJ", -"object_or_var : VARSTRING_OBJ_ARRAY '[' math_expr_var ']'", -"encodeobj : STRING", -"encodeobj : CHAR", -"encodeobj : '(' CHAR ',' STRING ')'", -"encodeobj : RANDOM_TYPE", -"string_expr : string_or_var", -"string_expr : string_expr '.' string_or_var", -"math_expr_var : INTEGER", -"math_expr_var : dice", -"math_expr_var : '(' MINUS_INTEGER ')'", -"math_expr_var : VARSTRING_INT", -"math_expr_var : VARSTRING_INT_ARRAY '[' math_expr_var ']'", -"math_expr_var : math_expr_var '+' math_expr_var", -"math_expr_var : math_expr_var '-' math_expr_var", -"math_expr_var : math_expr_var '*' math_expr_var", -"math_expr_var : math_expr_var '/' math_expr_var", -"math_expr_var : math_expr_var '%' math_expr_var", -"math_expr_var : '(' math_expr_var ')'", -"func_param_type : CFUNC_INT", -"func_param_type : CFUNC_STR", -"func_param_part : any_var_or_arr ':' func_param_type", -"func_param_list : func_param_part", -"func_param_list : func_param_list ',' func_param_part", -"func_params_list :", -"func_params_list : func_param_list", -"func_call_param_part : math_expr_var", -"func_call_param_part : string_expr", -"func_call_param_list : func_call_param_part", -"func_call_param_list : func_call_param_list ',' func_call_param_part", -"func_call_params_list :", -"func_call_params_list : func_call_param_list", -"ter_selection_x : coord_or_var", -"ter_selection_x : rect_ID region_or_var", -"ter_selection_x : fillrect_ID region_or_var", -"ter_selection_x : line_ID coord_or_var ',' coord_or_var", -"ter_selection_x : randline_ID coord_or_var ',' coord_or_var ',' math_expr_var", -"ter_selection_x : grow_ID '(' ter_selection ')'", -"ter_selection_x : grow_ID '(' dir_list ',' ter_selection ')'", -"ter_selection_x : filter_ID '(' SPERCENT ',' ter_selection ')'", -"ter_selection_x : filter_ID '(' ter_selection ',' ter_selection ')'", -"ter_selection_x : filter_ID '(' mapchar_or_var ',' ter_selection ')'", -"ter_selection_x : flood_ID coord_or_var", -"ter_selection_x : circle_ID '(' coord_or_var ',' math_expr_var ')'", -"ter_selection_x : circle_ID '(' coord_or_var ',' math_expr_var ',' FILLING ')'", -"ter_selection_x : ellipse_ID '(' coord_or_var ',' math_expr_var ',' math_expr_var ')'", -"ter_selection_x : ellipse_ID '(' coord_or_var ',' math_expr_var ',' math_expr_var ',' FILLING ')'", -"ter_selection_x : gradient_ID '(' GRADIENT_TYPE ',' '(' math_expr_var '-' math_expr_var opt_limited ')' ',' coord_or_var opt_coord_or_var ')'", -"ter_selection_x : complement_ID ter_selection_x", -"ter_selection_x : VARSTRING_SEL", -"ter_selection_x : '(' ter_selection ')'", -"ter_selection : ter_selection_x", -"ter_selection : ter_selection_x '&' ter_selection", -"dice : DICE", -"all_integers : MINUS_INTEGER", -"all_integers : PLUS_INTEGER", -"all_integers : INTEGER", -"all_ints_push : MINUS_INTEGER", -"all_ints_push : PLUS_INTEGER", -"all_ints_push : INTEGER", -"all_ints_push : dice", -"objectid : object_ID", -"objectid : OBJECT_ID", -"monsterid : monster_ID", -"monsterid : MONSTER_ID", -"terrainid : terrain_ID", -"terrainid : TERRAIN_ID", -"engraving_type : ENGRAVING_TYPE", -"engraving_type : RANDOM_TYPE", -"lev_region : region", -"lev_region : LEV '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')'", -"region : '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')'", -}; -#endif -#ifdef YYSTACKSIZE -#undef YYMAXDEPTH -#define YYMAXDEPTH YYSTACKSIZE -#else -#ifdef YYMAXDEPTH -#define YYSTACKSIZE YYMAXDEPTH -#else -#define YYSTACKSIZE 500 -#define YYMAXDEPTH 500 -#endif -#endif -int yydebug; -int yynerrs; -int yyerrflag; -int yychar; -short *yyssp; -YYSTYPE *yyvsp; -YYSTYPE yyval; -YYSTYPE yylval; -short yyss[YYSTACKSIZE]; -YYSTYPE yyvs[YYSTACKSIZE]; -#define yystacksize YYSTACKSIZE - -/*lev_comp.y*/ -#define YYABORT goto yyabort -#define YYREJECT goto yyabort -#define YYACCEPT goto yyaccept -#define YYERROR goto yyerrlab -int -yyparse() -{ - register int yym, yyn, yystate; -#if YYDEBUG - register char *yys; - extern char *getenv(); - - if ((yys = getenv("YYDEBUG")) != 0) - { - yyn = *yys; - if (yyn >= '0' && yyn <= '9') - yydebug = yyn - '0'; - } -#endif - - yynerrs = 0; - yyerrflag = 0; - yychar = (-1); - - yyssp = yyss; - yyvsp = yyvs; - *yyssp = yystate = 0; - -yyloop: - if ((yyn = yydefred[yystate]) != 0) goto yyreduce; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, reading %d (%s)\n", - YYPREFIX, yystate, yychar, yys); - } -#endif - } - if ((yyn = yysindex[yystate]) != 0 && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, shifting to state %d\n", - YYPREFIX, yystate, yytable[yyn]); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - yychar = (-1); - if (yyerrflag > 0) --yyerrflag; - goto yyloop; - } - if ((yyn = yyrindex[yystate]) != 0 && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { - yyn = yytable[yyn]; - goto yyreduce; - } - if (yyerrflag) goto yyinrecovery; - goto yynewerror; -yynewerror: - yyerror("syntax error"); - goto yyerrlab; -yyerrlab: - ++yynerrs; -yyinrecovery: - if (yyerrflag < 3) - { - yyerrflag = 3; - for (;;) - { - if ((yyn = yysindex[*yyssp]) != 0 && (yyn += YYERRCODE) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, error recovery shifting\ - to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - goto yyloop; - } - else - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: error recovery discarding state %d\n", - YYPREFIX, *yyssp); -#endif - if (yyssp <= yyss) goto yyabort; - --yyssp; - --yyvsp; - } - } - } - else - { - if (yychar == 0) goto yyabort; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, error recovery discards token %d (%s)\n", - YYPREFIX, yystate, yychar, yys); - } -#endif - yychar = (-1); - goto yyloop; - } -yyreduce: -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, reducing by rule %d (%s)\n", - YYPREFIX, yystate, yyn, yyrule[yyn]); -#endif - yym = yylen[yyn]; - yyval = yyvsp[1-yym]; - switch (yyn) - { -case 5: -{ - if (fatal_error > 0) { - (void) fprintf(stderr, - "%s: %d errors detected for level \"%s\". No output created!\n", - fname, fatal_error, yyvsp[-2].map); - fatal_error = 0; - got_errors++; - } else if (!got_errors) { - if (!write_level_file(yyvsp[-2].map, splev)) { - lc_error("Can't write output file for '%s'!", - yyvsp[-2].map); - exit(EXIT_FAILURE); - } - } - Free(yyvsp[-2].map); - Free(splev); - splev = NULL; - vardef_free_all(vardefs); - vardefs = NULL; - } -break; -case 6: -{ - start_level_def(&splev, yyvsp[0].map); - yyval.map = yyvsp[0].map; - } -break; -case 7: -{ - start_level_def(&splev, yyvsp[-2].map); - if (yyvsp[0].i == -1) { - add_opvars(splev, "iiiiiiiio", - VA_PASS9(LVLINIT_MAZEGRID, HWALL, 0,0, - 0,0,0,0, SPO_INITLEVEL)); - } else { - int bg = (int) what_map_char((char) yyvsp[0].i); - - add_opvars(splev, "iiiiiiiio", - VA_PASS9(LVLINIT_SOLIDFILL, bg, 0,0, - 0,0,0,0, SPO_INITLEVEL)); - } - add_opvars(splev, "io", - VA_PASS2(MAZELEVEL, SPO_LEVEL_FLAGS)); - max_x_map = COLNO-1; - max_y_map = ROWNO; - yyval.map = yyvsp[-2].map; - } -break; -case 8: -{ - yyval.i = -1; - } -break; -case 9: -{ - yyval.i = what_map_char((char) yyvsp[0].i); - } -break; -case 10: -{ - int filling = (int) yyvsp[0].terr.ter; - - if (filling == INVALID_TYPE || filling >= MAX_TYPE) - lc_error("INIT_MAP: Invalid fill char type."); - add_opvars(splev, "iiiiiiiio", - VA_PASS9(LVLINIT_SOLIDFILL, filling, - 0, (int) yyvsp[0].terr.lit, - 0,0,0,0, SPO_INITLEVEL)); - max_x_map = COLNO-1; - max_y_map = ROWNO; - } -break; -case 11: -{ - int filling = (int) what_map_char((char) yyvsp[0].i); - - if (filling == INVALID_TYPE || filling >= MAX_TYPE) - lc_error("INIT_MAP: Invalid fill char type."); - add_opvars(splev, "iiiiiiiio", - VA_PASS9(LVLINIT_MAZEGRID, filling, 0,0, - 0,0,0,0, SPO_INITLEVEL)); - max_x_map = COLNO-1; - max_y_map = ROWNO; - } -break; -case 12: -{ - add_opvars(splev, "iiiiiiiio", - VA_PASS9(LVLINIT_ROGUE,0,0,0, - 0,0,0,0, SPO_INITLEVEL)); - } -break; -case 13: -{ - int fg = (int) what_map_char((char) yyvsp[-11].i), - bg = (int) what_map_char((char) yyvsp[-9].i); - int smoothed = (int) yyvsp[-7].i, - joined = (int) yyvsp[-5].i, - lit = (int) yyvsp[-3].i, - walled = (int) yyvsp[-1].i, - filling = (int) yyvsp[0].i; - - if (fg == INVALID_TYPE || fg >= MAX_TYPE) - lc_error("INIT_MAP: Invalid foreground type."); - if (bg == INVALID_TYPE || bg >= MAX_TYPE) - lc_error("INIT_MAP: Invalid background type."); - if (joined && fg != CORR && fg != ROOM) - lc_error("INIT_MAP: Invalid foreground type for joined map."); - - if (filling == INVALID_TYPE) - lc_error("INIT_MAP: Invalid fill char type."); - - add_opvars(splev, "iiiiiiiio", - VA_PASS9(LVLINIT_MINES, filling, walled, lit, - joined, smoothed, bg, fg, - SPO_INITLEVEL)); - max_x_map = COLNO-1; - max_y_map = ROWNO; - } -break; -case 14: -{ - yyval.i = 0; - } -break; -case 15: -{ - yyval.i = yyvsp[0].i; - } -break; -case 16: -{ - add_opvars(splev, "o", VA_PASS1(SPO_COPY)); - yyval.i = 0; - } -break; -case 17: -{ - yyval.i = 1; - } -break; -case 18: -{ - yyval.i = -1; - } -break; -case 19: -{ - yyval.i = what_map_char((char) yyvsp[0].i); - } -break; -case 22: -{ - add_opvars(splev, "io", VA_PASS2(0, SPO_LEVEL_FLAGS)); - } -break; -case 23: -{ - add_opvars(splev, "io", - VA_PASS2((int) yyvsp[0].i, SPO_LEVEL_FLAGS)); - } -break; -case 24: -{ - yyval.i = (yyvsp[-2].i | yyvsp[0].i); - } -break; -case 25: -{ - yyval.i = yyvsp[0].i; - } -break; -case 26: -{ - yyval.i = 0; - } -break; -case 27: -{ - yyval.i = 1 + yyvsp[0].i; - } -break; -case 28: -{ - yyval.i = yyvsp[-1].i; - } -break; -case 96: -{ - struct lc_vardefs *vd; - - if ((vd = vardef_defined(vardefs, yyvsp[0].map, 1))) { - if (!(vd->var_type & SPOVAR_ARRAY)) - lc_error("Trying to shuffle non-array variable '%s'", - yyvsp[0].map); - } else - lc_error("Trying to shuffle undefined variable '%s'", - yyvsp[0].map); - add_opvars(splev, "so", VA_PASS2(yyvsp[0].map, SPO_SHUFFLE_ARRAY)); - Free(yyvsp[0].map); - } -break; -case 97: -{ - vardefs = add_vardef_type(vardefs, yyvsp[-2].map, SPOVAR_INT); - add_opvars(splev, "iso", VA_PASS3(0, yyvsp[-2].map, SPO_VAR_INIT)); - Free(yyvsp[-2].map); - } -break; -case 98: -{ - vardefs = add_vardef_type(vardefs, yyvsp[-4].map, SPOVAR_SEL); - add_opvars(splev, "iso", VA_PASS3(0, yyvsp[-4].map, SPO_VAR_INIT)); - Free(yyvsp[-4].map); - } -break; -case 99: -{ - vardefs = add_vardef_type(vardefs, yyvsp[-2].map, SPOVAR_STRING); - add_opvars(splev, "iso", VA_PASS3(0, yyvsp[-2].map, SPO_VAR_INIT)); - Free(yyvsp[-2].map); - } -break; -case 100: -{ - vardefs = add_vardef_type(vardefs, yyvsp[-4].map, SPOVAR_MAPCHAR); - add_opvars(splev, "iso", VA_PASS3(0, yyvsp[-4].map, SPO_VAR_INIT)); - Free(yyvsp[-4].map); - } -break; -case 101: -{ - vardefs = add_vardef_type(vardefs, yyvsp[-4].map, SPOVAR_MONST); - add_opvars(splev, "iso", VA_PASS3(0, yyvsp[-4].map, SPO_VAR_INIT)); - Free(yyvsp[-4].map); - } -break; -case 102: -{ - vardefs = add_vardef_type(vardefs, yyvsp[-4].map, SPOVAR_OBJ); - add_opvars(splev, "iso", VA_PASS3(0, yyvsp[-4].map, SPO_VAR_INIT)); - Free(yyvsp[-4].map); - } -break; -case 103: -{ - vardefs = add_vardef_type(vardefs, yyvsp[-2].map, SPOVAR_COORD); - add_opvars(splev, "iso", VA_PASS3(0, yyvsp[-2].map, SPO_VAR_INIT)); - Free(yyvsp[-2].map); - } -break; -case 104: -{ - vardefs = add_vardef_type(vardefs, yyvsp[-2].map, SPOVAR_REGION); - add_opvars(splev, "iso", VA_PASS3(0, yyvsp[-2].map, SPO_VAR_INIT)); - Free(yyvsp[-2].map); - } -break; -case 105: -{ - int n_items = (int) yyvsp[-1].i; - - vardefs = add_vardef_type(vardefs, yyvsp[-4].map, - SPOVAR_INT | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, yyvsp[-4].map, SPO_VAR_INIT)); - Free(yyvsp[-4].map); - } -break; -case 106: -{ - int n_items = (int) yyvsp[-1].i; - - vardefs = add_vardef_type(vardefs, yyvsp[-4].map, - SPOVAR_COORD | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, yyvsp[-4].map, SPO_VAR_INIT)); - Free(yyvsp[-4].map); - } -break; -case 107: -{ - int n_items = (int) yyvsp[-1].i; - - vardefs = add_vardef_type(vardefs, yyvsp[-4].map, - SPOVAR_REGION | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, yyvsp[-4].map, SPO_VAR_INIT)); - Free(yyvsp[-4].map); - } -break; -case 108: -{ - int n_items = (int) yyvsp[-1].i; - - vardefs = add_vardef_type(vardefs, yyvsp[-6].map, - SPOVAR_MAPCHAR | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, yyvsp[-6].map, SPO_VAR_INIT)); - Free(yyvsp[-6].map); - } -break; -case 109: -{ - int n_items = (int) yyvsp[-1].i; - - vardefs = add_vardef_type(vardefs, yyvsp[-6].map, - SPOVAR_MONST | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, yyvsp[-6].map, SPO_VAR_INIT)); - Free(yyvsp[-6].map); - } -break; -case 110: -{ - int n_items = (int) yyvsp[-1].i; - - vardefs = add_vardef_type(vardefs, yyvsp[-6].map, - SPOVAR_OBJ | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, yyvsp[-6].map, SPO_VAR_INIT)); - Free(yyvsp[-6].map); - } -break; -case 111: -{ - int n_items = (int) yyvsp[-1].i; - - vardefs = add_vardef_type(vardefs, yyvsp[-4].map, - SPOVAR_STRING | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, yyvsp[-4].map, SPO_VAR_INIT)); - Free(yyvsp[-4].map); - } -break; -case 112: -{ - add_opvars(splev, "O", VA_PASS1(yyvsp[0].i)); - yyval.i = 1; - } -break; -case 113: -{ - add_opvars(splev, "O", VA_PASS1(yyvsp[0].i)); - yyval.i = 1 + yyvsp[-2].i; - } -break; -case 114: -{ - add_opvars(splev, "M", VA_PASS1(yyvsp[0].i)); - yyval.i = 1; - } -break; -case 115: -{ - add_opvars(splev, "M", VA_PASS1(yyvsp[0].i)); - yyval.i = 1 + yyvsp[-2].i; - } -break; -case 116: -{ - add_opvars(splev, "m", VA_PASS1(yyvsp[0].i)); - yyval.i = 1; - } -break; -case 117: -{ - add_opvars(splev, "m", VA_PASS1(yyvsp[0].i)); - yyval.i = 1 + yyvsp[-2].i; - } -break; -case 118: -{ - yyval.i = 1; - } -break; -case 119: -{ - yyval.i = 1 + yyvsp[-2].i; - } -break; -case 120: -{ - add_opvars(splev, "c", VA_PASS1(yyvsp[0].i)); - yyval.i = 1; - } -break; -case 121: -{ - add_opvars(splev, "c", VA_PASS1(yyvsp[0].i)); - yyval.i = 1 + yyvsp[-2].i; - } -break; -case 122: -{ - yyval.i = 1; - } -break; -case 123: -{ - yyval.i = 1 + yyvsp[-2].i; - } -break; -case 124: -{ - yyval.i = 1; - } -break; -case 125: -{ - yyval.i = 1 + yyvsp[-2].i; - } -break; -case 126: -{ - struct lc_funcdefs *funcdef; - - if (in_function_definition) - lc_error("Recursively defined functions not allowed (function %s).", yyvsp[-1].map); - - in_function_definition++; - - if (funcdef_defined(function_definitions, yyvsp[-1].map, 1)) - lc_error("Function '%s' already defined once.", yyvsp[-1].map); - - funcdef = funcdef_new(-1, yyvsp[-1].map); - funcdef->next = function_definitions; - function_definitions = funcdef; - function_splev_backup = splev; - splev = &(funcdef->code); - Free(yyvsp[-1].map); - curr_function = funcdef; - function_tmp_var_defs = vardefs; - vardefs = NULL; - } -break; -case 127: -{ - /* nothing */ - } -break; -case 128: -{ - add_opvars(splev, "io", VA_PASS2(0, SPO_RETURN)); - splev = function_splev_backup; - in_function_definition--; - curr_function = NULL; - vardef_free_all(vardefs); - vardefs = function_tmp_var_defs; - } -break; -case 129: -{ - struct lc_funcdefs *tmpfunc; - - tmpfunc = funcdef_defined(function_definitions, yyvsp[-3].map, 1); - if (tmpfunc) { - int l; - int nparams = (int) strlen(yyvsp[-1].map); - char *fparamstr = funcdef_paramtypes(tmpfunc); - - if (strcmp(yyvsp[-1].map, fparamstr)) { - char *tmps = strdup(decode_parm_str(fparamstr)); - - lc_error("Function '%s' requires params '%s', got '%s' instead.", - yyvsp[-3].map, tmps, decode_parm_str(yyvsp[-1].map)); - Free(tmps); - } - Free(fparamstr); - Free(yyvsp[-1].map); - if (!(tmpfunc->n_called)) { - /* we haven't called the function yet, so insert it in the code */ - struct opvar *jmp = New(struct opvar); - - set_opvar_int(jmp, splev->n_opcodes+1); - add_opcode(splev, SPO_PUSH, jmp); - /* we must jump past it first, then CALL it, due to RETURN. */ - add_opcode(splev, SPO_JMP, NULL); - - tmpfunc->addr = splev->n_opcodes; - - { /* init function parameter variables */ - struct lc_funcdefs_parm *tfp = tmpfunc->params; - while (tfp) { - add_opvars(splev, "iso", - VA_PASS3(0, tfp->name, - SPO_VAR_INIT)); - tfp = tfp->next; - } - } - - splev_add_from(splev, &(tmpfunc->code)); - set_opvar_int(jmp, - splev->n_opcodes - jmp->vardata.l); - } - l = (int) (tmpfunc->addr - splev->n_opcodes - 2); - add_opvars(splev, "iio", - VA_PASS3(nparams, l, SPO_CALL)); - tmpfunc->n_called++; - } else { - lc_error("Function '%s' not defined.", yyvsp[-3].map); - } - Free(yyvsp[-3].map); - } -break; -case 130: -{ - add_opcode(splev, SPO_EXIT, NULL); - } -break; -case 131: -{ - yyval.i = 100; - } -break; -case 132: -{ - yyval.i = yyvsp[0].i; - } -break; -case 133: -{ - /* val > rn2(100) */ - add_opvars(splev, "iio", - VA_PASS3((int) yyvsp[0].i, 100, SPO_RN2)); - yyval.i = SPO_JG; - } -break; -case 134: -{ - yyval.i = yyvsp[-2].i; - } -break; -case 135: -{ - /* boolean, explicit foo != 0 */ - add_opvars(splev, "i", VA_PASS1(0)); - yyval.i = SPO_JNE; - } -break; -case 136: -{ - is_inconstant_number = 0; - } -break; -case 137: -{ - struct opvar *chkjmp; - - if (in_switch_statement > 0) - lc_error("Cannot nest switch-statements."); - - in_switch_statement++; - - n_switch_case_list = 0; - switch_default_case = NULL; - - if (!is_inconstant_number) - add_opvars(splev, "o", VA_PASS1(SPO_RN2)); - is_inconstant_number = 0; - - chkjmp = New(struct opvar); - set_opvar_int(chkjmp, splev->n_opcodes+1); - switch_check_jump = chkjmp; - add_opcode(splev, SPO_PUSH, chkjmp); - add_opcode(splev, SPO_JMP, NULL); - break_stmt_start(); - } -break; -case 138: -{ - struct opvar *endjump = New(struct opvar); - int i; - - set_opvar_int(endjump, splev->n_opcodes+1); - - add_opcode(splev, SPO_PUSH, endjump); - add_opcode(splev, SPO_JMP, NULL); - - set_opvar_int(switch_check_jump, - splev->n_opcodes - switch_check_jump->vardata.l); - - for (i = 0; i < n_switch_case_list; i++) { - add_opvars(splev, "oio", - VA_PASS3(SPO_COPY, - switch_case_value[i], SPO_CMP)); - set_opvar_int(switch_case_list[i], - switch_case_list[i]->vardata.l - splev->n_opcodes-1); - add_opcode(splev, SPO_PUSH, switch_case_list[i]); - add_opcode(splev, SPO_JE, NULL); - } - - if (switch_default_case) { - set_opvar_int(switch_default_case, - switch_default_case->vardata.l - splev->n_opcodes-1); - add_opcode(splev, SPO_PUSH, switch_default_case); - add_opcode(splev, SPO_JMP, NULL); - } - - set_opvar_int(endjump, splev->n_opcodes - endjump->vardata.l); - - break_stmt_end(splev); - - add_opcode(splev, SPO_POP, NULL); /* get rid of the value in stack */ - in_switch_statement--; - - - } -break; -case 141: -{ - if (n_switch_case_list < MAX_SWITCH_CASES) { - struct opvar *tmppush = New(struct opvar); - - set_opvar_int(tmppush, splev->n_opcodes); - switch_case_value[n_switch_case_list] = yyvsp[-1].i; - switch_case_list[n_switch_case_list++] = tmppush; - } else lc_error("Too many cases in a switch."); - } -break; -case 142: -{ - } -break; -case 143: -{ - struct opvar *tmppush = New(struct opvar); - - if (switch_default_case) - lc_error("Switch default case already used."); - - set_opvar_int(tmppush, splev->n_opcodes); - switch_default_case = tmppush; - } -break; -case 144: -{ - } -break; -case 145: -{ - if (!allow_break_statements) - lc_error("Cannot use BREAK outside a statement block."); - else { - break_stmt_new(splev, splev->n_opcodes); - } - } -break; -case 148: -{ - char buf[256], buf2[256]; - - if (n_forloops >= MAX_NESTED_IFS) { - lc_error("FOR: Too deeply nested loops."); - n_forloops = MAX_NESTED_IFS - 1; - } - - /* first, define a variable for the for-loop end value */ - Sprintf(buf, "%s end", yyvsp[-4].map); - /* the value of which is already in stack (the 2nd math_expr) */ - add_opvars(splev, "iso", VA_PASS3(0, buf, SPO_VAR_INIT)); - - vardefs = add_vardef_type(vardefs, yyvsp[-4].map, SPOVAR_INT); - /* define the for-loop variable. value is in stack (1st math_expr) */ - add_opvars(splev, "iso", VA_PASS3(0, yyvsp[-4].map, SPO_VAR_INIT)); - - /* calculate value for the loop "step" variable */ - Sprintf(buf2, "%s step", yyvsp[-4].map); - /* end - start */ - add_opvars(splev, "vvo", - VA_PASS3(buf, yyvsp[-4].map, SPO_MATH_SUB)); - /* sign of that */ - add_opvars(splev, "o", VA_PASS1(SPO_MATH_SIGN)); - /* save the sign into the step var */ - add_opvars(splev, "iso", - VA_PASS3(0, buf2, SPO_VAR_INIT)); - - forloop_list[n_forloops].varname = strdup(yyvsp[-4].map); - forloop_list[n_forloops].jmp_point = splev->n_opcodes; - - n_forloops++; - Free(yyvsp[-4].map); - } -break; -case 149: -{ - /* nothing */ - break_stmt_start(); - } -break; -case 150: -{ - int l; - char buf[256], buf2[256]; - - n_forloops--; - Sprintf(buf, "%s step", forloop_list[n_forloops].varname); - Sprintf(buf2, "%s end", forloop_list[n_forloops].varname); - /* compare for-loop var to end value */ - add_opvars(splev, "vvo", - VA_PASS3(forloop_list[n_forloops].varname, - buf2, SPO_CMP)); - /* var + step */ - add_opvars(splev, "vvo", - VA_PASS3(buf, forloop_list[n_forloops].varname, - SPO_MATH_ADD)); - /* for-loop var = (for-loop var + step) */ - add_opvars(splev, "iso", - VA_PASS3(0, forloop_list[n_forloops].varname, - SPO_VAR_INIT)); - /* jump back if compared values were not equal */ - l = (int) (forloop_list[n_forloops].jmp_point - - splev->n_opcodes - 1); - add_opvars(splev, "io", VA_PASS2(l, SPO_JNE)); - Free(forloop_list[n_forloops].varname); - break_stmt_end(splev); - } -break; -case 151: -{ - struct opvar *tmppush = New(struct opvar); - - if (n_if_list >= MAX_NESTED_IFS) { - lc_error("LOOP: Too deeply nested conditionals."); - n_if_list = MAX_NESTED_IFS - 1; - } - set_opvar_int(tmppush, splev->n_opcodes); - if_list[n_if_list++] = tmppush; - - add_opvars(splev, "o", VA_PASS1(SPO_DEC)); - break_stmt_start(); - } -break; -case 152: -{ - struct opvar *tmppush; - - add_opvars(splev, "oio", VA_PASS3(SPO_COPY, 0, SPO_CMP)); - - tmppush = (struct opvar *) if_list[--n_if_list]; - set_opvar_int(tmppush, - tmppush->vardata.l - splev->n_opcodes-1); - add_opcode(splev, SPO_PUSH, tmppush); - add_opcode(splev, SPO_JG, NULL); - add_opcode(splev, SPO_POP, NULL); /* discard count */ - break_stmt_end(splev); - } -break; -case 153: -{ - struct opvar *tmppush2 = New(struct opvar); - - if (n_if_list >= MAX_NESTED_IFS) { - lc_error("IF: Too deeply nested conditionals."); - n_if_list = MAX_NESTED_IFS - 1; - } - - add_opcode(splev, SPO_CMP, NULL); - - set_opvar_int(tmppush2, splev->n_opcodes+1); - - if_list[n_if_list++] = tmppush2; - - add_opcode(splev, SPO_PUSH, tmppush2); - - add_opcode(splev, reverse_jmp_opcode( yyvsp[-1].i ), NULL); - - } -break; -case 154: -{ - if (n_if_list > 0) { - struct opvar *tmppush; - - tmppush = (struct opvar *) if_list[--n_if_list]; - set_opvar_int(tmppush, - splev->n_opcodes - tmppush->vardata.l); - } else lc_error("IF: Huh?! No start address?"); - } -break; -case 155: -{ - struct opvar *tmppush2 = New(struct opvar); - - if (n_if_list >= MAX_NESTED_IFS) { - lc_error("IF: Too deeply nested conditionals."); - n_if_list = MAX_NESTED_IFS - 1; - } - - add_opcode(splev, SPO_CMP, NULL); - - set_opvar_int(tmppush2, splev->n_opcodes+1); - - if_list[n_if_list++] = tmppush2; - - add_opcode(splev, SPO_PUSH, tmppush2); - - add_opcode(splev, reverse_jmp_opcode( yyvsp[0].i ), NULL); - - } -break; -case 156: -{ - /* do nothing */ - } -break; -case 157: -{ - if (n_if_list > 0) { - struct opvar *tmppush; - - tmppush = (struct opvar *) if_list[--n_if_list]; - set_opvar_int(tmppush, - splev->n_opcodes - tmppush->vardata.l); - } else lc_error("IF: Huh?! No start address?"); - } -break; -case 158: -{ - if (n_if_list > 0) { - struct opvar *tmppush = New(struct opvar); - struct opvar *tmppush2; - - set_opvar_int(tmppush, splev->n_opcodes+1); - add_opcode(splev, SPO_PUSH, tmppush); - - add_opcode(splev, SPO_JMP, NULL); - - tmppush2 = (struct opvar *) if_list[--n_if_list]; - - set_opvar_int(tmppush2, - splev->n_opcodes - tmppush2->vardata.l); - if_list[n_if_list++] = tmppush; - } else lc_error("IF: Huh?! No else-part address?"); - } -break; -case 159: -{ - if (n_if_list > 0) { - struct opvar *tmppush; - tmppush = (struct opvar *) if_list[--n_if_list]; - set_opvar_int(tmppush, splev->n_opcodes - tmppush->vardata.l); - } else lc_error("IF: Huh?! No end address?"); - } -break; -case 160: -{ - add_opvars(splev, "o", VA_PASS1(SPO_MESSAGE)); - } -break; -case 161: -{ - add_opvars(splev, "iiiiiio", - VA_PASS7(-1, 0, -1, -1, -1, -1, SPO_CORRIDOR)); - } -break; -case 162: -{ - add_opvars(splev, "iiiiiio", - VA_PASS7(-1, yyvsp[0].i, -1, -1, -1, -1, SPO_CORRIDOR)); - } -break; -case 163: -{ - add_opvars(splev, "iiiiiio", - VA_PASS7(-1, -1, -1, -1, -1, -1, SPO_CORRIDOR)); - } -break; -case 164: -{ - add_opvars(splev, "iiiiiio", - VA_PASS7(yyvsp[-2].corpos.room, yyvsp[-2].corpos.door, yyvsp[-2].corpos.wall, - yyvsp[0].corpos.room, yyvsp[0].corpos.door, yyvsp[0].corpos.wall, - SPO_CORRIDOR)); - } -break; -case 165: -{ - add_opvars(splev, "iiiiiio", - VA_PASS7(yyvsp[-2].corpos.room, yyvsp[-2].corpos.door, yyvsp[-2].corpos.wall, - -1, -1, (long)yyvsp[0].i, - SPO_CORRIDOR)); - } -break; -case 166: -{ - yyval.corpos.room = yyvsp[-5].i; - yyval.corpos.wall = yyvsp[-3].i; - yyval.corpos.door = yyvsp[-1].i; - } -break; -case 167: -{ - if ((yyvsp[-2].i < 100) && (yyvsp[-3].i == OROOM)) - lc_error("Only typed rooms can have a chance."); - else { - add_opvars(splev, "iii", - VA_PASS3((long)yyvsp[-3].i, (long)yyvsp[-2].i, (long)yyvsp[0].i)); - } - } -break; -case 168: -{ - long rflags = yyvsp[0].i; - - if (rflags == -1) rflags = (1 << 0); - add_opvars(splev, "iiiiiiio", - VA_PASS8(rflags, ERR, ERR, - yyvsp[-3].crd.x, yyvsp[-3].crd.y, yyvsp[-1].sze.width, yyvsp[-1].sze.height, - SPO_SUBROOM)); - break_stmt_start(); - } -break; -case 169: -{ - break_stmt_end(splev); - add_opcode(splev, SPO_ENDROOM, NULL); - } -break; -case 170: -{ - long rflags = yyvsp[-2].i; - - if (rflags == -1) rflags = (1 << 0); - add_opvars(splev, "iiiiiiio", - VA_PASS8(rflags, - yyvsp[-3].crd.x, yyvsp[-3].crd.y, yyvsp[-5].crd.x, yyvsp[-5].crd.y, - yyvsp[-1].sze.width, yyvsp[-1].sze.height, SPO_ROOM)); - break_stmt_start(); - } -break; -case 171: -{ - break_stmt_end(splev); - add_opcode(splev, SPO_ENDROOM, NULL); - } -break; -case 172: -{ - yyval.i = 1; - } -break; -case 173: -{ - yyval.i = yyvsp[0].i; - } -break; -case 174: -{ - if ( yyvsp[-3].i < 1 || yyvsp[-3].i > 5 || - yyvsp[-1].i < 1 || yyvsp[-1].i > 5 ) { - lc_error("Room positions should be between 1-5: (%li,%li)!", yyvsp[-3].i, yyvsp[-1].i); - } else { - yyval.crd.x = yyvsp[-3].i; - yyval.crd.y = yyvsp[-1].i; - } - } -break; -case 175: -{ - yyval.crd.x = yyval.crd.y = ERR; - } -break; -case 176: -{ - if ( yyvsp[-3].i < 0 || yyvsp[-1].i < 0) { - lc_error("Invalid subroom position (%li,%li)!", yyvsp[-3].i, yyvsp[-1].i); - } else { - yyval.crd.x = yyvsp[-3].i; - yyval.crd.y = yyvsp[-1].i; - } - } -break; -case 177: -{ - yyval.crd.x = yyval.crd.y = ERR; - } -break; -case 178: -{ - yyval.crd.x = yyvsp[-3].i; - yyval.crd.y = yyvsp[-1].i; - } -break; -case 179: -{ - yyval.crd.x = yyval.crd.y = ERR; - } -break; -case 180: -{ - yyval.sze.width = yyvsp[-3].i; - yyval.sze.height = yyvsp[-1].i; - } -break; -case 181: -{ - yyval.sze.height = yyval.sze.width = ERR; - } -break; -case 182: -{ - /* ERR means random here */ - if (yyvsp[-2].i == ERR && yyvsp[0].i != ERR) { - lc_error("If the door wall is random, so must be its pos!"); - } else { - add_opvars(splev, "iiiio", - VA_PASS5((long)yyvsp[0].i, (long)yyvsp[-4].i, (long)yyvsp[-6].i, - (long)yyvsp[-2].i, SPO_ROOM_DOOR)); - } - } -break; -case 183: -{ - add_opvars(splev, "io", VA_PASS2((long)yyvsp[-2].i, SPO_DOOR)); - } -break; -case 188: -{ - yyval.i = yyvsp[0].i; - } -break; -case 189: -{ - yyval.i = (yyvsp[-2].i | yyvsp[0].i); - } -break; -case 192: -{ - add_opvars(splev, "ciisiio", - VA_PASS7(0, 0, 1, (char *) 0, 0, 0, SPO_MAP)); - max_x_map = COLNO-1; - max_y_map = ROWNO; - } -break; -case 193: -{ - add_opvars(splev, "cii", - VA_PASS3(SP_COORD_PACK((yyvsp[-4].i), (yyvsp[-2].i)), - 1, (int) yyvsp[-1].i)); - scan_map(yyvsp[0].map, splev); - Free(yyvsp[0].map); - } -break; -case 194: -{ - add_opvars(splev, "ii", VA_PASS2(2, (int) yyvsp[-1].i)); - scan_map(yyvsp[0].map, splev); - Free(yyvsp[0].map); - } -break; -case 199: -{ - add_opvars(splev, "io", VA_PASS2(0, SPO_MONSTER)); - } -break; -case 200: -{ - add_opvars(splev, "io", VA_PASS2(1, SPO_MONSTER)); - in_container_obj++; - break_stmt_start(); - } -break; -case 201: -{ - break_stmt_end(splev); - in_container_obj--; - add_opvars(splev, "o", VA_PASS1(SPO_END_MONINVENT)); - } -break; -case 202: -{ - /* nothing */ - } -break; -case 203: -{ - struct opvar *stopit = New(struct opvar); - - set_opvar_int(stopit, SP_M_V_END); - add_opcode(splev, SPO_PUSH, stopit); - yyval.i = 0x0000; - } -break; -case 204: -{ - if (( yyvsp[-2].i & yyvsp[0].i )) - lc_error("MONSTER extra info defined twice."); - yyval.i = ( yyvsp[-2].i | yyvsp[0].i ); - } -break; -case 205: -{ - add_opvars(splev, "i", VA_PASS1(SP_M_V_NAME)); - yyval.i = 0x0001; - } -break; -case 206: -{ - add_opvars(splev, "ii", - VA_PASS2((int) yyvsp[0].i, SP_M_V_PEACEFUL)); - yyval.i = 0x0002; - } -break; -case 207: -{ - add_opvars(splev, "ii", - VA_PASS2((int) yyvsp[0].i, SP_M_V_ASLEEP)); - yyval.i = 0x0004; - } -break; -case 208: -{ - add_opvars(splev, "ii", - VA_PASS2((int) yyvsp[0].i, SP_M_V_ALIGN)); - yyval.i = 0x0008; - } -break; -case 209: -{ - add_opvars(splev, "ii", - VA_PASS2((int) yyvsp[-1].i, SP_M_V_APPEAR)); - yyval.i = 0x0010; - } -break; -case 210: -{ - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_FEMALE)); - yyval.i = 0x0020; - } -break; -case 211: -{ - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_INVIS)); - yyval.i = 0x0040; - } -break; -case 212: -{ - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_CANCELLED)); - yyval.i = 0x0080; - } -break; -case 213: -{ - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_REVIVED)); - yyval.i = 0x0100; - } -break; -case 214: -{ - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_AVENGE)); - yyval.i = 0x0200; - } -break; -case 215: -{ - add_opvars(splev, "i", VA_PASS1(SP_M_V_FLEEING)); - yyval.i = 0x0400; - } -break; -case 216: -{ - add_opvars(splev, "i", VA_PASS1(SP_M_V_BLINDED)); - yyval.i = 0x0800; - } -break; -case 217: -{ - add_opvars(splev, "i", VA_PASS1(SP_M_V_PARALYZED)); - yyval.i = 0x1000; - } -break; -case 218: -{ - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_STUNNED)); - yyval.i = 0x2000; - } -break; -case 219: -{ - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_CONFUSED)); - yyval.i = 0x4000; - } -break; -case 220: -{ - add_opvars(splev, "ii", - VA_PASS2((int) yyvsp[0].i, SP_M_V_SEENTRAPS)); - yyval.i = 0x8000; - } -break; -case 221: -{ - int token = get_trap_type(yyvsp[0].map); - - if (token == ERR || token == 0) - lc_error("Unknown trap type '%s'!", yyvsp[0].map); - Free(yyvsp[0].map); - yyval.i = (1L << (token - 1)); - } -break; -case 222: -{ - yyval.i = (long) ~0; - } -break; -case 223: -{ - int token = get_trap_type(yyvsp[-2].map); - if (token == ERR || token == 0) - lc_error("Unknown trap type '%s'!", yyvsp[-2].map); - - if ((1L << (token - 1)) & yyvsp[0].i) - lc_error("Monster seen_traps, trap '%s' listed twice.", yyvsp[-2].map); - Free(yyvsp[-2].map); - yyval.i = ((1L << (token - 1)) | yyvsp[0].i); - } -break; -case 224: -{ - int cnt = 0; - - if (in_container_obj) - cnt |= SP_OBJ_CONTENT; - add_opvars(splev, "io", VA_PASS2(cnt, SPO_OBJECT)); - } -break; -case 225: -{ - int cnt = SP_OBJ_CONTAINER; - - if (in_container_obj) - cnt |= SP_OBJ_CONTENT; - add_opvars(splev, "io", VA_PASS2(cnt, SPO_OBJECT)); - in_container_obj++; - break_stmt_start(); - } -break; -case 226: -{ - break_stmt_end(splev); - in_container_obj--; - add_opcode(splev, SPO_POP_CONTAINER, NULL); - } -break; -case 227: -{ - if (( yyvsp[0].i & 0x4000) && in_container_obj) - lc_error("Object cannot have a coord when contained."); - else if (!( yyvsp[0].i & 0x4000) && !in_container_obj) - lc_error("Object needs a coord when not contained."); - } -break; -case 228: -{ - struct opvar *stopit = New(struct opvar); - set_opvar_int(stopit, SP_O_V_END); - add_opcode(splev, SPO_PUSH, stopit); - yyval.i = 0x00; - } -break; -case 229: -{ - if (( yyvsp[-2].i & yyvsp[0].i )) - lc_error("OBJECT extra info '%s' defined twice.", curr_token); - yyval.i = ( yyvsp[-2].i | yyvsp[0].i ); - } -break; -case 230: -{ - add_opvars(splev, "ii", - VA_PASS2((int) yyvsp[0].i, SP_O_V_CURSE)); - yyval.i = 0x0001; - } -break; -case 231: -{ - add_opvars(splev, "i", VA_PASS1(SP_O_V_CORPSENM)); - yyval.i = 0x0002; - } -break; -case 232: -{ - add_opvars(splev, "i", VA_PASS1(SP_O_V_SPE)); - yyval.i = 0x0004; - } -break; -case 233: -{ - add_opvars(splev, "i", VA_PASS1(SP_O_V_NAME)); - yyval.i = 0x0008; - } -break; -case 234: -{ - add_opvars(splev, "i", VA_PASS1(SP_O_V_QUAN)); - yyval.i = 0x0010; - } -break; -case 235: -{ - add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_BURIED)); - yyval.i = 0x0020; - } -break; -case 236: -{ - add_opvars(splev, "ii", VA_PASS2((int) yyvsp[0].i, SP_O_V_LIT)); - yyval.i = 0x0040; - } -break; -case 237: -{ - add_opvars(splev, "i", VA_PASS1(SP_O_V_ERODED)); - yyval.i = 0x0080; - } -break; -case 238: -{ - add_opvars(splev, "ii", VA_PASS2(-1, SP_O_V_ERODED)); - yyval.i = 0x0080; - } -break; -case 239: -{ - if (yyvsp[0].i == D_LOCKED) { - add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_LOCKED)); - yyval.i = 0x0100; - } else if (yyvsp[0].i == D_BROKEN) { - add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_BROKEN)); - yyval.i = 0x0200; - } else - lc_error("DOOR state can only be locked or broken."); - } -break; -case 240: -{ - add_opvars(splev, "ii", - VA_PASS2((int) yyvsp[0].i, SP_O_V_TRAPPED)); - yyval.i = 0x0400; - } -break; -case 241: -{ - add_opvars(splev, "i", VA_PASS1(SP_O_V_RECHARGED)); - yyval.i = 0x0800; - } -break; -case 242: -{ - add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_INVIS)); - yyval.i = 0x1000; - } -break; -case 243: -{ - add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_GREASED)); - yyval.i = 0x2000; - } -break; -case 244: -{ - add_opvars(splev, "i", VA_PASS1(SP_O_V_COORD)); - yyval.i = 0x4000; - } -break; -case 245: -{ - add_opvars(splev, "io", VA_PASS2((int) yyvsp[-2].i, SPO_TRAP)); - } -break; -case 246: -{ - long dir, state = 0; - - /* convert dir from a DIRECTION to a DB_DIR */ - dir = yyvsp[-2].i; - switch (dir) { - case W_NORTH: dir = DB_NORTH; break; - case W_SOUTH: dir = DB_SOUTH; break; - case W_EAST: dir = DB_EAST; break; - case W_WEST: dir = DB_WEST; break; - default: - lc_error("Invalid drawbridge direction."); - break; - } - - if ( yyvsp[0].i == D_ISOPEN ) - state = 1; - else if ( yyvsp[0].i == D_CLOSED ) - state = 0; - else if ( yyvsp[0].i == -1 ) - state = -1; - else - lc_error("A drawbridge can only be open, closed or random!"); - add_opvars(splev, "iio", - VA_PASS3(state, dir, SPO_DRAWBRIDGE)); - } -break; -case 247: -{ - add_opvars(splev, "iiio", - VA_PASS4((int) yyvsp[0].i, 1, 0, SPO_MAZEWALK)); - } -break; -case 248: -{ - add_opvars(splev, "iiio", - VA_PASS4((int) yyvsp[-3].i, (int) yyvsp[-1].i, - (int) yyvsp[0].i, SPO_MAZEWALK)); - } -break; -case 249: -{ - add_opvars(splev, "rio", - VA_PASS3(SP_REGION_PACK(-1,-1,-1,-1), - 0, SPO_WALLIFY)); - } -break; -case 250: -{ - add_opvars(splev, "io", VA_PASS2(1, SPO_WALLIFY)); - } -break; -case 251: -{ - add_opvars(splev, "io", - VA_PASS2((int) yyvsp[0].i, SPO_LADDER)); - } -break; -case 252: -{ - add_opvars(splev, "io", - VA_PASS2((int) yyvsp[0].i, SPO_STAIR)); - } -break; -case 253: -{ - add_opvars(splev, "iiiii iiiii iiso", - VA_PASS14(yyvsp[-4].lregn.x1, yyvsp[-4].lregn.y1, yyvsp[-4].lregn.x2, yyvsp[-4].lregn.y2, yyvsp[-4].lregn.area, - yyvsp[-2].lregn.x1, yyvsp[-2].lregn.y1, yyvsp[-2].lregn.x2, yyvsp[-2].lregn.y2, yyvsp[-2].lregn.area, - (long) ((yyvsp[0].i) ? LR_UPSTAIR : LR_DOWNSTAIR), - 0, (char *) 0, SPO_LEVREGION)); - } -break; -case 254: -{ - add_opvars(splev, "iiiii iiiii iiso", - VA_PASS14(yyvsp[-4].lregn.x1, yyvsp[-4].lregn.y1, yyvsp[-4].lregn.x2, yyvsp[-4].lregn.y2, yyvsp[-4].lregn.area, - yyvsp[-2].lregn.x1, yyvsp[-2].lregn.y1, yyvsp[-2].lregn.x2, yyvsp[-2].lregn.y2, yyvsp[-2].lregn.area, - LR_PORTAL, 0, yyvsp[0].map, SPO_LEVREGION)); - Free(yyvsp[0].map); - } -break; -case 255: -{ - long rtyp = 0; - switch(yyvsp[0].i) { - case -1: rtyp = LR_TELE; break; - case 0: rtyp = LR_DOWNTELE; break; - case 1: rtyp = LR_UPTELE; break; - } - add_opvars(splev, "iiiii iiiii iiso", - VA_PASS14(yyvsp[-3].lregn.x1, yyvsp[-3].lregn.y1, yyvsp[-3].lregn.x2, yyvsp[-3].lregn.y2, yyvsp[-3].lregn.area, - yyvsp[-1].lregn.x1, yyvsp[-1].lregn.y1, yyvsp[-1].lregn.x2, yyvsp[-1].lregn.y2, yyvsp[-1].lregn.area, - rtyp, 0, (char *)0, SPO_LEVREGION)); - } -break; -case 256: -{ - add_opvars(splev, "iiiii iiiii iiso", - VA_PASS14(yyvsp[-2].lregn.x1, yyvsp[-2].lregn.y1, yyvsp[-2].lregn.x2, yyvsp[-2].lregn.y2, yyvsp[-2].lregn.area, - yyvsp[0].lregn.x1, yyvsp[0].lregn.y1, yyvsp[0].lregn.x2, yyvsp[0].lregn.y2, yyvsp[0].lregn.area, - (long) LR_BRANCH, 0, - (char *) 0, SPO_LEVREGION)); - } -break; -case 257: -{ - yyval.i = -1; - } -break; -case 258: -{ - yyval.i = yyvsp[0].i; - } -break; -case 259: -{ - add_opvars(splev, "o", VA_PASS1(SPO_FOUNTAIN)); - } -break; -case 260: -{ - add_opvars(splev, "o", VA_PASS1(SPO_SINK)); - } -break; -case 261: -{ - add_opvars(splev, "o", VA_PASS1(SPO_POOL)); - } -break; -case 262: -{ - yyval.terr.lit = -2; - yyval.terr.ter = what_map_char((char) yyvsp[0].i); - } -break; -case 263: -{ - yyval.terr.lit = yyvsp[-1].i; - yyval.terr.ter = what_map_char((char) yyvsp[-3].i); - } -break; -case 264: -{ - add_opvars(splev, "io", - VA_PASS2(yyvsp[0].i, SPO_REPLACETERRAIN)); - } -break; -case 265: -{ - add_opvars(splev, "o", VA_PASS1(SPO_TERRAIN)); - } -break; -case 266: -{ - add_opvars(splev, "o", VA_PASS1(SPO_NON_DIGGABLE)); - } -break; -case 267: -{ - add_opvars(splev, "o", VA_PASS1(SPO_NON_PASSWALL)); - } -break; -case 268: -{ - long irr; - long rt = yyvsp[-1].i; - long rflags = yyvsp[0].i; - - if (rflags == -1) rflags = (1 << 0); - if (!(rflags & 1)) rt += MAXRTYPE+1; - irr = ((rflags & 2) != 0); - add_opvars(splev, "iiio", - VA_PASS4((long)yyvsp[-3].i, rt, rflags, SPO_REGION)); - yyval.i = (irr || (rflags & 1) || rt != OROOM); - break_stmt_start(); - } -break; -case 269: -{ - break_stmt_end(splev); - if ( yyvsp[-1].i ) { - add_opcode(splev, SPO_ENDROOM, NULL); - } else if ( yyvsp[0].i ) - lc_error("Cannot use lev statements in non-permanent REGION"); - } -break; -case 270: -{ - yyval.i = 0; - } -break; -case 271: -{ - yyval.i = yyvsp[0].i; - } -break; -case 272: -{ - add_opvars(splev, "iio", - VA_PASS3((long)yyvsp[0].i, (long)yyvsp[-2].i, SPO_ALTAR)); - } -break; -case 273: -{ - add_opvars(splev, "io", VA_PASS2(2, SPO_GRAVE)); - } -break; -case 274: -{ - add_opvars(splev, "sio", - VA_PASS3((char *)0, 1, SPO_GRAVE)); - } -break; -case 275: -{ - add_opvars(splev, "sio", - VA_PASS3((char *)0, 0, SPO_GRAVE)); - } -break; -case 276: -{ - add_opvars(splev, "o", VA_PASS1(SPO_GOLD)); - } -break; -case 277: -{ - add_opvars(splev, "io", - VA_PASS2((long)yyvsp[-2].i, SPO_ENGRAVING)); - } -break; -case 278: -{ - add_opvars(splev, "o", VA_PASS1(SPO_MINERALIZE)); - } -break; -case 279: -{ - add_opvars(splev, "iiiio", - VA_PASS5(-1L, -1L, -1L, -1L, SPO_MINERALIZE)); - } -break; -case 280: -{ - int token = get_trap_type(yyvsp[0].map); - if (token == ERR) - lc_error("Unknown trap type '%s'!", yyvsp[0].map); - yyval.i = token; - Free(yyvsp[0].map); - } -break; -case 282: -{ - int token = get_room_type(yyvsp[0].map); - if (token == ERR) { - lc_warning("Unknown room type \"%s\"! Making ordinary room...", yyvsp[0].map); - yyval.i = OROOM; - } else - yyval.i = token; - Free(yyvsp[0].map); - } -break; -case 284: -{ - yyval.i = -1; - } -break; -case 285: -{ - yyval.i = yyvsp[0].i; - } -break; -case 286: -{ - yyval.i = yyvsp[0].i; - } -break; -case 287: -{ - yyval.i = yyvsp[-2].i | yyvsp[0].i; - } -break; -case 288: -{ - yyval.i = (yyvsp[0].i << 0); - } -break; -case 289: -{ - yyval.i = (yyvsp[0].i << 1); - } -break; -case 290: -{ - yyval.i = (yyvsp[0].i << 2); - } -break; -case 297: -{ - yyval.i = - MAX_REGISTERS - 1; - } -break; -case 300: -{ - yyval.i = - MAX_REGISTERS - 1; - } -break; -case 303: -{ - if ( yyvsp[-1].i >= 3 ) - lc_error("Register Index overflow!"); - else - yyval.i = - yyvsp[-1].i - 1; - } -break; -case 304: -{ - add_opvars(splev, "s", VA_PASS1(yyvsp[0].map)); - Free(yyvsp[0].map); - } -break; -case 305: -{ - check_vardef_type(vardefs, yyvsp[0].map, SPOVAR_STRING); - vardef_used(vardefs, yyvsp[0].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[0].map)); - Free(yyvsp[0].map); - } -break; -case 306: -{ - check_vardef_type(vardefs, yyvsp[-3].map, - SPOVAR_STRING | SPOVAR_ARRAY); - vardef_used(vardefs, yyvsp[-3].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[-3].map)); - Free(yyvsp[-3].map); - } -break; -case 307: -{ - /* nothing */ - } -break; -case 308: -{ - add_opvars(splev, "c", VA_PASS1(yyvsp[0].i)); - } -break; -case 309: -{ - add_opvars(splev, "o", VA_PASS1(SPO_SEL_RNDCOORD)); - } -break; -case 310: -{ - check_vardef_type(vardefs, yyvsp[0].map, SPOVAR_COORD); - vardef_used(vardefs, yyvsp[0].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[0].map)); - Free(yyvsp[0].map); - } -break; -case 311: -{ - check_vardef_type(vardefs, yyvsp[-3].map, - SPOVAR_COORD | SPOVAR_ARRAY); - vardef_used(vardefs, yyvsp[-3].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[-3].map)); - Free(yyvsp[-3].map); - } -break; -case 312: -{ - if (yyvsp[-3].i < 0 || yyvsp[-1].i < 0 || yyvsp[-3].i >= COLNO || yyvsp[-1].i >= ROWNO) - lc_error("Coordinates (%li,%li) out of map range!", - yyvsp[-3].i, yyvsp[-1].i); - yyval.i = SP_COORD_PACK(yyvsp[-3].i, yyvsp[-1].i); - } -break; -case 313: -{ - yyval.i = SP_COORD_PACK_RANDOM(0); - } -break; -case 314: -{ - yyval.i = SP_COORD_PACK_RANDOM(yyvsp[-1].i); - } -break; -case 315: -{ - yyval.i = yyvsp[0].i; - } -break; -case 316: -{ - if ((yyvsp[-2].i & yyvsp[0].i)) - lc_warning("Humidity flag used twice."); - yyval.i = (yyvsp[-2].i | yyvsp[0].i); - } -break; -case 317: -{ - /* nothing */ - } -break; -case 318: -{ - check_vardef_type(vardefs, yyvsp[0].map, SPOVAR_REGION); - vardef_used(vardefs, yyvsp[0].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[0].map)); - Free(yyvsp[0].map); - } -break; -case 319: -{ - check_vardef_type(vardefs, yyvsp[-3].map, - SPOVAR_REGION | SPOVAR_ARRAY); - vardef_used(vardefs, yyvsp[-3].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[-3].map)); - Free(yyvsp[-3].map); - } -break; -case 320: -{ - long r = SP_REGION_PACK(yyvsp[-7].i, yyvsp[-5].i, yyvsp[-3].i, yyvsp[-1].i); - - if (yyvsp[-7].i > yyvsp[-3].i || yyvsp[-5].i > yyvsp[-1].i) - lc_error("Region start > end: (%ld,%ld,%ld,%ld)!", - yyvsp[-7].i, yyvsp[-5].i, yyvsp[-3].i, yyvsp[-1].i); - - add_opvars(splev, "r", VA_PASS1(r)); - yyval.i = r; - } -break; -case 321: -{ - add_opvars(splev, "m", VA_PASS1(yyvsp[0].i)); - } -break; -case 322: -{ - check_vardef_type(vardefs, yyvsp[0].map, SPOVAR_MAPCHAR); - vardef_used(vardefs, yyvsp[0].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[0].map)); - Free(yyvsp[0].map); - } -break; -case 323: -{ - check_vardef_type(vardefs, yyvsp[-3].map, - SPOVAR_MAPCHAR | SPOVAR_ARRAY); - vardef_used(vardefs, yyvsp[-3].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[-3].map)); - Free(yyvsp[-3].map); - } -break; -case 324: -{ - if (what_map_char((char) yyvsp[0].i) != INVALID_TYPE) - yyval.i = SP_MAPCHAR_PACK(what_map_char((char) yyvsp[0].i), -2); - else { - lc_error("Unknown map char type '%c'!", yyvsp[0].i); - yyval.i = SP_MAPCHAR_PACK(STONE, -2); - } - } -break; -case 325: -{ - if (what_map_char((char) yyvsp[-3].i) != INVALID_TYPE) - yyval.i = SP_MAPCHAR_PACK(what_map_char((char) yyvsp[-3].i), yyvsp[-1].i); - else { - lc_error("Unknown map char type '%c'!", yyvsp[-3].i); - yyval.i = SP_MAPCHAR_PACK(STONE, yyvsp[-1].i); - } - } -break; -case 326: -{ - add_opvars(splev, "M", VA_PASS1(yyvsp[0].i)); - } -break; -case 327: -{ - check_vardef_type(vardefs, yyvsp[0].map, SPOVAR_MONST); - vardef_used(vardefs, yyvsp[0].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[0].map)); - Free(yyvsp[0].map); - } -break; -case 328: -{ - check_vardef_type(vardefs, yyvsp[-3].map, - SPOVAR_MONST | SPOVAR_ARRAY); - vardef_used(vardefs, yyvsp[-3].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[-3].map)); - Free(yyvsp[-3].map); - } -break; -case 329: -{ - long m = get_monster_id(yyvsp[0].map, (char)0); - if (m == ERR) { - lc_error("Unknown monster \"%s\"!", yyvsp[0].map); - yyval.i = -1; - } else - yyval.i = SP_MONST_PACK(m, - def_monsyms[(int) mons[m].mlet].sym); - Free(yyvsp[0].map); - } -break; -case 330: -{ - if (check_monster_char((char) yyvsp[0].i)) - yyval.i = SP_MONST_PACK(-1, yyvsp[0].i); - else { - lc_error("Unknown monster class '%c'!", yyvsp[0].i); - yyval.i = -1; - } - } -break; -case 331: -{ - long m = get_monster_id(yyvsp[-1].map, (char) yyvsp[-3].i); - if (m == ERR) { - lc_error("Unknown monster ('%c', \"%s\")!", yyvsp[-3].i, yyvsp[-1].map); - yyval.i = -1; - } else - yyval.i = SP_MONST_PACK(m, yyvsp[-3].i); - Free(yyvsp[-1].map); - } -break; -case 332: -{ - yyval.i = -1; - } -break; -case 333: -{ - add_opvars(splev, "O", VA_PASS1(yyvsp[0].i)); - } -break; -case 334: -{ - check_vardef_type(vardefs, yyvsp[0].map, SPOVAR_OBJ); - vardef_used(vardefs, yyvsp[0].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[0].map)); - Free(yyvsp[0].map); - } -break; -case 335: -{ - check_vardef_type(vardefs, yyvsp[-3].map, - SPOVAR_OBJ | SPOVAR_ARRAY); - vardef_used(vardefs, yyvsp[-3].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[-3].map)); - Free(yyvsp[-3].map); - } -break; -case 336: -{ - long m = get_object_id(yyvsp[0].map, (char)0); - if (m == ERR) { - lc_error("Unknown object \"%s\"!", yyvsp[0].map); - yyval.i = -1; - } else - /* obj class != 0 to force generation of a specific item */ - yyval.i = SP_OBJ_PACK(m, 1); - Free(yyvsp[0].map); - } -break; -case 337: -{ - if (check_object_char((char) yyvsp[0].i)) - yyval.i = SP_OBJ_PACK(-1, yyvsp[0].i); - else { - lc_error("Unknown object class '%c'!", yyvsp[0].i); - yyval.i = -1; - } - } -break; -case 338: -{ - long m = get_object_id(yyvsp[-1].map, (char) yyvsp[-3].i); - if (m == ERR) { - lc_error("Unknown object ('%c', \"%s\")!", yyvsp[-3].i, yyvsp[-1].map); - yyval.i = -1; - } else - yyval.i = SP_OBJ_PACK(m, yyvsp[-3].i); - Free(yyvsp[-1].map); - } -break; -case 339: -{ - yyval.i = -1; - } -break; -case 340: -{ } -break; -case 341: -{ - add_opvars(splev, "o", VA_PASS1(SPO_MATH_ADD)); - } -break; -case 342: -{ - add_opvars(splev, "i", VA_PASS1(yyvsp[0].i)); - } -break; -case 343: -{ - is_inconstant_number = 1; - } -break; -case 344: -{ - add_opvars(splev, "i", VA_PASS1(yyvsp[-1].i)); - } -break; -case 345: -{ - check_vardef_type(vardefs, yyvsp[0].map, SPOVAR_INT); - vardef_used(vardefs, yyvsp[0].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[0].map)); - Free(yyvsp[0].map); - is_inconstant_number = 1; - } -break; -case 346: -{ - check_vardef_type(vardefs, yyvsp[-3].map, - SPOVAR_INT | SPOVAR_ARRAY); - vardef_used(vardefs, yyvsp[-3].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[-3].map)); - Free(yyvsp[-3].map); - is_inconstant_number = 1; - } -break; -case 347: -{ - add_opvars(splev, "o", VA_PASS1(SPO_MATH_ADD)); - } -break; -case 348: -{ - add_opvars(splev, "o", VA_PASS1(SPO_MATH_SUB)); - } -break; -case 349: -{ - add_opvars(splev, "o", VA_PASS1(SPO_MATH_MUL)); - } -break; -case 350: -{ - add_opvars(splev, "o", VA_PASS1(SPO_MATH_DIV)); - } -break; -case 351: -{ - add_opvars(splev, "o", VA_PASS1(SPO_MATH_MOD)); - } -break; -case 352: -{ } -break; -case 353: -{ - if (!strcmp("int", yyvsp[0].map) || !strcmp("integer", yyvsp[0].map)) { - yyval.i = (int)'i'; - } else - lc_error("Unknown function parameter type '%s'", yyvsp[0].map); - } -break; -case 354: -{ - if (!strcmp("str", yyvsp[0].map) || !strcmp("string", yyvsp[0].map)) { - yyval.i = (int)'s'; - } else - lc_error("Unknown function parameter type '%s'", yyvsp[0].map); - } -break; -case 355: -{ - struct lc_funcdefs_parm *tmp = New(struct lc_funcdefs_parm); - - if (!curr_function) { - lc_error("Function parameters outside function definition."); - } else if (!tmp) { - lc_error("Could not alloc function params."); - } else { - long vt = SPOVAR_NULL; - - tmp->name = strdup(yyvsp[-2].map); - tmp->parmtype = (char) yyvsp[0].i; - tmp->next = curr_function->params; - curr_function->params = tmp; - curr_function->n_params++; - switch (tmp->parmtype) { - case 'i': - vt = SPOVAR_INT; - break; - case 's': - vt = SPOVAR_STRING; - break; - default: - lc_error("Unknown func param conversion."); - break; - } - vardefs = add_vardef_type( vardefs, yyvsp[-2].map, vt); - } - Free(yyvsp[-2].map); - } -break; -case 360: -{ - yyval.i = (int)'i'; - } -break; -case 361: -{ - yyval.i = (int)'s'; - } -break; -case 362: -{ - char tmpbuf[2]; - tmpbuf[0] = (char) yyvsp[0].i; - tmpbuf[1] = '\0'; - yyval.map = strdup(tmpbuf); - } -break; -case 363: -{ - long len = strlen( yyvsp[-2].map ); - char *tmp = (char *) alloc(len + 2); - sprintf(tmp, "%c%s", (char) yyvsp[0].i, yyvsp[-2].map ); - Free( yyvsp[-2].map ); - yyval.map = tmp; - } -break; -case 364: -{ - yyval.map = strdup(""); - } -break; -case 365: -{ - char *tmp = strdup( yyvsp[0].map ); - Free( yyvsp[0].map ); - yyval.map = tmp; - } -break; -case 366: -{ - add_opvars(splev, "o", VA_PASS1(SPO_SEL_POINT)); - } -break; -case 367: -{ - add_opvars(splev, "o", VA_PASS1(SPO_SEL_RECT)); - } -break; -case 368: -{ - add_opvars(splev, "o", VA_PASS1(SPO_SEL_FILLRECT)); - } -break; -case 369: -{ - add_opvars(splev, "o", VA_PASS1(SPO_SEL_LINE)); - } -break; -case 370: -{ - /* randline (x1,y1),(x2,y2), roughness */ - add_opvars(splev, "o", VA_PASS1(SPO_SEL_RNDLINE)); - } -break; -case 371: -{ - add_opvars(splev, "io", VA_PASS2(W_ANY, SPO_SEL_GROW)); - } -break; -case 372: -{ - add_opvars(splev, "io", VA_PASS2(yyvsp[-3].i, SPO_SEL_GROW)); - } -break; -case 373: -{ - add_opvars(splev, "iio", - VA_PASS3(yyvsp[-3].i, SPOFILTER_PERCENT, SPO_SEL_FILTER)); - } -break; -case 374: -{ - add_opvars(splev, "io", - VA_PASS2(SPOFILTER_SELECTION, SPO_SEL_FILTER)); - } -break; -case 375: -{ - add_opvars(splev, "io", - VA_PASS2(SPOFILTER_MAPCHAR, SPO_SEL_FILTER)); - } -break; -case 376: -{ - add_opvars(splev, "o", VA_PASS1(SPO_SEL_FLOOD)); - } -break; -case 377: -{ - add_opvars(splev, "oio", - VA_PASS3(SPO_COPY, 1, SPO_SEL_ELLIPSE)); - } -break; -case 378: -{ - add_opvars(splev, "oio", - VA_PASS3(SPO_COPY, yyvsp[-1].i, SPO_SEL_ELLIPSE)); - } -break; -case 379: -{ - add_opvars(splev, "io", VA_PASS2(1, SPO_SEL_ELLIPSE)); - } -break; -case 380: -{ - add_opvars(splev, "io", VA_PASS2(yyvsp[-1].i, SPO_SEL_ELLIPSE)); - } -break; -case 381: -{ - add_opvars(splev, "iio", - VA_PASS3(yyvsp[-5].i, yyvsp[-11].i, SPO_SEL_GRADIENT)); - } -break; -case 382: -{ - add_opvars(splev, "o", VA_PASS1(SPO_SEL_COMPLEMENT)); - } -break; -case 383: -{ - check_vardef_type(vardefs, yyvsp[0].map, SPOVAR_SEL); - vardef_used(vardefs, yyvsp[0].map); - add_opvars(splev, "v", VA_PASS1(yyvsp[0].map)); - Free(yyvsp[0].map); - } -break; -case 384: -{ - /* nothing */ - } -break; -case 385: -{ - /* nothing */ - } -break; -case 386: -{ - add_opvars(splev, "o", VA_PASS1(SPO_SEL_ADD)); - } -break; -case 387: -{ - add_opvars(splev, "iio", - VA_PASS3(yyvsp[0].dice.num, yyvsp[0].dice.die, SPO_DICE)); - } -break; -case 391: -{ - add_opvars(splev, "i", VA_PASS1(yyvsp[0].i)); - } -break; -case 392: -{ - add_opvars(splev, "i", VA_PASS1(yyvsp[0].i)); - } -break; -case 393: -{ - add_opvars(splev, "i", VA_PASS1(yyvsp[0].i)); - } -break; -case 394: -{ - /* nothing */ - } -break; -case 403: -{ - yyval.lregn = yyvsp[0].lregn; - } -break; -case 404: -{ - if (yyvsp[-7].i <= 0 || yyvsp[-7].i >= COLNO) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of level range (x1)!", - yyvsp[-7].i, yyvsp[-5].i, yyvsp[-3].i, yyvsp[-1].i); - else if (yyvsp[-5].i < 0 || yyvsp[-5].i >= ROWNO) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of level range (y1)!", - yyvsp[-7].i, yyvsp[-5].i, yyvsp[-3].i, yyvsp[-1].i); - else if (yyvsp[-3].i <= 0 || yyvsp[-3].i >= COLNO) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of level range (x2)!", - yyvsp[-7].i, yyvsp[-5].i, yyvsp[-3].i, yyvsp[-1].i); - else if (yyvsp[-1].i < 0 || yyvsp[-1].i >= ROWNO) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of level range (y2)!", - yyvsp[-7].i, yyvsp[-5].i, yyvsp[-3].i, yyvsp[-1].i); - yyval.lregn.x1 = yyvsp[-7].i; - yyval.lregn.y1 = yyvsp[-5].i; - yyval.lregn.x2 = yyvsp[-3].i; - yyval.lregn.y2 = yyvsp[-1].i; - yyval.lregn.area = 1; - } -break; -case 405: -{ -/* This series of if statements is a hack for MSC 5.1. It seems that its - tiny little brain cannot compile if these are all one big if statement. */ - if (yyvsp[-7].i < 0 || yyvsp[-7].i > (int) max_x_map) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of map range (x1)!", - yyvsp[-7].i, yyvsp[-5].i, yyvsp[-3].i, yyvsp[-1].i); - else if (yyvsp[-5].i < 0 || yyvsp[-5].i > (int) max_y_map) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of map range (y1)!", - yyvsp[-7].i, yyvsp[-5].i, yyvsp[-3].i, yyvsp[-1].i); - else if (yyvsp[-3].i < 0 || yyvsp[-3].i > (int) max_x_map) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of map range (x2)!", - yyvsp[-7].i, yyvsp[-5].i, yyvsp[-3].i, yyvsp[-1].i); - else if (yyvsp[-1].i < 0 || yyvsp[-1].i > (int) max_y_map) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of map range (y2)!", - yyvsp[-7].i, yyvsp[-5].i, yyvsp[-3].i, yyvsp[-1].i); - yyval.lregn.area = 0; - yyval.lregn.x1 = yyvsp[-7].i; - yyval.lregn.y1 = yyvsp[-5].i; - yyval.lregn.x2 = yyvsp[-3].i; - yyval.lregn.y2 = yyvsp[-1].i; - } -break; - } - yyssp -= yym; - yystate = *yyssp; - yyvsp -= yym; - yym = yylhs[yyn]; - if (yystate == 0 && yym == 0) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: after reduction, shifting from state 0 to\ - state %d\n", YYPREFIX, YYFINAL); -#endif - yystate = YYFINAL; - *++yyssp = YYFINAL; - *++yyvsp = yyval; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, reading %d (%s)\n", - YYPREFIX, YYFINAL, yychar, yys); - } -#endif - } - if (yychar == 0) goto yyaccept; - goto yyloop; - } - if ((yyn = yygindex[yym]) != 0 && (yyn += yystate) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yystate) - yystate = yytable[yyn]; - else - yystate = yydgoto[yym]; -#if YYDEBUG - if (yydebug) - printf("%sdebug: after reduction, shifting from state %d \ -to state %d\n", YYPREFIX, *yyssp, yystate); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate; - *++yyvsp = yyval; - goto yyloop; -yyoverflow: - yyerror("yacc stack overflow"); -yyabort: - return (1); -yyaccept: - return (0); -} diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index 6c59b8c00..872a1bfdb 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -185,17 +185,17 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ int fd; boolean have_syscf = FALSE; - (void) strncpy(hackdir, dir, PATHLEN - 1); - hackdir[PATHLEN - 1] = '\0'; + (void) strncpy(g.hackdir, dir, PATHLEN - 1); + g.hackdir[PATHLEN - 1] = '\0'; #ifdef NOCWD_ASSUMPTIONS { int prefcnt; - fqn_prefix[0] = (char *) alloc(strlen(hackdir) + 2); - Strcpy(fqn_prefix[0], hackdir); - append_slash(fqn_prefix[0]); + g.fqn_prefix[0] = (char *) alloc(strlen(g.hackdir) + 2); + Strcpy(g.fqn_prefix[0], g.hackdir); + append_slash(g.fqn_prefix[0]); for (prefcnt = 1; prefcnt < PREFIX_COUNT; prefcnt++) - fqn_prefix[prefcnt] = fqn_prefix[0]; + g.fqn_prefix[prefcnt] = g.fqn_prefix[0]; #if defined(MSDOS) /* sysconf should be searched for in this location */ @@ -204,11 +204,11 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ if ((sptr = index(envp, ';')) != 0) *sptr = '\0'; if (strlen(envp) > 0) { - fqn_prefix[SYSCONFPREFIX] = + g.fqn_prefix[SYSCONFPREFIX] = (char *) alloc(strlen(envp) + 10); - Strcpy(fqn_prefix[SYSCONFPREFIX], envp); - append_slash(fqn_prefix[SYSCONFPREFIX]); - Strcat(fqn_prefix[SYSCONFPREFIX], "NetHack\\"); + Strcpy(g.fqn_prefix[SYSCONFPREFIX], envp); + append_slash(g.fqn_prefix[SYSCONFPREFIX]); + Strcat(g.fqn_prefix[SYSCONFPREFIX], "NetHack\\"); } } @@ -229,7 +229,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ /* No SYSCF_FILE where there should be one, and without an installer, a user may not be able to place one there. So, let's try somewhere else... */ - fqn_prefix[SYSCONFPREFIX] = fqn_prefix[0]; + g.fqn_prefix[SYSCONFPREFIX] = g.fqn_prefix[0]; /* Is there a SYSCF_FILE there? */ fd = open(fqname(SYSCF_FILE, SYSCONFPREFIX, 0), O_RDONLY); @@ -247,10 +247,10 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ if ((sptr = index(envp, ';')) != 0) *sptr = '\0'; if (strlen(envp) > 0) { - fqn_prefix[CONFIGPREFIX] = + g.fqn_prefix[CONFIGPREFIX] = (char *) alloc(strlen(envp) + 2); - Strcpy(fqn_prefix[CONFIGPREFIX], envp); - append_slash(fqn_prefix[CONFIGPREFIX]); + Strcpy(g.fqn_prefix[CONFIGPREFIX], envp); + append_slash(g.fqn_prefix[CONFIGPREFIX]); } } #endif @@ -286,11 +286,11 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ if (iflags.BIOS && iflags.use_color) set_colors(); #endif - if (!hackdir[0]) + if (!g.hackdir[0]) #if !defined(LATTICE) && !defined(AMIGA) - Strcpy(hackdir, orgdir); + Strcpy(g.hackdir, orgdir); #else - Strcpy(hackdir, HACKDIR); + Strcpy(g.hackdir, HACKDIR); #endif if (argc > 1) { if (argcheck(argc, argv, ARG_VERSION) == 2) @@ -317,7 +317,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ } if (!*dir) error("Flag -d must be followed by a directory name."); - Strcpy(hackdir, dir); + Strcpy(g.hackdir, dir); } if (argc > 1) { /* @@ -326,7 +326,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ */ if (!strncmp(argv[1], "-s", 2)) { #if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS) - chdirx(hackdir, 0); + chdirx(g.hackdir, 0); #endif #ifdef SYSCF initoptions(); @@ -366,7 +366,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ * code parallel to other ports. */ #if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS) - chdirx(hackdir, 1); + chdirx(g.hackdir, 1); #endif #if defined(MSDOS) diff --git a/sys/unix/Makefile.dat b/sys/unix/Makefile.dat index 466a14f63..975978f92 100644 --- a/sys/unix/Makefile.dat +++ b/sys/unix/Makefile.dat @@ -19,9 +19,6 @@ all: $(VARDAT) spec_levs quest_levs dungeon ../util/dgn_comp: (cd ../util ; $(MAKE) dgn_comp) -../util/lev_comp: - (cd ../util ; $(MAKE) lev_comp) - ../util/tile2x11: (cd ../util ; $(MAKE) tile2x11) @@ -126,39 +123,10 @@ options: ../util/makedefs ../util/makedefs -v -spec_levs: ../util/lev_comp \ - bigroom.des castle.des endgame.des gehennom.des knox.des medusa.des \ - mines.des oracle.des sokoban.des tower.des yendor.des - ../util/lev_comp bigroom.des - ../util/lev_comp castle.des - ../util/lev_comp endgame.des - ../util/lev_comp gehennom.des - ../util/lev_comp knox.des - ../util/lev_comp medusa.des - ../util/lev_comp mines.des - ../util/lev_comp oracle.des - ../util/lev_comp sokoban.des - ../util/lev_comp tower.des - ../util/lev_comp yendor.des +spec_levs: touch spec_levs -quest_levs: ../util/lev_comp \ - Arch.des Barb.des Caveman.des Healer.des Knight.des Monk.des \ - Priest.des Ranger.des Rogue.des Samurai.des Tourist.des Valkyrie.des \ - Wizard.des - ../util/lev_comp Arch.des - ../util/lev_comp Barb.des - ../util/lev_comp Caveman.des - ../util/lev_comp Healer.des - ../util/lev_comp Knight.des - ../util/lev_comp Monk.des - ../util/lev_comp Priest.des - ../util/lev_comp Ranger.des - ../util/lev_comp Rogue.des - ../util/lev_comp Samurai.des - ../util/lev_comp Tourist.des - ../util/lev_comp Valkyrie.des - ../util/lev_comp Wizard.des +quest_levs: touch quest_levs dungeon: dungeon.def ../util/makedefs ../util/dgn_comp diff --git a/sys/unix/Makefile.doc b/sys/unix/Makefile.doc index 1d2f53532..a9683288a 100644 --- a/sys/unix/Makefile.doc +++ b/sys/unix/Makefile.doc @@ -67,14 +67,12 @@ MANEXT = 6 # manual installation for most BSD-style systems GAMEMANCREATE = cat nethack.6 | $(NHGREP) > -LEVMANCREATE = cat lev_comp.6 | $(NHGREP) > DGNMANCREATE = cat dgn_comp.6 | $(NHGREP) > RCVRMANCREATE = cat recover.6 | $(NHGREP) > DLBMANCREATE = cat dlb.6 | $(NHGREP) > MDMANCREATE = cat makedefs.6 | $(NHGREP) > # manual installation for most SYSV-style systems # GAMEMANCREATE = cat nethack.6 | $(NHGREP) | nroff -man - > -# LEVMANCREATE = cat lev_comp.6 | $(NHGREP) | nroff -man - > # DGNMANCREATE = cat dgn_comp.6 | $(NHGREP) | nroff -man - > # RCVRMANCREATE = cat recover.6 | $(NHGREP) | nroff -man - > # DLBMANCREATE = cat dlb.6 | $(NHGREP) | nroff -man - > @@ -82,14 +80,13 @@ MDMANCREATE = cat makedefs.6 | $(NHGREP) > manpages: -$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT) - -$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT) -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT) -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT) -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT) -$(MDMANCREATE) $(MANDIR)/makedefs.$(MANEXT) # manual creation for distribution -DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt \ +DISTRIB = Guidebook.txt nethack.txt dgn_comp.txt recover.txt \ dlb.txt makedefs.txt distrib: $(DISTRIB) @@ -100,8 +97,6 @@ Guidebook.txt : Guidebook.mn tmac.n tmac.nh MAN2TXT = $(NHGREP) | nroff -man - | $(COLCMD) nethack.txt : nethack.6 cat nethack.6 | $(MAN2TXT) > nethack.txt -lev_comp.txt : lev_comp.6 - cat lev_comp.6 | $(MAN2TXT) > lev_comp.txt dgn_comp.txt : dgn_comp.6 cat dgn_comp.6 | $(MAN2TXT) > dgn_comp.txt recover.txt : recover.6 diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 0162bdaf0..095a3e931 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -49,7 +49,7 @@ SHELL=/bin/sh # for UNIX systems SYSSRC = ../sys/share/ioctl.c ../sys/share/unixtty.c ../sys/unix/unixmain.c \ ../sys/unix/unixunix.c ../sys/unix/unixres.c -SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o unixres.o +SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o unixres.o liblua.a # # for Systos # SYSSRC = ../sys/atari/tos.c ../sys/share/pcmain.c ../sys/share/pcsys.c \ @@ -173,6 +173,10 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome #CFLAGS = -O -I../include #LFLAGS = +CFLAGS += -I../lib/lua-5.3.5/src +# -lm required by lua +LIBS += -lm + # The Qt and Be window systems are written in C++, while the rest of # NetHack is standard C. If using Qt, uncomment the LINK line here to get # the C++ libraries linked in. @@ -360,7 +364,7 @@ WINCURSESLIB = -lncurses # If ZLIB_COMP is defined in config.h this is necessary to link with zlib. # LIBS = -lz # -LIBS = +# LIBS = # make NetHack GAME = nethack @@ -443,7 +447,7 @@ HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c ball.c bones.c \ dungeon.c eat.c end.c engrave.c exper.c explode.c extralev.c \ files.c fountain.c hack.c hacklib.c invent.c isaac64.c light.c \ lock.c mail.c makemon.c mapglyph.c mcastu.c mhitm.c mhitu.c \ - minion.c mklev.c mkmap.c \ + minion.c mklev.c mkmap.c nhlua.c nhlsel.c \ mkmaze.c mkobj.c mkroom.c mon.c mondata.c monmove.c monst.c \ mplayer.c mthrowu.c muse.c music.c o_init.c objects.c objnam.c \ options.c pager.c pickup.c pline.c polyself.c potion.c pray.c \ @@ -487,7 +491,7 @@ CSOURCES = $(HACKCSRC) $(SYSCSRC) $(WINCSRC) $(CHAINSRC) $(GENCSRC) # all .h files except date.h, onames.h, pm.h, and vis_tab.h which would # cause dependency loops if run through "make depend" -# and dgn_comp.h, dgn_file.h, lev_comp.h, special level & dungeon files. +# and dgn_comp.h, dgn_file.h, special level & dungeon files. # HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h botl.h \ color.h config.h config1.h context.h coord.h decl.h def_os2.h \ @@ -501,7 +505,7 @@ HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h botl.h \ wincurs.h winX.h winprocs.h wintype.h you.h youprop.h HSOURCES = $(HACKINCL) date.h onames.h pm.h vis_tab.h \ - lev_comp.h dgn_comp.h dgn_file.h + dgn_comp.h dgn_file.h # the following .o's _must_ be made before any others (for makedefs) FIRSTOBJ = monst.o objects.o @@ -512,7 +516,7 @@ HOBJ = $(FIRSTOBJ) allmain.o alloc.o apply.o artifact.o attrib.o ball.o \ drawing.o dungeon.o eat.o end.o engrave.o exper.o explode.o \ extralev.o files.o fountain.o hack.o hacklib.o invent.o isaac64.o \ light.o lock.o mail.o makemon.o mapglyph.o mcastu.o mhitm.o mhitu.o \ - minion.o mklev.o mkmap.o \ + minion.o mklev.o mkmap.o nhlua.o nhlsel.o \ mkmaze.o mkobj.o mkroom.o mon.o mondata.o monmove.o \ mplayer.o mthrowu.o muse.o music.o o_init.o objnam.o options.o \ pager.o pickup.o pline.o polyself.o potion.o pray.o priest.o \ @@ -1061,6 +1065,8 @@ mplayer.o: mplayer.c $(HACK_H) mthrowu.o: mthrowu.c $(HACK_H) muse.o: muse.c $(HACK_H) music.o: music.c $(HACK_H) #interp.c +nhlua.o: nhlua.c $(HACK_H) +nhlsel.o: nhlsel.c $(HACK_H) o_init.o: o_init.c $(HACK_H) ../include/lev.h objects.o: objects.c $(CONFIG_H) ../include/obj.h ../include/objclass.h \ ../include/prop.h ../include/skills.h ../include/color.h diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 5aea4e8d6..6c0bb2a56 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -80,18 +80,19 @@ VARDAT = $(VARDATD) $(VARDATND) DATHELP = help hh cmdhelp keyhelp history opthelp wizhelp -SPEC_LEVS = asmodeus.lev baalz.lev bigrm-*.lev castle.lev fakewiz?.lev \ - juiblex.lev knox.lev medusa-?.lev minend-?.lev minefill.lev \ - minetn-?.lev oracle.lev orcus.lev sanctum.lev soko?-?.lev \ - tower?.lev valley.lev wizard?.lev \ - astral.lev air.lev earth.lev fire.lev water.lev -QUEST_LEVS = ???-goal.lev ???-fil?.lev ???-loca.lev ???-strt.lev +SPEC_LEVS = asmodeus.lua baalz.lua bigrm-*.lua castle.lua fakewiz?.lua \ + juiblex.lua knox.lua medusa-?.lua minend-?.lua minefill.lua \ + minetn-?.lua oracle.lua orcus.lua sanctum.lua soko?-?.lua \ + tower?.lua valley.lua wizard?.lua nhlib.lua \ + astral.lua air.lua earth.lua fire.lua water.lua +QUEST_LEVS = ???-goal.lua ???-fil?.lua ???-loca.lua ???-strt.lua DATNODLB = $(VARDATND) license symbols DATDLB = $(DATHELP) dungeon tribute $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) DAT = $(DATNODLB) $(DATDLB) $(GAME): + ( cd lib/lua-5.3.5/src && make a && cp liblua.a ../../../src/ ) ( cd src ; $(MAKE) ) all: $(GAME) recover Guidebook $(VARDAT) dungeon spec_levs check-dlb @@ -133,7 +134,6 @@ quest.dat: $(GAME) ( cd dat ; $(MAKE) quest.dat ) spec_levs: dungeon - ( cd util ; $(MAKE) lev_comp ) ( cd dat ; $(MAKE) spec_levs ) ( cd dat ; $(MAKE) quest_levs ) @@ -288,6 +288,7 @@ clean: ( cd src ; $(MAKE) clean ) ( cd util ; $(MAKE) clean ) ( cd doc ; $(MAKE) clean ) + ( cd lib/lua-5.3.5/src && $(MAKE) clean ) # 'make spotless' returns the source tree to near-distribution condition. # it removes .o files, executables, and compiled data files diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl index 9c7896266..5c7ae6c0b 100644 --- a/sys/unix/Makefile.utl +++ b/sys/unix/Makefile.utl @@ -97,6 +97,9 @@ NHSROOT=.. #CFLAGS = -O -I../include #LFLAGS = +CFLAGS += -I../lib/lua-5.3.5/src +LFLAGS += -lm + # we specify C preprocessor flags via CFLAGS; files built with default rules # might include $(CPPFLAGS) which could get a value from user's environment; # we avoid that by forcing it empty rather than by overriding default rules @@ -183,11 +186,10 @@ HACK_H = ../src/hack.h-t # utility .c files MAKESRC = makedefs.c -SPLEVSRC = lev_yacc.c lev_lex.c lev_main.c DGNCOMPSRC = dgn_yacc.c dgn_lex.c dgn_main.c RECOVSRC = recover.c DLBSRC = dlb_main.c -UTILSRCS = $(MAKESRC) panic.c $(SPLEVSRC) $(DGNCOMPSRC) $(RECOVSRC) $(DLBSRC) +UTILSRCS = $(MAKESRC) panic.c $(DGNCOMPSRC) $(RECOVSRC) $(DLBSRC) READTAGSSRC = readtags.c # files that define all monsters and objects @@ -203,9 +205,6 @@ OALLOC = $(OBJDIR)/alloc.o panic.o # object files for makedefs MAKEOBJS = makedefs.o $(OMONOBJ) -# object files for special levels compiler -SPLEVOBJS = lev_yacc.o lev_lex.o lev_main.o $(OALLOC) $(ONAMING) - # object files for dungeon compiler DGNCOMPOBJS = dgn_yacc.o dgn_lex.o dgn_main.o $(OALLOC) @@ -268,52 +267,6 @@ lintdefs: panic.o: panic.c $(CONFIG_H) -# dependencies for lev_comp -# -lev_comp: $(SPLEVOBJS) - $(CC) $(LFLAGS) -o lev_comp $(SPLEVOBJS) $(LIBS) - -lev_yacc.o: lev_yacc.c $(HACK_H) ../include/sp_lev.h -lev_main.o: lev_main.c $(HACK_H) ../include/sp_lev.h ../include/tcap.h \ - ../include/date.h - -# see lev_comp.l for WEIRD_LEX discussion -# egrep will return failure if it doesn't find anything, but we know there -# is one "_cplusplus" inside a comment -lev_lex.o: lev_lex.c $(HACK_H) ../include/lev_comp.h ../include/sp_lev.h - $(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus lev_lex.c` lev_lex.c - -# '$(YACC) -d' generates both $(YTABC) and $(YTABH) in one run -../include/lev_comp.h: lev_yacc.c - -lev_yacc.c: lev_comp.y - $(YACC) $(YACCDIST) -d lev_comp.y - sed -e 's#"$(YTABC)"#"$@"#' -e 's#$(YTABC):#$@:#' $(YTABC) > $@ \ - && rm $(YTABC) - sed -e 's#"$(YTABH)"#"lev_comp.h"#' $(YTABH) > ../include/lev_comp.h \ - && rm $(YTABH) - -lev_lex.c: lev_comp.l - $(LEX) $(FLEXDIST) lev_comp.l - sed -e 's#"$(LEXYYC)"#"$@"#' -e 's# *$$##' \ - -e 's#static void yyunput#void yyunput#' $(LEXYYC) > $@ \ - && rm $(LEXYYC) -# note: flex code construction using m4 macros results in some trailing -# spaces; is basic RE substitute for -# and we don't bother stripping trailing tabs because that gets messy; -# make expands into which is RE end-of-line. -# flex also creates yyunput() as a static routine, but lev_comp doesn't -# use it so compiler complaints can ensue; recent flex versions honor -# NO_YY_UNPUT to suppress it, but older ones don't; making it global to -# avoid an "unused function" warning is simpler than trying to remove -# the whole thing (although full 'lint' may still complain). - -# with all of extern.h's functions to complain about, we drown in -# 'defined but not used' without -u -lintlev: - @lint -axhu -I../include -DLINT $(SPLEVSRC) $(CALLOC) $(CNAMING) | sed '/_flsbuf/d' - - # dependencies for dgn_comp # dgn_comp: $(DGNCOMPOBJS) @@ -550,12 +503,6 @@ $(CONFIG_H): ../include/config.h # 'make dist' => put generated lex and yacc sources into place for distribution SYSSHARE=../sys/share/ -$(SYSSHARE)lev_lex.c: lev_lex.c - cp lev_lex.c $@ -$(SYSSHARE)lev_yacc.c: lev_yacc.c - cp lev_yacc.c $@ -$(SYSSHARE)lev_comp.h: ../include/lev_comp.h - cp ../include/lev_comp.h $@ $(SYSSHARE)dgn_lex.c: dgn_lex.c cp dgn_lex.c $@ $(SYSSHARE)dgn_yacc.c: dgn_yacc.c @@ -563,8 +510,7 @@ $(SYSSHARE)dgn_yacc.c: dgn_yacc.c $(SYSSHARE)dgn_comp.h: ../include/dgn_comp.h cp ../include/dgn_comp.h $@ -dist: $(SYSSHARE)lev_lex.c $(SYSSHARE)lev_yacc.c $(SYSSHARE)lev_comp.h \ - $(SYSSHARE)dgn_lex.c $(SYSSHARE)dgn_yacc.c $(SYSSHARE)dgn_comp.h +dist: $(SYSSHARE)dgn_lex.c $(SYSSHARE)dgn_yacc.c $(SYSSHARE)dgn_comp.h @echo 'pre-generated lex and yacc sources are in place in sys/share' tags: $(UTILSRCS) @@ -574,9 +520,9 @@ clean: -rm -f *.o spotless: clean - -rm -f lev_lex.c lev_yacc.c dgn_lex.c dgn_yacc.c - -rm -f ../include/lev_comp.h ../include/dgn_comp.h + -rm -f dgn_lex.c dgn_yacc.c + -rm -f ../include/dgn_comp.h -rm -f ../include/tile.h tiletxt.c - -rm -f makedefs lev_comp dgn_comp recover dlb + -rm -f makedefs dgn_comp recover dlb -rm -f gif2txt txt2ppm tile2x11 tile2img.ttp xpm2img.ttp \ tilemap tileedit tile2bmp diff --git a/sys/unix/hints/linux b/sys/unix/hints/linux index 1d9c45509..dcdee332d 100644 --- a/sys/unix/hints/linux +++ b/sys/unix/hints/linux @@ -20,7 +20,8 @@ VARDIR = $(HACKDIR) POSTINSTALL=cp -n sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf; -CFLAGS=-g -O -I../include -DNOTPARMDECL -DDLB +CFLAGS=-g -O -I../include -DNOTPARMDECL +CFLAGS+=-DDLB CFLAGS+=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE CFLAGS+=-DTIMED_DELAY @@ -33,7 +34,6 @@ CFLAGS+=-DCURSES_GRAPHICS #CFLAGS+=-DSCORE_ON_BOTL #CFLAGS+=-DMSGHANDLER #CFLAGS+=-DTTY_TILES_ESCCODES -#CFLAGS+=-DDLB LINK=$(CC) # Only needed for GLIBC stack trace: diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 5fd3181da..b85c527e3 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -1,4 +1,4 @@ -# NetHack 3.6 Makefile.gcc $NHDT-Date: 1546174698 2018/12/30 12:58:18 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.71 $ +# NetHack 3.7 Makefile.gcc $NHDT-Date: 1546174698 2018/12/30 12:58:18 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.71 $ # Copyright (c) 2010 by Michael Allison # NetHack may be freely redistributed. See license for details. # @@ -30,15 +30,24 @@ # If you have any questions read the sys/winnt/Install.nt file included # with the distribution. #============================================================================== -# BUILD DECISIONS SECTION +# DECISIONS SECTION # -# There are currently only 4 decisions that you have to make. +# Build Options Decisions +# +# There are currently 4 decisions that you can choose to make. +# None of the 4 decisions are absolutely required because defaults are in place: # 1. Where do you want your build to end up? # 2. Do you want debug information in the executable? # 3. Do you want to explicitly override auto-detection of a 32-bit or 64-bit target? # 4. Do you want to include any optional interfaces in the port? # 4a) curses # 4b) Qt +# +# Mandatory LUA source Location +# +# LUA source code or is required to build NetHack-3.7. +# LUATOP must point to the location of the LUA sources. +# #----------------------------------------------------------------------------------------- #========================================================================================= @@ -116,7 +125,19 @@ TARGET_CPU=x86 # Other libraries are placed in a subdirectory of your home directory, either # x86libs or x64libs depending on whether you're building for 64 bits. # - +#--------------------------------------------------------------- +# Location of LUA +# +# Original source needs to be obtained from: +# http://www.lua.org/ftp/lua-5.3.5.tar.gz +# +# This build assumes that the LUA sources are located +# at the specified location. If they are actually elsewhere +# you'll need to specify the correct spot below in order to +# successfully build NetHack-3.7. +# +ADD_LUA=Y +LUATOP=../../lua-5.3.5 # #============================================================================== # This marks the end of the BUILD DECISIONS section. @@ -251,16 +272,10 @@ U = $(UTIL)/ MAKESRC = $(U)makedefs.c -SPLEVSRC = $(U)lev_yacc.c $(U)lev_lex.c $(U)lev_main.c $(U)panic.c - DGNCOMPSRC = $(U)dgn_yacc.c $(U)dgn_lex.c $(U)dgn_main.c MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o -LEVCOMPOBJS = $(O)lev_yacc.o $(O)lev_lex.o $(O)lev_main.o \ - $(O)alloc.o $(O)decl.o $(O)drawing.o \ - $(O)monst.o $(O)objects.o $(O)panic.o - DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_lex.o $(O)dgn_main.o \ $(O)alloc.o $(O)panic.o @@ -313,7 +328,13 @@ VOBJ24 = $(O)track.o $(O)trap.o $(O)u_init.o $(O)uhitm.o VOBJ25 = $(O)vault.o $(O)vis_tab.o $(O)vision.o $(O)weapon.o VOBJ26 = $(O)were.o $(O)wield.o $(O)windows.o $(O)wizard.o VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o -#VOBJ28 = $(O)win10.o +VOBJ28 = $(O)sfbase.o $(O)sfdata.o +VOBJ29 = $(O)sfstruct.o $(O)sfascii.o $(O)sflendian.o +#VOBJ31 = $(O)win10.o + +ifeq "$(ADD_LUA)" "Y" +LUAOBJ = $(O)nhlua.c $(O)nhlsel.c +endif DLBOBJ = $(O)dlb.o @@ -389,10 +410,39 @@ SOUND = $(OBJ)/ntsound.o VVOBJ = $(O)version.o -ALLOBJ = $(SOBJ) $(DLBOBJ) $(WOBJ) $(OBJS) $(VVOBJ) +ALLOBJ = $(SOBJ) $(DLBOBJ) $(WOBJ) $(OBJS) $(VVOBJ) $(LUAOBJ) OPTIONS_FILE = $(DAT)\options +#===============-================================================= +# LUA library +# Source from http://www.lua.org/ftp/lua-5.3.5.tar.gz +#================================================================= + +LUASRC = $(LUATOP)/src +LUALIB = $(O)lua-5.3.5.static.a +LUADLL = $(O)lua-5.3.5.a +LUAINCL = -I$(LUASRC) +#LUAFLAGS = unix added -lm here? +LUATARGETS = lua.exe luac.exe $(LUADLL) $(LUALIB) + +LUASRCFILES = lapi.c lauxlib.c lbaselib.c lbitlib.c lcode.c \ + lcorolib.c lctype.c ldblib.c ldebug.c ldo.c \ + ldump.c lfunc.c lgc.c linit.c liolib.c llex.c \ + lmathlib.c lmem.c loadlib.c lobject.c lopcodes.c \ + loslib.c lparser.c lstate.c lstring.c lstrlib.c \ + ltable.c ltablib.c ltm.c lundump.c lutf8lib.c \ + lvm.c lzio.c + +LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o \ + $(O)lcode.o $(O)lcorolib.o $(O)lctype.o $(O)ldblib.o \ + $(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \ + $(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o \ + $(O)lmathlib.o $(O)lmem.o $(O)loadlib.o $(O)lobject.o \ + $(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o \ + $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \ + $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o + ifeq "$(ADD_CURSES)" "Y" #========================================== # PDCurses build macros @@ -448,7 +498,6 @@ HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/align.h $(INCL)/context.h \ LEV_H = $(INCL)/lev.h DGN_FILE_H = $(INCL)/dgn_file.h -LEV_COMP_H = $(INCL)/lev_comp.h SP_LEV_H = $(INCL)/sp_lev.h TILE_H = ../win/share/tile.h @@ -469,11 +518,7 @@ CURSDEF= CURSESLIB= endif -ifneq "$(ADD_CURSES)" "Y" -INCLDIR=-I../include -I../sys/winnt -else -INCLDIR=-I../include -I../sys/winnt -endif +INCLDIR=-I../include -I../sys/winnt $(LUAINCL) #========================================== #========================================== @@ -655,49 +700,11 @@ $(OBJ)/%.o : $(PDCWINCON)/%.c $(cc) $(PDCINCL) $(CFLAGS) -o$@ $< #========================================== -# Level Compiler Info +# Rules for LUA files #========================================== -# Yacc/Lex ... if you got 'em. -# -# If you have yacc and lex programs (or work-alike such as bison -# and flex), comment out the upper two macros and uncomment -# the lower two. -# - -DO_YACC = YACC_MSG -DO_LEX = LEX_MSG -#DO_YACC = YACC_ACT -#DO_LEX = LEX_ACT - -# - Specify your yacc and lex programs (or work-alikes) here. - -#YACC = bison -y -#YACC = byacc -#YACC = yacc -YACC= - -#LEX = lex -#LEX = flex -LEX= - -# -# - Specify your flex skeleton file (if needed). -# - -FLEXSKEL = -#FLEXSKEL = -S../tools/flex.ske - -YTABC = y_tab.c -YTABH = y_tab.h -LEXYYC = lexyy.c - -export YACC -export LEX -export FLEXSKEL -export YTABC -export YTABH -export LEXYYC +$(OBJ)/%.o : $(LUASRC)/%.c + $(cc) $(CFLAGS) -o$@ $< #========================================== # Rules for files in win/Qt4 @@ -762,7 +769,7 @@ ifeq "$(USE_DLB)" "Y" else $(subst /,\,copy $(DAT)/*. $(GAMEDIR)) $(subst /,\,copy $(DAT)/*.dat $(GAMEDIR)) - $(subst /,\,copy $(DAT)/*.lev $(GAMEDIR)) +# $(subst /,\,copy $(DAT)/*.lua $(GAMEDIR)) $(subst /,\,if exist $(GAMEDIR)/makefile del $(GAMEDIR)/makefile) endif $(subst /,\,if not exist $(GAMEDIR)/sysconf copy $(MSWSYS)/sysconf $(GAMEDIR)) @@ -781,44 +788,11 @@ recover: $(U)recover.exe $(subst /,\,if exist $(U)recover.exe copy $(U)recover.exe $(GAMEDIR)) $(subst /,\,if exist $(DOC)/recover.txt copy $(DOC)/recover.txt $(GAMEDIR)/recover.txt) -$(O)sp_lev.tag: $(O)utility.tag $(DAT)/bigroom.des $(DAT)/castle.des \ - $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \ - $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \ - $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \ - $(DAT)/caveman.des $(DAT)/healer.des $(DAT)/knight.des \ - $(DAT)/monk.des $(DAT)/priest.des $(DAT)/ranger.des \ - $(DAT)/rogue.des $(DAT)/samurai.des $(DAT)/sokoban.des \ - $(DAT)/tourist.des $(DAT)/valkyrie.des $(DAT)/wizard.des - $(subst /,\,$(U)levcomp $(DAT)/bigroom.des) - $(subst /,\,$(U)levcomp $(DAT)/castle.des) - $(subst /,\,$(U)levcomp $(DAT)/endgame.des) - $(subst /,\,$(U)levcomp $(DAT)/gehennom.des) - $(subst /,\,$(U)levcomp $(DAT)/knox.des) - $(subst /,\,$(U)levcomp $(DAT)/mines.des) - $(subst /,\,$(U)levcomp $(DAT)/medusa.des) - $(subst /,\,$(U)levcomp $(DAT)/oracle.des) - $(subst /,\,$(U)levcomp $(DAT)/sokoban.des) - $(subst /,\,$(U)levcomp $(DAT)/tower.des) - $(subst /,\,$(U)levcomp $(DAT)/yendor.des) - $(subst /,\,$(U)levcomp $(DAT)/arch.des) - $(subst /,\,$(U)levcomp $(DAT)/barb.des) - $(subst /,\,$(U)levcomp $(DAT)/caveman.des) - $(subst /,\,$(U)levcomp $(DAT)/healer.des) - $(subst /,\,$(U)levcomp $(DAT)/knight.des) - $(subst /,\,$(U)levcomp $(DAT)/monk.des) - $(subst /,\,$(U)levcomp $(DAT)/priest.des) - $(subst /,\,$(U)levcomp $(DAT)/ranger.des) - $(subst /,\,$(U)levcomp $(DAT)/rogue.des) - $(subst /,\,$(U)levcomp $(DAT)/samurai.des) - $(subst /,\,$(U)levcomp $(DAT)/tourist.des) - $(subst /,\,$(U)levcomp $(DAT)/valkyrie.des) - $(subst /,\,$(U)levcomp $(DAT)/wizard.des) - $(subst /,\,copy *.lev $(DAT)) - $(subst /,\,del *.lev) +$(O)sp_lev.tag: $(O)utility.tag $(subst /,\,echo sp_levs done > $(O)sp_lev.tag) $(O)utility.tag: $(INCL)/date.h $(INCL)/onames.h $(INCL)/pm.h \ - $(SRC)/vis_tab.c $(U)levcomp.exe $(INCL)/vis_tab.h \ + $(SRC)/vis_tab.c $(INCL)/vis_tab.h \ $(U)dgncomp.exe $(TILEUTIL16) $(subst /,\,@echo utilities made >$@) @echo utilities made. @@ -845,10 +819,11 @@ gamedir.tag: test -d $(GAMEDIR) && echo directory created > $@ $(GAMEDIR)/NetHack.exe : gamedir.tag $(PDCLIB) $(O)tile.o $(O)nttty.o $(O)guistub.o \ - $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)conres.o $(KEYDLLS) + $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)conres.o $(KEYDLLS) \ + $(LUATARGETS) @echo Linking $@... $(link) $(lflags) -o$@ $(ALLOBJ) $(TTYOBJ) $(O)nttty.o $(O)tile.o \ - $(O)guistub.o $(O)conres.o $(PDCLIB) $(conlibs) -static -lstdc++ + $(O)guistub.o $(O)conres.o $(PDCLIB) $(LUALIB) $(conlibs) -static -lstdc++ $(subst /,\,@if exist $(O)install.tag del $(O)install.tag) # NetHackW @@ -861,10 +836,11 @@ $(GAMEDIR)/NetHack.exe : gamedir.tag $(PDCLIB) $(O)tile.o $(O)nttty.o $(O)guistu ifneq "$(SKIP_NETHACKW)" "Y" $(GAMEDIR)/NetHackW.exe : gamedir.tag $(PDCLIB) $(O)tile.o $(O)ttystub.o \ - $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)winres.o $(KEYDLLS) + $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)winres.o $(KEYDLLS) \ + $(LUATARGETS) @echo Linking $@... $(link) $(lflags) -mwindows -o$@ $(ALLOBJ) $(GUIOBJ) $(O)tile.o $(O)ttystub.o \ - $(O)winres.o $(PDCLIB) $(guilibs) -static -lstdc++ + $(O)winres.o $(PDCLIB) $(guilibs) $(LUALIB) -static -lstdc++ $(subst /,\,@if exist $(O)install.tag del $(O)install.tag) endif @@ -1022,35 +998,6 @@ $(MSWIN)/splash.bmp: $(U)uudecode.exe $(MSWIN)/splash.uu $(subst /,\,copy splash.bmp $@) del splash.bmp - -#========================================== -# Level Compiler Stuff -#========================================== - -LEVCFLAGS=$(cflags) -c -DWIN32 -D_WIN32 -I../include $(cdebug) -DDLB - -$(U)lev_yacc.c: $(U)lev_comp.y - mingw32-make -C ../util -f ../win/win32/levstuff-mingw32.mak $(U)lev_yacc.c - -$(U)lev_lex.c: $(HACK_H) $(U)lev_comp.l - mingw32-make -C ../util -f ../win/win32/levstuff-mingw32.mak $(U)lev_lex.c - -$(INCL)/lev_comp.h: - mingw32-make -C ../include -f ../win/win32/levstuff-mingw32.mak $(INCL)/lev_comp.h - -$(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h $(U)lev_yacc.c - $(cc) $(LEVCFLAGS) -o$@ $(U)lev_yacc.c - -$(O)lev_lex.o: $(HACK_H) $(INCL)/lev_comp.h $(SP_LEV_H) $(U)lev_lex.c - $(cc) $(LEVCFLAGS) -o$@ $(U)lev_lex.c - -$(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H) - $(cc) $(LEVCFLAGS) -o$@ $(U)lev_main.c - -$(U)levcomp.exe: $(LEVCOMPOBJS) - @echo Linking $@... - $(link) $(LFLAGSU) -o$@ $(LEVCOMPOBJS) - #========================================== # Dungeon Compiler Stuff #========================================== @@ -1144,7 +1091,7 @@ nhdat$(NHV): $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \ $(subst /,\,echo epitaph >>$(DAT)/dlb.lst) $(subst /,\,echo bogusmon >>$(DAT)/dlb.lst) $(subst /,\,echo tribute >>$(DAT)/dlb.lst) - dir /l /b /-p $(subst /,\,$(DAT)/*.lev >>$(DAT)/dlb.lst) + dir /l /b /-p $(subst /,\,*.lua >>$(DAT)/dlb.lst) $(subst /,\,$(U)dlb_main CcIf $(DAT) dlb.lst $(SRC)/nhdat) #========================================== @@ -1239,6 +1186,27 @@ $(O)til2bm32.o: $(WSHR)/til2bm32.c $(HACK_H) $(TILE_H) $(MSWSYS)/win32api.h $(O)pdcurses.a : $(PDCLIBOBJS) $(PDCOBJS) ar rcs $@ $(PDCLIBOBJS) $(PDCOBJS) + +#============================================================= +# LUA +#============================================================= + +lua.exe: $(O)lua.o $(LUALIB) + $(link) $(LFLAGSU) -o$@ $(O)lua.o $(LUALIB) + +luac.exe: $(O)luac.o $(LUALIB) + $(link) $(LFLAGSU) -o$@ $(O)luac.o $(LUALIB) + +lua5.3.5.dll: $(LUAOBJFILES) + $(cc) -shared -Wl,--export-all-symbols \ + -Wl,--add-stdcall-alias -o $@ $< + +lua5.3.5-static.a: $(LUAOBJFILES) + ar rcs $@ $(LUAOBJFILES) + +$(O)lua.o: $(LUASRC)/lua.c +$(O)luac.o: $(LUASRC)/luac.c + #========================================== # Housekeeping #========================================== @@ -1269,42 +1237,44 @@ ifneq "$(W_DAT)" "" if exist $(W_DAT)\engrave del $(W_DAT)\engrave if exist $(W_DAT)\epitaph del $(W_DAT)\epitaph if exist $(W_DAT)\bogusmon del $(W_DAT)\bogusmon - if exist $(W_DAT)\???-fil?.lev del $(W_DAT)\???-fil?.lev - if exist $(W_DAT)\???-goal.lev del $(W_DAT)\???-goal.lev - if exist $(W_DAT)\???-loca.lev del $(W_DAT)\???-loca.lev - if exist $(W_DAT)\???-strt.lev del $(W_DAT)\???-strt.lev - if exist $(W_DAT)\air.lev del $(W_DAT)\air.lev - if exist $(W_DAT)\asmodeus.lev del $(W_DAT)\asmodeus.lev - if exist $(W_DAT)\astral.lev del $(W_DAT)\astral.lev - if exist $(W_DAT)\baalz.lev del $(W_DAT)\baalz.lev - if exist $(W_DAT)\bigrm-*.lev del $(W_DAT)\bigrm-*.lev - if exist $(W_DAT)\castle.lev del $(W_DAT)\castle.lev - if exist $(W_DAT)\data del $(W_DAT)\data + if exist $(W_DAT)\oracles del $(W_DAT)\oracles + if exist $(W_DAT)\rumors del $(W_DAT)\rumors + if exist $(W_DAT)\quest.dat del $(W_DAT)\quest.dat if exist $(W_DAT)\dungeon del $(W_DAT)\dungeon if exist $(W_DAT)\dungeon.pdf del $(W_DAT)\dungeon.pdf - if exist $(W_DAT)\earth.lev del $(W_DAT)\earth.lev - if exist $(W_DAT)\fakewiz?.lev del $(W_DAT)\fakewiz?.lev - if exist $(W_DAT)\fire.lev del $(W_DAT)\fire.lev - if exist $(W_DAT)\juiblex.lev del $(W_DAT)\juiblex.lev - if exist $(W_DAT)\knox.lev del $(W_DAT)\knox.lev - if exist $(W_DAT)\medusa-?.lev del $(W_DAT)\medusa-?.lev - if exist $(W_DAT)\mine*.lev del $(W_DAT)\mine*.lev + if exist $(W_DAT)\data del $(W_DAT)\data if exist $(W_DAT)\options del $(W_DAT)\options if exist $(W_DAT)\ttyoptions del $(W_DAT)\ttyoptions if exist $(W_DAT)\guioptions del $(W_DAT)\guioptions - if exist $(W_DAT)\oracle.lev del $(W_DAT)\oracle.lev - if exist $(W_DAT)\oracles del $(W_DAT)\oracles - if exist $(W_DAT)\orcus.lev del $(W_DAT)\orcus.lev - if exist $(W_DAT)\rumors del $(W_DAT)\rumors - if exist $(W_DAT)\quest.dat del $(W_DAT)\quest.dat - if exist $(W_DAT)\sanctum.lev del $(W_DAT)\sanctum.lev - if exist $(W_DAT)\soko?-?.lev del $(W_DAT)\soko?-?.lev - if exist $(W_DAT)\tower?.lev del $(W_DAT)\tower?.lev - if exist $(W_DAT)\valley.lev del $(W_DAT)\valley.lev - if exist $(W_DAT)\water.lev del $(W_DAT)\water.lev - if exist $(W_DAT)\wizard?.lev del $(W_DAT)\wizard?.lev if exist $(W_DAT)\dlb.lst del $(W_DAT)\dlb.lst if exist $(W_DAT)\porthelp del $(W_DAT)\porthelp +ifdef OBSOLETE_LEVEL_COMPILER + if exist $(W_DAT)\???-fil?.des del $(W_DAT)\???-fil?.des + if exist $(W_DAT)\???-goal.des del $(W_DAT)\???-goal.des + if exist $(W_DAT)\???-loca.des del $(W_DAT)\???-loca.des + if exist $(W_DAT)\???-strt.des del $(W_DAT)\???-strt.des + if exist $(W_DAT)\air.des del $(W_DAT)\air.des + if exist $(W_DAT)\asmodeus.des del $(W_DAT)\asmodeus.des + if exist $(W_DAT)\astral.des del $(W_DAT)\astral.des + if exist $(W_DAT)\baalz.des del $(W_DAT)\baalz.des + if exist $(W_DAT)\bigrm-*.des del $(W_DAT)\bigrm-*.des + if exist $(W_DAT)\castle.des del $(W_DAT)\castle.des + if exist $(W_DAT)\earth.des del $(W_DAT)\earth.des + if exist $(W_DAT)\fakewiz?.des del $(W_DAT)\fakewiz?.des + if exist $(W_DAT)\fire.des del $(W_DAT)\fire.des + if exist $(W_DAT)\juiblex.des del $(W_DAT)\juiblex.des + if exist $(W_DAT)\knox.des del $(W_DAT)\knox.des + if exist $(W_DAT)\medusa-?.des del $(W_DAT)\medusa-?.des + if exist $(W_DAT)\mine*.des del $(W_DAT)\mine*.des + if exist $(W_DAT)\oracle.des del $(W_DAT)\oracle.des + if exist $(W_DAT)\orcus.des del $(W_DAT)\orcus.des + if exist $(W_DAT)\sanctum.des del $(W_DAT)\sanctum.des + if exist $(W_DAT)\soko?-?.des del $(W_DAT)\soko?-?.des + if exist $(W_DAT)\tower?.des del $(W_DAT)\tower?.des + if exist $(W_DAT)\valley.des del $(W_DAT)\valley.des + if exist $(W_DAT)\water.des del $(W_DAT)\water.des + if exist $(W_DAT)\wizard?.des del $(W_DAT)\wizard?.des +endif endif ifneq "$(W_OBJ)" "" if exist $(W_OBJ)\sp_lev.tag del $(W_OBJ)\sp_lev.tag @@ -1358,7 +1328,6 @@ clean: if exist $(O)utility.tag del $(O)utility.tag ifneq "$(W_UTIL)" "" if exist $(W_UTIL)\makedefs.exe del $(W_UTIL)\makedefs.exe - if exist $(W_UTIL)\levcomp.exe del $(W_UTIL)\levcomp.exe if exist $(W_UTIL)\dgncomp.exe del $(W_UTIL)\dgncomp.exe endif ifneq "$(W_SRC)" "" @@ -1375,8 +1344,6 @@ ifneq "$(W_OBJ)" "" if exist $(W_OBJ)\dlb_main.MAP del $(W_OBJ)\dlb_main.MAP if exist $(W_OBJ)\dlb_main.PDB del $(W_OBJ)\dlb_main.PDB if exist $(W_OBJ)\gamedir.tag del $(W_OBJ)\gamedir.tag - if exist $(W_OBJ)\levcomp.MAP del $(W_OBJ)\levcomp.MAP - if exist $(W_OBJ)\levcomp.PDB del $(W_OBJ)\levcomp.PDB if exist $(W_OBJ)\makedefs.MAP del $(W_OBJ)\makedefs.MAP if exist $(W_OBJ)\makedefs.PDB del $(W_OBJ)\makedefs.PDB if exist $(W_OBJ)\NetHack.MAP del $(W_OBJ)\NetHack.MAP @@ -1708,6 +1675,8 @@ $(O)mplayer.o: mplayer.c $(HACK_H) $(O)mthrowu.o: mthrowu.c $(HACK_H) $(O)muse.o: muse.c $(HACK_H) $(O)music.o: music.c $(HACK_H) #interp.c +$(O)nhlua.o: nhlua.c $(HACK_H) +$(O)nhlsel.o: nhlsel.c $(HACK_H) $(O)o_init.o: o_init.c $(HACK_H) $(INCL)/lev.h $(O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 7954b30c2..664c7ca05 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -4,7 +4,7 @@ #============================================================================== # Build Tools Environment # -# NetHack 3.6.x Makefile for MS Visual Studio Visual C++ compiler +# NetHack 3.7 Makefile for MS Visual Studio Visual C++ compiler # # Visual Studio Compilers Tested: # - Microsoft Visual Studio 2017 Community Edition @@ -29,15 +29,22 @@ # If you have any questions read the sys/winnt/Install.nt file included # with the distribution. #======================================================================================== -# BUILD DECISIONS SECTION +# DECISIONS SECTION # -# There are currently only 4 decisions that you can choose to make, and none are -# absolutely required because defaults are in place: +# Build Options Decisions +# +# There are currently 4 decisions that you can choose to make. +# none of the 4 decisions are absolutely required because defaults are in place: # 1. Where do you want your build to end up? # 2. Do you want debug information in the executable? # 3. Do you want to explicitly override auto-detection of a 32-bit or 64-bit target? # 4. Do you want to include the optional curses port? # +# Mandatory LUA source Location +# +# LUA source code or is required to build NetHack-3.7. +# LUATOP must point to the location of the LUA sources. +# #----------------------------------------------------------------------------------------- #========================================================================================= @@ -72,8 +79,21 @@ DEBUGINFO = Y # PDCurses header (.h) files and PDCURSES_C to the location # of your PDCurses C files. # -#ADD_CURSES=Y -#PDCURSES_TOP=..\..\pdcurses +ADD_CURSES=Y +PDCURSES_TOP=..\..\pdcurses +# +#--------------------------------------------------------------- +# Location of LUA +# +# Original source needs to be obtained from: +# http://www.lua.org/ftp/lua-5.3.5.tar.gz +# +# This build assumes that the LUA sources are located +# at the specified location. If they are actually elsewhere +# you'll need to specify the correct spot below in order to +# successfully build NetHack-3.7. +# +LUATOP=..\..\lua-5.3.5 # #============================================================================== # This marks the end of the BUILD DECISIONS section. @@ -88,7 +108,6 @@ DEBUGINFO = Y # Nothing below here should have to be changed.# # # ################################################ - # #============================================================================== # @@ -181,8 +200,10 @@ MAKESRC = $(U)makedefs.c MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o +!IFDEF OBSOLETE_LEVEL_COMPILER LEVCOMPOBJS = $(O)lev_yacc.o $(O)lev_lex.o $(O)lev_main.o \ $(O)alloc.o $(O)decl.o $(O)drawing.o $(O)monst.o $(O)objects.o $(O)panic.o +!ENDIF DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_lex.o $(O)dgn_main.o \ $(O)alloc.o $(O)panic.o @@ -239,6 +260,8 @@ VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o VOBJ28 = $(O)sfbase.o $(O)sfdata.o VOBJ29 = $(O)sfstruct.o $(O)sfascii.o $(O)sflendian.o +LUAOBJ = $(O)nhlua.o $(O)nhlsel.o + DLBOBJ = $(O)dlb.o REGEX = $(O)cppregex.o @@ -287,10 +310,38 @@ SOUND = $(OBJ)\ntsound.o VVOBJ = $(O)version.o -ALLOBJ = $(SOBJ) $(DLBOBJ) $(WOBJ) $(OBJS) $(VVOBJ) +ALLOBJ = $(SOBJ) $(DLBOBJ) $(WOBJ) $(OBJS) $(VVOBJ) $(LUAOBJ) OPTIONS_FILE = $(DAT)\options +#===============-================================================= +# LUA library +# Source from http://www.lua.org/ftp/lua-5.3.5.tar.gz +#================================================================= + +LUASRC = $(LUATOP)\src +LUALIB = $(O)lua5.3.5-static.lib +LUADLL = $(O)lua5.3.5.dll +LUAINCL = /I$(LUASRC) +LUATARGETS = lua.exe luac.exe $(LUADLL) $(LUALIB) + +LUASRCFILES = lapi.c lauxlib.c lbaselib.c lbitlib.c lcode.c \ + lcorolib.c lctype.c ldblib.c ldebug.c ldo.c \ + ldump.c lfunc.c lgc.c linit.c liolib.c llex.c \ + lmathlib.c lmem.c loadlib.c lobject.c lopcodes.c \ + loslib.c lparser.c lstate.c lstring.c lstrlib.c \ + ltable.c ltablib.c ltm.c lundump.c lutf8lib.c \ + lvm.c lzio.c + +LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o \ + $(O)lcode.o $(O)lcorolib.o $(O)lctype.o $(O)ldblib.o \ + $(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \ + $(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o \ + $(O)lmathlib.o $(O)lmem.o $(O)loadlib.o $(O)lobject.o \ + $(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o \ + $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \ + $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o + !IF "$(ADD_CURSES)" == "Y" #===============-================================================= # PDCurses build macros @@ -349,7 +400,9 @@ HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\align.h $(INCL)\context.h \ LEV_H = $(INCL)\lev.h DGN_FILE_H = $(INCL)\dgn_file.h +!IFDEF OBSOLETE_LEVEL_COMPILER LEV_COMP_H = $(INCL)\lev_comp.h +!ENDIF SP_LEV_H = $(INCL)\sp_lev.h TILE_H = ..\win\share\tile.h @@ -548,11 +601,7 @@ conlibs = $(baselibs) guilibs = $(winlibs) # -!IFNDEF ADD_CURSES -INCLDIR= /I..\include /I..\sys\winnt -!ELSE -INCLDIR= /I..\include /I..\sys\winnt -!ENDIF +INCLDIR= /I..\include /I..\sys\winnt $(LUAINCL) #========================================== # Util builds @@ -667,6 +716,13 @@ DLB = {$(PDCWINCON)}.c{$(OBJ)}.o: @$(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $< +#========================================== +# Rules for LUA files +#========================================== + +{$(LUASRC)}.c{$(OBJ)}.o: + @$(cc) $(cflagsBuild) -Fo$@ $< + #========================================== #=============== TARGETS ================== #========================================== @@ -679,7 +735,6 @@ default : install # # The game target. # - # # Everything # @@ -689,92 +744,8 @@ all : install install: $(O)envchk.tag $(O)obj.tag $(O)utility.tag $(GAMEDIR)\NetHack.exe $(GAMEDIR)\NetHackW.exe $(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") - copy nhdat$(NHV) $(GAMEDIR) - copy $(DAT)\license $(GAMEDIR) - copy $(DAT)\opthelp $(GAMEDIR) -! ELSE - copy $(DAT)\*. $(GAMEDIR) - copy $(DAT)\*.dat $(GAMEDIR) - copy $(DAT)\*.lev $(GAMEDIR) - if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile -! ENDIF - if not exist $(GAMEDIR)\sysconf copy $(MSWSYS)\sysconf $(GAMEDIR) - if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR) - if exist $(DOC)\guidebook.txt copy $(DOC)\guidebook.txt $(GAMEDIR)\Guidebook.txt - if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt - @if exist $(GAMEDIR)\NetHack.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHack.PDB to conserve space - @if exist $(GAMEDIR)\NetHackW.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHackW.PDB to conserve space - -if not exist $(GAMEDIR)\defaults.nh copy $(MSWSYS)\defaults.nh $(GAMEDIR)\defaults.nh - -if not exist $(GAMEDIR)\record. goto>$(GAMEDIR)\record. - echo install done > $@ - -# copy $(MSWSYS)\winnt.hlp $(GAMEDIR) - -recover: $(U)recover.exe - if exist $(U)recover.exe copy $(U)recover.exe $(GAMEDIR) - if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR)\recover.txt - -$(O)sp_lev.tag: $(O)utility.tag $(DAT)\bigroom.des $(DAT)\castle.des \ - $(DAT)\endgame.des $(DAT)\gehennom.des $(DAT)\knox.des \ - $(DAT)\medusa.des $(DAT)\oracle.des $(DAT)\tower.des \ - $(DAT)\yendor.des $(DAT)\arch.des $(DAT)\barb.des \ - $(DAT)\caveman.des $(DAT)\healer.des $(DAT)\knight.des \ - $(DAT)\monk.des $(DAT)\priest.des $(DAT)\ranger.des \ - $(DAT)\rogue.des $(DAT)\samurai.des $(DAT)\sokoban.des \ - $(DAT)\tourist.des $(DAT)\valkyrie.des $(DAT)\wizard.des - cd $(DAT) - $(U)levcomp bigroom.des - $(U)levcomp castle.des - $(U)levcomp endgame.des - $(U)levcomp gehennom.des - $(U)levcomp knox.des - $(U)levcomp mines.des - $(U)levcomp medusa.des - $(U)levcomp oracle.des - $(U)levcomp sokoban.des - $(U)levcomp tower.des - $(U)levcomp yendor.des - $(U)levcomp arch.des - $(U)levcomp barb.des - $(U)levcomp caveman.des - $(U)levcomp healer.des - $(U)levcomp knight.des - $(U)levcomp monk.des - $(U)levcomp priest.des - $(U)levcomp ranger.des - $(U)levcomp rogue.des - $(U)levcomp samurai.des - $(U)levcomp tourist.des - $(U)levcomp valkyrie.des - $(U)levcomp wizard.des - cd $(SRC) - echo sp_levs done > $(O)sp_lev.tag - -$(O)utility.tag: $(INCL)\date.h $(INCL)\onames.h $(INCL)\pm.h \ - $(SRC)\vis_tab.c \ - $(U)levcomp.exe $(INCL)\vis_tab.h \ - $(U)dgncomp.exe $(TILEUTIL16) - @echo utilities made >$@ - @echo utilities made. - -tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe - @echo Optional tile development utilities are up to date. - -$(O)NetHackW.res: $(TILEBMP16) $(MSWIN)\NetHackW.rc $(MSWIN)\mnsel.bmp \ - $(MSWIN)\mnselcnt.bmp $(MSWIN)\mnunsel.bmp \ - $(MSWIN)\petmark.bmp $(MSWIN)\pilemark.bmp $(MSWIN)\NetHack.ico $(MSWIN)\rip.bmp \ - $(MSWIN)\splash.bmp - @$(rc) -r -fo$@ -i$(MSWIN) -dNDEBUG $(MSWIN)\NetHackW.rc - -$(O)console.res: $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico - @$(rc) -r -fo$@ -i$(MSWSYS) -dNDEBUG $(MSWSYS)\console.rc - - #========================================== -# The game targets. +# Main game targets. #========================================== # The section for linking the NetHack image looks a little strange at @@ -818,11 +789,13 @@ GAMEOBJ=$(GAMEOBJ:^ =^ $(GAMEDIR)\NetHack.exe : $(O)gamedir.tag $(PDCLIB) $(O)tile.o $(O)nttty.o $(O)guistub.o \ - $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)console.res $(KEYDLLS) + $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)console.res $(KEYDLLS) \ + $(LUATARGETS) @if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR) @echo Linking $(@:\=/) $(link) $(lflagsBuild) $(conlflags) /STACK:2048 /PDB:$(GAMEDIR)\$(@B).PDB /MAP:$(O)$(@B).MAP \ - $(LIBS) $(PDCLIB) $(conlibs) $(BCRYPT) -out:$@ @<<$(@B).lnk + $(LIBS) $(PDCLIB) $(LUALIB) \ + $(conlibs) $(BCRYPT) -out:$@ @<<$(@B).lnk $(GAMEOBJ) $(TTYOBJ) $(O)nttty.o @@ -834,18 +807,21 @@ $(GAMEDIR)\NetHack.exe : $(O)gamedir.tag $(PDCLIB) $(O)tile.o $(O)nttty.o $(O)gu # NetHackW # full tty linkage libs: -# libs: $(LIBS) $(guilibs) $(COMCTRL) +# libs: $(LIBS) $(PDCLIB) $(LUALIB) $(guilibs) $(COMCTRL) # objs: $(GAMEOBJ) $(GUIOBJ) $(TTYOBJ) $(O)tile.o $(O)nttty.o # otherwise: -# libs: $(LIBS) $(guilibs) $(COMCTRL) +# libs: $(LIBS) $(PDCLIB) $(LUALIB) $(guilibs) $(COMCTRL) # objs: $(GAMEOBJ) $(GUIOBJ) $(O)tile.o $(O)ttystub.o $(GAMEDIR)\NetHackW.exe : $(O)gamedir.tag $(O)tile.o $(O)ttystub.o \ - $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)NetHackW.res $(O)gamedir.tag $(KEYDLLS) + $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)NetHackW.res \ + $(O)gamedir.tag $(KEYDLLS) \ + $(LUATARGETS) @if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR) @echo Linking $(@:\=/) $(link) $(lflagsBuild) $(guilflags) /STACK:2048 /PDB:$(GAMEDIR)\$(@B).PDB \ - /MAP:$(O)$(@B).MAP $(LIBS) $(PDCLIB) $(guilibs) $(COMCTRL) $(BCRYPT) -out:$@ @<<$(@B).lnk + /MAP:$(O)$(@B).MAP $(LIBS) $(PDCLIB) $(LUALIB) \ + $(guilibs) $(COMCTRL) $(BCRYPT) -out:$@ @<<$(@B).lnk $(GAMEOBJ) $(GUIOBJ) $(O)tile.o @@ -915,6 +891,92 @@ $(GAMEDIR)\nhraykey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).map" /DEF:$(O)$(@B).def \ /IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o +$(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ + $(DAT)\oracles $(DAT)\quest.dat $(O)sp_lev.tag $(DLB) +! IF ("$(USE_DLB)"=="Y") + copy nhdat$(NHV) $(GAMEDIR) + copy $(DAT)\license $(GAMEDIR) + copy $(DAT)\opthelp $(GAMEDIR) +! ELSE + copy $(DAT)\*. $(GAMEDIR) + copy $(DAT)\*.dat $(GAMEDIR) + if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile +! ENDIF + if not exist $(GAMEDIR)\sysconf copy $(MSWSYS)\sysconf $(GAMEDIR) + if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR) + if exist $(DOC)\guidebook.txt copy $(DOC)\guidebook.txt $(GAMEDIR)\Guidebook.txt + if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt + @if exist $(GAMEDIR)\NetHack.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHack.PDB to conserve space + @if exist $(GAMEDIR)\NetHackW.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHackW.PDB to conserve space + -if not exist $(GAMEDIR)\defaults.nh copy $(MSWSYS)\defaults.nh $(GAMEDIR)\defaults.nh + -if not exist $(GAMEDIR)\record. goto>$(GAMEDIR)\record. + echo install done > $@ + +# copy $(MSWSYS)\winnt.hlp $(GAMEDIR) + +recover: $(U)recover.exe + if exist $(U)recover.exe copy $(U)recover.exe $(GAMEDIR) + if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR)\recover.txt + +!IFDEF OBSOLETE_LEVEL_COMPILER +$(O)sp_lev.tag: $(O)utility.tag $(DAT)\bigroom.des $(DAT)\castle.des \ + $(DAT)\endgame.des $(DAT)\gehennom.des $(DAT)\knox.des \ + $(DAT)\medusa.des $(DAT)\oracle.des $(DAT)\tower.des \ + $(DAT)\yendor.des $(DAT)\arch.des $(DAT)\barb.des \ + $(DAT)\caveman.des $(DAT)\healer.des $(DAT)\knight.des \ + $(DAT)\monk.des $(DAT)\priest.des $(DAT)\ranger.des \ + $(DAT)\rogue.des $(DAT)\samurai.des $(DAT)\sokoban.des \ + $(DAT)\tourist.des $(DAT)\valkyrie.des $(DAT)\wizard.des + cd $(DAT) + $(U)levcomp bigroom.des + $(U)levcomp castle.des + $(U)levcomp endgame.des + $(U)levcomp gehennom.des + $(U)levcomp knox.des + $(U)levcomp mines.des + $(U)levcomp medusa.des + $(U)levcomp oracle.des + $(U)levcomp sokoban.des + $(U)levcomp tower.des + $(U)levcomp yendor.des + $(U)levcomp arch.des + $(U)levcomp barb.des + $(U)levcomp caveman.des + $(U)levcomp healer.des + $(U)levcomp knight.des + $(U)levcomp monk.des + $(U)levcomp priest.des + $(U)levcomp ranger.des + $(U)levcomp rogue.des + $(U)levcomp samurai.des + $(U)levcomp tourist.des + $(U)levcomp valkyrie.des + $(U)levcomp wizard.des + cd $(SRC) + echo sp_levs done > $(O)sp_lev.tag +!ELSE +$(O)sp_lev.tag: + echo sp_levs done > $(O)sp_lev.tag +!ENDIF + +$(O)utility.tag: $(INCL)\date.h $(INCL)\onames.h $(INCL)\pm.h \ + $(SRC)\vis_tab.c $(INCL)\vis_tab.h \ + $(U)dgncomp.exe $(TILEUTIL16) + @echo utilities made >$@ + @echo utilities made. + +tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe + @echo Optional tile development utilities are up to date. + +$(O)NetHackW.res: $(TILEBMP16) $(MSWIN)\NetHackW.rc $(MSWIN)\mnsel.bmp \ + $(MSWIN)\mnselcnt.bmp $(MSWIN)\mnunsel.bmp \ + $(MSWIN)\petmark.bmp $(MSWIN)\pilemark.bmp $(MSWIN)\NetHack.ico $(MSWIN)\rip.bmp \ + $(MSWIN)\splash.bmp + @$(rc) -r -fo$@ -i$(MSWIN) -dNDEBUG $(MSWIN)\NetHackW.rc + +$(O)console.res: $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico + @$(rc) -r -fo$@ -i$(MSWSYS) -dNDEBUG $(MSWSYS)\console.rc + # # Secondary Targets. # @@ -1023,6 +1085,7 @@ $(MSWIN)\splash.bmp: $(U)uudecode.exe $(MSWIN)\splash.uu # defer to the steps in ..\win\win32\levstuff.mak # +!IFDEF OBSOLETE_LEVEL_COMPILER $(U)lev_yacc.c: $(U)lev_comp.y nmake -nologo -f ..\win\win32\levstuff.mak $(U)lev_yacc.c @@ -1047,6 +1110,7 @@ $(U)levcomp.exe: $(LEVCOMPOBJS) $(LEVCOMPOBJS:^ =^ ) << +!ENDIF #================================================= # Dungeon Compiler Stuff @@ -1153,10 +1217,6 @@ nhdat$(NHV): $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ if exist porthelp echo porthelp >>dlb.lst echo quest.dat >>dlb.lst echo rumors >>dlb.lst - echo engrave >>dlb.lst - echo epitaph >>dlb.lst - echo bogusmon >>dlb.lst - echo tribute >>dlb.lst echo help >>dlb.lst echo hh >>dlb.lst echo cmdhelp >>dlb.lst @@ -1166,7 +1226,11 @@ nhdat$(NHV): $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ echo wizhelp >>dlb.lst echo dungeon >>dlb.lst echo license >>dlb.lst - for %%N in (*.lev) do echo %%N >>dlb.lst + echo engrave >>dlb.lst + echo epitaph >>dlb.lst + echo bogusmon >>dlb.lst + echo tribute >>dlb.lst + for %%N in (*.lua) do echo %%N >>dlb.lst $(U)dlb_main cIf dlb.lst $(SRC)\nhdat cd $(SRC) @@ -1288,6 +1352,25 @@ $(O)pdcurses.lib : $(PDCLIBOBJS) $(PDCOBJS) $(O)pdcscrn.o : $(PDCURSES_HEADERS) $(PDCWINCON)\pdcscrn.c $(MSWSYS)\stub-pdcscrn.c $(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $(MSWSYS)\stub-pdcscrn.c +#=============================================================================== +# LUA +#=============================================================================== + +lua.exe: $(O)lua.o $(LUALIB) + link /OUT:$@ $(O)lua.o $(LUALIB) + +luac.exe: $(O)luac.o $(LUALIB) + link /OUT:$@ $(O)luac.o $(LUALIB) + +$(O)lua5.3.5.dll: $(LUAOBJFILES) + link /DLL /IMPLIB:lua5.3.5.lib /OUT:$@ $(LUAOBJFILES) + +$(O)lua5.3.5-static.lib: $(LUAOBJFILES) + lib /OUT:$@ $(LUAOBJFILES) + +$(O)lua.o: $(LUASRC)\lua.c +$(O)luac.o: $(LUASRC)\luac.c + #=============================================================================== # Housekeeping #=============================================================================== @@ -1315,40 +1398,6 @@ spotless: clean if exist $(DAT)\engrave del $(DAT)\engrave if exist $(DAT)\epitaph del $(DAT)\epitaph if exist $(DAT)\bogusmon del $(DAT)\bogusmon - if exist $(DAT)\???-fil?.lev del $(DAT)\???-fil?.lev - if exist $(DAT)\???-goal.lev del $(DAT)\???-goal.lev - if exist $(DAT)\???-loca.lev del $(DAT)\???-loca.lev - if exist $(DAT)\???-strt.lev del $(DAT)\???-strt.lev - if exist $(DAT)\air.lev del $(DAT)\air.lev - if exist $(DAT)\asmodeus.lev del $(DAT)\asmodeus.lev - if exist $(DAT)\astral.lev del $(DAT)\astral.lev - if exist $(DAT)\baalz.lev del $(DAT)\baalz.lev - if exist $(DAT)\bigrm-*.lev del $(DAT)\bigrm-*.lev - if exist $(DAT)\castle.lev del $(DAT)\castle.lev - if exist $(DAT)\data del $(DAT)\data - if exist $(DAT)\dungeon del $(DAT)\dungeon - if exist $(DAT)\dungeon.pdf del $(DAT)\dungeon.pdf - if exist $(DAT)\earth.lev del $(DAT)\earth.lev - if exist $(DAT)\fakewiz?.lev del $(DAT)\fakewiz?.lev - if exist $(DAT)\fire.lev del $(DAT)\fire.lev - if exist $(DAT)\juiblex.lev del $(DAT)\juiblex.lev - if exist $(DAT)\knox.lev del $(DAT)\knox.lev - if exist $(DAT)\medusa-?.lev del $(DAT)\medusa-?.lev - if exist $(DAT)\mine*.lev del $(DAT)\mine*.lev - if exist $(DAT)\options del $(DAT)\options - if exist $(DAT)\ttyoptions del $(DAT)\ttyoptions - if exist $(DAT)\guioptions del $(DAT)\guioptions - if exist $(DAT)\oracle.lev del $(DAT)\oracle.lev - if exist $(DAT)\oracles del $(DAT)\oracles - if exist $(DAT)\orcus.lev del $(DAT)\orcus.lev - if exist $(DAT)\rumors del $(DAT)\rumors - if exist $(DAT)\quest.dat del $(DAT)\quest.dat - if exist $(DAT)\sanctum.lev del $(DAT)\sanctum.lev - if exist $(DAT)\soko?-?.lev del $(DAT)\soko?-?.lev - if exist $(DAT)\tower?.lev del $(DAT)\tower?.lev - if exist $(DAT)\valley.lev del $(DAT)\valley.lev - if exist $(DAT)\water.lev del $(DAT)\water.lev - if exist $(DAT)\wizard?.lev del $(DAT)\wizard?.lev if exist $(DAT)\dlb.lst del $(DAT)\dlb.lst if exist $(DAT)\porthelp del $(DAT)\porthelp if exist $(O)sp_lev.tag del $(O)sp_lev.tag @@ -1374,12 +1423,50 @@ spotless: clean if exist $(U)dlb_main.exe del $(U)dlb_main.exe !IF "$(ADD_CURSES)" == "Y" if exist $(O)pdcurses.lib del $(O)pdcurses.lib +!ENDIF + if exist $(DAT)\oracles del $(DAT)\oracles + if exist $(DAT)\rumors del $(DAT)\rumors + if exist $(DAT)\quest.dat del $(DAT)\quest.dat + if exist $(DAT)\options del $(DAT)\options + if exist $(DAT)\ttyoptions del $(DAT)\ttyoptions + if exist $(DAT)\guioptions del $(DAT)\guioptions + if exist $(DAT)\data del $(DAT)\data + if exist $(DAT)\dungeon del $(DAT)\dungeon + if exist $(DAT)\dungeon.pdf del $(DAT)\dungeon.pdf +!IFDEF OBSOLETE_LEVEL_COMPILER + if exist $(DAT)\???-fil?.lev del $(DAT)\???-fil?.lev + if exist $(DAT)\???-goal.lev del $(DAT)\???-goal.lev + if exist $(DAT)\???-loca.lev del $(DAT)\???-loca.lev + if exist $(DAT)\???-strt.lev del $(DAT)\???-strt.lev + if exist $(DAT)\air.lev del $(DAT)\air.lev + if exist $(DAT)\asmodeus.lev del $(DAT)\asmodeus.lev + if exist $(DAT)\astral.lev del $(DAT)\astral.lev + if exist $(DAT)\baalz.lev del $(DAT)\baalz.lev + if exist $(DAT)\bigrm-*.lev del $(DAT)\bigrm-*.lev + if exist $(DAT)\castle.lev del $(DAT)\castle.lev + if exist $(DAT)\earth.lev del $(DAT)\earth.lev + if exist $(DAT)\fakewiz?.lev del $(DAT)\fakewiz?.lev + if exist $(DAT)\fire.lev del $(DAT)\fire.lev + if exist $(DAT)\juiblex.lev del $(DAT)\juiblex.lev + if exist $(DAT)\knox.lev del $(DAT)\knox.lev + if exist $(DAT)\medusa-?.lev del $(DAT)\medusa-?.lev + if exist $(DAT)\mine*.lev del $(DAT)\mine*.lev + if exist $(DAT)\oracle.lev del $(DAT)\oracle.lev + if exist $(DAT)\orcus.lev del $(DAT)\orcus.lev + if exist $(DAT)\sanctum.lev del $(DAT)\sanctum.lev + if exist $(DAT)\soko?-?.lev del $(DAT)\soko?-?.lev + if exist $(DAT)\tower?.lev del $(DAT)\tower?.lev + if exist $(DAT)\valley.lev del $(DAT)\valley.lev + if exist $(DAT)\water.lev del $(DAT)\water.lev + if exist $(DAT)\wizard?.lev del $(DAT)\wizard?.lev !ENDIF clean: if exist $(O)*.o del $(O)*.o if exist $(O)utility.tag del $(O)utility.tag if exist $(U)makedefs.exe del $(U)makedefs.exe +!IFDEF OBSOLETE_LEVEL_COMPILER if exist $(U)levcomp.exe del $(U)levcomp.exe +!ENDIF if exist $(U)dgncomp.exe del $(U)dgncomp.exe if exist $(SRC)\*.lnk del $(SRC)\*.lnk if exist $(SRC)\*.map del $(SRC)\*.map @@ -1390,8 +1477,10 @@ clean: if exist $(O)dlb_main.MAP del $(O)dlb_main.MAP if exist $(O)dlb_main.PDB del $(O)dlb_main.PDB if exist $(O)gamedir.tag del $(O)gamedir.tag +!IFDEF OBSOLETE_LEVEL_COMPILER if exist $(O)levcomp.MAP del $(O)levcomp.MAP if exist $(O)levcomp.PDB del $(O)levcomp.PDB +!ENDIF if exist $(O)makedefs.MAP del $(O)makedefs.MAP if exist $(O)makedefs.PDB del $(O)makedefs.PDB if exist $(O)NetHack.MAP del $(O)NetHack.MAP @@ -1802,6 +1891,8 @@ $(O)mplayer.o: mplayer.c $(HACK_H) $(O)mthrowu.o: mthrowu.c $(HACK_H) $(O)muse.o: muse.c $(HACK_H) $(O)music.o: music.c $(HACK_H) #interp.c +$(O)nhlua.o: nhlua.c $(HACK_H) +$(O)nhlsel.o: nhlsel.c $(HACK_H) $(O)o_init.o: o_init.c $(HACK_H) $(INCL)\lev.h $(O)objects.o: objects.c $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ $(INCL)\prop.h $(INCL)\skills.h $(INCL)\color.h diff --git a/sys/winnt/nhsetup.bat b/sys/winnt/nhsetup.bat index a5c9ce75b..25ac9fee7 100755 --- a/sys/winnt/nhsetup.bat +++ b/sys/winnt/nhsetup.bat @@ -23,7 +23,7 @@ goto :EOF echo Checking to see if source tree directories are set up properly... if not exist ..\..\include\hack.h goto :err_dir if not exist ..\..\src\hack.c goto :err_dir -if not exist ..\..\dat\wizard.des goto :err_dir +if not exist ..\..\dat\wizard1.lua goto :err_dir if not exist ..\..\util\makedefs.c goto :err_dir if not exist ..\..\sys\winnt\winnt.c goto :err_dir echo Directories look ok. diff --git a/test_des.lua b/test_des.lua new file mode 100644 index 000000000..5a82efb1d --- /dev/null +++ b/test_des.lua @@ -0,0 +1,377 @@ + +-- Test the des-file commands +-- reset_level is only needed here, not in normal special level scripts. + +function is_map_at(x,y, mapch, lit) + local rm = nh.getmap(x + 1, y); -- + 1 == g.xstart + if rm.mapchr ~= mapch then + error("Terrain at (" .. x .. "," .. y .. ") is not \"" .. mapch .. "\", but \"" .. rm.mapchr .. "\""); + end + if lit ~= nil then + if rm.lit ~= lit then + error("light state at (" .. x .. "," .. y .. ") is not \"" .. lit .. "\", but \"" .. tostring(rm.lit) .. "\""); + end + end +end + +function test_level_init() + des.reset_level(); + des.level_init(); + + des.reset_level(); + des.level_init({ style = "solidfill" }); + + des.reset_level(); + des.level_init({ style = "solidfill", fg = " " }); + + des.reset_level(); + des.level_init({ style = "mazegrid", bg ="-" }); + + des.reset_level(); + des.level_init({ style = "rogue" }); + + des.reset_level(); + des.level_init({ style = "mines" }); + + des.reset_level(); + des.level_init({ style = "mines", fg = ".", bg = " ", smoothed = true }); + + des.reset_level(); + des.level_init({ style = "mines", fg = ".", bg = "}", joined = true }); + + des.reset_level(); + des.level_init({ style = "mines", fg = ".", bg = "L", smoothed = 1, joined = 1, lit = 0 }); + + des.reset_level(); + des.level_init({ style = "mines", fg = ".", bg = " ", smoothed = true, joined = true, walled = true }); + + des.reset_level(); + des.level_init({ style = "solidfill", fg = ".", lit = 1 }); +end + +function test_message() + des.message("Test message"); + des.message("Message 2"); +end + +function test_monster() + des.monster(); + des.monster("gnome") + des.monster("S") + des.monster("giant eel",11,06); + des.monster("hill giant", {08,06}); + des.monster({ id = "ogre" }) + des.monster({ class = "D" }) + des.monster({ id = "ogre", x = 10, y = 15 }) + des.monster({ class = "D", coord = {11,16} }) + des.monster({ x = 73, y = 16 }); + des.monster({ id = "watchman", peaceful = 1 }) + des.monster({ class = "H", peaceful = 0 }) + des.monster({ id = "giant mimic", appear_as = "obj:boulder" }); + des.monster({ id = "giant mimic", appear_as = "ter:altar" }); + des.monster({ id = "chameleon", appear_as = "mon:bat" }); + des.monster({ class = "H", asleep = 1, female = 1, invisible = 1, cancelled = 1, revived = 1, avenge = 1, fleeing = 20, blinded = 20, paralyzed = 20, stunned = 20, confused = 20 }) + des.monster({ id = "ogre", x = 10, y = 15, name = "Fred", + inventory = function() + des.object(); + des.object("["); + des.object({ class = "/" }); + des.object({ id = "statue", contents=0 }) + end + }); + des.reset_level(); + des.level_init(); +end + +function test_object() + des.reset_level(); + des.level_init(); + des.object() + des.object("*") + des.object({ class = "%" }); + des.object({ id = "statue", contents=0 }) + des.object("sack") + des.object({ x = 41, y = 03 }) + des.object({ coord = {42, 03} }); + des.object({ id = "boulder", coord = {03,12} }); + des.object("diamond", 69, 04) + des.object("diamond", {68, 04}) + des.object({ id = "egg", x = 05, y = 04, montype = "yellow dragon" }); + des.object({ id = "egg", x = 06, y = 04, montype = "yellow dragon", laid_by_you = true }); + des.object({ id = "corpse", montype = "valkyrie" }) + des.object({ id = "statue", montype = "C", historic = true, male = true }); + des.object({ id = "statue", montype = "C", historic = true, female = true }); + des.object({ id = "chest", buried = true, locked = true, + contents = function() + des.object(); + des.object("*") + des.object({ class = "%" }); + des.object({ id = "statue", contents=0 }) + end + }); + des.object({ id = "chest", greased = true, broken = true, contents = 0 }); + des.object({ id = "chest", trapped = 1, broken = true, contents = 0 }); + des.object({ id = "oil lamp", lit = 1 }); + des.object({ id = "silver dagger", spe = 127, buc = "cursed" }); + des.object({ id = "silver dagger", spe = -127, buc = "blessed" }); + des.object({ id = "bamboo arrow", quantity = 100 }); + des.object({ id = "leather armor", eroded = 1 }); + des.object({ id = "probing", recharged = 2, spe = 3 }); + des.object({ name = "Random object" }); + des.object({ class = "*", name = "Random stone" }); + des.object({ id ="broadsword", name = "Dragonbane" }) + des.reset_level(); + des.level_init(); +end + +function test_level_flags() + des.level_flags("noteleport") + des.level_flags("noteleport", "hardfloor", "nommap", "shortsighted", "arboreal") + des.level_flags("mazelevel", "shroud", "graveyard", "icedpools", "corrmaze") + des.level_flags("premapped", "solidify", "inaccessibles") +end + +function test_engraving() + des.engraving({02,04},"engrave","Trespassers will be persecuted!") + des.engraving({ x = 1, y = 2, type = "burn", text = "Elbereth" }); + des.engraving({ type = "dust", text = "X marks the spot." }) + des.engraving({ text = "Foobar" }) + des.engraving({ type = "mark", text = "X" }) + des.engraving({ type = "blood", text = "redrum" }) +end + +function test_mineralize() + des.mineralize(); + des.mineralize({ gem_prob = 1, gold_prob = 10, kelp_moat = 25, kelp_pool = 100 }) +end + +function test_grave() + des.grave(); + des.grave({ text = "Lil Miss Marker" }); + des.grave({ x = 40, y = 11 }); + des.grave({ x = 41, y = 12, text = "Bongo" }); + des.grave({ x = 42, y = 13, text = "" }); +end + +function test_altar() + des.altar(); + des.altar({ x = 44, y = 20 }); + des.altar({ coord = {46, 20 } }); + des.altar({ coord = {48, 20 }, type = "altar", align = "law" }); + des.altar({ coord = {50, 20 }, type = "shrine", align = "noalign" }); + des.altar({ coord = {52, 20 }, type = "sanctum", align = "coaligned" }); +end + +function test_map() + des.map([[ +TTT +LTL +LTL]]) + des.map({ x = 60, y = 5, map = [[ +FFF +F.F +FFF]] }) + des.map({ halign = "left", valign = "bottom", map = [[ +III +.I. +III]] }) +end + +function test_feature() + des.feature("fountain", 40, 08); + des.feature("sink", {41, 08}); + des.feature({ type = "pool", x = 42, y = 08 }); +end + +function test_gold() + des.gold({ amount = 999, x = 40, y = 07 }); +end + +function test_trap() + des.trap("pit", 41, 06); + des.trap("level teleport", {42, 06}); + des.trap({ type = "hole", x = 43, y = 06 }); + des.trap({ type = "hole", coord = {44, 06} }); + des.trap(); + des.trap("rust"); +end + +function test_wall_prop() + des.wall_property({ x1 = 0, y1 = 0, x2 = 78, y2 = 20, property = "nondiggable" }); + des.wall_property({ region={0,0, 78,20}, property = "nondiggable" }); + des.non_diggable(); + des.non_diggable(selection.area(5,5, 15, 15)); + des.non_passwall(); + des.non_passwall(selection.area(5,5, 15, 15)); +end + +function test_wallify() + des.wallify(); + des.wallify({ x1 = 0, y1 = 0, x2 = 78, y2 = 20 }); +end + +function test_teleport_region() + des.teleport_region({ region = {69,00,79,20} }) + des.teleport_region({ region = {69,00,79,20}, dir="up" }) + des.teleport_region({ region = {69,00,79,20}, region_islev=1, dir="up" }) + des.teleport_region({ region = {01,00,10,20}, region_islev=1, exclude={1,1,61,15}, dir="down" }) + des.teleport_region({ region = {01,00,10,20}, region_islev=1, exclude={1,1,61,15}, exclude_islev=1 }) +end + +function test_region() + des.region(selection.area(08,03,54,03),"unlit") + des.region(selection.area(56,02,60,03),"lit") + des.region({ region={16,05, 25,06}, lit=1, type="barracks", prefilled=0 }) + des.region({ region={1,5, 3,7}, lit=1, irregular=true, prefilled=true, joined=false }) +end + +function test_door() + des.door("nodoor", 12,12); + des.door({ x = 13, y = 12, state = "open" }); + des.room({ type = "graveyard", contents = function() + des.door({ wall = "north", pos = 1 }); + des.door({ wall = "random", state = "locked" }); + end + }); +end + +function test_mazewalk() + des.reset_level(); + des.level_init({ style = "mazegrid", bg ="-" }); + des.mazewalk(01,10,"east") + + des.reset_level(); + des.level_init({ style = "mazegrid", bg ="-" }); + des.mazewalk({ x=2,y=10, dir="north", typ="L", stocked=true }); +end + +function test_room() + des.reset_level(); + des.level_init({ style = "solidfill", fg=" " }); + des.room({ type = " ordinary", lit = 1, + x=3, y=3, xalign="center", yalign="center", + w=11, h=9, contents = function() + des.room({ x=4, y=3, w=3,h=3 }); + end + }); + des.room(); + des.room({ contents = function() + des.object(); + des.monster(); + end + }); + des.random_corridors(); +end + +function test_stair() + des.reset_level(); + des.level_init(); + + des.stair("up"); + des.stair("down", 4, 7); + des.stair({ dir = "down", x = 5, y = 7 }); + des.stair({ dir = "down", coord = {6, 7} }); +end + +function test_ladder() + des.reset_level(); + des.level_init(); + + des.ladder("up"); + des.ladder("down", 4, 7); + des.ladder({ dir = "down", x = 5, y = 7 }); + des.ladder({ dir = "down", coord = {6, 7} }); +end + +function test_terrain() + des.reset_level(); + des.level_init(); + + des.terrain(2, 2, "L"); + is_map_at(2,2, "L"); + + des.terrain({6,7}, "L"); + is_map_at(6,7, "L"); + + des.terrain({ x = 5, y = 5, typ = "L" }); + is_map_at(5,5, "L"); + + -- TODO: allow lit = false + -- des.terrain({ x = 5, y = 5, typ = ".", lit = false }); + -- is_map_at(5,5, ".", false); + + des.terrain({ x = 5, y = 5, typ = ".", lit = 1 }); + is_map_at(5,5, ".", true); + + des.terrain({ x = 5, y = 5, typ = " ", lit = 0 }); + is_map_at(5,5, " ", false); + + des.terrain({ selection = selection.area(4,4, 6,6), typ = "L", lit = 0 }); + for x = 4,6 do + for y = 4,6 do + is_map_at(x,y, "L", true); + end + end + + des.terrain(selection.area(2,2, 4,4), "T"); + for x = 2,4 do + for y = 2,4 do + is_map_at(x,y, "T"); + end + end +end + +function test_replace_terrain() + des.replace_terrain({ x1=1, y1=1, x2=70,y2=19, fromterrain=".", toterrain="I", lit=1 }); + des.replace_terrain({ x1=1, y1=1, x2=70,y2=19, fromterrain=".", toterrain="I", chance=50 }); + des.replace_terrain({ region={1,1, 70,19}, fromterrain=".", toterrain="L", chance=25 }); +end + +function test_corridor() + des.reset_level(); + des.level_init({ style = "solidfill", fg=" " }); + des.room({ x=2, y=2, xalign="center", yalign="center", w=4, h=4, + contents = function() + des.door({ wall = "south", pos = 2 }); + end + }); + des.room({ x=1, y=3, xalign="center", yalign="center", w=6, h=6, + contents = function() + des.door({ wall = "north", pos = 1 }); + end + }); + des.corridor({ srcroom=0, srcwall="south", srcdoor=0, destroom=1, destwall="north", destdoor=0 }); +end + +function run_tests() + test_level_init(); + test_message(); + test_monster(); + test_object(); + test_level_flags(); + test_engraving(); + test_mineralize(); + test_grave(); + test_altar(); + test_feature(); + test_gold(); + test_trap(); + test_door(); + test_map(); + test_wall_prop(); + test_wallify(); + test_teleport_region(); + test_region(); + test_mazewalk(); + test_room(); + test_stair(); + test_ladder(); + test_terrain(); + test_replace_terrain(); + test_corridor(); + + des.reset_level(); + des.level_init(); +end + +run_tests(); diff --git a/test_lev.lua b/test_lev.lua new file mode 100644 index 000000000..076689a26 --- /dev/null +++ b/test_lev.lua @@ -0,0 +1,75 @@ + +-- Test all of the special levels + +local special_levels = { +"air", +"asmodeus", +"astral", +"baalz", +"bigrm-10", +"bigrm-1", +"bigrm-2", +"bigrm-3", +"bigrm-4", +"bigrm-5", +"bigrm-6", +"bigrm-7", +"bigrm-8", +"bigrm-9", +"castle", +"earth", +"fakewiz1", +"fakewiz2", +"fire", +"juiblex", +"knox", +"medusa-1", +"medusa-2", +"medusa-3", +"medusa-4", +"minefill", +"minend-1", +"minend-2", +"minend-3", +"minetn-1", +"minetn-2", +"minetn-3", +"minetn-4", +"minetn-5", +"minetn-6", +"minetn-7", +"oracle", +"orcus", +"sanctum", +"soko1-1", +"soko1-2", +"soko2-1", +"soko2-2", +"soko3-1", +"soko3-2", +"soko4-1", +"soko4-2", +"tower1", +"tower2", +"tower3", +"valley", +"water", +"wizard1", +"wizard2", +"wizard3" +} + +local roles = { "Arc", "Bar", "Cav", "Hea", "Kni", "Mon", "Pri", "Ran", "Rog", "Sam", "Tou", "Val", "Wiz" } +local questlevs = { "fila", "filb", "goal", "loca", "strt" } + +for _,role in ipairs(roles) do + for _,qlev in ipairs(questlevs) do + local lev = role .. "-" .. qlev + table.insert(special_levels, lev) + end +end + +for _,lev in ipairs(special_levels) do + des.reset_level(); + require(lev) +end diff --git a/test_sel.lua b/test_sel.lua new file mode 100644 index 000000000..8d71eec2b --- /dev/null +++ b/test_sel.lua @@ -0,0 +1,85 @@ + + +-- Test the selection + +function test_selection() + local sel = selection.new(); + + -- test set & get + local ret = sel:get(1,2) + if ret == 1 then + error("sel:get returned " .. ret .. " instead of 0"); + end + + sel:set(1, 2); + ret = sel:get(1, 2); + if ret ~= 1 then + error("sel:get returned " .. ret .. " instead of 1"); + end + + local x,y = sel:rndcoord(1); + if x ~= 1 or y ~= 2 then + error("sel:rndcoord returned unset coordinate"); + end + + x,y = sel:rndcoord(1); + if x ~= -2 and y ~= -1 then + error("sel:rndcoord returned (" .. x .. "," .. y .. ") coordinate"); + end + + -- OO style + sel:negate(); + sel:percentage(50); + sel:rndcoord(1); + sel:line(1,2, 50,20); + sel:randline(1,2, 50,20, 7); + sel:rect(1,2, 7,8); + sel:fillrect(1,2, 7,8); + sel:area(1,2, 7,8); + sel:grow(); + sel:filter_mapchar(' '); + sel:floodfill(1,1); + sel:circle(40, 10, 9); + sel:circle(40, 10, 9, 1); + sel:ellipse(40, 10, 20, 8); + sel:ellipse(40, 10, 20, 8, 1); + + -- variable as param + selection.get(sel, 1, 2); + selection.set(sel, 1, 2); + selection.negate(sel); + selection.percentage(sel, 50); + selection.rndcoord(sel, 1); + selection.line(sel, 1,2, 50,20); + selection.randline(sel, 1,2, 50,20, 7); + selection.rect(sel, 1,2, 7,8); + selection.fillrect(sel, 1,2, 7,8); + selection.area(sel, 1,2, 7,8); + selection.grow(sel); + selection.filter_mapchar(sel, ' '); + selection.floodfill(sel, 1,1); + selection.circle(sel, 40, 10, 9); + selection.circle(sel, 40, 10, 9, 1); + selection.ellipse(sel, 40, 10, 20, 8); + selection.ellipse(sel, 40, 10, 20, 8, 1); + + -- initializers + selection.set(1, 2); + selection.negate(); + selection.line(1,2, 50,20); + selection.randline(1,2, 50,20, 7); + selection.rect(1,2, 7,8); + selection.fillrect(1,2, 7,8); + selection.area(1,2, 7,8); + selection.floodfill(1,1); + selection.circle(40, 10, 9); + selection.circle(40, 10, 9, 1); + selection.ellipse(40, 10, 20, 8); + selection.ellipse(40, 10, 20, 8, 1); + + local sel2 = selection.clone(sel); + local sel3 = sel2:clone(); +end -- selection_tests() + + +test_selection(); diff --git a/test_src.lua b/test_src.lua new file mode 100644 index 000000000..57686d05b --- /dev/null +++ b/test_src.lua @@ -0,0 +1,88 @@ + +-- Test different src functions + +local tests = { + makeplural = { + stamen = "stamens", + caveman = "cavemen", + zorkmid = "zorkmids", + shaman = "shamans", + algae = "algae", + larvae = "larvae", + woman = "women", + nerf = "nerfs", + serf = "serfs", + knife = "knives", + baluchitherium = "baluchitheria", + mycelium = "mycelia", + hyphae = "hyphae", + amoeba = "amoebae", + vertebra = "vertebrae", + fungus = "fungi", + homunculus = "homunculi", + bus = "buses", + lotus = "lotuses", + wumpus = "wumpuses", + nemesis = "nemeses", + matzoh = "matzot", + matzah = "matzot", + gateau = "gateaus", + gateaux = "gateauxes", + bordeau = "bordeaus", + ox = "oxen", + VAX = "VAXES", + goose = "geese", + tomato = "tomatoes", + potato = "potatoes", + dingo = "dingoes", + fox = "foxes", + cookie = "cookies", + ["bunch of grapes"] = "bunches of grapes", + candelabrum = "candelabra", + deer = "deer", + fish = "fish", + foot = "feet", + tuna = "tuna", + manes = "manes", + ninja = "ninja", + sheep = "sheep", + ronin = "ronin", + roshi = "roshi", + shito = "shito", + tengu = "tengu", + vortex = "vortices", + child = "children", + scale = "scales", + tooth = "teeth", + gauntlet = "gauntlets", + ["gauntlet of power"] = "gauntlets of power", + priestess = "priestesses", + valkyrie = "valkyries", + hoof = "hooves", + louse = "lice", + mouse = "mice", + ["slice of cake"] = "slices of cake", + }, + an = { + a = "an a", + b = "a b", + ["the foo"] = "the foo", + ["molten lava"] = "molten lava", + ["iron bars"] = "iron bars", + ice = "ice", + unicorn = "a unicorn", + uranium = "a uranium", + ["one-eyed"] = "a one-eyed", + candy = "a candy", + eucalyptus = "a eucalyptus", + } +} + +for func, fval in pairs(tests) do + for instr, outstr in pairs(fval) do + local ret = nh[func](instr) + if ret ~= outstr then + error(func .. "(\"" .. instr .. "\") != \"" .. outstr .. "\" (returned \"" .. ret .. "\") instead") + end + end +end diff --git a/util/lev_comp.l b/util/lev_comp.l deleted file mode 100644 index 8866e3f6f..000000000 --- a/util/lev_comp.l +++ /dev/null @@ -1,437 +0,0 @@ -%{ -/* NetHack 3.6 lev_comp.l $NHDT-Date: 1543371690 2018/11/28 02:21:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.25 $ */ -/* Copyright (c) 1989 by Jean-Christophe Collet */ -/* NetHack may be freely redistributed. See license for details. */ - -#define LEV_LEX_C - -#include "hack.h" -#include "lev_comp.h" -#include "sp_lev.h" - -/* Most of these don't exist in flex, yywrap is macro and - * yyunput is properly declared in flex.skel. - */ -#if !defined(FLEX_SCANNER) && !defined(FLEXHACK_SCANNER) -int FDECL(yyback, (int *,int)); -int NDECL(yylook); -int NDECL(yyinput); -int NDECL(yywrap); -int NDECL(yylex); - /* Traditional lexes let yyunput() and yyoutput() default to int; - * newer ones may declare them as void since they don't return - * values. For even more fun, the lex supplied as part of the - * newer unbundled compiler for SunOS 4.x adds the void declarations - * (under __STDC__ or _cplusplus ifdefs -- otherwise they remain - * int) while the bundled lex and the one with the older unbundled - * compiler do not. To detect this, we need help from outside -- - * sys/unix/Makefile.utl. - * - * Digital UNIX is difficult and still has int in spite of all - * other signs. - */ -# if defined(NeXT) || defined(SVR4) || defined(_AIX32) -# define VOIDYYPUT -# endif -# if !defined(VOIDYYPUT) && defined(POSIX_TYPES) -# if !defined(BOS) && !defined(HISX) && !defined(_M_UNIX) && !defined(VMS) -# define VOIDYYPUT -# endif -# endif -# if !defined(VOIDYYPUT) && defined(WEIRD_LEX) -# if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX > 1) -# define VOIDYYPUT -# endif -# endif -# if defined(VOIDYYPUT) && defined(__osf__) -# undef VOIDYYPUT -# endif -# ifdef VOIDYYPUT -void FDECL(yyunput, (int)); -void FDECL(yyoutput, (int)); -# else -int FDECL(yyunput, (int)); -int FDECL(yyoutput, (int)); -# endif - -#else /* !FLEX_SCANNER && !FLEXHACK_SCANNER */ -/* most recent flex allows suppressing yyunput() altogether when not needed */ -#define YY_NO_UNPUT -#define YY_NO_INPUT -#endif - -#if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER) -/* older flex wants this */ -#define YY_MALLOC_DECL genericptr_t FDECL(malloc, (size_t)); \ - genericptr_t FDECL(realloc, (genericptr_t, size_t)); -/* newer flex assumes so needs this in case it's been suppressed */ -YY_MALLOC_DECL -#endif - -void FDECL(init_yyin, (FILE *)); -void FDECL(init_yyout, (FILE *)); - -long NDECL(handle_varstring_check); -long FDECL(corefunc_str_check, (char *, long)); - -extern void VDECL(lc_error, (const char *, ...)); -extern struct lc_vardefs *FDECL(vardef_defined,(struct lc_vardefs *,char *, int)); - -extern struct lc_vardefs *vardefs; - -extern long FDECL(method_defined, (char *, long, long *)); - -void FDECL(savetoken, (char *)); -void NDECL(newline); -void FDECL(advancepos, (char *)); - -/* - * This doesn't always get put in lev_comp.h - * (esp. when using older versions of bison). - */ -extern YYSTYPE yylval; - -int nh_line_number = 1; -int token_start_pos = 0; -char curr_token[512]; -static char map[4096]; -static int map_cnt = 0; - -FILE *orig_yyin = NULL; - -#define ST_RET(x) do { savetoken(yytext); return x; } while (0); -#define ST_RETF(y, x) do { savetoken(yytext); y; return x; } while (0); - -%} -%e 2500 -%p 10000 -%n 1500 -%s MAPC -%% -ENDMAP { - savetoken(yytext); - BEGIN(INITIAL); - yylval.map = (char *) alloc(map_cnt + 1); - (void) strncpy(yylval.map, map, map_cnt); - yylval.map[map_cnt] = 0; - map_cnt = 0; - return MAP_ID; - } -[-|}{+xABCISHKPLWTF\\#. 0123456789]*\r?\n { - int len = yyleng; - savetoken(yytext); - /* convert \r\n to \n */ - if (len >= 2 && yytext[len - 2] == '\r') - len -= 1; - (void) strncpy(map + map_cnt, yytext, len); - map_cnt += len; - map[map_cnt - 1] = '\n'; - map[map_cnt] = '\0'; - newline(); - } -^[ \t]*#.*\n { savetoken(yytext); newline(); } -MESSAGE ST_RET(MESSAGE_ID); -NOMAP ST_RET(NOMAP_ID); -MAZE ST_RET(MAZE_ID); -LEVEL ST_RET(LEVEL_ID); -INIT_MAP ST_RET(LEV_INIT_ID); -mazegrid ST_RET(MAZE_GRID_ID); -solidfill ST_RET(SOLID_FILL_ID); -mines ST_RET(MINES_ID); -rogue ST_RET(ROGUELEV_ID); -FLAGS ST_RET(FLAGS_ID); -GEOMETRY ST_RET(GEOMETRY_ID); -^MAP\r?\n { savetoken(yytext); BEGIN(MAPC); newline(); } -obj(ect)? ST_RET(object_ID); -OBJECT ST_RET(OBJECT_ID); -CONTAINER ST_RET(COBJECT_ID); -MONSTER ST_RET(MONSTER_ID); -monster ST_RET(monster_ID); -TRAP ST_RET(TRAP_ID); -DOOR ST_RET(DOOR_ID); -ROOMDOOR ST_RET(ROOMDOOR_ID); -DRAWBRIDGE ST_RET(DRAWBRIDGE_ID); -MAZEWALK ST_RET(MAZEWALK_ID); -WALLIFY ST_RET(WALLIFY_ID); -REGION ST_RET(REGION_ID); -ALTAR ST_RET(ALTAR_ID); -LADDER ST_RET(LADDER_ID); -STAIR ST_RET(STAIR_ID); -PORTAL ST_RET(PORTAL_ID); -TELEPORT_REGION ST_RET(TELEPRT_ID); -BRANCH ST_RET(BRANCH_ID); -FOUNTAIN ST_RET(FOUNTAIN_ID); -SINK ST_RET(SINK_ID); -POOL ST_RET(POOL_ID); -NON_DIGGABLE ST_RET(NON_DIGGABLE_ID); -NON_PASSWALL ST_RET(NON_PASSWALL_ID); -IF ST_RET(IF_ID); -ELSE ST_RET(ELSE_ID); -EXIT ST_RET(EXIT_ID); -ROOM ST_RET(ROOM_ID); -SUBROOM ST_RET(SUBROOM_ID); -RANDOM_CORRIDORS ST_RET(RAND_CORRIDOR_ID); -CORRIDOR ST_RET(CORRIDOR_ID); -TERRAIN ST_RET(TERRAIN_ID); -terrain ST_RET(terrain_ID); -REPLACE_TERRAIN ST_RET(REPLACE_TERRAIN_ID); -GOLD ST_RET(GOLD_ID); -GRAVE ST_RET(GRAVE_ID); -ENGRAVING ST_RET(ENGRAVING_ID); -MINERALIZE ST_RET(MINERALIZE_ID); -(NAME|name) ST_RET(NAME_ID); -FOR ST_RET(FOR_ID); -TO ST_RET(TO_ID); -LOOP ST_RET(LOOP_ID); -SWITCH ST_RET(SWITCH_ID); -CASE ST_RET(CASE_ID); -BREAK ST_RET(BREAK_ID); -DEFAULT ST_RET(DEFAULT_ID); -FUNCTION ST_RET(FUNCTION_ID); -SHUFFLE ST_RET(SHUFFLE_ID); -montype ST_RET(MONTYPE_ID); -selection ST_RET(selection_ID); -rect ST_RET(rect_ID); -fillrect ST_RET(fillrect_ID); -line ST_RET(line_ID); -randline ST_RET(randline_ID); -grow ST_RET(grow_ID); -floodfill ST_RET(flood_ID); -rndcoord ST_RET(rndcoord_ID); -circle ST_RET(circle_ID); -ellipse ST_RET(ellipse_ID); -filter ST_RET(filter_ID); -gradient ST_RET(gradient_ID); -complement ST_RET(complement_ID); -radial { savetoken(yytext); yylval.i=SEL_GRADIENT_RADIAL; return GRADIENT_TYPE; } -square { savetoken(yytext); yylval.i=SEL_GRADIENT_SQUARE; return GRADIENT_TYPE; } -dry { savetoken(yytext); yylval.i=DRY; return HUMIDITY_TYPE; } -wet { savetoken(yytext); yylval.i=WET; return HUMIDITY_TYPE; } -hot { savetoken(yytext); yylval.i=HOT; return HUMIDITY_TYPE; } -solid { savetoken(yytext); yylval.i=SOLID; return HUMIDITY_TYPE; } -any { savetoken(yytext); yylval.i=ANY_LOC; return HUMIDITY_TYPE; } -levregion ST_RET(LEV); -quantity ST_RET(QUANTITY_ID); -buried ST_RET(BURIED_ID); -eroded ST_RET(ERODED_ID); -erodeproof ST_RET(ERODEPROOF_ID); -trapped { savetoken(yytext); yylval.i=1; return TRAPPED_STATE; } -not_trapped { savetoken(yytext); yylval.i=0; return TRAPPED_STATE; } -recharged ST_RET(RECHARGED_ID); -invisible ST_RET(INVIS_ID); -greased ST_RET(GREASED_ID); -female ST_RET(FEMALE_ID); -cancelled ST_RET(CANCELLED_ID); -revived ST_RET(REVIVED_ID); -avenge ST_RET(AVENGE_ID); -fleeing ST_RET(FLEEING_ID); -blinded ST_RET(BLINDED_ID); -paralyzed ST_RET(PARALYZED_ID); -stunned ST_RET(STUNNED_ID); -confused ST_RET(CONFUSED_ID); -seen_traps ST_RET(SEENTRAPS_ID); -all ST_RET(ALL_ID); -horizontal ST_RETF((yylval.i=1), HORIZ_OR_VERT); -vertical { savetoken(yytext); yylval.i=2; return HORIZ_OR_VERT; } -open { savetoken(yytext); yylval.i=D_ISOPEN; return DOOR_STATE; } -closed { savetoken(yytext); yylval.i=D_CLOSED; return DOOR_STATE; } -locked { savetoken(yytext); yylval.i=D_LOCKED; return DOOR_STATE; } -nodoor { savetoken(yytext); yylval.i=D_NODOOR; return DOOR_STATE; } -broken { savetoken(yytext); yylval.i=D_BROKEN; return DOOR_STATE; } -secret { savetoken(yytext); yylval.i=D_SECRET; return DOOR_STATE; } -north { savetoken(yytext); yylval.i=W_NORTH; return DIRECTION; } -east { savetoken(yytext); yylval.i=W_EAST; return DIRECTION; } -south { savetoken(yytext); yylval.i=W_SOUTH; return DIRECTION; } -west { savetoken(yytext); yylval.i=W_WEST; return DIRECTION; } -random { savetoken(yytext); yylval.i = -1; return RANDOM_TYPE; } -random\[ { savetoken(yytext); yylval.i = -1; return RANDOM_TYPE_BRACKET; } -none { savetoken(yytext); yylval.i = -2; return NONE; } -align ST_RET(A_REGISTER); -left { savetoken(yytext); yylval.i=1; return LEFT_OR_RIGHT; } -half-left { savetoken(yytext); yylval.i=2; return LEFT_OR_RIGHT; } -center { savetoken(yytext); yylval.i=3; return CENTER; } -half-right { savetoken(yytext); yylval.i=4; return LEFT_OR_RIGHT; } -right { savetoken(yytext); yylval.i=5; return LEFT_OR_RIGHT; } -top { savetoken(yytext); yylval.i=1; return TOP_OR_BOT; } -bottom { savetoken(yytext); yylval.i=5; return TOP_OR_BOT; } -lit { savetoken(yytext); yylval.i=1; return LIGHT_STATE; } -unlit { savetoken(yytext); yylval.i=0; return LIGHT_STATE; } -filled { savetoken(yytext); yylval.i=1; return FILLING; } -unfilled { savetoken(yytext); yylval.i=0; return FILLING; } -regular { savetoken(yytext); yylval.i=0; return IRREGULAR; } -irregular { savetoken(yytext); yylval.i=1; return IRREGULAR; } -unjoined { savetoken(yytext); yylval.i=1; return JOINED; } -joined { savetoken(yytext); yylval.i=0; return JOINED; } -limited { savetoken(yytext); yylval.i=1; return LIMITED; } -unlimited { savetoken(yytext); yylval.i=0; return LIMITED; } -noalign { savetoken(yytext); yylval.i= AM_NONE; return ALIGNMENT; } -law { savetoken(yytext); yylval.i= AM_LAWFUL; return ALIGNMENT; } -neutral { savetoken(yytext); yylval.i= AM_NEUTRAL; return ALIGNMENT; } -chaos { savetoken(yytext); yylval.i= AM_CHAOTIC; return ALIGNMENT; } -coaligned { savetoken(yytext); yylval.i= AM_SPLEV_CO; return ALIGNMENT; } -noncoaligned { savetoken(yytext); yylval.i= AM_SPLEV_NONCO; return ALIGNMENT; } -peaceful { savetoken(yytext); yylval.i=1; return MON_ATTITUDE; } -hostile { savetoken(yytext); yylval.i=0; return MON_ATTITUDE; } -asleep { savetoken(yytext); yylval.i=1; return MON_ALERTNESS; } -awake { savetoken(yytext); yylval.i=0; return MON_ALERTNESS; } -m_feature { savetoken(yytext); yylval.i= M_AP_FURNITURE; return MON_APPEARANCE; } -m_monster { savetoken(yytext); yylval.i= M_AP_MONSTER; return MON_APPEARANCE; } -m_object { savetoken(yytext); yylval.i= M_AP_OBJECT; return MON_APPEARANCE; } -sanctum { savetoken(yytext); yylval.i=2; return ALTAR_TYPE; } -shrine { savetoken(yytext); yylval.i=1; return ALTAR_TYPE; } -altar { savetoken(yytext); yylval.i=0; return ALTAR_TYPE; } -up { savetoken(yytext); yylval.i=1; return UP_OR_DOWN; } -down { savetoken(yytext); yylval.i=0; return UP_OR_DOWN; } -false { savetoken(yytext); yylval.i=0; return BOOLEAN; } -true { savetoken(yytext); yylval.i=1; return BOOLEAN; } -dust { savetoken(yytext); yylval.i=DUST; return ENGRAVING_TYPE; } -engrave { savetoken(yytext); yylval.i=ENGRAVE; return ENGRAVING_TYPE; } -burn { savetoken(yytext); yylval.i=BURN; return ENGRAVING_TYPE; } -mark { savetoken(yytext); yylval.i=MARK; return ENGRAVING_TYPE; } -blood { savetoken(yytext); yylval.i=ENGR_BLOOD; return ENGRAVING_TYPE; } -blessed { savetoken(yytext); yylval.i=1; return CURSE_TYPE; } -uncursed { savetoken(yytext); yylval.i=2; return CURSE_TYPE; } -cursed { savetoken(yytext); yylval.i=3; return CURSE_TYPE; } -noteleport { savetoken(yytext); yylval.i=NOTELEPORT; return FLAG_TYPE; } -hardfloor { savetoken(yytext); yylval.i=HARDFLOOR; return FLAG_TYPE; } -nommap { savetoken(yytext); yylval.i=NOMMAP; return FLAG_TYPE; } -arboreal { savetoken(yytext); yylval.i=ARBOREAL; return FLAG_TYPE; } /* KMH */ -shortsighted { savetoken(yytext); yylval.i=SHORTSIGHTED; return FLAG_TYPE; } -mazelevel { savetoken(yytext); yylval.i=MAZELEVEL; return FLAG_TYPE; } -premapped { savetoken(yytext); yylval.i=PREMAPPED; return FLAG_TYPE; } -shroud { savetoken(yytext); yylval.i=SHROUD; return FLAG_TYPE; } -graveyard { savetoken(yytext); yylval.i=GRAVEYARD; return FLAG_TYPE; } -icedpools { savetoken(yytext); yylval.i=ICEDPOOLS; return FLAG_TYPE; } -solidify { savetoken(yytext); yylval.i=SOLIDIFY; return FLAG_TYPE; } -corrmaze { savetoken(yytext); yylval.i=CORRMAZE; return FLAG_TYPE; } -inaccessibles { savetoken(yytext); yylval.i=CHECK_INACCESSIBLES; return FLAG_TYPE; } -[0-9]+d[0-9]+ { char *p = index(yytext, 'd'); - savetoken(yytext); - if (p) { - *p++ = '\0'; - yylval.dice.num = atoi(yytext); - yylval.dice.die = atoi(p); - } else { - yylval.dice.num = yylval.dice.die = 1; - } - return DICE; - } -\[\ *[0-9]+\%\ *\] { savetoken(yytext); yylval.i = atoi(yytext + 1); - if (yylval.i < 0 || yylval.i > 100) - lc_error("Unexpected percentile '%li%%'", yylval.i); - return PERCENT; } --[0-9]+ { savetoken(yytext); yylval.i=atoi(yytext); return MINUS_INTEGER; } -\+[0-9]+ { savetoken(yytext); yylval.i=atoi(yytext); return PLUS_INTEGER; } -[0-9]+\% { savetoken(yytext); yylval.i = atoi(yytext); - if (yylval.i < 0 || yylval.i > 100) - lc_error("Unexpected percentile '%li%%'", yylval.i); - return SPERCENT; } -[0-9]+ { savetoken(yytext); yylval.i=atoi(yytext); return INTEGER; } -\"[^"]*\" { savetoken(yytext); - yytext[yyleng - 1] = '\0'; /* discard the trailing \" */ - yylval.map = dupstr(yytext + 1); /* skip the first \" */ - return STRING; } -\$[a-zA-Z_]+ { savetoken(yytext); return handle_varstring_check(); } -"==" { savetoken(yytext); yylval.i = SPO_JE; return COMPARE_TYPE; } -"!=" { savetoken(yytext); yylval.i = SPO_JNE; return COMPARE_TYPE; } -"<>" { savetoken(yytext); yylval.i = SPO_JNE; return COMPARE_TYPE; } -"<=" { savetoken(yytext); yylval.i = SPO_JLE; return COMPARE_TYPE; } -">=" { savetoken(yytext); yylval.i = SPO_JGE; return COMPARE_TYPE; } -"<" { savetoken(yytext); yylval.i = SPO_JL; return COMPARE_TYPE; } -">" { savetoken(yytext); yylval.i = SPO_JG; return COMPARE_TYPE; } -\r?\n { newline(); } -[ \t]+ { advancepos(yytext); } -'\\.' { savetoken(yytext); yylval.i = yytext[2]; return CHAR; } -'.' { savetoken(yytext); yylval.i = yytext[1]; return CHAR; } -[-_a-zA-Z0-9]+ ST_RET(UNKNOWN_TYPE); -. { savetoken(yytext); return yytext[0]; } -%% -#ifdef AMIGA -long * -alloc(n) - unsigned n; -{ - return (long *) malloc(n); -} -#endif - -/* routine to switch to another input file; needed for flex */ -void -init_yyin( input_f ) -FILE *input_f; -{ -#if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER) - if (yyin) - yyrestart(input_f); - else -#endif - yyin = input_f; - - if (!orig_yyin) - orig_yyin = yyin; -} -/* analogous routine (for completeness) */ -void -init_yyout( output_f ) -FILE *output_f; -{ - yyout = output_f; -} - -long -handle_varstring_check() -{ - struct lc_vardefs *vd; - - yylval.map = dupstr(yytext); - if ((vd = vardef_defined(vardefs, yytext, 1)) != 0) { - long l = vd->var_type; - int a = ((l & SPOVAR_ARRAY) == SPOVAR_ARRAY); - - l &= ~SPOVAR_ARRAY; - if (l == SPOVAR_INT) - return (a ? VARSTRING_INT_ARRAY : VARSTRING_INT); - if (l == SPOVAR_STRING) - return (a ? VARSTRING_STRING_ARRAY : VARSTRING_STRING); - if (l == SPOVAR_VARIABLE) - return (a ? VARSTRING_VAR_ARRAY : VARSTRING_VAR); - if (l == SPOVAR_COORD) - return (a ? VARSTRING_COORD_ARRAY : VARSTRING_COORD); - if (l == SPOVAR_REGION) - return (a ? VARSTRING_REGION_ARRAY : VARSTRING_REGION); - if (l == SPOVAR_MAPCHAR) - return (a ? VARSTRING_MAPCHAR_ARRAY : VARSTRING_MAPCHAR); - if (l == SPOVAR_MONST) - return (a ? VARSTRING_MONST_ARRAY : VARSTRING_MONST); - if (l == SPOVAR_OBJ) - return (a ? VARSTRING_OBJ_ARRAY : VARSTRING_OBJ); - if (l == SPOVAR_SEL) - return (a ? VARSTRING_SEL_ARRAY : VARSTRING_SEL); - } - return VARSTRING; -} - -void -newline() -{ - nh_line_number++; - token_start_pos = 0; - (void) memset((genericptr_t) curr_token, 0, 512); -} - -void -savetoken(s) -char *s; -{ - Sprintf(curr_token, "%s", s); - advancepos(s); -} - -void -advancepos(s) -char *s; -{ - token_start_pos += strlen(s); -} - -/*lev_comp.l*/ diff --git a/util/lev_comp.y b/util/lev_comp.y deleted file mode 100644 index 1b1c93056..000000000 --- a/util/lev_comp.y +++ /dev/null @@ -1,2721 +0,0 @@ -%{ -/* NetHack 3.6 lev_comp.y $NHDT-Date: 1543371691 2018/11/28 02:21:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.22 $ */ -/* Copyright (c) 1989 by Jean-Christophe Collet */ -/* NetHack may be freely redistributed. See license for details. */ - -/* - * This file contains the Level Compiler code - * It may handle special mazes & special room-levels - */ - -/* In case we're using bison in AIX. This definition must be - * placed before any other C-language construct in the file - * excluding comments and preprocessor directives (thanks IBM - * for this wonderful feature...). - * - * Note: some cpps barf on this 'undefined control' (#pragma). - * Addition of the leading space seems to prevent barfage for now, - * and AIX will still see the directive. - */ -#ifdef _AIX - #pragma alloca /* keep leading space! */ -#endif - -#define SPEC_LEV /* for USE_OLDARGS (sp_lev.h) */ -#include "hack.h" -#include "sp_lev.h" - -#define ERR (-1) -/* many types of things are put in chars for transference to NetHack. - * since some systems will use signed chars, limit everybody to the - * same number for portability. - */ -#define MAX_OF_TYPE 128 - -#define MAX_NESTED_IFS 20 -#define MAX_SWITCH_CASES 20 - -#define New(type) \ - (type *) memset((genericptr_t) alloc(sizeof (type)), 0, sizeof (type)) -#define NewTab(type, size) (type **) alloc(sizeof (type *) * size) -#define Free(ptr) free((genericptr_t) ptr) - -extern void VDECL(lc_error, (const char *, ...)); -extern void VDECL(lc_warning, (const char *, ...)); -extern void FDECL(yyerror, (const char *)); -extern void FDECL(yywarning, (const char *)); -extern int NDECL(yylex); -int NDECL(yyparse); - -extern int FDECL(get_floor_type, (CHAR_P)); -extern int FDECL(get_room_type, (char *)); -extern int FDECL(get_trap_type, (char *)); -extern int FDECL(get_monster_id, (char *,CHAR_P)); -extern int FDECL(get_object_id, (char *,CHAR_P)); -extern boolean FDECL(check_monster_char, (CHAR_P)); -extern boolean FDECL(check_object_char, (CHAR_P)); -extern char FDECL(what_map_char, (CHAR_P)); -extern void FDECL(scan_map, (char *, sp_lev *)); -extern void FDECL(add_opcode, (sp_lev *, int, genericptr_t)); -extern genericptr_t FDECL(get_last_opcode_data1, (sp_lev *, int)); -extern genericptr_t FDECL(get_last_opcode_data2, (sp_lev *, int, int)); -extern boolean FDECL(check_subrooms, (sp_lev *)); -extern boolean FDECL(write_level_file, (char *,sp_lev *)); -extern struct opvar *FDECL(set_opvar_int, (struct opvar *, long)); -extern void VDECL(add_opvars, (sp_lev *, const char *, ...)); -extern void FDECL(start_level_def, (sp_lev * *, char *)); - -extern struct lc_funcdefs *FDECL(funcdef_new, (long,char *)); -extern void FDECL(funcdef_free_all, (struct lc_funcdefs *)); -extern struct lc_funcdefs *FDECL(funcdef_defined, (struct lc_funcdefs *, - char *, int)); -extern char *FDECL(funcdef_paramtypes, (struct lc_funcdefs *)); -extern char *FDECL(decode_parm_str, (char *)); - -extern struct lc_vardefs *FDECL(vardef_new, (long,char *)); -extern void FDECL(vardef_free_all, (struct lc_vardefs *)); -extern struct lc_vardefs *FDECL(vardef_defined, (struct lc_vardefs *, - char *, int)); - -extern void NDECL(break_stmt_start); -extern void FDECL(break_stmt_end, (sp_lev *)); -extern void FDECL(break_stmt_new, (sp_lev *, long)); - -extern void FDECL(splev_add_from, (sp_lev *, sp_lev *)); - -extern void FDECL(check_vardef_type, (struct lc_vardefs *, char *, long)); -extern void FDECL(vardef_used, (struct lc_vardefs *, char *)); -extern struct lc_vardefs *FDECL(add_vardef_type, (struct lc_vardefs *, - char *, long)); - -extern int FDECL(reverse_jmp_opcode, (int)); - -struct coord { - long x; - long y; -}; - -struct forloopdef { - char *varname; - long jmp_point; -}; -static struct forloopdef forloop_list[MAX_NESTED_IFS]; -static short n_forloops = 0; - - -sp_lev *splev = NULL; - -static struct opvar *if_list[MAX_NESTED_IFS]; - -static short n_if_list = 0; - -unsigned int max_x_map, max_y_map; -int obj_containment = 0; - -int in_container_obj = 0; - -/* integer value is possibly an inconstant value (eg. dice notation - or a variable) */ -int is_inconstant_number = 0; - -int in_switch_statement = 0; -static struct opvar *switch_check_jump = NULL; -static struct opvar *switch_default_case = NULL; -static struct opvar *switch_case_list[MAX_SWITCH_CASES]; -static long switch_case_value[MAX_SWITCH_CASES]; -int n_switch_case_list = 0; - -int allow_break_statements = 0; -struct lc_breakdef *break_list = NULL; - -extern struct lc_vardefs *vardefs; /* variable definitions */ - - -struct lc_vardefs *function_tmp_var_defs = NULL; -extern struct lc_funcdefs *function_definitions; -struct lc_funcdefs *curr_function = NULL; -struct lc_funcdefs_parm * curr_function_param = NULL; -int in_function_definition = 0; -sp_lev *function_splev_backup = NULL; - -extern int fatal_error; -extern int got_errors; -extern int line_number; -extern const char *fname; - -extern char curr_token[512]; - -%} - -%union -{ - long i; - char *map; - struct { - long room; - long wall; - long door; - } corpos; - struct { - long area; - long x1; - long y1; - long x2; - long y2; - } lregn; - struct { - long x; - long y; - } crd; - struct { - long ter; - long lit; - } terr; - struct { - long height; - long width; - } sze; - struct { - long die; - long num; - } dice; - struct { - long cfunc; - char *varstr; - } meth; -} - - -%token CHAR INTEGER BOOLEAN PERCENT SPERCENT -%token MINUS_INTEGER PLUS_INTEGER -%token MAZE_GRID_ID SOLID_FILL_ID MINES_ID ROGUELEV_ID -%token MESSAGE_ID MAZE_ID LEVEL_ID LEV_INIT_ID GEOMETRY_ID NOMAP_ID -%token OBJECT_ID COBJECT_ID MONSTER_ID TRAP_ID DOOR_ID DRAWBRIDGE_ID -%token object_ID monster_ID terrain_ID -%token MAZEWALK_ID WALLIFY_ID REGION_ID FILLING IRREGULAR JOINED -%token ALTAR_ID LADDER_ID STAIR_ID NON_DIGGABLE_ID NON_PASSWALL_ID ROOM_ID -%token PORTAL_ID TELEPRT_ID BRANCH_ID LEV MINERALIZE_ID -%token CORRIDOR_ID GOLD_ID ENGRAVING_ID FOUNTAIN_ID POOL_ID SINK_ID NONE -%token RAND_CORRIDOR_ID DOOR_STATE LIGHT_STATE CURSE_TYPE ENGRAVING_TYPE -%token DIRECTION RANDOM_TYPE RANDOM_TYPE_BRACKET A_REGISTER -%token ALIGNMENT LEFT_OR_RIGHT CENTER TOP_OR_BOT ALTAR_TYPE UP_OR_DOWN -%token SUBROOM_ID NAME_ID FLAGS_ID FLAG_TYPE MON_ATTITUDE MON_ALERTNESS -%token MON_APPEARANCE ROOMDOOR_ID IF_ID ELSE_ID -%token TERRAIN_ID HORIZ_OR_VERT REPLACE_TERRAIN_ID -%token EXIT_ID SHUFFLE_ID -%token QUANTITY_ID BURIED_ID LOOP_ID -%token FOR_ID TO_ID -%token SWITCH_ID CASE_ID BREAK_ID DEFAULT_ID -%token ERODED_ID TRAPPED_STATE RECHARGED_ID INVIS_ID GREASED_ID -%token FEMALE_ID CANCELLED_ID REVIVED_ID AVENGE_ID FLEEING_ID BLINDED_ID -%token PARALYZED_ID STUNNED_ID CONFUSED_ID SEENTRAPS_ID ALL_ID -%token MONTYPE_ID -%token GRAVE_ID ERODEPROOF_ID -%token FUNCTION_ID -%token MSG_OUTPUT_TYPE -%token COMPARE_TYPE -%token UNKNOWN_TYPE -%token rect_ID fillrect_ID line_ID randline_ID grow_ID -%token selection_ID flood_ID -%token rndcoord_ID circle_ID ellipse_ID filter_ID complement_ID -%token gradient_ID GRADIENT_TYPE LIMITED HUMIDITY_TYPE -%token ',' ':' '(' ')' '[' ']' '{' '}' -%token STRING MAP_ID -%token NQSTRING VARSTRING -%token CFUNC CFUNC_INT CFUNC_STR CFUNC_COORD CFUNC_REGION -%token VARSTRING_INT VARSTRING_INT_ARRAY -%token VARSTRING_STRING VARSTRING_STRING_ARRAY -%token VARSTRING_VAR VARSTRING_VAR_ARRAY -%token VARSTRING_COORD VARSTRING_COORD_ARRAY -%token VARSTRING_REGION VARSTRING_REGION_ARRAY -%token VARSTRING_MAPCHAR VARSTRING_MAPCHAR_ARRAY -%token VARSTRING_MONST VARSTRING_MONST_ARRAY -%token VARSTRING_OBJ VARSTRING_OBJ_ARRAY -%token VARSTRING_SEL VARSTRING_SEL_ARRAY -%token METHOD_INT METHOD_INT_ARRAY -%token METHOD_STRING METHOD_STRING_ARRAY -%token METHOD_VAR METHOD_VAR_ARRAY -%token METHOD_COORD METHOD_COORD_ARRAY -%token METHOD_REGION METHOD_REGION_ARRAY -%token METHOD_MAPCHAR METHOD_MAPCHAR_ARRAY -%token METHOD_MONST METHOD_MONST_ARRAY -%token METHOD_OBJ METHOD_OBJ_ARRAY -%token METHOD_SEL METHOD_SEL_ARRAY -%token DICE -%type h_justif v_justif trap_name room_type door_state light_state -%type alignment altar_type a_register roomfill door_pos -%type alignment_prfx -%type door_wall walled secret -%type dir_list teleprt_detail -%type object_infos object_info monster_infos monster_info -%type levstatements stmt_block region_detail_end -%type engraving_type flag_list roomregionflag roomregionflags -%type optroomregionflags -%type humidity_flags -%type comparestmt encodecoord encoderegion mapchar -%type seen_trap_mask -%type encodemonster encodeobj encodeobj_list -%type integer_list string_list encodecoord_list encoderegion_list -%type mapchar_list encodemonster_list -%type opt_percent opt_fillchar -%type all_integers -%type ter_selection ter_selection_x -%type func_param_type -%type objectid monsterid terrainid -%type opt_coord_or_var opt_limited -%type mazefiller -%type level_def -%type any_var any_var_array any_var_or_arr any_var_or_unk -%type func_call_params_list func_call_param_list -%type func_call_param_part -%type corr_spec -%type region lev_region -%type room_pos subroom_pos room_align -%type room_size -%type terrain_type -%left '+' '-' -%left '*' '/' '%' -%start file - -%% -file : /* nothing */ - | levels - ; - -levels : level - | level levels - ; - -level : level_def flags levstatements - { - if (fatal_error > 0) { - (void) fprintf(stderr, - "%s: %d errors detected for level \"%s\". No output created!\n", - fname, fatal_error, $1); - fatal_error = 0; - got_errors++; - } else if (!got_errors) { - if (!write_level_file($1, splev)) { - lc_error("Can't write output file for '%s'!", - $1); - exit(EXIT_FAILURE); - } - } - Free($1); - Free(splev); - splev = NULL; - vardef_free_all(vardefs); - vardefs = NULL; - } - ; - -level_def : LEVEL_ID ':' STRING - { - start_level_def(&splev, $3); - $$ = $3; - } - | MAZE_ID ':' STRING ',' mazefiller - { - start_level_def(&splev, $3); - if ($5 == -1) { - add_opvars(splev, "iiiiiiiio", - VA_PASS9(LVLINIT_MAZEGRID, HWALL, 0,0, - 0,0,0,0, SPO_INITLEVEL)); - } else { - int bg = (int) what_map_char((char) $5); - - add_opvars(splev, "iiiiiiiio", - VA_PASS9(LVLINIT_SOLIDFILL, bg, 0,0, - 0,0,0,0, SPO_INITLEVEL)); - } - add_opvars(splev, "io", - VA_PASS2(MAZELEVEL, SPO_LEVEL_FLAGS)); - max_x_map = COLNO-1; - max_y_map = ROWNO; - $$ = $3; - } - ; - -mazefiller : RANDOM_TYPE - { - $$ = -1; - } - | CHAR - { - $$ = what_map_char((char) $1); - } - ; - -lev_init : LEV_INIT_ID ':' SOLID_FILL_ID ',' terrain_type - { - int filling = (int) $5.ter; - - if (filling == INVALID_TYPE || filling >= MAX_TYPE) - lc_error("INIT_MAP: Invalid fill char type."); - add_opvars(splev, "iiiiiiiio", - VA_PASS9(LVLINIT_SOLIDFILL, filling, - 0, (int) $5.lit, - 0,0,0,0, SPO_INITLEVEL)); - max_x_map = COLNO-1; - max_y_map = ROWNO; - } - | LEV_INIT_ID ':' MAZE_GRID_ID ',' CHAR - { - int filling = (int) what_map_char((char) $5); - - if (filling == INVALID_TYPE || filling >= MAX_TYPE) - lc_error("INIT_MAP: Invalid fill char type."); - add_opvars(splev, "iiiiiiiio", - VA_PASS9(LVLINIT_MAZEGRID, filling, 0,0, - 0,0,0,0, SPO_INITLEVEL)); - max_x_map = COLNO-1; - max_y_map = ROWNO; - } - | LEV_INIT_ID ':' ROGUELEV_ID - { - add_opvars(splev, "iiiiiiiio", - VA_PASS9(LVLINIT_ROGUE,0,0,0, - 0,0,0,0, SPO_INITLEVEL)); - } - | LEV_INIT_ID ':' MINES_ID ',' CHAR ',' CHAR ',' BOOLEAN ',' BOOLEAN ',' light_state ',' walled opt_fillchar - { - int fg = (int) what_map_char((char) $5), - bg = (int) what_map_char((char) $7); - int smoothed = (int) $9, - joined = (int) $11, - lit = (int) $13, - walled = (int) $15, - filling = (int) $16; - - if (fg == INVALID_TYPE || fg >= MAX_TYPE) - lc_error("INIT_MAP: Invalid foreground type."); - if (bg == INVALID_TYPE || bg >= MAX_TYPE) - lc_error("INIT_MAP: Invalid background type."); - if (joined && fg != CORR && fg != ROOM) - lc_error("INIT_MAP: Invalid foreground type for joined map."); - - if (filling == INVALID_TYPE) - lc_error("INIT_MAP: Invalid fill char type."); - - add_opvars(splev, "iiiiiiiio", - VA_PASS9(LVLINIT_MINES, filling, walled, lit, - joined, smoothed, bg, fg, - SPO_INITLEVEL)); - max_x_map = COLNO-1; - max_y_map = ROWNO; - } - ; - -opt_limited : /* nothing */ - { - $$ = 0; - } - | ',' LIMITED - { - $$ = $2; - } - ; - -opt_coord_or_var : /* nothing */ - { - add_opvars(splev, "o", VA_PASS1(SPO_COPY)); - $$ = 0; - } - | ',' coord_or_var - { - $$ = 1; - } - ; - -opt_fillchar : /* nothing */ - { - $$ = -1; - } - | ',' CHAR - { - $$ = what_map_char((char) $2); - } - ; - - -walled : BOOLEAN - | RANDOM_TYPE - ; - -flags : /* nothing */ - { - add_opvars(splev, "io", VA_PASS2(0, SPO_LEVEL_FLAGS)); - } - | FLAGS_ID ':' flag_list - { - add_opvars(splev, "io", - VA_PASS2((int) $3, SPO_LEVEL_FLAGS)); - } - ; - -flag_list : FLAG_TYPE ',' flag_list - { - $$ = ($1 | $3); - } - | FLAG_TYPE - { - $$ = $1; - } - ; - -levstatements : /* nothing */ - { - $$ = 0; - } - | levstatement levstatements - { - $$ = 1 + $2; - } - ; - -stmt_block : '{' levstatements '}' - { - $$ = $2; - } - ; - -levstatement : message - | lev_init - | altar_detail - | grave_detail - | branch_region - | corridor - | variable_define - | shuffle_detail - | diggable_detail - | door_detail - | drawbridge_detail - | engraving_detail - | mineralize - | fountain_detail - | gold_detail - | switchstatement - | forstatement - | loopstatement - | ifstatement - | chancestatement - | exitstatement - | breakstatement - | function_define - | function_call - | ladder_detail - | map_definition - | mazewalk_detail - | monster_detail - | object_detail - | passwall_detail - | pool_detail - | portal_region - | random_corridors - | region_detail - | room_def - | subroom_def - | sink_detail - | terrain_detail - | replace_terrain_detail - | stair_detail - | stair_region - | teleprt_region - | trap_detail - | wallify_detail - ; - -any_var_array : VARSTRING_INT_ARRAY - | VARSTRING_STRING_ARRAY - | VARSTRING_VAR_ARRAY - | VARSTRING_COORD_ARRAY - | VARSTRING_REGION_ARRAY - | VARSTRING_MAPCHAR_ARRAY - | VARSTRING_MONST_ARRAY - | VARSTRING_OBJ_ARRAY - | VARSTRING_SEL_ARRAY - ; - -any_var : VARSTRING_INT - | VARSTRING_STRING - | VARSTRING_VAR - | VARSTRING_COORD - | VARSTRING_REGION - | VARSTRING_MAPCHAR - | VARSTRING_MONST - | VARSTRING_OBJ - | VARSTRING_SEL - ; - -any_var_or_arr : any_var_array - | any_var - | VARSTRING - ; - -any_var_or_unk : VARSTRING - | any_var - ; - -shuffle_detail : SHUFFLE_ID ':' any_var_array - { - struct lc_vardefs *vd; - - if ((vd = vardef_defined(vardefs, $3, 1))) { - if (!(vd->var_type & SPOVAR_ARRAY)) - lc_error("Trying to shuffle non-array variable '%s'", - $3); - } else - lc_error("Trying to shuffle undefined variable '%s'", - $3); - add_opvars(splev, "so", VA_PASS2($3, SPO_SHUFFLE_ARRAY)); - Free($3); - } - ; - -variable_define : any_var_or_arr '=' math_expr_var - { - vardefs = add_vardef_type(vardefs, $1, SPOVAR_INT); - add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' selection_ID ':' ter_selection - { - vardefs = add_vardef_type(vardefs, $1, SPOVAR_SEL); - add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' string_expr - { - vardefs = add_vardef_type(vardefs, $1, SPOVAR_STRING); - add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' terrainid ':' mapchar_or_var - { - vardefs = add_vardef_type(vardefs, $1, SPOVAR_MAPCHAR); - add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' monsterid ':' monster_or_var - { - vardefs = add_vardef_type(vardefs, $1, SPOVAR_MONST); - add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' objectid ':' object_or_var - { - vardefs = add_vardef_type(vardefs, $1, SPOVAR_OBJ); - add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' coord_or_var - { - vardefs = add_vardef_type(vardefs, $1, SPOVAR_COORD); - add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' region_or_var - { - vardefs = add_vardef_type(vardefs, $1, SPOVAR_REGION); - add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' '{' integer_list '}' - { - int n_items = (int) $4; - - vardefs = add_vardef_type(vardefs, $1, - SPOVAR_INT | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' '{' encodecoord_list '}' - { - int n_items = (int) $4; - - vardefs = add_vardef_type(vardefs, $1, - SPOVAR_COORD | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' '{' encoderegion_list '}' - { - int n_items = (int) $4; - - vardefs = add_vardef_type(vardefs, $1, - SPOVAR_REGION | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' terrainid ':' '{' mapchar_list '}' - { - int n_items = (int) $6; - - vardefs = add_vardef_type(vardefs, $1, - SPOVAR_MAPCHAR | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' monsterid ':' '{' encodemonster_list '}' - { - int n_items = (int) $6; - - vardefs = add_vardef_type(vardefs, $1, - SPOVAR_MONST | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' objectid ':' '{' encodeobj_list '}' - { - int n_items = (int) $6; - - vardefs = add_vardef_type(vardefs, $1, - SPOVAR_OBJ | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, $1, SPO_VAR_INIT)); - Free($1); - } - | any_var_or_arr '=' '{' string_list '}' - { - int n_items = (int) $4; - - vardefs = add_vardef_type(vardefs, $1, - SPOVAR_STRING | SPOVAR_ARRAY); - add_opvars(splev, "iso", - VA_PASS3(n_items, $1, SPO_VAR_INIT)); - Free($1); - } - ; - -encodeobj_list : encodeobj - { - add_opvars(splev, "O", VA_PASS1($1)); - $$ = 1; - } - | encodeobj_list ',' encodeobj - { - add_opvars(splev, "O", VA_PASS1($3)); - $$ = 1 + $1; - } - ; - -encodemonster_list : encodemonster - { - add_opvars(splev, "M", VA_PASS1($1)); - $$ = 1; - } - | encodemonster_list ',' encodemonster - { - add_opvars(splev, "M", VA_PASS1($3)); - $$ = 1 + $1; - } - ; - -mapchar_list : mapchar - { - add_opvars(splev, "m", VA_PASS1($1)); - $$ = 1; - } - | mapchar_list ',' mapchar - { - add_opvars(splev, "m", VA_PASS1($3)); - $$ = 1 + $1; - } - ; - -encoderegion_list : encoderegion - { - $$ = 1; - } - | encoderegion_list ',' encoderegion - { - $$ = 1 + $1; - } - ; - -encodecoord_list : encodecoord - { - add_opvars(splev, "c", VA_PASS1($1)); - $$ = 1; - } - | encodecoord_list ',' encodecoord - { - add_opvars(splev, "c", VA_PASS1($3)); - $$ = 1 + $1; - } - ; - -integer_list : math_expr_var - { - $$ = 1; - } - | integer_list ',' math_expr_var - { - $$ = 1 + $1; - } - ; - -string_list : string_expr - { - $$ = 1; - } - | string_list ',' string_expr - { - $$ = 1 + $1; - } - ; - -function_define : FUNCTION_ID NQSTRING '(' - { - struct lc_funcdefs *funcdef; - - if (in_function_definition) - lc_error("Recursively defined functions not allowed (function %s).", $2); - - in_function_definition++; - - if (funcdef_defined(function_definitions, $2, 1)) - lc_error("Function '%s' already defined once.", $2); - - funcdef = funcdef_new(-1, $2); - funcdef->next = function_definitions; - function_definitions = funcdef; - function_splev_backup = splev; - splev = &(funcdef->code); - Free($2); - curr_function = funcdef; - function_tmp_var_defs = vardefs; - vardefs = NULL; - } - func_params_list ')' - { - /* nothing */ - } - stmt_block - { - add_opvars(splev, "io", VA_PASS2(0, SPO_RETURN)); - splev = function_splev_backup; - in_function_definition--; - curr_function = NULL; - vardef_free_all(vardefs); - vardefs = function_tmp_var_defs; - } - ; - -function_call : NQSTRING '(' func_call_params_list ')' - { - struct lc_funcdefs *tmpfunc; - - tmpfunc = funcdef_defined(function_definitions, $1, 1); - if (tmpfunc) { - int l; - int nparams = (int) strlen($3); - char *fparamstr = funcdef_paramtypes(tmpfunc); - - if (strcmp($3, fparamstr)) { - char *tmps = strdup(decode_parm_str(fparamstr)); - - lc_error("Function '%s' requires params '%s', got '%s' instead.", - $1, tmps, decode_parm_str($3)); - Free(tmps); - } - Free(fparamstr); - Free($3); - if (!(tmpfunc->n_called)) { - /* we haven't called the function yet, so insert it in the code */ - struct opvar *jmp = New(struct opvar); - - set_opvar_int(jmp, splev->n_opcodes+1); - add_opcode(splev, SPO_PUSH, jmp); - /* we must jump past it first, then CALL it, due to RETURN. */ - add_opcode(splev, SPO_JMP, NULL); - - tmpfunc->addr = splev->n_opcodes; - - { /* init function parameter variables */ - struct lc_funcdefs_parm *tfp = tmpfunc->params; - while (tfp) { - add_opvars(splev, "iso", - VA_PASS3(0, tfp->name, - SPO_VAR_INIT)); - tfp = tfp->next; - } - } - - splev_add_from(splev, &(tmpfunc->code)); - set_opvar_int(jmp, - splev->n_opcodes - jmp->vardata.l); - } - l = (int) (tmpfunc->addr - splev->n_opcodes - 2); - add_opvars(splev, "iio", - VA_PASS3(nparams, l, SPO_CALL)); - tmpfunc->n_called++; - } else { - lc_error("Function '%s' not defined.", $1); - } - Free($1); - } - ; - -exitstatement : EXIT_ID - { - add_opcode(splev, SPO_EXIT, NULL); - } - ; - -opt_percent : /* nothing */ - { - $$ = 100; - } - | PERCENT - { - $$ = $1; - } - ; - -comparestmt : PERCENT - { - /* val > rn2(100) */ - add_opvars(splev, "iio", - VA_PASS3((int) $1, 100, SPO_RN2)); - $$ = SPO_JG; - } - | '[' math_expr_var COMPARE_TYPE math_expr_var ']' - { - $$ = $3; - } - | '[' math_expr_var ']' - { - /* boolean, explicit foo != 0 */ - add_opvars(splev, "i", VA_PASS1(0)); - $$ = SPO_JNE; - } - ; - -switchstatement : SWITCH_ID - { - is_inconstant_number = 0; - } - '[' integer_or_var ']' - { - struct opvar *chkjmp; - - if (in_switch_statement > 0) - lc_error("Cannot nest switch-statements."); - - in_switch_statement++; - - n_switch_case_list = 0; - switch_default_case = NULL; - - if (!is_inconstant_number) - add_opvars(splev, "o", VA_PASS1(SPO_RN2)); - is_inconstant_number = 0; - - chkjmp = New(struct opvar); - set_opvar_int(chkjmp, splev->n_opcodes+1); - switch_check_jump = chkjmp; - add_opcode(splev, SPO_PUSH, chkjmp); - add_opcode(splev, SPO_JMP, NULL); - break_stmt_start(); - } - '{' switchcases '}' - { - struct opvar *endjump = New(struct opvar); - int i; - - set_opvar_int(endjump, splev->n_opcodes+1); - - add_opcode(splev, SPO_PUSH, endjump); - add_opcode(splev, SPO_JMP, NULL); - - set_opvar_int(switch_check_jump, - splev->n_opcodes - switch_check_jump->vardata.l); - - for (i = 0; i < n_switch_case_list; i++) { - add_opvars(splev, "oio", - VA_PASS3(SPO_COPY, - switch_case_value[i], SPO_CMP)); - set_opvar_int(switch_case_list[i], - switch_case_list[i]->vardata.l - splev->n_opcodes-1); - add_opcode(splev, SPO_PUSH, switch_case_list[i]); - add_opcode(splev, SPO_JE, NULL); - } - - if (switch_default_case) { - set_opvar_int(switch_default_case, - switch_default_case->vardata.l - splev->n_opcodes-1); - add_opcode(splev, SPO_PUSH, switch_default_case); - add_opcode(splev, SPO_JMP, NULL); - } - - set_opvar_int(endjump, splev->n_opcodes - endjump->vardata.l); - - break_stmt_end(splev); - - add_opcode(splev, SPO_POP, NULL); /* get rid of the value in stack */ - in_switch_statement--; - - - } - ; - -switchcases : /* nothing */ - | switchcase switchcases - ; - -switchcase : CASE_ID all_integers ':' - { - if (n_switch_case_list < MAX_SWITCH_CASES) { - struct opvar *tmppush = New(struct opvar); - - set_opvar_int(tmppush, splev->n_opcodes); - switch_case_value[n_switch_case_list] = $2; - switch_case_list[n_switch_case_list++] = tmppush; - } else lc_error("Too many cases in a switch."); - } - levstatements - { - } - | DEFAULT_ID ':' - { - struct opvar *tmppush = New(struct opvar); - - if (switch_default_case) - lc_error("Switch default case already used."); - - set_opvar_int(tmppush, splev->n_opcodes); - switch_default_case = tmppush; - } - levstatements - { - } - ; - -breakstatement : BREAK_ID - { - if (!allow_break_statements) - lc_error("Cannot use BREAK outside a statement block."); - else { - break_stmt_new(splev, splev->n_opcodes); - } - } - ; - -for_to_span : '.' '.' - | TO_ID - ; - -forstmt_start : FOR_ID any_var_or_unk '=' math_expr_var for_to_span math_expr_var - { - char buf[256], buf2[256]; - - if (n_forloops >= MAX_NESTED_IFS) { - lc_error("FOR: Too deeply nested loops."); - n_forloops = MAX_NESTED_IFS - 1; - } - - /* first, define a variable for the for-loop end value */ - Sprintf(buf, "%s end", $2); - /* the value of which is already in stack (the 2nd math_expr) */ - add_opvars(splev, "iso", VA_PASS3(0, buf, SPO_VAR_INIT)); - - vardefs = add_vardef_type(vardefs, $2, SPOVAR_INT); - /* define the for-loop variable. value is in stack (1st math_expr) */ - add_opvars(splev, "iso", VA_PASS3(0, $2, SPO_VAR_INIT)); - - /* calculate value for the loop "step" variable */ - Sprintf(buf2, "%s step", $2); - /* end - start */ - add_opvars(splev, "vvo", - VA_PASS3(buf, $2, SPO_MATH_SUB)); - /* sign of that */ - add_opvars(splev, "o", VA_PASS1(SPO_MATH_SIGN)); - /* save the sign into the step var */ - add_opvars(splev, "iso", - VA_PASS3(0, buf2, SPO_VAR_INIT)); - - forloop_list[n_forloops].varname = strdup($2); - forloop_list[n_forloops].jmp_point = splev->n_opcodes; - - n_forloops++; - Free($2); - } - ; - -forstatement : forstmt_start - { - /* nothing */ - break_stmt_start(); - } - stmt_block - { - int l; - char buf[256], buf2[256]; - - n_forloops--; - Sprintf(buf, "%s step", forloop_list[n_forloops].varname); - Sprintf(buf2, "%s end", forloop_list[n_forloops].varname); - /* compare for-loop var to end value */ - add_opvars(splev, "vvo", - VA_PASS3(forloop_list[n_forloops].varname, - buf2, SPO_CMP)); - /* var + step */ - add_opvars(splev, "vvo", - VA_PASS3(buf, forloop_list[n_forloops].varname, - SPO_MATH_ADD)); - /* for-loop var = (for-loop var + step) */ - add_opvars(splev, "iso", - VA_PASS3(0, forloop_list[n_forloops].varname, - SPO_VAR_INIT)); - /* jump back if compared values were not equal */ - l = (int) (forloop_list[n_forloops].jmp_point - - splev->n_opcodes - 1); - add_opvars(splev, "io", VA_PASS2(l, SPO_JNE)); - Free(forloop_list[n_forloops].varname); - break_stmt_end(splev); - } - ; - -loopstatement : LOOP_ID '[' integer_or_var ']' - { - struct opvar *tmppush = New(struct opvar); - - if (n_if_list >= MAX_NESTED_IFS) { - lc_error("LOOP: Too deeply nested conditionals."); - n_if_list = MAX_NESTED_IFS - 1; - } - set_opvar_int(tmppush, splev->n_opcodes); - if_list[n_if_list++] = tmppush; - - add_opvars(splev, "o", VA_PASS1(SPO_DEC)); - break_stmt_start(); - } - stmt_block - { - struct opvar *tmppush; - - add_opvars(splev, "oio", VA_PASS3(SPO_COPY, 0, SPO_CMP)); - - tmppush = (struct opvar *) if_list[--n_if_list]; - set_opvar_int(tmppush, - tmppush->vardata.l - splev->n_opcodes-1); - add_opcode(splev, SPO_PUSH, tmppush); - add_opcode(splev, SPO_JG, NULL); - add_opcode(splev, SPO_POP, NULL); /* discard count */ - break_stmt_end(splev); - } - ; - -chancestatement : comparestmt ':' - { - struct opvar *tmppush2 = New(struct opvar); - - if (n_if_list >= MAX_NESTED_IFS) { - lc_error("IF: Too deeply nested conditionals."); - n_if_list = MAX_NESTED_IFS - 1; - } - - add_opcode(splev, SPO_CMP, NULL); - - set_opvar_int(tmppush2, splev->n_opcodes+1); - - if_list[n_if_list++] = tmppush2; - - add_opcode(splev, SPO_PUSH, tmppush2); - - add_opcode(splev, reverse_jmp_opcode( $1 ), NULL); - - } - levstatement - { - if (n_if_list > 0) { - struct opvar *tmppush; - - tmppush = (struct opvar *) if_list[--n_if_list]; - set_opvar_int(tmppush, - splev->n_opcodes - tmppush->vardata.l); - } else lc_error("IF: Huh?! No start address?"); - } - ; - -ifstatement : IF_ID comparestmt - { - struct opvar *tmppush2 = New(struct opvar); - - if (n_if_list >= MAX_NESTED_IFS) { - lc_error("IF: Too deeply nested conditionals."); - n_if_list = MAX_NESTED_IFS - 1; - } - - add_opcode(splev, SPO_CMP, NULL); - - set_opvar_int(tmppush2, splev->n_opcodes+1); - - if_list[n_if_list++] = tmppush2; - - add_opcode(splev, SPO_PUSH, tmppush2); - - add_opcode(splev, reverse_jmp_opcode( $2 ), NULL); - - } - if_ending - { - /* do nothing */ - } - ; - -if_ending : stmt_block - { - if (n_if_list > 0) { - struct opvar *tmppush; - - tmppush = (struct opvar *) if_list[--n_if_list]; - set_opvar_int(tmppush, - splev->n_opcodes - tmppush->vardata.l); - } else lc_error("IF: Huh?! No start address?"); - } - | stmt_block - { - if (n_if_list > 0) { - struct opvar *tmppush = New(struct opvar); - struct opvar *tmppush2; - - set_opvar_int(tmppush, splev->n_opcodes+1); - add_opcode(splev, SPO_PUSH, tmppush); - - add_opcode(splev, SPO_JMP, NULL); - - tmppush2 = (struct opvar *) if_list[--n_if_list]; - - set_opvar_int(tmppush2, - splev->n_opcodes - tmppush2->vardata.l); - if_list[n_if_list++] = tmppush; - } else lc_error("IF: Huh?! No else-part address?"); - } - ELSE_ID stmt_block - { - if (n_if_list > 0) { - struct opvar *tmppush; - tmppush = (struct opvar *) if_list[--n_if_list]; - set_opvar_int(tmppush, splev->n_opcodes - tmppush->vardata.l); - } else lc_error("IF: Huh?! No end address?"); - } - ; - -message : MESSAGE_ID ':' string_expr - { - add_opvars(splev, "o", VA_PASS1(SPO_MESSAGE)); - } - ; - -random_corridors: RAND_CORRIDOR_ID - { - add_opvars(splev, "iiiiiio", - VA_PASS7(-1, 0, -1, -1, -1, -1, SPO_CORRIDOR)); - } - | RAND_CORRIDOR_ID ':' all_integers - { - add_opvars(splev, "iiiiiio", - VA_PASS7(-1, $3, -1, -1, -1, -1, SPO_CORRIDOR)); - } - | RAND_CORRIDOR_ID ':' RANDOM_TYPE - { - add_opvars(splev, "iiiiiio", - VA_PASS7(-1, -1, -1, -1, -1, -1, SPO_CORRIDOR)); - } - ; - -corridor : CORRIDOR_ID ':' corr_spec ',' corr_spec - { - add_opvars(splev, "iiiiiio", - VA_PASS7($3.room, $3.door, $3.wall, - $5.room, $5.door, $5.wall, - SPO_CORRIDOR)); - } - | CORRIDOR_ID ':' corr_spec ',' all_integers - { - add_opvars(splev, "iiiiiio", - VA_PASS7($3.room, $3.door, $3.wall, - -1, -1, (long)$5, - SPO_CORRIDOR)); - } - ; - -corr_spec : '(' INTEGER ',' DIRECTION ',' door_pos ')' - { - $$.room = $2; - $$.wall = $4; - $$.door = $6; - } - ; - -room_begin : room_type opt_percent ',' light_state - { - if (($2 < 100) && ($1 == OROOM)) - lc_error("Only typed rooms can have a chance."); - else { - add_opvars(splev, "iii", - VA_PASS3((long)$1, (long)$2, (long)$4)); - } - } - ; - -subroom_def : SUBROOM_ID ':' room_begin ',' subroom_pos ',' room_size optroomregionflags - { - long rflags = $8; - - if (rflags == -1) rflags = (1 << 0); - add_opvars(splev, "iiiiiiio", - VA_PASS8(rflags, ERR, ERR, - $5.x, $5.y, $7.width, $7.height, - SPO_SUBROOM)); - break_stmt_start(); - } - stmt_block - { - break_stmt_end(splev); - add_opcode(splev, SPO_ENDROOM, NULL); - } - ; - -room_def : ROOM_ID ':' room_begin ',' room_pos ',' room_align ',' room_size optroomregionflags - { - long rflags = $8; - - if (rflags == -1) rflags = (1 << 0); - add_opvars(splev, "iiiiiiio", - VA_PASS8(rflags, - $7.x, $7.y, $5.x, $5.y, - $9.width, $9.height, SPO_ROOM)); - break_stmt_start(); - } - stmt_block - { - break_stmt_end(splev); - add_opcode(splev, SPO_ENDROOM, NULL); - } - ; - -roomfill : /* nothing */ - { - $$ = 1; - } - | ',' BOOLEAN - { - $$ = $2; - } - ; - -room_pos : '(' INTEGER ',' INTEGER ')' - { - if ( $2 < 1 || $2 > 5 || - $4 < 1 || $4 > 5 ) { - lc_error("Room positions should be between 1-5: (%li,%li)!", $2, $4); - } else { - $$.x = $2; - $$.y = $4; - } - } - | RANDOM_TYPE - { - $$.x = $$.y = ERR; - } - ; - -subroom_pos : '(' INTEGER ',' INTEGER ')' - { - if ( $2 < 0 || $4 < 0) { - lc_error("Invalid subroom position (%li,%li)!", $2, $4); - } else { - $$.x = $2; - $$.y = $4; - } - } - | RANDOM_TYPE - { - $$.x = $$.y = ERR; - } - ; - -room_align : '(' h_justif ',' v_justif ')' - { - $$.x = $2; - $$.y = $4; - } - | RANDOM_TYPE - { - $$.x = $$.y = ERR; - } - ; - -room_size : '(' INTEGER ',' INTEGER ')' - { - $$.width = $2; - $$.height = $4; - } - | RANDOM_TYPE - { - $$.height = $$.width = ERR; - } - ; - -door_detail : ROOMDOOR_ID ':' secret ',' door_state ',' door_wall ',' door_pos - { - /* ERR means random here */ - if ($7 == ERR && $9 != ERR) { - lc_error("If the door wall is random, so must be its pos!"); - } else { - add_opvars(splev, "iiiio", - VA_PASS5((long)$9, (long)$5, (long)$3, - (long)$7, SPO_ROOM_DOOR)); - } - } - | DOOR_ID ':' door_state ',' ter_selection - { - add_opvars(splev, "io", VA_PASS2((long)$3, SPO_DOOR)); - } - ; - -secret : BOOLEAN - | RANDOM_TYPE - ; - -door_wall : dir_list - | RANDOM_TYPE - ; - -dir_list : DIRECTION - { - $$ = $1; - } - | DIRECTION '|' dir_list - { - $$ = ($1 | $3); - } - ; - -door_pos : INTEGER - | RANDOM_TYPE - ; - -map_definition : NOMAP_ID - { - add_opvars(splev, "ciisiio", - VA_PASS7(0, 0, 1, (char *) 0, 0, 0, SPO_MAP)); - max_x_map = COLNO-1; - max_y_map = ROWNO; - } - | GEOMETRY_ID ':' h_justif ',' v_justif roomfill MAP_ID - { - add_opvars(splev, "cii", - VA_PASS3(SP_COORD_PACK(($3), ($5)), - 1, (int) $6)); - scan_map($7, splev); - Free($7); - } - | GEOMETRY_ID ':' coord_or_var roomfill MAP_ID - { - add_opvars(splev, "ii", VA_PASS2(2, (int) $4)); - scan_map($5, splev); - Free($5); - } - ; - -h_justif : LEFT_OR_RIGHT - | CENTER - ; - -v_justif : TOP_OR_BOT - | CENTER - ; - -monster_detail : MONSTER_ID ':' monster_desc - { - add_opvars(splev, "io", VA_PASS2(0, SPO_MONSTER)); - } - | MONSTER_ID ':' monster_desc - { - add_opvars(splev, "io", VA_PASS2(1, SPO_MONSTER)); - in_container_obj++; - break_stmt_start(); - } - stmt_block - { - break_stmt_end(splev); - in_container_obj--; - add_opvars(splev, "o", VA_PASS1(SPO_END_MONINVENT)); - } - ; - -monster_desc : monster_or_var ',' coord_or_var monster_infos - { - /* nothing */ - } - ; - -monster_infos : /* nothing */ - { - struct opvar *stopit = New(struct opvar); - - set_opvar_int(stopit, SP_M_V_END); - add_opcode(splev, SPO_PUSH, stopit); - $$ = 0x0000; - } - | monster_infos ',' monster_info - { - if (( $1 & $3 )) - lc_error("MONSTER extra info defined twice."); - $$ = ( $1 | $3 ); - } - ; - -monster_info : string_expr - { - add_opvars(splev, "i", VA_PASS1(SP_M_V_NAME)); - $$ = 0x0001; - } - | MON_ATTITUDE - { - add_opvars(splev, "ii", - VA_PASS2((int) $1, SP_M_V_PEACEFUL)); - $$ = 0x0002; - } - | MON_ALERTNESS - { - add_opvars(splev, "ii", - VA_PASS2((int) $1, SP_M_V_ASLEEP)); - $$ = 0x0004; - } - | alignment_prfx - { - add_opvars(splev, "ii", - VA_PASS2((int) $1, SP_M_V_ALIGN)); - $$ = 0x0008; - } - | MON_APPEARANCE string_expr - { - add_opvars(splev, "ii", - VA_PASS2((int) $1, SP_M_V_APPEAR)); - $$ = 0x0010; - } - | FEMALE_ID - { - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_FEMALE)); - $$ = 0x0020; - } - | INVIS_ID - { - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_INVIS)); - $$ = 0x0040; - } - | CANCELLED_ID - { - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_CANCELLED)); - $$ = 0x0080; - } - | REVIVED_ID - { - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_REVIVED)); - $$ = 0x0100; - } - | AVENGE_ID - { - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_AVENGE)); - $$ = 0x0200; - } - | FLEEING_ID ':' integer_or_var - { - add_opvars(splev, "i", VA_PASS1(SP_M_V_FLEEING)); - $$ = 0x0400; - } - | BLINDED_ID ':' integer_or_var - { - add_opvars(splev, "i", VA_PASS1(SP_M_V_BLINDED)); - $$ = 0x0800; - } - | PARALYZED_ID ':' integer_or_var - { - add_opvars(splev, "i", VA_PASS1(SP_M_V_PARALYZED)); - $$ = 0x1000; - } - | STUNNED_ID - { - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_STUNNED)); - $$ = 0x2000; - } - | CONFUSED_ID - { - add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_CONFUSED)); - $$ = 0x4000; - } - | SEENTRAPS_ID ':' seen_trap_mask - { - add_opvars(splev, "ii", - VA_PASS2((int) $3, SP_M_V_SEENTRAPS)); - $$ = 0x8000; - } - ; - -seen_trap_mask : STRING - { - int token = get_trap_type($1); - - if (token == ERR || token == 0) - lc_error("Unknown trap type '%s'!", $1); - Free($1); - $$ = (1L << (token - 1)); - } - | ALL_ID - { - $$ = (long) ~0; - } - | STRING '|' seen_trap_mask - { - int token = get_trap_type($1); - if (token == ERR || token == 0) - lc_error("Unknown trap type '%s'!", $1); - - if ((1L << (token - 1)) & $3) - lc_error("Monster seen_traps, trap '%s' listed twice.", $1); - Free($1); - $$ = ((1L << (token - 1)) | $3); - } - ; - -object_detail : OBJECT_ID ':' object_desc - { - int cnt = 0; - - if (in_container_obj) - cnt |= SP_OBJ_CONTENT; - add_opvars(splev, "io", VA_PASS2(cnt, SPO_OBJECT)); - } - | COBJECT_ID ':' object_desc - { - int cnt = SP_OBJ_CONTAINER; - - if (in_container_obj) - cnt |= SP_OBJ_CONTENT; - add_opvars(splev, "io", VA_PASS2(cnt, SPO_OBJECT)); - in_container_obj++; - break_stmt_start(); - } - stmt_block - { - break_stmt_end(splev); - in_container_obj--; - add_opcode(splev, SPO_POP_CONTAINER, NULL); - } - ; - -object_desc : object_or_var object_infos - { - if (( $2 & 0x4000) && in_container_obj) - lc_error("Object cannot have a coord when contained."); - else if (!( $2 & 0x4000) && !in_container_obj) - lc_error("Object needs a coord when not contained."); - } - ; - -object_infos : /* nothing */ - { - struct opvar *stopit = New(struct opvar); - set_opvar_int(stopit, SP_O_V_END); - add_opcode(splev, SPO_PUSH, stopit); - $$ = 0x00; - } - | object_infos ',' object_info - { - if (( $1 & $3 )) - lc_error("OBJECT extra info '%s' defined twice.", curr_token); - $$ = ( $1 | $3 ); - } - ; - -object_info : CURSE_TYPE - { - add_opvars(splev, "ii", - VA_PASS2((int) $1, SP_O_V_CURSE)); - $$ = 0x0001; - } - | MONTYPE_ID ':' monster_or_var - { - add_opvars(splev, "i", VA_PASS1(SP_O_V_CORPSENM)); - $$ = 0x0002; - } - | all_ints_push - { - add_opvars(splev, "i", VA_PASS1(SP_O_V_SPE)); - $$ = 0x0004; - } - | NAME_ID ':' string_expr - { - add_opvars(splev, "i", VA_PASS1(SP_O_V_NAME)); - $$ = 0x0008; - } - | QUANTITY_ID ':' integer_or_var - { - add_opvars(splev, "i", VA_PASS1(SP_O_V_QUAN)); - $$ = 0x0010; - } - | BURIED_ID - { - add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_BURIED)); - $$ = 0x0020; - } - | LIGHT_STATE - { - add_opvars(splev, "ii", VA_PASS2((int) $1, SP_O_V_LIT)); - $$ = 0x0040; - } - | ERODED_ID ':' integer_or_var - { - add_opvars(splev, "i", VA_PASS1(SP_O_V_ERODED)); - $$ = 0x0080; - } - | ERODEPROOF_ID - { - add_opvars(splev, "ii", VA_PASS2(-1, SP_O_V_ERODED)); - $$ = 0x0080; - } - | DOOR_STATE - { - if ($1 == D_LOCKED) { - add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_LOCKED)); - $$ = 0x0100; - } else if ($1 == D_BROKEN) { - add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_BROKEN)); - $$ = 0x0200; - } else - lc_error("DOOR state can only be locked or broken."); - } - | TRAPPED_STATE - { - add_opvars(splev, "ii", - VA_PASS2((int) $1, SP_O_V_TRAPPED)); - $$ = 0x0400; - } - | RECHARGED_ID ':' integer_or_var - { - add_opvars(splev, "i", VA_PASS1(SP_O_V_RECHARGED)); - $$ = 0x0800; - } - | INVIS_ID - { - add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_INVIS)); - $$ = 0x1000; - } - | GREASED_ID - { - add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_GREASED)); - $$ = 0x2000; - } - | coord_or_var - { - add_opvars(splev, "i", VA_PASS1(SP_O_V_COORD)); - $$ = 0x4000; - } - ; - -trap_detail : TRAP_ID ':' trap_name ',' coord_or_var - { - add_opvars(splev, "io", VA_PASS2((int) $3, SPO_TRAP)); - } - ; - -drawbridge_detail: DRAWBRIDGE_ID ':' coord_or_var ',' DIRECTION ',' door_state - { - long dir, state = 0; - - /* convert dir from a DIRECTION to a DB_DIR */ - dir = $5; - switch (dir) { - case W_NORTH: dir = DB_NORTH; break; - case W_SOUTH: dir = DB_SOUTH; break; - case W_EAST: dir = DB_EAST; break; - case W_WEST: dir = DB_WEST; break; - default: - lc_error("Invalid drawbridge direction."); - break; - } - - if ( $7 == D_ISOPEN ) - state = 1; - else if ( $7 == D_CLOSED ) - state = 0; - else if ( $7 == -1 ) - state = -1; - else - lc_error("A drawbridge can only be open, closed or random!"); - add_opvars(splev, "iio", - VA_PASS3(state, dir, SPO_DRAWBRIDGE)); - } - ; - -mazewalk_detail : MAZEWALK_ID ':' coord_or_var ',' DIRECTION - { - add_opvars(splev, "iiio", - VA_PASS4((int) $5, 1, 0, SPO_MAZEWALK)); - } - | MAZEWALK_ID ':' coord_or_var ',' DIRECTION ',' BOOLEAN opt_fillchar - { - add_opvars(splev, "iiio", - VA_PASS4((int) $5, (int) $7, - (int) $8, SPO_MAZEWALK)); - } - ; - -wallify_detail : WALLIFY_ID - { - add_opvars(splev, "rio", - VA_PASS3(SP_REGION_PACK(-1,-1,-1,-1), - 0, SPO_WALLIFY)); - } - | WALLIFY_ID ':' ter_selection - { - add_opvars(splev, "io", VA_PASS2(1, SPO_WALLIFY)); - } - ; - -ladder_detail : LADDER_ID ':' coord_or_var ',' UP_OR_DOWN - { - add_opvars(splev, "io", - VA_PASS2((int) $5, SPO_LADDER)); - } - ; - -stair_detail : STAIR_ID ':' coord_or_var ',' UP_OR_DOWN - { - add_opvars(splev, "io", - VA_PASS2((int) $5, SPO_STAIR)); - } - ; - -stair_region : STAIR_ID ':' lev_region ',' lev_region ',' UP_OR_DOWN - { - add_opvars(splev, "iiiii iiiii iiso", - VA_PASS14($3.x1, $3.y1, $3.x2, $3.y2, $3.area, - $5.x1, $5.y1, $5.x2, $5.y2, $5.area, - (long) (($7) ? LR_UPSTAIR : LR_DOWNSTAIR), - 0, (char *) 0, SPO_LEVREGION)); - } - ; - -portal_region : PORTAL_ID ':' lev_region ',' lev_region ',' STRING - { - add_opvars(splev, "iiiii iiiii iiso", - VA_PASS14($3.x1, $3.y1, $3.x2, $3.y2, $3.area, - $5.x1, $5.y1, $5.x2, $5.y2, $5.area, - LR_PORTAL, 0, $7, SPO_LEVREGION)); - Free($7); - } - ; - -teleprt_region : TELEPRT_ID ':' lev_region ',' lev_region teleprt_detail - { - long rtyp = 0; - switch($6) { - case -1: rtyp = LR_TELE; break; - case 0: rtyp = LR_DOWNTELE; break; - case 1: rtyp = LR_UPTELE; break; - } - add_opvars(splev, "iiiii iiiii iiso", - VA_PASS14($3.x1, $3.y1, $3.x2, $3.y2, $3.area, - $5.x1, $5.y1, $5.x2, $5.y2, $5.area, - rtyp, 0, (char *)0, SPO_LEVREGION)); - } - ; - -branch_region : BRANCH_ID ':' lev_region ',' lev_region - { - add_opvars(splev, "iiiii iiiii iiso", - VA_PASS14($3.x1, $3.y1, $3.x2, $3.y2, $3.area, - $5.x1, $5.y1, $5.x2, $5.y2, $5.area, - (long) LR_BRANCH, 0, - (char *) 0, SPO_LEVREGION)); - } - ; - -teleprt_detail : /* empty */ - { - $$ = -1; - } - | ',' UP_OR_DOWN - { - $$ = $2; - } - ; - -fountain_detail : FOUNTAIN_ID ':' ter_selection - { - add_opvars(splev, "o", VA_PASS1(SPO_FOUNTAIN)); - } - ; - -sink_detail : SINK_ID ':' ter_selection - { - add_opvars(splev, "o", VA_PASS1(SPO_SINK)); - } - ; - -pool_detail : POOL_ID ':' ter_selection - { - add_opvars(splev, "o", VA_PASS1(SPO_POOL)); - } - ; - -terrain_type : CHAR - { - $$.lit = -2; - $$.ter = what_map_char((char) $1); - } - | '(' CHAR ',' light_state ')' - { - $$.lit = $4; - $$.ter = what_map_char((char) $2); - } - ; - -replace_terrain_detail : REPLACE_TERRAIN_ID ':' region_or_var ',' mapchar_or_var ',' mapchar_or_var ',' SPERCENT - { - add_opvars(splev, "io", - VA_PASS2($9, SPO_REPLACETERRAIN)); - } - ; - -terrain_detail : TERRAIN_ID ':' ter_selection ',' mapchar_or_var - { - add_opvars(splev, "o", VA_PASS1(SPO_TERRAIN)); - } - ; - -diggable_detail : NON_DIGGABLE_ID ':' region_or_var - { - add_opvars(splev, "o", VA_PASS1(SPO_NON_DIGGABLE)); - } - ; - -passwall_detail : NON_PASSWALL_ID ':' region_or_var - { - add_opvars(splev, "o", VA_PASS1(SPO_NON_PASSWALL)); - } - ; - -region_detail : REGION_ID ':' region_or_var ',' light_state ',' room_type optroomregionflags - { - long irr; - long rt = $7; - long rflags = $8; - - if (rflags == -1) rflags = (1 << 0); - if (!(rflags & 1)) rt += MAXRTYPE+1; - irr = ((rflags & 2) != 0); - add_opvars(splev, "iiio", - VA_PASS4((long)$5, rt, rflags, SPO_REGION)); - $$ = (irr || (rflags & 1) || rt != OROOM); - break_stmt_start(); - } - region_detail_end - { - break_stmt_end(splev); - if ( $9 ) { - add_opcode(splev, SPO_ENDROOM, NULL); - } else if ( $10 ) - lc_error("Cannot use lev statements in non-permanent REGION"); - } - ; - -region_detail_end : /* nothing */ - { - $$ = 0; - } - | stmt_block - { - $$ = $1; - } - ; - -altar_detail : ALTAR_ID ':' coord_or_var ',' alignment ',' altar_type - { - add_opvars(splev, "iio", - VA_PASS3((long)$7, (long)$5, SPO_ALTAR)); - } - ; - -grave_detail : GRAVE_ID ':' coord_or_var ',' string_expr - { - add_opvars(splev, "io", VA_PASS2(2, SPO_GRAVE)); - } - | GRAVE_ID ':' coord_or_var ',' RANDOM_TYPE - { - add_opvars(splev, "sio", - VA_PASS3((char *)0, 1, SPO_GRAVE)); - } - | GRAVE_ID ':' coord_or_var - { - add_opvars(splev, "sio", - VA_PASS3((char *)0, 0, SPO_GRAVE)); - } - ; - -gold_detail : GOLD_ID ':' math_expr_var ',' coord_or_var - { - add_opvars(splev, "o", VA_PASS1(SPO_GOLD)); - } - ; - -engraving_detail: ENGRAVING_ID ':' coord_or_var ',' engraving_type ',' string_expr - { - add_opvars(splev, "io", - VA_PASS2((long)$5, SPO_ENGRAVING)); - } - ; - -mineralize : MINERALIZE_ID ':' integer_or_var ',' integer_or_var ',' integer_or_var ',' integer_or_var - { - add_opvars(splev, "o", VA_PASS1(SPO_MINERALIZE)); - } - | MINERALIZE_ID - { - add_opvars(splev, "iiiio", - VA_PASS5(-1L, -1L, -1L, -1L, SPO_MINERALIZE)); - } - ; - -trap_name : STRING - { - int token = get_trap_type($1); - if (token == ERR) - lc_error("Unknown trap type '%s'!", $1); - $$ = token; - Free($1); - } - | RANDOM_TYPE - ; - -room_type : STRING - { - int token = get_room_type($1); - if (token == ERR) { - lc_warning("Unknown room type \"%s\"! Making ordinary room...", $1); - $$ = OROOM; - } else - $$ = token; - Free($1); - } - | RANDOM_TYPE - ; - -optroomregionflags : /* empty */ - { - $$ = -1; - } - | ',' roomregionflags - { - $$ = $2; - } - ; - -roomregionflags : roomregionflag - { - $$ = $1; - } - | roomregionflag ',' roomregionflags - { - $$ = $1 | $3; - } - ; - -/* 0 is the "default" here */ -roomregionflag : FILLING - { - $$ = ($1 << 0); - } - | IRREGULAR - { - $$ = ($1 << 1); - } - | JOINED - { - $$ = ($1 << 2); - } - ; - -door_state : DOOR_STATE - | RANDOM_TYPE - ; - -light_state : LIGHT_STATE - | RANDOM_TYPE - ; - -alignment : ALIGNMENT - | a_register - | RANDOM_TYPE - { - $$ = - MAX_REGISTERS - 1; - } - ; - -alignment_prfx : ALIGNMENT - | a_register - | A_REGISTER ':' RANDOM_TYPE - { - $$ = - MAX_REGISTERS - 1; - } - ; - -altar_type : ALTAR_TYPE - | RANDOM_TYPE - ; - -a_register : A_REGISTER '[' INTEGER ']' - { - if ( $3 >= 3 ) - lc_error("Register Index overflow!"); - else - $$ = - $3 - 1; - } - ; - -string_or_var : STRING - { - add_opvars(splev, "s", VA_PASS1($1)); - Free($1); - } - | VARSTRING_STRING - { - check_vardef_type(vardefs, $1, SPOVAR_STRING); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - | VARSTRING_STRING_ARRAY '[' math_expr_var ']' - { - check_vardef_type(vardefs, $1, - SPOVAR_STRING | SPOVAR_ARRAY); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - ; - - -integer_or_var : math_expr_var - { - /* nothing */ - } - ; - -coord_or_var : encodecoord - { - add_opvars(splev, "c", VA_PASS1($1)); - } - | rndcoord_ID '(' ter_selection ')' - { - add_opvars(splev, "o", VA_PASS1(SPO_SEL_RNDCOORD)); - } - | VARSTRING_COORD - { - check_vardef_type(vardefs, $1, SPOVAR_COORD); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - | VARSTRING_COORD_ARRAY '[' math_expr_var ']' - { - check_vardef_type(vardefs, $1, - SPOVAR_COORD | SPOVAR_ARRAY); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - ; - -encodecoord : '(' INTEGER ',' INTEGER ')' - { - if ($2 < 0 || $4 < 0 || $2 >= COLNO || $4 >= ROWNO) - lc_error("Coordinates (%li,%li) out of map range!", - $2, $4); - $$ = SP_COORD_PACK($2, $4); - } - | RANDOM_TYPE - { - $$ = SP_COORD_PACK_RANDOM(0); - } - | RANDOM_TYPE_BRACKET humidity_flags ']' - { - $$ = SP_COORD_PACK_RANDOM($2); - } - ; - -humidity_flags : HUMIDITY_TYPE - { - $$ = $1; - } - | HUMIDITY_TYPE ',' humidity_flags - { - if (($1 & $3)) - lc_warning("Humidity flag used twice."); - $$ = ($1 | $3); - } - ; - -region_or_var : encoderegion - { - /* nothing */ - } - | VARSTRING_REGION - { - check_vardef_type(vardefs, $1, SPOVAR_REGION); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - | VARSTRING_REGION_ARRAY '[' math_expr_var ']' - { - check_vardef_type(vardefs, $1, - SPOVAR_REGION | SPOVAR_ARRAY); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - ; - -encoderegion : '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')' - { - long r = SP_REGION_PACK($2, $4, $6, $8); - - if ($2 > $6 || $4 > $8) - lc_error("Region start > end: (%ld,%ld,%ld,%ld)!", - $2, $4, $6, $8); - - add_opvars(splev, "r", VA_PASS1(r)); - $$ = r; - } - ; - -mapchar_or_var : mapchar - { - add_opvars(splev, "m", VA_PASS1($1)); - } - | VARSTRING_MAPCHAR - { - check_vardef_type(vardefs, $1, SPOVAR_MAPCHAR); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - | VARSTRING_MAPCHAR_ARRAY '[' math_expr_var ']' - { - check_vardef_type(vardefs, $1, - SPOVAR_MAPCHAR | SPOVAR_ARRAY); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - ; - -mapchar : CHAR - { - if (what_map_char((char) $1) != INVALID_TYPE) - $$ = SP_MAPCHAR_PACK(what_map_char((char) $1), -2); - else { - lc_error("Unknown map char type '%c'!", $1); - $$ = SP_MAPCHAR_PACK(STONE, -2); - } - } - | '(' CHAR ',' light_state ')' - { - if (what_map_char((char) $2) != INVALID_TYPE) - $$ = SP_MAPCHAR_PACK(what_map_char((char) $2), $4); - else { - lc_error("Unknown map char type '%c'!", $2); - $$ = SP_MAPCHAR_PACK(STONE, $4); - } - } - ; - -monster_or_var : encodemonster - { - add_opvars(splev, "M", VA_PASS1($1)); - } - | VARSTRING_MONST - { - check_vardef_type(vardefs, $1, SPOVAR_MONST); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - | VARSTRING_MONST_ARRAY '[' math_expr_var ']' - { - check_vardef_type(vardefs, $1, - SPOVAR_MONST | SPOVAR_ARRAY); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - ; - -encodemonster : STRING - { - long m = get_monster_id($1, (char)0); - if (m == ERR) { - lc_error("Unknown monster \"%s\"!", $1); - $$ = -1; - } else - $$ = SP_MONST_PACK(m, - def_monsyms[(int) mons[m].mlet].sym); - Free($1); - } - | CHAR - { - if (check_monster_char((char) $1)) - $$ = SP_MONST_PACK(-1, $1); - else { - lc_error("Unknown monster class '%c'!", $1); - $$ = -1; - } - } - | '(' CHAR ',' STRING ')' - { - long m = get_monster_id($4, (char) $2); - if (m == ERR) { - lc_error("Unknown monster ('%c', \"%s\")!", $2, $4); - $$ = -1; - } else - $$ = SP_MONST_PACK(m, $2); - Free($4); - } - | RANDOM_TYPE - { - $$ = -1; - } - ; - -object_or_var : encodeobj - { - add_opvars(splev, "O", VA_PASS1($1)); - } - | VARSTRING_OBJ - { - check_vardef_type(vardefs, $1, SPOVAR_OBJ); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - | VARSTRING_OBJ_ARRAY '[' math_expr_var ']' - { - check_vardef_type(vardefs, $1, - SPOVAR_OBJ | SPOVAR_ARRAY); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - ; - -encodeobj : STRING - { - long m = get_object_id($1, (char)0); - if (m == ERR) { - lc_error("Unknown object \"%s\"!", $1); - $$ = -1; - } else - /* obj class != 0 to force generation of a specific item */ - $$ = SP_OBJ_PACK(m, 1); - Free($1); - } - | CHAR - { - if (check_object_char((char) $1)) - $$ = SP_OBJ_PACK(-1, $1); - else { - lc_error("Unknown object class '%c'!", $1); - $$ = -1; - } - } - | '(' CHAR ',' STRING ')' - { - long m = get_object_id($4, (char) $2); - if (m == ERR) { - lc_error("Unknown object ('%c', \"%s\")!", $2, $4); - $$ = -1; - } else - $$ = SP_OBJ_PACK(m, $2); - Free($4); - } - | RANDOM_TYPE - { - $$ = -1; - } - ; - - -string_expr : string_or_var { } - | string_expr '.' string_or_var - { - add_opvars(splev, "o", VA_PASS1(SPO_MATH_ADD)); - } - ; - -math_expr_var : INTEGER - { - add_opvars(splev, "i", VA_PASS1($1)); - } - | dice - { - is_inconstant_number = 1; - } - | '(' MINUS_INTEGER ')' - { - add_opvars(splev, "i", VA_PASS1($2)); - } - | VARSTRING_INT - { - check_vardef_type(vardefs, $1, SPOVAR_INT); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - is_inconstant_number = 1; - } - | VARSTRING_INT_ARRAY '[' math_expr_var ']' - { - check_vardef_type(vardefs, $1, - SPOVAR_INT | SPOVAR_ARRAY); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - is_inconstant_number = 1; - } - | math_expr_var '+' math_expr_var - { - add_opvars(splev, "o", VA_PASS1(SPO_MATH_ADD)); - } - | math_expr_var '-' math_expr_var - { - add_opvars(splev, "o", VA_PASS1(SPO_MATH_SUB)); - } - | math_expr_var '*' math_expr_var - { - add_opvars(splev, "o", VA_PASS1(SPO_MATH_MUL)); - } - | math_expr_var '/' math_expr_var - { - add_opvars(splev, "o", VA_PASS1(SPO_MATH_DIV)); - } - | math_expr_var '%' math_expr_var - { - add_opvars(splev, "o", VA_PASS1(SPO_MATH_MOD)); - } - | '(' math_expr_var ')' { } - ; - -func_param_type : CFUNC_INT - { - if (!strcmp("int", $1) || !strcmp("integer", $1)) { - $$ = (int)'i'; - } else - lc_error("Unknown function parameter type '%s'", $1); - } - | CFUNC_STR - { - if (!strcmp("str", $1) || !strcmp("string", $1)) { - $$ = (int)'s'; - } else - lc_error("Unknown function parameter type '%s'", $1); - } - ; - -func_param_part : any_var_or_arr ':' func_param_type - { - struct lc_funcdefs_parm *tmp = New(struct lc_funcdefs_parm); - - if (!curr_function) { - lc_error("Function parameters outside function definition."); - } else if (!tmp) { - lc_error("Could not alloc function params."); - } else { - long vt = SPOVAR_NULL; - - tmp->name = strdup($1); - tmp->parmtype = (char) $3; - tmp->next = curr_function->params; - curr_function->params = tmp; - curr_function->n_params++; - switch (tmp->parmtype) { - case 'i': - vt = SPOVAR_INT; - break; - case 's': - vt = SPOVAR_STRING; - break; - default: - lc_error("Unknown func param conversion."); - break; - } - vardefs = add_vardef_type( vardefs, $1, vt); - } - Free($1); - } - ; - -func_param_list : func_param_part - | func_param_list ',' func_param_part - ; - -func_params_list : /* nothing */ - | func_param_list - ; - -func_call_param_part : math_expr_var - { - $$ = (int)'i'; - } - | string_expr - { - $$ = (int)'s'; - } - ; - - -func_call_param_list : func_call_param_part - { - char tmpbuf[2]; - tmpbuf[0] = (char) $1; - tmpbuf[1] = '\0'; - $$ = strdup(tmpbuf); - } - | func_call_param_list ',' func_call_param_part - { - long len = strlen( $1 ); - char *tmp = (char *) alloc(len + 2); - sprintf(tmp, "%c%s", (char) $3, $1 ); - Free( $1 ); - $$ = tmp; - } - ; - -func_call_params_list : /* nothing */ - { - $$ = strdup(""); - } - | func_call_param_list - { - char *tmp = strdup( $1 ); - Free( $1 ); - $$ = tmp; - } - ; - -ter_selection_x : coord_or_var - { - add_opvars(splev, "o", VA_PASS1(SPO_SEL_POINT)); - } - | rect_ID region_or_var - { - add_opvars(splev, "o", VA_PASS1(SPO_SEL_RECT)); - } - | fillrect_ID region_or_var - { - add_opvars(splev, "o", VA_PASS1(SPO_SEL_FILLRECT)); - } - | line_ID coord_or_var ',' coord_or_var - { - add_opvars(splev, "o", VA_PASS1(SPO_SEL_LINE)); - } - | randline_ID coord_or_var ',' coord_or_var ',' math_expr_var - { - /* randline (x1,y1),(x2,y2), roughness */ - add_opvars(splev, "o", VA_PASS1(SPO_SEL_RNDLINE)); - } - | grow_ID '(' ter_selection ')' - { - add_opvars(splev, "io", VA_PASS2(W_ANY, SPO_SEL_GROW)); - } - | grow_ID '(' dir_list ',' ter_selection ')' - { - add_opvars(splev, "io", VA_PASS2($3, SPO_SEL_GROW)); - } - | filter_ID '(' SPERCENT ',' ter_selection ')' - { - add_opvars(splev, "iio", - VA_PASS3($3, SPOFILTER_PERCENT, SPO_SEL_FILTER)); - } - | filter_ID '(' ter_selection ',' ter_selection ')' - { - add_opvars(splev, "io", - VA_PASS2(SPOFILTER_SELECTION, SPO_SEL_FILTER)); - } - | filter_ID '(' mapchar_or_var ',' ter_selection ')' - { - add_opvars(splev, "io", - VA_PASS2(SPOFILTER_MAPCHAR, SPO_SEL_FILTER)); - } - | flood_ID coord_or_var - { - add_opvars(splev, "o", VA_PASS1(SPO_SEL_FLOOD)); - } - | circle_ID '(' coord_or_var ',' math_expr_var ')' - { - add_opvars(splev, "oio", - VA_PASS3(SPO_COPY, 1, SPO_SEL_ELLIPSE)); - } - | circle_ID '(' coord_or_var ',' math_expr_var ',' FILLING ')' - { - add_opvars(splev, "oio", - VA_PASS3(SPO_COPY, $7, SPO_SEL_ELLIPSE)); - } - | ellipse_ID '(' coord_or_var ',' math_expr_var ',' math_expr_var ')' - { - add_opvars(splev, "io", VA_PASS2(1, SPO_SEL_ELLIPSE)); - } - | ellipse_ID '(' coord_or_var ',' math_expr_var ',' math_expr_var ',' FILLING ')' - { - add_opvars(splev, "io", VA_PASS2($9, SPO_SEL_ELLIPSE)); - } - | gradient_ID '(' GRADIENT_TYPE ',' '(' math_expr_var '-' math_expr_var opt_limited ')' ',' coord_or_var opt_coord_or_var ')' - { - add_opvars(splev, "iio", - VA_PASS3($9, $3, SPO_SEL_GRADIENT)); - } - | complement_ID ter_selection_x - { - add_opvars(splev, "o", VA_PASS1(SPO_SEL_COMPLEMENT)); - } - | VARSTRING_SEL - { - check_vardef_type(vardefs, $1, SPOVAR_SEL); - vardef_used(vardefs, $1); - add_opvars(splev, "v", VA_PASS1($1)); - Free($1); - } - | '(' ter_selection ')' - { - /* nothing */ - } - ; - -ter_selection : ter_selection_x - { - /* nothing */ - } - | ter_selection_x '&' ter_selection - { - add_opvars(splev, "o", VA_PASS1(SPO_SEL_ADD)); - } - ; - -dice : DICE - { - add_opvars(splev, "iio", - VA_PASS3($1.num, $1.die, SPO_DICE)); - } - ; - -all_integers : MINUS_INTEGER - | PLUS_INTEGER - | INTEGER - ; - -all_ints_push : MINUS_INTEGER - { - add_opvars(splev, "i", VA_PASS1($1)); - } - | PLUS_INTEGER - { - add_opvars(splev, "i", VA_PASS1($1)); - } - | INTEGER - { - add_opvars(splev, "i", VA_PASS1($1)); - } - | dice - { - /* nothing */ - } - ; - -objectid : object_ID - | OBJECT_ID - ; - -monsterid : monster_ID - | MONSTER_ID - ; - -terrainid : terrain_ID - | TERRAIN_ID - ; - -engraving_type : ENGRAVING_TYPE - | RANDOM_TYPE - ; - -lev_region : region - { - $$ = $1; - } - | LEV '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')' - { - if ($3 <= 0 || $3 >= COLNO) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of level range (x1)!", - $3, $5, $7, $9); - else if ($5 < 0 || $5 >= ROWNO) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of level range (y1)!", - $3, $5, $7, $9); - else if ($7 <= 0 || $7 >= COLNO) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of level range (x2)!", - $3, $5, $7, $9); - else if ($9 < 0 || $9 >= ROWNO) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of level range (y2)!", - $3, $5, $7, $9); - $$.x1 = $3; - $$.y1 = $5; - $$.x2 = $7; - $$.y2 = $9; - $$.area = 1; - } - ; - -region : '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')' - { -/* This series of if statements is a hack for MSC 5.1. It seems that its - tiny little brain cannot compile if these are all one big if statement. */ - if ($2 < 0 || $2 > (int) max_x_map) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of map range (x1)!", - $2, $4, $6, $8); - else if ($4 < 0 || $4 > (int) max_y_map) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of map range (y1)!", - $2, $4, $6, $8); - else if ($6 < 0 || $6 > (int) max_x_map) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of map range (x2)!", - $2, $4, $6, $8); - else if ($8 < 0 || $8 > (int) max_y_map) - lc_error( - "Region (%ld,%ld,%ld,%ld) out of map range (y2)!", - $2, $4, $6, $8); - $$.area = 0; - $$.x1 = $2; - $$.y1 = $4; - $$.x2 = $6; - $$.y2 = $8; - } - ; - - -%% - -/*lev_comp.y*/ diff --git a/util/lev_main.c b/util/lev_main.c deleted file mode 100644 index d540cb5fd..000000000 --- a/util/lev_main.c +++ /dev/null @@ -1,1646 +0,0 @@ -/* NetHack 3.6 lev_main.c $NHDT-Date: 1543371692 2018/11/28 02:21:32 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.56 $ */ -/* Copyright (c) 1989 by Jean-Christophe Collet */ -/* NetHack may be freely redistributed. See license for details. */ - -/* - * This file contains the main function for the parser - * and some useful functions needed by yacc - */ -#define SPEC_LEV /* for USE_OLDARGS (sp_lev.h) and for MPW (macconf.h) */ - -#define NEED_VARARGS -#include "hack.h" -#include "date.h" -#include "sp_lev.h" -#ifdef STRICT_REF_DEF -#include "tcap.h" -#endif -#include - -#ifdef MAC -#if defined(__SC__) || defined(__MRC__) -#define MPWTOOL -#define PREFIX ":dungeon:" /* place output files here */ -#include -#else -#if !defined(__MACH__) -#define PREFIX ":lib:" /* place output files here */ -#endif -#endif -#endif - -#ifdef WIN_CE -#define PREFIX "\\nethack\\dat\\" -#endif - -#ifndef MPWTOOL -#define SpinCursor(x) -#endif - -#if defined(AMIGA) && defined(DLB) -#define PREFIX "NH:slib/" -#endif - -#ifndef O_WRONLY -#include -#endif -#ifndef O_CREAT /* some older BSD systems do not define O_CREAT in \ - */ -#include -#endif -#ifndef O_BINARY /* used for micros, no-op for others */ -#define O_BINARY 0 -#endif - -#if defined(MICRO) || defined(WIN32) -#define OMASK FCMASK -#else -#define OMASK 0644 -#endif - -#define ERR (-1) - -#define NewTab(type, size) (type **) alloc(sizeof(type *) * size) -#define Free(ptr) \ - if (ptr) \ - free((genericptr_t)(ptr)) -/* write() returns a signed value but its size argument is unsigned; - types might be int and unsigned or ssize_t and size_t; casting - to long should be safe for all permutations (even if size_t is - bigger, since the values involved won't be too big for long) */ -#define Write(fd, item, size) \ - if ((long) write(fd, (genericptr_t)(item), size) != (long) (size)) \ - return FALSE; - -#if defined(__BORLANDC__) && !defined(_WIN32) -extern unsigned _stklen = STKSIZ; -#endif -#define MAX_ERRORS 25 - -extern int NDECL(yyparse); -extern void FDECL(init_yyin, (FILE *)); -extern void FDECL(init_yyout, (FILE *)); - -int FDECL(main, (int, char **)); -void FDECL(yyerror, (const char *)); -void FDECL(yywarning, (const char *)); -int NDECL(yywrap); -int FDECL(get_floor_type, (CHAR_P)); -int FDECL(get_room_type, (char *)); -int FDECL(get_trap_type, (char *)); -int FDECL(get_monster_id, (char *, CHAR_P)); -int FDECL(get_object_id, (char *, CHAR_P)); -boolean FDECL(check_monster_char, (CHAR_P)); -boolean FDECL(check_object_char, (CHAR_P)); -char FDECL(what_map_char, (CHAR_P)); -void FDECL(scan_map, (char *, sp_lev *)); -boolean NDECL(check_subrooms); -boolean FDECL(write_level_file, (char *, sp_lev *)); - -struct lc_funcdefs *FDECL(funcdef_new, (long, char *)); -void FDECL(funcdef_free_all, (struct lc_funcdefs *)); -struct lc_funcdefs *FDECL(funcdef_defined, - (struct lc_funcdefs *, char *, int)); - -struct lc_vardefs *FDECL(vardef_new, (long, char *)); -void FDECL(vardef_free_all, (struct lc_vardefs *)); -struct lc_vardefs *FDECL(vardef_defined, (struct lc_vardefs *, char *, int)); - -void FDECL(splev_add_from, (sp_lev *, sp_lev *)); - -void FDECL(add_opcode, (sp_lev *, int, genericptr_t)); - -static boolean FDECL(write_common_data, (int)); -static boolean FDECL(write_maze, (int, sp_lev *)); -static void NDECL(init_obj_classes); -static int FDECL(case_insensitive_comp, (const char *, const char *)); - -void VDECL(lc_pline, (const char *, ...)); -void VDECL(lc_error, (const char *, ...)); -void VDECL(lc_warning, (const char *, ...)); -char *FDECL(decode_parm_chr, (CHAR_P)); -char *FDECL(decode_parm_str, (char *)); -struct opvar *FDECL(set_opvar_int, (struct opvar *, long)); -struct opvar *FDECL(set_opvar_coord, (struct opvar *, long)); -struct opvar *FDECL(set_opvar_region, (struct opvar *, long)); -struct opvar *FDECL(set_opvar_mapchar, (struct opvar *, long)); -struct opvar *FDECL(set_opvar_monst, (struct opvar *, long)); -struct opvar *FDECL(set_opvar_obj, (struct opvar *, long)); -struct opvar *FDECL(set_opvar_str, (struct opvar *, const char *)); -struct opvar *FDECL(set_opvar_var, (struct opvar *, const char *)); -void VDECL(add_opvars, (sp_lev *, const char *, ...)); -void NDECL(break_stmt_start); -void FDECL(break_stmt_end, (sp_lev *)); -void FDECL(break_stmt_new, (sp_lev *, long)); -char *FDECL(funcdef_paramtypes, (struct lc_funcdefs *)); -const char *FDECL(spovar2str, (long)); -void FDECL(vardef_used, (struct lc_vardefs *, char *)); -void FDECL(check_vardef_type, (struct lc_vardefs *, char *, long)); -struct lc_vardefs *FDECL(add_vardef_type, - (struct lc_vardefs *, char *, long)); -int FDECL(reverse_jmp_opcode, (int)); -struct opvar *FDECL(opvar_clone, (struct opvar *)); -void FDECL(start_level_def, (sp_lev **, char *)); - -static struct { - const char *name; - int type; -} trap_types[] = { { "arrow", ARROW_TRAP }, - { "dart", DART_TRAP }, - { "falling rock", ROCKTRAP }, - { "board", SQKY_BOARD }, - { "bear", BEAR_TRAP }, - { "land mine", LANDMINE }, - { "rolling boulder", ROLLING_BOULDER_TRAP }, - { "sleep gas", SLP_GAS_TRAP }, - { "rust", RUST_TRAP }, - { "fire", FIRE_TRAP }, - { "pit", PIT }, - { "spiked pit", SPIKED_PIT }, - { "hole", HOLE }, - { "trap door", TRAPDOOR }, - { "teleport", TELEP_TRAP }, - { "level teleport", LEVEL_TELEP }, - { "magic portal", MAGIC_PORTAL }, - { "web", WEB }, - { "statue", STATUE_TRAP }, - { "magic", MAGIC_TRAP }, - { "anti magic", ANTI_MAGIC }, - { "polymorph", POLY_TRAP }, - { "vibrating square", VIBRATING_SQUARE }, - { 0, 0 } }; - -static struct { - const char *name; - int type; -} room_types[] = { - /* for historical reasons, room types are not contiguous numbers */ - /* (type 1 is skipped) */ - { "ordinary", OROOM }, - { "throne", COURT }, - { "swamp", SWAMP }, - { "vault", VAULT }, - { "beehive", BEEHIVE }, - { "morgue", MORGUE }, - { "barracks", BARRACKS }, - { "zoo", ZOO }, - { "delphi", DELPHI }, - { "temple", TEMPLE }, - { "anthole", ANTHOLE }, - { "cocknest", COCKNEST }, - { "leprehall", LEPREHALL }, - { "shop", SHOPBASE }, - { "armor shop", ARMORSHOP }, - { "scroll shop", SCROLLSHOP }, - { "potion shop", POTIONSHOP }, - { "weapon shop", WEAPONSHOP }, - { "food shop", FOODSHOP }, - { "ring shop", RINGSHOP }, - { "wand shop", WANDSHOP }, - { "tool shop", TOOLSHOP }, - { "book shop", BOOKSHOP }, - { "health food shop", FODDERSHOP }, - { "candle shop", CANDLESHOP }, - { 0, 0 } -}; - -const char *fname = "(stdin)"; -int fatal_error = 0; -int got_errors = 0; -int be_verbose = 0; -int fname_counter = 1; - -#ifdef FLEX23_BUG -/* Flex 2.3 bug work around; not needed for 2.3.6 or later */ -int yy_more_len = 0; -#endif - -extern unsigned int max_x_map, max_y_map; - -extern int nh_line_number; - -extern int token_start_pos; -extern char curr_token[512]; - -struct lc_vardefs *vardefs = NULL; -struct lc_funcdefs *function_definitions = NULL; - -extern int allow_break_statements; -extern struct lc_breakdef *break_list; - -int -main(argc, argv) -int argc; -char **argv; -{ - FILE *fin; - int i; - boolean errors_encountered = FALSE; -#if defined(MAC) && (defined(THINK_C) || defined(__MWERKS__)) - static char *mac_argv[] = { - "lev_comp", /* dummy argv[0] */ - ":dat:Arch.des", ":dat:Barb.des", ":dat:Caveman.des", - ":dat:Healer.des", ":dat:Knight.des", ":dat:Monk.des", - ":dat:Priest.des", ":dat:Ranger.des", ":dat:Rogue.des", - ":dat:Samurai.des", ":dat:Tourist.des", ":dat:Valkyrie.des", - ":dat:Wizard.des", ":dat:bigroom.des", ":dat:castle.des", - ":dat:endgame.des", ":dat:gehennom.des", ":dat:knox.des", - ":dat:medusa.des", ":dat:mines.des", ":dat:oracle.des", - ":dat:sokoban.des", ":dat:tower.des", ":dat:yendor.des" - }; - - argc = SIZE(mac_argv); - argv = mac_argv; -#endif - - decl_globals_init(); - objects_globals_init(); - monst_globals_init(); - - /* this one does something... */ - init_obj_classes(); - - init_yyout(stdout); - if (argc == 1) { /* Read standard input */ - init_yyin(stdin); - (void) yyparse(); - if (fatal_error > 0) { - errors_encountered = TRUE; - } - } else { /* Otherwise every argument is a filename */ - for (i = 1; i < argc; i++) { - fname = argv[i]; - if (!strcmp(fname, "-v")) { - be_verbose++; - continue; - } - fin = freopen(fname, "r", stdin); - if (!fin) { - lc_pline("Can't open \"%s\" for input.\n", VA_PASS1(fname)); - perror(fname); - errors_encountered = TRUE; - } else { - fname_counter = 1; - init_yyin(fin); - (void) yyparse(); - nh_line_number = 1; - if (fatal_error > 0 || got_errors > 0) { - errors_encountered = TRUE; - fatal_error = 0; - } - } - } - } - exit(errors_encountered ? EXIT_FAILURE : EXIT_SUCCESS); - /*NOTREACHED*/ - return 0; -} - -/* - * Each time the parser detects an error, it uses this function. - * Here we take count of the errors. To continue farther than - * MAX_ERRORS wouldn't be reasonable. - * Assume that explicit calls from lev_comp.y have the 1st letter - * capitalized, to allow printing of the line containing the start of - * the current declaration, instead of the beginning of the next declaration. - */ -void -yyerror(s) -const char *s; -{ - char *e = ((char *) s + strlen(s) - 1); - - (void) fprintf(stderr, "%s: line %d, pos %d: %s", fname, nh_line_number, - token_start_pos - (int) strlen(curr_token), s); - if (*e != '.' && *e != '!') - (void) fprintf(stderr, " at \"%s\"", curr_token); - (void) fprintf(stderr, "\n"); - - if (++fatal_error > MAX_ERRORS) { - (void) fprintf(stderr, "Too many errors, good bye!\n"); - exit(EXIT_FAILURE); - } -} - -/* - * Just display a warning (that is : a non fatal error) - */ -void -yywarning(s) -const char *s; -{ - (void) fprintf(stderr, "%s: line %d : WARNING : %s\n", fname, - nh_line_number, s); -} - -/* - * Stub needed for lex interface. - */ -int -yywrap() -{ - return 1; -} - -/* - * lc_pline(): lev_comp version of pline(), stripped down version of - * core's pline(), with convoluted handling for variadic arguments to - * support , , and neither of the above. - * - * Using state for message/warning/error mode simplifies calling interface. - */ -#define LC_PLINE_MESSAGE 0 -#define LC_PLINE_WARNING 1 -#define LC_PLINE_ERROR 2 -static int lc_pline_mode = LC_PLINE_MESSAGE; - -#if defined(USE_STDARG) || defined(USE_VARARGS) -static void FDECL(lc_vpline, (const char *, va_list)); - -void lc_pline -VA_DECL(const char *, line) -{ - VA_START(line); - VA_INIT(line, char *); - lc_vpline(line, VA_ARGS); - VA_END(); -} - -#ifdef USE_STDARG -static void -lc_vpline(const char *line, va_list the_args) -#else -static void -lc_vpline(line, the_args) -const char *line; -va_list the_args; -#endif - -#else /* USE_STDARG | USE_VARARG */ - -#define lc_vpline lc_pline - -void -lc_pline -VA_DECL(const char *, line) -#endif /* USE_STDARG | USE_VARARG */ -{ /* opening brace for lc_vpline, nested block for USE_OLDARGS lc_pline */ - - char pbuf[3 * BUFSZ]; - static char nomsg[] = "(no message)"; - /* Do NOT use VA_START and VA_END in here... see above */ - - if (!line || !*line) - line = nomsg; /* shouldn't happen */ - if (index(line, '%')) { - Vsprintf(pbuf, line, VA_ARGS); - pbuf[BUFSZ - 1] = '\0'; /* truncate if long */ - line = pbuf; - } - switch (lc_pline_mode) { - case LC_PLINE_ERROR: - yyerror(line); - break; - case LC_PLINE_WARNING: - yywarning(line); - break; - default: - (void) fprintf(stderr, "%s\n", line); - break; - } - lc_pline_mode = LC_PLINE_MESSAGE; /* reset to default */ - return; -#if !(defined(USE_STDARG) || defined(USE_VARARGS)) - VA_END(); /* closing brace ofr USE_OLDARGS's nested block */ -#endif -} - -/*VARARGS1*/ -void -lc_error -VA_DECL(const char *, line) -{ - VA_START(line); - VA_INIT(line, const char *); - lc_pline_mode = LC_PLINE_ERROR; - lc_vpline(line, VA_ARGS); - VA_END(); - return; -} - -/*VARARGS1*/ -void -lc_warning -VA_DECL(const char *, line) -{ - VA_START(line); - VA_INIT(line, const char *); - lc_pline_mode = LC_PLINE_WARNING; - lc_vpline(line, VA_ARGS); - VA_END(); - return; -} - -char * -decode_parm_chr(chr) -char chr; -{ - static char buf[32]; - - switch (chr) { - default: - Strcpy(buf, "unknown"); - break; - case 'i': - Strcpy(buf, "int"); - break; - case 'r': - Strcpy(buf, "region"); - break; - case 's': - Strcpy(buf, "str"); - break; - case 'O': - Strcpy(buf, "obj"); - break; - case 'c': - Strcpy(buf, "coord"); - break; - case ' ': - Strcpy(buf, "nothing"); - break; - case 'm': - Strcpy(buf, "mapchar"); - break; - case 'M': - Strcpy(buf, "monster"); - break; - } - return buf; -} - -char * -decode_parm_str(str) -char *str; -{ - static char tmpbuf[1024]; - char *p = str; - tmpbuf[0] = '\0'; - if (str) { - for (; *p; p++) { - Strcat(tmpbuf, decode_parm_chr(*p)); - if (*(p + 1)) - Strcat(tmpbuf, ", "); - } - } - return tmpbuf; -} - -struct opvar * -set_opvar_int(ov, val) -struct opvar *ov; -long val; -{ - if (ov) { - ov->spovartyp = SPOVAR_INT; - ov->vardata.l = val; - } - return ov; -} - -struct opvar * -set_opvar_coord(ov, val) -struct opvar *ov; -long val; -{ - if (ov) { - ov->spovartyp = SPOVAR_COORD; - ov->vardata.l = val; - } - return ov; -} - -struct opvar * -set_opvar_region(ov, val) -struct opvar *ov; -long val; -{ - if (ov) { - ov->spovartyp = SPOVAR_REGION; - ov->vardata.l = val; - } - return ov; -} - -struct opvar * -set_opvar_mapchar(ov, val) -struct opvar *ov; -long val; -{ - if (ov) { - ov->spovartyp = SPOVAR_MAPCHAR; - ov->vardata.l = val; - } - return ov; -} - -struct opvar * -set_opvar_monst(ov, val) -struct opvar *ov; -long val; -{ - if (ov) { - ov->spovartyp = SPOVAR_MONST; - ov->vardata.l = val; - } - return ov; -} - -struct opvar * -set_opvar_obj(ov, val) -struct opvar *ov; -long val; -{ - if (ov) { - ov->spovartyp = SPOVAR_OBJ; - ov->vardata.l = val; - } - return ov; -} - -struct opvar * -set_opvar_str(ov, val) -struct opvar *ov; -const char *val; -{ - if (ov) { - ov->spovartyp = SPOVAR_STRING; - ov->vardata.str = (val) ? strdup(val) : NULL; - } - return ov; -} - -struct opvar * -set_opvar_var(ov, val) -struct opvar *ov; -const char *val; -{ - if (ov) { - ov->spovartyp = SPOVAR_VARIABLE; - ov->vardata.str = (val) ? strdup(val) : NULL; - } - return ov; -} - -#define New(type) \ - (type *) memset((genericptr_t) alloc(sizeof(type)), 0, sizeof(type)) - -#if defined(USE_STDARG) || defined(USE_VARARGS) -static void FDECL(vadd_opvars, (sp_lev *, const char *, va_list)); - -void add_opvars -VA_DECL2(sp_lev *, sp, const char *, fmt) -{ - VA_START(fmt); - VA_INIT(fmt, char *); - vadd_opvars(sp, fmt, VA_ARGS); - VA_END(); -} - -#ifdef USE_STDARG -static void -vadd_opvars(sp_lev *sp, const char *fmt, va_list the_args) - -#else -static void -vadd_opvars(sp, fmt, the_args) -sp_lev *sp; -const char *fmt; -va_list the_args; - -#endif - -#else /* USE_STDARG | USE_VARARG */ - -#define vadd_opvars add_opvars - -void add_opvars -VA_DECL2(sp_lev *, sp, const char *, fmt) -#endif /* USE_STDARG | USE_VARARG */ -{ - const char *p, *lp; - long la; - /* Do NOT use VA_START and VA_END in here... see above */ - - for (p = fmt; *p != '\0'; p++) { - switch (*p) { - case ' ': - break; - case 'i': /* integer (via plain 'int') */ - { - struct opvar *ov = New(struct opvar); - - set_opvar_int(ov, (long) VA_NEXT(la, int)); - add_opcode(sp, SPO_PUSH, ov); - break; - } - case 'l': /* integer (via 'long int') */ - { - struct opvar *ov = New(struct opvar); - - set_opvar_int(ov, VA_NEXT(la, long)); - add_opcode(sp, SPO_PUSH, ov); - break; - } - case 'c': /* coordinate */ - { - struct opvar *ov = New(struct opvar); - set_opvar_coord(ov, VA_NEXT(la, long)); - add_opcode(sp, SPO_PUSH, ov); - break; - } - case 'r': /* region */ - { - struct opvar *ov = New(struct opvar); - set_opvar_region(ov, VA_NEXT(la, long)); - add_opcode(sp, SPO_PUSH, ov); - break; - } - case 'm': /* mapchar */ - { - struct opvar *ov = New(struct opvar); - set_opvar_mapchar(ov, VA_NEXT(la, long)); - add_opcode(sp, SPO_PUSH, ov); - break; - } - case 'M': /* monster */ - { - struct opvar *ov = New(struct opvar); - set_opvar_monst(ov, VA_NEXT(la, long)); - add_opcode(sp, SPO_PUSH, ov); - break; - } - case 'O': /* object */ - { - struct opvar *ov = New(struct opvar); - set_opvar_obj(ov, VA_NEXT(la, long)); - add_opcode(sp, SPO_PUSH, ov); - break; - } - case 's': /* string */ - { - struct opvar *ov = New(struct opvar); - set_opvar_str(ov, VA_NEXT(lp, const char *)); - add_opcode(sp, SPO_PUSH, ov); - break; - } - case 'v': /* variable */ - { - struct opvar *ov = New(struct opvar); - set_opvar_var(ov, VA_NEXT(lp, const char *)); - add_opcode(sp, SPO_PUSH, ov); - break; - } - case 'o': /* opcode */ - { - long i = VA_NEXT(la, int); - if (i < 0 || i >= MAX_SP_OPCODES) - lc_pline("add_opvars: unknown opcode '%ld'.", VA_PASS1(i)); - add_opcode(sp, i, NULL); - break; - } - default: - lc_pline("add_opvars: illegal format character '%ld'.", - VA_PASS1((long) *p)); - break; - } - } - -#if !(defined(USE_STDARG) || defined(USE_VARARGS)) - /* provide closing brace for USE_OLDARGS nested block from VA_DECL2() */ - VA_END(); -#endif -} - -void -break_stmt_start() -{ - allow_break_statements++; -} - -void -break_stmt_end(splev) -sp_lev *splev; -{ - struct lc_breakdef *tmp = break_list; - struct lc_breakdef *prv = NULL; - - while (tmp) { - if (tmp->break_depth == allow_break_statements) { - struct lc_breakdef *nxt = tmp->next; - set_opvar_int(tmp->breakpoint, - splev->n_opcodes - tmp->breakpoint->vardata.l - 1); - tmp->next = NULL; - Free(tmp); - if (!prv) - break_list = NULL; - else - prv->next = nxt; - tmp = nxt; - } else { - prv = tmp; - tmp = tmp->next; - } - } - allow_break_statements--; -} - -void -break_stmt_new(splev, i) -sp_lev *splev; -long i; -{ - struct lc_breakdef *tmp = New(struct lc_breakdef); - - tmp->breakpoint = New(struct opvar); - tmp->break_depth = allow_break_statements; - tmp->next = break_list; - break_list = tmp; - set_opvar_int(tmp->breakpoint, i); - add_opcode(splev, SPO_PUSH, tmp->breakpoint); - add_opcode(splev, SPO_JMP, NULL); -} - -struct lc_funcdefs * -funcdef_new(addr, name) -long addr; -char *name; -{ - struct lc_funcdefs *f = New(struct lc_funcdefs); - - if (!f) { - lc_error("Could not alloc function definition for '%s'.", - VA_PASS1(name)); - return NULL; - } - f->next = NULL; - f->addr = addr; - f->name = strdup(name); - f->n_called = 0; - f->n_params = 0; - f->params = NULL; - f->code.opcodes = NULL; - f->code.n_opcodes = 0; - return f; -} - -void -funcdef_free_all(fchain) -struct lc_funcdefs *fchain; -{ - struct lc_funcdefs *tmp = fchain; - struct lc_funcdefs *nxt; - struct lc_funcdefs_parm *tmpparam; - - while (tmp) { - nxt = tmp->next; - Free(tmp->name); - while (tmp->params) { - tmpparam = tmp->params->next; - Free(tmp->params->name); - tmp->params = tmpparam; - } - /* FIXME: free tmp->code */ - Free(tmp); - tmp = nxt; - } -} - -char * -funcdef_paramtypes(f) -struct lc_funcdefs *f; -{ - int i = 0; - struct lc_funcdefs_parm *fp = f->params; - char *tmp = (char *) alloc((f->n_params) + 1); - - if (!tmp) - return NULL; - while (fp) { - tmp[i++] = fp->parmtype; - fp = fp->next; - } - tmp[i] = '\0'; - return tmp; -} - -struct lc_funcdefs * -funcdef_defined(f, name, casesense) -struct lc_funcdefs *f; -char *name; -int casesense; -{ - while (f) { - if (casesense) { - if (!strcmp(name, f->name)) - return f; - } else { - if (!case_insensitive_comp(name, f->name)) - return f; - } - f = f->next; - } - return NULL; -} - -struct lc_vardefs * -vardef_new(typ, name) -long typ; -char *name; -{ - struct lc_vardefs *f = New(struct lc_vardefs); - - if (!f) { - lc_error("Could not alloc variable definition for '%s'.", - VA_PASS1(name)); - return NULL; - } - f->next = NULL; - f->var_type = typ; - f->name = strdup(name); - f->n_used = 0; - return f; -} - -void -vardef_free_all(fchain) -struct lc_vardefs *fchain; -{ - struct lc_vardefs *tmp = fchain; - struct lc_vardefs *nxt; - - while (tmp) { - if (be_verbose && (tmp->n_used == 0)) - lc_warning("Unused variable '%s'", VA_PASS1(tmp->name)); - nxt = tmp->next; - Free(tmp->name); - Free(tmp); - tmp = nxt; - } -} - -struct lc_vardefs * -vardef_defined(f, name, casesense) -struct lc_vardefs *f; -char *name; -int casesense; -{ - while (f) { - if (casesense) { - if (!strcmp(name, f->name)) - return f; - } else { - if (!case_insensitive_comp(name, f->name)) - return f; - } - f = f->next; - } - return NULL; -} - -const char * -spovar2str(spovar) -long spovar; -{ - static int togl = 0; - static char buf[2][128]; - const char *n = NULL; - int is_array = (spovar & SPOVAR_ARRAY); - - spovar &= ~SPOVAR_ARRAY; - switch (spovar) { - default: - lc_error("spovar2str(%ld)", VA_PASS1(spovar)); - break; - case SPOVAR_INT: - n = "integer"; - break; - case SPOVAR_STRING: - n = "string"; - break; - case SPOVAR_VARIABLE: - n = "variable"; - break; - case SPOVAR_COORD: - n = "coordinate"; - break; - case SPOVAR_REGION: - n = "region"; - break; - case SPOVAR_MAPCHAR: - n = "mapchar"; - break; - case SPOVAR_MONST: - n = "monster"; - break; - case SPOVAR_OBJ: - n = "object"; - break; - } - - togl = ((togl + 1) % 2); - - Sprintf(buf[togl], "%s%s", n, (is_array ? " array" : "")); - return buf[togl]; -} - -void -vardef_used(vd, varname) -struct lc_vardefs *vd; -char *varname; -{ - struct lc_vardefs *tmp; - - if ((tmp = vardef_defined(vd, varname, 1)) != 0) - tmp->n_used++; -} - -void -check_vardef_type(vd, varname, vartype) -struct lc_vardefs *vd; -char *varname; -long vartype; -{ - struct lc_vardefs *tmp; - - if ((tmp = vardef_defined(vd, varname, 1)) != 0) { - if (tmp->var_type != vartype) - lc_error("Trying to use variable '%s' as %s, when it is %s.", - VA_PASS3(varname, - spovar2str(vartype), - spovar2str(tmp->var_type))); - } else - lc_error("Variable '%s' not defined.", VA_PASS1(varname)); -} - -struct lc_vardefs * -add_vardef_type(vd, varname, vartype) -struct lc_vardefs *vd; -char *varname; -long vartype; -{ - struct lc_vardefs *tmp; - - if ((tmp = vardef_defined(vd, varname, 1)) != 0) { - if (tmp->var_type != vartype) - lc_error("Trying to redefine variable '%s' as %s, when it is %s.", - VA_PASS3(varname, - spovar2str(vartype), - spovar2str(tmp->var_type))); - } else { - tmp = vardef_new(vartype, varname); - tmp->next = vd; - return tmp; - } - return vd; -} - -int -reverse_jmp_opcode(opcode) -int opcode; -{ - switch (opcode) { - case SPO_JE: - return SPO_JNE; - case SPO_JNE: - return SPO_JE; - case SPO_JL: - return SPO_JGE; - case SPO_JG: - return SPO_JLE; - case SPO_JLE: - return SPO_JG; - case SPO_JGE: - return SPO_JL; - default: - lc_error("Cannot reverse comparison jmp opcode %ld.", - VA_PASS1((long) opcode)); - return SPO_NULL; - } -} - -/* basically copied from src/sp_lev.c */ -struct opvar * -opvar_clone(ov) -struct opvar *ov; -{ - if (ov) { - struct opvar *tmpov = (struct opvar *) alloc(sizeof(struct opvar)); - - if (!tmpov) { /* lint suppression */ - /*NOTREACHED*/ -#if 0 - /* not possible; alloc() never returns Null */ - panic("could not alloc opvar struct"); - /*NOTREACHED*/ -#endif - return (struct opvar *) 0; - } - switch (ov->spovartyp) { - case SPOVAR_COORD: - case SPOVAR_REGION: - case SPOVAR_MAPCHAR: - case SPOVAR_MONST: - case SPOVAR_OBJ: - case SPOVAR_INT: { - tmpov->spovartyp = ov->spovartyp; - tmpov->vardata.l = ov->vardata.l; - } break; - case SPOVAR_VARIABLE: - case SPOVAR_STRING: { - int len = strlen(ov->vardata.str); - tmpov->spovartyp = ov->spovartyp; - tmpov->vardata.str = (char *) alloc(len + 1); - (void) memcpy((genericptr_t) tmpov->vardata.str, - (genericptr_t) ov->vardata.str, len); - tmpov->vardata.str[len] = '\0'; - } break; - default: { - lc_error("Unknown opvar_clone value type (%ld)!", - VA_PASS1((long) ov->spovartyp)); - } /* default */ - } /* switch */ - return tmpov; - } - return (struct opvar *) 0; -} - -void -splev_add_from(splev, from_splev) -sp_lev *splev; -sp_lev *from_splev; -{ - int i; - - if (splev && from_splev) - for (i = 0; i < from_splev->n_opcodes; i++) - add_opcode(splev, from_splev->opcodes[i].opcode, - opvar_clone(from_splev->opcodes[i].opdat)); -} - -void -start_level_def(splev, ldfname) -sp_lev **splev; -char *ldfname; -{ - struct lc_funcdefs *f; - - if (index(ldfname, '.')) - lc_error("Invalid dot ('.') in level name '%s'.", VA_PASS1(ldfname)); - if ((int) strlen(ldfname) > 14) - lc_error("Level names limited to 14 characters ('%s').", - VA_PASS1(ldfname)); - f = function_definitions; - while (f) { - f->n_called = 0; - f = f->next; - } - *splev = (sp_lev *) alloc(sizeof(sp_lev)); - (*splev)->n_opcodes = 0; - (*splev)->opcodes = NULL; - - vardef_free_all(vardefs); - vardefs = NULL; -} - -/* - * Find the type of floor, knowing its char representation. - */ -int -get_floor_type(c) -char c; -{ - int val; - - SpinCursor(3); - val = what_map_char(c); - if (val == INVALID_TYPE) { - val = ERR; - yywarning("Invalid fill character in MAZE declaration"); - } - return val; -} - -/* - * Find the type of a room in the table, knowing its name. - */ -int -get_room_type(s) -char *s; -{ - register int i; - - SpinCursor(3); - for (i = 0; room_types[i].name; i++) - if (!strcmp(s, room_types[i].name)) - return ((int) room_types[i].type); - return ERR; -} - -/* - * Find the type of a trap in the table, knowing its name. - */ -int -get_trap_type(s) -char *s; -{ - register int i; - - SpinCursor(3); - for (i = 0; trap_types[i].name; i++) - if (!strcmp(s, trap_types[i].name)) - return trap_types[i].type; - return ERR; -} - -/* - * Find the index of a monster in the table, knowing its name. - */ -int -get_monster_id(s, c) -char *s; -char c; -{ - register int i, class; - - SpinCursor(3); - class = c ? def_char_to_monclass(c) : 0; - if (class == MAXMCLASSES) - return ERR; - - for (i = LOW_PM; i < NUMMONS; i++) - if (!class || class == mons[i].mlet) - if (!strcmp(s, mons[i].mname)) - return i; - /* didn't find it; lets try case insensitive search */ - for (i = LOW_PM; i < NUMMONS; i++) - if (!class || class == mons[i].mlet) - if (!case_insensitive_comp(s, mons[i].mname)) { - if (be_verbose) - lc_warning("Monster type \"%s\" matches \"%s\".", - VA_PASS2(s, mons[i].mname)); - return i; - } - return ERR; -} - -/* - * Find the index of an object in the table, knowing its name. - */ -int -get_object_id(s, c) -char *s; -char c; /* class */ -{ - int i, class; - const char *objname; - - SpinCursor(3); - class = (c > 0) ? def_char_to_objclass(c) : 0; - if (class == MAXOCLASSES) - return ERR; - - for (i = class ? g.bases[class] : 0; i < NUM_OBJECTS; i++) { - if (class && objects[i].oc_class != class) - break; - objname = obj_descr[i].oc_name; - if (objname && !strcmp(s, objname)) - return i; - } - for (i = class ? g.bases[class] : 0; i < NUM_OBJECTS; i++) { - if (class && objects[i].oc_class != class) - break; - objname = obj_descr[i].oc_name; - if (objname && !case_insensitive_comp(s, objname)) { - if (be_verbose) - lc_warning("Object type \"%s\" matches \"%s\".", - VA_PASS2(s, objname)); - return i; - } - } - return ERR; -} - -static void -init_obj_classes() -{ - int i, class, prev_class; - - prev_class = -1; - for (i = 0; i < NUM_OBJECTS; i++) { - class = objects[i].oc_class; - if (class != prev_class) { - g.bases[class] = i; - prev_class = class; - } - } -} - -/* - * Is the character 'c' a valid monster class ? - */ -boolean -check_monster_char(c) -char c; -{ - return (def_char_to_monclass(c) != MAXMCLASSES); -} - -/* - * Is the character 'c' a valid object class ? - */ -boolean -check_object_char(c) -char c; -{ - return (def_char_to_objclass(c) != MAXOCLASSES); -} - -/* - * Convert .des map letter into floor type. - */ -char -what_map_char(c) -char c; -{ - SpinCursor(3); - switch (c) { - case ' ': - return (STONE); - case '#': - return (CORR); - case '.': - return (ROOM); - case '-': - return (HWALL); - case '|': - return (VWALL); - case '+': - return (DOOR); - case 'A': - return (AIR); - case 'B': - return (CROSSWALL); /* hack: boundary location */ - case 'C': - return (CLOUD); - case 'S': - return (SDOOR); - case 'H': - return (SCORR); - case '{': - return (FOUNTAIN); - case '\\': - return (THRONE); - case 'K': - return (SINK); - case '}': - return (MOAT); - case 'P': - return (POOL); - case 'L': - return (LAVAPOOL); - case 'I': - return (ICE); - case 'W': - return (WATER); - case 'T': - return (TREE); - case 'F': - return (IRONBARS); /* Fe = iron */ - case 'x': - return (MAX_TYPE); /* "see-through" */ - } - return (INVALID_TYPE); -} - -void -add_opcode(sp, opc, dat) -sp_lev *sp; -int opc; -genericptr_t dat; -{ - long nop = sp->n_opcodes; - _opcode *tmp; - - if ((opc < 0) || (opc >= MAX_SP_OPCODES)) - lc_error("Unknown opcode '%ld'", VA_PASS1((long) opc)); - - tmp = (_opcode *) alloc(sizeof(_opcode) * (nop + 1)); - if (!tmp) { /* lint suppression */ - /*NOTREACHED*/ -#if 0 - /* not possible; alloc() never returns Null */ - lc_error("%s", VA_PASS1("Could not alloc opcode space")); -#endif - return; - } - - if (sp->opcodes && nop) { - (void) memcpy(tmp, sp->opcodes, sizeof(_opcode) * nop); - free(sp->opcodes); - } - sp->opcodes = tmp; - - sp->opcodes[nop].opcode = opc; - sp->opcodes[nop].opdat = dat; - - sp->n_opcodes++; -} - -/* - * Yep! LEX gives us the map in a raw mode. - * Just analyze it here. - */ -void -scan_map(map, sp) -char *map; -sp_lev *sp; -{ - register int i, len; - register char *s1, *s2; - int max_len = 0; - int max_hig = 0; - char *tmpmap[MAP_Y_LIM+1]; - int dx, dy; - char *mbuf; - - /* First, strip out digits 0-9 (line numbering) */ - for (s1 = s2 = map; *s1; s1++) - if (*s1 < '0' || *s1 > '9') - *s2++ = *s1; - *s2 = '\0'; - - /* Second, find the max width of the map */ - s1 = map; - while (s1 && *s1) { - s2 = index(s1, '\n'); - if (s2) { - len = (int) (s2 - s1); - s1 = s2 + 1; - } else { - len = (int) strlen(s1); - s1 = (char *) 0; - } - if (len > max_len) - max_len = len; - } - - /* Then parse it now */ - while (map && *map) { - if (max_hig > MAP_Y_LIM) - break; - tmpmap[max_hig] = (char *) alloc(max_len); - s1 = index(map, '\n'); - if (s1) { - len = (int) (s1 - map); - s1++; - } else { - len = (int) strlen(map); - s1 = map + len; - } - for (i = 0; i < len; i++) - if ((tmpmap[max_hig][i] = what_map_char(map[i])) - == INVALID_TYPE) { - lc_warning( - "Invalid character '%ld' @ (%ld, %ld) - replacing with stone", - VA_PASS3((long) map[i], (long) max_hig, (long) i)); - tmpmap[max_hig][i] = STONE; - } - while (i < max_len) - tmpmap[max_hig][i++] = STONE; - map = s1; - max_hig++; - } - - /* Memorize boundaries */ - - max_x_map = max_len - 1; - max_y_map = max_hig - 1; - - if (max_len > MAP_X_LIM || max_hig > MAP_Y_LIM) { - lc_error("Map too large at (%ld x %ld), max is (%ld x %ld)", - VA_PASS4((long) max_len, (long) max_hig, - (long) MAP_X_LIM, (long) MAP_Y_LIM)); - } - - mbuf = (char *) alloc(((max_hig - 1) * max_len) + (max_len - 1) + 2); - for (dy = 0; dy < max_hig; dy++) - for (dx = 0; dx < max_len; dx++) - mbuf[(dy * max_len) + dx] = (tmpmap[dy][dx] + 1); - - mbuf[((max_hig - 1) * max_len) + (max_len - 1) + 1] = '\0'; - - add_opvars(sp, "sllo", VA_PASS4(mbuf, (long) max_hig, (long) max_len, - SPO_MAP)); - - for (dy = 0; dy < max_hig; dy++) - Free(tmpmap[dy]); - Free(mbuf); -} - -/* - * Output some info common to all special levels. - */ -static boolean -write_common_data(fd) -int fd; -{ - static struct version_info version_data = { - VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY1, VERSION_SANITY2, - VERSION_SANITY3 - }; - - Write(fd, &version_data, sizeof version_data); - return TRUE; -} - -/* - * Here we write the sp_lev structure in the specified file (fd). - * Also, we have to free the memory allocated via alloc(). - */ -static boolean -write_maze(fd, maze) -int fd; -sp_lev *maze; -{ - int i; - - if (!write_common_data(fd)) - return FALSE; - - Write(fd, &(maze->n_opcodes), sizeof(maze->n_opcodes)); - - for (i = 0; i < maze->n_opcodes; i++) { - _opcode tmpo = maze->opcodes[i]; - - Write(fd, &(tmpo.opcode), sizeof(tmpo.opcode)); - - if (tmpo.opcode < SPO_NULL || tmpo.opcode >= MAX_SP_OPCODES) - panic("write_maze: unknown opcode (%d).", tmpo.opcode); - - if (tmpo.opcode == SPO_PUSH) { - genericptr_t opdat = tmpo.opdat; - if (opdat) { - struct opvar *ov = (struct opvar *) opdat; - int size; - Write(fd, &(ov->spovartyp), sizeof(ov->spovartyp)); - switch (ov->spovartyp) { - case SPOVAR_NULL: - break; - case SPOVAR_COORD: - case SPOVAR_REGION: - case SPOVAR_MAPCHAR: - case SPOVAR_MONST: - case SPOVAR_OBJ: - case SPOVAR_INT: - Write(fd, &(ov->vardata.l), sizeof(ov->vardata.l)); - break; - case SPOVAR_VARIABLE: - case SPOVAR_STRING: - if (ov->vardata.str) - size = strlen(ov->vardata.str); - else - size = 0; - Write(fd, &size, sizeof(size)); - if (size) { - Write(fd, ov->vardata.str, size); - Free(ov->vardata.str); - } - break; - default: - panic("write_maze: unknown data type (%d).", - ov->spovartyp); - } - } else - panic("write_maze: PUSH with no data."); - } else { - /* sanity check */ - genericptr_t opdat = tmpo.opdat; - if (opdat) - panic("write_maze: opcode (%d) has data.", tmpo.opcode); - } - - Free(tmpo.opdat); - } - /* clear the struct for next user */ - Free(maze->opcodes); - maze->opcodes = NULL; - /*(void) memset((genericptr_t) &maze->init_lev, 0, sizeof - * maze->init_lev);*/ - - return TRUE; -} - -/* - * Open and write maze or rooms file, based on which pointer is non-null. - * Return TRUE on success, FALSE on failure. - */ -boolean -write_level_file(filename, lvl) -char *filename; -sp_lev *lvl; -{ - int fout; - char lbuf[60]; - - lbuf[0] = '\0'; -#ifdef PREFIX - Strcat(lbuf, PREFIX); -#endif - Strcat(lbuf, filename); - Strcat(lbuf, LEV_EXT); - -#if defined(MAC) && (defined(__SC__) || defined(__MRC__)) - fout = open(lbuf, O_WRONLY | O_CREAT | O_BINARY); -#else - fout = open(lbuf, O_WRONLY | O_CREAT | O_BINARY, OMASK); -#endif - if (fout < 0) - return FALSE; - - if (!lvl) - panic("write_level_file"); - - if (be_verbose) - fprintf(stdout, "File: '%s', opcodes: %ld\n", lbuf, lvl->n_opcodes); - - if (!write_maze(fout, lvl)) - return FALSE; - - (void) close(fout); - - return TRUE; -} - -static int -case_insensitive_comp(s1, s2) -const char *s1; -const char *s2; -{ - uchar u1, u2; - - for (;; s1++, s2++) { - u1 = (uchar) *s1; - if (isupper(u1)) - u1 = tolower(u1); - u2 = (uchar) *s2; - if (isupper(u2)) - u2 = tolower(u2); - if (u1 == '\0' || u1 != u2) - break; - } - return u1 - u2; -} - -#ifdef STRICT_REF_DEF -/* - * Any globals declared in hack.h and descendents which aren't defined - * in the modules linked into lev_comp should be defined here. These - * definitions can be dummies: their sizes shouldn't matter as long as - * as their types are correct; actual values are irrelevant. - */ -#define ARBITRARY_SIZE 1 -/* attrib.c */ -struct attribs attrmax, attrmin; -/* files.c */ -const char *configfile; -/* termcap.c */ -struct tc_lcl_data tc_lcl_data; -#ifdef TEXTCOLOR -#ifdef TOS -const char *hilites[CLR_MAX]; -#else -char NEARDATA *hilites[CLR_MAX]; -#endif -#endif -/* trap.c */ -const char *traps[TRAPNUM]; -/* window.c */ -#ifdef HANGUPHANDLING -volatile -#endif - struct window_procs windowprocs; -/* xxxtty.c */ -#ifdef DEFINE_OSPEED -short ospeed; -#endif -#endif /* STRICT_REF_DEF */ - -/* nhassert_failed is called when an nhassert's condition is false */ -void nhassert_failed(const char * exp, const char * file, int line) -{ - fprintf(stderr, "NHASSERT(%s) in '%s' at line %d\n", exp, file, line); - exit(EXIT_FAILURE); -} - -/*lev_main.c*/ diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index 1cc97815e..feadfe389 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -5,7 +5,11 @@ #include "curses.h" #include "hack.h" +#ifdef SHORT_FILENAMES +#include "patchlev.h" +#else #include "patchlevel.h" +#endif #include "color.h" #include "wincurs.h" diff --git a/x.lua b/x.lua new file mode 100644 index 000000000..347eb350c --- /dev/null +++ b/x.lua @@ -0,0 +1,99 @@ + +-- s = string.format("(%i,%i),[%i,%i,%i]", u.ux, u.uy, u.dx, u.dy, u.dz); +-- nh.pline(s); + + +nh.test({ x = 3, y = 7, name="foo" }); + +local l = nh.getmap(u.ux, u.uy); + +nh.pline(string.format("map(%i,%i): glyph=%i, typ=%i, lit=%i, candig=%i", + u.ux, u.uy, + l.glyph, l.typ, l.lit, l.candig)); + +-- nh.pline("lit: " .. x.lit .. ". ") + +-- str = nh.getlin("What do you call it?"); +-- nh.verbalize("Hello, this is " .. str .. " speaking"); + + +-- nh.pline("COLNOxROWNO=(" .. nhc.COLNO .. "x" .. nhc.ROWNO .. ")") + + +-- local opts = { a = "valinta a", b = "bbbbb", c = "option c" } +-- local ret = nh.menu("Chooooooose one", "a", "one", opts) +-- nh.pline("You chose: '" .. ret .. "', that is: '" .. opts[ret] .. "'"); + + +-- nh.pline("makeplural: " .. nh.makeplural("zorkmid")); +-- nh.pline("makesingular: " .. nh.makesingular("zorkmids")); + + +-- local opts = { +-- { key = "a", text = "valinta a" }, +-- { key = "b", text = "bbbbb" }, +-- { key = "c", text = "option c" } +-- } +--local ret = nh.menu("Choose one (1)", nil, nil, opts) +--nh.pline("You chose: '" .. ret .. "'") + + +--local ret = nh.menu("Choose one (2)", opts) +--nh.pline("You chose: '" .. ret .. "'") + +--[[ + +nh.level_init({ + style = "none", -- or "fill", "grid", "mines", "rogue" + filling = "tree", + init_present = 1, + padding = 1, + fg = "floor", + bg = "wall", + smoothed = 0, + joined = 1, + lit = -1, + walled = 0, + icedpools = 0 +}); + +nh.level_flags({"noteleport", "hardfloor"}); + +nh.message("What a strange feeling!"); + +nh.map({horiz = "center", + vert = "center", + map = " +..... +.L.L. +..... +" }); + +nh.monster({ + class = "V", + typename = "vampire", + coord = {5, 10}, + name = "Phil", + attitude = "peaceful", + alertness = "asleep", + alignment = "lawful", + -- appearance = ...? + female = 1, + invisible = 1, + cancelled = 1, + revived = 1, + avenge = 1, + fleeing = 23, + blinded = 23, + paralyzed = 23, + stunned = 1, + confused = 1, + seentraps = { "pit", "magic trap" }, -- could be "all" + -- how to add inventory for this monster? + -- should be able to just directly set struct monst fields +}); + +nh.object({ +}); + +-- ]] diff --git a/y.lua b/y.lua new file mode 100644 index 000000000..aba85d261 --- /dev/null +++ b/y.lua @@ -0,0 +1,210 @@ + +-- run tests on the des-level commands + +-- des.level_init({ style = "mines", joined = 1, lit = 1 }); +-- des.level_init({ style = "mazegrid", lit = 1 }); +-- des.level_init({ style = "solidfill" }); +-- des.level_init({ style = "rogue" }); +des.level_init(); + +function selection_tests () + -- OO style + local sel = selection.new(); + sel:get(1, 2); + sel:set(1, 2); + sel:negate(); + sel:percentage(50); + sel:rndcoord(1); + sel:line(1,2, 50,20); + sel:randline(1,2, 50,20, 7); + sel:rect(1,2, 7,8); + sel:fillrect(1,2, 7,8); + sel:area(1,2, 7,8); + sel:grow(); + sel:filter_mapchar(' '); + sel:floodfill(1,1); + sel:circle(40, 10, 9); + sel:circle(40, 10, 9, 1); + sel:ellipse(40, 10, 20, 8); + sel:ellipse(40, 10, 20, 8, 1); + + -- initializers + selection.set(1, 2); + selection.negate(); + selection.line(1,2, 50,20); + selection.randline(1,2, 50,20, 7); + selection.rect(1,2, 7,8); + selection.fillrect(1,2, 7,8); + selection.area(1,2, 7,8); + selection.floodfill(1,1); + selection.circle(40, 10, 9); + selection.circle(40, 10, 9, 1); + selection.ellipse(40, 10, 20, 8); + selection.ellipse(40, 10, 20, 8, 1); + + -- variable as param + selection.get(sel, 1, 2); + selection.set(sel, 1, 2); + selection.negate(sel); + selection.percentage(sel, 50); + selection.rndcoord(sel, 1); + selection.line(sel, 1,2, 50,20); + selection.randline(sel, 1,2, 50,20, 7); + selection.rect(sel, 1,2, 7,8); + selection.fillrect(sel, 1,2, 7,8); + selection.area(sel, 1,2, 7,8); + selection.grow(sel); + selection.filter_mapchar(sel, ' '); + selection.floodfill(sel, 1,1); + selection.circle(sel, 40, 10, 9); + selection.circle(sel, 40, 10, 9, 1); + selection.ellipse(sel, 40, 10, 20, 8); + selection.ellipse(sel, 40, 10, 20, 8, 1); +end -- selection_tests() + +-- set coordinate 4,5 to value 1 +-- selection.set(sel, 4, 5); + +-- set coordinate 7,7 to value 1 +-- sel:set(7, 7); + +-- set 5,5 to value 2 +-- sel:set(5,5, 2); + +-- get 3 coordinates, removing the coordinates from the selection +-- local tx1, ty1 = selection.rndcoord(sel, 1); +-- local tx2, ty2 = selection.rndcoord(sel, 1); +-- local tx3, ty3 = selection.rndcoord(sel, 1); + +-- filter randomly 50% of the selection +-- local sel2 = selection.percentage(sel, 50); + +-- negate the selection +-- local sel3 = selection.negate(sel); + +-- negate first, then 50% +-- local sel4 = selection.percentage(selection.negate(sel), 50); + +-- local yyy = sel:get(6, 7); + +-- des.mazewalk({ x = 4, y = 6, stocked = 0 }); + +-- draw a line from (1,1) to (40,15) +-- selection.line(sel, 1,1, 40,15); + +-- draw a rectangle with upper left at (1,1) to lower right at (10,10) +-- selection.rect(sel, 1,1, 10,10); + +-- draw a filled rectangle with upper left at (1,1) to lower right at (10,10) +-- selection.fillrect(sel, 40,2, 50,5); + +-- alias to fillrect +-- selection.area(sel, 40,2, 50,5); + +-- randomized line from (73,1) to (1,20), with roughness 7 +-- selection.randline(sel, 73, 1, 1, 20, 7); + +-- grow selection to all directions +-- selection.grow(sel); + +-- floodfill from (2,7), matching the same terrain type +-- sel:floodfill(2, 5); + +-- draw a circle at (40,10) with radius 9 +-- selection.circle(sel, 40, 10, 9); + +-- draw a filled circle at (40,10) with radius 9 +-- selection.circle(sel, 40, 10, 9, 1); + +-- draw an ellipse at (40,10) with radii 20 and 8 +-- selection.ellipse(sel, 40, 10, 20, 8); + +-- draw a filled ellipse at (40,10) with radii 20 and 8 +-- sel:ellipse(40, 10, 20, 8, 1); + +-- filter selection by matching terrain +-- selection.filter_mapchar(sel, ' '); + +-- set lava in the selection +local sel = selection.area(4,5, 40,10) ~ selection.rect(7,8, 60,14); +des.terrain(sel, "L"); + +-- des.terrain({ x = tx1, y = ty1, typ = "L" }); +-- des.terrain({ x = tx2, y = ty2, typ = "T" }); +-- des.terrain({ x = tx3, y = ty3, typ = "F" }); + +-- des.wall_property({ property = "nondiggable", x1 = 0, y1 = 0, x2 = 40, y2 = 20 }); +-- des.wall_property(); + +des.wallify(); + + + +function test () +rectroom = [[ +---- +|..| +|... +|..| +----]]; + +des.map({ + -- halign = "center", valign = "center", + x = 5, y = 5, + keepregion = 1, + map = [[ +------ +|..... +|....| +|....| +.....| +|....| +|....| +------]]}); + +--[[ +for i = 0, 5 do + xp = math.random(70); + yp = math.random(20); + -- des.message("i=" .. i .. " (" .. xp .. "," .. yp .. ")"); + -- des.map({ x = xp, y = yp , map = rectroom, keepregion = 1 }); +end +]] + +-- des.wallify(); + +-- des.message("viesti"); + + +for i = 1, 10 do + mx = i; + my = i; + des.message(i .."=(" .. mx .. "," .. my .. ")"); + des.monster({ x = mx, y = my, + name = "foo" .. mx .. "x" .. my, + -- class = "F", + id = "red mold", + peaceful = 1, + asleep = 1, + female = 1 + }); + des.object({ x = mx + 1, y = my, + -- class = "=", + id = "silver dagger", + buc = "blessed", + quantity = 1, + spe = "random" + }); +end + +for i = 1, 1000 do + des.object({ x = 40, y = 10, + -- class = "=", + id = "silver dagger", + buc = "blessed", + quantity = 1, + -- spe = "random" + }); +end + +end -- function test() From 9cd928027615793b091bac56d2f85faa78d2de79 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 14 Jul 2019 10:07:11 +0300 Subject: [PATCH 153/529] Lua: remove dgn_comp, use lua instead --- dat/dungeon.def | 143 --- dat/dungeon.lua | 310 +++++++ doc/dgn_comp.6 | 419 --------- doc/dgn_comp.txt | 330 ------- include/dgn_file.h | 8 +- include/extern.h | 2 + src/dungeon.c | 288 ++++-- src/nhlua.c | 39 +- sys/share/dgn_comp.h | 27 - sys/share/dgn_lex.c | 2000 ----------------------------------------- sys/share/dgn_yacc.c | 1053 ---------------------- sys/unix/Makefile.dat | 11 +- sys/unix/Makefile.doc | 7 +- sys/unix/Makefile.src | 4 +- sys/unix/Makefile.top | 14 +- sys/unix/Makefile.utl | 47 +- util/dgn_comp.l | 144 --- util/dgn_comp.y | 678 -------------- util/dgn_main.c | 193 ---- 19 files changed, 578 insertions(+), 5139 deletions(-) delete mode 100644 dat/dungeon.def create mode 100644 dat/dungeon.lua delete mode 100644 doc/dgn_comp.6 delete mode 100644 doc/dgn_comp.txt delete mode 100644 sys/share/dgn_comp.h delete mode 100644 sys/share/dgn_lex.c delete mode 100644 sys/share/dgn_yacc.c delete mode 100644 util/dgn_comp.l delete mode 100644 util/dgn_comp.y delete mode 100644 util/dgn_main.c diff --git a/dat/dungeon.def b/dat/dungeon.def deleted file mode 100644 index d4d61fbaf..000000000 --- a/dat/dungeon.def +++ /dev/null @@ -1,143 +0,0 @@ -# NetHack 3.6 dungeon.def $NHDT-Date: 1462486876 2016/05/05 22:21:16 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.14 $ -# Copyright (c) 1990-95 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# -# The dungeon description file for the "standard" 3.1 NetHack. -# -# Note: The order of the definition of dungeons in this file -# reflects in their order of creation in the real dungeon. -# The "Main" branch must *always* be first. -# Also note that the order of the dungeons in this file -# determines the order in which branch levels are assigned. -# If two dungeons have overlapping ranges for their entry -# points, then you should list the dungeon with the _least_ -# number of choices for its branch level _first_. -# - -DUNGEON: "The Dungeons of Doom" "D" (25, 5) -ALIGNMENT: unaligned -BRANCH: "The Gnomish Mines" @ (2, 3) -LEVEL: "rogue" "R" @ (15, 4) -LEVELDESC: roguelike -LEVEL: "oracle" "O" @ (5, 5) -LEVALIGN: neutral -CHAINBRANCH: "Sokoban" "oracle" + (1, 0) up -RNDLEVEL: "bigrm" "B" @ (10, 3) 40 10 -CHAINBRANCH: "The Quest" "oracle" + (6, 2) portal -BRANCH: "Fort Ludios" @ (18, 4) portal -RNDLEVEL: "medusa" "none" @ (-5, 4) 4 -LEVALIGN: chaotic -LEVEL: "castle" "none" @ (-1, 0) -CHAINBRANCH: "Gehennom" "castle" + (0, 0) no_down -BRANCH: "The Elemental Planes" @ (1, 0) no_down up - -# -# Gehennom -# -# Now re-worked for 3.1, hell is hopefully going to be a little -# less boring. Also, in 3.1, the tower is not considered as a -# part of hell, but is set up as a separate dungeon. -# -# Gehennom is no longer considered "hellish" as a complete dungeon. -# That is, fire resistance is no longer a condition for survival in -# it. However, Gehennom, and the special levels in it in particular, -# is abundant with fire traps. As a result, fire resistance is still -# a prudent survival strategy in Gehennom. -# -# Note: Gehennom *must* be the second dungeon defined so that -# monsters can properly migrate here under certain -# circumstances. -# -DUNGEON: "Gehennom" "G" (20, 5) -DESCRIPTION: mazelike -DESCRIPTION: hellish -ALIGNMENT: noalign -BRANCH: "Vlad's Tower" @ (9, 5) up -LEVEL: "valley" "V" @ (1, 0) -LEVEL: "sanctum" "none" @ (-1, 0) -LEVEL: "juiblex" "J" @ (4, 4) -LEVEL: "baalz" "B" @ (6, 4) -LEVEL: "asmodeus" "A" @ (2, 6) -LEVEL: "wizard1" "none" @ (11, 6) -CHAINLEVEL: "wizard2" "X" "wizard1" + (1, 0) -CHAINLEVEL: "wizard3" "Y" "wizard1" + (2, 0) -LEVEL: "orcus" "O" @ (10, 6) -LEVEL: "fakewiz1" "F" @ (-6,4) -LEVEL: "fakewiz2" "G" @ (-6,4) - -# -# The Mines of the Gnomes of Zurich. -# -DUNGEON: "The Gnomish Mines" "M" (8, 2) -ALIGNMENT: lawful -DESCRIPTION: mazelike -RNDLEVEL: "minetn" "T" @ (3, 2) 7 -LEVELDESC: town -RNDLEVEL: "minend" "E" @ (-1, 0) 3 - -# -# The Questdungeon -# -# This is a proto-dungeon. The level file names will be prepended with -# three letter role abbreviation during initialization, replacing "x". -# A special "x-fill" level must be defined in the levels description -# file. It will be used for all levels not defined explicitly below. -# -DUNGEON: "The Quest" "Q" (5, 2) -LEVEL: "x-strt" "none" @ (1, 1) -LEVEL: "x-loca" "L" @ (3, 1) -LEVEL: "x-goal" "none" @ (-1, 0) - -# -# Sokoban -# -DUNGEON: "Sokoban" "none" (4, 0) -DESCRIPTION: mazelike -ALIGNMENT: neutral -ENTRY: -1 -RNDLEVEL: "soko1" "none" @ (1, 0) 2 -RNDLEVEL: "soko2" "none" @ (2, 0) 2 -RNDLEVEL: "soko3" "none" @ (3, 0) 2 -RNDLEVEL: "soko4" "none" @ (4, 0) 2 - -# -# The Central Vault of Croesus. -# -DUNGEON: "Fort Ludios" "K" (1, 0) -DESCRIPTION: mazelike -ALIGNMENT: unaligned -LEVEL: "knox" "K" @ (-1, 0) -# -# Vlad's Tower -# -# It has been removed from Gehennom, and it is surrounded by stone. -# Must not allow bones files for its top level. -# -DUNGEON: "Vlad's Tower" "T" (3, 0) -PROTOFILE: "tower" -DESCRIPTION: mazelike -ALIGNMENT: chaotic -ENTRY: -1 -LEVEL: "tower1" "none" @ (1, 0) -# it isn't necessary to list these last two, but doing so makes them -# show up in ^O output and in the level teleport menu -LEVEL: "tower2" "none" @ (2, 0) -LEVEL: "tower3" "none" @ (3, 0) - -# -# The Endgame levels -# -# Enter on 2nd level from bottom; 1st (from bottom) is a -# placeholder for surface level, and should be unreachable. -# [Note: the name "dummy" is checked for in init_dungeons().] -# -DUNGEON: "The Elemental Planes" "E" (6, 0) -DESCRIPTION: mazelike -ALIGNMENT: unaligned -ENTRY: -2 -LEVEL: "astral" "none" @ (1, 0) -LEVEL: "water" "none" @ (2, 0) -LEVEL: "fire" "none" @ (3, 0) -LEVEL: "air" "none" @ (4, 0) -LEVEL: "earth" "none" @ (5, 0) -LEVEL: "dummy" "none" @ (6, 0) diff --git a/dat/dungeon.lua b/dat/dungeon.lua new file mode 100644 index 000000000..6112a25ad --- /dev/null +++ b/dat/dungeon.lua @@ -0,0 +1,310 @@ + +dungeon = { + { + name = "The Dungeons of Doom", + bonetag = "D", + base = 25, + range = 5, + alignment = "unaligned", + branches = { + { + name = "The Gnomish Mines", + base = 2, + range = 3 + }, + { + name = "Sokoban", + chainlevel = "oracle", + base = 1, + direction = "up" + }, + { + name = "The Quest", + chainlevel = "oracle", + base = 6, + range = 2, + branchtype = "portal" + }, + { + name = "Fort Ludios", + base = 18, + range = 4, + branchtype = "portal" + }, + { + name = "Gehennom", + chainlevel = "castle", + base = 0, + branchtype = "no_down" + }, + { + name = "The Elemental Planes", + base = 1, + branchtype = "no_down", + direction = "up" + } + }, + levels = { + { + name = "rogue", + bonetag = "R", + base = 15, + range = 4, + flags = "roguelike", + }, + { + name = "oracle", + bonetag = "O", + base = 5, + range = 5, + alignment = "neutral" + }, + { + name = "bigrm", + bonetag = "B", + base = 10, + range = 3, + chance = 40, + nlevels = 10 + }, + { + name = "medusa", + base = -5, + range = 4, + nlevels = 4, + alignment = "chaotic" + }, + { + name = "castle", + base = -1 + } + } + }, + { + name = "Gehennom", + bonetag = "G", + base = 20, + range = 5, + flags = { "mazelike", "hellish" }, + alignment = "noalign", + branches = { + { + name = "Vlad's Tower", + base = 9, + range = 5, + direction = "up" + } + }, + levels = { + { + name = "valley", + bonetag = "V", + base = 1 + }, + { + name = "sanctum", + base = -1 + }, + { + name = "juiblex", + bonetag = "J", + base = 4, + range = 4 + }, + { + name = "baalz", + bonetag = "B", + base = 6, + range = 4 + }, + { + name = "asmodeus", + bonetag = "A", + base = 2, + range = 6 + }, + { + name = "wizard1", + base = 11, + range = 6 + }, + { + name = "wizard2", + bonetag = "X", + chainlevel = "wizard1", + base = 1 + }, + { + name = "wizard3", + bonetag = "Y", + chainlevel = "wizard1", + base = 2 + }, + { + name = "orcus", + bonetag = "O", + base = 10, + range = 6 + }, + { + name = "fakewiz1", + bonetag = "F", + base = -6, + range = 4 + }, + { + name = "fakewiz2", + bonetag = "G", + base = -6, + range = 4 + }, + } + }, + { + name = "The Gnomish Mines", + bonetag = "M", + base = 8, + range = 2, + alignment = "lawful", + flags = { "mazelike" }, + levels = { + { + name = "minetn", + bonetag = "T", + base = 3, + range = 2, + nlevels = 7, + flags = "town" + }, + { + name = "minend", + bonetag = "E", + base = -1, + nlevels = 3 + }, + } + }, + { + name = "The Quest", + bonetag = "Q", + base = 5, + range = 2, + levels = { + { + name = "x-strt", + base = 1, + range = 1 + }, + { + name = "x-loca", + bonetag = "L", + base = 3, + range = 1 + }, + { + name = "x-goal", + base = -1 + }, + } + }, + { + name = "Sokoban", + base = 4, + alignment = "neutral", + flags = { "mazelike" }, + entry = -1, + levels = { + { + name = "soko1", + base = 1, + nlevels = 2 + }, + { + name = "soko2", + base = 2, + nlevels = 2 + }, + { + name = "soko3", + base = 3, + nlevels = 2 + }, + { + name = "soko4", + base = 4, + nlevels = 2 + }, + } + }, + { + name = "Fort Ludios", + base = 1, + bonetag = "K", + flags = { "mazelike" }, + alignment = "unaligned", + levels = { + { + name = "knox", + bonetag = "K", + base = -1 + } + } + }, + { + name = "Vlad's Tower", + base = 3, + bonetag = "T", + protofile = "tower", + alignment = "chaotic", + flags = { "mazelike" }, + entry = -1, + levels = { + { + name = "tower1", + base = 1 + }, + { + name = "tower2", + base = 2 + }, + { + name = "tower3", + base = 3 + }, + } + }, + { + name = "The Elemental Planes", + bonetag = "E", + base = 6, + alignment = "unaligned", + flags = { "mazelike" }, + entry = -2, + levels = { + { + name = "astral", + base = 1 + }, + { + name = "water", + base = 2 + }, + { + name = "fire", + base = 3 + }, + { + name = "air", + base = 4 + }, + { + name = "earth", + base = 5 + }, + { + name = "dummy", + base = 6 + }, + } + }, +} diff --git a/doc/dgn_comp.6 b/doc/dgn_comp.6 deleted file mode 100644 index 7b311831c..000000000 --- a/doc/dgn_comp.6 +++ /dev/null @@ -1,419 +0,0 @@ -.TH DGN_COMP 6 "25 May 2015" NETHACK -.de ND -.ds Nd \\$3 -.. -.de NB -.ds Nb \\$2 -.. -.de NR -.ds Nr \\$2 -.. -.ND $NHDT-Date: 1524689548 2018/04/25 20:52:28 $ -.NB $NHDT-Branch: NetHack-3.6.0 $ -.NR $NHDT-Revision: 1.6 $ -.ds Na Kenneth Lorber - -.SH NAME -dgn_comp \- NetHack dungeon compiler -.SH SYNOPSIS -.B dgn_comp -[ -.I file -] -.PP -If no arguments are given, it reads standard input. -.SH DESCRIPTION -.PP -.I Dgn_comp -is a dungeon compiler for NetHack version 3.2 and higher. It -takes a description file as an argument and produces a dungeon "script" -that is to be loaded by NetHack at runtime. -.PP -The purpose of this tool is to provide NetHack administrators and -implementors with a convenient way to create a custom dungeon for the -game, without having to recompile the entire world. -.SH GRAMMAR -.PP -DUNGEON: -.B name -.B bonesmarker -( -.B base -, -.B rand -) [ -.B %age -] -.PP -where -.B name -is the dungeon name, -.B bonesmarker -is a letter for marking bones files, ( -.B base -, -.B rand -) is the number of levels, and -.B %age -is its percentage chance of being generated (if absent, 100% chance). - -DESCRIPTION: -.B tag -.PP -where -.B tag -is currently one of -.BR HELLISH , -.BR MAZELIKE , -or -.BR ROGUELIKE . - -ALIGNMENT | LEVALIGN: [ -.B lawful -| -.B neutral -| -.B chaotic -| -.B unaligned -] -.PP -gives the alignment of the dungeon/level (default is unaligned). - -ENTRY: -.B level -.PP -the dungeon entry point. The dungeon connection attaches at this -level of the given dungeon. -If the value of -.B level -is negative, the entry level is calculated from the bottom of the -dungeon, with -1 being the last level. -If this line is not present in a dungeon description, the entry level -defaults to 1. - -PROTOFILE: -.B name -.PP -the prototypical name for dungeon level files in this dungeon. -For example, the PROTOFILE name for the dungeon -.I Vlad's Tower -is -.IR tower . - -LEVEL: -.B name -.B bonesmarker -@ ( -.B base -, -.B rand -) [ -.B %age -] -.PP -where -.B name -is the level name, -.B bonesmarker -is a letter for marking bones files, ( -.B base -, -.B rand -) is the location and -.B %age -is the generation percentage, as above. - -RNDLEVEL: -.B name -.B bonesmarker -@ ( -.B base -, -.B rand -) -[ -.B %age -] -.B rndlevs -.PP -where -.B name -is the level name, -.B bonesmarker -is a letter for marking bones files, ( -.B base -, -.B rand -) is the location, -.B %age -is the generation percentage, as above, and -.B rndlevs -is the number of similar levels available to choose from. - -CHAINLEVEL: -.B name -.B bonesmarker -.B prev_name -+ ( -.B base -, -.B rand -) [ -.B %age -] -.PP -where -.B name -is the level name, -.B bonesmarker -is a letter for marking bones files, -.B prev_name -is the name of a level defined previously, ( -.B base -, -.B rand -) is the -.I offset -from the level being chained from, and -.B %age -is the generation percentage. - -RNDCHAINLEVEL: -.B name -.B bonesmarker -.B prev_name -+ ( -.B base -, -.B rand -) [ -.B %age -] -.B rndlevs -.PP -where -.B name -is the level name, -.B bonesmarker -is a letter for marking bones files, -.B prev_name -is the name of a level defined previously, ( -.B base -, -.B rand -) is the -.I offset -from the level being chained from, -.B %age -is the generation percentage, and -.B rndlevs -is the number of similar levels available to choose from. - -LEVELDESC: -.B type -.PP -where -.B type -is the level type, (see DESCRIPTION, above). The -.B type -is used to override any pre-set value used to describe the entire dungeon, -for this level only. - -BRANCH: -.B name -@ ( -.B base -, -.B rand -) [ -.B stair -| -.B no_up -| -.B no_down -| -.B portal -] [ -.B up -| -.B down -] -.PP -where -.B name -is the name of the dungeon to branch to, and ( -.B base -, -.B rand -) is the location of the branch. -The last two optional arguments are -the branch type and branch direction. -The type of a branch can be a two-way stair connection, -a one-way stair connection, or a magic portal. -A one-way stair is described by the types -.B no_up -and -.B no_down -which specify which stair direction is missing. -The default branch type is -.BR stair . -The direction for a stair can be either up or down; direction is not -applicable to portals. The default direction is -.BR down . - -CHAINBRANCH: -.B name -.B prev_name -+ ( -.B base -, -.B rand -) [ -.B stair -| -.B no_up -| -.B no_down -| -.B portal -] [ -.B up -| -.B down -] -.PP -where -.B name -is the name of the dungeon to branch to, -.B prev_name -is the name of a previously defined -.B level -and ( -.B base -, -.B rand -) is the -.I offset -from the level being chained from. -The optional branch type and direction are the same as described above. -.SH GENERIC RULES -.PP -Each dungeon must have a unique -.B bonesmarker , -and each special level must have a -.B bonesmarker -unique within its dungeon (letters may be reused in different dungeons). -If the -.B bonesmarker -has the special value "none", no bones files will be created for that -level or dungeon. -.PP -The value -.B base -may be in the range of 1 to -.B MAXLEVEL -(as defined in -.I global.h -). -.PP -The value -.B rand -may be in the range of -1 to -.BR MAXLEVEL . -.PP -If -.B rand -is -1 it will be replaced with the value (num_dunlevs(dungeon) - base) -during the load process (ie. from here to the end of the dungeon). -.PP -If -.B rand -is 0 the level is located absolutely at -.BR base . -.PP -Branches don't have a probability. Dungeons do. If a dungeon fails -to be generated during load, all its levels and branches are skipped. -.PP -No level or branch may be chained from a level with a percentage generation -probability. This is to prevent non-resolution during the load. -In addition, no branch may be made from a dungeon with a percentage -generation probability for the same reason. -.PP -As a general rule using the dungeon compiler: -.PP -If a dungeon has a -.B protofile -name associated with it -.RI ( eg. -.BR tower ) -that file will be used. -.PP -If a special level is present, it will override the above rule and -the appropriate file will be loaded. -.PP -If neither of the above are present, the standard generator will -take over and make a "normal" level. -.PP -A level alignment, if present, will override -the alignment of the dungeon that it exists within. -.SH EXAMPLE -.PP -Here is the current syntax of the dungeon compiler's "language": - -.LP -.nf -.ta +8n +8n +8n -# -# The dungeon description file for the "standard" original -# 3.0 NetHack. -# -DUNGEON: "The Dungeons of Doom" "D" (25, 5) -LEVEL: "rogue" "none" @ (15, 4) -LEVEL: "oracle" "none" @ (5, 7) -LEVEL: "bigroom" "B" @ (12, 3) 15 -LEVEL: "medusa" "none" @ (20, 5) -CHAINLEVEL: "castle" "medusa" + (1, 4) -CHAINBRANCH: "Hell" "castle" + (0, 0) no_down -BRANCH: "The Astral Plane" @ (1, 0) no_down up - -DUNGEON: "Hell" "H" (25, 5) -DESCRIPTION: mazelike -DESCRIPTION: hellish -BRANCH: "Vlad's Tower" @ (13, 5) up -LEVEL: "wizard" "none" @ (15, 10) -LEVEL: "fakewiz" "A" @ (5, 5) -LEVEL: "fakewiz" "B" @ (10, 5) -LEVEL: "fakewiz" "C" @ (15, 5) -LEVEL: "fakewiz" "D" @ (20, 5) -LEVEL: "fakewiz" "E" @ (25, 5) - -DUNGEON: "Vlad's Tower" "T" (3, 0) -PROTOFILE: "tower" -DESCRIPTION: mazelike -ENTRY: -1 - -DUNGEON: "The Astral Plane" "A" (1, 0) -DESCRIPTION: mazelike -PROTOFILE: "endgame" -.fi -.PP -.I NOTES: -.br -Lines beginning with '#' are considered comments. -.br -A special level must be explicitly aligned. The alignment of the dungeon -it is in only applies to non-special levels within that dungeon. -.SH AUTHOR -.PP -M. Stephenson (from the level compiler by Jean-Christophe Collet). -.SH "SEE ALSO" -.PP -lev_comp(6), nethack(6) -.SH BUGS -.PP -Probably infinite. -.SH COPYRIGHT -This file is Copyright (C) \*(Na and was last modified \*(Nd (version -\*(Nb:\*(Nr). -NetHack may be freely redistributed. See license for details. diff --git a/doc/dgn_comp.txt b/doc/dgn_comp.txt deleted file mode 100644 index 907a4f0a6..000000000 --- a/doc/dgn_comp.txt +++ /dev/null @@ -1,330 +0,0 @@ - - - -DGN_COMP(6) 1995 DGN_COMP(6) - - - -NAME - dgn_comp - NetHack dungeon compiler - -SYNOPSIS - dgn_comp [ file ] - - If no arguments are given, it reads standard input. - -DESCRIPTION - Dgn_comp is a dungeon compiler for NetHack version 3.2 and - higher. It takes a description file as an argument and pro- - duces a dungeon "script" that is to be loaded by NetHack at - runtime. - - The purpose of this tool is to provide NetHack administra- - tors and implementors with a convenient way to create a cus- - tom dungeon for the game, without having to recompile the - entire world. - -GRAMMAR - DUNGEON: name bonesmarker ( base , rand ) [ %age ] - - where name is the dungeon name, bonesmarker is a letter for - marking bones files, ( base , rand ) is the number of lev- - els, and %age is its percentage chance of being generated - (if absent, 100% chance). - - DESCRIPTION: tag - - where tag is currently one of HELLISH, MAZELIKE, or ROGUE- - LIKE. - - ALIGNMENT | LEVALIGN: [ lawful | neutral | chaotic | - unaligned ] - - gives the alignment of the dungeon/level (default is - unaligned). - - ENTRY: level - - the dungeon entry point. The dungeon connection attaches at - this level of the given dungeon. If the value of level is - negative, the entry level is calculated from the bottom of - the dungeon, with -1 being the last level. If this line is - not present in a dungeon description, the entry level - defaults to 1. - - PROTOFILE: name - - the prototypical name for dungeon level files in this - dungeon. For example, the PROTOFILE name for the dungeon - Vlad's Tower is tower. - - - -Dec Last change: 12 1 - - - - - - -DGN_COMP(6) 1995 DGN_COMP(6) - - - - LEVEL: name bonesmarker @ ( base , rand ) [ %age ] - - where name is the level name, bonesmarker is a letter for - marking bones files, ( base , rand ) is the location and - %age is the generation percentage, as above. - - RNDLEVEL: name bonesmarker @ ( base , rand ) [ %age ] - rndlevs - - where name is the level name, bonesmarker is a letter for - marking bones files, ( base , rand ) is the location, %age - is the generation percentage, as above, and rndlevs is the - number of similar levels available to choose from. - - CHAINLEVEL: name bonesmarker prev_name + ( base , rand ) [ - %age ] - - where name is the level name, bonesmarker is a letter for - marking bones files, prev_name is the name of a level - defined previously, ( base , rand ) is the offset from the - level being chained from, and %age is the generation percen- - tage. - - RNDCHAINLEVEL: name bonesmarker prev_name + ( base , rand ) - [ %age ] rndlevs - - where name is the level name, bonesmarker is a letter for - marking bones files, prev_name is the name of a level - defined previously, ( base , rand ) is the offset from the - level being chained from, %age is the generation percentage, - and rndlevs is the number of similar levels available to - choose from. - - LEVELDESC: type - - where type is the level type, (see DESCRIPTION, above). The - type is used to override any pre-set value used to describe - the entire dungeon, for this level only. - - BRANCH: name @ ( base , rand ) [ stair | no_up | no_down | - portal ] [ up | down ] - - where name is the name of the dungeon to branch to, and ( - base , rand ) is the location of the branch. The last two - optional arguments are the branch type and branch direction. - The type of a branch can be a two-way stair connection, a - one-way stair connection, or a magic portal. A one-way - stair is described by the types no_up and no_down which - specify which stair direction is missing. The default - branch type is stair. The direction for a stair can be - either up or down; direction is not applicable to portals. - The default direction is down. - - - -Dec Last change: 12 2 - - - - - - -DGN_COMP(6) 1995 DGN_COMP(6) - - - - CHAINBRANCH: name prev_name + ( base , rand ) [ stair | - no_up | no_down | portal ] [ up | down ] - - where name is the name of the dungeon to branch to, - prev_name is the name of a previously defined level and ( - base , rand ) is the offset from the level being chained - from. The optional branch type and direction are the same - as described above. - -GENERIC RULES - Each dungeon must have a unique bonesmarker , and each spe- - cial level must have a bonesmarker unique within its dungeon - (letters may be reused in different dungeons). If the - bonesmarker has the special value "none", no bones files - will be created for that level or dungeon. - - The value base may be in the range of 1 to MAXLEVEL (as - defined in global.h ). - - The value rand may be in the range of -1 to MAXLEVEL. - - If rand is -1 it will be replaced with the value - (num_dunlevs(dungeon) - base) during the load process (ie. - from here to the end of the dungeon). - - If rand is 0 the level is located absolutely at base. - - Branches don't have a probability. Dungeons do. If a - dungeon fails to be generated during load, all its levels - and branches are skipped. - - No level or branch may be chained from a level with a per- - centage generation probability. This is to prevent non- - resolution during the load. In addition, no branch may be - made from a dungeon with a percentage generation probability - for the same reason. - - As a general rule using the dungeon compiler: - - If a dungeon has a protofile name associated with it (eg. - tower) that file will be used. - - If a special level is present, it will override the above - rule and the appropriate file will be loaded. - - If neither of the above are present, the standard generator - will take over and make a "normal" level. - - A level alignment, if present, will override the alignment - of the dungeon that it exists within. - - - - - -Dec Last change: 12 3 - - - - - - -DGN_COMP(6) 1995 DGN_COMP(6) - - - -EXAMPLE - Here is the current syntax of the dungeon compiler's - "language": - - - # - # The dungeon description file for the "standard" original - # 3.0 NetHack. - # - DUNGEON: "The Dungeons of Doom" "D" (25, 5) - LEVEL: "rogue" "none" @ (15, 4) - LEVEL: "oracle" "none" @ (5, 7) - LEVEL: "bigroom" "B" @ (12, 3) 15 - LEVEL: "medusa" "none" @ (20, 5) - CHAINLEVEL: "castle" "medusa" + (1, 4) - CHAINBRANCH: "Hell" "castle" + (0, 0) no_down - BRANCH: "The Astral Plane" @ (1, 0) no_down up - - DUNGEON: "Hell" "H" (25, 5) - DESCRIPTION: mazelike - DESCRIPTION: hellish - BRANCH: "Vlad's Tower" @ (13, 5) up - LEVEL: "wizard" "none" @ (15, 10) - LEVEL: "fakewiz" "A" @ (5, 5) - LEVEL: "fakewiz" "B" @ (10, 5) - LEVEL: "fakewiz" "C" @ (15, 5) - LEVEL: "fakewiz" "D" @ (20, 5) - LEVEL: "fakewiz" "E" @ (25, 5) - - DUNGEON: "Vlad's Tower" "T" (3, 0) - PROTOFILE: "tower" - DESCRIPTION: mazelike - ENTRY: -1 - - DUNGEON: "The Astral Plane" "A" (1, 0) - DESCRIPTION: mazelike - PROTOFILE: "endgame" - - NOTES: - Lines beginning with '#' are considered comments. - A special level must be explicitly aligned. The alignment - of the dungeon it is in only applies to non-special levels - within that dungeon. - -AUTHOR - M. Stephenson (from the level compiler by Jean-Christophe - Collet). - -SEE ALSO - lev_comp(6), nethack(6) - - - - - -Dec Last change: 12 4 - - - - - - -DGN_COMP(6) 1995 DGN_COMP(6) - - - -BUGS - Probably infinite. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Dec Last change: 12 5 - - - diff --git a/include/dgn_file.h b/include/dgn_file.h index 9e20de9c8..442905cfb 100644 --- a/include/dgn_file.h +++ b/include/dgn_file.h @@ -18,22 +18,24 @@ struct couple { }; struct tmpdungeon { - char name[24], protoname[24]; + char *name, *protoname; struct couple lev; int flags, chance, levels, branches, entry_lev; /* entry level for this dungeon */ char boneschar; + int align; }; struct tmplevel { - char name[24]; + char *name; + char *chainlvl; struct couple lev; int chance, rndlevs, chain, flags; char boneschar; }; struct tmpbranch { - char name[24]; /* destination dungeon name */ + char *name; /* destination dungeon name */ struct couple lev; int chain; /* index into tmplevel array (chained branch)*/ int type; /* branch type (see below) */ diff --git a/include/extern.h b/include/extern.h index 694b2214a..3da1872a9 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1655,6 +1655,8 @@ E struct selectionvar *FDECL(l_selection_check, (lua_State *, int)); E int FDECL(l_selection_register, (lua_State *)); /* ### nhlua.c ### */ +E lua_State * NDECL(nhl_init); +E boolean FDECL(nhl_loadlua, (lua_State *, const char *)); E boolean FDECL(load_lua, (const char *)); E void FDECL(nhl_error, (lua_State *, const char *)); E void FDECL(lcheck_param_table, (lua_State *)); diff --git a/src/dungeon.c b/src/dungeon.c index 95c4a6cdb..09b0fdb7e 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -10,7 +10,7 @@ #include "sfproto.h" -#define DUNGEON_FILE "dungeon" +#define DUNGEON_FILE "dungeon.lua" #define X_START "x-strt" #define X_LOCATE "x-loca" @@ -765,21 +765,56 @@ struct level_map { { X_GOAL, &nemesis_level }, { "", (d_level *) 0 } }; +int +get_dgn_flags(L) +lua_State *L; +{ + int dgn_flags = 0; + const char *const flagstrs[] = { "town", "hellish", "mazelike", "roguelike", NULL}; + const int flagstrs2i[] = { TOWN, HELLISH, MAZELIKE, ROGUELIKE, 0 }; + + lua_getfield(L, -1, "flags"); + if (lua_type(L, -1) == LUA_TTABLE) { + int f, nflags; + lua_len(L, -1); + nflags = lua_tonumber(L, -1); + lua_pop(L, 1); + for (f = 0; f < nflags; f++) { + lua_pushinteger(L, f+1); + lua_gettable(L, -2); + if (lua_type(L, -1) == LUA_TSTRING) { + dgn_flags |= flagstrs2i[luaL_checkoption(L, -1, NULL, flagstrs)]; + lua_pop(L, 1); + } else + impossible("flags[%i] is not a string", f); + } + } else if (lua_type(L, -1) == LUA_TSTRING) { + dgn_flags |= flagstrs2i[luaL_checkoption(L, -1, NULL, flagstrs)]; + } else if (lua_type(L, -1) != LUA_TNIL) + impossible("flags is not an array or string"); + lua_pop(L, 1); + + return dgn_flags; +} + /* initialize the "dungeon" structs */ void init_dungeons() { - dlb *dgn_file; + const char *const dgnaligns[] = { "unaligned", "noalign", "lawful", "neutral", "chaotic", NULL}; + const int dgnaligns2i[] = { D_ALIGN_NONE, D_ALIGN_NONE, D_ALIGN_LAWFUL, D_ALIGN_NEUTRAL, D_ALIGN_CHAOTIC, D_ALIGN_NONE }; + lua_State *L; register int i, cl = 0, cb = 0; register s_level *x; struct proto_dungeon pd; struct level_map *lev_map; struct version_info vers_info; + (void) memset(&pd, 0, sizeof(struct proto_dungeon)); pd.n_levs = pd.n_brs = 0; - dgn_file = dlb_fopen(DUNGEON_FILE, RDBMODE); - if (!dgn_file) { + L = nhl_init(); + if (!nhl_loadlua(L, DUNGEON_FILE)) { char tbuf[BUFSZ]; Sprintf(tbuf, "Cannot open dungeon description - \"%s", DUNGEON_FILE); #ifdef DLBRSRC /* using a resource from the executable */ @@ -805,55 +840,186 @@ init_dungeons() panic1(tbuf); } - /* validate the data's version against the program's version */ - Fread((genericptr_t) &vers_info, sizeof vers_info, 1, dgn_file); - /* we'd better clear the screen now, since when error messages come from - * check_version() they will be printed using pline(), which doesn't - * mix with the raw messages that might be already on the screen - */ if (iflags.window_inited) clear_nhwindow(WIN_MAP); - if (!check_version(&vers_info, DUNGEON_FILE, TRUE, UTD_CHECKSIZES)) - panic("Dungeon description not valid."); + + g.sp_levchn = (s_level *) 0; + + lua_settop(L, 0); + + lua_getglobal(L, "dungeon"); + if (!lua_istable(L, -1)) + panic("dungeon is not a lua table"); + + lua_len(L, -1); + g.n_dgns = lua_tonumber(L, -1); + lua_pop(L, 1); + + pd.start = 0; + pd.n_levs = 0; + pd.n_brs = 0; /* * Read in each dungeon and transfer the results to the internal * dungeon arrays. */ - g.sp_levchn = (s_level *) 0; - Fread((genericptr_t) &g.n_dgns, sizeof(int), 1, dgn_file); + if (g.n_dgns >= MAXDUNGEON) panic("init_dungeons: too many dungeons"); - for (i = 0; i < g.n_dgns; i++) { - Fread((genericptr_t) &pd.tmpdungeon[i], sizeof(struct tmpdungeon), 1, - dgn_file); - if (!wizard && pd.tmpdungeon[i].chance - && (pd.tmpdungeon[i].chance <= rn2(100))) { - int j; + int tidx = lua_gettop(L); - /* skip over any levels or branches */ - for (j = 0; j < pd.tmpdungeon[i].levels; j++) - Fread((genericptr_t) &pd.tmplevel[cl], - sizeof(struct tmplevel), 1, dgn_file); + lua_pushnil(L); /* first key */ + i = 0; + while (lua_next(L, tidx) != 0) { + if (!lua_istable(L, -1)) + panic("dungeon[%i] is not a lua table", i); - for (j = 0; j < pd.tmpdungeon[i].branches; j++) - Fread((genericptr_t) &pd.tmpbranch[cb], - sizeof(struct tmpbranch), 1, dgn_file); + char *dgn_name = get_table_str(L, "name"); + char *dgn_bonetag = get_table_str_opt(L, "bonetag", ""); /* TODO: single char or "none" */ + char *dgn_protoname = get_table_str_opt(L, "protofile", ""); + int dgn_base = get_table_int(L, "base"); + int dgn_range = get_table_int_opt(L, "range", 0); + int dgn_align = dgnaligns2i[get_table_option(L, "alignment", "unaligned", dgnaligns)]; + int dgn_entry = get_table_int_opt(L, "entry", 0); + int dgn_chance = get_table_int_opt(L, "chance", 0); + int dgn_flags = get_dgn_flags(L); + + debugpline4("DUNGEON[%i]: %s, base=(%i,%i)", i, dgn_name, dgn_base, dgn_range); + + if (!wizard && dgn_chance && (dgn_chance <= rn2(100))) { + debugpline1("IGNORING %s", dgn_name); g.n_dgns--; - i--; + lua_pop(L, 1); /* pop the dungeon table */ continue; } - Strcpy(g.dungeons[i].dname, pd.tmpdungeon[i].name); - Strcpy(g.dungeons[i].proto, pd.tmpdungeon[i].protoname); - g.dungeons[i].boneid = pd.tmpdungeon[i].boneschar; + /* levels begin */ + lua_getfield(L, -1, "levels"); + if (lua_type(L, -1) == LUA_TTABLE) { + int f, nlevels; + lua_len(L, -1); + nlevels = lua_tonumber(L, -1); + pd.tmpdungeon[i].levels = nlevels; + lua_pop(L, 1); + for (f = 0; f < nlevels; f++) { + lua_pushinteger(L, f+1); + lua_gettable(L, -2); + if (lua_type(L, -1) == LUA_TTABLE) { + int bi; + char *lvl_name = get_table_str(L, "name"); + char *lvl_bonetag = get_table_str_opt(L, "bonetag", ""); + int lvl_base = get_table_int(L, "base"); + int lvl_range = get_table_int_opt(L, "range", 0); + int lvl_nlevels = get_table_int_opt(L, "nlevels", 0); + int lvl_chance = get_table_int_opt(L, "chance", 0); + char *lvl_chain = get_table_str_opt(L, "chainlevel", NULL); + int lvl_align = dgnaligns2i[get_table_option(L, "alignment", "unaligned", dgnaligns)]; + int lvl_flags = get_dgn_flags(L); + struct tmplevel *tmpl = &pd.tmplevel[pd.n_levs + f]; + debugpline4("LEVEL[%i]:%s,(%i,%i)", f, lvl_name, lvl_base, lvl_range); + tmpl->name = lvl_name; + tmpl->chainlvl = lvl_chain; + tmpl->lev.base = lvl_base; + tmpl->lev.rand = lvl_range; + tmpl->chance = lvl_chance; + tmpl->rndlevs = lvl_nlevels; + tmpl->flags = lvl_flags; + tmpl->chain = -1; + if (lvl_chain) { + debugpline1("CHAINLEVEL: %s", lvl_chain); + for (bi = 0; bi < pd.n_levs + f; bi++) { + debugpline2("checking(%i):%s", bi, pd.tmplevel[bi].name); + if (!strcmp(pd.tmplevel[bi].name, lvl_chain)) { + tmpl->chain = bi; + break; + } + } + if (tmpl->chain == -1) + panic("Could not chain level %s to %s", lvl_name, lvl_chain); + } + } else + panic("dungeon[%i].levels[%i] is not a hash", i, f); + lua_pop(L, 1); + } + pd.n_levs += nlevels; + if (pd.n_levs > LEV_LIMIT) + panic("init_dungeon: too many special levels"); + } else if (lua_type(L, -1) != LUA_TNIL) + panic("dungeon[%i].levels is not an array of hashes", i); + lua_pop(L, 1); + /* levels end */ - if (pd.tmpdungeon[i].lev.rand) - g.dungeons[i].num_dunlevs = (xchar) rn1(pd.tmpdungeon[i].lev.rand, - pd.tmpdungeon[i].lev.base); + /* branches begin */ + lua_getfield(L, -1, "branches"); + if (lua_type(L, -1) == LUA_TTABLE) { + int f, nbranches; + lua_len(L, -1); + nbranches = lua_tonumber(L, -1); + pd.tmpdungeon[i].branches = nbranches; + lua_pop(L, 1); + for (f = 0; f < nbranches; f++) { + lua_pushinteger(L, f+1); + lua_gettable(L, -2); + if (lua_type(L, -1) == LUA_TTABLE) { + int bi; + const char *const brdirstr[] = { "up", "down", NULL }; + const int brdirstr2i[] = { TRUE, FALSE, FALSE }; + const char *const brtypes[] = { "stair", "portal", "no_down", "no_up", NULL }; + const int brtypes2i[] = { TBR_STAIR, TBR_PORTAL, TBR_NO_DOWN, TBR_NO_UP, TBR_STAIR }; + char *br_name = get_table_str(L, "name"); + int br_base = get_table_int(L, "base"); + int br_range = get_table_int_opt(L, "range", 0); + int br_type = brtypes2i[get_table_option(L, "branchtype", "stair", brtypes)]; + int br_up = brdirstr2i[get_table_option(L, "direction", "down", brdirstr)]; + char *br_chain = get_table_str_opt(L, "chainlevel", NULL); + struct tmpbranch *tmpb = &pd.tmpbranch[pd.n_brs + f]; + + debugpline4("BRANCH[%i]:%s,(%i,%i)", f, br_name, br_base, br_range); + tmpb->name = br_name; + tmpb->lev.base = br_base; + tmpb->lev.rand = br_range; + tmpb->type = br_type; + tmpb->up = br_up; + tmpb->chain = -1; + if (br_chain) { + debugpline1("CHAINBRANCH:%s", br_chain); + for (bi = 0; bi < pd.n_levs + f - 1; bi++) + if (!strcmp(pd.tmplevel[bi].name, br_chain)) { + tmpb->chain = bi; + break; + } + } + } else + panic("dungeon[%i].branches[%i] is not a hash", i, f); + lua_pop(L, 1); + } + pd.n_brs += nbranches; + if (pd.n_brs > BRANCH_LIMIT) + panic("init_dungeon: too many branches"); + } else if (lua_type(L, -1) != LUA_TNIL) + panic("dungeon[%i].branches is not an array of hashes", i); + lua_pop(L, 1); + /* branches end */ + + pd.tmpdungeon[i].name = dgn_name; + pd.tmpdungeon[i].protoname = dgn_protoname; + pd.tmpdungeon[i].boneschar = *dgn_bonetag ? *dgn_bonetag : 0; + pd.tmpdungeon[i].lev.base = dgn_base; + pd.tmpdungeon[i].lev.rand = dgn_range; + pd.tmpdungeon[i].flags = dgn_flags; + pd.tmpdungeon[i].align = dgn_align; + pd.tmpdungeon[i].chance = dgn_chance; + pd.tmpdungeon[i].entry_lev = dgn_entry; + + Strcpy(g.dungeons[i].dname, dgn_name); /* FIXME: dname length */ + Strcpy(g.dungeons[i].proto, dgn_protoname); /* FIXME: proto length */ + g.dungeons[i].boneid = *dgn_bonetag ? *dgn_bonetag : 0; + + if (dgn_range) + g.dungeons[i].num_dunlevs = (xchar) rn1(dgn_range, dgn_base); else - g.dungeons[i].num_dunlevs = (xchar) pd.tmpdungeon[i].lev.base; + g.dungeons[i].num_dunlevs = (xchar) dgn_base; if (!i) { g.dungeons[i].ledger_start = 0; @@ -865,14 +1031,13 @@ init_dungeons() g.dungeons[i].dunlev_ureached = 0; } - g.dungeons[i].flags.hellish = !!(pd.tmpdungeon[i].flags & HELLISH); - g.dungeons[i].flags.maze_like = !!(pd.tmpdungeon[i].flags & MAZELIKE); - g.dungeons[i].flags.rogue_like = !!(pd.tmpdungeon[i].flags & ROGUELIKE); - g.dungeons[i].flags.align = - ((pd.tmpdungeon[i].flags & D_ALIGN_MASK) >> 4); + g.dungeons[i].flags.hellish = !!(dgn_flags & HELLISH); + g.dungeons[i].flags.maze_like = !!(dgn_flags & MAZELIKE); + g.dungeons[i].flags.rogue_like = !!(dgn_flags & ROGUELIKE); + g.dungeons[i].flags.align = dgn_align; + /* - * Set the entry level for this dungeon. The pd.tmpdungeon entry - * value means: + * Set the entry level for this dungeon. The entry value means: * < 0 from bottom (-1 == bottom level) * 0 default (top) * > 0 actual level (1 = top) @@ -880,13 +1045,13 @@ init_dungeons() * Note that the entry_lev field in the dungeon structure is * redundant. It is used only here and in print_dungeon(). */ - if (pd.tmpdungeon[i].entry_lev < 0) { + if (dgn_entry < 0) { g.dungeons[i].entry_lev = - g.dungeons[i].num_dunlevs + pd.tmpdungeon[i].entry_lev + 1; + g.dungeons[i].num_dunlevs + dgn_entry + 1; if (g.dungeons[i].entry_lev <= 0) g.dungeons[i].entry_lev = 1; - } else if (pd.tmpdungeon[i].entry_lev > 0) { - g.dungeons[i].entry_lev = pd.tmpdungeon[i].entry_lev; + } else if (dgn_entry > 0) { + g.dungeons[i].entry_lev = dgn_entry; if (g.dungeons[i].entry_lev > g.dungeons[i].num_dunlevs) g.dungeons[i].entry_lev = g.dungeons[i].num_dunlevs; } else { /* default */ @@ -928,23 +1093,14 @@ init_dungeons() - (g.dungeons[i].entry_lev - 1); } - /* this is redundant - it should have been flagged by dgn_comp */ if (g.dungeons[i].num_dunlevs > MAXLEVEL) g.dungeons[i].num_dunlevs = MAXLEVEL; - pd.start = pd.n_levs; /* save starting point */ - pd.n_levs += pd.tmpdungeon[i].levels; - if (pd.n_levs > LEV_LIMIT) - panic("init_dungeon: too many special levels"); - /* - * Read in the prototype special levels. Don't add generated - * special levels until they are all placed. - */ - for (; cl < pd.n_levs; cl++) { - Fread((genericptr_t) &pd.tmplevel[cl], sizeof(struct tmplevel), 1, - dgn_file); + + for (; cl < pd.n_levs; cl++) { init_level(i, cl, &pd); } + /* * Recursively place the generated levels for this dungeon. This * routine will attempt all possible combinations before giving @@ -957,18 +1113,18 @@ init_dungeons() fflush(stderr); getchar(); #endif + for (; pd.start < pd.n_levs; pd.start++) if (pd.final_lev[pd.start]) add_level(pd.final_lev[pd.start]); + /* levels handling end */ - pd.n_brs += pd.tmpdungeon[i].branches; - if (pd.n_brs > BRANCH_LIMIT) - panic("init_dungeon: too many branches"); - for (; cb < pd.n_brs; cb++) - Fread((genericptr_t) &pd.tmpbranch[cb], sizeof(struct tmpbranch), - 1, dgn_file); + lua_pop(L, 1); /* pop the dungeon table */ + i++; } - (void) dlb_fclose(dgn_file); + + lua_pop(L, 1); /* get rid of the dungeon global */ + debugpline2("init_dungeon lua DONE (n_levs=%i, n_brs=%i)", pd.n_levs, pd.n_brs); for (i = 0; i < 5; i++) g.tune[i] = 'A' + rn2(7); @@ -1028,6 +1184,8 @@ init_dungeons() so that it's hidden from '#wizwhere' feedback. */ } + lua_close(L); + #ifdef DEBUG dumpit(); #endif diff --git a/src/nhlua.c b/src/nhlua.c index 609b6ecf5..af9b939b7 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -503,7 +503,7 @@ const char *name; { int ret; - lua_getfield(L, 1, name); + lua_getfield(L, -1, name); ret = (int) luaL_checkinteger(L, -1); lua_pop(L, 1); return ret; @@ -518,7 +518,7 @@ int defval; { int ret = defval; - lua_getfield(L, 1, name); + lua_getfield(L, -1, name); if (!lua_isnil(L, -1)) { ret = (int) luaL_checkinteger(L, -1); } @@ -533,7 +533,7 @@ const char *name; { char *ret; - lua_getfield(L, 1, name); + lua_getfield(L, -1, name); ret = dupstr(luaL_checkstring(L, -1)); lua_pop(L, 1); return ret; @@ -549,10 +549,12 @@ char *defval; { const char *ret; - lua_getfield(L, 1, name); + lua_getfield(L, -1, name); ret = luaL_optstring(L, -1, defval); + if (ret) + ret = dupstr(ret); lua_pop(L, 1); - return ret ? dupstr(ret) : NULL; + return ret; } int @@ -563,7 +565,7 @@ const char *name; int ltyp; int ret = -1; - lua_getfield(L, 1, name); + lua_getfield(L, -1, name); ltyp = lua_type(L, -1); if (ltyp == LUA_TSTRING) { const char *const boolstr[] = { "true", "false", "yes", "no", NULL }; @@ -590,7 +592,7 @@ int defval; { int ret = defval; - lua_getfield(L, 1, name); + lua_getfield(L, -1, name); if (lua_type(L, -1) != LUA_TNIL) { lua_pop(L, 1); return get_table_boolean(L, name); @@ -608,7 +610,7 @@ const char *const opts[]; /* NULL-terminated list */ { int ret; - lua_getfield(L, 1, name); + lua_getfield(L, -1, name); ret = luaL_checkoption(L, -1, defval, opts); lua_pop(L, 1); return ret; @@ -842,11 +844,9 @@ give_up: return ret; } -boolean -load_lua(name) -const char *name; +lua_State * +nhl_init() { - boolean ret = TRUE; lua_State *L = luaL_newstate(); luaL_openlibs(L); @@ -867,6 +867,21 @@ const char *name; l_register_des(L); if (!nhl_loadlua(L, "nhlib.lua")) { + lua_close(L); + return (lua_State *) 0; + } + + return L; +} + +boolean +load_lua(name) +const char *name; +{ + boolean ret = TRUE; + lua_State *L = nhl_init(); + + if (!L) { ret = FALSE; goto give_up; } diff --git a/sys/share/dgn_comp.h b/sys/share/dgn_comp.h deleted file mode 100644 index 8f3ecfd64..000000000 --- a/sys/share/dgn_comp.h +++ /dev/null @@ -1,27 +0,0 @@ -#define INTEGER 257 -#define A_DUNGEON 258 -#define BRANCH 259 -#define CHBRANCH 260 -#define LEVEL 261 -#define RNDLEVEL 262 -#define CHLEVEL 263 -#define RNDCHLEVEL 264 -#define UP_OR_DOWN 265 -#define PROTOFILE 266 -#define DESCRIPTION 267 -#define DESCRIPTOR 268 -#define LEVELDESC 269 -#define ALIGNMENT 270 -#define LEVALIGN 271 -#define ENTRY 272 -#define STAIR 273 -#define NO_UP 274 -#define NO_DOWN 275 -#define PORTAL 276 -#define STRING 277 -typedef union -{ - int i; - char* str; -} YYSTYPE; -extern YYSTYPE yylval; diff --git a/sys/share/dgn_lex.c b/sys/share/dgn_lex.c deleted file mode 100644 index 752fcd55a..000000000 --- a/sys/share/dgn_lex.c +++ /dev/null @@ -1,2000 +0,0 @@ - -#line 3 "dgn_lex.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex via 'flex -S flexhack.skl' - * where flexhack.skl is a nethack-specific alternate skeleton derived - * from flex 2.6.0's skel.c (which in turn was generated from flex.skl). - * - * Support for C++, re-entrancy, and table serialization stripped out. - * NetHack's usage doesn't need them and we want to reduce the size and - * complexity of this skeleton as well as of the generated scanner code. - */ -#define FLEXHACK_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 0 - -#include "config.h" - -#include - -/* we don't care if actual types happen to have more bits than their names; - the tables will just take up more space, possibly slowing the parse; - still, allow config.h to override these via typedef+#define if desired */ -#ifndef FLEX_INT32_T -typedef int flex_int32_t; -#endif -#ifndef FLEX_INT16_T -typedef short int flex_int16_t; -#endif -#ifndef FLEX_UINT16_T -typedef unsigned short int flex_uint16_t; -#endif - -#define yyconst const - -#define FDECL_dummy /*empty*/ - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (uchar) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character - * in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern yy_size_t yyleng; -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - -}; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart FDECL(FDECL_dummy, (FILE *input_file )); -void yy_switch_to_buffer FDECL(FDECL_dummy, (YY_BUFFER_STATE new_buffer )); -YY_BUFFER_STATE yy_create_buffer FDECL(FDECL_dummy, (FILE *file,int size )); -void yy_delete_buffer FDECL(FDECL_dummy, (YY_BUFFER_STATE b )); -void yy_flush_buffer FDECL(FDECL_dummy, (YY_BUFFER_STATE b )); -void yypush_buffer_state FDECL(FDECL_dummy, (YY_BUFFER_STATE new_buffer )); -void yypop_buffer_state FDECL(FDECL_dummy, (void )); - -static void yyensure_buffer_stack FDECL(FDECL_dummy, (void )); -static void yy_load_buffer_state FDECL(FDECL_dummy, (void )); -static void yy_init_buffer FDECL(FDECL_dummy, (YY_BUFFER_STATE b,FILE *file )); - -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE yy_scan_buffer FDECL(FDECL_dummy, (char *base,yy_size_t size )); -YY_BUFFER_STATE yy_scan_string FDECL(FDECL_dummy, (yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes FDECL(FDECL_dummy, (yyconst char *bytes,yy_size_t len )); - -void *yyalloc FDECL(FDECL_dummy, (yy_size_t )); -void *yyrealloc FDECL(FDECL_dummy, (void *,yy_size_t )); -void yyfree FDECL(FDECL_dummy, (void * )); - -#define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ) { \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ) { \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -typedef unsigned char YY_CHAR; - -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; - -typedef int yy_state_type; - -extern int yylineno; - -int yylineno = 1; - -extern char *yytext; -#ifdef yytext_ptr -#undef yytext_ptr -#endif -#define yytext_ptr yytext - -static yy_state_type yy_get_previous_state FDECL(FDECL_dummy, (void )); -static yy_state_type yy_try_NUL_trans FDECL(FDECL_dummy, (yy_state_type current_state )); -static int yy_get_next_buffer FDECL(FDECL_dummy, (void )); -static void yy_fatal_error FDECL(FDECL_dummy, (yyconst char msg[] )) NORETURN; - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 35 -#define YY_END_OF_BUFFER 36 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[196] = - { 0, - 0, 0, 36, 34, 33, 32, 34, 34, 29, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 33, - 32, 0, 30, 29, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 0, 31, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, - 4, 0, 25, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 5, 0, 0, 23, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 20, 0, 0, 0, 0, 8, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, 0, 22, - 15, 0, 21, 7, 19, 0, 0, 0, 0, 0, - 0, 13, 0, 0, 0, 26, 16, 0, 0, 12, - 0, 0, 0, 11, 9, 0, 17, 18, 0, 27, - 0, 28, 24, 10, 0 - - } ; - -static yyconst YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 5, 6, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 7, 1, 1, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 1, 1, 1, - 1, 1, 1, 1, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 1, 1, 17, 18, 19, 20, 21, - 1, 22, 23, 24, 25, 26, 1, 1, 27, 1, - 1, 1, 1, 1, 28, 1, 29, 1, 30, 31, - - 32, 33, 34, 35, 36, 1, 37, 38, 39, 40, - 41, 42, 1, 43, 44, 45, 46, 1, 47, 1, - 1, 48, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst YY_CHAR yy_meta[49] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1 - } ; - -static yyconst flex_uint16_t yy_base[198] = - { 0, - 0, 213, 218, 220, 215, 220, 213, 210, 207, 196, - 190, 196, 37, 191, 197, 186, 188, 171, 164, 172, - 174, 173, 18, 160, 159, 154, 157, 11, 194, 194, - 220, 190, 220, 187, 177, 184, 183, 167, 170, 164, - 161, 166, 174, 155, 136, 144, 134, 132, 133, 26, - 135, 143, 147, 128, 145, 220, 170, 220, 158, 152, - 154, 159, 154, 145, 44, 142, 47, 124, 124, 125, - 129, 129, 115, 27, 121, 113, 111, 120, 115, 116, - 134, 142, 132, 128, 137, 121, 130, 129, 125, 129, - 131, 97, 220, 105, 94, 101, 95, 96, 94, 99, - - 105, 101, 89, 220, 95, 112, 114, 51, 112, 107, - 220, 110, 114, 111, 106, 96, 85, 76, 81, 82, - 88, 69, 220, 81, 76, 75, 220, 78, 99, 220, - 88, 97, 87, 88, 92, 93, 88, 91, 90, 71, - 65, 220, 62, 60, 57, 56, 220, 59, 54, 74, - 84, 65, 66, 220, 70, 65, 70, 60, 68, 220, - 220, 52, 220, 220, 220, 46, 50, 57, 61, 67, - 62, 220, 67, 64, 63, 220, 220, 42, 41, 220, - 61, 53, 49, 220, 220, 50, 220, 220, 51, 220, - 46, 220, 220, 220, 220, 62, 60 - - } ; - -static yyconst flex_int16_t yy_def[198] = - { 0, - 195, 1, 195, 195, 195, 195, 195, 196, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 197, 195, - 195, 196, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 197, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 0, 195, 195 - - } ; - -static yyconst flex_uint16_t yy_nxt[269] = - { 0, - 4, 5, 6, 7, 8, 4, 9, 10, 11, 12, - 13, 14, 4, 4, 4, 4, 15, 4, 4, 4, - 16, 17, 4, 4, 4, 4, 4, 4, 4, 18, - 19, 4, 4, 4, 20, 4, 4, 21, 22, 23, - 4, 24, 25, 26, 27, 28, 4, 4, 38, 49, - 55, 87, 56, 74, 75, 88, 90, 98, 50, 131, - 57, 39, 32, 91, 194, 193, 192, 132, 191, 190, - 189, 188, 99, 187, 186, 185, 184, 183, 182, 181, - 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, - 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, - - 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, - 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, - 140, 139, 138, 137, 136, 135, 134, 133, 130, 129, - 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, - 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, - 108, 107, 106, 105, 104, 103, 102, 101, 100, 97, - 96, 95, 94, 93, 92, 89, 86, 85, 84, 83, - 82, 81, 58, 80, 79, 78, 77, 76, 73, 72, - 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, - 61, 60, 59, 34, 33, 30, 58, 54, 53, 52, - - 51, 48, 47, 46, 45, 44, 43, 42, 41, 40, - 37, 36, 35, 34, 33, 31, 30, 195, 29, 3, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195 - } ; - -static yyconst flex_int16_t yy_chk[269] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 13, 23, - 28, 65, 28, 50, 50, 65, 67, 74, 23, 108, - 197, 13, 196, 67, 191, 189, 186, 108, 183, 182, - 181, 179, 74, 178, 175, 174, 173, 171, 170, 169, - 168, 167, 166, 162, 159, 158, 157, 156, 155, 153, - 152, 151, 150, 149, 148, 146, 145, 144, 143, 141, - - 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, - 129, 128, 126, 125, 124, 122, 121, 120, 119, 118, - 117, 116, 115, 114, 113, 112, 110, 109, 107, 106, - 105, 103, 102, 101, 100, 99, 98, 97, 96, 95, - 94, 92, 91, 90, 89, 88, 87, 86, 85, 84, - 83, 82, 81, 80, 79, 78, 77, 76, 75, 73, - 72, 71, 70, 69, 68, 66, 64, 63, 62, 61, - 60, 59, 57, 55, 54, 53, 52, 51, 49, 48, - 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, - 37, 36, 35, 34, 32, 30, 29, 27, 26, 25, - - 24, 22, 21, 20, 19, 18, 17, 16, 15, 14, - 12, 11, 10, 9, 8, 7, 5, 3, 2, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int yy_flex_debug; -int yy_flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yytext; -/* NetHack 3.6 dgn_comp.l $NHDT-Date: 1522193682 2018/03/27 23:34:42 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.20 $ */ -/* Copyright (c) 1989 by Jean-Christophe Collet */ -/* Copyright (c) 1990 by M. Stephenson */ -/* NetHack may be freely redistributed. See license for details. */ - -#define DGN_COMP - -#include "config.h" -#include "dgn_comp.h" -#include "dgn_file.h" - -/* - * Most of these don't exist in flex, yywrap is macro and - * yyunput is properly declared in flex.skel. - */ -#if !defined(FLEX_SCANNER) && !defined(FLEXHACK_SCANNER) -int FDECL(yyback, (int *,int)); -int NDECL(yylook); -int NDECL(yyinput); -int NDECL(yywrap); -int NDECL(yylex); - /* Traditional lexes let yyunput() and yyoutput() default to int; - * newer ones may declare them as void since they don't return - * values. For even more fun, the lex supplied as part of the - * newer unbundled compiler for SunOS 4.x adds the void declarations - * (under __STDC__ or _cplusplus ifdefs -- otherwise they remain - * int) while the bundled lex and the one with the older unbundled - * compiler do not. To detect this, we need help from outside -- - * sys/unix/Makefile.utl. - * - * Digital UNIX is difficult and still has int in spite of all - * other signs. - */ -# if defined(NeXT) || defined(SVR4) || defined(_AIX32) -# define VOIDYYPUT -# endif -# if !defined(VOIDYYPUT) && defined(POSIX_TYPES) -# if !defined(BOS) && !defined(HISX) && !defined(_M_UNIX) && !defined(VMS) -# define VOIDYYPUT -# endif -# endif -# if !defined(VOIDYYPUT) && defined(WEIRD_LEX) -# if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX > 1) -# define VOIDYYPUT -# endif -# endif -# if defined(VOIDYYPUT) && defined(__osf__) -# undef VOIDYYPUT -# endif -# ifdef VOIDYYPUT -void FDECL(yyunput, (int)); -void FDECL(yyoutput, (int)); -# else -int FDECL(yyunput, (int)); -int FDECL(yyoutput, (int)); -# endif - -#else /* !FLEX_SCANNER && !FLEXHACK_SCANNER */ -/* most recent flex allows suppressing yyunput() altogether when not needed */ -#define YY_NO_UNPUT -#define YY_NO_INPUT -#endif - -#if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER) -/* older flex wants this */ -#define YY_MALLOC_DECL genericptr_t FDECL(malloc, (size_t)); \ - genericptr_t FDECL(realloc, (genericptr_t, size_t)); -/* newer flex assumes so needs this in case it's been suppressed */ -YY_MALLOC_DECL -#endif - -void FDECL(init_yyin, (FILE *)); -void FDECL(init_yyout, (FILE *)); - -/* this doesn't always get put in dgn_comp.h - * (esp. when using older versions of bison) - */ -extern YYSTYPE yylval; - -int nh_line_number = 1; - -#define INITIAL 0 - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int yylex_destroy FDECL(FDECL_dummy, (void )); -int yyget_debug FDECL(FDECL_dummy, (void )); -void yyset_debug FDECL(FDECL_dummy, (int debug_flag )); -YY_EXTRA_TYPE yyget_extra FDECL(FDECL_dummy, (void )); -void yyset_extra FDECL(FDECL_dummy, (YY_EXTRA_TYPE user_defined )); -FILE *yyget_in FDECL(FDECL_dummy, (void )); -void yyset_in FDECL(FDECL_dummy, (FILE * _in_str )); -FILE *yyget_out FDECL(FDECL_dummy, (void )); -void yyset_out FDECL(FDECL_dummy, (FILE * _out_str )); -yy_size_t yyget_leng FDECL(FDECL_dummy, (void )); -char *yyget_text FDECL(FDECL_dummy, (void )); -int yyget_lineno FDECL(FDECL_dummy, (void )); -void yyset_lineno FDECL(FDECL_dummy, (int _line_number )); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -extern int yywrap FDECL(FDECL_dummy, (void )); -#endif - -#ifndef YY_NO_UNPUT - -void yyunput FDECL(FDECL_dummy, (int c,char *buf_ptr )); -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy FDECL(FDECL_dummy, (char *,yyconst char *,int )); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen FDECL(FDECL_dummy, (yyconst char * )); -#endif - -#ifndef YY_NO_INPUT - -static int input FDECL(FDECL_dummy, (void )); - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int yylex FDECL(FDECL_dummy, (void)); - -#define YY_DECL int yylex () -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - if ( yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } - - yy_load_buffer_state( ); - } - - { - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yytext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 196 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 220 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -YY_RULE_SETUP -return(A_DUNGEON); - YY_BREAK -case 2: -YY_RULE_SETUP -{ yylval.i=1; return(UP_OR_DOWN); } - YY_BREAK -case 3: -YY_RULE_SETUP -{ yylval.i=0; return(UP_OR_DOWN); } - YY_BREAK -case 4: -YY_RULE_SETUP -return(ENTRY); - YY_BREAK -case 5: -YY_RULE_SETUP -return(STAIR); - YY_BREAK -case 6: -YY_RULE_SETUP -return(NO_UP); - YY_BREAK -case 7: -YY_RULE_SETUP -return(NO_DOWN); - YY_BREAK -case 8: -YY_RULE_SETUP -return(PORTAL); - YY_BREAK -case 9: -YY_RULE_SETUP -return(PROTOFILE); - YY_BREAK -case 10: -YY_RULE_SETUP -return(DESCRIPTION); - YY_BREAK -case 11: -YY_RULE_SETUP -return(LEVELDESC); - YY_BREAK -case 12: -YY_RULE_SETUP -return(ALIGNMENT); - YY_BREAK -case 13: -YY_RULE_SETUP -return(LEVALIGN); - YY_BREAK -case 14: -YY_RULE_SETUP -{ yylval.i=TOWN ; return(DESCRIPTOR); } - YY_BREAK -case 15: -YY_RULE_SETUP -{ yylval.i=HELLISH ; return(DESCRIPTOR); } - YY_BREAK -case 16: -YY_RULE_SETUP -{ yylval.i=MAZELIKE ; return(DESCRIPTOR); } - YY_BREAK -case 17: -YY_RULE_SETUP -{ yylval.i=ROGUELIKE ; return(DESCRIPTOR); } - YY_BREAK -case 18: -YY_RULE_SETUP -{ yylval.i=D_ALIGN_NONE ; return(DESCRIPTOR); } - YY_BREAK -case 19: -YY_RULE_SETUP -{ yylval.i=D_ALIGN_NONE ; return(DESCRIPTOR); } - YY_BREAK -case 20: -YY_RULE_SETUP -{ yylval.i=D_ALIGN_LAWFUL ; return(DESCRIPTOR); } - YY_BREAK -case 21: -YY_RULE_SETUP -{ yylval.i=D_ALIGN_NEUTRAL ; return(DESCRIPTOR); } - YY_BREAK -case 22: -YY_RULE_SETUP -{ yylval.i=D_ALIGN_CHAOTIC ; return(DESCRIPTOR); } - YY_BREAK -case 23: -YY_RULE_SETUP -return(BRANCH); - YY_BREAK -case 24: -YY_RULE_SETUP -return(CHBRANCH); - YY_BREAK -case 25: -YY_RULE_SETUP -return(LEVEL); - YY_BREAK -case 26: -YY_RULE_SETUP -return(RNDLEVEL); - YY_BREAK -case 27: -YY_RULE_SETUP -return(CHLEVEL); - YY_BREAK -case 28: -YY_RULE_SETUP -return(RNDCHLEVEL); - YY_BREAK -case 29: -YY_RULE_SETUP -{ yylval.i=atoi(yytext); return(INTEGER); } - YY_BREAK -case 30: -/* rule 30 can match eol */ -YY_RULE_SETUP -{ yytext[yyleng - 1] = '\0'; /* discard the trailing \" */ - yylval.str = dupstr(yytext + 1); /* skip the first \" */ - return STRING; } - YY_BREAK -case 31: -/* rule 31 can match eol */ -YY_RULE_SETUP -{ nh_line_number++; } - YY_BREAK -case 32: -/* rule 32 can match eol */ -YY_RULE_SETUP -{ nh_line_number++; } - YY_BREAK -case 33: -YY_RULE_SETUP -; /* skip trailing tabs & spaces */ - YY_BREAK -case 34: -YY_RULE_SETUP -{ return yytext[0]; } - YY_BREAK -case 35: -YY_RULE_SETUP -ECHO; - YY_BREAK -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( yywrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer () -{ - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = (yytext_ptr); - yy_size_t number_to_move, i; - int ret_val; - - if ((yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { - /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) { - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - } else { - yy_size_t num_to_read; - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - /* [pr] This could probably be (b->yy_buf_size < number_to_move) - * since the allocated size is actually b->yy_buf_size + 2. - * The old code calculated num_to_read above (with same formula - * as is used below), then used (num_to_read <= 0) here, which - * got broken when num_to_read was changed to an unsigned type. */ - while (b->yy_buf_size <= number_to_move + 1) { - /* Not enough room in the buffer - grow it. */ - - int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) { - b->yy_buf_size += b->yy_buf_size / 4; - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if (! b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - } - - num_to_read = b->yy_buf_size - number_to_move - 1; - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ((yy_n_chars) == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ); - } else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) - > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) - yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); - if (! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before EOB char was reached */ - -static yy_state_type yy_get_previous_state () -{ - yy_state_type yy_current_state; - char *yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - - for (yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp) { - - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 196 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - -static yy_state_type yy_try_NUL_trans (yy_current_state ) - yy_state_type yy_current_state; -{ - int yy_is_jam; - char *yy_cp = (yy_c_buf_p); - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 196 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 195); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - -void yyunput (c,yy_bp ) - int c; - char * yy_bp; -{ - char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up yytext */ - *yy_cp = (yy_hold_char); - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - yy_size_t number_to_move = (yy_n_chars) + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; -} - -#endif - -#ifndef YY_NO_INPUT -static int input () -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( ) ) - return EOF; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - return input(); - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(uchar *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); - - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - -void yyrestart (input_file ) - FILE * input_file; -{ - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } - - yy_init_buffer(YY_CURRENT_BUFFER,input_file ); - yy_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ -void yy_switch_to_buffer (new_buffer ) - YY_BUFFER_STATE new_buffer; -{ - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void yy_load_buffer_state () -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ -YY_BUFFER_STATE yy_create_buffer (file,size ) - FILE * file; - int size; -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - if (!size) - size = YY_BUF_SIZE; - - b->yy_buf_size = (yy_size_t)size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() - * - */ -void yy_delete_buffer (b ) - YY_BUFFER_STATE b; -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ); - - yyfree((void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. - */ -static void yy_init_buffer (b,file ) - YY_BUFFER_STATE b; - FILE * file; -{ - int oerrno = errno; - - yy_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ -void yy_flush_buffer (b ) - YY_BUFFER_STATE b; -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void yypush_buffer_state (new_buffer ) - YY_BUFFER_STATE new_buffer; -{ - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void yypop_buffer_state () -{ - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void yyensure_buffer_stack () -{ - yy_size_t num_to_alloc; - - if (!(yy_buffer_stack)) { - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ -#if 1 /* [PR] avoid C++-style comment; older C compilers choke on it */ - num_to_alloc = 2; /* also changed to match the comment... */ -#else - num_to_alloc = 1; // After all that talk, this was set to 1 anyways... -#endif - (yy_buffer_stack) = (struct yy_buffer_state**) - yyalloc(num_to_alloc * sizeof(struct yy_buffer_state*) ); - if (!(yy_buffer_stack)) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - (void) memset((yy_buffer_stack), 0, - num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) { - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**) - yyrealloc((yy_buffer_stack),num_to_alloc * sizeof(struct yy_buffer_state*) ); - if (!(yy_buffer_stack)) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - /* zero only the new slots.*/ - (void) memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, - grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified - * character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_buffer (base,size ) - char * base; - yy_size_t size; -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to yylex() - * will scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * yy_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_scan_string (yystr ) - yyconst char * yystr; -{ - - return yy_scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to - * yylex() will scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a - * bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_bytes (yybytes,_yybytes_len ) - yyconst char * yybytes; - yy_size_t _yybytes_len; -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yyalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (msg ) - yyconst char* msg; -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int yyget_lineno () -{ - - return yylineno; -} - -/** Get the input stream. - * - */ -FILE *yyget_in () -{ - return yyin; -} - -/** Get the output stream. - * - */ -FILE *yyget_out () -{ - return yyout; -} - -/** Get the length of the current token. - * - */ -yy_size_t yyget_leng () -{ - return yyleng; -} - -/** Get the current token. - * - */ - -char *yyget_text () -{ - return yytext; -} - -/** Set the current line number. - * @param _line_number line number - * - */ -void yyset_lineno (_line_number ) - int _line_number; -{ - - yylineno = _line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * - * @see yy_switch_to_buffer - */ -void yyset_in (_in_str ) - FILE * _in_str; -{ - yyin = _in_str ; -} - -void yyset_out (_out_str ) - FILE * _out_str; -{ - yyout = _out_str ; -} - -int yyget_debug () -{ - return yy_flex_debug; -} - -void yyset_debug (_bdebug ) - int _bdebug; -{ - yy_flex_debug = _bdebug ; -} - -static int yy_init_globals () -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; -} - -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy () -{ - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner - * so the next time yylex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (s1,s2,n ) - char* s1; - yyconst char * s2; - int n; -{ - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (s ) - yyconst char * s; -{ - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *yyalloc (size ) - yy_size_t size; -{ - - return (void *) malloc( size ); -} - -void *yyrealloc (ptr,size ) - void * ptr; - yy_size_t size; -{ - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void yyfree (ptr ) - void * ptr; -{ - - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -} - -/* routine to switch to another input file; needed for flex */ -void -init_yyin( input_f ) -FILE *input_f; -{ -#if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER) - if (yyin) - yyrestart(input_f); - else -#endif - yyin = input_f; -} - -/* analogous routine (for completeness) */ -void -init_yyout( output_f ) -FILE *output_f; -{ - yyout = output_f; -} - -/*dgn_comp.l*/ - diff --git a/sys/share/dgn_yacc.c b/sys/share/dgn_yacc.c deleted file mode 100644 index 742a7b1a7..000000000 --- a/sys/share/dgn_yacc.c +++ /dev/null @@ -1,1053 +0,0 @@ -#ifndef lint -/* static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; */ -/* static char nhsccsid[] = "@(#)yaccpar 1.9.0-nh (NetHack) 12/03/2015"; */ -#endif -#define YYBYACC 1 -#define YYMAJOR 1 -#define YYMINOR 9 -#define YYSUBMINOR "0-nh" - -#define yyclearin (yychar=(-1)) -#define yyerrok (yyerrflag=0) -#define YYRECOVERING (yyerrflag!=0) -#define YYPREFIX "yy" -/* NetHack 3.6 dgn_comp.y $NHDT-Date: 1551901399 2019/03/06 19:43:19 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.15 $ */ -/* Copyright (c) 1989 by Jean-Christophe Collet */ -/* Copyright (c) 1990 by M. Stephenson */ -/* NetHack may be freely redistributed. See license for details. */ - -/* - * This file contains the Dungeon Compiler code - */ - -/* In case we're using bison in AIX. This definition must be - * placed before any other C-language construct in the file - * excluding comments and preprocessor directives (thanks IBM - * for this wonderful feature...). - * - * Note: some cpps barf on this 'undefined control' (#pragma). - * Addition of the leading space seems to prevent barfage for now, - * and AIX will still see the directive in its non-standard locale. - */ - -#ifdef _AIX - #pragma alloca /* keep leading space! */ -#endif - -#include "config.h" -#include "date.h" -#include "dgn_file.h" - -void FDECL(yyerror, (const char *)); -void FDECL(yywarning, (const char *)); -int NDECL(yylex); -int NDECL(yyparse); -int FDECL(getchain, (char *)); -int NDECL(check_dungeon); -int NDECL(check_branch); -int NDECL(check_level); -void NDECL(init_dungeon); -void NDECL(init_branch); -void NDECL(init_level); -void NDECL(output_dgn); - -#define Free(ptr) free((genericptr_t)ptr) - -#ifdef AMIGA -# undef printf -#ifndef LATTICE -# define memset(addr,val,len) setmem(addr,len,val) -#endif -#endif - -#define ERR (-1) - -static struct couple couple; -static struct tmpdungeon tmpdungeon[MAXDUNGEON]; -static struct tmplevel tmplevel[LEV_LIMIT]; -static struct tmpbranch tmpbranch[BRANCH_LIMIT]; - -static int in_dungeon = 0, n_dgns = -1, n_levs = -1, n_brs = -1; - -extern int fatal_error; -extern const char *fname; -extern FILE *yyin, *yyout; /* from dgn_lex.c */ - -typedef union -{ - int i; - char* str; -} YYSTYPE; -#define INTEGER 257 -#define A_DUNGEON 258 -#define BRANCH 259 -#define CHBRANCH 260 -#define LEVEL 261 -#define RNDLEVEL 262 -#define CHLEVEL 263 -#define RNDCHLEVEL 264 -#define UP_OR_DOWN 265 -#define PROTOFILE 266 -#define DESCRIPTION 267 -#define DESCRIPTOR 268 -#define LEVELDESC 269 -#define ALIGNMENT 270 -#define LEVALIGN 271 -#define ENTRY 272 -#define STAIR 273 -#define NO_UP 274 -#define NO_DOWN 275 -#define PORTAL 276 -#define STRING 277 -#define YYERRCODE 256 -short yylhs[] = { -1, - 0, 0, 5, 5, 6, 6, 6, 6, 7, 1, - 1, 8, 8, 8, 12, 13, 15, 15, 14, 10, - 10, 10, 10, 10, 16, 16, 17, 17, 18, 18, - 19, 19, 20, 20, 9, 9, 22, 23, 3, 3, - 3, 3, 3, 2, 2, 4, 21, 11, -}; -short yylen[] = { 2, - 0, 1, 1, 2, 1, 1, 1, 1, 6, 0, - 1, 1, 1, 1, 3, 1, 3, 3, 3, 1, - 1, 1, 1, 1, 6, 7, 7, 8, 3, 3, - 7, 8, 8, 9, 1, 1, 7, 8, 0, 1, - 1, 1, 1, 0, 1, 1, 5, 5, -}; -short yydefred[] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 5, 6, 7, 8, - 12, 13, 14, 16, 20, 21, 22, 23, 24, 35, - 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 19, 17, 29, 18, 30, 15, 46, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 11, 9, 0, 40, - 41, 42, 43, 0, 0, 0, 0, 0, 0, 0, - 0, 45, 37, 0, 27, 0, 0, 0, 0, 0, - 38, 28, 33, 0, 48, 47, 34, -}; -short yydgoto[] = { 14, - 78, 93, 84, 60, 15, 16, 17, 18, 19, 20, - 68, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 70, 30, 31, -}; -short yysindex[] = { -237, - -46, -45, -44, -39, -38, -30, -22, -21, -20, -19, - -18, -17, -16, 0, -237, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -262, -234, -233, -232, -230, -229, -228, -227, -217, - -216, -215, -214, -202, 0, -221, -7, -219, -221, -221, - -221, -221, 0, 0, 0, 0, 0, 0, 0, 19, - 20, 21, -2, -1, -212, -211, -190, -189, -188, -271, - 19, 20, 20, 27, 28, 29, 0, 0, 30, 0, - 0, 0, 0, -193, -271, -182, -180, 19, 19, -179, - -178, 0, 0, -193, 0, -177, -176, -175, 42, 43, - 0, 0, 0, -172, 0, 0, 0, -}; -short yyrindex[] = { 86, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 31, 1, 46, 0, 0, 0, 0, - 0, 0, 0, 31, 0, 61, 76, 0, 0, 0, - 0, 0, 0, 91, 0, 0, 0, -}; -short yygindex[] = { 0, - 0, -6, 4, -43, 0, 75, 0, 0, 0, 0, - -71, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -62, 0, 0, -}; -#define YYTABLESIZE 363 -short yytable[] = { 85, - 39, 80, 81, 82, 83, 63, 64, 65, 66, 86, - 87, 32, 33, 34, 46, 10, 97, 98, 35, 36, - 1, 2, 3, 4, 5, 6, 7, 37, 8, 9, - 44, 10, 11, 12, 13, 38, 39, 40, 41, 42, - 43, 44, 47, 48, 49, 25, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 61, 62, 67, 69, - 26, 72, 73, 71, 74, 75, 76, 77, 79, 88, - 89, 92, 90, 91, 95, 31, 96, 99, 100, 102, - 103, 104, 105, 106, 107, 1, 2, 101, 94, 45, - 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, 0, 39, - 39, 39, 39, 10, 10, 10, 10, 10, 10, 10, - 0, 10, 10, 0, 10, 10, 10, 10, 44, 44, - 44, 44, 44, 44, 44, 0, 44, 44, 0, 44, - 44, 44, 44, 25, 25, 25, 25, 25, 25, 25, - 0, 25, 25, 0, 25, 25, 25, 25, 26, 26, - 26, 26, 26, 26, 26, 0, 26, 26, 0, 26, - 26, 26, 26, 31, 31, 31, 31, 31, 31, 31, - 0, 31, 31, 0, 31, 31, 31, 31, 32, 32, - 32, 32, 32, 32, 32, 0, 32, 32, 0, 32, - 32, 32, 32, -}; -short yycheck[] = { 71, - 0, 273, 274, 275, 276, 49, 50, 51, 52, 72, - 73, 58, 58, 58, 277, 0, 88, 89, 58, 58, - 258, 259, 260, 261, 262, 263, 264, 58, 266, 267, - 0, 269, 270, 271, 272, 58, 58, 58, 58, 58, - 58, 58, 277, 277, 277, 0, 277, 277, 277, 277, - 268, 268, 268, 268, 257, 277, 64, 277, 40, 40, - 0, 64, 64, 43, 277, 277, 257, 257, 257, 43, - 43, 265, 44, 44, 257, 0, 257, 257, 257, 257, - 257, 257, 41, 41, 257, 0, 0, 94, 85, 15, - 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 258, 259, - 260, 261, 262, 263, 264, 265, 266, 267, -1, 269, - 270, 271, 272, 258, 259, 260, 261, 262, 263, 264, - -1, 266, 267, -1, 269, 270, 271, 272, 258, 259, - 260, 261, 262, 263, 264, -1, 266, 267, -1, 269, - 270, 271, 272, 258, 259, 260, 261, 262, 263, 264, - -1, 266, 267, -1, 269, 270, 271, 272, 258, 259, - 260, 261, 262, 263, 264, -1, 266, 267, -1, 269, - 270, 271, 272, 258, 259, 260, 261, 262, 263, 264, - -1, 266, 267, -1, 269, 270, 271, 272, 258, 259, - 260, 261, 262, 263, 264, -1, 266, 267, -1, 269, - 270, 271, 272, -}; -#define YYFINAL 14 -#ifndef YYDEBUG -#define YYDEBUG 0 -#endif -#define YYMAXTOKEN 277 -#if YYDEBUG -char *yyname[] = { -"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,"'('","')'",0,"'+'","','",0,0,0,0,0,0,0,0,0,0,0,0,0,"':'",0,0,0,0,0, -"'@'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"INTEGER", -"A_DUNGEON","BRANCH","CHBRANCH","LEVEL","RNDLEVEL","CHLEVEL","RNDCHLEVEL", -"UP_OR_DOWN","PROTOFILE","DESCRIPTION","DESCRIPTOR","LEVELDESC","ALIGNMENT", -"LEVALIGN","ENTRY","STAIR","NO_UP","NO_DOWN","PORTAL","STRING", -}; -char *yyrule[] = { -"$accept : file", -"file :", -"file : dungeons", -"dungeons : dungeon", -"dungeons : dungeons dungeon", -"dungeon : dungeonline", -"dungeon : dungeondesc", -"dungeon : branches", -"dungeon : levels", -"dungeonline : A_DUNGEON ':' STRING bones_tag rcouple optional_int", -"optional_int :", -"optional_int : INTEGER", -"dungeondesc : entry", -"dungeondesc : descriptions", -"dungeondesc : prototype", -"entry : ENTRY ':' INTEGER", -"descriptions : desc", -"desc : DESCRIPTION ':' DESCRIPTOR", -"desc : ALIGNMENT ':' DESCRIPTOR", -"prototype : PROTOFILE ':' STRING", -"levels : level1", -"levels : level2", -"levels : levdesc", -"levels : chlevel1", -"levels : chlevel2", -"level1 : LEVEL ':' STRING bones_tag '@' acouple", -"level1 : RNDLEVEL ':' STRING bones_tag '@' acouple INTEGER", -"level2 : LEVEL ':' STRING bones_tag '@' acouple INTEGER", -"level2 : RNDLEVEL ':' STRING bones_tag '@' acouple INTEGER INTEGER", -"levdesc : LEVELDESC ':' DESCRIPTOR", -"levdesc : LEVALIGN ':' DESCRIPTOR", -"chlevel1 : CHLEVEL ':' STRING bones_tag STRING '+' rcouple", -"chlevel1 : RNDCHLEVEL ':' STRING bones_tag STRING '+' rcouple INTEGER", -"chlevel2 : CHLEVEL ':' STRING bones_tag STRING '+' rcouple INTEGER", -"chlevel2 : RNDCHLEVEL ':' STRING bones_tag STRING '+' rcouple INTEGER INTEGER", -"branches : branch", -"branches : chbranch", -"branch : BRANCH ':' STRING '@' acouple branch_type direction", -"chbranch : CHBRANCH ':' STRING STRING '+' rcouple branch_type direction", -"branch_type :", -"branch_type : STAIR", -"branch_type : NO_UP", -"branch_type : NO_DOWN", -"branch_type : PORTAL", -"direction :", -"direction : UP_OR_DOWN", -"bones_tag : STRING", -"acouple : '(' INTEGER ',' INTEGER ')'", -"rcouple : '(' INTEGER ',' INTEGER ')'", -}; -#endif -#ifdef YYSTACKSIZE -#undef YYMAXDEPTH -#define YYMAXDEPTH YYSTACKSIZE -#else -#ifdef YYMAXDEPTH -#define YYSTACKSIZE YYMAXDEPTH -#else -#define YYSTACKSIZE 500 -#define YYMAXDEPTH 500 -#endif -#endif -int yydebug; -int yynerrs; -int yyerrflag; -int yychar; -short *yyssp; -YYSTYPE *yyvsp; -YYSTYPE yyval; -YYSTYPE yylval; -short yyss[YYSTACKSIZE]; -YYSTYPE yyvs[YYSTACKSIZE]; -#define yystacksize YYSTACKSIZE - -void -init_dungeon() -{ - if(++n_dgns > MAXDUNGEON) { - (void) fprintf(stderr, "FATAL - Too many dungeons (limit: %d).\n", - MAXDUNGEON); - (void) fprintf(stderr, "To increase the limit edit MAXDUNGEON in global.h\n"); - exit(EXIT_FAILURE); - } - - in_dungeon = 1; - tmpdungeon[n_dgns].lev.base = 0; - tmpdungeon[n_dgns].lev.rand = 0; - tmpdungeon[n_dgns].chance = 100; - Strcpy(tmpdungeon[n_dgns].name, ""); - Strcpy(tmpdungeon[n_dgns].protoname, ""); - tmpdungeon[n_dgns].flags = 0; - tmpdungeon[n_dgns].levels = 0; - tmpdungeon[n_dgns].branches = 0; - tmpdungeon[n_dgns].entry_lev = 0; -} - -void -init_level() -{ - if(++n_levs > LEV_LIMIT) { - - yyerror("FATAL - Too many special levels defined."); - exit(EXIT_FAILURE); - } - tmplevel[n_levs].lev.base = 0; - tmplevel[n_levs].lev.rand = 0; - tmplevel[n_levs].chance = 100; - tmplevel[n_levs].rndlevs = 0; - tmplevel[n_levs].flags = 0; - Strcpy(tmplevel[n_levs].name, ""); - tmplevel[n_levs].chain = -1; -} - -void -init_branch() -{ - if(++n_brs > BRANCH_LIMIT) { - - yyerror("FATAL - Too many special levels defined."); - exit(EXIT_FAILURE); - } - tmpbranch[n_brs].lev.base = 0; - tmpbranch[n_brs].lev.rand = 0; - Strcpy(tmpbranch[n_brs].name, ""); - tmpbranch[n_brs].chain = -1; -} - -int -getchain(s) - char *s; -{ - int i; - - if(strlen(s)) { - - for(i = n_levs - tmpdungeon[n_dgns].levels + 1; i <= n_levs; i++) - if(!strcmp(tmplevel[i].name, s)) return i; - - yyerror("Can't locate the specified chain level."); - return(-2); - } - return(-1); -} - -/* - * Consistancy checking routines: - * - * - A dungeon must have a unique name. - * - A dungeon must have a originating "branch" command - * (except, of course, for the first dungeon). - * - A dungeon must have a proper depth (at least (1, 0)). - */ - -int -check_dungeon() -{ - int i; - - for(i = 0; i < n_dgns; i++) - if(!strcmp(tmpdungeon[i].name, tmpdungeon[n_dgns].name)) { - yyerror("Duplicate dungeon name."); - return(0); - } - - if(n_dgns) - for(i = 0; i < n_brs - tmpdungeon[n_dgns].branches; i++) { - if(!strcmp(tmpbranch[i].name, tmpdungeon[n_dgns].name)) break; - - if(i >= n_brs - tmpdungeon[n_dgns].branches) { - yyerror("Dungeon cannot be reached."); - return(0); - } - } - - if(tmpdungeon[n_dgns].lev.base <= 0 || - tmpdungeon[n_dgns].lev.rand < 0) { - yyerror("Invalid dungeon depth specified."); - return(0); - } - return(1); /* OK */ -} - -/* - * - A level must have a unique level name. - * - If chained, the level used as reference for the chain - * must be in this dungeon, must be previously defined, and - * the level chained from must be "non-probabilistic" (ie. - * have a 100% chance of existing). - */ - -int -check_level() -{ - int i; - - if(!in_dungeon) { - yyerror("Level defined outside of dungeon."); - return(0); - } - - for(i = 0; i < n_levs; i++) - if(!strcmp(tmplevel[i].name, tmplevel[n_levs].name)) { - yyerror("Duplicate level name."); - return(0); - } - - if(tmplevel[i].chain == -2) { - yyerror("Invaild level chain reference."); - return(0); - } else if(tmplevel[i].chain != -1) { /* there is a chain */ - /* KMH -- tmplevel[tmpbranch[i].chain].chance was in error */ - if(tmplevel[tmplevel[i].chain].chance != 100) { - yyerror("Level cannot chain from a probabilistic level."); - return(0); - } else if(tmplevel[i].chain == n_levs) { - yyerror("A level cannot chain to itself!"); - return(0); - } - } - return(1); /* OK */ -} - -/* - * - A branch may not branch backwards - to avoid branch loops. - * - A branch name must be unique. - * (ie. You can only have one entry point to each dungeon). - * - If chained, the level used as reference for the chain - * must be in this dungeon, must be previously defined, and - * the level chained from must be "non-probabilistic" (ie. - * have a 100% chance of existing). - */ - -int -check_branch() -{ - int i; - - if(!in_dungeon) { - yyerror("Branch defined outside of dungeon."); - return(0); - } - - for(i = 0; i < n_dgns; i++) - if(!strcmp(tmpdungeon[i].name, tmpbranch[n_brs].name)) { - - yyerror("Reverse branching not allowed."); - return(0); - } - - if(tmpbranch[i].chain == -2) { - - yyerror("Invaild branch chain reference."); - return(0); - } else if(tmpbranch[i].chain != -1) { /* it is chained */ - - if(tmplevel[tmpbranch[i].chain].chance != 100) { - yyerror("Branch cannot chain from a probabilistic level."); - return(0); - } - } - return(1); /* OK */ -} - -/* - * Output the dungon definition into a file. - * - * The file will have the following format: - * - * [ nethack version ID ] - * [ number of dungeons ] - * [ first dungeon struct ] - * [ levels for the first dungeon ] - * ... - * [ branches for the first dungeon ] - * ... - * [ second dungeon struct ] - * ... - */ - -void -output_dgn() -{ - int nd, cl = 0, nl = 0, - cb = 0, nb = 0; - static struct version_info version_data = { - VERSION_NUMBER, VERSION_FEATURES, - VERSION_SANITY1, VERSION_SANITY2, VERSION_SANITY3 - }; - - if(++n_dgns <= 0) { - yyerror("FATAL - no dungeons were defined."); - exit(EXIT_FAILURE); - } - - if (fwrite((char *)&version_data, sizeof version_data, 1, yyout) != 1) { - yyerror("FATAL - output failure."); - exit(EXIT_FAILURE); - } - - (void) fwrite((char *)&n_dgns, sizeof(int), 1, yyout); - for (nd = 0; nd < n_dgns; nd++) { - (void) fwrite((char *)&tmpdungeon[nd], sizeof(struct tmpdungeon), - 1, yyout); - - nl += tmpdungeon[nd].levels; - for(; cl < nl; cl++) - (void) fwrite((char *)&tmplevel[cl], sizeof(struct tmplevel), - 1, yyout); - - nb += tmpdungeon[nd].branches; - for(; cb < nb; cb++) - (void) fwrite((char *)&tmpbranch[cb], sizeof(struct tmpbranch), - 1, yyout); - } - /* apparently necessary for Think C 5.x, otherwise harmless */ - (void) fflush(yyout); -} - -/*dgn_comp.y*/ -#define YYABORT goto yyabort -#define YYREJECT goto yyabort -#define YYACCEPT goto yyaccept -#define YYERROR goto yyerrlab -int -yyparse() -{ - register int yym, yyn, yystate; -#if YYDEBUG - register char *yys; - extern char *getenv(); - - if ((yys = getenv("YYDEBUG")) != 0) - { - yyn = *yys; - if (yyn >= '0' && yyn <= '9') - yydebug = yyn - '0'; - } -#endif - - yynerrs = 0; - yyerrflag = 0; - yychar = (-1); - - yyssp = yyss; - yyvsp = yyvs; - *yyssp = yystate = 0; - -yyloop: - if ((yyn = yydefred[yystate]) != 0) goto yyreduce; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, reading %d (%s)\n", - YYPREFIX, yystate, yychar, yys); - } -#endif - } - if ((yyn = yysindex[yystate]) != 0 && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, shifting to state %d\n", - YYPREFIX, yystate, yytable[yyn]); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - yychar = (-1); - if (yyerrflag > 0) --yyerrflag; - goto yyloop; - } - if ((yyn = yyrindex[yystate]) != 0 && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { - yyn = yytable[yyn]; - goto yyreduce; - } - if (yyerrflag) goto yyinrecovery; - goto yynewerror; -yynewerror: - yyerror("syntax error"); - goto yyerrlab; -yyerrlab: - ++yynerrs; -yyinrecovery: - if (yyerrflag < 3) - { - yyerrflag = 3; - for (;;) - { - if ((yyn = yysindex[*yyssp]) != 0 && (yyn += YYERRCODE) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, error recovery shifting\ - to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - goto yyloop; - } - else - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: error recovery discarding state %d\n", - YYPREFIX, *yyssp); -#endif - if (yyssp <= yyss) goto yyabort; - --yyssp; - --yyvsp; - } - } - } - else - { - if (yychar == 0) goto yyabort; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, error recovery discards token %d (%s)\n", - YYPREFIX, yystate, yychar, yys); - } -#endif - yychar = (-1); - goto yyloop; - } -yyreduce: -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, reducing by rule %d (%s)\n", - YYPREFIX, yystate, yyn, yyrule[yyn]); -#endif - yym = yylen[yyn]; - yyval = yyvsp[1-yym]; - switch (yyn) - { -case 2: -{ - output_dgn(); - } -break; -case 9: -{ - init_dungeon(); - Strcpy(tmpdungeon[n_dgns].name, yyvsp[-3].str); - tmpdungeon[n_dgns].boneschar = (char)yyvsp[-2].i; - tmpdungeon[n_dgns].lev.base = couple.base; - tmpdungeon[n_dgns].lev.rand = couple.rand; - tmpdungeon[n_dgns].chance = yyvsp[0].i; - Free(yyvsp[-3].str); - } -break; -case 10: -{ - yyval.i = 0; - } -break; -case 11: -{ - yyval.i = yyvsp[0].i; - } -break; -case 15: -{ - tmpdungeon[n_dgns].entry_lev = yyvsp[0].i; - } -break; -case 17: -{ - if(yyvsp[0].i <= TOWN || yyvsp[0].i >= D_ALIGN_CHAOTIC) - yyerror("Illegal description - ignoring!"); - else - tmpdungeon[n_dgns].flags |= yyvsp[0].i ; - } -break; -case 18: -{ - if(yyvsp[0].i && yyvsp[0].i < D_ALIGN_CHAOTIC) - yyerror("Illegal alignment - ignoring!"); - else - tmpdungeon[n_dgns].flags |= yyvsp[0].i ; - } -break; -case 19: -{ - Strcpy(tmpdungeon[n_dgns].protoname, yyvsp[0].str); - Free(yyvsp[0].str); - } -break; -case 25: -{ - init_level(); - Strcpy(tmplevel[n_levs].name, yyvsp[-3].str); - tmplevel[n_levs].boneschar = (char)yyvsp[-2].i; - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmpdungeon[n_dgns].levels++; - Free(yyvsp[-3].str); - } -break; -case 26: -{ - init_level(); - Strcpy(tmplevel[n_levs].name, yyvsp[-4].str); - tmplevel[n_levs].boneschar = (char)yyvsp[-3].i; - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmplevel[n_levs].rndlevs = yyvsp[0].i; - tmpdungeon[n_dgns].levels++; - Free(yyvsp[-4].str); - } -break; -case 27: -{ - init_level(); - Strcpy(tmplevel[n_levs].name, yyvsp[-4].str); - tmplevel[n_levs].boneschar = (char)yyvsp[-3].i; - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmplevel[n_levs].chance = yyvsp[0].i; - tmpdungeon[n_dgns].levels++; - Free(yyvsp[-4].str); - } -break; -case 28: -{ - init_level(); - Strcpy(tmplevel[n_levs].name, yyvsp[-5].str); - tmplevel[n_levs].boneschar = (char)yyvsp[-4].i; - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmplevel[n_levs].chance = yyvsp[-1].i; - tmplevel[n_levs].rndlevs = yyvsp[0].i; - tmpdungeon[n_dgns].levels++; - Free(yyvsp[-5].str); - } -break; -case 29: -{ - if(yyvsp[0].i >= D_ALIGN_CHAOTIC) - yyerror("Illegal description - ignoring!"); - else - tmplevel[n_levs].flags |= yyvsp[0].i ; - } -break; -case 30: -{ - if(yyvsp[0].i && yyvsp[0].i < D_ALIGN_CHAOTIC) - yyerror("Illegal alignment - ignoring!"); - else - tmplevel[n_levs].flags |= yyvsp[0].i ; - } -break; -case 31: -{ - init_level(); - Strcpy(tmplevel[n_levs].name, yyvsp[-4].str); - tmplevel[n_levs].boneschar = (char)yyvsp[-3].i; - tmplevel[n_levs].chain = getchain(yyvsp[-2].str); - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - if(!check_level()) n_levs--; - else tmpdungeon[n_dgns].levels++; - Free(yyvsp[-4].str); - Free(yyvsp[-2].str); - } -break; -case 32: -{ - init_level(); - Strcpy(tmplevel[n_levs].name, yyvsp[-5].str); - tmplevel[n_levs].boneschar = (char)yyvsp[-4].i; - tmplevel[n_levs].chain = getchain(yyvsp[-3].str); - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmplevel[n_levs].rndlevs = yyvsp[0].i; - if(!check_level()) n_levs--; - else tmpdungeon[n_dgns].levels++; - Free(yyvsp[-5].str); - Free(yyvsp[-3].str); - } -break; -case 33: -{ - init_level(); - Strcpy(tmplevel[n_levs].name, yyvsp[-5].str); - tmplevel[n_levs].boneschar = (char)yyvsp[-4].i; - tmplevel[n_levs].chain = getchain(yyvsp[-3].str); - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmplevel[n_levs].chance = yyvsp[0].i; - if(!check_level()) n_levs--; - else tmpdungeon[n_dgns].levels++; - Free(yyvsp[-5].str); - Free(yyvsp[-3].str); - } -break; -case 34: -{ - init_level(); - Strcpy(tmplevel[n_levs].name, yyvsp[-6].str); - tmplevel[n_levs].boneschar = (char)yyvsp[-5].i; - tmplevel[n_levs].chain = getchain(yyvsp[-4].str); - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmplevel[n_levs].chance = yyvsp[-1].i; - tmplevel[n_levs].rndlevs = yyvsp[0].i; - if(!check_level()) n_levs--; - else tmpdungeon[n_dgns].levels++; - Free(yyvsp[-6].str); - Free(yyvsp[-4].str); - } -break; -case 37: -{ - init_branch(); - Strcpy(tmpbranch[n_brs].name, yyvsp[-4].str); - tmpbranch[n_brs].lev.base = couple.base; - tmpbranch[n_brs].lev.rand = couple.rand; - tmpbranch[n_brs].type = yyvsp[-1].i; - tmpbranch[n_brs].up = yyvsp[0].i; - if(!check_branch()) n_brs--; - else tmpdungeon[n_dgns].branches++; - Free(yyvsp[-4].str); - } -break; -case 38: -{ - init_branch(); - Strcpy(tmpbranch[n_brs].name, yyvsp[-5].str); - tmpbranch[n_brs].chain = getchain(yyvsp[-4].str); - tmpbranch[n_brs].lev.base = couple.base; - tmpbranch[n_brs].lev.rand = couple.rand; - tmpbranch[n_brs].type = yyvsp[-1].i; - tmpbranch[n_brs].up = yyvsp[0].i; - if(!check_branch()) n_brs--; - else tmpdungeon[n_dgns].branches++; - Free(yyvsp[-5].str); - Free(yyvsp[-4].str); - } -break; -case 39: -{ - yyval.i = TBR_STAIR; /* two way stair */ - } -break; -case 40: -{ - yyval.i = TBR_STAIR; /* two way stair */ - } -break; -case 41: -{ - yyval.i = TBR_NO_UP; /* no up staircase */ - } -break; -case 42: -{ - yyval.i = TBR_NO_DOWN; /* no down staircase */ - } -break; -case 43: -{ - yyval.i = TBR_PORTAL; /* portal connection */ - } -break; -case 44: -{ - yyval.i = 0; /* defaults to down */ - } -break; -case 45: -{ - yyval.i = yyvsp[0].i; - } -break; -case 46: -{ - char *p = yyvsp[0].str; - if (strlen(p) != 1) { - if (strcmp(p, "none") != 0) - yyerror("Bones marker must be a single char, or \"none\"!"); - *p = '\0'; - } - yyval.i = *p; - Free(p); - } -break; -case 47: -{ - if (yyvsp[-3].i < -MAXLEVEL || yyvsp[-3].i > MAXLEVEL) { - yyerror("Abs base out of dlevel range - zeroing!"); - couple.base = couple.rand = 0; - } else if (yyvsp[-1].i < -1 || - ((yyvsp[-3].i < 0) ? (MAXLEVEL + yyvsp[-3].i + yyvsp[-1].i + 1) > MAXLEVEL : - (yyvsp[-3].i + yyvsp[-1].i) > MAXLEVEL)) { - yyerror("Abs range out of dlevel range - zeroing!"); - couple.base = couple.rand = 0; - } else { - couple.base = yyvsp[-3].i; - couple.rand = yyvsp[-1].i; - } - } -break; -case 48: -{ - if (yyvsp[-3].i < -MAXLEVEL || yyvsp[-3].i > MAXLEVEL) { - yyerror("Rel base out of dlevel range - zeroing!"); - couple.base = couple.rand = 0; - } else { - couple.base = yyvsp[-3].i; - couple.rand = yyvsp[-1].i; - } - } -break; - } - yyssp -= yym; - yystate = *yyssp; - yyvsp -= yym; - yym = yylhs[yyn]; - if (yystate == 0 && yym == 0) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: after reduction, shifting from state 0 to\ - state %d\n", YYPREFIX, YYFINAL); -#endif - yystate = YYFINAL; - *++yyssp = YYFINAL; - *++yyvsp = yyval; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, reading %d (%s)\n", - YYPREFIX, YYFINAL, yychar, yys); - } -#endif - } - if (yychar == 0) goto yyaccept; - goto yyloop; - } - if ((yyn = yygindex[yym]) != 0 && (yyn += yystate) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yystate) - yystate = yytable[yyn]; - else - yystate = yydgoto[yym]; -#if YYDEBUG - if (yydebug) - printf("%sdebug: after reduction, shifting from state %d \ -to state %d\n", YYPREFIX, *yyssp, yystate); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate; - *++yyvsp = yyval; - goto yyloop; -yyoverflow: - yyerror("yacc stack overflow"); -yyabort: - return (1); -yyaccept: - return (0); -} diff --git a/sys/unix/Makefile.dat b/sys/unix/Makefile.dat index 975978f92..153e4b74d 100644 --- a/sys/unix/Makefile.dat +++ b/sys/unix/Makefile.dat @@ -11,14 +11,11 @@ NHSROOT=.. VARDAT = bogusmon data engrave epitaph rumors quest.dat oracles options -all: $(VARDAT) spec_levs quest_levs dungeon +all: $(VARDAT) spec_levs quest_levs ../util/makedefs: (cd ../util ; $(MAKE) makedefs) -../util/dgn_comp: - (cd ../util ; $(MAKE) dgn_comp) - ../util/tile2x11: (cd ../util ; $(MAKE) tile2x11) @@ -129,12 +126,8 @@ spec_levs: quest_levs: touch quest_levs -dungeon: dungeon.def ../util/makedefs ../util/dgn_comp - ../util/makedefs -e - ../util/dgn_comp dungeon.pdf - spotless: - -rm -f spec_levs quest_levs *.lev $(VARDAT) dungeon dungeon.pdf + -rm -f spec_levs quest_levs *.lev $(VARDAT) -rm -f nhdat x11tiles beostiles pet_mark.xbm pilemark.xbm rip.xpm mapbg.xpm -rm -f rip.img GEM_RSC.RSC title.img nh16.img NetHack.ad -rm -f nhsplash.xpm nhtiles.bmp diff --git a/sys/unix/Makefile.doc b/sys/unix/Makefile.doc index a9683288a..2d2a2dd03 100644 --- a/sys/unix/Makefile.doc +++ b/sys/unix/Makefile.doc @@ -67,26 +67,23 @@ MANEXT = 6 # manual installation for most BSD-style systems GAMEMANCREATE = cat nethack.6 | $(NHGREP) > -DGNMANCREATE = cat dgn_comp.6 | $(NHGREP) > RCVRMANCREATE = cat recover.6 | $(NHGREP) > DLBMANCREATE = cat dlb.6 | $(NHGREP) > MDMANCREATE = cat makedefs.6 | $(NHGREP) > # manual installation for most SYSV-style systems # GAMEMANCREATE = cat nethack.6 | $(NHGREP) | nroff -man - > -# DGNMANCREATE = cat dgn_comp.6 | $(NHGREP) | nroff -man - > # RCVRMANCREATE = cat recover.6 | $(NHGREP) | nroff -man - > # DLBMANCREATE = cat dlb.6 | $(NHGREP) | nroff -man - > # MDMANCREATE = cat makedefs.6 | $(NHGREP) | nroff -man - > manpages: -$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT) - -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT) -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT) -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT) -$(MDMANCREATE) $(MANDIR)/makedefs.$(MANEXT) # manual creation for distribution -DISTRIB = Guidebook.txt nethack.txt dgn_comp.txt recover.txt \ +DISTRIB = Guidebook.txt nethack.txt recover.txt \ dlb.txt makedefs.txt distrib: $(DISTRIB) @@ -97,8 +94,6 @@ Guidebook.txt : Guidebook.mn tmac.n tmac.nh MAN2TXT = $(NHGREP) | nroff -man - | $(COLCMD) nethack.txt : nethack.6 cat nethack.6 | $(MAN2TXT) > nethack.txt -dgn_comp.txt : dgn_comp.6 - cat dgn_comp.6 | $(MAN2TXT) > dgn_comp.txt recover.txt : recover.6 cat recover.6 | $(MAN2TXT) > recover.txt dlb.txt : dlb.6 diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 095a3e931..4c22ff244 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -491,7 +491,7 @@ CSOURCES = $(HACKCSRC) $(SYSCSRC) $(WINCSRC) $(CHAINSRC) $(GENCSRC) # all .h files except date.h, onames.h, pm.h, and vis_tab.h which would # cause dependency loops if run through "make depend" -# and dgn_comp.h, dgn_file.h, special level & dungeon files. +# and dgn_file.h, special level & dungeon files. # HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h botl.h \ color.h config.h config1.h context.h coord.h decl.h def_os2.h \ @@ -505,7 +505,7 @@ HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h botl.h \ wincurs.h winX.h winprocs.h wintype.h you.h youprop.h HSOURCES = $(HACKINCL) date.h onames.h pm.h vis_tab.h \ - dgn_comp.h dgn_file.h + dgn_file.h # the following .o's _must_ be made before any others (for makedefs) FIRSTOBJ = monst.o objects.o diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 6c0bb2a56..13ceb19bf 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -88,14 +88,14 @@ SPEC_LEVS = asmodeus.lua baalz.lua bigrm-*.lua castle.lua fakewiz?.lua \ QUEST_LEVS = ???-goal.lua ???-fil?.lua ???-loca.lua ???-strt.lua DATNODLB = $(VARDATND) license symbols -DATDLB = $(DATHELP) dungeon tribute $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) +DATDLB = $(DATHELP) dungeon.lua tribute $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) DAT = $(DATNODLB) $(DATDLB) $(GAME): ( cd lib/lua-5.3.5/src && make a && cp liblua.a ../../../src/ ) ( cd src ; $(MAKE) ) -all: $(GAME) recover Guidebook $(VARDAT) dungeon spec_levs check-dlb +all: $(GAME) recover Guidebook $(VARDAT) spec_levs check-dlb true; $(MOREALL) @echo "Done." @@ -133,14 +133,10 @@ options: $(GAME) quest.dat: $(GAME) ( cd dat ; $(MAKE) quest.dat ) -spec_levs: dungeon +spec_levs: ( cd dat ; $(MAKE) spec_levs ) ( cd dat ; $(MAKE) quest_levs ) -dungeon: $(GAME) - ( cd util ; $(MAKE) dgn_comp ) - ( cd dat ; $(MAKE) dungeon ) - nhtiles.bmp: $(GAME) ( cd dat ; $(MAKE) nhtiles.bmp ) @@ -237,7 +233,7 @@ dofiles-nodlb: $(CHGRP) $(GAMEGRP) $(DAT) ; \ chmod $(FILEPERM) $(DAT) ) -update: $(GAME) recover $(VARDAT) dungeon spec_levs +update: $(GAME) recover $(VARDAT) spec_levs # (don't yank the old version out from under people who're playing it) -mv $(INSTDIR)/$(GAME) $(INSTDIR)/$(GAME).old # quest.dat is also kept open and has the same problems over NFS @@ -256,7 +252,7 @@ update: $(GAME) recover $(VARDAT) dungeon spec_levs rootcheck: @true; $(ROOTCHECK) -install: rootcheck $(GAME) recover $(VARDAT) dungeon spec_levs +install: rootcheck $(GAME) recover $(VARDAT) spec_levs true; $(PREINSTALL) # set up the directories # not all mkdirs have -p; those that don't will create a -p directory diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl index 5c7ae6c0b..64dccf570 100644 --- a/sys/unix/Makefile.utl +++ b/sys/unix/Makefile.utl @@ -186,7 +186,6 @@ HACK_H = ../src/hack.h-t # utility .c files MAKESRC = makedefs.c -DGNCOMPSRC = dgn_yacc.c dgn_lex.c dgn_main.c RECOVSRC = recover.c DLBSRC = dlb_main.c UTILSRCS = $(MAKESRC) panic.c $(DGNCOMPSRC) $(RECOVSRC) $(DLBSRC) @@ -205,9 +204,6 @@ OALLOC = $(OBJDIR)/alloc.o panic.o # object files for makedefs MAKEOBJS = makedefs.o $(OMONOBJ) -# object files for dungeon compiler -DGNCOMPOBJS = dgn_yacc.o dgn_lex.o dgn_main.o $(OALLOC) - # object files for recovery utility RECOVOBJS = recover.o @@ -267,35 +263,6 @@ lintdefs: panic.o: panic.c $(CONFIG_H) -# dependencies for dgn_comp -# -dgn_comp: $(DGNCOMPOBJS) - $(CC) $(LFLAGS) -o dgn_comp $(DGNCOMPOBJS) $(LIBS) - -dgn_yacc.o: dgn_yacc.c $(CONFIG_H) ../include/dgn_file.h ../include/date.h -dgn_main.o: dgn_main.c $(CONFIG_H) ../include/dlb.h - -# see dgn_comp.l for WEIRD_LEX discussion -dgn_lex.o: dgn_lex.c $(CONFIG_H) ../include/dgn_comp.h ../include/dgn_file.h - $(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus dgn_lex.c` dgn_lex.c - -# '$(YACC) -d' generates both $(YTABC) and $(YTABH) in one run -../include/dgn_comp.h: dgn_yacc.c - -dgn_yacc.c: dgn_comp.y - $(YACC) $(YACCDIST) -d dgn_comp.y - sed -e 's#"$(YTABC)"#"$@"#' -e 's#$(YTABC):#$@:#' $(YTABC) > $@ \ - && rm $(YTABC) - sed -e 's#"$(YTABH)"#"dgn_comp.h"#' $(YTABH) > ../include/dgn_comp.h \ - && rm $(YTABH) - -dgn_lex.c: dgn_comp.l - $(LEX) $(FLEXDIST) dgn_comp.l - sed -e 's#"$(LEXYYC)"#"$@"#' -e 's# *$$##' \ - -e 's#static void yyunput#void yyunput#' $(LEXYYC) > $@ \ - && rm $(LEXYYC) -# note: is basic RE substitute for - # with all of extern.h's functions to complain about, we drown in # 'defined but not used' without -u lintdgn: @@ -501,17 +468,7 @@ $(HACK_H): $(CONFIG_H) $(CONFIG_H): ../include/config.h @( cd ../src ; $(MAKE) $(CONFIG_H) ) -# 'make dist' => put generated lex and yacc sources into place for distribution SYSSHARE=../sys/share/ -$(SYSSHARE)dgn_lex.c: dgn_lex.c - cp dgn_lex.c $@ -$(SYSSHARE)dgn_yacc.c: dgn_yacc.c - cp dgn_yacc.c $@ -$(SYSSHARE)dgn_comp.h: ../include/dgn_comp.h - cp ../include/dgn_comp.h $@ - -dist: $(SYSSHARE)dgn_lex.c $(SYSSHARE)dgn_yacc.c $(SYSSHARE)dgn_comp.h - @echo 'pre-generated lex and yacc sources are in place in sys/share' tags: $(UTILSRCS) @ctags -tw $(UTILSRCS) @@ -520,9 +477,7 @@ clean: -rm -f *.o spotless: clean - -rm -f dgn_lex.c dgn_yacc.c - -rm -f ../include/dgn_comp.h -rm -f ../include/tile.h tiletxt.c - -rm -f makedefs dgn_comp recover dlb + -rm -f makedefs recover dlb -rm -f gif2txt txt2ppm tile2x11 tile2img.ttp xpm2img.ttp \ tilemap tileedit tile2bmp diff --git a/util/dgn_comp.l b/util/dgn_comp.l deleted file mode 100644 index 99c8527a1..000000000 --- a/util/dgn_comp.l +++ /dev/null @@ -1,144 +0,0 @@ -%{ -/* NetHack 3.6 dgn_comp.l $NHDT-Date: 1455415007 2016/02/14 01:56:47 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.13 $ */ -/* Copyright (c) 1989 by Jean-Christophe Collet */ -/* Copyright (c) 1990 by M. Stephenson */ -/* NetHack may be freely redistributed. See license for details. */ - -#define DGN_COMP - -#include "config.h" -#include "dgn_comp.h" -#include "dgn_file.h" - -/* - * Most of these don't exist in flex, yywrap is macro and - * yyunput is properly declared in flex.skel. - */ -#if !defined(FLEX_SCANNER) && !defined(FLEXHACK_SCANNER) -int FDECL(yyback, (int *,int)); -int NDECL(yylook); -int NDECL(yyinput); -int NDECL(yywrap); -int NDECL(yylex); - /* Traditional lexes let yyunput() and yyoutput() default to int; - * newer ones may declare them as void since they don't return - * values. For even more fun, the lex supplied as part of the - * newer unbundled compiler for SunOS 4.x adds the void declarations - * (under __STDC__ or _cplusplus ifdefs -- otherwise they remain - * int) while the bundled lex and the one with the older unbundled - * compiler do not. To detect this, we need help from outside -- - * sys/unix/Makefile.utl. - * - * Digital UNIX is difficult and still has int in spite of all - * other signs. - */ -# if defined(NeXT) || defined(SVR4) || defined(_AIX32) -# define VOIDYYPUT -# endif -# if !defined(VOIDYYPUT) && defined(POSIX_TYPES) -# if !defined(BOS) && !defined(HISX) && !defined(_M_UNIX) && !defined(VMS) -# define VOIDYYPUT -# endif -# endif -# if !defined(VOIDYYPUT) && defined(WEIRD_LEX) -# if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX > 1) -# define VOIDYYPUT -# endif -# endif -# if defined(VOIDYYPUT) && defined(__osf__) -# undef VOIDYYPUT -# endif -# ifdef VOIDYYPUT -void FDECL(yyunput, (int)); -void FDECL(yyoutput, (int)); -# else -int FDECL(yyunput, (int)); -int FDECL(yyoutput, (int)); -# endif - -#else /* !FLEX_SCANNER && !FLEXHACK_SCANNER */ -/* most recent flex allows suppressing yyunput() altogether when not needed */ -#define YY_NO_UNPUT -#define YY_NO_INPUT -#endif - -#if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER) -/* older flex wants this */ -#define YY_MALLOC_DECL genericptr_t FDECL(malloc, (size_t)); \ - genericptr_t FDECL(realloc, (genericptr_t, size_t)); -/* newer flex assumes so needs this in case it's been suppressed */ -YY_MALLOC_DECL -#endif - -void FDECL(init_yyin, (FILE *)); -void FDECL(init_yyout, (FILE *)); - -/* this doesn't always get put in dgn_comp.h - * (esp. when using older versions of bison) - */ -extern YYSTYPE yylval; - -int nh_line_number = 1; - -%} -%% -DUNGEON return(A_DUNGEON); -up { yylval.i=1; return(UP_OR_DOWN); } -down { yylval.i=0; return(UP_OR_DOWN); } -ENTRY return(ENTRY); -stair return(STAIR); -no_up return(NO_UP); -no_down return(NO_DOWN); -portal return(PORTAL); -PROTOFILE return(PROTOFILE); -DESCRIPTION return(DESCRIPTION); -LEVELDESC return(LEVELDESC); -ALIGNMENT return(ALIGNMENT); -LEVALIGN return(LEVALIGN); -town { yylval.i=TOWN ; return(DESCRIPTOR); } -hellish { yylval.i=HELLISH ; return(DESCRIPTOR); } -mazelike { yylval.i=MAZELIKE ; return(DESCRIPTOR); } -roguelike { yylval.i=ROGUELIKE ; return(DESCRIPTOR); } -unaligned { yylval.i=D_ALIGN_NONE ; return(DESCRIPTOR); } -noalign { yylval.i=D_ALIGN_NONE ; return(DESCRIPTOR); } -lawful { yylval.i=D_ALIGN_LAWFUL ; return(DESCRIPTOR); } -neutral { yylval.i=D_ALIGN_NEUTRAL ; return(DESCRIPTOR); } -chaotic { yylval.i=D_ALIGN_CHAOTIC ; return(DESCRIPTOR); } -BRANCH return(BRANCH); -CHAINBRANCH return(CHBRANCH); -LEVEL return(LEVEL); -RNDLEVEL return(RNDLEVEL); -CHAINLEVEL return(CHLEVEL); -RNDCHLEVEL return(RNDCHLEVEL); -[-0-9]+ { yylval.i=atoi(yytext); return(INTEGER); } -\"[^"]*\" { yytext[yyleng - 1] = '\0'; /* discard the trailing \" */ - yylval.str = dupstr(yytext + 1); /* skip the first \" */ - return STRING; } -^#.*\n { nh_line_number++; } -\r?\n { nh_line_number++; } -[ \t]+ ; /* skip trailing tabs & spaces */ -. { return yytext[0]; } -%% - -/* routine to switch to another input file; needed for flex */ -void -init_yyin( input_f ) -FILE *input_f; -{ -#if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER) - if (yyin) - yyrestart(input_f); - else -#endif - yyin = input_f; -} - -/* analogous routine (for completeness) */ -void -init_yyout( output_f ) -FILE *output_f; -{ - yyout = output_f; -} - -/*dgn_comp.l*/ diff --git a/util/dgn_comp.y b/util/dgn_comp.y deleted file mode 100644 index a00ff7559..000000000 --- a/util/dgn_comp.y +++ /dev/null @@ -1,678 +0,0 @@ -%{ -/* NetHack 3.6 dgn_comp.y $NHDT-Date: 1432512785 2015/05/25 00:13:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */ -/* Copyright (c) 1989 by Jean-Christophe Collet */ -/* Copyright (c) 1990 by M. Stephenson */ -/* NetHack may be freely redistributed. See license for details. */ - -/* - * This file contains the Dungeon Compiler code - */ - -/* In case we're using bison in AIX. This definition must be - * placed before any other C-language construct in the file - * excluding comments and preprocessor directives (thanks IBM - * for this wonderful feature...). - * - * Note: some cpps barf on this 'undefined control' (#pragma). - * Addition of the leading space seems to prevent barfage for now, - * and AIX will still see the directive in its non-standard locale. - */ - -#ifdef _AIX - #pragma alloca /* keep leading space! */ -#endif - -#include "config.h" -#include "date.h" -#include "dgn_file.h" - -void FDECL(yyerror, (const char *)); -void FDECL(yywarning, (const char *)); -int NDECL(yylex); -int NDECL(yyparse); -int FDECL(getchain, (char *)); -int NDECL(check_dungeon); -int NDECL(check_branch); -int NDECL(check_level); -void NDECL(init_dungeon); -void NDECL(init_branch); -void NDECL(init_level); -void NDECL(output_dgn); - -#define Free(ptr) free((genericptr_t)ptr) - -#ifdef AMIGA -# undef printf -#ifndef LATTICE -# define memset(addr,val,len) setmem(addr,len,val) -#endif -#endif - -#define ERR (-1) - -static struct couple couple; -static struct tmpdungeon tmpdungeon[MAXDUNGEON]; -static struct tmplevel tmplevel[LEV_LIMIT]; -static struct tmpbranch tmpbranch[BRANCH_LIMIT]; - -static int in_dungeon = 0, n_dgns = -1, n_levs = -1, n_brs = -1; - -extern int fatal_error; -extern const char *fname; -extern FILE *yyin, *yyout; /* from dgn_lex.c */ - -%} - -%union -{ - int i; - char* str; -} - -%token INTEGER -%token A_DUNGEON BRANCH CHBRANCH LEVEL RNDLEVEL CHLEVEL RNDCHLEVEL -%token UP_OR_DOWN PROTOFILE DESCRIPTION DESCRIPTOR LEVELDESC -%token ALIGNMENT LEVALIGN ENTRY STAIR NO_UP NO_DOWN PORTAL -%token STRING -%type optional_int direction branch_type bones_tag -%start file - -%% -file : /* nothing */ - | dungeons - { - output_dgn(); - } - ; - -dungeons : dungeon - | dungeons dungeon - ; - -dungeon : dungeonline - | dungeondesc - | branches - | levels - ; - -dungeonline : A_DUNGEON ':' STRING bones_tag rcouple optional_int - { - init_dungeon(); - Strcpy(tmpdungeon[n_dgns].name, $3); - tmpdungeon[n_dgns].boneschar = (char)$4; - tmpdungeon[n_dgns].lev.base = couple.base; - tmpdungeon[n_dgns].lev.rand = couple.rand; - tmpdungeon[n_dgns].chance = $6; - Free($3); - } - ; - -optional_int : /* nothing */ - { - $$ = 0; - } - | INTEGER - { - $$ = $1; - } - ; - -dungeondesc : entry - | descriptions - | prototype - ; - -entry : ENTRY ':' INTEGER - { - tmpdungeon[n_dgns].entry_lev = $3; - } - ; - -descriptions : desc - ; - -desc : DESCRIPTION ':' DESCRIPTOR - { - if($3 <= TOWN || $3 >= D_ALIGN_CHAOTIC) - yyerror("Illegal description - ignoring!"); - else - tmpdungeon[n_dgns].flags |= $3 ; - } - | ALIGNMENT ':' DESCRIPTOR - { - if($3 && $3 < D_ALIGN_CHAOTIC) - yyerror("Illegal alignment - ignoring!"); - else - tmpdungeon[n_dgns].flags |= $3 ; - } - ; - -prototype : PROTOFILE ':' STRING - { - Strcpy(tmpdungeon[n_dgns].protoname, $3); - Free($3); - } - ; - -levels : level1 - | level2 - | levdesc - | chlevel1 - | chlevel2 - ; - -level1 : LEVEL ':' STRING bones_tag '@' acouple - { - init_level(); - Strcpy(tmplevel[n_levs].name, $3); - tmplevel[n_levs].boneschar = (char)$4; - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmpdungeon[n_dgns].levels++; - Free($3); - } - | RNDLEVEL ':' STRING bones_tag '@' acouple INTEGER - { - init_level(); - Strcpy(tmplevel[n_levs].name, $3); - tmplevel[n_levs].boneschar = (char)$4; - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmplevel[n_levs].rndlevs = $7; - tmpdungeon[n_dgns].levels++; - Free($3); - } - ; - -level2 : LEVEL ':' STRING bones_tag '@' acouple INTEGER - { - init_level(); - Strcpy(tmplevel[n_levs].name, $3); - tmplevel[n_levs].boneschar = (char)$4; - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmplevel[n_levs].chance = $7; - tmpdungeon[n_dgns].levels++; - Free($3); - } - | RNDLEVEL ':' STRING bones_tag '@' acouple INTEGER INTEGER - { - init_level(); - Strcpy(tmplevel[n_levs].name, $3); - tmplevel[n_levs].boneschar = (char)$4; - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmplevel[n_levs].chance = $7; - tmplevel[n_levs].rndlevs = $8; - tmpdungeon[n_dgns].levels++; - Free($3); - } - ; - -levdesc : LEVELDESC ':' DESCRIPTOR - { - if($3 >= D_ALIGN_CHAOTIC) - yyerror("Illegal description - ignoring!"); - else - tmplevel[n_levs].flags |= $3 ; - } - | LEVALIGN ':' DESCRIPTOR - { - if($3 && $3 < D_ALIGN_CHAOTIC) - yyerror("Illegal alignment - ignoring!"); - else - tmplevel[n_levs].flags |= $3 ; - } - ; - -chlevel1 : CHLEVEL ':' STRING bones_tag STRING '+' rcouple - { - init_level(); - Strcpy(tmplevel[n_levs].name, $3); - tmplevel[n_levs].boneschar = (char)$4; - tmplevel[n_levs].chain = getchain($5); - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - if(!check_level()) n_levs--; - else tmpdungeon[n_dgns].levels++; - Free($3); - Free($5); - } - | RNDCHLEVEL ':' STRING bones_tag STRING '+' rcouple INTEGER - { - init_level(); - Strcpy(tmplevel[n_levs].name, $3); - tmplevel[n_levs].boneschar = (char)$4; - tmplevel[n_levs].chain = getchain($5); - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmplevel[n_levs].rndlevs = $8; - if(!check_level()) n_levs--; - else tmpdungeon[n_dgns].levels++; - Free($3); - Free($5); - } - ; - -chlevel2 : CHLEVEL ':' STRING bones_tag STRING '+' rcouple INTEGER - { - init_level(); - Strcpy(tmplevel[n_levs].name, $3); - tmplevel[n_levs].boneschar = (char)$4; - tmplevel[n_levs].chain = getchain($5); - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmplevel[n_levs].chance = $8; - if(!check_level()) n_levs--; - else tmpdungeon[n_dgns].levels++; - Free($3); - Free($5); - } - | RNDCHLEVEL ':' STRING bones_tag STRING '+' rcouple INTEGER INTEGER - { - init_level(); - Strcpy(tmplevel[n_levs].name, $3); - tmplevel[n_levs].boneschar = (char)$4; - tmplevel[n_levs].chain = getchain($5); - tmplevel[n_levs].lev.base = couple.base; - tmplevel[n_levs].lev.rand = couple.rand; - tmplevel[n_levs].chance = $8; - tmplevel[n_levs].rndlevs = $9; - if(!check_level()) n_levs--; - else tmpdungeon[n_dgns].levels++; - Free($3); - Free($5); - } - ; - -branches : branch - | chbranch - ; - -branch : BRANCH ':' STRING '@' acouple branch_type direction - { - init_branch(); - Strcpy(tmpbranch[n_brs].name, $3); - tmpbranch[n_brs].lev.base = couple.base; - tmpbranch[n_brs].lev.rand = couple.rand; - tmpbranch[n_brs].type = $6; - tmpbranch[n_brs].up = $7; - if(!check_branch()) n_brs--; - else tmpdungeon[n_dgns].branches++; - Free($3); - } - ; - -chbranch : CHBRANCH ':' STRING STRING '+' rcouple branch_type direction - { - init_branch(); - Strcpy(tmpbranch[n_brs].name, $3); - tmpbranch[n_brs].chain = getchain($4); - tmpbranch[n_brs].lev.base = couple.base; - tmpbranch[n_brs].lev.rand = couple.rand; - tmpbranch[n_brs].type = $7; - tmpbranch[n_brs].up = $8; - if(!check_branch()) n_brs--; - else tmpdungeon[n_dgns].branches++; - Free($3); - Free($4); - } - ; - -branch_type : /* nothing */ - { - $$ = TBR_STAIR; /* two way stair */ - } - | STAIR - { - $$ = TBR_STAIR; /* two way stair */ - } - | NO_UP - { - $$ = TBR_NO_UP; /* no up staircase */ - } - | NO_DOWN - { - $$ = TBR_NO_DOWN; /* no down staircase */ - } - | PORTAL - { - $$ = TBR_PORTAL; /* portal connection */ - } - ; - -direction : /* nothing */ - { - $$ = 0; /* defaults to down */ - } - | UP_OR_DOWN - { - $$ = $1; - } - ; - -bones_tag : STRING - { - char *p = $1; - if (strlen(p) != 1) { - if (strcmp(p, "none") != 0) - yyerror("Bones marker must be a single char, or \"none\"!"); - *p = '\0'; - } - $$ = *p; - Free(p); - } - ; - -/* - * acouple rules: - * - * (base, range) where: - * - * base is either a positive or negative integer with a value - * less than or equal to MAXLEVEL. - * base > 0 indicates the base level. - * base < 0 indicates reverse index (-1 == lowest level) - * - * range is the random component. - * if range is zero, there is no random component. - * if range is -1 the dungeon loader will randomize between - * the base and the end of the dungeon. - * during dungeon load, range is always *added* to the base, - * therefore range + base(converted) must not exceed MAXLEVEL. - */ -acouple : '(' INTEGER ',' INTEGER ')' - { - if ($2 < -MAXLEVEL || $2 > MAXLEVEL) { - yyerror("Abs base out of dlevel range - zeroing!"); - couple.base = couple.rand = 0; - } else if ($4 < -1 || - (($2 < 0) ? (MAXLEVEL + $2 + $4 + 1) > MAXLEVEL : - ($2 + $4) > MAXLEVEL)) { - yyerror("Abs range out of dlevel range - zeroing!"); - couple.base = couple.rand = 0; - } else { - couple.base = $2; - couple.rand = $4; - } - } - ; - -/* - * rcouple rules: - * - * (base, range) where: - * - * base is either a positive or negative integer with a value - * less than or equal to MAXLEVEL. - * base > 0 indicates a forward index. - * base < 0 indicates a reverse index. - * base == 0 indicates on the parent level. - * - * range is the random component. - * if range is zero, there is no random component. - * during dungeon load, range is always *added* to the base, - * range + base(converted) may be very large. The dungeon - * loader will then correct to "between here and the top/bottom". - * - * There is no practical way of specifying "between here and the - * nth / nth last level". - */ -rcouple : '(' INTEGER ',' INTEGER ')' - { - if ($2 < -MAXLEVEL || $2 > MAXLEVEL) { - yyerror("Rel base out of dlevel range - zeroing!"); - couple.base = couple.rand = 0; - } else { - couple.base = $2; - couple.rand = $4; - } - } - ; -%% - -void -init_dungeon() -{ - if(++n_dgns > MAXDUNGEON) { - (void) fprintf(stderr, "FATAL - Too many dungeons (limit: %d).\n", - MAXDUNGEON); - (void) fprintf(stderr, "To increase the limit edit MAXDUNGEON in global.h\n"); - exit(EXIT_FAILURE); - } - - in_dungeon = 1; - tmpdungeon[n_dgns].lev.base = 0; - tmpdungeon[n_dgns].lev.rand = 0; - tmpdungeon[n_dgns].chance = 100; - Strcpy(tmpdungeon[n_dgns].name, ""); - Strcpy(tmpdungeon[n_dgns].protoname, ""); - tmpdungeon[n_dgns].flags = 0; - tmpdungeon[n_dgns].levels = 0; - tmpdungeon[n_dgns].branches = 0; - tmpdungeon[n_dgns].entry_lev = 0; -} - -void -init_level() -{ - if(++n_levs > LEV_LIMIT) { - - yyerror("FATAL - Too many special levels defined."); - exit(EXIT_FAILURE); - } - tmplevel[n_levs].lev.base = 0; - tmplevel[n_levs].lev.rand = 0; - tmplevel[n_levs].chance = 100; - tmplevel[n_levs].rndlevs = 0; - tmplevel[n_levs].flags = 0; - Strcpy(tmplevel[n_levs].name, ""); - tmplevel[n_levs].chain = -1; -} - -void -init_branch() -{ - if(++n_brs > BRANCH_LIMIT) { - - yyerror("FATAL - Too many special levels defined."); - exit(EXIT_FAILURE); - } - tmpbranch[n_brs].lev.base = 0; - tmpbranch[n_brs].lev.rand = 0; - Strcpy(tmpbranch[n_brs].name, ""); - tmpbranch[n_brs].chain = -1; -} - -int -getchain(s) - char *s; -{ - int i; - - if(strlen(s)) { - - for(i = n_levs - tmpdungeon[n_dgns].levels + 1; i <= n_levs; i++) - if(!strcmp(tmplevel[i].name, s)) return i; - - yyerror("Can't locate the specified chain level."); - return(-2); - } - return(-1); -} - -/* - * Consistancy checking routines: - * - * - A dungeon must have a unique name. - * - A dungeon must have a originating "branch" command - * (except, of course, for the first dungeon). - * - A dungeon must have a proper depth (at least (1, 0)). - */ - -int -check_dungeon() -{ - int i; - - for(i = 0; i < n_dgns; i++) - if(!strcmp(tmpdungeon[i].name, tmpdungeon[n_dgns].name)) { - yyerror("Duplicate dungeon name."); - return(0); - } - - if(n_dgns) - for(i = 0; i < n_brs - tmpdungeon[n_dgns].branches; i++) { - if(!strcmp(tmpbranch[i].name, tmpdungeon[n_dgns].name)) break; - - if(i >= n_brs - tmpdungeon[n_dgns].branches) { - yyerror("Dungeon cannot be reached."); - return(0); - } - } - - if(tmpdungeon[n_dgns].lev.base <= 0 || - tmpdungeon[n_dgns].lev.rand < 0) { - yyerror("Invalid dungeon depth specified."); - return(0); - } - return(1); /* OK */ -} - -/* - * - A level must have a unique level name. - * - If chained, the level used as reference for the chain - * must be in this dungeon, must be previously defined, and - * the level chained from must be "non-probabilistic" (ie. - * have a 100% chance of existing). - */ - -int -check_level() -{ - int i; - - if(!in_dungeon) { - yyerror("Level defined outside of dungeon."); - return(0); - } - - for(i = 0; i < n_levs; i++) - if(!strcmp(tmplevel[i].name, tmplevel[n_levs].name)) { - yyerror("Duplicate level name."); - return(0); - } - - if(tmplevel[i].chain == -2) { - yyerror("Invaild level chain reference."); - return(0); - } else if(tmplevel[i].chain != -1) { /* there is a chain */ - /* KMH -- tmplevel[tmpbranch[i].chain].chance was in error */ - if(tmplevel[tmplevel[i].chain].chance != 100) { - yyerror("Level cannot chain from a probabilistic level."); - return(0); - } else if(tmplevel[i].chain == n_levs) { - yyerror("A level cannot chain to itself!"); - return(0); - } - } - return(1); /* OK */ -} - -/* - * - A branch may not branch backwards - to avoid branch loops. - * - A branch name must be unique. - * (ie. You can only have one entry point to each dungeon). - * - If chained, the level used as reference for the chain - * must be in this dungeon, must be previously defined, and - * the level chained from must be "non-probabilistic" (ie. - * have a 100% chance of existing). - */ - -int -check_branch() -{ - int i; - - if(!in_dungeon) { - yyerror("Branch defined outside of dungeon."); - return(0); - } - - for(i = 0; i < n_dgns; i++) - if(!strcmp(tmpdungeon[i].name, tmpbranch[n_brs].name)) { - - yyerror("Reverse branching not allowed."); - return(0); - } - - if(tmpbranch[i].chain == -2) { - - yyerror("Invaild branch chain reference."); - return(0); - } else if(tmpbranch[i].chain != -1) { /* it is chained */ - - if(tmplevel[tmpbranch[i].chain].chance != 100) { - yyerror("Branch cannot chain from a probabilistic level."); - return(0); - } - } - return(1); /* OK */ -} - -/* - * Output the dungon definition into a file. - * - * The file will have the following format: - * - * [ nethack version ID ] - * [ number of dungeons ] - * [ first dungeon struct ] - * [ levels for the first dungeon ] - * ... - * [ branches for the first dungeon ] - * ... - * [ second dungeon struct ] - * ... - */ - -void -output_dgn() -{ - int nd, cl = 0, nl = 0, - cb = 0, nb = 0; - static struct version_info version_data = { - VERSION_NUMBER, VERSION_FEATURES, - VERSION_SANITY1, VERSION_SANITY2, VERSION_SANITY3 - }; - - if(++n_dgns <= 0) { - yyerror("FATAL - no dungeons were defined."); - exit(EXIT_FAILURE); - } - - if (fwrite((char *)&version_data, sizeof version_data, 1, yyout) != 1) { - yyerror("FATAL - output failure."); - exit(EXIT_FAILURE); - } - - (void) fwrite((char *)&n_dgns, sizeof(int), 1, yyout); - for (nd = 0; nd < n_dgns; nd++) { - (void) fwrite((char *)&tmpdungeon[nd], sizeof(struct tmpdungeon), - 1, yyout); - - nl += tmpdungeon[nd].levels; - for(; cl < nl; cl++) - (void) fwrite((char *)&tmplevel[cl], sizeof(struct tmplevel), - 1, yyout); - - nb += tmpdungeon[nd].branches; - for(; cb < nb; cb++) - (void) fwrite((char *)&tmpbranch[cb], sizeof(struct tmpbranch), - 1, yyout); - } - /* apparently necessary for Think C 5.x, otherwise harmless */ - (void) fflush(yyout); -} - -/*dgn_comp.y*/ diff --git a/util/dgn_main.c b/util/dgn_main.c deleted file mode 100644 index e3e5e5939..000000000 --- a/util/dgn_main.c +++ /dev/null @@ -1,193 +0,0 @@ -/* NetHack 3.6 dgn_main.c $NHDT-Date: 1432512785 2015/05/25 00:13:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */ -/* Copyright (c) 1989 by Jean-Christophe Collet */ -/* Copyright (c) 1990 by M. Stephenson */ -/* NetHack may be freely redistributed. See license for details. */ - -/* - * This file contains the main function for the parser - * and some useful functions needed by yacc - */ - -#include "config.h" -#include "dlb.h" - -/* Macintosh-specific code */ -#if defined(__APPLE__) && defined(__MACH__) -/* MacOS X has Unix-style files and processes */ -#undef MAC -#endif -#ifdef MAC -#if defined(__SC__) || defined(__MRC__) -#define MPWTOOL -#include -#else -/* put dungeon file in library location */ -#define PREFIX ":lib:" -#endif -#endif - -#ifndef MPWTOOL -#define SpinCursor(x) -#endif - -#define MAX_ERRORS 25 - -extern int NDECL(yyparse); -extern int nh_line_number; -const char *fname = "(stdin)"; -int fatal_error = 0; - -int FDECL(main, (int, char **)); -void FDECL(yyerror, (const char *)); -void FDECL(yywarning, (const char *)); -int NDECL(yywrap); -void FDECL(init_yyin, (FILE *)); -void FDECL(init_yyout, (FILE *)); - -#ifdef AZTEC_36 -FILE *FDECL(freopen, (char *, char *, FILE *)); -#endif -#define Fprintf (void) fprintf - -#if defined(__BORLANDC__) && !defined(_WIN32) -extern unsigned _stklen = STKSIZ; -#endif -int -main(argc, argv) -int argc; -char **argv; -{ - char infile[64], outfile[64], basename[64]; - FILE *fin, *fout; - int i, len; - boolean errors_encountered = FALSE; -#if defined(MAC) && (defined(THINK_C) || defined(__MWERKS__)) - char *mark; - static char *mac_argv[] = { "dgn_comp", /* dummy argv[0] */ - ":dat:dungeon.pdf" }; - - argc = SIZE(mac_argv); - argv = mac_argv; -#endif - - Strcpy(infile, "(stdin)"); - fin = stdin; - Strcpy(outfile, "(stdout)"); - fout = stdout; - - if (argc == 1) { /* Read standard input */ - init_yyin(fin); - init_yyout(fout); - (void) yyparse(); - if (fatal_error > 0) - errors_encountered = TRUE; - } else { /* Otherwise every argument is a filename */ - for (i = 1; i < argc; i++) { - fname = strcpy(infile, argv[i]); - /* the input file had better be a .pdf file */ - len = strlen(fname) - 4; /* length excluding suffix */ - if (len < 0 || strncmp(".pdf", fname + len, 4)) { - Fprintf(stderr, "Error - file name \"%s\" in wrong format.\n", - fname); - errors_encountered = TRUE; - continue; - } - -/* build output file name */ -#if defined(MAC) && (defined(THINK_C) || defined(__MWERKS__)) - /* extract basename from path to infile */ - mark = strrchr(infile, ':'); - strcpy(basename, mark ? mark + 1 : infile); - mark = strchr(basename, '.'); - if (mark) - *mark = '\0'; -#else -/* Use the whole name - strip off the last 3 or 4 chars. */ - -#ifdef VMS /* avoid possible interaction with logical name */ - len++; /* retain "." as trailing punctuation */ -#endif - (void) strncpy(basename, infile, len); - basename[len] = '\0'; -#endif - - outfile[0] = '\0'; -#ifdef PREFIX - (void) strcat(outfile, PREFIX); -#endif - (void) strcat(outfile, basename); - - fin = freopen(infile, "r", stdin); - if (!fin) { - Fprintf(stderr, "Can't open %s for input.\n", infile); - perror(infile); - errors_encountered = TRUE; - continue; - } - fout = freopen(outfile, WRBMODE, stdout); - if (!fout) { - Fprintf(stderr, "Can't open %s for output.\n", outfile); - perror(outfile); - errors_encountered = TRUE; - continue; - } - init_yyin(fin); - init_yyout(fout); - (void) yyparse(); - nh_line_number = 1; - if (fatal_error > 0) { - errors_encountered = TRUE; - fatal_error = 0; - } - } - } - if (fout && fclose(fout) < 0) { - Fprintf(stderr, "Can't finish output file."); - perror(outfile); - errors_encountered = TRUE; - } - exit(errors_encountered ? EXIT_FAILURE : EXIT_SUCCESS); - /*NOTREACHED*/ - return 0; -} - -/* - * Each time the parser detects an error, it uses this function. - * Here we take count of the errors. To continue farther than - * MAX_ERRORS wouldn't be reasonable. - */ - -void -yyerror(s) -const char *s; -{ - (void) fprintf(stderr, "%s : line %d : %s\n", fname, nh_line_number, s); - if (++fatal_error > MAX_ERRORS) { - (void) fprintf(stderr, "Too many errors, good bye!\n"); - exit(EXIT_FAILURE); - } -} - -/* - * Just display a warning (that is : a non fatal error) - */ - -void -yywarning(s) -const char *s; -{ - (void) fprintf(stderr, "%s : line %d : WARNING : %s\n", fname, - nh_line_number, s); -} - -int -yywrap() -{ - SpinCursor(3); /* Don't know if this is a good place to put it ? - Is it called for our grammar ? - Often enough ? - Too often ? -- h+ */ - return 1; -} - -/*dgn_main.c*/ From d9c6cc35abaa1303179861f92fea4d3e885d4051 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 6 Nov 2019 13:06:25 -0500 Subject: [PATCH 154/529] just make .travis.yml match current 3.7 --- .travis.yml | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index 62ab20ccf..b93ed982c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -95,40 +95,12 @@ matrix: env: HINTS=macosx10.14 compiler: clang script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make install" -# - - export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/ATLMFC/lib/x86 - - export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/lib/x86:$LIB - - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/ucrt/x86:$LIB - - export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB -# - export - - git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses - - export ADD_CURSES=Y - - export PDCURSES_TOP=../../pdcurses - - cd src - - cp ../sys/winnt/Makefile.msc ./Makefile - - nmake install - - os: windows -# install: choco install mingw - env: HINTS=windows-mingw - script: - - git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses - - export ADD_CURSES=Y - - export PDCURSES_TOP=../../pdcurses - - cd src - - cp ../sys/winnt/Makefile.gcc ./Makefile - - mingw32-make install - exclude: - - os: osx - osx_image: xcode10.2 - env: HINTS=macosx10.14 - compiler: clang - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make install" # sudo: false notifications: email: recipients: -# - devteam@nethack.org + - devteam@nethack.org # deploy: provider: releases From 423bce2bf62abe1b941f452695f106bd30f32f4c Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 6 Nov 2019 10:06:59 -0800 Subject: [PATCH 155/529] fix #H9407 - "butterfiles" Feedback when playing music while hallucinating misspelled "butterflies". Other bits in the same code (not part of #H9407): All feedback messages while impaired gave "You produce " which was immediately followed by many of the instruments giving their own "You produce ." Change the verb for the playing-while-impaired messages to avoid having two consecutive "you produce" ones. Also, multiple impairments (two or more of stunned, confused, and hallucinating) always gave the generic "what you produce is far from music" message. Have them sometimes ignore excess impairments to give the message for one of those. --- doc/fixes36.3 | 3 ++- src/music.c | 27 ++++++++++++++++++++++----- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 5443c831e..709d11a3d 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.159 $ $NHDT-Date: 1572892926 2019/11/04 18:42:06 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.161 $ $NHDT-Date: 1573063606 2019/11/06 18:06:46 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -217,6 +217,7 @@ some other deafness-related message corrections when dipping into holy/unholy water while blind (where the glow message is suppressed), clear dipped item's bknown flag unless water potion's bless/curse state is known +playing music while hallucinating: message misspelled "butterflies" Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/music.c b/src/music.c index 53baeb42e..4f125793b 100644 --- a/src/music.c +++ b/src/music.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 music.c $NHDT-Date: 1572833563 2019/11/04 02:12:43 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.58 $ */ +/* NetHack 3.6 music.c $NHDT-Date: 1573063606 2019/11/06 18:06:46 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.60 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -511,24 +511,41 @@ struct obj *instr; if (Hallucination) mode |= PLAY_HALLU; + if (!rn2(2)) { + /* + * TEMPORARY? for multiple impairments, don't always + * give the generic "it's far from music" message. + */ + /* remove if STUNNED+CONFUSED ever gets its own message below */ + if (mode == (PLAY_STUNNED | PLAY_CONFUSED)) + mode = !rn2(2) ? PLAY_STUNNED : PLAY_CONFUSED; + /* likewise for stunned and/or confused combined with hallucination */ + if (mode & PLAY_HALLU) + mode = PLAY_HALLU; + } + + /* 3.6.3: most of these gave "You produce " and then many of + the instrument-specific messages below which immediately follow + also gave "You produce ." That looked strange so we + now use a different verb here */ switch (mode) { case PLAY_NORMAL: You("start playing %s.", yname(instr)); break; case PLAY_STUNNED: if (!Deaf) - You("produce an obnoxious droning sound."); + You("radiate an obnoxious droning sound."); else You_feel("a monotonous vibration."); break; case PLAY_CONFUSED: if (!Deaf) - You("produce a raucous noise."); + You("generate a raucous noise."); else You_feel("a jarring vibration."); break; case PLAY_HALLU: - You("produce a kaleidoscopic display of floating butterfiles."); + You("disseminate a kaleidoscopic display of floating butterflies."); break; /* TODO? give some or all of these combinations their own feedback; hallucination ones should reference senses other than hearing... */ @@ -537,7 +554,7 @@ struct obj *instr; case PLAY_CONFUSED | PLAY_HALLU: case PLAY_STUNNED | PLAY_CONFUSED | PLAY_HALLU: default: - pline("What you produce is quite far from music..."); + pline("What you perform is quite far from music..."); break; } #undef PLAY_NORMAL From ee260b558f2f7e59ef39ccbbd15b432b8e342499 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 6 Nov 2019 13:18:58 -0500 Subject: [PATCH 156/529] STATIC_OVL -> static that crept back in --- src/sp_lev.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/sp_lev.c b/src/sp_lev.c index d3b6a0615..bbc9af7ba 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -144,7 +144,7 @@ int FDECL(lspo_wallify, (lua_State *)); extern struct engr *head_engr; -STATIC_OVL void +static void solidify_map() { xchar x, y; @@ -155,7 +155,7 @@ solidify_map() levl[x][y].wall_info |= (W_NONDIGGABLE | W_NONPASSWALL); } -STATIC_OVL void +static void lvlfill_maze_grid(x1, y1, x2, y2, filling) int x1, y1, x2, y2; schar filling; @@ -172,7 +172,7 @@ schar filling; } } -STATIC_OVL void +static void lvlfill_solid(filling, lit) schar filling; schar lit; @@ -244,7 +244,7 @@ count_features() } } -STATIC_OVL void +static void remove_boundary_syms() { /* @@ -349,7 +349,7 @@ link_doors_rooms() } } -STATIC_OVL void +static void fill_rooms() { int tmpi, m; @@ -519,7 +519,7 @@ register int humidity; return FALSE; } -STATIC_OVL unpacked_coord +static unpacked_coord get_unpacked_coord(loc, defhumidity) long loc; int defhumidity; @@ -1676,7 +1676,7 @@ struct mkroom *croom; } } -STATIC_OVL void +static void replace_terrain(terr, croom) replaceterrain *terr; struct mkroom *croom; @@ -2038,7 +2038,7 @@ boolean prefilled; } } -STATIC_OVL struct mkroom * +static struct mkroom * build_room(r, mkr) room *r; struct mkroom *mkr; @@ -2247,7 +2247,7 @@ lev_init *linit; } } -STATIC_OVL long +static long sp_code_jmpaddr(curpos, jmpaddr) long curpos, jmpaddr; { @@ -2257,7 +2257,7 @@ long curpos, jmpaddr; /*ARGUSED*/ -STATIC_OVL void +static void spo_end_moninvent() { if (g.invent_carrying_monster) @@ -2266,7 +2266,7 @@ spo_end_moninvent() } /*ARGUSED*/ -STATIC_OVL void +static void spo_pop_container() { if (g.container_idx > 0) { @@ -3053,7 +3053,7 @@ lua_State *L; return 0; } -STATIC_OVL void +static void spo_endroom(coder) struct sp_coder *coder; { @@ -4142,7 +4142,7 @@ lua_State *L; } } -STATIC_OVL void +static void sel_set_ter(x, y, arg) int x, y; genericptr_t arg; @@ -4160,7 +4160,7 @@ genericptr_t arg; } } -STATIC_OVL void +static void sel_set_feature(x, y, arg) int x, y; genericptr_t arg; @@ -4170,7 +4170,7 @@ genericptr_t arg; levl[x][y].typ = (*(int *) arg); } -STATIC_OVL void +static void sel_set_door(dx, dy, arg) int dx, dy; genericptr_t arg; @@ -4545,7 +4545,7 @@ int tableidx, entrynum; return ret; } -STATIC_OVL int +static int get_table_region(L, name, x1,y1, x2,y2, optional) lua_State *L; const char *name; @@ -4581,7 +4581,7 @@ boolean optional; return 1; } -STATIC_OVL int +static int get_coord(L, index, x, y) lua_State *L; int index; @@ -5120,7 +5120,7 @@ lua_State *L; } /*ARGSUSED*/ -STATIC_OVL void +static void sel_set_wallify(x, y, arg) int x, y; genericptr_t arg UNUSED; @@ -5490,7 +5490,7 @@ lua_State *L; lua_setglobal(L, "des"); } -STATIC_OVL void +static void create_des_coder() { if (!g.coder) From 223c31af0cfa3c8d8825cd63fc68219b66a34fc9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 6 Nov 2019 13:43:27 -0500 Subject: [PATCH 157/529] some build fix-ups --- src/cmd.c | 8 +++--- src/mklev.c | 2 +- src/nhlsel.c | 56 +++++++++++++++++++++--------------------- src/nhlua.c | 30 +++++++++++----------- sys/winnt/Makefile.msc | 36 +++++++++++++++++---------- 5 files changed, 71 insertions(+), 61 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index 47f40cbdc..6c7aad769 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -148,7 +148,7 @@ static int NDECL(wiz_where); static int NDECL(wiz_detect); static int NDECL(wiz_panic); static int NDECL(wiz_polyself); -STATIC_PTR int NDECL(wiz_load_lua); +static int NDECL(wiz_load_lua); static int NDECL(wiz_level_tele); static int NDECL(wiz_level_change); static int NDECL(wiz_show_seenv); @@ -874,7 +874,7 @@ boolean pre, wiztower; } /* #wizmakemap - discard current dungeon level and replace with a new one */ -STATIC_PTR int +static int wiz_makemap(VOID_ARGS) { if (wizard) { @@ -945,7 +945,7 @@ wiz_detect(VOID_ARGS) return 0; } -STATIC_PTR int +static int wiz_load_lua(VOID_ARGS) { if (wizard) { @@ -961,7 +961,7 @@ wiz_load_lua(VOID_ARGS) return 0; } -STATIC_PTR int +static int wiz_load_splua(VOID_ARGS) { if (wizard) { diff --git a/src/mklev.c b/src/mklev.c index 3bdf93042..64faea76b 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -14,7 +14,7 @@ static void FDECL(mksink, (struct mkroom *)); static void FDECL(mkaltar, (struct mkroom *)); static void FDECL(mkgrave, (struct mkroom *)); static void NDECL(makevtele); -static void NDECL(clear_level_structures); +void NDECL(clear_level_structures); static void NDECL(makelevel); static boolean FDECL(bydoor, (XCHAR_P, XCHAR_P)); static struct mkroom *FDECL(find_branch_room, (coord *)); diff --git a/src/nhlsel.c b/src/nhlsel.c index 73ea5003b..fcd4534f1 100644 --- a/src/nhlsel.c +++ b/src/nhlsel.c @@ -6,34 +6,34 @@ #include "sp_lev.h" /* lua_CFunction prototypes */ -STATIC_DCL int FDECL(l_selection_new, (lua_State *)); -STATIC_DCL int FDECL(l_selection_clone, (lua_State *)); -STATIC_DCL int FDECL(l_selection_getpoint, (lua_State *)); -STATIC_DCL int FDECL(l_selection_setpoint, (lua_State *)); -STATIC_DCL int FDECL(l_selection_not, (lua_State *)); -STATIC_DCL int FDECL(l_selection_filter_percent, (lua_State *)); -STATIC_DCL int FDECL(l_selection_rndcoord, (lua_State *)); -STATIC_DCL int FDECL(l_selection_line, (lua_State *)); -STATIC_DCL int FDECL(l_selection_randline, (lua_State *)); -STATIC_DCL int FDECL(l_selection_rect, (lua_State *)); -STATIC_DCL int FDECL(l_selection_fillrect, (lua_State *)); -STATIC_DCL int FDECL(l_selection_fillrect, (lua_State *)); -STATIC_DCL int FDECL(l_selection_grow, (lua_State *)); -STATIC_DCL int FDECL(l_selection_filter_mapchar, (lua_State *)); -STATIC_DCL int FDECL(l_selection_flood, (lua_State *)); -STATIC_DCL int FDECL(l_selection_circle, (lua_State *)); -STATIC_DCL int FDECL(l_selection_ellipse, (lua_State *)); -STATIC_DCL int FDECL(l_selection_gradient, (lua_State *)); -STATIC_DCL int FDECL(l_selection_iterate, (lua_State *)); -STATIC_DCL int FDECL(l_selection_gc, (lua_State *)); -STATIC_DCL int FDECL(l_selection_not, (lua_State *)); -STATIC_DCL int FDECL(l_selection_and, (lua_State *)); -STATIC_DCL int FDECL(l_selection_or, (lua_State *)); -STATIC_DCL int FDECL(l_selection_xor, (lua_State *)); -STATIC_DCL int FDECL(l_selection_not, (lua_State *)); -STATIC_DCL int FDECL(l_selection_add, (lua_State *)); -STATIC_DCL int FDECL(l_selection_sub, (lua_State *)); -STATIC_DCL int FDECL(l_selection_ipairs, (lua_State *)); +static int FDECL(l_selection_new, (lua_State *)); +static int FDECL(l_selection_clone, (lua_State *)); +static int FDECL(l_selection_getpoint, (lua_State *)); +static int FDECL(l_selection_setpoint, (lua_State *)); +static int FDECL(l_selection_not, (lua_State *)); +static int FDECL(l_selection_filter_percent, (lua_State *)); +static int FDECL(l_selection_rndcoord, (lua_State *)); +static int FDECL(l_selection_line, (lua_State *)); +static int FDECL(l_selection_randline, (lua_State *)); +static int FDECL(l_selection_rect, (lua_State *)); +static int FDECL(l_selection_fillrect, (lua_State *)); +static int FDECL(l_selection_fillrect, (lua_State *)); +static int FDECL(l_selection_grow, (lua_State *)); +static int FDECL(l_selection_filter_mapchar, (lua_State *)); +static int FDECL(l_selection_flood, (lua_State *)); +static int FDECL(l_selection_circle, (lua_State *)); +static int FDECL(l_selection_ellipse, (lua_State *)); +static int FDECL(l_selection_gradient, (lua_State *)); +static int FDECL(l_selection_iterate, (lua_State *)); +static int FDECL(l_selection_gc, (lua_State *)); +static int FDECL(l_selection_not, (lua_State *)); +static int FDECL(l_selection_and, (lua_State *)); +static int FDECL(l_selection_or, (lua_State *)); +static int FDECL(l_selection_xor, (lua_State *)); +static int FDECL(l_selection_not, (lua_State *)); +static int FDECL(l_selection_add, (lua_State *)); +static int FDECL(l_selection_sub, (lua_State *)); +static int FDECL(l_selection_ipairs, (lua_State *)); struct selectionvar * l_selection_check(L, index) diff --git a/src/nhlua.c b/src/nhlua.c index af9b939b7..bdc09ba9d 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -14,21 +14,21 @@ /* */ /* lua_CFunction prototypes */ -STATIC_DCL int FDECL(nhl_test, (lua_State *)); -STATIC_DCL int FDECL(nhl_getmap, (lua_State *)); -STATIC_DCL int FDECL(nhl_setmap, (lua_State *)); -STATIC_DCL int FDECL(nhl_pline, (lua_State *)); -STATIC_DCL int FDECL(nhl_verbalize, (lua_State *)); -STATIC_DCL int FDECL(nhl_menu, (lua_State *)); -STATIC_DCL int FDECL(nhl_getlin, (lua_State *)); -STATIC_DCL int FDECL(nhl_makeplural, (lua_State *)); -STATIC_DCL int FDECL(nhl_makesingular, (lua_State *)); -STATIC_DCL int FDECL(nhl_s_suffix, (lua_State *)); -STATIC_DCL int FDECL(nhl_ing_suffix, (lua_State *)); -STATIC_DCL int FDECL(nhl_an, (lua_State *)); -STATIC_DCL int FDECL(nhl_meta_u_index, (lua_State *)); -STATIC_DCL int FDECL(nhl_meta_u_newindex, (lua_State *)); -STATIC_DCL int FDECL(traceback_handler, (lua_State *)); +static int FDECL(nhl_test, (lua_State *)); +static int FDECL(nhl_getmap, (lua_State *)); +static int FDECL(nhl_setmap, (lua_State *)); +static int FDECL(nhl_pline, (lua_State *)); +static int FDECL(nhl_verbalize, (lua_State *)); +static int FDECL(nhl_menu, (lua_State *)); +static int FDECL(nhl_getlin, (lua_State *)); +static int FDECL(nhl_makeplural, (lua_State *)); +static int FDECL(nhl_makesingular, (lua_State *)); +static int FDECL(nhl_s_suffix, (lua_State *)); +static int FDECL(nhl_ing_suffix, (lua_State *)); +static int FDECL(nhl_an, (lua_State *)); +static int FDECL(nhl_meta_u_index, (lua_State *)); +static int FDECL(nhl_meta_u_newindex, (lua_State *)); +static int FDECL(traceback_handler, (lua_State *)); void nhl_error(L, msg) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 3f55d8ebe..f17855982 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -892,8 +892,8 @@ $(GAMEDIR)\nhraykey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).map" /DEF:$(O)$(@B).def \ /IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o -$(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ - $(DAT)\oracles $(DAT)\quest.dat $(O)sp_lev.tag $(DLB) +$(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\oracles \ + $(DAT)\quest.dat $(O)sp_lev.tag $(DLB) ! IF ("$(USE_DLB)"=="Y") copy nhdat$(NHV) $(GAMEDIR) copy $(DAT)\license $(GAMEDIR) @@ -903,7 +903,7 @@ $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ copy $(DAT)\*.dat $(GAMEDIR) if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile ! ENDIF - if exist $(MSWSYS)\sysconf.template copy $(MSWSYS)\sysconf.temnplate $(GAMEDIR) + if exist $(MSWSYS)\sysconf.template copy $(MSWSYS)\sysconf.template $(GAMEDIR) if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR)\symbols.template if exist $(DOC)\guidebook.txt copy $(DOC)\guidebook.txt $(GAMEDIR)\Guidebook.txt if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt @@ -961,8 +961,7 @@ $(O)sp_lev.tag: !ENDIF $(O)utility.tag: $(INCL)\date.h $(INCL)\onames.h $(INCL)\pm.h \ - $(SRC)\vis_tab.c $(INCL)\vis_tab.h \ - $(U)dgncomp.exe $(TILEUTIL16) + $(SRC)\vis_tab.c $(INCL)\vis_tab.h $(TILEUTIL16) @echo utilities made >$@ @echo utilities made. @@ -1117,6 +1116,7 @@ $(U)levcomp.exe: $(LEVCOMPOBJS) # Dungeon Compiler Stuff #================================================= # +!IFDEF OBSOLETE_DGN_COMPILER # defer to the steps in ..\win\win32\dgnstuff.mak # $(U)dgn_yacc.c: $(U)dgn_comp.y @@ -1144,7 +1144,7 @@ $(U)dgncomp.exe: $(DGNCOMPOBJS) $(DGNCOMPOBJS:^ =^ ) << - +!ENDIF #================================================= # Create directory for holding object files @@ -1207,7 +1207,7 @@ $(DAT)\porthelp: $(MSWSYS)\porthelp nhdat$(NHV): $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ $(DAT)\quest.dat $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp $(DAT)\keyhelp \ - $(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\dungeon $(DAT)\porthelp \ + $(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\porthelp \ $(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon $(DAT)\tribute $(O)sp_lev.tag cd $(DAT) echo data >dlb.lst @@ -1225,7 +1225,9 @@ nhdat$(NHV): $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ echo history >>dlb.lst echo opthelp >>dlb.lst echo wizhelp >>dlb.lst +!IFDEF OBSOLETE_DGN_COMPILER echo dungeon >>dlb.lst +!ENDIF echo license >>dlb.lst echo engrave >>dlb.lst echo epitaph >>dlb.lst @@ -1432,8 +1434,10 @@ spotless: clean if exist $(DAT)\ttyoptions del $(DAT)\ttyoptions if exist $(DAT)\guioptions del $(DAT)\guioptions if exist $(DAT)\data del $(DAT)\data +!IFDEF OBSOLETE_DGN_COMPILER if exist $(DAT)\dungeon del $(DAT)\dungeon if exist $(DAT)\dungeon.pdf del $(DAT)\dungeon.pdf +!ENDIF !IFDEF OBSOLETE_LEVEL_COMPILER if exist $(DAT)\???-fil?.lev del $(DAT)\???-fil?.lev if exist $(DAT)\???-goal.lev del $(DAT)\???-goal.lev @@ -1467,21 +1471,21 @@ clean: if exist $(U)makedefs.exe del $(U)makedefs.exe !IFDEF OBSOLETE_LEVEL_COMPILER if exist $(U)levcomp.exe del $(U)levcomp.exe + if exist $(O)levcomp.MAP del $(O)levcomp.MAP + if exist $(O)levcomp.PDB del $(O)levcomp.PDB !ENDIF +!IFDEF OBSOLETE_DGN_COMPILER if exist $(U)dgncomp.exe del $(U)dgncomp.exe + if exist $(O)dgncomp.MAP del $(O)dgncomp.MAP + if exist $(O)dgncomp.PDB del $(O)dgncomp.PDB +!ENDIF if exist $(SRC)\*.lnk del $(SRC)\*.lnk if exist $(SRC)\*.map del $(SRC)\*.map if exist $(O)install.tag del $(O)install.tag if exist $(O)console.res del $(O)console.res - if exist $(O)dgncomp.MAP del $(O)dgncomp.MAP - if exist $(O)dgncomp.PDB del $(O)dgncomp.PDB if exist $(O)dlb_main.MAP del $(O)dlb_main.MAP if exist $(O)dlb_main.PDB del $(O)dlb_main.PDB if exist $(O)gamedir.tag del $(O)gamedir.tag -!IFDEF OBSOLETE_LEVEL_COMPILER - if exist $(O)levcomp.MAP del $(O)levcomp.MAP - if exist $(O)levcomp.PDB del $(O)levcomp.PDB -!ENDIF if exist $(O)makedefs.MAP del $(O)makedefs.MAP if exist $(O)makedefs.PDB del $(O)makedefs.PDB if exist $(O)NetHack.MAP del $(O)NetHack.MAP @@ -1505,14 +1509,18 @@ clean: if exist $(O)sp_lev.tag del $(O)sp_lev.tag if exist $(O)uudecode.MAP del $(O)uudecode.MAP if exist $(O)uudecode.PDB del $(O)uudecode.PDB +!IFDEF OBSOLETE_LEVEL_COMPILER rem rem defer to the steps in ..\win\win32\levstuff.mak rem nmake -nologo -f ..\win\win32\levstuff.mak clean +!ENDIF +!IFDEF OBSOLETE_DGN_COMPILER rem rem defer to the steps in ..\win\win32\dgnstuff.mak rem nmake -nologo -f ..\win\win32\dgnstuff.mak clean +!ENDIF if exist $(TILEBMP16) del $(TILEBMP16) if exist $(TILEBMP32) del $(TILEBMP32) @@ -1545,11 +1553,13 @@ $(DAT)\epitaph: $(DAT)\epitaph.txt $(U)makedefs.exe $(DAT)\bogusmon: $(DAT)\bogusmon.txt $(U)makedefs.exe $(U)makedefs -s +!IFDEF OBSOLETE_DGN_COMPILER $(DAT)\dungeon: $(O)utility.tag $(DAT)\dungeon.def $(U)makedefs -e cd $(DAT) $(U)dgncomp dungeon.pdf cd $(SRC) +!ENDIF # # NT dependencies From d13911495c8ec69bcf113f9228039c3834dd3887 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 6 Nov 2019 10:52:48 -0800 Subject: [PATCH 158/529] unix USE_FCNTL vs 'perm' Reported directly to devteam, the POSIX_TYPES subset (most? all these days?) of Unix that defines USE_FCNTL was unlocking lock file 'perm' when done with it but wasn't explicitly closing it unless the unlocking failed. Triggered a valgrind complaint and could have posed a problem if restart gets implemented for this configuraiton. --- doc/fixes36.3 | 3 ++- src/files.c | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 709d11a3d..d9db05039 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.161 $ $NHDT-Date: 1573063606 2019/11/06 18:06:46 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.162 $ $NHDT-Date: 1573066356 2019/11/06 18:52:36 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -269,6 +269,7 @@ EDIT_GETLIN: using 'O' to set message types or menu colors was overloading the during repeat prompting EDIT_GETLIN: for paranoid confirmation, if answer was neither "yes" nor "no", don't supply the rejected answer as the default when retrying +USE_FCNTL: nethack wasn't closing lock file 'perm' curses: very tall menus tried to use selector characters a-z, A-Z, and 0-9, but 0-9 should be reserved for counts and if the display was tall enough for more than 62 entries, arbitrary ASCII punctuation got used diff --git a/src/files.c b/src/files.c index f89e5e061..c8bdb8ce1 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 files.c $NHDT-Date: 1571347976 2019/10/17 21:32:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.254 $ */ +/* NetHack 3.6 files.c $NHDT-Date: 1573066357 2019/11/06 18:52:37 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.260 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1644,7 +1644,7 @@ boolean uncomp; static int nesting = 0; #if defined(NO_FILE_LINKS) || defined(USE_FCNTL) /* implies UNIX */ -static int lockfd; /* for lock_file() to pass to unlock_file() */ +static int lockfd = -1; /* for lock_file() to pass to unlock_file() */ #endif #ifdef USE_FCNTL struct flock sflock; /* for unlocking, same as above */ @@ -1756,7 +1756,7 @@ int retryct; return FALSE; } #else - register int errnosv = errno; + int errnosv = errno; switch (errnosv) { /* George Barbanis */ case EEXIST: @@ -1867,9 +1867,10 @@ const char *filename; if (nesting == 1) { #ifdef USE_FCNTL sflock.l_type = F_UNLCK; - if (fcntl(lockfd, F_SETLK, &sflock) == -1) { - HUP raw_printf("Can't remove fcntl lock on %s.", filename); - (void) close(lockfd); + if (lockfd >= 0) { + if (fcntl(lockfd, F_SETLK, &sflock) == -1) + HUP raw_printf("Can't remove fcntl lock on %s.", filename); + (void) close(lockfd), lockfd = -1; } #else lockname = make_lockname(filename, locknambuf); @@ -1881,7 +1882,7 @@ const char *filename; if (unlink(lockname) < 0) HUP raw_printf("Can't unlink %s.", lockname); #ifdef NO_FILE_LINKS - (void) nhclose(lockfd); + (void) nhclose(lockfd), lockfd = -1; #endif #endif /* UNIX || VMS */ From 88f1d2f365a42db97058815b5c167056140c089f Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 6 Nov 2019 16:44:25 -0500 Subject: [PATCH 159/529] don't hardcode the version id in windmain --- sys/winnt/windmain.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 4574e9d1a..6ef125c09 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -12,6 +12,9 @@ #include #include #include +#if !defined(VERSION_MAJOR) +#include "patchlevel.h" +#endif #if !defined(SAFEPROCS) #error You must #define SAFEPROCS to build windmain.c @@ -102,7 +105,7 @@ build_known_folder_path( get_known_folder_path(folder_id, path, path_size); strcat(path, "\\NetHack\\"); create_directory(path); - strcat(path, "3.6\\"); + Sprintf(eos(path), "%d.%d\\", VERSION_MAJOR, VERSION_MINOR); create_directory(path); } @@ -196,6 +199,7 @@ set_default_prefix_locations(const char *programPath) static char nethack_per_user_data_path[MAX_PATH]; static char nethack_global_data_path[MAX_PATH]; static char sysconf_path[MAX_PATH]; + static char versioninfo[8]; strcpy(executable_path, get_executable_path()); append_slash(executable_path); @@ -228,7 +232,8 @@ set_default_prefix_locations(const char *programPath) fqn_prefix[HACKPREFIX] = hack_path; fqn_prefix[TROUBLEPREFIX] = hack_path; - build_environment_path("COMMONPROGRAMFILES", "NetHack\\3.6", sysconf_path, + Sprintf(versioninfo, "NetHack\\%d.%d", VERSION_MAJOR, VERSION_MINOR); + build_environment_path("COMMONPROGRAMFILES", versioninfo, sysconf_path, sizeof(sysconf_path)); if(!folder_file_exists(sysconf_path, SYSCF_FILE)) From e3b69ccc4344810a465e89ddaff10bbed1d743d9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 6 Nov 2019 16:51:47 -0500 Subject: [PATCH 160/529] buffer size --- sys/winnt/windmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 6ef125c09..14ccd0089 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -199,7 +199,7 @@ set_default_prefix_locations(const char *programPath) static char nethack_per_user_data_path[MAX_PATH]; static char nethack_global_data_path[MAX_PATH]; static char sysconf_path[MAX_PATH]; - static char versioninfo[8]; + static char versioninfo[20]; strcpy(executable_path, get_executable_path()); append_slash(executable_path); From 70bacac9e6f3b6613da51dd69c555107ebe62aa0 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 6 Nov 2019 17:59:12 -0500 Subject: [PATCH 161/529] Guidebook.mn bit --- doc/Guidebook.mn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index f389ef8b5..622ab30fc 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -511,8 +511,8 @@ information, then let you pick another location; you to choose another location to examine; \(oq:\(cq will show additional info, if any, without asking for confirmation. When picking a location, -pressing the ESC key will terminate this command, or pressing \(oq?\(cq -will give a brief reminder about how it works. +pressing the ESC key will terminate this command, or pressing \(oq?\(cq will +give a brief reminder about how it works. .lp "" If the .op autodescribe From 938033796310616d26af58bde735ee96f0129b11 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 6 Nov 2019 18:52:03 -0500 Subject: [PATCH 162/529] obsolete makefiles in win/win32 --- win/win32/dgnstuff-mingw32.mak | 93 ------------------------------ win/win32/dgnstuff.mak | 93 ------------------------------ win/win32/levstuff-mingw32.mak | 100 --------------------------------- win/win32/levstuff.mak | 96 ------------------------------- 4 files changed, 382 deletions(-) delete mode 100644 win/win32/dgnstuff-mingw32.mak delete mode 100644 win/win32/dgnstuff.mak delete mode 100644 win/win32/levstuff-mingw32.mak delete mode 100644 win/win32/levstuff.mak diff --git a/win/win32/dgnstuff-mingw32.mak b/win/win32/dgnstuff-mingw32.mak deleted file mode 100644 index d81c95795..000000000 --- a/win/win32/dgnstuff-mingw32.mak +++ /dev/null @@ -1,93 +0,0 @@ -# $NHDT-Date: 1524689255 2018/04/25 20:47:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $ -# Copyright (c) 2018 by Michael Allison -# NetHack may be freely redistributed. See license for details. - -# Set all of these or none of them. -# -# bison and flex are the ones found in GnuWin32, which -# is probably the easiest set of these tools to find -# on Windows. -# -#YACC = bison.exe -y -#LEX = flex.exe -#YTABC = y.tab.c -#YTABH = y.tab.h -#LEXYYC = lex.yy.c -SHELL=cmd.exe - -default: all - -all: tools ../util/dgn_yacc.c ../util/dgn_lex.c - -rebuild: clean all - -clean: - -del ..\util\dgn_lex.c - -del ..\util\dgn_yacc.c - -del ..\include\dgn_comp.h - -tools: -ifneq "$(YACC)" "" - @echo Yacc-alike set to $(YACC) - @echo YTABC set to $(YTABC) - @echo YTABH set to $(YTABH) -endif - -ifneq "$(LEX)" "" - @echo Lex-alike set to $(LEX) - @echo LEXYYC set to $(LEXYYC) -endif - -#========================================== -# Dungeon Compiler Stuff -#========================================== - -../include/dgn_comp.h : ../util/dgn_comp.y -ifeq "$(YACC)" "" - @echo Using pre-built dgn_comp.h - chdir ..\include - copy /y ..\sys\share\dgn_comp.h - copy /b dgn_comp.h+,, - chdir ..\src -else - chdir ..\util - $(YACC) -d dgn_comp.y - copy $(YTABC) $@ - copy $(YTABH) ..\include\dgn_comp.h - @del $(YTABC) - @del $(YTABH) - chdir ..\build -endif - -../util/dgn_yacc.c : ../util/dgn_comp.y -ifeq "$(YACC)" "" - @echo Using pre-built dgn_yacc.c - chdir ..\util - copy /y ..\sys\share\dgn_yacc.c - copy /b dgn_yacc.c+,, - chdir ..\src -else - chdir ..\util - $(YACC) -d dgn_comp.y - copy $(YTABC) $@ - copy $(YTABH) ..\include\dgn_comp.h - @del $(YTABC) - @del $(YTABH) - chdir ..\build -endif - -../util/dgn_lex.c: ../util/dgn_comp.l -ifeq "$(LEX)" "" - @echo Using pre-built dgn_lex.c - chdir ..\util - copy /y ..\sys\share\dgn_lex.c - copy /b dgn_lex.c+,, - chdir ..\src -else - chdir ..\util - $(LEX) dgn_comp.l - copy $(LEXYYC) $@ - @del $(LEXYYC) - chdir ..\build -endif - diff --git a/win/win32/dgnstuff.mak b/win/win32/dgnstuff.mak deleted file mode 100644 index 2339a8a5a..000000000 --- a/win/win32/dgnstuff.mak +++ /dev/null @@ -1,93 +0,0 @@ -# $NHDT-Date: 1524689255 2018/04/25 20:47:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $ -# Copyright (c) 2018 by Michael Allison -# NetHack may be freely redistributed. See license for details. - -# Set all of these or none of them. -# -# bison and flex are the ones found in GnuWin32, which -# is probably the easiest set of these tools to find -# on Windows. -# -#YACC = bison.exe -y -#LEX = flex.exe -#YTABC = y.tab.c -#YTABH = y.tab.h -#LEXYYC = lex.yy.c - - -default: all - -all: tools ..\util\dgn_yacc.c ..\util\dgn_lex.c - -rebuild: clean all - -clean: - -del ..\util\dgn_lex.c - -del ..\util\dgn_yacc.c - -del ..\include\dgn_comp.h - -tools: -!IFDEF YACC - @echo Yacc-alike set to $(YACC) - @echo YTABC set to $(YTABC) - @echo YTABH set to $(YTABH) -!ENDIF - -!IFDEF LEX - @echo Lex-alike set to $(LEX) - @echo LEXYYC set to $(LEXYYC) -!ENDIF - - -#========================================== -# Dungeon Compiler Stuff -#========================================== - -..\include\dgn_comp.h : ..\util\dgn_comp.y -!IF "$(YACC)"=="" - @echo Using pre-built dgn_comp.h - chdir ..\include - copy /y ..\sys\share\dgn_comp.h - copy /b dgn_comp.h+,, - chdir ..\src -!ELSE - chdir ..\util - $(YACC) -d dgn_comp.y - copy $(YTABC) $@ - copy $(YTABH) ..\include\dgn_comp.h - @del $(YTABC) - @del $(YTABH) - chdir ..\build -!ENDIF - -..\util\dgn_yacc.c : ..\util\dgn_comp.y -!IF "$(YACC)"=="" - @echo Using pre-built dgn_yacc.c - chdir ..\util - copy /y ..\sys\share\dgn_yacc.c - copy /b dgn_yacc.c+,, - chdir ..\src -!ELSE - chdir ..\util - $(YACC) -d dgn_comp.y - copy $(YTABC) $@ - copy $(YTABH) ..\include\dgn_comp.h - @del $(YTABC) - @del $(YTABH) - chdir ..\build -!ENDIF - -..\util\dgn_lex.c: ..\util\dgn_comp.l -!IF "$(LEX)"=="" - @echo Using pre-built dgn_lex.c - chdir ..\util - copy /y ..\sys\share\dgn_lex.c - copy /b dgn_lex.c+,, - chdir ..\src -!ELSE - chdir ..\util - $(LEX) dgn_comp.l - copy $(LEXYYC) $@ - @del $(LEXYYC) - chdir ..\build -!ENDIF diff --git a/win/win32/levstuff-mingw32.mak b/win/win32/levstuff-mingw32.mak deleted file mode 100644 index 524755c1f..000000000 --- a/win/win32/levstuff-mingw32.mak +++ /dev/null @@ -1,100 +0,0 @@ -# $NHDT-Date: 1524689255 2018/04/25 20:47:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $ -# Copyright (c) 2018 by Michael Allison -# NetHack may be freely redistributed. See license for details. - -# Set all of these or none of them. -# -# bison and flex are the ones found in GnuWin32, which -# is probably the easiest set of these tools to find -# on Windows. -# -#YACC = bison.exe -y -#LEX = flex.exe -#YTABC = y.tab.c -#YTABH = y.tab.h -#LEXYYC = lex.yy.c -SHELL = cmd.exe - -default: all - -all: tools ../util/lev_yacc.c ../util/lev_lex.c - -rebuild: clean all - -clean: - -del ..\util\lev_lex.c - -del ..\util\lev_yacc.c - -del ..\include\lev_comp.h - -tools: -ifneq "$(YACC)" "" - @echo Yacc-alike set to "$(YACC)" - @echo YTABC set to $(YTABC) - @echo YTABH set to $(YTABH) -endif - -ifneq "$(LEX)" "" - @echo Lex-alike set to "$(LEX)" - @echo LEXYYC set to $(LEXYYC) -endif - -#========================================== -# Level Compiler Stuff -#========================================== - -../include/lev_comp.h: ../util/lev_comp.y - @echo Yacc-alike set to "$(YACC)" -ifeq "$(YACC)" "" - @echo Using pre-built lev_comp.h - chdir ..\include - copy /y ..\sys\share\lev_comp.h - copy /b lev_comp.h+,, - chdir ..\src -else - @echo Generating lev_yacc.c and lev_comp.h - chdir ..\util - $(YACC) -d lev_comp.y - copy $(YTABC) $@ - copy $(YTABH) ..\include\lev_comp.h - @del $(YTABC) - @del $(YTABH) - chdir ..\src -endif - -../util/lev_yacc.c: ../util/lev_comp.y - @echo Yacc-alike set to "$(YACC)" -ifeq "$(YACC)" "" - @echo Using pre-built lev_yacc.c - chdir ..\util - copy /y ..\sys\share\lev_yacc.c - copy /b lev_yacc.c+,, - chdir ..\src -else - @echo Generating lev_yacc.c and lev_comp.h - chdir ..\util - $(YACC) -d lev_comp.y - copy $(YTABC) $@ - copy $(YTABH) ..\include\lev_comp.h - @del $(YTABC) - @del $(YTABH) - chdir ..\src -endif - -../util/lev_lex.c: ../util/lev_comp.l - @echo Lex-alike set to "$(LEX)" -ifeq "$(LEX)" "" - @echo Using pre-built lev_lex.c - chdir ..\util - copy /y ..\sys\share\lev_lex.c - copy /b lev_lex.c+,, - chdir ..\src -else - @echo Generating lev_lex.c - chdir ..\util - $(LEX) lev_comp.l - copy $(LEXYYC) $@ - @del $(LEXYYC) - chdir ..\src -endif - - diff --git a/win/win32/levstuff.mak b/win/win32/levstuff.mak deleted file mode 100644 index 0a38390d1..000000000 --- a/win/win32/levstuff.mak +++ /dev/null @@ -1,96 +0,0 @@ -# $NHDT-Date: 1524689255 2018/04/25 20:47:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $ -# Copyright (c) 2018 by Michael Allison -# NetHack may be freely redistributed. See license for details. - -# Set all of these or none of them. -# -# bison and flex are the ones found in GnuWin32, which -# is probably the easiest set of these tools to find -# on Windows. -# -#YACC = bison.exe -y -#LEX = flex.exe -#YTABC = y.tab.c -#YTABH = y.tab.h -#LEXYYC = lex.yy.c - - -default: all - -all: tools ..\util\lev_yacc.c ..\util\lev_lex.c - -rebuild: clean all - -clean: - -del ..\util\lev_lex.c - -del ..\util\lev_yacc.c - -del ..\include\lev_comp.h - -tools: -!IFDEF YACC - @echo Yacc-alike set to $(YACC) - @echo YTABC set to $(YTABC) - @echo YTABH set to $(YTABH) -!ENDIF - -!IFDEF LEX - @echo Lex-alike set to $(LEX) - @echo LEXYYC set to $(LEXYYC) -!ENDIF - -#========================================== -# Level Compiler Stuff -#========================================== - -..\include\lev_comp.h: ..\util\lev_comp.y -!IFNDEF YACC - @echo Using pre-built lev_comp.h - chdir ..\include - copy /y ..\sys\share\lev_comp.h - copy /b lev_comp.h+,, - chdir ..\src -!ELSE - @echo Generating lev_yacc.c and lev_comp.h - chdir ..\util - $(YACC) -d lev_comp.y - copy $(YTABC) $@ - copy $(YTABH) ..\include\lev_comp.h - @del $(YTABC) - @del $(YTABH) - chdir ..\src -!ENDIF - -..\util\lev_yacc.c: ..\util\lev_comp.y -!IFNDEF YACC - @echo Using pre-built lev_yacc.c - chdir ..\util - copy /y ..\sys\share\lev_yacc.c - copy /b lev_yacc.c+,, - chdir ..\src -!ELSE - @echo Generating lev_yacc.c and lev_comp.h - chdir ..\util - $(YACC) -d lev_comp.y - copy $(YTABC) $@ - copy $(YTABH) ..\include\lev_comp.h - @del $(YTABC) - @del $(YTABH) - chdir ..\src -!ENDIF - -..\util\lev_lex.c: ..\util\lev_comp.l -!IFNDEF LEX - @echo Using pre-built lev_lex.c - chdir ..\util - copy /y ..\sys\share\lev_lex.c - copy /b lev_lex.c+,, - chdir ..\src -!ELSE - @echo Generating lev_lex.c - chdir ..\util - $(LEX) lev_comp.l - copy $(LEXYYC) $@ - @del $(LEXYYC) - chdir ..\src -!ENDIF - From fecf930ac0f23987a24c5b5f36f80166e7d61020 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 6 Nov 2019 19:47:37 -0500 Subject: [PATCH 163/529] Makefile updates --- sys/msdos/Makefile.GCC | 148 ++++------------------------------------- sys/winnt/Makefile.gcc | 63 +----------------- 2 files changed, 14 insertions(+), 197 deletions(-) diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index 7a83f5086..fee192932 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -40,6 +40,15 @@ PDCURSES_TOP=../../pdcurses #--------------------------------------------------------------- # Location of LUA +# +# Original source needs to be obtained from: +# http://www.lua.org/ftp/lua-5.3.5.tar.gz +# +# This build assumes that the LUA sources are located +# at the specified location. If they are actually elsewhere +# you'll need to specify the correct spot below in order to +# successfully build NetHack-3.7. +# ADD_LUA=Y LUATOP=../../lua-535 @@ -215,19 +224,8 @@ ifneq "$(ADD_LUA)" "Y" SPLEVSRC = lev_yacc.c lev_$(LEX).c lev_main.c panic.c endif -DGNCOMPSRC = dgn_yacc.c dgn_$(LEX).c dgn_main.c - MAKEDEFSOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o -ifneq "$(ADD_LUA)" "Y" -SPLEVOBJS = $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o $(O)alloc.o \ - $(O)monst.o $(O)objects.o $(O)panic.o \ - $(O)drawing.o $(O)decl.o $(O)stubvid.o -endif - -DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o $(O)alloc.o \ - $(O)panic.o - RECOVOBJS = $(O)recover.o @@ -588,8 +586,7 @@ else LEVCOMPEXE = endif $(O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \ - $(INCL)/pm.h monstr.c vis_tab.c $(LEVCOMPEXE) \ - $(U)dgn_comp.exe $(TILEUTIL) + $(INCL)/pm.h monstr.c vis_tab.c $(TILEUTIL) $(subst /,\,echo utilities made > $@) tileutil: $(U)gif2txt.exe $(U)txt2ppm.exe @@ -829,59 +826,6 @@ else endif endif -#========================================== -# Dungeon Dependencies -#========================================== - -$(U)dgn_comp.exe: $(DGNCOMPOBJS) - $(LINK) $(LFLAGS) -o$@ $(DGNCOMPOBJS) - -ifeq "$(DO_YACC)" "YACC_ACT" -$(U)dgn_yacc.c $(INCL)/dgn_comp.h : $(U)dgn_comp.y - @$(subst /,\,chdir $(UTIL)) - @$(subst /,\,$(YACC) -d dgn_comp.y) - @$(subst /,\,copy $(YTABC) dgn_yacc.c) - @$(subst /,\,copy $(YTABH) $(INCL)/dgn_comp.h) - @$(subst /,\,@del $(YTABC)) - @$(subst /,\,@del $(YTABH)) - @$(subst /,\,chdir $(SRC)) -else -$(U)dgn_yacc.c: $(SSHR)/dgn_yacc.c - @echo --- - @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and - @echo dgn_comp.h from $(SSHR) into $(U) and use that. - @$(subst /,\,copy $(SSHR)/dgn_yacc.c $(U)dgn_yacc.c) - @$(subst /,\,echo.>>$(U)dgn_yacc.c) - -$(INCL)/dgn_comp.h: $(SSHR)/dgn_comp.h - @echo --- - @echo For now, we will copy the prebuilt dgn_comp.h - @echo from $(SSHR) into $(INCL) and use that. - @$(subst /,\,copy $(SSHR)/dgn_comp.h $(INCL)/dgn_comp.h) - @$(subst /,\,echo.>>$(INCL)/dgn_comp.h) - -endif - -ifeq "$(DO_LEX)" "LEX_ACT" - -$(U)dgn_$(LEX).c: $(U)dgn_comp.l $(INCL)/dgn_comp.h - @$(subst /,\,chdir $(UTIL)) - @$(subst /,\,$(LEX) $(FLEXSKEL) dgn_comp.l) - @$(subst /,\,if exist $@ del $@) - @$(subst /,\,copy $(LEXYYC) $@) - @$(subst /,\,del $(LEXYYC)) - @$(subst /,\,chdir $(SRC)) -else - -$(U)dgn_$(LEX).c: $(SSHR)/dgn_lex.c $(INCL)/dgn_comp.h - @echo --- - @echo For now, we will copy the prebuilt dgn_lex.c - @echo from $(SSHR) into $(U) and use it. - @$(subst /,\,copy $(SSHR)/dgn_lex.c $@) - @$(subst /,\,echo.>>$@) - -endif - #========================================== # Recover Utility #========================================== @@ -1075,73 +1019,25 @@ $(DAT)/engrave: $(O)utility.tag $(DAT)/engrave.txt $(DAT)/epitaph: $(O)utility.tag $(DAT)/epitaph.txt @$(subst /,\,$(U)makedefs.exe -s) -ifneq "$(ADD_LUA)" "Y" -$(O)sp_lev.tag: $(O)utility.tag \ - $(DAT)/bigroom.des $(DAT)/castle.des \ - $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \ - $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \ - $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \ - $(DAT)/caveman.des $(DAT)/healer.des $(DAT)/knight.des \ - $(DAT)/monk.des $(DAT)/priest.des $(DAT)/ranger.des \ - $(DAT)/rogue.des $(DAT)/samurai.des $(DAT)/tourist.des \ - $(DAT)/valkyrie.des $(DAT)/wizard.des - @$(subst /,\,cd $(DAT)) - @$(subst /,\,$(U)lev_comp bigroom.des) - @$(subst /,\,$(U)lev_comp castle.des) - @$(subst /,\,$(U)lev_comp endgame.des) - @$(subst /,\,$(U)lev_comp gehennom.des) - @$(subst /,\,$(U)lev_comp knox.des) - @$(subst /,\,$(U)lev_comp mines.des) - @$(subst /,\,$(U)lev_comp medusa.des) - @$(subst /,\,$(U)lev_comp oracle.des) - @$(subst /,\,$(U)lev_comp sokoban.des) - @$(subst /,\,$(U)lev_comp tower.des) - @$(subst /,\,$(U)lev_comp yendor.des) - @$(subst /,\,$(U)lev_comp arch.des) - @$(subst /,\,$(U)lev_comp barb.des) - @$(subst /,\,$(U)lev_comp caveman.des) - @$(subst /,\,$(U)lev_comp healer.des) - @$(subst /,\,$(U)lev_comp knight.des) - @$(subst /,\,$(U)lev_comp monk.des) - @$(subst /,\,$(U)lev_comp priest.des) - @$(subst /,\,$(U)lev_comp ranger.des) - @$(subst /,\,$(U)lev_comp rogue.des) - @$(subst /,\,$(U)lev_comp samurai.des) - @$(subst /,\,$(U)lev_comp tourist.des) - @$(subst /,\,$(U)lev_comp valkyrie.des) - @$(subst /,\,$(U)lev_comp wizard.des) - @$(subst /,\,cd $(SRC)) -else $(O)sp_lev.tag: $(O)utility.tag -endif @$(subst /,\,echo sp_levs done > $@) -$(DAT)/dungeon: $(O)utility.tag $(DAT)/dungeon.def - @$(subst /,\,$(U)makedefs.exe -e) - @$(subst /,\,cd $(DAT)) - @$(subst /,\,$(U)dgn_comp.exe dungeon.pdf) - @$(subst /,\,cd $(SRC)) - #========================================== # DLB stuff #========================================== #note that dir below assumes bin/dir.exe from djgpp distribution # -$(DAT)/nhdat: $(U)dlb_main.exe $(DAT)/data $(DAT)/rumors $(DAT)/dungeon \ +$(DAT)/nhdat: $(U)dlb_main.exe $(DAT)/data $(DAT)/rumors \ $(DAT)/oracles $(DAT)/quest.dat $(O)sp_lev.tag \ $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute @$(subst /,\,echo dat done >$(O)dat.tag) @$(subst /,\,cd $(DAT)) @$(subst /,\,copy $(MSYS)/msdoshlp.txt .) - @$(LS) data dungeon oracles options quest.dat rumors help hh >dlb.lst + @$(LS) data oracles options quest.dat rumors help hh >dlb.lst @$(LS) cmdhelp history opthelp wizhelp license msdoshlp.txt >>dlb.lst @$(LS) bogusmon engrave epitaph tribute >>dlb.lst -ifeq "$(ADD_LUA)" "Y" $(LS) $(subst /,\,*.lua) >>dlb.lst -else - $(LS) $(subst /,\,*.lev) >>dlb.lst -endif @$(subst /,\,$(U)dlb_main cvIf dlb.lst nhdat) @$(subst /,\,cd $(SRC)) @@ -1168,10 +1064,7 @@ clean: spotless: clean - $(subst /,\,if exist $(U)dgn_flex.c del $(U)dgn_flex.c) - $(subst /,\,if exist $(U)dgn_lex.c del $(U)dgn_lex.c) $(subst /,\,if exist $(U)makedefs.exe del $(U)makedefs.exe) - $(subst /,\,if exist $(U)dgn_comp.exe del $(U)dgn_comp.exe) $(subst /,\,if exist $(U)recover.exe del $(U)recover.exe) $(subst /,\,if exist $(U)tilemap.exe del $(U)tilemap.exe) $(subst /,\,if exist $(U)tile2bmp.exe del $(U)tile2bmp.exe) @@ -1183,16 +1076,12 @@ spotless: clean $(subst /,\,if exist $(INCL)/onames.h del $(INCL)/onames.h) $(subst /,\,if exist $(INCL)/pm.h del $(INCL)/pm.h) $(subst /,\,if exist $(INCL)/date.h del $(INCL)/date.h) - $(subst /,\,if exist $(INCL)/dgn_comp.h del $(INCL)/dgn_comp.h) - $(subst /,\,if exist $(INCL)/lev_comp.h del $(INCL)/lev_comp.h) $(subst /,\,if exist $(SRC)/monstr.c del $(SRC)/monstr.c) $(subst /,\,if exist $(SRC)/vis_tab.c del $(SRC)/vis_tab.c) $(subst /,\,if exist $(SRC)/tile.c del $(SRC)/tile.c) $(subst /,\,if exist $(DAT)/options del $(DAT)/options) $(subst /,\,if exist $(DAT)/data del $(DAT)/data) $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors) - $(subst /,\,if exist $(DAT)/dungeon.pdf del $(DAT)/dungeon.pdf) - $(subst /,\,if exist $(DAT)/dungeon del $(DAT)/dungeon) $(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles) $(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat) $(subst /,\,if exist $(DAT)/bogusmon del $(DAT)/bogusmon) @@ -1200,7 +1089,6 @@ spotless: clean $(subst /,\,if exist $(DAT)/epitaph del $(DAT)/epitaph) $(subst /,\,if exist $(DAT)/dlb.lst del $(DAT)/dlb.lst) $(subst /,\,if exist $(DAT)/nhdat del $(DAT)/nhdat) - $(subst /,\,if exist $(DAT)/*.lev del $(DAT)/*.lev) $(subst /,\,if exist $(TILE_BMP) del $(TILE_BMP)) $(subst /,\,if exist $(WSHR)/monthin.txt del $(WSHR)/monthin.txt) $(subst /,\,if exist $(WSHR)/objthin.txt del $(WSHR)/objthin.txt) @@ -1258,10 +1146,7 @@ clean: spotless: clean - $(subst /,\,if exist $(U)dgn_flex.c del $(U)dgn_flex.c) - $(subst /,\,if exist $(U)dgn_lex.c del $(U)dgn_lex.c) $(subst /,\,if exist $(U)makedefs.exe del $(U)makedefs.exe) - $(subst /,\,if exist $(U)dgn_comp.exe del $(U)dgn_comp.exe) $(subst /,\,if exist $(U)recover.exe del $(U)recover.exe) $(subst /,\,if exist $(U)tilemap.exe del $(U)tilemap.exe) $(subst /,\,if exist $(U)tile2bmp.exe del $(U)tile2bmp.exe) @@ -1273,18 +1158,12 @@ spotless: clean $(subst /,\,if exist $(INCL)/onames.h del $(INCL)/onames.h) $(subst /,\,if exist $(INCL)/pm.h del $(INCL)/pm.h) $(subst /,\,if exist $(INCL)/date.h del $(INCL)/date.h) - $(subst /,\,if exist $(INCL)/dgn_comp.h del $(INCL)/dgn_comp.h) -ifneq "$(ADD_LUA)" "Y" - $(subst /,\,if exist $(INCL)/lev_comp.h del $(INCL)/lev_comp.h) -endif $(subst /,\,if exist $(SRC)/monstr.c del $(SRC)/monstr.c) $(subst /,\,if exist $(SRC)/vis_tab.c del $(SRC)/vis_tab.c) $(subst /,\,if exist $(SRC)/tile.c del $(SRC)/tile.c) $(subst /,\,if exist $(DAT)/options del $(DAT)/options) $(subst /,\,if exist $(DAT)/data del $(DAT)/data) $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors) - $(subst /,\,if exist $(DAT)/dungeon.pdf del $(DAT)/dungeon.pdf) - $(subst /,\,if exist $(DAT)/dungeon del $(DAT)/dungeon) $(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles) $(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat) $(subst /,\,if exist $(DAT)/bogusmon del $(DAT)/bogusmon) @@ -1292,9 +1171,6 @@ endif $(subst /,\,if exist $(DAT)/epitaph del $(DAT)/epitaph) $(subst /,\,if exist $(DAT)/dlb.lst del $(DAT)/dlb.lst) $(subst /,\,if exist $(DAT)/nhdat del $(DAT)/nhdat) -ifneq "$(ADD_LUA)" "Y" - $(subst /,\,if exist $(DAT)/*.lev del $(DAT)/*.lev) -endif $(subst /,\,if exist $(TILE_BMP) del $(TILE_BMP)) $(subst /,\,if exist $(WSHR)/monthin.txt del $(WSHR)/monthin.txt) $(subst /,\,if exist $(WSHR)/objthin.txt del $(WSHR)/objthin.txt) diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 55b6d2ebd..66399fab7 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -272,13 +272,8 @@ U = $(UTIL)/ MAKESRC = $(U)makedefs.c -DGNCOMPSRC = $(U)dgn_yacc.c $(U)dgn_lex.c $(U)dgn_main.c - MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o -DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_lex.o $(O)dgn_main.o \ - $(O)alloc.o $(O)panic.o - RECOVOBJS = $(O)recover.o TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt @@ -791,8 +786,7 @@ $(O)sp_lev.tag: $(O)utility.tag $(subst /,\,echo sp_levs done > $(O)sp_lev.tag) $(O)utility.tag: $(INCL)/date.h $(INCL)/onames.h $(INCL)/pm.h \ - $(SRC)/vis_tab.c $(INCL)/vis_tab.h \ - $(U)dgncomp.exe $(TILEUTIL16) + $(SRC)/vis_tab.c $(INCL)/vis_tab.h $(TILEUTIL16) $(subst /,\,@echo utilities made >$@) @echo utilities made. @@ -941,10 +935,6 @@ $(DAT)/epitaph: $(DAT)/epitaph.txt $(U)makedefs.exe $(DAT)/bogusmon: $(DAT)/bogusmon.txt $(U)makedefs.exe $(subst /,\,$(U)makedefs -s) -$(DAT)/dungeon: $(O)utility.tag $(DAT)/dungeon.def - $(subst /,\,$(U)makedefs -e) - $(subst /,\,$(U)dgncomp $(DAT)/dungeon.pdf) - #========================================== # uudecode utility and uuencoded targets #========================================== @@ -997,33 +987,6 @@ $(MSWIN)/splash.bmp: $(U)uudecode.exe $(MSWIN)/splash.uu $(subst /,\,copy splash.bmp $@) del splash.bmp -#========================================== -# Dungeon Compiler Stuff -#========================================== -$(U)dgn_yacc.c: $(U)dgn_comp.y - mingw32-make -C ../util -f ../win/win32/dgnstuff-mingw32.mak $(U)dgn_yacc.c - -$(INCL)/dgn_comp.h: - mingw32-make -C ../include -f ../win/win32/dgnstuff-mingw32.mak $(INCL)/dgn_comp.h - -$(U)dgn_lex.c: $(U)dgn_comp.l - mingw32-make -C ../util -f ../win/win32/dgnstuff-mingw32.mak $(U)dgn_lex.c - -$(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)/dgn_comp.h $(U)dgn_yacc.c - $(cc) $(LEVCFLAGS) -o$@ $(U)dgn_yacc.c - -$(O)dgn_lex.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h \ - $(U)dgn_lex.c - $(cc) $(LEVCFLAGS) -o$@ $(U)dgn_lex.c - -$(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c - $(cc) $(LEVCFLAGS) -o$@ $(U)dgn_main.c - -$(U)dgncomp.exe: $(DGNCOMPOBJS) - @echo Linking $@... - @echo Linking $@... - $(link) $(LFLAGSU) -o$@ $(DGNCOMPOBJS) - #================================================= # For a couple of devteam utilities #================================================= @@ -1066,7 +1029,7 @@ $(DAT)/porthelp: $(MSWSYS)/porthelp nhdat$(NHV): $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \ $(DAT)/quest.dat $(DAT)/rumors $(DAT)/help $(DAT)/hh $(DAT)/cmdhelp $(DAT)/keyhelp \ - $(DAT)/history $(DAT)/opthelp $(DAT)/wizhelp $(DAT)/dungeon \ + $(DAT)/history $(DAT)/opthelp $(DAT)/wizhelp \ $(DAT)/porthelp $(DAT)/license $(DAT)/engrave \ $(DAT)/epitaph $(DAT)/bogusmon $(DAT)/tribute $(O)sp_lev.tag $(subst /,\,echo data >$(DAT)/dlb.lst) @@ -1084,7 +1047,6 @@ nhdat$(NHV): $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \ $(subst /,\,echo history >>$(DAT)/dlb.lst) $(subst /,\,echo opthelp >>$(DAT)/dlb.lst) $(subst /,\,echo wizhelp >>$(DAT)/dlb.lst) - $(subst /,\,echo dungeon >>$(DAT)/dlb.lst) $(subst /,\,echo license >>$(DAT)/dlb.lst) $(subst /,\,echo engrave >>$(DAT)/dlb.lst) $(subst /,\,echo epitaph >>$(DAT)/dlb.lst) @@ -1327,7 +1289,6 @@ clean: if exist $(O)utility.tag del $(O)utility.tag ifneq "$(W_UTIL)" "" if exist $(W_UTIL)\makedefs.exe del $(W_UTIL)\makedefs.exe - if exist $(W_UTIL)\dgncomp.exe del $(W_UTIL)\dgncomp.exe endif ifneq "$(W_SRC)" "" if exist $(W_SRC)\*.lnk del $(W_SRC)\*.lnk @@ -1338,8 +1299,6 @@ ifneq "$(W_OBJ)" "" if exist $(W_OBJ)\utility.tag del $(W_OBJ)\utility.tag if exist $(W_OBJ)\install.tag del $(W_OBJ)\install.tag if exist $(W_OBJ)\console.res del $(W_OBJ)\console.res - if exist $(W_OBJ)\dgncomp.MAP del $(W_OBJ)\dgncomp.MAP - if exist $(W_OBJ)\dgncomp.PDB del $(W_OBJ)\dgncomp.PDB if exist $(W_OBJ)\dlb_main.MAP del $(W_OBJ)\dlb_main.MAP if exist $(W_OBJ)\dlb_main.PDB del $(W_OBJ)\dlb_main.PDB if exist $(W_OBJ)\gamedir.tag del $(W_OBJ)\gamedir.tag @@ -1367,27 +1326,9 @@ ifneq "$(W_OBJ)" "" if exist $(W_OBJ)\uudecode.MAP del $(W_OBJ)\uudecode.MAP if exist $(W_OBJ)\uudecode.PDB del $(W_OBJ)\uudecode.PDB endif - rem - rem defer to the steps in ../win/win32/levstuff-mingw32.mak - rem - mingw32-make -f ../win/win32/levstuff-mingw32.mak clean - rem - rem defer to the steps in ../win/win32/dgnstuff-mingw32.mak - mingw32-make -f ../win/win32/dgnstuff-mingw32.mak clean $(subst /,\,if exist $(TILEBMP16) del $(TILEBMP16)) $(subst /,\,if exist $(TILEBMP32) del $(TILEBMP32)) -#clean: -# -test -f $(O)install.tag && del $(O)install.tag -# -test -f $(O)utility.tag && del $(O)utility.tag -# -test -f $(U)makedefs.exe && del $(U)makedefs.exe -# -test -f $(U)levcomp.exe && del $(U)levcomp.exe -# -test -f $(U)dgncomp.exe && del $(U)dgncomp.exe -# -del $(SRC)/*.lnk -# -del $(SRC)/*.map -# -test -f $(TILEBMP16) && del $(TILEBMP16) -# -test -f $(TILEBMP32) && del $(TILEBMP32) -# #=================================================================== # OTHER DEPENDENCIES #=================================================================== From 4dd39a0d7e033335ee98cfaa7ec38d85251ab956 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 7 Nov 2019 01:15:09 -0800 Subject: [PATCH 164/529] fixes36.3 tidying Reword a few entries, remove a few trailing spaces. --- doc/fixes36.3 | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index d9db05039..e3d08f5ab 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.162 $ $NHDT-Date: 1573066356 2019/11/06 18:52:36 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.163 $ $NHDT-Date: 1573118102 2019/11/07 09:15:02 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -152,9 +152,9 @@ zapping self with wand of opening or spell of knock to escape from a pit trap wielded aklys that returned to hero when thrown while inside an engulfer left a stale 'thrownobj' pointer that triggered "add_to_minv: obj not free" panic if same weapon killed any engulfer via melee from inside -uarmh null pointer dereference if a helm of opposite alignment came off due +uarmh null pointer dereference if a helm of opposite alignment came off due to being polymorphed -verb tense was inappropriate in some messages when a mon/pet had a name +verb tense was inappropriate in some messages when a mon/pet had a name ending in 's' orctown booty items should have been initialized in mksobj() query_category() and whatdoes_help() had early returns which could each leave @@ -176,7 +176,7 @@ avoid 'object lost' panic when polymorph causes loss of levitation boots or running told player about engravings as they were being moved over but buffered output didn't show it until hero stopped, so it wasn't possible to tell where they were, unlike all other forms of - multiple movement; stop running if/when an engraving is reached + multiple movement; so stop running if/when an engraving is reached fix exploding land mine moving ball or chain and causing a sanity error fix firing attached iron ball when swallowed causing a sanity error fix vault guard impossible when he could not relocate in certain situation @@ -239,8 +239,8 @@ monster throwing from stack of missiles (darts, daggers, spears) would cause surviving death while polymorphed would yield "You are a " without terminating period 'mksobj failure' commit resulted in wrong corpse types for dying monsters -a recent intended sanity check fix inadvertently bypassed placing - a thrown chained ball back onto the floor +a recent intended sanity check fix inadvertently bypassed placing a thrown + chained ball back onto the floor in symset:curses, symbol S_tree was accidentally set to horizontal line where plus-or-minus sign was meant; also, change S_bars to not-equals sign curses: sometimes the message window would show a blank line after a prompt @@ -284,10 +284,10 @@ curses: support EDIT_GETLIN (but like with tty, it's disabled by default) to (however, it's skipped if the 'popup_dialog' option is On) curses: when display windows get reconfigured (after setting align_status, align_message, statuslines, windowborders or due to external resize), - the message window was being refreshed with the oldest available N - messages rather than most recent N. [Still room for improvement; - when feasible it combines short lines, resulting in N messages on - fewer than N lines and leaving some of the available lines blank.] + the message window was being refreshed with most recent message and + the oldest available N-1 messages rather than next to most recent N-1. + [Still room for improvement when short lines are combined or long + ones are wrapped, where it still shows a subset of N original lines.] curses: plug memory leak when getting a line of input is cancelled by ESC curses: after requesting a line of input from player, next line of message window could end up being skipped @@ -301,7 +301,7 @@ curses: make text windows wider so that help feedback is more readable curses: using ':' for search string matching to toggle menu items in a multple page menu would highlight arbitrary items on the currently visible page in sync with the lines that matching items had on other pages -curses: when map window was clipped, the 'scrollbars' shown to indicate which +curses: when map window was clipped, position bars shown to indicate which part of the map was in view didn't work as intended, always drawing "*--------------" for horizontal (and comparable '*' with multiple '|' underneath for vertical) when it meant to show "---******------" if @@ -315,8 +315,8 @@ curses: disable the attempt to support Ctrl+Left_click as an alternate way the mouse data passed to nethack didn't match the curses (ncurses on OSX 10.11) documentation and things didn't work as intended curses: menu coloring required that both 'menucolors' and 'guicolor' be On; - for menus, override guicolor with more-specific menucolors -curses: support symset:DECgraphics for map display + for menus, ignore 'guicolor' and honor more-specific 'menucolors' +curses: support symset:curses and symset:DECgraphics for map display curses: enable the 'use_inverse' boolean option (via wincap WC_INVERSE flag) for extended monster detection and black&white lava; forced to True to override default of False (for tty's benefit) @@ -355,13 +355,13 @@ tty: take two, if/when autodecribe feedback wraps past top line, clear tty: video attributes (bold, inverse, &c) for status highlighting sometimes were scrambled unix: sysconf CHECK_PLNAME=1 wouldn't work if attempt to obtain unix username - failed even though it didn't need that username + failed even though it didn't need that to check player character name unix+curses: startup error only reset terminal for tty; one noticeable example was answering 'n' to "Destroy old game?" Windows: some startup error messages were not being delivered successfully WindowsGUI: player selection dialog box layout was not being adjusted for DPI -Windows: signifiant changes to default directory choices. see documentation - for details. +Windows: signifiant changes to default directory choices; see documentation + for details General New Features From 1908017e27667a6ca92d1ece0e22c84eda37b249 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 7 Nov 2019 11:23:28 +0200 Subject: [PATCH 165/529] Fixes typo --- doc/fixes36.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index e3d08f5ab..9ff36d1d2 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -360,7 +360,7 @@ unix+curses: startup error only reset terminal for tty; one noticeable example was answering 'n' to "Destroy old game?" Windows: some startup error messages were not being delivered successfully WindowsGUI: player selection dialog box layout was not being adjusted for DPI -Windows: signifiant changes to default directory choices; see documentation +Windows: significant changes to default directory choices; see documentation for details From 2b98d161d6ff710bcabd9c2e7486a12953588ff3 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 7 Nov 2019 01:42:29 -0800 Subject: [PATCH 166/529] fixes36.3 again Noticed that "multiple" was misspelled for entry about menu action ':' misbehaving under curses, but the phrasing for whole entry was difficult to comprehend so try to word it better. [This one is in the highlights list with the old wording.] --- doc/fixes36.3 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 9ff36d1d2..dc4e5aa1c 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.163 $ $NHDT-Date: 1573118102 2019/11/07 09:15:02 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.165 $ $NHDT-Date: 1573119743 2019/11/07 09:42:23 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -298,9 +298,9 @@ curses: don't convert ^M (or or key) into ^J; both ^J and ^M cause the hero to try to move curses: draw map in screen columns 1..79 like tty, rather than in 2..80 curses: make text windows wider so that help feedback is more readable -curses: using ':' for search string matching to toggle menu items in a multple - page menu would highlight arbitrary items on the currently visible - page in sync with the lines that matching items had on other pages +curses: using ':' for toggling menu items which match a search string, in a + multi-page menu it would highlight arbitrary items on the currently + visible page in sync with lines that matched items have on other pages curses: when map window was clipped, position bars shown to indicate which part of the map was in view didn't work as intended, always drawing "*--------------" for horizontal (and comparable '*' with multiple '|' From 71d229a99dec0a172b750cec9ebe5703cf70e146 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 10:50:14 -0500 Subject: [PATCH 167/529] Update README and include/patchlevel.h --- README | 31 ++++++++++++++++++++++++++++--- include/patchlevel.h | 39 +++++++++++++++++++++++++++++++++++---- 2 files changed, 63 insertions(+), 7 deletions(-) diff --git a/README b/README index d7698ffd4..64ff6cb1c 100644 --- a/README +++ b/README @@ -16,9 +16,34 @@ the "new features" section. Below you will find some other general notes that were not considered spoilers: -* Over 30 refinements to the curses window port. -* Some refinements to status highlights. -* A couple of fixes to prevent potential game crashes. + * Fixed stale 'thrownobj' pointer for returning thrown aklys while engulfed + * Fixed uarmh null pointer dereference if a helm of opposite alignment came + * off due to being polymorphed + * Fixed 'object lost' panic when attempting to crawl of of the water during + * emergency disrobing/dropping + * Running now stops when moving over engravings so you can tell where they are + * Fixed detection of unseen/secret doors which failed to find monsters hiding + * under objects and failed to find monsters hiding at trap locations + * Ensured fatal status conditions made it to disclosure and/or dumplog + * Fixed "Bad fruit #N" warnings when saving bones with 'perm_invent' On + * Fixed it so yellow dragons don't have green breath + * Added several grammar corrections + * Improved recognition of deafness for several situations including the + * playing of musical instruments and bribing negotiations with demon lords + * Fixed ignoring of god's wrath when hero injured himself during alter kick + * Fixed several cases where persistent inventory window was not updated + * Fixed temple priests or shopkeepers moving over other monsters + * Ensured that thrown or kicked objects will end up in bones + * Made water go all the way to the edges of level on the Plane of Water + * Made clouds disrupt line of sight along the edges of the Plane of Air + * Improved and expanded usage of status highlighting percentage rules + * Added more than 15 improvements and fixes to the curses window port + * Added and documented significant changes to default directory choices for + * the Windows platform + * Improved the layout and display of the player selection dialog used on the + * Windows graphical implementation + * Allowed the msdos implementation to build with curses and PDCurses + * Over 100 other fixes and improvements - - - - - - - - - - - diff --git a/include/patchlevel.h b/include/patchlevel.h index 13c8d4ae3..68061d695 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -37,12 +37,41 @@ /* Version 3.6.x */ /* Patch 3, - * + * + * Fixed stale 'thrownobj' pointer for returning thrown aklys while engulfed + * Fixed uarmh null pointer dereference if a helm of opposite alignment came + * off due to being polymorphed + * Fixed 'object lost' panic when attempting to crawl of of the water during + * emergency disrobing/dropping + * Running now stops when moving over engravings so you can tell where they are + * Fixed detection of unseen/secret doors which failed to find monsters hiding + * under objects and failed to find monsters hiding at trap locations + * Ensured fatal status conditions made it to disclosure and/or dumplog + * Fixed "Bad fruit #N" warnings when saving bones with 'perm_invent' On + * Fixed it so yellow dragons don't have green breath + * Added several grammar corrections + * Improved recognition of deafness for several situations including the + * playing of musical instruments and bribing negotiations with demon lords + * Fixed ignoring of god's wrath when hero injured himself during alter kick + * Fixed several cases where persistent inventory window was not updated + * Fixed temple priests or shopkeepers moving over other monsters + * Ensured that thrown or kicked objects will end up in bones + * Made water go all the way to the edges of level on the Plane of Water + * Made clouds disrupt line of sight along the edges of the Plane of Air + * Improved and expanded usage of status highlighting percentage rules + * Added more than 15 improvements and fixes to the curses window port + * Added and documented significant changes to default directory choices for + * the Windows platform + * Improved the layout and display of the player selection dialog used on the + * Windows graphical implementation + * Allowed the msdos implementation to build with curses and PDCurses + * Included over 100 other fixes and improvements as outlined in doc/fixes36.3 */ /* Patch 2, May 7, 2019 * - * Over 320 bug fixes including a couple of crash bug fixes + * Over 320 bug fixes including a couple of crash bug fixes as outlined in + * doc/fixes36.2 * More than 15 enhancements or improvements * Ensuring that unix Makefiles do not rely on features unique to gnu make * Improvements to hilite_status parsing in an effort to ensure that expected @@ -54,13 +83,15 @@ */ /* Patch 1, April 27, 2018 - * Over four hundred and seventy bug fixes and improvements. + * + * Over four hundred and seventy bug fixes and improvements as outlined in + * doc/fixes36.1 */ /* * NetHack 3.6.0, December 7, 2015 * - * Hundreds of bug fixes. + * Hundreds of bug fixes as outlined in doc/fixes36.0. * Some code reorganization. * Some new features. * Variations of some community patches rolled in. From 96e7e11a5e2af67512680e2571663ccd54892084 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 10:59:20 -0500 Subject: [PATCH 168/529] typo --- README | 2 +- include/patchlevel.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 64ff6cb1c..a8746c435 100644 --- a/README +++ b/README @@ -30,7 +30,7 @@ spoilers: * Added several grammar corrections * Improved recognition of deafness for several situations including the * playing of musical instruments and bribing negotiations with demon lords - * Fixed ignoring of god's wrath when hero injured himself during alter kick + * Fixed ignoring of god's wrath when hero injured himself during altar kick * Fixed several cases where persistent inventory window was not updated * Fixed temple priests or shopkeepers moving over other monsters * Ensured that thrown or kicked objects will end up in bones diff --git a/include/patchlevel.h b/include/patchlevel.h index 68061d695..2151087ee 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -52,7 +52,7 @@ * Added several grammar corrections * Improved recognition of deafness for several situations including the * playing of musical instruments and bribing negotiations with demon lords - * Fixed ignoring of god's wrath when hero injured himself during alter kick + * Fixed ignoring of god's wrath when hero injured himself during altar kick * Fixed several cases where persistent inventory window was not updated * Fixed temple priests or shopkeepers moving over other monsters * Ensured that thrown or kicked objects will end up in bones From 6dca5e0a49bbb948d43d11305df4e6507e102936 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 7 Nov 2019 18:13:44 +0200 Subject: [PATCH 169/529] Fix couple warnings Alloc failure is already handled. --- src/nhlua.c | 13 +++++-------- sys/unix/hints/linux | 1 + 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/nhlua.c b/src/nhlua.c index bdc09ba9d..47f8f23a8 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -551,10 +551,12 @@ char *defval; lua_getfield(L, -1, name); ret = luaL_optstring(L, -1, defval); - if (ret) - ret = dupstr(ret); + if (ret) { + lua_pop(L, 1); + return dupstr(ret); + } lua_pop(L, 1); - return ret; + return NULL; } int @@ -804,11 +806,6 @@ const char *fname; dlb_fseek(fh, 0L, SEEK_END); buflen = dlb_ftell(fh); buf = (char *) alloc(sizeof(char) * (buflen + 1)); - if (!buf) { - impossible("alloc: Error allocating %i bytes for loading lua file %s", buflen, fname); - ret = FALSE; - goto give_up; - } dlb_fseek(fh, 0L, SEEK_SET); do { diff --git a/sys/unix/hints/linux b/sys/unix/hints/linux index dcdee332d..391f4b9ae 100644 --- a/sys/unix/hints/linux +++ b/sys/unix/hints/linux @@ -34,6 +34,7 @@ CFLAGS+=-DCURSES_GRAPHICS #CFLAGS+=-DSCORE_ON_BOTL #CFLAGS+=-DMSGHANDLER #CFLAGS+=-DTTY_TILES_ESCCODES +CFLAGS+=-Wdiscarded-qualifiers -Wformat LINK=$(CC) # Only needed for GLIBC stack trace: From 468ba1071d0df739b83d671679938c7be686d415 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 7 Nov 2019 18:45:42 +0200 Subject: [PATCH 170/529] Remove the hints file change for extra warnings --- sys/unix/hints/linux | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/unix/hints/linux b/sys/unix/hints/linux index 391f4b9ae..dcdee332d 100644 --- a/sys/unix/hints/linux +++ b/sys/unix/hints/linux @@ -34,7 +34,6 @@ CFLAGS+=-DCURSES_GRAPHICS #CFLAGS+=-DSCORE_ON_BOTL #CFLAGS+=-DMSGHANDLER #CFLAGS+=-DTTY_TILES_ESCCODES -CFLAGS+=-Wdiscarded-qualifiers -Wformat LINK=$(CC) # Only needed for GLIBC stack trace: From 293082079ca75cd807d5b3cf04c02ab130d637cd Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 12:06:40 -0500 Subject: [PATCH 171/529] suppress a warning in one lua file build --- sys/winnt/Makefile.msc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index f17855982..762d8a81e 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -1373,6 +1373,8 @@ $(O)lua5.3.5-static.lib: $(LUAOBJFILES) $(O)lua.o: $(LUASRC)\lua.c $(O)luac.o: $(LUASRC)\luac.c +$(O)lapi.o: $(LUASRC)\lapi.c + @$(cc) $(cflagsBuild) -wd4244 -Fo$@ $(LUASRC)\lapi.c #=============================================================================== # Housekeeping From 4e438e0146b8a965939434e3e1ecbd560e2cfa49 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 7 Nov 2019 19:28:58 +0200 Subject: [PATCH 172/529] Use lua_tointeger instead of lua_tonumber --- src/dungeon.c | 8 ++++---- src/nhlua.c | 4 ++-- src/sp_lev.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/dungeon.c b/src/dungeon.c index 8d99edc1a..bf518faba 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -776,7 +776,7 @@ lua_State *L; if (lua_type(L, -1) == LUA_TTABLE) { int f, nflags; lua_len(L, -1); - nflags = lua_tonumber(L, -1); + nflags = lua_tointeger(L, -1); lua_pop(L, 1); for (f = 0; f < nflags; f++) { lua_pushinteger(L, f+1); @@ -851,7 +851,7 @@ init_dungeons() panic("dungeon is not a lua table"); lua_len(L, -1); - g.n_dgns = lua_tonumber(L, -1); + g.n_dgns = lua_tointeger(L, -1); lua_pop(L, 1); pd.start = 0; @@ -898,7 +898,7 @@ init_dungeons() if (lua_type(L, -1) == LUA_TTABLE) { int f, nlevels; lua_len(L, -1); - nlevels = lua_tonumber(L, -1); + nlevels = lua_tointeger(L, -1); pd.tmpdungeon[i].levels = nlevels; lua_pop(L, 1); for (f = 0; f < nlevels; f++) { @@ -954,7 +954,7 @@ init_dungeons() if (lua_type(L, -1) == LUA_TTABLE) { int f, nbranches; lua_len(L, -1); - nbranches = lua_tonumber(L, -1); + nbranches = lua_tointeger(L, -1); pd.tmpdungeon[i].branches = nbranches; lua_pop(L, 1); for (f = 0; f < nbranches; f++) { diff --git a/src/nhlua.c b/src/nhlua.c index 47f8f23a8..17d0c2736 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -213,8 +213,8 @@ lua_State *L; int argc = lua_gettop(L); if (argc == 2) { - int x = (int) lua_tonumber(L, 1); - int y = (int) lua_tonumber(L, 2); + int x = lua_tointeger(L, 1); + int y = lua_tointeger(L, 2); if (x >= 0 && x < COLNO && y >= 0 && y < ROWNO) { char buf[BUFSZ]; diff --git a/src/sp_lev.c b/src/sp_lev.c index bbc9af7ba..e014f3e50 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -4534,7 +4534,7 @@ int tableidx, entrynum; lua_pushinteger(L, entrynum); lua_gettable(L, tableidx); if (lua_isnumber(L, -1)) { - ret = lua_tonumber(L, -1); + ret = lua_tointeger(L, -1); } else { char buf[BUFSZ]; Sprintf(buf, "Array entry #%i is %s, expected number", @@ -4564,7 +4564,7 @@ boolean optional; luaL_checktype(L, -1, LUA_TTABLE); lua_len(L, -1); - arrlen = lua_tonumber(L, -1); + arrlen = lua_tointeger(L, -1); lua_pop(L, 1); if (arrlen != 4) { nhl_error(L, "Not a region"); @@ -4591,7 +4591,7 @@ int *x, *y; int arrlen; lua_len(L, index); - arrlen = lua_tonumber(L, -1); + arrlen = lua_tointeger(L, -1); lua_pop(L, 1); if (arrlen != 2) { nhl_error(L, "Not a coordinate"); From 6f5a50a5383152976bc4cebb46b0cb69bd492012 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 7 Nov 2019 19:32:36 +0200 Subject: [PATCH 173/529] Move and remove test files --- test_des.lua => test/test_des.lua | 0 test_lev.lua => test/test_lev.lua | 0 test_sel.lua => test/test_sel.lua | 0 test_src.lua => test/test_src.lua | 0 x.lua | 99 -------------- y.lua | 210 ------------------------------ 6 files changed, 309 deletions(-) rename test_des.lua => test/test_des.lua (100%) rename test_lev.lua => test/test_lev.lua (100%) rename test_sel.lua => test/test_sel.lua (100%) rename test_src.lua => test/test_src.lua (100%) delete mode 100644 x.lua delete mode 100644 y.lua diff --git a/test_des.lua b/test/test_des.lua similarity index 100% rename from test_des.lua rename to test/test_des.lua diff --git a/test_lev.lua b/test/test_lev.lua similarity index 100% rename from test_lev.lua rename to test/test_lev.lua diff --git a/test_sel.lua b/test/test_sel.lua similarity index 100% rename from test_sel.lua rename to test/test_sel.lua diff --git a/test_src.lua b/test/test_src.lua similarity index 100% rename from test_src.lua rename to test/test_src.lua diff --git a/x.lua b/x.lua deleted file mode 100644 index 347eb350c..000000000 --- a/x.lua +++ /dev/null @@ -1,99 +0,0 @@ - --- s = string.format("(%i,%i),[%i,%i,%i]", u.ux, u.uy, u.dx, u.dy, u.dz); --- nh.pline(s); - - -nh.test({ x = 3, y = 7, name="foo" }); - -local l = nh.getmap(u.ux, u.uy); - -nh.pline(string.format("map(%i,%i): glyph=%i, typ=%i, lit=%i, candig=%i", - u.ux, u.uy, - l.glyph, l.typ, l.lit, l.candig)); - --- nh.pline("lit: " .. x.lit .. ". ") - --- str = nh.getlin("What do you call it?"); --- nh.verbalize("Hello, this is " .. str .. " speaking"); - - --- nh.pline("COLNOxROWNO=(" .. nhc.COLNO .. "x" .. nhc.ROWNO .. ")") - - --- local opts = { a = "valinta a", b = "bbbbb", c = "option c" } --- local ret = nh.menu("Chooooooose one", "a", "one", opts) --- nh.pline("You chose: '" .. ret .. "', that is: '" .. opts[ret] .. "'"); - - --- nh.pline("makeplural: " .. nh.makeplural("zorkmid")); --- nh.pline("makesingular: " .. nh.makesingular("zorkmids")); - - --- local opts = { --- { key = "a", text = "valinta a" }, --- { key = "b", text = "bbbbb" }, --- { key = "c", text = "option c" } --- } ---local ret = nh.menu("Choose one (1)", nil, nil, opts) ---nh.pline("You chose: '" .. ret .. "'") - - ---local ret = nh.menu("Choose one (2)", opts) ---nh.pline("You chose: '" .. ret .. "'") - ---[[ - -nh.level_init({ - style = "none", -- or "fill", "grid", "mines", "rogue" - filling = "tree", - init_present = 1, - padding = 1, - fg = "floor", - bg = "wall", - smoothed = 0, - joined = 1, - lit = -1, - walled = 0, - icedpools = 0 -}); - -nh.level_flags({"noteleport", "hardfloor"}); - -nh.message("What a strange feeling!"); - -nh.map({horiz = "center", - vert = "center", - map = " -..... -.L.L. -..... -" }); - -nh.monster({ - class = "V", - typename = "vampire", - coord = {5, 10}, - name = "Phil", - attitude = "peaceful", - alertness = "asleep", - alignment = "lawful", - -- appearance = ...? - female = 1, - invisible = 1, - cancelled = 1, - revived = 1, - avenge = 1, - fleeing = 23, - blinded = 23, - paralyzed = 23, - stunned = 1, - confused = 1, - seentraps = { "pit", "magic trap" }, -- could be "all" - -- how to add inventory for this monster? - -- should be able to just directly set struct monst fields -}); - -nh.object({ -}); - --- ]] diff --git a/y.lua b/y.lua deleted file mode 100644 index aba85d261..000000000 --- a/y.lua +++ /dev/null @@ -1,210 +0,0 @@ - --- run tests on the des-level commands - --- des.level_init({ style = "mines", joined = 1, lit = 1 }); --- des.level_init({ style = "mazegrid", lit = 1 }); --- des.level_init({ style = "solidfill" }); --- des.level_init({ style = "rogue" }); -des.level_init(); - -function selection_tests () - -- OO style - local sel = selection.new(); - sel:get(1, 2); - sel:set(1, 2); - sel:negate(); - sel:percentage(50); - sel:rndcoord(1); - sel:line(1,2, 50,20); - sel:randline(1,2, 50,20, 7); - sel:rect(1,2, 7,8); - sel:fillrect(1,2, 7,8); - sel:area(1,2, 7,8); - sel:grow(); - sel:filter_mapchar(' '); - sel:floodfill(1,1); - sel:circle(40, 10, 9); - sel:circle(40, 10, 9, 1); - sel:ellipse(40, 10, 20, 8); - sel:ellipse(40, 10, 20, 8, 1); - - -- initializers - selection.set(1, 2); - selection.negate(); - selection.line(1,2, 50,20); - selection.randline(1,2, 50,20, 7); - selection.rect(1,2, 7,8); - selection.fillrect(1,2, 7,8); - selection.area(1,2, 7,8); - selection.floodfill(1,1); - selection.circle(40, 10, 9); - selection.circle(40, 10, 9, 1); - selection.ellipse(40, 10, 20, 8); - selection.ellipse(40, 10, 20, 8, 1); - - -- variable as param - selection.get(sel, 1, 2); - selection.set(sel, 1, 2); - selection.negate(sel); - selection.percentage(sel, 50); - selection.rndcoord(sel, 1); - selection.line(sel, 1,2, 50,20); - selection.randline(sel, 1,2, 50,20, 7); - selection.rect(sel, 1,2, 7,8); - selection.fillrect(sel, 1,2, 7,8); - selection.area(sel, 1,2, 7,8); - selection.grow(sel); - selection.filter_mapchar(sel, ' '); - selection.floodfill(sel, 1,1); - selection.circle(sel, 40, 10, 9); - selection.circle(sel, 40, 10, 9, 1); - selection.ellipse(sel, 40, 10, 20, 8); - selection.ellipse(sel, 40, 10, 20, 8, 1); -end -- selection_tests() - --- set coordinate 4,5 to value 1 --- selection.set(sel, 4, 5); - --- set coordinate 7,7 to value 1 --- sel:set(7, 7); - --- set 5,5 to value 2 --- sel:set(5,5, 2); - --- get 3 coordinates, removing the coordinates from the selection --- local tx1, ty1 = selection.rndcoord(sel, 1); --- local tx2, ty2 = selection.rndcoord(sel, 1); --- local tx3, ty3 = selection.rndcoord(sel, 1); - --- filter randomly 50% of the selection --- local sel2 = selection.percentage(sel, 50); - --- negate the selection --- local sel3 = selection.negate(sel); - --- negate first, then 50% --- local sel4 = selection.percentage(selection.negate(sel), 50); - --- local yyy = sel:get(6, 7); - --- des.mazewalk({ x = 4, y = 6, stocked = 0 }); - --- draw a line from (1,1) to (40,15) --- selection.line(sel, 1,1, 40,15); - --- draw a rectangle with upper left at (1,1) to lower right at (10,10) --- selection.rect(sel, 1,1, 10,10); - --- draw a filled rectangle with upper left at (1,1) to lower right at (10,10) --- selection.fillrect(sel, 40,2, 50,5); - --- alias to fillrect --- selection.area(sel, 40,2, 50,5); - --- randomized line from (73,1) to (1,20), with roughness 7 --- selection.randline(sel, 73, 1, 1, 20, 7); - --- grow selection to all directions --- selection.grow(sel); - --- floodfill from (2,7), matching the same terrain type --- sel:floodfill(2, 5); - --- draw a circle at (40,10) with radius 9 --- selection.circle(sel, 40, 10, 9); - --- draw a filled circle at (40,10) with radius 9 --- selection.circle(sel, 40, 10, 9, 1); - --- draw an ellipse at (40,10) with radii 20 and 8 --- selection.ellipse(sel, 40, 10, 20, 8); - --- draw a filled ellipse at (40,10) with radii 20 and 8 --- sel:ellipse(40, 10, 20, 8, 1); - --- filter selection by matching terrain --- selection.filter_mapchar(sel, ' '); - --- set lava in the selection -local sel = selection.area(4,5, 40,10) ~ selection.rect(7,8, 60,14); -des.terrain(sel, "L"); - --- des.terrain({ x = tx1, y = ty1, typ = "L" }); --- des.terrain({ x = tx2, y = ty2, typ = "T" }); --- des.terrain({ x = tx3, y = ty3, typ = "F" }); - --- des.wall_property({ property = "nondiggable", x1 = 0, y1 = 0, x2 = 40, y2 = 20 }); --- des.wall_property(); - -des.wallify(); - - - -function test () -rectroom = [[ ----- -|..| -|... -|..| -----]]; - -des.map({ - -- halign = "center", valign = "center", - x = 5, y = 5, - keepregion = 1, - map = [[ ------- -|..... -|....| -|....| -.....| -|....| -|....| -------]]}); - ---[[ -for i = 0, 5 do - xp = math.random(70); - yp = math.random(20); - -- des.message("i=" .. i .. " (" .. xp .. "," .. yp .. ")"); - -- des.map({ x = xp, y = yp , map = rectroom, keepregion = 1 }); -end -]] - --- des.wallify(); - --- des.message("viesti"); - - -for i = 1, 10 do - mx = i; - my = i; - des.message(i .."=(" .. mx .. "," .. my .. ")"); - des.monster({ x = mx, y = my, - name = "foo" .. mx .. "x" .. my, - -- class = "F", - id = "red mold", - peaceful = 1, - asleep = 1, - female = 1 - }); - des.object({ x = mx + 1, y = my, - -- class = "=", - id = "silver dagger", - buc = "blessed", - quantity = 1, - spe = "random" - }); -end - -for i = 1, 1000 do - des.object({ x = 40, y = 10, - -- class = "=", - id = "silver dagger", - buc = "blessed", - quantity = 1, - -- spe = "random" - }); -end - -end -- function test() From 32f2fdb135f20dcbee2ccc4d045208a62aaa5814 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 7 Nov 2019 19:40:41 +0200 Subject: [PATCH 174/529] Remove leftover level compiler header --- sys/share/lev_comp.h | 212 ------------------------------------------- 1 file changed, 212 deletions(-) delete mode 100644 sys/share/lev_comp.h diff --git a/sys/share/lev_comp.h b/sys/share/lev_comp.h deleted file mode 100644 index 1e3f16fa4..000000000 --- a/sys/share/lev_comp.h +++ /dev/null @@ -1,212 +0,0 @@ -#define CHAR 257 -#define INTEGER 258 -#define BOOLEAN 259 -#define PERCENT 260 -#define SPERCENT 261 -#define MINUS_INTEGER 262 -#define PLUS_INTEGER 263 -#define MAZE_GRID_ID 264 -#define SOLID_FILL_ID 265 -#define MINES_ID 266 -#define ROGUELEV_ID 267 -#define MESSAGE_ID 268 -#define MAZE_ID 269 -#define LEVEL_ID 270 -#define LEV_INIT_ID 271 -#define GEOMETRY_ID 272 -#define NOMAP_ID 273 -#define OBJECT_ID 274 -#define COBJECT_ID 275 -#define MONSTER_ID 276 -#define TRAP_ID 277 -#define DOOR_ID 278 -#define DRAWBRIDGE_ID 279 -#define object_ID 280 -#define monster_ID 281 -#define terrain_ID 282 -#define MAZEWALK_ID 283 -#define WALLIFY_ID 284 -#define REGION_ID 285 -#define FILLING 286 -#define IRREGULAR 287 -#define JOINED 288 -#define ALTAR_ID 289 -#define LADDER_ID 290 -#define STAIR_ID 291 -#define NON_DIGGABLE_ID 292 -#define NON_PASSWALL_ID 293 -#define ROOM_ID 294 -#define PORTAL_ID 295 -#define TELEPRT_ID 296 -#define BRANCH_ID 297 -#define LEV 298 -#define MINERALIZE_ID 299 -#define CORRIDOR_ID 300 -#define GOLD_ID 301 -#define ENGRAVING_ID 302 -#define FOUNTAIN_ID 303 -#define POOL_ID 304 -#define SINK_ID 305 -#define NONE 306 -#define RAND_CORRIDOR_ID 307 -#define DOOR_STATE 308 -#define LIGHT_STATE 309 -#define CURSE_TYPE 310 -#define ENGRAVING_TYPE 311 -#define DIRECTION 312 -#define RANDOM_TYPE 313 -#define RANDOM_TYPE_BRACKET 314 -#define A_REGISTER 315 -#define ALIGNMENT 316 -#define LEFT_OR_RIGHT 317 -#define CENTER 318 -#define TOP_OR_BOT 319 -#define ALTAR_TYPE 320 -#define UP_OR_DOWN 321 -#define SUBROOM_ID 322 -#define NAME_ID 323 -#define FLAGS_ID 324 -#define FLAG_TYPE 325 -#define MON_ATTITUDE 326 -#define MON_ALERTNESS 327 -#define MON_APPEARANCE 328 -#define ROOMDOOR_ID 329 -#define IF_ID 330 -#define ELSE_ID 331 -#define TERRAIN_ID 332 -#define HORIZ_OR_VERT 333 -#define REPLACE_TERRAIN_ID 334 -#define EXIT_ID 335 -#define SHUFFLE_ID 336 -#define QUANTITY_ID 337 -#define BURIED_ID 338 -#define LOOP_ID 339 -#define FOR_ID 340 -#define TO_ID 341 -#define SWITCH_ID 342 -#define CASE_ID 343 -#define BREAK_ID 344 -#define DEFAULT_ID 345 -#define ERODED_ID 346 -#define TRAPPED_STATE 347 -#define RECHARGED_ID 348 -#define INVIS_ID 349 -#define GREASED_ID 350 -#define FEMALE_ID 351 -#define CANCELLED_ID 352 -#define REVIVED_ID 353 -#define AVENGE_ID 354 -#define FLEEING_ID 355 -#define BLINDED_ID 356 -#define PARALYZED_ID 357 -#define STUNNED_ID 358 -#define CONFUSED_ID 359 -#define SEENTRAPS_ID 360 -#define ALL_ID 361 -#define MONTYPE_ID 362 -#define GRAVE_ID 363 -#define ERODEPROOF_ID 364 -#define FUNCTION_ID 365 -#define MSG_OUTPUT_TYPE 366 -#define COMPARE_TYPE 367 -#define UNKNOWN_TYPE 368 -#define rect_ID 369 -#define fillrect_ID 370 -#define line_ID 371 -#define randline_ID 372 -#define grow_ID 373 -#define selection_ID 374 -#define flood_ID 375 -#define rndcoord_ID 376 -#define circle_ID 377 -#define ellipse_ID 378 -#define filter_ID 379 -#define complement_ID 380 -#define gradient_ID 381 -#define GRADIENT_TYPE 382 -#define LIMITED 383 -#define HUMIDITY_TYPE 384 -#define STRING 385 -#define MAP_ID 386 -#define NQSTRING 387 -#define VARSTRING 388 -#define CFUNC 389 -#define CFUNC_INT 390 -#define CFUNC_STR 391 -#define CFUNC_COORD 392 -#define CFUNC_REGION 393 -#define VARSTRING_INT 394 -#define VARSTRING_INT_ARRAY 395 -#define VARSTRING_STRING 396 -#define VARSTRING_STRING_ARRAY 397 -#define VARSTRING_VAR 398 -#define VARSTRING_VAR_ARRAY 399 -#define VARSTRING_COORD 400 -#define VARSTRING_COORD_ARRAY 401 -#define VARSTRING_REGION 402 -#define VARSTRING_REGION_ARRAY 403 -#define VARSTRING_MAPCHAR 404 -#define VARSTRING_MAPCHAR_ARRAY 405 -#define VARSTRING_MONST 406 -#define VARSTRING_MONST_ARRAY 407 -#define VARSTRING_OBJ 408 -#define VARSTRING_OBJ_ARRAY 409 -#define VARSTRING_SEL 410 -#define VARSTRING_SEL_ARRAY 411 -#define METHOD_INT 412 -#define METHOD_INT_ARRAY 413 -#define METHOD_STRING 414 -#define METHOD_STRING_ARRAY 415 -#define METHOD_VAR 416 -#define METHOD_VAR_ARRAY 417 -#define METHOD_COORD 418 -#define METHOD_COORD_ARRAY 419 -#define METHOD_REGION 420 -#define METHOD_REGION_ARRAY 421 -#define METHOD_MAPCHAR 422 -#define METHOD_MAPCHAR_ARRAY 423 -#define METHOD_MONST 424 -#define METHOD_MONST_ARRAY 425 -#define METHOD_OBJ 426 -#define METHOD_OBJ_ARRAY 427 -#define METHOD_SEL 428 -#define METHOD_SEL_ARRAY 429 -#define DICE 430 -typedef union -{ - long i; - char *map; - struct { - long room; - long wall; - long door; - } corpos; - struct { - long area; - long x1; - long y1; - long x2; - long y2; - } lregn; - struct { - long x; - long y; - } crd; - struct { - long ter; - long lit; - } terr; - struct { - long height; - long width; - } sze; - struct { - long die; - long num; - } dice; - struct { - long cfunc; - char *varstr; - } meth; -} YYSTYPE; -extern YYSTYPE yylval; From f2d8ff49d5b01926092eb6df8adf5dbdb64871c7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 17:17:17 -0500 Subject: [PATCH 175/529] add vms lua build bits --- sys/vms/Makefile.src | 70 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 3 deletions(-) diff --git a/sys/vms/Makefile.src b/sys/vms/Makefile.src index 679ecf540..2b9610af3 100644 --- a/sys/vms/Makefile.src +++ b/sys/vms/Makefile.src @@ -1,5 +1,5 @@ # NetHack Makefile (VMS) - for building nethack itself. -# NetHack 3.6 Makefile.src $NHDT-Date: 1557701798 2019/05/12 22:56:38 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.36 $ +# NetHack 3.6 Makefile.src $NHDT-Date: 1573165004 2019/11/07 22:16:44 $ $NHDT-Branch: paxed-lua-v2-merged $:$NHDT-Revision: 1.38 $ # Copyright (c) 2011 by Robert Patrick Rankin # NetHack may be freely redistributed. See license for details. @@ -28,7 +28,8 @@ UTL = [-.util] VMS = [-.sys.vms] WINSHR = [-.win.share] X11 = [-.win.X11] - +#LUA source tree parallel to NetHack tree in lua535 directory +LUA = [-.-.lua535] MAKEFILE= $(SRC)Makefile. # if you are using gcc as your compiler: @@ -210,6 +211,29 @@ HOBJ6 = u_init.obj,uhitm.obj,vault.obj,vision.obj,vis_tab.obj,weapon.obj, \ HOBJ = $(FIRSTOBJ) $(SYSOBJ) $(WINOBJ) $(RANDOBJ) \ $(HOBJ1) $(HOBJ2) $(HOBJ3) $(HOBJ4) $(HOBJ5) $(HOBJ6) +LUAOBJ = nhlua.o,nhlsel.o +LUALIBSRC = $(LUA)lapi.c $(LUA)lauxlib.c $(LUA)lbaselib.c \ + $(LUA)lbitlib.c $(LUA)lcode.c $(LUA)lcorolib.c \ + $(LUA)lctype.c $(LUA)ldblib.c $(LUA)ldebug.c \ + $(LUA)ldo.c $(LUA)ldump.c $(LUA)lfunc.c $(LUA)lgc.c \ + $(LUA)linit.c $(LUA)liolib.c $(LUA)llex.c \ + $(LUA)lmathlib.c $(LUA)lmem.c $(LUA)loadlib.c \ + $(LUA)lobject.c $(LUA)lopcodes.c $(LUA)loslib.c \ + $(LUA)lparser.c $(LUA)lstate.c $(LUA)lstring.c \ + $(LUA)lstrlib.c $(LUA)ltable.c $(LUA)ltablib.c \ + $(LUA)ltm.c $(LUA)lundump.c $(LUA)lutf8lib.c \ + $(LUA)lvm.c $(LUA)lzio.c + +LUALIBOBJ1 = lapi.obj,lauxlib.obj,lbaselib.obj,lbitlib.obj, \ + lcode.obj,lcorolib.obj,lctype.obj,ldblib.obj +LUALIBOBJ2 = ldebug.obj,ldo.obj,ldump.obj,lfunc.obj, \ + lgc.obj,linit.obj,liolib.obj,llex.obj +LUALIBOBJ3 = lmathlib.obj,lmem.obj,loadlib.obj,lobject.obj, \ + lopcodes.obj,loslib.obj,lparser.obj,lstate.obj, +LUALIBOBJ4 = lstring.obj,lstrlib.obj,ltable.obj,ltablib.obj, \ + ltm.obj,lundump.obj,lutf8lib.obj,lvm.obj,lzio.obj +LUALIBOBJ = $(LUALIBOBJ1) $(LUALIBOBJ2) $(LUALIBOBJ3) $(LUALIBOBJ4) + # simpler target name nethack : $(GAME) @ $(ECHO) "nethack is up to date." @@ -217,7 +241,7 @@ nethack : $(GAME) $(GAME) : $(SYSTEM) @ $(NOOP) -$(SYSTEM) : $(LIBOPT) $(ID_OPT) $(HOBJ) nethack.opt +$(SYSTEM) : $(LIBOPT) $(ID_OPT) $(HOBJ) $(LUAOBJ) $(LUALIBOBJ) nethack.opt @ $(ECHO) "Linking ..." $(LINK)/Exe=$(GAME) $(LFLAGS) nethack.opt/Opt,$(LIBOPT)/Opt,$(ID_OPT)/Opt $(TOUCH) $(SYSTEM) @@ -239,6 +263,11 @@ nethack.opt : $(MAKEFILE) # this file @ write f f$edit("$(HOBJ4)","COLLAPSE") @ write f f$edit("$(HOBJ5)","COLLAPSE") @ write f f$edit("$(HOBJ6)","COLLAPSE") + @ write f f$edit("$(LUAOBJ)","COLLAPSE") + @ write f f$edit("$(LUALIBOBJ1)","COLLAPSE") + @ write f f$edit("$(LUALIBOBJ2)","COLLAPSE") + @ write f f$edit("$(LUALIBOBJ3)","COLLAPSE") + @ write f f$edit("$(LUALIBOBJ4)","COLLAPSE") @ write f "sys$library:starlet.olb/Include=(lib$initialize) @ write f "! psect_attributes Usr, noPic, and Long removed" @ write f "psect_attr=lib$initialize, Con,Rel,Gbl,noShr,noExe,Rd,noWrt" @@ -420,6 +449,41 @@ wintext.obj : $(X11)wintext.c $(HACK_H) $(INC)winX.h $(INC)xwindow.h winval.obj : $(X11)winval.c $(HACK_H) $(INC)winX.h tile.obj : $(SRC)tile.c $(HACK_H) vis_tab.obj : vis_tab.c $(CONFIG_H) $(INC)vis_tab.h +# lua 5.3.5 code +lapi.obj : $(LUA)lapi.c +lauxlib.obj : $(LUA)lauxlib.c +lbaselib.obj : $(LUA)lbaselib.c +lbitlib.obj : $(LUA)lbitlib.c +lcode.obj : $(LUA)lcode.c +lcorolib.obj : $(LUA)lcorolib.c +lctype.obj : $(LUA)lctype.c +ldblib.obj : $(LUA)ldblib.c +ldebug.obj : $(LUA)ldebug. +ldo.obj : $(LUA)ldo.c +ldump.obj : $(LUA)ldump.c +lfunc.obj : $(LUA)lfunc.c +lgc.obj : $(LUA)lgc.c +linit.obj : $(LUA)linit.c +liolib.obj : $(LUA)liolib.c +llex.obj : $(LUA)llex.c +lmathlib.obj : $(LUA)lmathlib.c +lmem.obj : $(LUA)lmem.c +loadlib.obj : $(LUA)loadlib.c +lobject.obj : $(LUA)lobject.c +lopcodes.obj : $(LUA)lopcodes.c +loslib.obj : $(LUA)loslib.c +lparser.obj : $(LUA)lparser.c +lstate.obj : $(LUA)lstate.c +lstring.obj : $(LUA)lstring.c +lstrlib.obj : $(LUA)lstrlib.c +ltable.obj : $(LUA)ltable.c +ltablib.obj : $(LUA)ltablib.c +ltm.obj : $(LUA)ltm.c +lundump.obj : $(LUA)lundump.c +lutf8lib.obj : $(LUA)lutf8lib.c +lvm.obj : $(LUA)lvm.c +lzio.obj : $(LUA)lzio.c + # general code allmain.obj : allmain.c $(HACK_H) alloc.obj : alloc.c $(CONFIG_H) From 39972beb0d915da6934f222be79b8ec5e2be4165 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 17:21:23 -0500 Subject: [PATCH 176/529] cut-and-paste error bit --- sys/vms/Makefile.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vms/Makefile.src b/sys/vms/Makefile.src index 2b9610af3..8f607eac2 100644 --- a/sys/vms/Makefile.src +++ b/sys/vms/Makefile.src @@ -229,7 +229,7 @@ LUALIBOBJ1 = lapi.obj,lauxlib.obj,lbaselib.obj,lbitlib.obj, \ LUALIBOBJ2 = ldebug.obj,ldo.obj,ldump.obj,lfunc.obj, \ lgc.obj,linit.obj,liolib.obj,llex.obj LUALIBOBJ3 = lmathlib.obj,lmem.obj,loadlib.obj,lobject.obj, \ - lopcodes.obj,loslib.obj,lparser.obj,lstate.obj, + lopcodes.obj,loslib.obj,lparser.obj,lstate.obj LUALIBOBJ4 = lstring.obj,lstrlib.obj,ltable.obj,ltablib.obj, \ ltm.obj,lundump.obj,lutf8lib.obj,lvm.obj,lzio.obj LUALIBOBJ = $(LUALIBOBJ1) $(LUALIBOBJ2) $(LUALIBOBJ3) $(LUALIBOBJ4) From 8d4ccf51112c0e7ce661fdce755b2ddd3278a951 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 17:28:57 -0500 Subject: [PATCH 177/529] attempt to add the additional include directory to vms build --- sys/vms/Makefile.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/vms/Makefile.src b/sys/vms/Makefile.src index 8f607eac2..2df916cfc 100644 --- a/sys/vms/Makefile.src +++ b/sys/vms/Makefile.src @@ -38,8 +38,8 @@ MAKEFILE= $(SRC)Makefile. # set option flags for C compiler and linker # -CFLAGS = /Prefix=All/Incl=$(INC)/noList # DECC in native mode -#CFLAGS = /Include=$(INC)/noList # VAXC or GNUC +CFLAGS = /Prefix=All/Incl=$(INC),$(LUA)/noList # DECC in native mode +#CFLAGS = /Include=$(INC),$(LUA)/noList # VAXC or GNUC #LFLAGS = /Debug/Map/Cross_Ref # for development #LFLAGS = /noTraceback/noMap # for installing w/ privs LFLAGS = /noMap From 4f654b630e74aaa87259e34617d92f63d3dd01cb Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 17:30:55 -0500 Subject: [PATCH 178/529] src and include are down 1 level in src subfolder of lua tree --- sys/vms/Makefile.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vms/Makefile.src b/sys/vms/Makefile.src index 2df916cfc..957335710 100644 --- a/sys/vms/Makefile.src +++ b/sys/vms/Makefile.src @@ -29,7 +29,7 @@ VMS = [-.sys.vms] WINSHR = [-.win.share] X11 = [-.win.X11] #LUA source tree parallel to NetHack tree in lua535 directory -LUA = [-.-.lua535] +LUA = [-.-.lua535.src] MAKEFILE= $(SRC)Makefile. # if you are using gcc as your compiler: From 526458999406df3b561a153e4af179923144c5b6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 17:47:26 -0500 Subject: [PATCH 179/529] comment out unneeded levcomp and dgncomp bits on vms 3.7 build --- sys/vms/Makefile.utl | 148 +++++++++++++++++++++---------------------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/sys/vms/Makefile.utl b/sys/vms/Makefile.utl index 88ff37c29..0766930c8 100644 --- a/sys/vms/Makefile.utl +++ b/sys/vms/Makefile.utl @@ -27,8 +27,8 @@ WINSHR = [-.win.share] WINX11 = [-.win.X11] # targets, with enough punctuation to keep MCR and DELETE happy MAKEDEFS= $(UTL)makedefs.exe; -LEVCOMP = $(UTL)lev_comp.exe; -DGNCOMP = $(UTL)dgn_comp.exe; +#LEVCOMP = $(UTL)lev_comp.exe; +#DGNCOMP = $(UTL)dgn_comp.exe; DLB = $(UTL)dlb.exe; RECOVER = $(UTL)recover.exe; # used by $(DAT)Makefile for synchronization @@ -62,17 +62,17 @@ LINK = link # # yacc/lex programs to use to generate *_comp.c, *_comp.h, and *_lex.c. # choose xxxOUT that matches xxx tool's output -YACC = bison /Define -LEX = flex +#YACC = bison /Define +#LEX = flex #YACC = yacc -d #LEX = lex #YACC = posix/Run posix$bin:yacc. "-d #LEX = posix/Run posix$bin:lex. " # blank means foo.y -> foo_tab.c & foo_tab.h -YACCOUT = # bison +#YACCOUT = # bison #YACCOUT = ytab # VMS POSIX #YACCOUT = y_tab # DEC/Shell -LEXOUT = lexyy # flex +#LEXOUT = lexyy # flex #LEXOUT = lex_yy # VMS POSIX @@ -88,8 +88,8 @@ HACK_H = $(SRC)hack.h-t # utility .c files MAKESRC = makedefs.c -SPLEVSRC = lev_yacc.c lev_lex.c lev_main.c -DGNCOMPSRC = dgn_yacc.c dgn_lex.c dgn_main.c +#SPLEVSRC = lev_yacc.c lev_lex.c lev_main.c +#DGNCOMPSRC = dgn_yacc.c dgn_lex.c dgn_main.c RECOVSRC = recover.c DLBSRC = dlb_main.c UTILSRCS = $(MAKESRC) $(SPLEVSRC) $(DGNCOMPSRC) $(RECOVSRC) $(DLBSRC) panic.c @@ -105,11 +105,11 @@ NAMEOBJS = $(NAMEOBJ1),$(NAMEOBJ2) MAKEOBJS = makedefs.obj,$(NAMEOBJ1) # object files for special levels compiler -SPLEVOBJS = lev_main.obj,lev_yacc.obj,lev_lex.obj,panic.obj,\ - $(SRC)alloc.obj,$(NAMEOBJS) +#SPLEVOBJS = lev_main.obj,lev_yacc.obj,lev_lex.obj,panic.obj,\ +# $(SRC)alloc.obj,$(NAMEOBJS) # object files for dungeon compiler -DGNCOMPOBJS = dgn_main.obj,dgn_yacc.obj,dgn_lex.obj,panic.obj,$(SRC)alloc.obj +#DGNCOMPOBJS = dgn_main.obj,dgn_yacc.obj,dgn_lex.obj,panic.obj,$(SRC)alloc.obj # object files for recovery utility RECOVOBJS = recover.obj @@ -138,10 +138,10 @@ no_lex : # alternate target names for possible interactive use makedefs : $(MAKEDEFS) @ $(ECHO) "makedefs is up to date." -lev_comp : $(LEVCOMP) - @ $(ECHO) "lev_comp is up to date." -dgn_comp : $(DGNCOMP) - @ $(ECHO) "dgn_comp is up to date." +#lev_comp : $(LEVCOMP) +# @ $(ECHO) "lev_comp is up to date." +#dgn_comp : $(DGNCOMP) +# @ $(ECHO) "dgn_comp is up to date." recover : $(RECOVER) @ $(ECHO) "recover is up to date." dlb : $(DLB) @@ -187,66 +187,66 @@ $(INC)date.h : $(MAKEDEFS) # dependencies for lev_comp # -$(LEVCOMP) : $(SPLEVOBJS) $(VMSOBJS) $(LIBOPT) $(ID_OPT) - $(LINK)/Exe=$(LEVCOMP) $(LFLAGS) $(SPLEVOBJS),$(VMSOBJS),$(LIBS) - -lev_yacc.obj : $(HACK_H) $(INC)sp_lev.h lev_yacc.c - $(CC) $(CFLAGS) lev_yacc.c -lev_lex.obj : $(HACK_H) $(INC)lev_comp.h $(INC)sp_lev.h lev_lex.c - @ if f$search("lev_lex.h").nes."" then $(MOVE) lev_lex.h stdio.h - $(CC) $(CFLAGS) lev_lex.c - @ if f$search("stdio.h").nes."" then $(MOVE) stdio.h lev_lex.h -lev_main.obj : $(HACK_H) $(INC)sp_lev.h $(INC)tcap.h $(INC)date.h lev_main.c - $(CC) $(CFLAGS) lev_main.c +#$(LEVCOMP) : $(SPLEVOBJS) $(VMSOBJS) $(LIBOPT) $(ID_OPT) +# $(LINK)/Exe=$(LEVCOMP) $(LFLAGS) $(SPLEVOBJS),$(VMSOBJS),$(LIBS) +# +#lev_yacc.obj : $(HACK_H) $(INC)sp_lev.h lev_yacc.c +# $(CC) $(CFLAGS) lev_yacc.c +#lev_lex.obj : $(HACK_H) $(INC)lev_comp.h $(INC)sp_lev.h lev_lex.c +# @ if f$search("lev_lex.h").nes."" then $(MOVE) lev_lex.h stdio.h +# $(CC) $(CFLAGS) lev_lex.c +# @ if f$search("stdio.h").nes."" then $(MOVE) stdio.h lev_lex.h +#lev_main.obj : $(HACK_H) $(INC)sp_lev.h $(INC)tcap.h $(INC)date.h lev_main.c +# $(CC) $(CFLAGS) lev_main.c panic.obj : $(CONFIG_H) $(CC) $(CFLAGS) panic.c -$(INC)lev_comp.h : lev_yacc.c - $(TOUCH) $(INC)lev_comp.h - -lev_yacc.c : lev_comp.y - $(YACC) lev_comp.y - $(MUNG) 'f$parse("$(YACCOUT)","lev_comp_tab.c")' "#module" /Outp=lev_yacc.c - @ if f$search("''f$parse("$(YACCOUT)","lev_comp_tab.c")'").nes."" then \ - $(RM) 'f$parse("$(YACCOUT)","lev_comp_tab.c")' - $(MOVE) 'f$parse("$(YACCOUT)","lev_comp_tab.h")' $(INC)lev_comp.h - -lev_lex.c : lev_comp.l - $(LEX) lev_comp.l - $(MUNG) 'f$parse("$(LEXOUT)","lev_comp_lex.c")' "#module" /Outp=lev_lex.c - @ if f$search("''f$parse("$(LEXOUT)","lev_comp_lex.c")'").nes."" then \ - $(RM) 'f$parse("$(LEXOUT)","lev_comp_lex.c")' - +#$(INC)lev_comp.h : lev_yacc.c +# $(TOUCH) $(INC)lev_comp.h +#lev_yacc.c : lev_comp.y +# $(YACC) lev_comp.y +# $(MUNG) 'f$parse("$(YACCOUT)","lev_comp_tab.c")' "#module" /Outp=lev_yacc.c +# @ if f$search("''f$parse("$(YACCOUT)","lev_comp_tab.c")'").nes."" then \ +# $(RM) 'f$parse("$(YACCOUT)","lev_comp_tab.c")' +# $(MOVE) 'f$parse("$(YACCOUT)","lev_comp_tab.h")' $(INC)lev_comp.h +# +#lev_lex.c : lev_comp.l +# $(LEX) lev_comp.l +# $(MUNG) 'f$parse("$(LEXOUT)","lev_comp_lex.c")' "#module" /Outp=lev_lex.c +# @ if f$search("''f$parse("$(LEXOUT)","lev_comp_lex.c")'").nes."" then \ +# $(RM) 'f$parse("$(LEXOUT)","lev_comp_lex.c")' +# +# # dependencies for dgn_comp # -$(DGNCOMP) : $(DGNCOMPOBJS) $(VMSOBJS) $(LIBOPT) $(ID_OPT) - $(LINK)/Exe=$(DGNCOMP) $(LFLAGS) $(DGNCOMPOBJS),$(VMSOBJS),$(LIBS) - -dgn_yacc.obj : $(CONFIG_H) $(INC)dgn_file.h $(INC)date.h dgn_yacc.c - $(CC) $(CFLAGS) dgn_yacc.c -dgn_lex.obj : $(CONFIG_H) $(INC)dgn_comp.h $(INC)dgn_file.h dgn_lex.c - @ if f$search("lev_lex.h").nes."" then $(MOVE) lev_lex.h stdio.h - $(CC) $(CFLAGS) dgn_lex.c - @ if f$search("stdio.h").nes."" then $(MOVE) stdio.h lev_lex.h -dgn_main.obj : $(CONFIG_H) dgn_main.c - $(CC) $(CFLAGS) dgn_main.c - -$(INC)dgn_comp.h : dgn_yacc.c - $(TOUCH) $(INC)dgn_comp.h - -dgn_yacc.c : dgn_comp.y - $(YACC) dgn_comp.y - $(MUNG) 'f$parse("$(YACCOUT)","dgn_comp_tab.c")' "#module" /Outp=dgn_yacc.c - @ if f$search("''f$parse("$(YACCOUT)","dgn_comp_tab.c")'").nes."" then \ - $(RM) 'f$parse("$(YACCOUT)","dgn_comp_tab.c")' - $(MOVE) 'f$parse("$(YACCOUT)","dgn_comp_tab.h")' $(INC)dgn_comp.h - -dgn_lex.c : dgn_comp.l - $(LEX) dgn_comp.l - $(MUNG) 'f$parse("$(LEXOUT)","dgn_comp_lex.c")' "#module" /Outp=dgn_lex.c - @ if f$search("''f$parse("$(LEXOUT)","dgn_comp_lex.c")'").nes."" then \ - $(RM) 'f$parse("$(LEXOUT)","dgn_comp_lex.c")' +#$(DGNCOMP) : $(DGNCOMPOBJS) $(VMSOBJS) $(LIBOPT) $(ID_OPT) +# $(LINK)/Exe=$(DGNCOMP) $(LFLAGS) $(DGNCOMPOBJS),$(VMSOBJS),$(LIBS) +# +#dgn_yacc.obj : $(CONFIG_H) $(INC)dgn_file.h $(INC)date.h dgn_yacc.c +# $(CC) $(CFLAGS) dgn_yacc.c +#dgn_lex.obj : $(CONFIG_H) $(INC)dgn_comp.h $(INC)dgn_file.h dgn_lex.c +# @ if f$search("lev_lex.h").nes."" then $(MOVE) lev_lex.h stdio.h +# $(CC) $(CFLAGS) dgn_lex.c +# @ if f$search("stdio.h").nes."" then $(MOVE) stdio.h lev_lex.h +#dgn_main.obj : $(CONFIG_H) dgn_main.c +# $(CC) $(CFLAGS) dgn_main.c +# +#$(INC)dgn_comp.h : dgn_yacc.c +# $(TOUCH) $(INC)dgn_comp.h +# +#dgn_yacc.c : dgn_comp.y +# $(YACC) dgn_comp.y +# $(MUNG) 'f$parse("$(YACCOUT)","dgn_comp_tab.c")' "#module" /Outp=dgn_yacc.c +# @ if f$search("''f$parse("$(YACCOUT)","dgn_comp_tab.c")'").nes."" then \ +# $(RM) 'f$parse("$(YACCOUT)","dgn_comp_tab.c")' +# $(MOVE) 'f$parse("$(YACCOUT)","dgn_comp_tab.h")' $(INC)dgn_comp.h +# +#dgn_lex.c : dgn_comp.l +# $(LEX) dgn_comp.l +# $(MUNG) 'f$parse("$(LEXOUT)","dgn_comp_lex.c")' "#module" /Outp=dgn_lex.c +# @ if f$search("''f$parse("$(LEXOUT)","dgn_comp_lex.c")'").nes."" then \ +# $(RM) 'f$parse("$(LEXOUT)","dgn_comp_lex.c")' # dependencies for recover @@ -363,13 +363,13 @@ clean : - if f$search("*.obj") .nes."" then $(RM) *.obj; spotless : clean - - if f$search("%%%_lex.c") .nes."" then $(RM) %%%_lex.c; - - if f$search("%%%_yacc.c").nes."" then $(RM) %%%_yacc.c; - - if f$search("$(INC)%%%_comp.h").nes."" then $(RM) $(INC)%%%_comp.h;* +# - if f$search("%%%_lex.c") .nes."" then $(RM) %%%_lex.c; +# - if f$search("%%%_yacc.c").nes."" then $(RM) %%%_yacc.c; +# - if f$search("$(INC)%%%_comp.h").nes."" then $(RM) $(INC)%%%_comp.h;* - if f$search("$(INC)tile.h").nes."" then $(RM) $(INC)tile.h;* - - if f$search("lev_lex.h") .nes."" then $(RM) lev_lex.h; +# - if f$search("lev_lex.h") .nes."" then $(RM) lev_lex.h; - if f$search("*tab.c") .nes."" then $(RM) *tab.c; - if f$search("*.exe").nes."" then \ - $(RM) $(MAKEDEFS),$(LEVCOMP),$(DGNCOMP),$(RECOVER),$(DLB) + $(RM) $(MAKEDEFS),$(RECOVER),$(DLB) - if f$search("*.exe").nes."" then $(RM) $(TILEUTILS) - if f$search("$(MARKER)").nes."" then $(RM) $(MARKER) From 40c8c6894b98216a406c3511e06fa1c1b28ee8bf Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 18:34:51 -0500 Subject: [PATCH 180/529] move vms lua support bits (untested of course) --- sys/vms/Makefile.dat | 75 ++++++++++++++++++++++---------------------- sys/vms/install.com | 63 ++++++++++++++++++++++++------------- 2 files changed, 79 insertions(+), 59 deletions(-) diff --git a/sys/vms/Makefile.dat b/sys/vms/Makefile.dat index e74eb95be..11e7e41c6 100644 --- a/sys/vms/Makefile.dat +++ b/sys/vms/Makefile.dat @@ -18,35 +18,36 @@ WINSHR = [-.win.share] WINX11 = [-.win.X11] # utilities; must match Makefile.utl in spelling and punctuation MAKEDEFS = $(UTL)makedefs.exe; -LEVCOMP = $(UTL)lev_comp.exe; -DGNCOMP = $(UTL)dgn_comp.exe; +#LEVCOMP = $(UTL)lev_comp.exe; +#DGNCOMP = $(UTL)dgn_comp.exe; DLB = $(UTL)dlb.exe; TILE2X11 = $(UTL)tile2x11.exe; UTILMARKER = $(UTL)util.timestamp; # note: filespecs have enough punctuation to satisfy DELETE -MARKERS = spec_levs.timestamp;,quest_levs.timestamp; +#MARKERS = spec_levs.timestamp;,quest_levs.timestamp; VARDAT = data.;,rumors.;,quest.dat;,oracles.;,options.;,\ engrave.;,epitaph.;,bogusmon.; -DUNGEON = dungeon.; +#DUNGEON = dungeon.; X11TILES= x11tiles.; # note: the level lists need to be space separated for use as-is by $(LEVCOMP) -QUESTLEVS = Arch.des Barb.des Caveman.des Healer.des Knight.des \ - Monk.des Priest.des Ranger.des Rogue.des Samurai.des Tourist.des \ - Valkyrie.des Wizard.des -SPECLEVS = bigroom.des castle.des endgame.des gehennom.des knox.des \ - medusa.des mines.des oracle.des sokoban.des tower.des yendor.des +#QUESTLEVS = Arch.des Barb.des Caveman.des Healer.des Knight.des \ +# Monk.des Priest.des Ranger.des Rogue.des Samurai.des Tourist.des \ +# Valkyrie.des Wizard.des +#SPECLEVS = bigroom.des castle.des endgame.des gehennom.des knox.des \ +# medusa.des mines.des oracle.des sokoban.des tower.des yendor.des -all : $(VARDAT) $(DUNGEON) $(MARKERS) $(DLB) +#all : $(VARDAT) $(DUNGEON) $(MARKERS) $(DLB) +all : $(VARDAT) $(DLB) @ $(ECHO) "data files are up to date." # these are convenience targets for "manual" interactive use -spec_levs : spev_levs.timestamp - @ $(ECHO) "special levels are up to date." -quest_levs : quest_levs.timestamp - @ $(ECHO) "quest levels are up to date." -dungeon : $(DUNGEON) - @ $(ECHO) "dungeon is up to date." +#spec_levs : spev_levs.timestamp +# @ $(ECHO) "special levels are up to date." +#quest_levs : quest_levs.timestamp +# @ $(ECHO) "quest levels are up to date." +#dungeon : $(DUNGEON) +# @ $(ECHO) "dungeon is up to date." data : data.; @ $(NOOP) rumors : rumors.; @@ -71,15 +72,15 @@ $(MAKEDEFS) : $(UTILMARKER) $(MAKE)$(MAKEFLAGS) $(MAKEDEFS) @ $(CD) $(DAT) -$(DGNCOMP) : $(UTILMARKER) - $(CD) $(UTL) - $(MAKE)$(MAKEFLAGS) $(DGNCOMP) - @ $(CD) $(DAT) +#$(DGNCOMP) : $(UTILMARKER) +# $(CD) $(UTL) +# $(MAKE)$(MAKEFLAGS) $(DGNCOMP) +# @ $(CD) $(DAT) -$(LEVCOMP) : $(UTILMARKER) - $(CD) $(UTL) - $(MAKE)$(MAKEFLAGS) $(LEVCOMP) - @ $(CD) $(DAT) +#$(LEVCOMP) : $(UTILMARKER) +# $(CD) $(UTL) +# $(MAKE)$(MAKEFLAGS) $(LEVCOMP) +# @ $(CD) $(DAT) $(DLB) : $(UTILMARKER) $(CD) $(UTL) @@ -122,27 +123,27 @@ oracles.; : oracles.txt $(MAKEDEFS) options.; : $(MAKEDEFS) $(RUN) $(MAKEDEFS) -v -spec_levs.timestamp; : $(SPECLEVS) $(LEVCOMP) - $(RUN) $(LEVCOMP) $(SPECLEVS) - $(TOUCH) spec_levs.timestamp; +#spec_levs.timestamp; : $(SPECLEVS) $(LEVCOMP) +# $(RUN) $(LEVCOMP) $(SPECLEVS) +# $(TOUCH) spec_levs.timestamp; -quest_levs.timestamp; : $(QUESTLEVS) $(LEVCOMP) - $(RUN) $(LEVCOMP) $(QUESTLEVS) - $(TOUCH) quest_levs.timestamp; +#quest_levs.timestamp; : $(QUESTLEVS) $(LEVCOMP) +# $(RUN) $(LEVCOMP) $(QUESTLEVS) +# $(TOUCH) quest_levs.timestamp; -$(DUNGEON) : dungeon.def $(MAKEDEFS) $(DGNCOMP) - $(RUN) $(MAKEDEFS) -e !dungeon.def -> dungeon.pdf - $(RUN) $(DGNCOMP) dungeon.pdf !dungeon.pdr -> dungeon +#$(DUNGEON) : dungeon.def $(MAKEDEFS) $(DGNCOMP) +# $(RUN) $(MAKEDEFS) -e !dungeon.def -> dungeon.pdf +# $(RUN) $(DGNCOMP) dungeon.pdf !dungeon.pdr -> dungeon clean : - if f$search("*.*;-1").nes."" then purge - - if f$search("dungeon.pdf").nes."" then delete dungeon.pdf; - - if f$search("*.timestamp").nes."" then delete $(MARKERS) +# - if f$search("dungeon.pdf").nes."" then delete dungeon.pdf; +# - if f$search("*.timestamp").nes."" then delete $(MARKERS) spotless : clean - delete $(VARDAT) - - if f$search("$(DUNGEON)").nes."" then delete $(DUNGEON) - - if f$search("*.lev").nes."" then delete *.lev; +# - if f$search("$(DUNGEON)").nes."" then delete $(DUNGEON) +# - if f$search("*.lev").nes."" then delete *.lev; - if f$search("$(X11TILES)").nes."" then delete $(X11TILES) - if f$search("*.x%m").nes."" then delete *.x%m; !*.xbm,*.xpm - if f$search("nh*.dlb").nes."" then delete nh*.dlb; diff --git a/sys/vms/install.com b/sys/vms/install.com index eecbca319..c6560387e 100755 --- a/sys/vms/install.com +++ b/sys/vms/install.com @@ -35,21 +35,40 @@ $ sysconf_file = "[.sys.vms]sysconf" $ guidebook = "[.doc]Guidebook.txt" $ invoc_proc = "[.sys.vms]nethack.com" $ trmcp_file = "[.sys.share]termcap" -$ spec_files = "AIR.LEV,ASMODEUS.LEV,ASTRAL.LEV,BAALZ.LEV,BIGRM-%.LEV," - - + "CASTLE.LEV,EARTH.LEV,FAKEWIZ%.LEV,FIRE.LEV," - - + "JUIBLEX.LEV,KNOX.LEV,MEDUSA-%.LEV,MINEFILL.LEV," - - + "MINETN-%.LEV,MINEND-%.LEV,ORACLE.LEV,ORCUS.LEV," - - + "SANCTUM.LEV,SOKO%-%.LEV,TOWER%.LEV,VALLEY.LEV," - - + "WATER.LEV,WIZARD%.LEV" -$ spec_input = "bigroom.des castle.des endgame.des " - - + "gehennom.des knox.des medusa.des mines.des " - - + "oracle.des sokoban.des tower.des yendor.des" -$ qstl_files = "%%%-GOAL.LEV,%%%-FIL%.LEV,%%%-LOCA.LEV,%%%-STRT.LEV" -$ qstl_input = "Arch.des Barb.des Caveman.des Healer.des " - - + "Knight.des Monk.des Priest.des Ranger.des Rogue.des " - - + "Samurai.des Tourist.des Wizard.des Valkyrie.des" -$ dngn_files = "DUNGEON." -$ dngn_input = "dungeon.pdf" +$ spec_files = "air.lua,asmodeus.lua,astral.lua,baalz.lua," - + + "bigrm-1.lua,bigrm-2.lua,bigrm-3.lua,bigrm-4.lua," - + + "bigrm-5.lua,bigrm-6.lua,bigrm-7.lua,bigrm-8.lua," - + + "bigrm-9.lua,bigrm-10.lua,castle.lua,earth.lua," - + + "fakewiz1.lua,fakewiz2.lua,fire.lua,juiblex.lua," - + + "knox.lua,medusa-1.lua,medusa-2.lua,medusa-3.lua," - + + "medusa-4.lua,minefill.lua,minend-1.lua," - + + "minend-2.lua,minend-3.lua,minetn-1.lua," - + + "minetn-2.lua,minetn-3.lua,minetn-4.lua," - + + "minetn-5.lua,minetn-6.lua,minetn-7.lua,nhlib.lua," - + + "oracle.lua,orcus.lua,sanctum.lua,soko1-1.lua," - + + "soko1-2.lua,soko2-1.lua,soko2-2.lua,soko3-1.lua," - + + "soko3-2.lua,soko4-1.lua,soko4-2.lua,tower1.lua," - + + "tower2.lua,tower3.lua,valley.lua,water.lua," - + + "wizard1.lua,wizard2.lua,wizard3.lua" +$ qstl_files = "%%%-goal.lua,%%%-fil%.lua,%%%-loca.lua,%%%-strt.lua" +$ dngn_files = "dungeon.lua" +$! +$! spec_files = "AIR.LEV,ASMODEUS.LEV,ASTRAL.LEV,BAALZ.LEV,BIGRM-%.LEV," - +$! + "CASTLE.LEV,EARTH.LEV,FAKEWIZ%.LEV,FIRE.LEV," - +$! + "JUIBLEX.LEV,KNOX.LEV,MEDUSA-%.LEV,MINEFILL.LEV," - +$! + "MINETN-%.LEV,MINEND-%.LEV,ORACLE.LEV,ORCUS.LEV," - +$! + "SANCTUM.LEV,SOKO%-%.LEV,TOWER%.LEV,VALLEY.LEV," - +$! + "WATER.LEV,WIZARD%.LEV" +$! spec_input = "bigroom.des castle.des endgame.des " - +$! + "gehennom.des knox.des medusa.des mines.des " - +$! + "oracle.des sokoban.des tower.des yendor.des" +$! qstl_files = "%%%-GOAL.LEV,%%%-FIL%.LEV,%%%-LOCA.LEV,%%%-STRT.LEV" +$! qstl_input = "Arch.des Barb.des Caveman.des Healer.des " - +$! + "Knight.des Monk.des Priest.des Ranger.des Rogue.des " - +$! + "Samurai.des Tourist.des Wizard.des Valkyrie.des" +$! dngn_files = "DUNGEON." +$! dngn_input = "dungeon.pdf" +$! $ dlb_files = help_files + "," + data_files + "," - + spec_files + "," + qstl_files + "," + dngn_files $ data_libry = "nh-data.dlb" @@ -91,15 +110,15 @@ $ makedefs -h !oracles.txt -> oracles $ milestone "(dungeon preprocess)" $ makedefs -s $ milestone "(engrave, epitaph, bogusmon)" -$ makedefs -e !dungeon.def -> dungeon.pdf -$ milestone "(quest text)" +$! makedefs -e !dungeon.def -> dungeon.pdf +$! milestone "(quest text)" $ makedefs -q !quest.txt -> quest.dat $ milestone "(special levels)" -$ lev_comp 'spec_input' !special levels -$ milestone "(quest levels)" -$ lev_comp 'qstl_input' !quest levels -$ milestone "(dungeon compile)" -$ dgn_comp 'dngn_input' !dungeon database +$! lev_comp 'spec_input' !special levels +$! milestone "(quest levels)" +$! lev_comp 'qstl_input' !quest levels +$! milestone "(dungeon compile)" +$! dgn_comp 'dngn_input' !dungeon database $ set default [-] !move up $ if p3.nes."" .and. f$edit(p3,"UPCASE").nes."DATA_PLUS_DLB" then exit $ From ed3a87a07824fe07dc4b5520485860ade82ca8e7 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 7 Nov 2019 16:10:55 -0800 Subject: [PATCH 181/529] more Guidebook tweaks Expand the sample configuration file a little and prevent it from going past the right margin in Guidebook.txt. Replace all instances of "config file" with "configuration file". Reformat the "notes" at the end of the table of map symbols. Unfortunately Guidebook.pdf from Guidebook.ps from Guidebook.mn puts a page break between the header line "notes" and the two actual notes. Value 1 for 'mouse_support' was not just exceeding the margin of Guidebook.txt but wrapping to the next line. Shorten it. Guidebook.tex had a typo "in the foler" (where 'folder' was meant) and Guidebook.mn didn't have that phrase at all. Remove a few trailing spaces. --- doc/Guidebook.mn | 87 +++++++++++++++++++++++++++------------------- doc/Guidebook.tex | 88 +++++++++++++++++++++++++---------------------- 2 files changed, 99 insertions(+), 76 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 622ab30fc..425fe413f 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.325 $ $NHDT-Date: 1572735924 2019/11/02 23:05:24 $ +.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.329 $ $NHDT-Date: 1573171723 2019/11/08 00:08:43 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -2625,7 +2625,7 @@ and Mac OS X it is \(lq.nethackrc\(rq in the user's home directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor. .pg -On Windows, it is \(lq.nethackrc\(rq in +On Windows, it is \(lq.nethackrc\(rq in the folder \(lq\\%USERPROFILE%\\NetHack\\3.6\(rq. The file may not exist, but it is a normal ASCII text file can can be created with any text editor. @@ -2775,26 +2775,38 @@ Example: .sd \f(CRWIZKIT=\(ti/wizkit.txt\fP \" \(ti == '~' .ed -.lp "" -.pg \" this would look better outdented -Here is a short example of config file contents: -.sd +. +.pg +\ \" dummy paragraph to force some separation [.BR isn't working as intended] +.pg +.SD n \" suppress indentation +Here is an example of configuration file contents: +.ED +.\" [conditional indentation; see description of NETHACKOPTIONS below] +.ds sD i \" assume proportional, indentation acceptable and preferred +.\" Check for fixed-width font; 'f' will be same width as 'F'. +.if (\w'f'p)=(\w'F'p) .ds sD n \" if same width, suppress indentation +.SD \*(sD \" string variable sD will expand to either 'i' or 'n' .ft CR \" set font to constant-width Roman # Set your character's role, race, gender, and alignment. OPTIONS=role:Valkyrie, race:Human, gender:female, align:lawful # # Turn on autopickup, set automatically picked up object types OPTIONS=autopickup,pickup_types:$"=/!?+ -# Show colored text if possible -OPTIONS=color -# Show lit corridors differently -OPTIONS=lit_corridor +# +# Map customization +OPTIONS=color # Display things in color if possible +OPTIONS=lit_corridor # Show lit corridors differently +OPTIONS=hilite_pet,hilite_pile +# Replace small punctuation (tick marks) with digits +SYMBOLS=S_boulder:0,S_golem:7 # # No startup splash screen. Windows GUI only. OPTIONS=!splash_screen .ft \" revert to previous font -.ed -.BR 2 +.ED +.pg +\ \" another dummy paragraph [.BR 2] .hn 2 Using the NETHACKOPTIONS environment variable .pg @@ -3195,7 +3207,7 @@ Valid settings are: .sd .si .CC 0 "disabled" -.CC 1 "enabled and make OS adjustments to support mouse use in the game" +.CC 1 "enabled and make OS adjustments to support mouse use" .CC 2 "like 1 but does not make any OS adjustments" .ei .ed @@ -3612,7 +3624,7 @@ used to customize and change the characteristics of the windowtype that you have chosen. Character strings that are too long may be truncated. Not all window ports will adjust for all settings listed -here. You can safely add any of these options to your config +here. You can safely add any of these options to your configuration file, and if the window port is capable of adjusting to suit your preferences, it will attempt to do so. If it can't it will silently ignore it. You can find out if an @@ -3811,7 +3823,8 @@ May be used to alter the value of keystrokes that the operating system returns to NetHack to help compensate for international keyboard issues. OPTIONS=subkeyvalue:171/92 will return 92 to NetHack, if 171 was originally going to be returned. -You can use multiple subkeyvalue statements in the config file if needed. +You can use multiple subkeyvalue statements in the configuration file +if needed. Cannot be set with the \(oqO\(cq command. .lp video Set the video mode used (PC NetHack only). @@ -3875,12 +3888,12 @@ character in the pattern, specifically: .ed The .op autopickup_exception -rules are processed in the order in which they appear in your config file, -thus allowing a later rule to override an earlier rule. +rules are processed in the order in which they appear in your configuration +file, thus allowing a later rule to override an earlier rule. .lp "" Exceptions can be set with the \(oqO\(cq command, but because they are not -included in your config file, they won't be in effect if you save and then -restore your game. +included in your configuration file, they won't be in effect if you save +and then restore your game. .op autopickup_exception rules and not saved with the game. .\" end of ``.lp autopickup_exception'' entry; continue enclosing page... @@ -3923,8 +3936,8 @@ You can bind multiple keys to the same extended command. Unbind a key by using \(lqnothing\(rq as the extended command to bind to. You can also bind the \(lq\(rq, \(lq\(rq, and \(lq\(rq keys. .lp "Menu accelerator keys" -The menu control or accelerator keys can also be rebound via OPTIONS-lines -in the config file. +The menu control or accelerator keys can also be rebound via OPTIONS lines +in the configuration file. You cannot bind object symbols into menu accelerators. .lp "Special command keys" Below are the special commands you can rebind. @@ -4083,7 +4096,7 @@ Configuring Message Types You can change the way the messages are shown in the message area, when the message matches a user-defined pattern. .pg -In general, the config file entries to configure the message types +In general, the configuration file entries to describe the message types look like this: .si MSGTYPE=type "pattern" @@ -4123,16 +4136,17 @@ the user is prompted with more-prompt, and a message matching .\" historical trivia: "You displaced Fido." was the sort of message you .\" got when swapping places with your pet, but that was changed long ago... .lp "" -The order of the defined MSGTYPE-lines is important; the last matching +The order of the defined MSGTYPE lines is important; the last matching rule is used. Put the general case first, exceptions below them. .hn 2 Configuring Menu Colors .pg Some platforms allow you to define colors used in menu lines when the -line matches a user-defined pattern. At this time the tty, win32tty and -win32gui support this. +line matches a user-defined pattern. +At this time the tty, curses, win32tty and +win32gui interfaces support this. .pg -In general, the config file entries to configure the menu color mappings +In general, the configuration file entries to describe the menu color mappings look like this: .si .lp MENUCOLOR="pattern"=color&attribute @@ -4175,8 +4189,8 @@ in it will be shown in green color, lines with \(lq\ cursed\ \(rq will be shown in red, and lines with \(lq\ cursed\ \(rq followed by \(lq(being worn)\(rq on the same line will be shown in red color and underlined. -You can have multiple MENUCOLOR entries in your config file, -and the last MENUCOLOR-line in your config file that matches +You can have multiple MENUCOLOR entries in your configuration file, +and the last MENUCOLOR line that matches a menu line will be used for the line. .pg Note that if you intend to have one or more color specifications match @@ -4192,7 +4206,7 @@ that matches a user-defined pattern is delivered to the message window. At this time the Qt port and the win32tty and win32gui ports support the use of user sounds. .pg -The following config file entries are relevant to mapping user sounds +The following configuration file entries are relevant to mapping user sounds to messages: .lp SOUNDDIR The directory that houses the sound files to be played. @@ -4361,7 +4375,7 @@ is tested; the character's name is ignored. .ei .pg The in-game options menu can help you determine the correct syntax for a -config file. +configuration file. .pg The whole feature can be disabled by setting option .op statushilites @@ -4397,7 +4411,7 @@ Set the name of the symbol set that you want to load for display on the rogue level. .pg You can also override one or more symbols using the SYMBOLS and -ROGUESYMBOLS config file options. +ROGUESYMBOLS configuration file options. Symbols are specified as name:value pairs. Note that NetHack escape-processes the value string in conventional C fashion. @@ -4607,11 +4621,13 @@ z S_zruty (zruty) .\" don't hyphenate file name across lines .hw sysconf .pg -Notes: several symbols in this table appear to be blank. +.lp "Notes:" +.lp "*" +Several symbols in this table appear to be blank. They are the space character, except for S_pet_override and S_player_override which don't have any default value and can only be used if enabled in the \(lqsysconf\(rq file. -.pg +.lp "*" S_rock is misleadingly named; rocks and stones use S_gem. Statues and boulders are the rock being referred to, but since version 3.6.0, statues are displayed as the monster they depict. @@ -5114,7 +5130,7 @@ The NetHack Development Team at the time of release of 3.6.1 consisted of \fBPat Rankin\fP, \fBDerek S. Ray\fP, \fBAlex Smith\fP, \fBMike Stephenson\fP, \fBJanet Walz\fP, and \fBPaul Winner\fP. .pg -In early May 2019, another 320 bug fixes along with some enhancements and +In early May 2019, another 320 bug fixes along with some enhancements and the adopted curses window port, were released as 3.6.2. .pg \fBBart House\fP, who had contributed to the game as a porting team @@ -5132,7 +5148,7 @@ again to \fBM. Drew Streib\fP and \fBPasi Kallinen\fP for providing a public NetHack server at nethack.alt.org. Thanks to \fBKeith Simpson\fP and \fBAndy Thomson\fP for hardfought.org. Thanks to all those unnamed dungeoneers who invest their time and effort into annual -NetHack tournaments such as Junethack, The November NetHack Tournament +NetHack tournaments such as Junethack, The November NetHack Tournament and in days past, devnull.net (gone for now, but not forgotten). .pg .ce @@ -5199,3 +5215,4 @@ Izchak Miller Mike Stephenson .\"Amiga is a trademark of Commodore-Amiga, Inc .sm "Brand and product names are trademarks or registered trademarks \ of their respective holders." +.\"EOF diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 818cce066..4faefff0a 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2044,8 +2044,8 @@ will result in it disappearing from your map, similarly if it is the one who moved rather than you. %.pg -However, if you encounter a monster which you can't see or -sense---perhaps it is invisible and has just tapped you on the +However, if you encounter a monster which you can't see or +sense---perhaps it is invisible and has just tapped you on the noggin---a special ``remembered, unseen monster'' marker will be displayed at the location where you think it is. That will persist until you have @@ -2701,8 +2701,8 @@ you are carrying (shopkeepers aside). Normally, if you have seen an object at a particular map location and move to another location where you can't directly see that object any more, if will continue to be displayed on your map. -That remains the case even if it is not actually there any -more---perhaps a monster has picked it up or it has rotted +That remains the case even if it is not actually there any +more---perhaps a monster has picked it up or it has rotted away---until you can see or feel that location again. One notable exception is that if the object gets covered by the ``remembered, unseen monster'' marker. @@ -2875,7 +2875,7 @@ directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor.\\ %.lp "" -On Windows, it is \mbox{``.nethackrc''} in the foler +On Windows, it is \mbox{``.nethackrc''} in the folder \mbox{{``\%USERPROFILE\%\textbackslash NetHack\textbackslash 3.6''}}. The file may not exist, but it is a normal ASCII text file and can be created with any text editor. @@ -2886,7 +2886,7 @@ If you had not created the configuration file, {\it NetHack\/} will create the configuration file for you using the default template file. %.lp "" -On MS-DOS it is \mbox{``defaults.nh''} in the same folder as +On MS-DOS it is \mbox{``defaults.nh''} in the same folder as \mbox{{\it nethack.exe\/}}.\\ %.lp "" @@ -3065,7 +3065,7 @@ Example: %.lp "" %.pg -Here is a short example of config file contents: +Here is an example of configuration file contents: %.sd \begin{verbatim} # Set your character's role, race, gender, and alignment. @@ -3073,10 +3073,13 @@ Here is a short example of config file contents: # Turn on autopickup, set automatically picked up object types OPTIONS=autopickup,pickup_types:$"=/!?+ - # Show colored text if possible - OPTIONS=color - # Show lit corridors differently - OPTIONS=lit_corridor + + # Map customization + OPTIONS=color # Display things in color if possible + OPTIONS=lit_corridor # Show lit corridors differently + OPTIONS=hilite_pet,hilite_pile + # Replace small punctuation (tick marks) with digits + SYMBOLS=S_boulder:0,S_golem:7 # No startup splash screen. Windows GUI only. OPTIONS=!splash_screen @@ -3518,7 +3521,7 @@ Valid settings are: %.sd %.si {\tt 0} --- disabled\\ -{\tt 1} --- enabled and make OS adjustment to support mouse use in the game\\ +{\tt 1} --- enabled and make OS adjustment to support mouse use\\ {\tt 2} --- enabled like {\tt 1}, but does not make any OS adjustments\\ %.ei %.ed @@ -3997,7 +4000,7 @@ windowtype that you have chosen. Character strings that are too long may be truncated. Not all window ports will adjust for all settings listed here. You can safely add any of these options to your -config file, and if the window port is capable of adjusting +configuration file, and if the window port is capable of adjusting to suit your preferences, it will attempt to do so. If it can't it will silently ignore it. You can find out if an option is supported by the window port that you are currently @@ -4254,7 +4257,8 @@ returns to {\it NetHack\/} to help compensate for international keyboard issues. OPTIONS=subkeyvalue:171/92 will return 92 to {\it NetHack\/}, if 171 was originally going to be returned. -You can use multiple subkeyvalue statements in the config file if needed. +You can use multiple subkeyvalue statements in the configuration file +if needed. Cannot be set with the `{\tt O}' command. %.lp \item[\ib{video}] @@ -4324,13 +4328,14 @@ character in the pattern, specifically: %.ei %.ed -The {\it autopickup\verb+_+exception\/} rules are processed in the order -in which they appear in your config file, thus allowing a later rule to override -an earlier rule. +The {\it autopickup\verb+_+exception\/} rules are processed in the order +in which they appear in your configuration file, thus allowing a +later rule to override an earlier rule. %.lp "" -Exceptions can be set with the `{\tt O}' command, but because they are not included -in your config file, they won't be in effect if you save and then restore your game. +Exceptions can be set with the `{\tt O}' command, but because they are not +included in your configuration file, they won't be in effect if you save +and then restore your game. {\it autopickup\verb+_+exception\/} rules are not saved with the game. \elist @@ -4379,8 +4384,9 @@ the ``{\tt }'', ``{\tt }'', and ``{\tt }'' keys. %.lp "Menu accelerator keys" \item[\tb{Menu accelerator keys}] -The menu control or accelerator keys can also be rebound via OPTIONS-lines -in the config file. You cannot bind object symbols into menu accelerators. +The menu control or accelerator keys can also be rebound via OPTIONS lines +in the configuration file. +You cannot bind object symbols into menu accelerators. %.lp "Special command keys" \item[\tb{Special command keys}] @@ -4550,7 +4556,7 @@ You can change the way the messages are shown in the message area, when the message matches a user-defined pattern. %.pg -In general, the config file entries to configure the message types +In general, the configuration file entries to describe the message types look like this: \begin{verbatim} MSGTYPE=type "pattern" @@ -4588,7 +4594,7 @@ the user is prompted with more-prompt, and a message matching ``You displaced \verb+<+something\verb+>+'' is not shown at all. %.lp -The order of the defined MSGTYPE-lines is important; the last matching +The order of the defined MSGTYPE lines is important; the last matching rule is used. Put the general case first, exceptions below them. %.pg @@ -4599,11 +4605,12 @@ rule is used. Put the general case first, exceptions below them. %.pg Some platforms allow you to define colors used in menu lines when the -line matches a user-defined pattern. At this time the tty, win32tty and -win32gui support this. +line matches a user-defined pattern. +At this time the tty, curses, win32tty and +win32gui interfaces support this. %.pg -In general, the config file entries to configure the menu color mappings +In general, the configuration file entries to describe the menu color mappings look like this: \begin{verbatim} MENUCOLOR="pattern"=color&attribute @@ -4655,8 +4662,8 @@ specifies that any menu line with ``~blessed~'' contained in it will be shown in green color, lines with ``~cursed~'' will be shown in red, and lines with ``~cursed~'' followed by ``(being worn)'' on the same line will be shown in red color and underlined. -You can have multiple MENUCOLOR entries in your config file, -and the last MENUCOLOR-line in your config file that matches +You can have multiple MENUCOLOR entries in your configuration file, +and the last MENUCOLOR line that matches a menu line will be used for the line. %.pg @@ -4677,7 +4684,7 @@ At this time the Qt port and the win32tty and win32gui ports support the use of user sounds. %.pg -The following config file entries are relevant to mapping user sounds +The following configuration file entries are relevant to mapping user sounds to messages: \blist{} @@ -4856,7 +4863,7 @@ is tested; the character's name is ignored. \elist The in-game options menu can help you determine the correct syntax for a -config file. +configuration file. The whole feature can be disable by setting option {\it statushilites} to 0. @@ -4898,7 +4905,7 @@ on the rogue level. \elist You can also override one or more symbols using the {\it SYMBOLS\/} and -{\it ROGUESYMBOLS\/} config file options. +{\it ROGUESYMBOLS\/} configuration file options. Symbols are specified as {\it name:value\/} pairs. Note that {\it NetHack\/} escape-processes the {\it value\/} string in conventional C fashion. @@ -5098,13 +5105,16 @@ Default & Symbol Name & Description\\ } \hyphenation{sysconf} %no syllable breaks => don't hyphenate file name -%.pg -Notes: several symbols in this table appear to be blank. +%.lp +Notes: + +%.lp "*" +Several symbols in this table appear to be blank. They are the space character, except for S\verb+_+pet\verb+_+override and S\verb+_+player\verb+_+override which don't have any default value and can only be used if enabled in the ``sysconf'' file. -%.pg +%.lp "*" S\verb+_+rock is misleadingly named; rocks and stones use S\verb+_+gem. Statues and boulders are the rock being referred to, but since version 3.6.0, statues are displayed as the monster they depict. @@ -5720,7 +5730,7 @@ time of release of 3.6.1 consisted of %.pg \medskip -In early May 2019, another 320 bug fixes along with some enhancements and +In early May 2019, another 320 bug fixes along with some enhancements and the adopted curses window port, were released as 3.6.2. %.pg @@ -5746,7 +5756,7 @@ again to {\it M. Drew Streib} and {\it Pasi Kallinen} for providing a public NetHack server at nethack.alt.org. Thanks to {\it Keith Simpson} and {\it Andy Thomson} for hardfought.org. Thanks to all those unnamed dungeoneers who invest their time and effort into annual -{\it NetHack\/} tournaments such as {\it Junethack}, +{\it NetHack\/} tournaments such as {\it Junethack}, {\it The November NetHack Tournament} and in days past, {\it devnull.net\/} (gone for now, but not forgotten). \clearpage @@ -5755,7 +5765,7 @@ unnamed dungeoneers who invest their time and effort into annual \section*{Dungeoneers} %.pg \nd From time to time, some depraved individual out there in netland sends a -particularly intriguing modification to help out with the game. The +particularly intriguing modification to help out with the game. The {\it NetHack Development Team} sometimes makes note of the names of the worst of these miscreants in this, the list of Dungeoneers: %.sd @@ -5824,7 +5834,3 @@ Izchak Miller & Mike Stephenson %\end{flushleft} \end{document} - - - - From 7502a2e05f3259934b7a07edfce5d564db8cea42 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 19:15:34 -0500 Subject: [PATCH 182/529] bump the Guidebook date --- doc/Guidebook.mn | 2 +- doc/Guidebook.tex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 425fe413f..f3a8a9818 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "November 2, 2019 +.ds f2 "November 7, 2019 . .\" A note on some special characters: .\" \(lq = left double quote diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 4faefff0a..290373dae 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{November 2, 2019} +\date{November 7, 2019} \maketitle From 2058ad10f9f2d75be2205c538869663cc97f3f4a Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 7 Nov 2019 16:21:52 -0800 Subject: [PATCH 183/529] missing data file on vms vms's install.com was processing bigrm-%.lev (which corresponds to bigrm-?.lev on unix) so missed two-digit bigrm-10.lev. --- doc/fixes36.3 | 3 ++- sys/vms/install.com | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index dc4e5aa1c..e71e94dba 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.165 $ $NHDT-Date: 1573119743 2019/11/07 09:42:23 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.166 $ $NHDT-Date: 1573172442 2019/11/08 00:20:42 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -358,6 +358,7 @@ unix: sysconf CHECK_PLNAME=1 wouldn't work if attempt to obtain unix username failed even though it didn't need that to check player character name unix+curses: startup error only reset terminal for tty; one noticeable example was answering 'n' to "Destroy old game?" +vms: update install.com to include overlooked file bigrm-10.lev in nh-data.dlb Windows: some startup error messages were not being delivered successfully WindowsGUI: player selection dialog box layout was not being adjusted for DPI Windows: significant changes to default directory choices; see documentation diff --git a/sys/vms/install.com b/sys/vms/install.com index eecbca319..09f6f839d 100755 --- a/sys/vms/install.com +++ b/sys/vms/install.com @@ -1,9 +1,9 @@ $ ! vms/install.com -- set up nethack 'playground' -$! $NHDT-Date: 1542388600 2018/11/16 17:16:40 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.11 $ +$! $NHDT-Date: 1573172443 2019/11/08 00:20:43 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.12 $ $! Copyright (c) 2016 by Robert Patrick Rankin $! NetHack may be freely redistributed. See license for details. $ ! -$ ! $NHDT-Date: 1542388600 2018/11/16 17:16:40 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.11 $ +$ ! $NHDT-Date: 1573172452 2019/11/08 00:20:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.12 $ $ ! $ ! Use vmsbuild.com to create nethack.exe, makedefs, and lev_comp *first*. $ ! @@ -35,7 +35,7 @@ $ sysconf_file = "[.sys.vms]sysconf" $ guidebook = "[.doc]Guidebook.txt" $ invoc_proc = "[.sys.vms]nethack.com" $ trmcp_file = "[.sys.share]termcap" -$ spec_files = "AIR.LEV,ASMODEUS.LEV,ASTRAL.LEV,BAALZ.LEV,BIGRM-%.LEV," - +$ spec_files = "AIR.LEV,ASMODEUS.LEV,ASTRAL.LEV,BAALZ.LEV,BIGRM-*.LEV," - + "CASTLE.LEV,EARTH.LEV,FAKEWIZ%.LEV,FIRE.LEV," - + "JUIBLEX.LEV,KNOX.LEV,MEDUSA-%.LEV,MINEFILL.LEV," - + "MINETN-%.LEV,MINEND-%.LEV,ORACLE.LEV,ORCUS.LEV," - From 0c5b1674ef0da453cf34a4f3cf3cc5745ecc48f9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 19:39:11 -0500 Subject: [PATCH 184/529] restore use of wildcards in sys/vms/install.com (untested) --- sys/vms/install.com | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/sys/vms/install.com b/sys/vms/install.com index c6560387e..a0b68ffc7 100755 --- a/sys/vms/install.com +++ b/sys/vms/install.com @@ -35,21 +35,12 @@ $ sysconf_file = "[.sys.vms]sysconf" $ guidebook = "[.doc]Guidebook.txt" $ invoc_proc = "[.sys.vms]nethack.com" $ trmcp_file = "[.sys.share]termcap" -$ spec_files = "air.lua,asmodeus.lua,astral.lua,baalz.lua," - - + "bigrm-1.lua,bigrm-2.lua,bigrm-3.lua,bigrm-4.lua," - - + "bigrm-5.lua,bigrm-6.lua,bigrm-7.lua,bigrm-8.lua," - - + "bigrm-9.lua,bigrm-10.lua,castle.lua,earth.lua," - - + "fakewiz1.lua,fakewiz2.lua,fire.lua,juiblex.lua," - - + "knox.lua,medusa-1.lua,medusa-2.lua,medusa-3.lua," - - + "medusa-4.lua,minefill.lua,minend-1.lua," - - + "minend-2.lua,minend-3.lua,minetn-1.lua," - - + "minetn-2.lua,minetn-3.lua,minetn-4.lua," - - + "minetn-5.lua,minetn-6.lua,minetn-7.lua,nhlib.lua," - - + "oracle.lua,orcus.lua,sanctum.lua,soko1-1.lua," - - + "soko1-2.lua,soko2-1.lua,soko2-2.lua,soko3-1.lua," - - + "soko3-2.lua,soko4-1.lua,soko4-2.lua,tower1.lua," - - + "tower2.lua,tower3.lua,valley.lua,water.lua," - - + "wizard1.lua,wizard2.lua,wizard3.lua" +$ spec_files = "air.lua,asmodeus.lua,astral.lua,baalz.lua," - + + "bigrm-*.lua,castle.lua,earth.lua,fakewiz%.lua," - + + "fire.lua,juiblex.lua,knox.lua,medusa-%.lua," - + + "minefill.lua,minetn-%.lua,minend-%.lua,nhlib.lua," - + + "oracle.lua,orcus.lua,sanctum.lua,soko%-%.lua," - + + "tower%.lua,valley.lua,water.lua,wizard%.lua" $ qstl_files = "%%%-goal.lua,%%%-fil%.lua,%%%-loca.lua,%%%-strt.lua" $ dngn_files = "dungeon.lua" $! From 6afb780d98cf762d098165cf22f84bbc02e4a820 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 7 Nov 2019 17:54:57 -0800 Subject: [PATCH 185/529] status highlight fix for experience level When I expanded the Guidebook's sample configuration file I added several status_hilite options. I decided that I'd better test what was written and discovered that if Xp had an up or changed rule as well as one or more percentage rules, it was showing bogus changes whenever the integer value of the percentage changed. The fix turned out to be simple but it took a while to figure out. I ultimately left the status_hilite settings out of the sample options, because they tended to be too wide for Guidebook.txt's formatting rather than because they weren't working as expected. --- doc/fixes36.3 | 4 +++- src/botl.c | 12 +++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index e71e94dba..d8c5ae5ce 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.166 $ $NHDT-Date: 1573172442 2019/11/08 00:20:42 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.167 $ $NHDT-Date: 1573178084 2019/11/08 01:54:44 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -243,6 +243,8 @@ a recent intended sanity check fix inadvertently bypassed placing a thrown chained ball back onto the floor in symset:curses, symbol S_tree was accidentally set to horizontal line where plus-or-minus sign was meant; also, change S_bars to not-equals sign +percentage highlighting for Xp broke up/down/changed highlighting for it; + it was flagged as having gone up every time the percentage changed curses: sometimes the message window would show a blank line after a prompt curses: the change to show map in columns 1..79 instead of 2..80 made the highlight for '@' show up in the wrong place if clipped map had been diff --git a/src/botl.c b/src/botl.c index 4a856a211..4c7dbf33a 100644 --- a/src/botl.c +++ b/src/botl.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 botl.c $NHDT-Date: 1562114350 2019/07/03 00:39:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.146 $ */ +/* NetHack 3.6 botl.c $NHDT-Date: 1573178085 2019/11/08 01:54:45 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.148 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -142,9 +142,9 @@ do_statusline2() if (Upolyd) Sprintf(expr, "HD:%d", mons[u.umonnum].mlevel); else if (flags.showexp) - Sprintf(expr, "Xp:%u/%-1ld", u.ulevel, u.uexp); + Sprintf(expr, "Xp:%d/%-1ld", u.ulevel, u.uexp); else - Sprintf(expr, "Exp:%u", u.ulevel); + Sprintf(expr, "Exp:%d", u.ulevel); xln = strlen(expr); /* time/move counter */ @@ -850,6 +850,12 @@ boolean *valsetlist; if (anytype != ANY_MASK32) { #ifdef STATUS_HILITES if (chg || *curr->val) { + /* if Xp percentage changed, we set 'chg' to 1 above; + reset that if the Xp value hasn't actually changed + or possibly went down rather than up (level loss) */ + if (chg == 1 && fld == BL_XP) + chg = compare_blstats(prev, curr); + curr->hilite_rule = get_hilite(idx, fld, (genericptr_t) &curr->a, chg, pc, &color); From 2835d8774e77167b5e546bad0f82c23569ba4915 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 8 Nov 2019 11:22:50 -0500 Subject: [PATCH 186/529] one more "Deaf-aware" comment --- src/engrave.c | 147 +++++++++++++++++++++++++++++--------------------- 1 file changed, 85 insertions(+), 62 deletions(-) diff --git a/src/engrave.c b/src/engrave.c index d81144cc0..42cd49aa4 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -5,9 +5,11 @@ #include "hack.h" #include "lev.h" +#include "sfproto.h" -STATIC_VAR NEARDATA struct engr *head_engr; -STATIC_DCL const char *NDECL(blengr); + +static NEARDATA struct engr *head_engr; +static const char *NDECL(blengr); char * random_engraving(outbuf) @@ -159,7 +161,7 @@ boolean check_pit; return (boolean) ((!Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)) - && (!u.uundetected || !is_hider(youmonst.data) + && (!u.uundetected || !is_hider(g.youmonst.data) || u.umonnum == PM_TRAPPER)); } @@ -269,7 +271,7 @@ boolean strict; { register struct engr *ep = engr_at(x, y); - if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= moves) { + if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= g.moves) { return strict ? (fuzzymatch(ep->engr_txt, s, "", TRUE)) : (strstri(ep->engr_txt, s) != 0); } @@ -378,7 +380,7 @@ int x, y; et = ep->engr_txt; } You("%s: \"%s\".", (Blind) ? "feel the words" : "read", et); - if (context.run > 0) + if (g.context.run > 0) nomul(0); } } @@ -405,7 +407,7 @@ xchar e_type; ep->engr_txt = (char *) (ep + 1); Strcpy(ep->engr_txt, s); /* engraving Elbereth shows wisdom */ - if (!in_mklev && !strcmp(s, "Elbereth")) + if (!g.in_mklev && !strcmp(s, "Elbereth")) exercise(A_WIS, TRUE); ep->engr_time = e_time; ep->engr_type = e_type > 0 ? e_type : rnd(N_ENGRAVE - 1); @@ -494,8 +496,8 @@ doengrave() struct obj *otmp; /* Object selected with which to engrave */ char *writer; - multi = 0; /* moves consumed */ - nomovemsg = (char *) 0; /* occupation end message */ + g.multi = 0; /* moves consumed */ + g.nomovemsg = (char *) 0; /* occupation end message */ buf[0] = (char) 0; ebuf[0] = (char) 0; @@ -503,7 +505,7 @@ doengrave() maxelen = BUFSZ - 1; if (oep) oetype = oep->engr_type; - if (is_demon(youmonst.data) || youmonst.data->mlet == S_VAMPIRE) + if (is_demon(g.youmonst.data) || is_vampire(g.youmonst.data)) type = ENGR_BLOOD; /* Can the adventurer engrave at all? */ @@ -532,7 +534,7 @@ doengrave() You_cant("write here."); return 0; } - if (cantwield(youmonst.data)) { + if (cantwield(g.youmonst.data)) { You_cant("even hold anything!"); return 0; } @@ -544,10 +546,10 @@ doengrave() */ otmp = getobj(styluses, "write with"); - if (!otmp) /* otmp == zeroobj if fingers */ + if (!otmp) /* otmp == cg.zeroobj if fingers */ return 0; - if (otmp == &zeroobj) { + if (otmp == &cg.zeroobj) { Strcat(strcpy(fbuf, "your "), body_part(FINGERTIP)); writer = fbuf; } else @@ -576,7 +578,7 @@ doengrave() return 0; } if (IS_GRAVE(levl[u.ux][u.uy].typ)) { - if (otmp == &zeroobj) { /* using only finger */ + if (otmp == &cg.zeroobj) { /* using only finger */ You("would only make a small smudge on the %s.", surface(u.ux, u.uy)); return 0; @@ -762,7 +764,7 @@ doengrave() ? "Chips fly out from the headstone." : is_ice(u.ux, u.uy) ? "Ice chips fly up from the ice surface!" - : (level.locations[u.ux][u.uy].typ + : (g.level.locations[u.ux][u.uy].typ == DRAWBRIDGE_DOWN) ? "Splinters fly up from the bridge." : "Gravel flies up from the floor."); @@ -792,7 +794,7 @@ doengrave() doblind = TRUE; } else Strcpy(post_engr_text, !Deaf - ? "You hear crackling!" + ? "You hear crackling!" /* Deaf-aware */ : "Your hair stands up!"); break; @@ -906,7 +908,7 @@ doengrave() } /* Something has changed the engraving here */ if (*buf) { - make_engr_at(u.ux, u.uy, buf, moves, type); + make_engr_at(u.ux, u.uy, buf, g.moves, type); if (!Blind) pline_The("engraving now reads: \"%s\".", buf); ptext = FALSE; @@ -1013,7 +1015,7 @@ doengrave() } /* Tell adventurer what is going on */ - if (otmp != &zeroobj) + if (otmp != &cg.zeroobj) You("%s the %s with %s.", everb, eloc, doname(otmp)); else You("%s the %s with your %s.", everb, eloc, body_part(FINGERTIP)); @@ -1069,21 +1071,21 @@ doengrave() */ switch (type) { default: - multi = -(len / 10); - if (multi) - nomovemsg = "You finish your weird engraving."; + g.multi = -(len / 10); + if (g.multi) + g.nomovemsg = "You finish your weird engraving."; break; case DUST: - multi = -(len / 10); - if (multi) - nomovemsg = "You finish writing in the dust."; + g.multi = -(len / 10); + if (g.multi) + g.nomovemsg = "You finish writing in the dust."; break; case HEADSTONE: case ENGRAVE: - multi = -(len / 10); + g.multi = -(len / 10); if (otmp->oclass == WEAPON_CLASS && (otmp->otyp != ATHAME || otmp->cursed)) { - multi = -len; + g.multi = -len; maxelen = ((otmp->spe + 3) * 2) + 1; /* -2 => 3, -1 => 5, 0 => 7, +1 => 9, +2 => 11 * Note: this does not allow a +0 anything (except an athame) @@ -1093,45 +1095,45 @@ doengrave() pline("%s dull.", Yobjnam2(otmp, "get")); costly_alteration(otmp, COST_DEGRD); if (len > maxelen) { - multi = -maxelen; + g.multi = -maxelen; otmp->spe = -3; } else if (len > 1) otmp->spe -= len >> 1; else otmp->spe -= 1; /* Prevent infinite engraving */ } else if (otmp->oclass == RING_CLASS || otmp->oclass == GEM_CLASS) { - multi = -len; + g.multi = -len; } - if (multi) - nomovemsg = "You finish engraving."; + if (g.multi) + g.nomovemsg = "You finish engraving."; break; case BURN: - multi = -(len / 10); - if (multi) - nomovemsg = is_ice(u.ux, u.uy) + g.multi = -(len / 10); + if (g.multi) + g.nomovemsg = is_ice(u.ux, u.uy) ? "You finish melting your message into the ice." : "You finish burning your message into the floor."; break; case MARK: - multi = -(len / 10); + g.multi = -(len / 10); if (otmp->otyp == MAGIC_MARKER) { maxelen = otmp->spe * 2; /* one charge / 2 letters */ if (len > maxelen) { Your("marker dries out."); otmp->spe = 0; - multi = -(maxelen / 10); + g.multi = -(maxelen / 10); } else if (len > 1) otmp->spe -= len >> 1; else otmp->spe -= 1; /* Prevent infinite graffiti */ } - if (multi) - nomovemsg = "You finish defacing the dungeon."; + if (g.multi) + g.nomovemsg = "You finish defacing the dungeon."; break; case ENGR_BLOOD: - multi = -(len / 10); - if (multi) - nomovemsg = "You finish scrawling."; + g.multi = -(len / 10); + if (g.multi) + g.nomovemsg = "You finish scrawling."; break; } @@ -1142,8 +1144,8 @@ doengrave() maxelen--; if (!maxelen && *sp) { *sp = '\0'; - if (multi) - nomovemsg = "You cannot write any more."; + if (g.multi) + g.nomovemsg = "You cannot write any more."; You("are only able to write \"%s\".", ebuf); } } @@ -1152,11 +1154,11 @@ doengrave() Strcpy(buf, oep->engr_txt); (void) strncat(buf, ebuf, BUFSZ - (int) strlen(buf) - 1); /* Put the engraving onto the map */ - make_engr_at(u.ux, u.uy, buf, moves - multi, type); + make_engr_at(u.ux, u.uy, buf, g.moves - g.multi, type); if (post_engr_text[0]) pline("%s", post_engr_text); - if (doblind && !resists_blnd(&youmonst)) { + if (doblind && !resists_blnd(&g.youmonst)) { You("are blinded by the flash!"); make_blinded((long) rnd(50), FALSE); if (!Blind) @@ -1178,49 +1180,70 @@ sanitize_engravings() } void -save_engravings(fd, mode) -int fd, mode; +save_engravings(nhfp) +NHFILE *nhfp; { struct engr *ep, *ep2; unsigned no_more_engr = 0; for (ep = head_engr; ep; ep = ep2) { ep2 = ep->nxt_engr; - if (ep->engr_lth && ep->engr_txt[0] && perform_bwrite(mode)) { - bwrite(fd, (genericptr_t) &ep->engr_lth, sizeof ep->engr_lth); - bwrite(fd, (genericptr_t) ep, sizeof (struct engr) + ep->engr_lth); + if (ep->engr_lth && ep->engr_txt[0] && perform_bwrite(nhfp)) { + if (nhfp->structlevel) { + bwrite(nhfp->fd, (genericptr_t)&(ep->engr_lth), sizeof(ep->engr_lth)); + bwrite(nhfp->fd, (genericptr_t)ep, sizeof(struct engr) + ep->engr_lth); + } + if (nhfp->fieldlevel) { + sfo_unsigned(nhfp, &(ep->engr_lth), "engravings", "engr_lth", 1); + sfo_engr(nhfp, ep, "engravings", "engr", 1); + sfo_str(nhfp, ep->engr_txt, "engravings", "engr_txt", ep->engr_lth); + } } - if (release_data(mode)) + if (release_data(nhfp)) dealloc_engr(ep); } - if (perform_bwrite(mode)) - bwrite(fd, (genericptr_t) &no_more_engr, sizeof no_more_engr); - if (release_data(mode)) + if (perform_bwrite(nhfp)) { + if (nhfp->structlevel) + bwrite(nhfp->fd, (genericptr_t)&no_more_engr, sizeof no_more_engr); + if (nhfp->fieldlevel) + sfo_unsigned(nhfp, &no_more_engr, "engravings", "engr_lth", 1); + } + if (release_data(nhfp)) head_engr = 0; } void -rest_engravings(fd) -int fd; +rest_engravings(nhfp) +NHFILE *nhfp; { struct engr *ep; unsigned lth; head_engr = 0; while (1) { - mread(fd, (genericptr_t) <h, sizeof lth); + if (nhfp->structlevel) + mread(nhfp->fd, (genericptr_t) <h, sizeof(unsigned)); + if (nhfp->fieldlevel) + sfi_unsigned(nhfp, <h, "engravings", "engr_lth", 1); + if (lth == 0) return; ep = newengr(lth); - mread(fd, (genericptr_t) ep, sizeof (struct engr) + lth); + if (nhfp->structlevel) { + mread(nhfp->fd, (genericptr_t) ep, sizeof(struct engr) + lth); + } + if (nhfp->fieldlevel) { + sfi_engr(nhfp, ep, "engravings", "engr", 1); + ep->engr_txt = (char *) (ep + 1); + sfi_str(nhfp, ep->engr_txt, "engravings", "engr_txt", lth); + } ep->nxt_engr = head_engr; head_engr = ep; - ep->engr_txt = (char *) (ep + 1); /* Andreas Bormann */ - /* Mark as finished for bones levels -- no problem for + ep->engr_txt = (char *) (ep + 1); /* Andreas Bormann */ + /* mark as finished for bones levels -- no problem for * normal levels as the player must have finished engraving - * to be able to move again. - */ - ep->engr_time = moves; + * to be able to move again */ + ep->engr_time = g.moves; } } @@ -1325,7 +1348,7 @@ static const char blind_writing[][21] = { 0x69, 0x76, 0x6b, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, }; -STATIC_OVL const char * +static const char * blengr(VOID_ARGS) { return blind_writing[rn2(SIZE(blind_writing))]; From a3d2be04be7d53f57837f26597e116e2fdd44223 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 8 Nov 2019 12:34:27 -0500 Subject: [PATCH 187/529] Revert "one more "Deaf-aware" comment" This reverts commit 2835d8774e77167b5e546bad0f82c23569ba4915. --- src/engrave.c | 147 +++++++++++++++++++++----------------------------- 1 file changed, 62 insertions(+), 85 deletions(-) diff --git a/src/engrave.c b/src/engrave.c index 42cd49aa4..d81144cc0 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -5,11 +5,9 @@ #include "hack.h" #include "lev.h" -#include "sfproto.h" - -static NEARDATA struct engr *head_engr; -static const char *NDECL(blengr); +STATIC_VAR NEARDATA struct engr *head_engr; +STATIC_DCL const char *NDECL(blengr); char * random_engraving(outbuf) @@ -161,7 +159,7 @@ boolean check_pit; return (boolean) ((!Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)) - && (!u.uundetected || !is_hider(g.youmonst.data) + && (!u.uundetected || !is_hider(youmonst.data) || u.umonnum == PM_TRAPPER)); } @@ -271,7 +269,7 @@ boolean strict; { register struct engr *ep = engr_at(x, y); - if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= g.moves) { + if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= moves) { return strict ? (fuzzymatch(ep->engr_txt, s, "", TRUE)) : (strstri(ep->engr_txt, s) != 0); } @@ -380,7 +378,7 @@ int x, y; et = ep->engr_txt; } You("%s: \"%s\".", (Blind) ? "feel the words" : "read", et); - if (g.context.run > 0) + if (context.run > 0) nomul(0); } } @@ -407,7 +405,7 @@ xchar e_type; ep->engr_txt = (char *) (ep + 1); Strcpy(ep->engr_txt, s); /* engraving Elbereth shows wisdom */ - if (!g.in_mklev && !strcmp(s, "Elbereth")) + if (!in_mklev && !strcmp(s, "Elbereth")) exercise(A_WIS, TRUE); ep->engr_time = e_time; ep->engr_type = e_type > 0 ? e_type : rnd(N_ENGRAVE - 1); @@ -496,8 +494,8 @@ doengrave() struct obj *otmp; /* Object selected with which to engrave */ char *writer; - g.multi = 0; /* moves consumed */ - g.nomovemsg = (char *) 0; /* occupation end message */ + multi = 0; /* moves consumed */ + nomovemsg = (char *) 0; /* occupation end message */ buf[0] = (char) 0; ebuf[0] = (char) 0; @@ -505,7 +503,7 @@ doengrave() maxelen = BUFSZ - 1; if (oep) oetype = oep->engr_type; - if (is_demon(g.youmonst.data) || is_vampire(g.youmonst.data)) + if (is_demon(youmonst.data) || youmonst.data->mlet == S_VAMPIRE) type = ENGR_BLOOD; /* Can the adventurer engrave at all? */ @@ -534,7 +532,7 @@ doengrave() You_cant("write here."); return 0; } - if (cantwield(g.youmonst.data)) { + if (cantwield(youmonst.data)) { You_cant("even hold anything!"); return 0; } @@ -546,10 +544,10 @@ doengrave() */ otmp = getobj(styluses, "write with"); - if (!otmp) /* otmp == cg.zeroobj if fingers */ + if (!otmp) /* otmp == zeroobj if fingers */ return 0; - if (otmp == &cg.zeroobj) { + if (otmp == &zeroobj) { Strcat(strcpy(fbuf, "your "), body_part(FINGERTIP)); writer = fbuf; } else @@ -578,7 +576,7 @@ doengrave() return 0; } if (IS_GRAVE(levl[u.ux][u.uy].typ)) { - if (otmp == &cg.zeroobj) { /* using only finger */ + if (otmp == &zeroobj) { /* using only finger */ You("would only make a small smudge on the %s.", surface(u.ux, u.uy)); return 0; @@ -764,7 +762,7 @@ doengrave() ? "Chips fly out from the headstone." : is_ice(u.ux, u.uy) ? "Ice chips fly up from the ice surface!" - : (g.level.locations[u.ux][u.uy].typ + : (level.locations[u.ux][u.uy].typ == DRAWBRIDGE_DOWN) ? "Splinters fly up from the bridge." : "Gravel flies up from the floor."); @@ -794,7 +792,7 @@ doengrave() doblind = TRUE; } else Strcpy(post_engr_text, !Deaf - ? "You hear crackling!" /* Deaf-aware */ + ? "You hear crackling!" : "Your hair stands up!"); break; @@ -908,7 +906,7 @@ doengrave() } /* Something has changed the engraving here */ if (*buf) { - make_engr_at(u.ux, u.uy, buf, g.moves, type); + make_engr_at(u.ux, u.uy, buf, moves, type); if (!Blind) pline_The("engraving now reads: \"%s\".", buf); ptext = FALSE; @@ -1015,7 +1013,7 @@ doengrave() } /* Tell adventurer what is going on */ - if (otmp != &cg.zeroobj) + if (otmp != &zeroobj) You("%s the %s with %s.", everb, eloc, doname(otmp)); else You("%s the %s with your %s.", everb, eloc, body_part(FINGERTIP)); @@ -1071,21 +1069,21 @@ doengrave() */ switch (type) { default: - g.multi = -(len / 10); - if (g.multi) - g.nomovemsg = "You finish your weird engraving."; + multi = -(len / 10); + if (multi) + nomovemsg = "You finish your weird engraving."; break; case DUST: - g.multi = -(len / 10); - if (g.multi) - g.nomovemsg = "You finish writing in the dust."; + multi = -(len / 10); + if (multi) + nomovemsg = "You finish writing in the dust."; break; case HEADSTONE: case ENGRAVE: - g.multi = -(len / 10); + multi = -(len / 10); if (otmp->oclass == WEAPON_CLASS && (otmp->otyp != ATHAME || otmp->cursed)) { - g.multi = -len; + multi = -len; maxelen = ((otmp->spe + 3) * 2) + 1; /* -2 => 3, -1 => 5, 0 => 7, +1 => 9, +2 => 11 * Note: this does not allow a +0 anything (except an athame) @@ -1095,45 +1093,45 @@ doengrave() pline("%s dull.", Yobjnam2(otmp, "get")); costly_alteration(otmp, COST_DEGRD); if (len > maxelen) { - g.multi = -maxelen; + multi = -maxelen; otmp->spe = -3; } else if (len > 1) otmp->spe -= len >> 1; else otmp->spe -= 1; /* Prevent infinite engraving */ } else if (otmp->oclass == RING_CLASS || otmp->oclass == GEM_CLASS) { - g.multi = -len; + multi = -len; } - if (g.multi) - g.nomovemsg = "You finish engraving."; + if (multi) + nomovemsg = "You finish engraving."; break; case BURN: - g.multi = -(len / 10); - if (g.multi) - g.nomovemsg = is_ice(u.ux, u.uy) + multi = -(len / 10); + if (multi) + nomovemsg = is_ice(u.ux, u.uy) ? "You finish melting your message into the ice." : "You finish burning your message into the floor."; break; case MARK: - g.multi = -(len / 10); + multi = -(len / 10); if (otmp->otyp == MAGIC_MARKER) { maxelen = otmp->spe * 2; /* one charge / 2 letters */ if (len > maxelen) { Your("marker dries out."); otmp->spe = 0; - g.multi = -(maxelen / 10); + multi = -(maxelen / 10); } else if (len > 1) otmp->spe -= len >> 1; else otmp->spe -= 1; /* Prevent infinite graffiti */ } - if (g.multi) - g.nomovemsg = "You finish defacing the dungeon."; + if (multi) + nomovemsg = "You finish defacing the dungeon."; break; case ENGR_BLOOD: - g.multi = -(len / 10); - if (g.multi) - g.nomovemsg = "You finish scrawling."; + multi = -(len / 10); + if (multi) + nomovemsg = "You finish scrawling."; break; } @@ -1144,8 +1142,8 @@ doengrave() maxelen--; if (!maxelen && *sp) { *sp = '\0'; - if (g.multi) - g.nomovemsg = "You cannot write any more."; + if (multi) + nomovemsg = "You cannot write any more."; You("are only able to write \"%s\".", ebuf); } } @@ -1154,11 +1152,11 @@ doengrave() Strcpy(buf, oep->engr_txt); (void) strncat(buf, ebuf, BUFSZ - (int) strlen(buf) - 1); /* Put the engraving onto the map */ - make_engr_at(u.ux, u.uy, buf, g.moves - g.multi, type); + make_engr_at(u.ux, u.uy, buf, moves - multi, type); if (post_engr_text[0]) pline("%s", post_engr_text); - if (doblind && !resists_blnd(&g.youmonst)) { + if (doblind && !resists_blnd(&youmonst)) { You("are blinded by the flash!"); make_blinded((long) rnd(50), FALSE); if (!Blind) @@ -1180,70 +1178,49 @@ sanitize_engravings() } void -save_engravings(nhfp) -NHFILE *nhfp; +save_engravings(fd, mode) +int fd, mode; { struct engr *ep, *ep2; unsigned no_more_engr = 0; for (ep = head_engr; ep; ep = ep2) { ep2 = ep->nxt_engr; - if (ep->engr_lth && ep->engr_txt[0] && perform_bwrite(nhfp)) { - if (nhfp->structlevel) { - bwrite(nhfp->fd, (genericptr_t)&(ep->engr_lth), sizeof(ep->engr_lth)); - bwrite(nhfp->fd, (genericptr_t)ep, sizeof(struct engr) + ep->engr_lth); - } - if (nhfp->fieldlevel) { - sfo_unsigned(nhfp, &(ep->engr_lth), "engravings", "engr_lth", 1); - sfo_engr(nhfp, ep, "engravings", "engr", 1); - sfo_str(nhfp, ep->engr_txt, "engravings", "engr_txt", ep->engr_lth); - } + if (ep->engr_lth && ep->engr_txt[0] && perform_bwrite(mode)) { + bwrite(fd, (genericptr_t) &ep->engr_lth, sizeof ep->engr_lth); + bwrite(fd, (genericptr_t) ep, sizeof (struct engr) + ep->engr_lth); } - if (release_data(nhfp)) + if (release_data(mode)) dealloc_engr(ep); } - if (perform_bwrite(nhfp)) { - if (nhfp->structlevel) - bwrite(nhfp->fd, (genericptr_t)&no_more_engr, sizeof no_more_engr); - if (nhfp->fieldlevel) - sfo_unsigned(nhfp, &no_more_engr, "engravings", "engr_lth", 1); - } - if (release_data(nhfp)) + if (perform_bwrite(mode)) + bwrite(fd, (genericptr_t) &no_more_engr, sizeof no_more_engr); + if (release_data(mode)) head_engr = 0; } void -rest_engravings(nhfp) -NHFILE *nhfp; +rest_engravings(fd) +int fd; { struct engr *ep; unsigned lth; head_engr = 0; while (1) { - if (nhfp->structlevel) - mread(nhfp->fd, (genericptr_t) <h, sizeof(unsigned)); - if (nhfp->fieldlevel) - sfi_unsigned(nhfp, <h, "engravings", "engr_lth", 1); - + mread(fd, (genericptr_t) <h, sizeof lth); if (lth == 0) return; ep = newengr(lth); - if (nhfp->structlevel) { - mread(nhfp->fd, (genericptr_t) ep, sizeof(struct engr) + lth); - } - if (nhfp->fieldlevel) { - sfi_engr(nhfp, ep, "engravings", "engr", 1); - ep->engr_txt = (char *) (ep + 1); - sfi_str(nhfp, ep->engr_txt, "engravings", "engr_txt", lth); - } + mread(fd, (genericptr_t) ep, sizeof (struct engr) + lth); ep->nxt_engr = head_engr; head_engr = ep; - ep->engr_txt = (char *) (ep + 1); /* Andreas Bormann */ - /* mark as finished for bones levels -- no problem for + ep->engr_txt = (char *) (ep + 1); /* Andreas Bormann */ + /* Mark as finished for bones levels -- no problem for * normal levels as the player must have finished engraving - * to be able to move again */ - ep->engr_time = g.moves; + * to be able to move again. + */ + ep->engr_time = moves; } } @@ -1348,7 +1325,7 @@ static const char blind_writing[][21] = { 0x69, 0x76, 0x6b, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, }; -static const char * +STATIC_OVL const char * blengr(VOID_ARGS) { return blind_writing[rn2(SIZE(blind_writing))]; From 7da9104facba0cb8869ca32bd7ee56f4259c5dd0 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 8 Nov 2019 12:35:13 -0500 Subject: [PATCH 188/529] one more deaf aware bit --- src/engrave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engrave.c b/src/engrave.c index d81144cc0..acd5247d1 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -792,7 +792,7 @@ doengrave() doblind = TRUE; } else Strcpy(post_engr_text, !Deaf - ? "You hear crackling!" + ? "You hear crackling!" /* Deaf-aware */ : "Your hair stands up!"); break; From a03e29ffb3f295ee7aafa7a9689e8c3901b40736 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 8 Nov 2019 12:38:37 -0500 Subject: [PATCH 189/529] deaf-aware fixup --- src/engrave.c | 147 +++++++++++++++++++++++++++++--------------------- 1 file changed, 85 insertions(+), 62 deletions(-) diff --git a/src/engrave.c b/src/engrave.c index acd5247d1..42cd49aa4 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -5,9 +5,11 @@ #include "hack.h" #include "lev.h" +#include "sfproto.h" -STATIC_VAR NEARDATA struct engr *head_engr; -STATIC_DCL const char *NDECL(blengr); + +static NEARDATA struct engr *head_engr; +static const char *NDECL(blengr); char * random_engraving(outbuf) @@ -159,7 +161,7 @@ boolean check_pit; return (boolean) ((!Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)) - && (!u.uundetected || !is_hider(youmonst.data) + && (!u.uundetected || !is_hider(g.youmonst.data) || u.umonnum == PM_TRAPPER)); } @@ -269,7 +271,7 @@ boolean strict; { register struct engr *ep = engr_at(x, y); - if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= moves) { + if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= g.moves) { return strict ? (fuzzymatch(ep->engr_txt, s, "", TRUE)) : (strstri(ep->engr_txt, s) != 0); } @@ -378,7 +380,7 @@ int x, y; et = ep->engr_txt; } You("%s: \"%s\".", (Blind) ? "feel the words" : "read", et); - if (context.run > 0) + if (g.context.run > 0) nomul(0); } } @@ -405,7 +407,7 @@ xchar e_type; ep->engr_txt = (char *) (ep + 1); Strcpy(ep->engr_txt, s); /* engraving Elbereth shows wisdom */ - if (!in_mklev && !strcmp(s, "Elbereth")) + if (!g.in_mklev && !strcmp(s, "Elbereth")) exercise(A_WIS, TRUE); ep->engr_time = e_time; ep->engr_type = e_type > 0 ? e_type : rnd(N_ENGRAVE - 1); @@ -494,8 +496,8 @@ doengrave() struct obj *otmp; /* Object selected with which to engrave */ char *writer; - multi = 0; /* moves consumed */ - nomovemsg = (char *) 0; /* occupation end message */ + g.multi = 0; /* moves consumed */ + g.nomovemsg = (char *) 0; /* occupation end message */ buf[0] = (char) 0; ebuf[0] = (char) 0; @@ -503,7 +505,7 @@ doengrave() maxelen = BUFSZ - 1; if (oep) oetype = oep->engr_type; - if (is_demon(youmonst.data) || youmonst.data->mlet == S_VAMPIRE) + if (is_demon(g.youmonst.data) || is_vampire(g.youmonst.data)) type = ENGR_BLOOD; /* Can the adventurer engrave at all? */ @@ -532,7 +534,7 @@ doengrave() You_cant("write here."); return 0; } - if (cantwield(youmonst.data)) { + if (cantwield(g.youmonst.data)) { You_cant("even hold anything!"); return 0; } @@ -544,10 +546,10 @@ doengrave() */ otmp = getobj(styluses, "write with"); - if (!otmp) /* otmp == zeroobj if fingers */ + if (!otmp) /* otmp == cg.zeroobj if fingers */ return 0; - if (otmp == &zeroobj) { + if (otmp == &cg.zeroobj) { Strcat(strcpy(fbuf, "your "), body_part(FINGERTIP)); writer = fbuf; } else @@ -576,7 +578,7 @@ doengrave() return 0; } if (IS_GRAVE(levl[u.ux][u.uy].typ)) { - if (otmp == &zeroobj) { /* using only finger */ + if (otmp == &cg.zeroobj) { /* using only finger */ You("would only make a small smudge on the %s.", surface(u.ux, u.uy)); return 0; @@ -762,7 +764,7 @@ doengrave() ? "Chips fly out from the headstone." : is_ice(u.ux, u.uy) ? "Ice chips fly up from the ice surface!" - : (level.locations[u.ux][u.uy].typ + : (g.level.locations[u.ux][u.uy].typ == DRAWBRIDGE_DOWN) ? "Splinters fly up from the bridge." : "Gravel flies up from the floor."); @@ -792,7 +794,7 @@ doengrave() doblind = TRUE; } else Strcpy(post_engr_text, !Deaf - ? "You hear crackling!" /* Deaf-aware */ + ? "You hear crackling!" /* Deaf-aware */ : "Your hair stands up!"); break; @@ -906,7 +908,7 @@ doengrave() } /* Something has changed the engraving here */ if (*buf) { - make_engr_at(u.ux, u.uy, buf, moves, type); + make_engr_at(u.ux, u.uy, buf, g.moves, type); if (!Blind) pline_The("engraving now reads: \"%s\".", buf); ptext = FALSE; @@ -1013,7 +1015,7 @@ doengrave() } /* Tell adventurer what is going on */ - if (otmp != &zeroobj) + if (otmp != &cg.zeroobj) You("%s the %s with %s.", everb, eloc, doname(otmp)); else You("%s the %s with your %s.", everb, eloc, body_part(FINGERTIP)); @@ -1069,21 +1071,21 @@ doengrave() */ switch (type) { default: - multi = -(len / 10); - if (multi) - nomovemsg = "You finish your weird engraving."; + g.multi = -(len / 10); + if (g.multi) + g.nomovemsg = "You finish your weird engraving."; break; case DUST: - multi = -(len / 10); - if (multi) - nomovemsg = "You finish writing in the dust."; + g.multi = -(len / 10); + if (g.multi) + g.nomovemsg = "You finish writing in the dust."; break; case HEADSTONE: case ENGRAVE: - multi = -(len / 10); + g.multi = -(len / 10); if (otmp->oclass == WEAPON_CLASS && (otmp->otyp != ATHAME || otmp->cursed)) { - multi = -len; + g.multi = -len; maxelen = ((otmp->spe + 3) * 2) + 1; /* -2 => 3, -1 => 5, 0 => 7, +1 => 9, +2 => 11 * Note: this does not allow a +0 anything (except an athame) @@ -1093,45 +1095,45 @@ doengrave() pline("%s dull.", Yobjnam2(otmp, "get")); costly_alteration(otmp, COST_DEGRD); if (len > maxelen) { - multi = -maxelen; + g.multi = -maxelen; otmp->spe = -3; } else if (len > 1) otmp->spe -= len >> 1; else otmp->spe -= 1; /* Prevent infinite engraving */ } else if (otmp->oclass == RING_CLASS || otmp->oclass == GEM_CLASS) { - multi = -len; + g.multi = -len; } - if (multi) - nomovemsg = "You finish engraving."; + if (g.multi) + g.nomovemsg = "You finish engraving."; break; case BURN: - multi = -(len / 10); - if (multi) - nomovemsg = is_ice(u.ux, u.uy) + g.multi = -(len / 10); + if (g.multi) + g.nomovemsg = is_ice(u.ux, u.uy) ? "You finish melting your message into the ice." : "You finish burning your message into the floor."; break; case MARK: - multi = -(len / 10); + g.multi = -(len / 10); if (otmp->otyp == MAGIC_MARKER) { maxelen = otmp->spe * 2; /* one charge / 2 letters */ if (len > maxelen) { Your("marker dries out."); otmp->spe = 0; - multi = -(maxelen / 10); + g.multi = -(maxelen / 10); } else if (len > 1) otmp->spe -= len >> 1; else otmp->spe -= 1; /* Prevent infinite graffiti */ } - if (multi) - nomovemsg = "You finish defacing the dungeon."; + if (g.multi) + g.nomovemsg = "You finish defacing the dungeon."; break; case ENGR_BLOOD: - multi = -(len / 10); - if (multi) - nomovemsg = "You finish scrawling."; + g.multi = -(len / 10); + if (g.multi) + g.nomovemsg = "You finish scrawling."; break; } @@ -1142,8 +1144,8 @@ doengrave() maxelen--; if (!maxelen && *sp) { *sp = '\0'; - if (multi) - nomovemsg = "You cannot write any more."; + if (g.multi) + g.nomovemsg = "You cannot write any more."; You("are only able to write \"%s\".", ebuf); } } @@ -1152,11 +1154,11 @@ doengrave() Strcpy(buf, oep->engr_txt); (void) strncat(buf, ebuf, BUFSZ - (int) strlen(buf) - 1); /* Put the engraving onto the map */ - make_engr_at(u.ux, u.uy, buf, moves - multi, type); + make_engr_at(u.ux, u.uy, buf, g.moves - g.multi, type); if (post_engr_text[0]) pline("%s", post_engr_text); - if (doblind && !resists_blnd(&youmonst)) { + if (doblind && !resists_blnd(&g.youmonst)) { You("are blinded by the flash!"); make_blinded((long) rnd(50), FALSE); if (!Blind) @@ -1178,49 +1180,70 @@ sanitize_engravings() } void -save_engravings(fd, mode) -int fd, mode; +save_engravings(nhfp) +NHFILE *nhfp; { struct engr *ep, *ep2; unsigned no_more_engr = 0; for (ep = head_engr; ep; ep = ep2) { ep2 = ep->nxt_engr; - if (ep->engr_lth && ep->engr_txt[0] && perform_bwrite(mode)) { - bwrite(fd, (genericptr_t) &ep->engr_lth, sizeof ep->engr_lth); - bwrite(fd, (genericptr_t) ep, sizeof (struct engr) + ep->engr_lth); + if (ep->engr_lth && ep->engr_txt[0] && perform_bwrite(nhfp)) { + if (nhfp->structlevel) { + bwrite(nhfp->fd, (genericptr_t)&(ep->engr_lth), sizeof(ep->engr_lth)); + bwrite(nhfp->fd, (genericptr_t)ep, sizeof(struct engr) + ep->engr_lth); + } + if (nhfp->fieldlevel) { + sfo_unsigned(nhfp, &(ep->engr_lth), "engravings", "engr_lth", 1); + sfo_engr(nhfp, ep, "engravings", "engr", 1); + sfo_str(nhfp, ep->engr_txt, "engravings", "engr_txt", ep->engr_lth); + } } - if (release_data(mode)) + if (release_data(nhfp)) dealloc_engr(ep); } - if (perform_bwrite(mode)) - bwrite(fd, (genericptr_t) &no_more_engr, sizeof no_more_engr); - if (release_data(mode)) + if (perform_bwrite(nhfp)) { + if (nhfp->structlevel) + bwrite(nhfp->fd, (genericptr_t)&no_more_engr, sizeof no_more_engr); + if (nhfp->fieldlevel) + sfo_unsigned(nhfp, &no_more_engr, "engravings", "engr_lth", 1); + } + if (release_data(nhfp)) head_engr = 0; } void -rest_engravings(fd) -int fd; +rest_engravings(nhfp) +NHFILE *nhfp; { struct engr *ep; unsigned lth; head_engr = 0; while (1) { - mread(fd, (genericptr_t) <h, sizeof lth); + if (nhfp->structlevel) + mread(nhfp->fd, (genericptr_t) <h, sizeof(unsigned)); + if (nhfp->fieldlevel) + sfi_unsigned(nhfp, <h, "engravings", "engr_lth", 1); + if (lth == 0) return; ep = newengr(lth); - mread(fd, (genericptr_t) ep, sizeof (struct engr) + lth); + if (nhfp->structlevel) { + mread(nhfp->fd, (genericptr_t) ep, sizeof(struct engr) + lth); + } + if (nhfp->fieldlevel) { + sfi_engr(nhfp, ep, "engravings", "engr", 1); + ep->engr_txt = (char *) (ep + 1); + sfi_str(nhfp, ep->engr_txt, "engravings", "engr_txt", lth); + } ep->nxt_engr = head_engr; head_engr = ep; - ep->engr_txt = (char *) (ep + 1); /* Andreas Bormann */ - /* Mark as finished for bones levels -- no problem for + ep->engr_txt = (char *) (ep + 1); /* Andreas Bormann */ + /* mark as finished for bones levels -- no problem for * normal levels as the player must have finished engraving - * to be able to move again. - */ - ep->engr_time = moves; + * to be able to move again */ + ep->engr_time = g.moves; } } @@ -1325,7 +1348,7 @@ static const char blind_writing[][21] = { 0x69, 0x76, 0x6b, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, }; -STATIC_OVL const char * +static const char * blengr(VOID_ARGS) { return blind_writing[rn2(SIZE(blind_writing))]; From 1281b3819d8b4a32ee5f0b68b91056c58b79d8fb Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 8 Nov 2019 15:39:21 -0500 Subject: [PATCH 190/529] remove an unused variable warning --- src/dungeon.c | 1 - win/win32/vs2017/NetHack.sln | 35 +--- win/win32/vs2017/NetHack.vcxproj | 37 +++- win/win32/vs2017/NetHackW.vcxproj | 39 +++- win/win32/vs2017/afterdgncomp.proj | 12 -- win/win32/vs2017/afterlevcomp.proj | 12 -- win/win32/vs2017/aftermakedefs.proj | 1 - win/win32/vs2017/dgncomp.vcxproj | 132 -------------- win/win32/vs2017/dirs.props | 1 + win/win32/vs2017/dlb.vcxproj | 2 +- win/win32/vs2017/files.props | 271 +++++++++++++--------------- win/win32/vs2017/levcomp.vcxproj | 95 ---------- win/win32/vs2017/makedefs.vcxproj | 4 +- win/win32/vs2017/nh340key.vcxproj | 2 +- win/win32/vs2017/nhdefkey.vcxproj | 2 +- win/win32/vs2017/nhraykey.vcxproj | 2 +- win/win32/vs2017/recover.vcxproj | 2 +- win/win32/vs2017/tile2bmp.vcxproj | 2 +- win/win32/vs2017/tilemap.vcxproj | 2 +- 19 files changed, 205 insertions(+), 449 deletions(-) delete mode 100644 win/win32/vs2017/afterdgncomp.proj delete mode 100644 win/win32/vs2017/afterlevcomp.proj delete mode 100644 win/win32/vs2017/dgncomp.vcxproj delete mode 100644 win/win32/vs2017/levcomp.vcxproj diff --git a/src/dungeon.c b/src/dungeon.c index bf518faba..324e50fef 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -807,7 +807,6 @@ init_dungeons() register s_level *x; struct proto_dungeon pd; struct level_map *lev_map; - struct version_info vers_info; (void) memset(&pd, 0, sizeof(struct proto_dungeon)); pd.n_levs = pd.n_brs = 0; diff --git a/win/win32/vs2017/NetHack.sln b/win/win32/vs2017/NetHack.sln index 0d5df6b89..5d7fdde7a 100644 --- a/win/win32/vs2017/NetHack.sln +++ b/win/win32/vs2017/NetHack.sln @@ -7,28 +7,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetHackW", "NetHackW.vcxpro ProjectSection(ProjectDependencies) = postProject {93F10526-209E-41D7-BBEA-775787876895} = {93F10526-209E-41D7-BBEA-775787876895} {63F9B82B-F589-4082-ABE5-D4F0682050AB} = {63F9B82B-F589-4082-ABE5-D4F0682050AB} - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} = {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945} {642BC75D-ABAF-403E-8224-7C725FD4CB42} = {642BC75D-ABAF-403E-8224-7C725FD4CB42} {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC} = {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC} - {8A3F81C7-2968-49A8-86BF-2669412AD7DE} = {8A3F81C7-2968-49A8-86BF-2669412AD7DE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dgncomp", "dgncomp.vcxproj", "{8A3F81C7-2968-49A8-86BF-2669412AD7DE}" - ProjectSection(ProjectDependencies) = postProject - {642BC75D-ABAF-403E-8224-7C725FD4CB42} = {642BC75D-ABAF-403E-8224-7C725FD4CB42} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dlb", "dlb.vcxproj", "{0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}" ProjectSection(ProjectDependencies) = postProject {63F9B82B-F589-4082-ABE5-D4F0682050AB} = {63F9B82B-F589-4082-ABE5-D4F0682050AB} - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} = {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} - {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945} - {8A3F81C7-2968-49A8-86BF-2669412AD7DE} = {8A3F81C7-2968-49A8-86BF-2669412AD7DE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "levcomp", "levcomp.vcxproj", "{9DD9C52E-E8C9-4533-BD22-83C055C0AABA}" - ProjectSection(ProjectDependencies) = postProject {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945} EndProjectSection EndProject @@ -38,13 +24,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "recover", "recover.vcxproj" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tile2bmp", "tile2bmp.vcxproj", "{642BC75D-ABAF-403E-8224-7C725FD4CB42}" ProjectSection(ProjectDependencies) = postProject - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} = {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tilemap", "tilemap.vcxproj", "{93F10526-209E-41D7-BBEA-775787876895}" ProjectSection(ProjectDependencies) = postProject - {8A3F81C7-2968-49A8-86BF-2669412AD7DE} = {8A3F81C7-2968-49A8-86BF-2669412AD7DE} + {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uudecode", "uudecode.vcxproj", "{63F9B82B-F589-4082-ABE5-D4F0682050AB}" @@ -55,11 +40,9 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetHack", "NetHack.vcxproj", "{609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}" ProjectSection(ProjectDependencies) = postProject {63F9B82B-F589-4082-ABE5-D4F0682050AB} = {63F9B82B-F589-4082-ABE5-D4F0682050AB} - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} = {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945} {6813477F-64B6-4B97-B230-438D0D233385} = {6813477F-64B6-4B97-B230-438D0D233385} {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC} = {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC} - {8A3F81C7-2968-49A8-86BF-2669412AD7DE} = {8A3F81C7-2968-49A8-86BF-2669412AD7DE} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nhdefkey", "nhdefkey.vcxproj", "{6813477F-64B6-4B97-B230-438D0D233385}" @@ -102,14 +85,6 @@ Global {CEC5D360-8804-454F-8591-002184C23499}.Release|Win32.Build.0 = Release|Win32 {CEC5D360-8804-454F-8591-002184C23499}.Release|x64.ActiveCfg = Release|x64 {CEC5D360-8804-454F-8591-002184C23499}.Release|x64.Build.0 = Release|x64 - {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Debug|Win32.ActiveCfg = Debug|Win32 - {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Debug|Win32.Build.0 = Debug|Win32 - {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Debug|x64.ActiveCfg = Debug|x64 - {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Debug|x64.Build.0 = Debug|x64 - {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Release|Win32.ActiveCfg = Release|Win32 - {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Release|Win32.Build.0 = Release|Win32 - {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Release|x64.ActiveCfg = Release|x64 - {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Release|x64.Build.0 = Release|x64 {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Debug|Win32.ActiveCfg = Debug|Win32 {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Debug|Win32.Build.0 = Debug|Win32 {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Debug|x64.ActiveCfg = Debug|x64 @@ -118,14 +93,6 @@ Global {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Release|Win32.Build.0 = Release|Win32 {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Release|x64.ActiveCfg = Release|x64 {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Release|x64.Build.0 = Release|x64 - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Debug|Win32.ActiveCfg = Debug|Win32 - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Debug|Win32.Build.0 = Debug|Win32 - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Debug|x64.ActiveCfg = Debug|x64 - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Debug|x64.Build.0 = Debug|x64 - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Release|Win32.ActiveCfg = Release|Win32 - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Release|Win32.Build.0 = Release|Win32 - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Release|x64.ActiveCfg = Release|x64 - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Release|x64.Build.0 = Release|x64 {BA3DD34C-04B7-40D0-B373-9329AA9E8945}.Debug|Win32.ActiveCfg = Debug|Win32 {BA3DD34C-04B7-40D0-B373-9329AA9E8945}.Debug|Win32.Build.0 = Debug|Win32 {BA3DD34C-04B7-40D0-B373-9329AA9E8945}.Debug|x64.ActiveCfg = Debug|x64 diff --git a/win/win32/vs2017/NetHack.vcxproj b/win/win32/vs2017/NetHack.vcxproj index 4b9563347..e12110c19 100644 --- a/win/win32/vs2017/NetHack.vcxproj +++ b/win/win32/vs2017/NetHack.vcxproj @@ -45,7 +45,7 @@ Default Speed true - $(WinWin32Dir);$(IncDir);$(SysWinntDir);$(SysShareDir);$(WinShareDir);%(AdditionalIncludeDirectories) + $(WinWin32Dir);$(IncDir);$(SysWinntDir);$(SysShareDir);$(WinShareDir);$(LuaDir);%(AdditionalIncludeDirectories) TILES;WIN32CON;DLB;MSWIN_GRAPHICS;SAFEPROCS;_LIB;%(PreprocessorDefinitions) @@ -53,6 +53,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -111,6 +144,8 @@ + + diff --git a/win/win32/vs2017/NetHackW.vcxproj b/win/win32/vs2017/NetHackW.vcxproj index 0f577b224..12b4dbd62 100644 --- a/win/win32/vs2017/NetHackW.vcxproj +++ b/win/win32/vs2017/NetHackW.vcxproj @@ -31,7 +31,7 @@ /Gs /Oi- %(AdditionalOptions) Disabled true - $(WinWin32Dir);$(IncDir);$(SysWinntDir);$(SysShareDir);$(WinShareDir);%(AdditionalIncludeDirectories) + $(WinWin32Dir);$(IncDir);$(SysWinntDir);$(SysShareDir);$(WinShareDir);$(LuaDir);%(AdditionalIncludeDirectories) TILES;_WINDOWS;DLB;MSWIN_GRAPHICS;SAFEPROCS;NOTTYGRAPHICS;%(PreprocessorDefinitions) @@ -47,6 +47,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -105,6 +138,8 @@ + + @@ -229,4 +264,4 @@ - \ No newline at end of file + diff --git a/win/win32/vs2017/afterdgncomp.proj b/win/win32/vs2017/afterdgncomp.proj deleted file mode 100644 index 38aee3247..000000000 --- a/win/win32/vs2017/afterdgncomp.proj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - diff --git a/win/win32/vs2017/afterlevcomp.proj b/win/win32/vs2017/afterlevcomp.proj deleted file mode 100644 index c0d8dd464..000000000 --- a/win/win32/vs2017/afterlevcomp.proj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - diff --git a/win/win32/vs2017/aftermakedefs.proj b/win/win32/vs2017/aftermakedefs.proj index 4ebea25a4..31a965de3 100644 --- a/win/win32/vs2017/aftermakedefs.proj +++ b/win/win32/vs2017/aftermakedefs.proj @@ -13,7 +13,6 @@ - diff --git a/win/win32/vs2017/dgncomp.vcxproj b/win/win32/vs2017/dgncomp.vcxproj deleted file mode 100644 index cb2fc0375..000000000 --- a/win/win32/vs2017/dgncomp.vcxproj +++ /dev/null @@ -1,132 +0,0 @@ - - - - - {8A3F81C7-2968-49A8-86BF-2669412AD7DE} - - - - - - - - - - - - - - - - - - - - - - - $(IncDir);$(SysWinntDir);$(SysShareDir);%(AdditionalIncludeDirectories) - WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Lex; - Yacc; - $(BuildDependsOn); - - - - - - - NoLex; - NoYacc; - $(BuildDependsOn); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win/win32/vs2017/dirs.props b/win/win32/vs2017/dirs.props index 0ebb31a25..bd1c09da8 100644 --- a/win/win32/vs2017/dirs.props +++ b/win/win32/vs2017/dirs.props @@ -10,6 +10,7 @@ $(RootDir)dat\ $(RootDir)doc\ $(RootDir)include\ + $(RootDir)..\LUA-5.3.5\src\ $(RootDir)src\ $(RootDir)sys\ $(RootDir)util\ diff --git a/win/win32/vs2017/dlb.vcxproj b/win/win32/vs2017/dlb.vcxproj index d189827b5..ed248279b 100644 --- a/win/win32/vs2017/dlb.vcxproj +++ b/win/win32/vs2017/dlb.vcxproj @@ -25,7 +25,7 @@ - $(IncDir);$(SysWinntDir);$(SysShareDir);%(AdditionalIncludeDirectories) + $(IncDir);$(SysWinntDir);$(SysShareDir);$(LuaDir);%(AdditionalIncludeDirectories) WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) diff --git a/win/win32/vs2017/files.props b/win/win32/vs2017/files.props index 483ec1eb1..a88fc5bfa 100644 --- a/win/win32/vs2017/files.props +++ b/win/win32/vs2017/files.props @@ -23,156 +23,128 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -220,8 +192,7 @@ - - + diff --git a/win/win32/vs2017/levcomp.vcxproj b/win/win32/vs2017/levcomp.vcxproj deleted file mode 100644 index 8cb2fb75d..000000000 --- a/win/win32/vs2017/levcomp.vcxproj +++ /dev/null @@ -1,95 +0,0 @@ - - - - - {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} - - - - - - - - - - - - - - - - - - - - - - - $(IncDir);$(SysWinntDir);$(SysShareDir);%(AdditionalIncludeDirectories) - WIN32CON;DLB;MSWIN_GRAPHICS;YY_NO_UNISTD_H;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - Lex; - Yacc; - $(BuildDependsOn); - - - - - - - NoLex; - NoYacc; - $(BuildDependsOn); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win/win32/vs2017/makedefs.vcxproj b/win/win32/vs2017/makedefs.vcxproj index 1f6c1c49f..20b9ea338 100644 --- a/win/win32/vs2017/makedefs.vcxproj +++ b/win/win32/vs2017/makedefs.vcxproj @@ -25,7 +25,7 @@ - $(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories) + $(IncDir);$(SysWinntDir);$(LuaDir);%(AdditionalIncludeDirectories) WIN32CON;DLB;MSWIN_GRAPHICS;ENUM_PM;%(PreprocessorDefinitions) @@ -59,4 +59,4 @@ - + \ No newline at end of file diff --git a/win/win32/vs2017/nh340key.vcxproj b/win/win32/vs2017/nh340key.vcxproj index 36278a8a3..3f54c336a 100644 --- a/win/win32/vs2017/nh340key.vcxproj +++ b/win/win32/vs2017/nh340key.vcxproj @@ -30,7 +30,7 @@ - $(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories) + $(IncDir);$(SysWinntDir);$(LuaDir);%(AdditionalIncludeDirectories) $(ToolsDir)$(TargetName).lib diff --git a/win/win32/vs2017/nhdefkey.vcxproj b/win/win32/vs2017/nhdefkey.vcxproj index 71334f591..3201aa79f 100644 --- a/win/win32/vs2017/nhdefkey.vcxproj +++ b/win/win32/vs2017/nhdefkey.vcxproj @@ -30,7 +30,7 @@ - $(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories) + $(IncDir);$(SysWinntDir);$(LuaDir);%(AdditionalIncludeDirectories) $(ToolsDir)$(TargetName).lib diff --git a/win/win32/vs2017/nhraykey.vcxproj b/win/win32/vs2017/nhraykey.vcxproj index 5e0e43b2d..e37c6a426 100644 --- a/win/win32/vs2017/nhraykey.vcxproj +++ b/win/win32/vs2017/nhraykey.vcxproj @@ -30,7 +30,7 @@ - $(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories) + $(IncDir);$(SysWinntDir);$(LuaDir);%(AdditionalIncludeDirectories) $(ToolsDir)$(TargetName).lib diff --git a/win/win32/vs2017/recover.vcxproj b/win/win32/vs2017/recover.vcxproj index f9cc6de8a..d7f593065 100644 --- a/win/win32/vs2017/recover.vcxproj +++ b/win/win32/vs2017/recover.vcxproj @@ -28,7 +28,7 @@ - $(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories) + $(IncDir);$(SysWinntDir);$(LuaDir);%(AdditionalIncludeDirectories) WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) diff --git a/win/win32/vs2017/tile2bmp.vcxproj b/win/win32/vs2017/tile2bmp.vcxproj index ab1145c70..c5d14ebf2 100644 --- a/win/win32/vs2017/tile2bmp.vcxproj +++ b/win/win32/vs2017/tile2bmp.vcxproj @@ -25,7 +25,7 @@ - $(IncDir);$(SysWinntDir);$(SysShareDir);%(AdditionalIncludeDirectories) + $(IncDir);$(SysWinntDir);$(SysShareDir);$(LuaDir);%(AdditionalIncludeDirectories) WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) diff --git a/win/win32/vs2017/tilemap.vcxproj b/win/win32/vs2017/tilemap.vcxproj index cb0ba0bd4..139dd17a2 100644 --- a/win/win32/vs2017/tilemap.vcxproj +++ b/win/win32/vs2017/tilemap.vcxproj @@ -25,7 +25,7 @@ - $(IncDir);$(SysWinntDir);$(SysShareDir);%(AdditionalIncludeDirectories) + $(IncDir);$(SysWinntDir);$(SysShareDir);$(LuaDir);%(AdditionalIncludeDirectories) WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) From 817efa43811ab91936a29f685032398fe8a98767 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 8 Nov 2019 16:09:18 -0500 Subject: [PATCH 191/529] updates to README and doc/fixes37.0 --- README | 47 ++++++++++++----------------------------------- doc/fixes37.0 | 4 ++++ 2 files changed, 16 insertions(+), 35 deletions(-) diff --git a/README b/README index a8746c435..ea0c6f10a 100644 --- a/README +++ b/README @@ -1,13 +1,12 @@ - NetHack 3.6.3 work-in-progress -- General information + NetHack 3.7.0 work-in-progress -- General information -NetHack 3.6 is an enhancement to the dungeon exploration game NetHack, +NetHack 3.7 is an enhancement to the dungeon exploration game NetHack, which is a distant descendent of Rogue and Hack, and a direct descendent of -NetHack 3.4 as there was no NetHack 3.5 release. +NetHack 3.6. -NetHack 3.6.3 work-in-progress is not an official release of NetHack. It -currently contains a collection of over 140 bug fixes to NetHack 3.6.2 -and more than 16 enhancements and community contributions. The file -doc/fixes36.3 in the source distribution has a full list of them. +NetHack 3.7.0 work-in-progress is not an official release of NetHack. It +currently contains a number of enhancements to NetHack 3.6.3. The file +doc/fixes37.0 in the source distribution has a full list of them. The text in there was written for the development team's own use and is provided "as is", so please do not ask us to further explain the entries in that file. Some entries might be considered "spoilers", particularly in @@ -16,34 +15,12 @@ the "new features" section. Below you will find some other general notes that were not considered spoilers: - * Fixed stale 'thrownobj' pointer for returning thrown aklys while engulfed - * Fixed uarmh null pointer dereference if a helm of opposite alignment came - * off due to being polymorphed - * Fixed 'object lost' panic when attempting to crawl of of the water during - * emergency disrobing/dropping - * Running now stops when moving over engravings so you can tell where they are - * Fixed detection of unseen/secret doors which failed to find monsters hiding - * under objects and failed to find monsters hiding at trap locations - * Ensured fatal status conditions made it to disclosure and/or dumplog - * Fixed "Bad fruit #N" warnings when saving bones with 'perm_invent' On - * Fixed it so yellow dragons don't have green breath - * Added several grammar corrections - * Improved recognition of deafness for several situations including the - * playing of musical instruments and bribing negotiations with demon lords - * Fixed ignoring of god's wrath when hero injured himself during altar kick - * Fixed several cases where persistent inventory window was not updated - * Fixed temple priests or shopkeepers moving over other monsters - * Ensured that thrown or kicked objects will end up in bones - * Made water go all the way to the edges of level on the Plane of Water - * Made clouds disrupt line of sight along the edges of the Plane of Air - * Improved and expanded usage of status highlighting percentage rules - * Added more than 15 improvements and fixes to the curses window port - * Added and documented significant changes to default directory choices for - * the Windows platform - * Improved the layout and display of the player selection dialog used on the - * Windows graphical implementation - * Allowed the msdos implementation to build with curses and PDCurses - * Over 100 other fixes and improvements + * automatic annotation "gateway to Moloch's Sanctum" for vibrating square level + once that square's location becomes known (found or magic mapped); + goes away once sanctum temple is found (entered or high altar mapped) + * savefile: add support to deconstruct internal data structures down into their + individual fields and save those fields instead of the entire struct + * savefile: use little-endian format for fields where that makes a difference - - - - - - - - - - - diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 2e2f93d51..f54ab56a1 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -24,6 +24,9 @@ if a killer bee encounters a lump of royal jelly and there is no queen bee on automatic annotation "gateway to Moloch's Sanctum" for vibrating square level once that square's location becomes known (found or magic mapped); goes away once sanctum temple is found (entered or high altar mapped) +savefile: add support to deconstruct internal data structures down into their + individual fields and save those fields instead of the entire struct +savefile: use little-endian format for fields where that makes a difference Platform- and/or Interface-Specific New Features @@ -40,3 +43,4 @@ move majority of global variables into instance_globals struct g move zeroobj, zeromonst, zeroany into const_globals struct cg remove STATIC_DCL, STATIC_OVL, STATIC_VAR, STATIC_PTR + From b15e4782c5c363f978b037eb96da9856200c0e8d Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 8 Nov 2019 16:12:35 -0500 Subject: [PATCH 192/529] add a fixes37.0 entry for the lua changes in branch --- doc/fixes37.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index f54ab56a1..ce51bf64f 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -27,6 +27,8 @@ automatic annotation "gateway to Moloch's Sanctum" for vibrating square level savefile: add support to deconstruct internal data structures down into their individual fields and save those fields instead of the entire struct savefile: use little-endian format for fields where that makes a difference +replace build-time level compiler and dungeon compiler with run-time loading of + the dungeon and level descriptions and interpreting them via LUA Platform- and/or Interface-Specific New Features From 9de1ecd831826bdf9b77a5f77cff597460e54ef4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 8 Nov 2019 16:59:38 -0500 Subject: [PATCH 193/529] patchlevel.h comment bit --- include/patchlevel.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/patchlevel.h b/include/patchlevel.h index b4794e590..c43ba0fc8 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -33,6 +33,14 @@ */ #define VERSION_COMPATIBILITY 0x03070000L +/****************************************************************************/ +/* Version 3.7.x */ + +/* + * NetHack 3.7.0, + * + */ + /****************************************************************************/ /* Version 3.6.x */ From 71be3f81638e8502b47e418b86b9e4c049349472 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 8 Nov 2019 17:49:07 -0500 Subject: [PATCH 194/529] some Makefile.msc macro shenanigans --- sys/winnt/Makefile.msc | 44 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 762d8a81e..bb0531e88 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -93,7 +93,7 @@ PDCURSES_TOP=..\..\pdcurses # you'll need to specify the correct spot below in order to # successfully build NetHack-3.7. # -LUATOP=..\..\lua-5.3.5 +#LUATOP=..\..\lua-5.3.5 # #============================================================================== # This marks the end of the BUILD DECISIONS section. @@ -319,13 +319,33 @@ OPTIONS_FILE = $(DAT)\options # Source from http://www.lua.org/ftp/lua-5.3.5.tar.gz #================================================================= +!IFDEF LUATOP +LUATMP = $(LUATOP:..\..\lua-=) #strip leading "..\..\lua-" +LUATMP = $(LUATMP:-beta=) #strip suffix if exists "-beta" +!IF "$(LUATMP)" == "5.4.0" +LUAVER = 5.4.0 +!ENDIF +!ELSE +!ERROR NetHack 3.7 requires LUA so LUATOP must be defined +!ENDIF + +!IFNDEF LUAVER +LUATMP = $(LUATOP:..\..\LUA-=) #strip leading "..\..\LUA-" +LUATMP = $(LUATMP:-BETA=) #strip suffix if exists "-BETA" +!IF "$(LUATMP)" == "5.4.0" +LUAVER = 5.4.0 +!ELSE +LUAVER = 5.3.5 +!ENDIF +!ENDIF + LUASRC = $(LUATOP)\src -LUALIB = $(O)lua5.3.5-static.lib -LUADLL = $(O)lua5.3.5.dll +LUALIB = $(O)lua$(LUAVER)-static.lib +LUADLL = $(O)lua$(LUAVER).dll LUAINCL = /I$(LUASRC) LUATARGETS = lua.exe luac.exe $(LUADLL) $(LUALIB) -LUASRCFILES = lapi.c lauxlib.c lbaselib.c lbitlib.c lcode.c \ +LUASRCFILES = lapi.c lauxlib.c lbaselib.c lcode.c \ lcorolib.c lctype.c ldblib.c ldebug.c ldo.c \ ldump.c lfunc.c lgc.c linit.c liolib.c llex.c \ lmathlib.c lmem.c loadlib.c lobject.c lopcodes.c \ @@ -333,7 +353,7 @@ LUASRCFILES = lapi.c lauxlib.c lbaselib.c lbitlib.c lcode.c \ ltable.c ltablib.c ltm.c lundump.c lutf8lib.c \ lvm.c lzio.c -LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o \ +LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o \ $(O)lcode.o $(O)lcorolib.o $(O)lctype.o $(O)ldblib.o \ $(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \ $(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o \ @@ -342,6 +362,14 @@ LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o \ $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \ $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o +!IF "$(LUAVER)" == "5.3.5" +LUASRCFILES = $(LUASRCFILES) lbitlib.c +LUAOBJFILES = $(LUAOBJFILES) $(O)lbitlib.o +!ELSEIF "$(LUAVER)" == "5.4.0" +# 5.4.0 adds header files ljumptab.h and lopnames.h +# and removes lbitlib.c +!ENDIF + !IF "$(ADD_CURSES)" == "Y" #===============-================================================= # PDCurses build macros @@ -1365,10 +1393,10 @@ lua.exe: $(O)lua.o $(LUALIB) luac.exe: $(O)luac.o $(LUALIB) link /OUT:$@ $(O)luac.o $(LUALIB) -$(O)lua5.3.5.dll: $(LUAOBJFILES) - link /DLL /IMPLIB:lua5.3.5.lib /OUT:$@ $(LUAOBJFILES) +$(O)lua$(LUAVER).dll: $(LUAOBJFILES) + link /DLL /IMPLIB:lua$(LUAVER).lib /OUT:$@ $(LUAOBJFILES) -$(O)lua5.3.5-static.lib: $(LUAOBJFILES) +$(O)lua$(LUAVER)-static.lib: $(LUAOBJFILES) lib /OUT:$@ $(LUAOBJFILES) $(O)lua.o: $(LUASRC)\lua.c From 2709a395be36ef95a6fe2f720d3de62af48714ce Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 8 Nov 2019 18:01:53 -0500 Subject: [PATCH 195/529] more makefile.msc --- sys/winnt/Makefile.msc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index bb0531e88..9b4fce411 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -93,7 +93,7 @@ PDCURSES_TOP=..\..\pdcurses # you'll need to specify the correct spot below in order to # successfully build NetHack-3.7. # -#LUATOP=..\..\lua-5.3.5 +LUATOP=..\..\lua-5.3.5 # #============================================================================== # This marks the end of the BUILD DECISIONS section. From 0615387f952cc24990b543482e46724db2ce61e8 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 9 Nov 2019 01:07:09 -0800 Subject: [PATCH 196/529] fix #H9391 - slippery gloves Slippery fingers would transfer from bare hands to gloved hands if you put gloves on. The reverse, transfering from gloves to bare hands when taking gloves off, was already being prevented for directly taking them off, but still allowed the slipperiness to transfer when gloves were lost. This prevents putting on gloves when fingers are slippery and attempts to handle cases where gloves get unworn by ways other than 'T' (or 'R') or 'A'. There's no slippery attribute for objects (way too much work for too little value); slippery gloves is just the combination of wearing gloves and having slippery fingers (which now has to have happened while already wearing those gloves). This changes inventory to use "(being worn; slippery)" when applicable and much of the patch deals with funnelling Glib changes through new make_glib() to try to make sure that persistent inventory adds or removes "; slippery" right away when changes happen. If gloves are taken off involuntarily (shapechange to a form that can't wear them, destruction via scroll of destroy armor or monster spell of same or via overenchantment, theft), slippery fingers ends right away instead of the usual few turns later. --- doc/fixes36.3 | 5 ++++- include/extern.h | 4 +++- src/apply.c | 25 ++++++++++++++++--------- src/cmd.c | 21 +++++++++++++++------ src/do_wear.c | 32 +++++++++++++++++++++++++++----- src/eat.c | 8 +++++--- src/objnam.c | 31 +++++++++++++++++++++++++++++-- src/polyself.c | 5 +++-- src/potion.c | 18 +++++++++++++++--- src/timeout.c | 5 ++++- 10 files changed, 121 insertions(+), 33 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index d8c5ae5ce..707de2ca2 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.167 $ $NHDT-Date: 1573178084 2019/11/08 01:54:44 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.168 $ $NHDT-Date: 1573290414 2019/11/09 09:06:54 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -218,6 +218,9 @@ when dipping into holy/unholy water while blind (where the glow message is suppressed), clear dipped item's bknown flag unless water potion's bless/curse state is known playing music while hallucinating: message misspelled "butterflies" +putting on gloves while having slippery fingers transfered slipperiness to + those gloves; taking off slippery gloves directly was disallowed but + losing them in other ways transfered slipperiness to bare fingers Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/include/extern.h b/include/extern.h index 989f07f50..ebb68eb40 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1571436000 2019/10/18 22:00:00 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.730 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1573290414 2019/11/09 09:06:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.736 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1750,6 +1750,7 @@ E int FDECL(rnd_class, (int, int)); E const char *FDECL(suit_simple_name, (struct obj *)); E const char *FDECL(cloak_simple_name, (struct obj *)); E const char *FDECL(helm_simple_name, (struct obj *)); +E const char *FDECL(gloves_simple_name, (struct obj *)); E const char *FDECL(mimic_obj_name, (struct monst *)); E char *FDECL(safe_qbuf, (char *, const char *, const char *, struct obj *, char *(*)(OBJ_P), char *(*)(OBJ_P), const char *)); @@ -1967,6 +1968,7 @@ E void FDECL(make_blinded, (long, BOOLEAN_P)); E void NDECL(toggle_blindness); E boolean FDECL(make_hallucinated, (long, BOOLEAN_P, long)); E void FDECL(make_deaf, (long, BOOLEAN_P)); +E void FDECL(make_glib, (int)); E void NDECL(self_invis_message); E int NDECL(dodrink); E int FDECL(dopotion, (struct obj *)); diff --git a/src/apply.c b/src/apply.c index 6c135f110..a7f1b9a15 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 apply.c $NHDT-Date: 1571531886 2019/10/20 00:38:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.279 $ */ +/* NetHack 3.6 apply.c $NHDT-Date: 1573290415 2019/11/09 09:06:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.282 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -105,8 +105,8 @@ struct obj *obj; switch (rn2(3)) { case 2: - old = Glib; - incr_itimeout(&Glib, rn1(10, 3)); + old = (Glib & TIMEOUT); + make_glib((int) old + rn1(10, 3)); /* + 3..12 */ Your("%s %s!", makeplural(body_part(HAND)), (old ? "are filthier than ever" : "get slimy")); if (is_wet_towel(obj)) @@ -145,8 +145,9 @@ struct obj *obj; } if (Glib) { - Glib = 0; - You("wipe off your %s.", makeplural(body_part(HAND))); + make_glib(0); + You("wipe off your %s.", + !uarmg ? makeplural(body_part(HAND)) : gloves_simple_name(uarmg)); if (is_wet_towel(obj)) dry_a_towel(obj, -1, drying_feedback); return 1; @@ -2298,6 +2299,9 @@ struct obj *obj; } if (obj->spe > 0) { + const char *fingers_or_gloves; + int oldglib; + if ((obj->cursed || Fumbling) && !rn2(2)) { consume_obj_charge(obj, TRUE); @@ -2313,17 +2317,20 @@ struct obj *obj; return; consume_obj_charge(obj, TRUE); + fingers_or_gloves = !uarmg ? makeplural(body_part(FINGER)) + : gloves_simple_name(uarmg); + oldglib = (int) (Glib & TIMEOUT); if (otmp != &zeroobj) { You("cover %s with a thick layer of grease.", yname(otmp)); otmp->greased = 1; if (obj->cursed && !nohands(youmonst.data)) { - incr_itimeout(&Glib, rnd(15)); + make_glib(oldglib + rn1(6, 10)); /* + 10..15 */ pline("Some of the grease gets all over your %s.", - makeplural(body_part(HAND))); + fingers_or_gloves); } } else { - incr_itimeout(&Glib, rnd(15)); - You("coat your %s with grease.", makeplural(body_part(FINGER))); + make_glib(oldglib + rn1(11, 5)); /* + 5..15 */ + You("coat your %s with grease.", fingers_or_gloves); } } else { if (obj->known) diff --git a/src/cmd.c b/src/cmd.c index 0d65bb022..f62e4e1ff 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1572141702 2019/10/27 02:01:42 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.347 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1573290415 2019/11/09 09:06:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.348 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -155,7 +155,6 @@ STATIC_PTR int NDECL(wiz_level_change); STATIC_PTR int NDECL(wiz_show_seenv); STATIC_PTR int NDECL(wiz_show_vision); STATIC_PTR int NDECL(wiz_smell); -STATIC_PTR int NDECL(wiz_intrinsic); STATIC_PTR int NDECL(wiz_show_wmodes); STATIC_DCL void NDECL(wiz_map_levltyp); STATIC_DCL void NDECL(wiz_levltyp_legend); @@ -1485,15 +1484,21 @@ wiz_intrinsic(VOID_ARGS) = &mons[context.warntype.speciesidx]; } goto def_feedback; + case GLIB: + /* slippery fingers applies to gloves if worn at the time + so persistent inventory might need updating */ + make_glib((int) newtimeout); + goto def_feedback; case LEVITATION: case FLYING: float_vs_flight(); /*FALLTHRU*/ default: - def_feedback: + def_feedback: pline("Timeout for %s %s %d.", propertynames[i].prop_name, oldtimeout ? "increased by" : "set to", amt); - incr_itimeout(&u.uprops[p].intrinsic, amt); + if (p != GLIB) + incr_itimeout(&u.uprops[p].intrinsic, amt); break; } context.botl = 1; /* probably not necessary... */ @@ -2472,7 +2477,11 @@ int final; } } if (Glib) { - Sprintf(buf, "slippery %s", makeplural(body_part(FINGER))); + Sprintf(buf, "slippery %s", + !uarmg ? makeplural(body_part(FINGER)) + : gloves_simple_name(uarmg)); + if (wizard) + Sprintf(eos(buf), " (%ld)", (Glib & TIMEOUT)); you_have(buf, ""); } if (Fumbling) { @@ -5046,7 +5055,7 @@ const char *s; char dirsym; int is_mov; -retry: + retry: if (in_doagain || *readchar_queue) dirsym = readchar(); else diff --git a/src/do_wear.c b/src/do_wear.c index edf4d6faf..27661c677 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_wear.c $NHDT-Date: 1570566377 2019/10/08 20:26:17 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.111 $ */ +/* NetHack 3.6 do_wear.c $NHDT-Date: 1573290416 2019/11/09 09:06:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.112 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -562,6 +562,14 @@ Gloves_off(VOID_ARGS) context.takeoff.cancelled_don = FALSE; (void) encumber_msg(); /* immediate feedback for GoP */ + /* usually can't remove gloves when they're slippery but it can + be done by having them fall off (polymorph), stolen, or + destroyed (scroll, overenchantment, monster spell); if that + happens, 'cure' slippery fingers so that it doesn't transfer + from gloves to bare hands */ + if (Glib) + make_glib(0); /* for update_inventory() */ + /* prevent wielding cockatrice when not wearing gloves */ if (uwep && uwep->otyp == CORPSE) wielding_corpse(uwep, on_purpose); @@ -1586,7 +1594,7 @@ struct obj *otmp; else if (is_shield(otmp)) (void) Shield_off(); else - setworn((struct obj *) 0, otmp->owornmask & W_ARMOR); + (void) Armor_off(); off_msg(otmp); } context.takeoff.mask = context.takeoff.what = 0L; @@ -1736,6 +1744,13 @@ boolean noisy; You("cannot wear gloves over your %s.", is_sword(uwep) ? c_sword : c_weapon); err++; + } else if (Glib) { + /* prevent slippery bare fingers from transferring to + gloved fingers */ + if (noisy) + Your("%s are too slippery to pull on %s.", + makeplural(body_part(FINGER)), gloves_simple_name(otmp)); + err++; } else *mask = W_ARMG; } else if (is_shirt(otmp)) { @@ -1860,10 +1875,16 @@ struct obj *obj; } } while (!mask); } + if (uarmg && Glib) { + Your( + "%s are too slippery to remove, so you cannot put on the ring.", + gloves_simple_name(uarmg)); + return 1; /* always uses move */ + } if (uarmg && uarmg->cursed) { res = !uarmg->bknown; set_bknown(uarmg, 1); - You("cannot remove your gloves to put on the ring."); + You("cannot remove your %s to put on the ring.", c_gloves); return res; /* uses move iff we learned gloves are cursed */ } if (uwep) { @@ -2264,8 +2285,9 @@ register struct obj *otmp; set_bknown(uwep, 1); return 0; } else if (Glib) { - You_cant("take off the slippery %s with your slippery %s.", - c_gloves, makeplural(body_part(FINGER))); + pline("%s %s are too slippery to take off.", + uarmg->unpaid ? "The" : "Your", /* simplified Shk_Your() */ + gloves_simple_name(uarmg)); return 0; } } diff --git a/src/eat.c b/src/eat.c index efc04cdfb..3d1ca80fa 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 eat.c $NHDT-Date: 1561233801 2019/06/22 20:03:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.203 $ */ +/* NetHack 3.6 eat.c $NHDT-Date: 1573290417 2019/11/09 09:06:57 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.204 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1378,9 +1378,11 @@ const char *mesg; if (tintxts[r].greasy) { /* Assume !Glib, because you can't open tins when Glib. */ - incr_itimeout(&Glib, rnd(15)); + make_glib(rn1(11, 5)); /* 5..15 */ pline("Eating %s food made your %s very slippery.", - tintxts[r].txt, makeplural(body_part(FINGER))); + tintxts[r].txt, + !uarmg ? makeplural(body_part(FINGER)) + : gloves_simple_name(uarmg)); } } else { /* spinach... */ diff --git a/src/objnam.c b/src/objnam.c index 5903e3b9b..765414417 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 objnam.c $NHDT-Date: 1571436005 2019/10/18 22:00:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.247 $ */ +/* NetHack 3.6 objnam.c $NHDT-Date: 1573290418 2019/11/09 09:06:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.248 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1059,7 +1059,7 @@ unsigned doname_flags; Strcat(bp, " (being worn)"); break; case ARMOR_CLASS: - if (obj->owornmask & W_ARMOR) + if (obj->owornmask & W_ARMOR) { Strcat(bp, (obj == uskin) ? " (embedded in your skin)" /* in case of perm_invent update while Wear/Takeoff is in progress; check doffing() before donning() @@ -1067,6 +1067,13 @@ unsigned doname_flags; : doffing(obj) ? " (being doffed)" : donning(obj) ? " (being donned)" : " (being worn)"); + /* slippery fingers is an intrinsic condition of the hero + rather than extrinsic condition of objects, but gloves + are described as slippery when hero has slippery fingers */ + if (obj == uarmg && Glib) /* just appended "(something)", + * change to "(something; slippery)" */ + Strcpy(rindex(bp, ')'), "; slippery)"); + } /*FALLTHRU*/ case WEAPON_CLASS: if (ispoisoned) @@ -4182,6 +4189,26 @@ struct obj *helmet; return (helmet && !is_metallic(helmet)) ? "hat" : "helm"; } +/* gloves vs gauntlets; depends upon discovery state */ +const char * +gloves_simple_name(gloves) +struct obj *gloves; +{ + static const char gauntlets[] = "gauntlets"; + + if (gloves && gloves->dknown) { + int otyp = gloves->otyp; + struct objclass *ocl = &objects[otyp]; + const char *actualn = OBJ_NAME(*ocl), + *descrpn = OBJ_DESCR(*ocl); + + if (strstri(objects[otyp].oc_name_known ? actualn : descrpn, + gauntlets)) + return gauntlets; + } + return "gloves"; +} + const char * mimic_obj_name(mtmp) struct monst *mtmp; diff --git a/src/polyself.c b/src/polyself.c index ab84a7e18..b0530913b 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 polyself.c $NHDT-Date: 1570230710 2019/10/04 23:11:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.134 $ */ +/* NetHack 3.6 polyself.c $NHDT-Date: 1573290419 2019/11/09 09:06:59 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.135 $ */ /* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ @@ -691,7 +691,7 @@ int mntmp; } check_strangling(FALSE); /* maybe stop strangling */ if (nohands(youmonst.data)) - Glib = 0; + make_glib(0); /* mlvl = adj_lev(&mons[mntmp]); @@ -967,6 +967,7 @@ break_armor() You("drop your gloves%s!", uwep ? " and weapon" : ""); drop_weapon(0); (void) Gloves_off(); + /* Glib manipulation (ends immediately) handled by Gloves_off */ dropp(otmp); } if ((otmp = uarms) != 0) { diff --git a/src/potion.c b/src/potion.c index d366a1196..268103967 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 potion.c $NHDT-Date: 1572887644 2019/11/04 17:14:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.164 $ */ +/* NetHack 3.6 potion.c $NHDT-Date: 1573290421 2019/11/09 09:07:01 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.165 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -440,6 +440,17 @@ boolean talk; } } +/* set or clear "slippery fingers" */ +void +make_glib(xtime) +int xtime; +{ + set_itimeout(&Glib, xtime); + /* may change "(being worn)" to "(being worn; slippery)" or vice versa */ + if (uarmg) + update_inventory(); +} + void self_invis_message() { @@ -2127,8 +2138,9 @@ dodip() fire_damage(obj, TRUE, u.ux, u.uy); } else if (potion->cursed) { pline_The("potion spills and covers your %s with oil.", - makeplural(body_part(FINGER))); - incr_itimeout(&Glib, d(2, 10)); + !uarmg ? makeplural(body_part(FINGER)) + : gloves_simple_name(uarmg)); + make_glib((int) (Glib & TIMEOUT) + d(2, 10)); } else if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) { /* the following cases apply only to weapons */ goto more_dips; diff --git a/src/timeout.c b/src/timeout.c index 7b5fb7818..e3125d8a5 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 timeout.c $NHDT-Date: 1565574996 2019/08/12 01:56:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.92 $ */ +/* NetHack 3.6 timeout.c $NHDT-Date: 1573290422 2019/11/09 09:07:02 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.93 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -725,6 +725,9 @@ nh_timeout() case DETECT_MONSTERS: see_monsters(); break; + case GLIB: + make_glib(0); /* might update persistent inventory */ + break; } } From c566c01f8d12588937ca428f79bc4b6c3618bc5c Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 9 Nov 2019 10:57:25 -0500 Subject: [PATCH 197/529] add command line option --showpaths Add --showpaths early option to show where NetHack is expecting to find certain files without starting up a game. It exits afterwards. Windows sample (for illustration only, locations may differ for you): Variable playground locations: [hackdir ]="C:\Users\JohnDoe\NetHack\3.6\" [leveldir ]="C:\Users\JohnDoe\AppData\Local\NetHack\3.6\" [savedir ]="C:\Users\JohnDoe\AppData\Local\NetHack\3.6\" [bonesdir ]="C:\ProgramData\NetHack\3.6\" [datadir ]="C:\personal\nhdev\363\test\binary\" [scoredir ]="C:\ProgramData\NetHack\3.6\" [lockdir ]="C:\ProgramData\NetHack\3.6\" [sysconfdir]="C:\ProgramData\NetHack\3.6\" [configdir ]="C:\Users\JohnDoe\NetHack\3.6\" [troubledir]="C:\Users\JohnDoe\NetHack\3.6\" Your system configuration file (in sysconfdir): "C:\Users\JohnDoe\NetHack\3.6\sysconf" Your system symbols file (in sysconfdir): "C:\Users\JohnDoe\NetHack\3.6\symbols" Your personal configuration file (in configdir): "C:\Users\JohnDoe\NetHack\3.6\.nethackrc" Linux (for illustration only, locations may differ for you): Your system configuration file: "/home/johndoe/nh/install/games/lib/nethackdir/sysconf" Your system symbols file: "/home/johndoe/nh/install/games/lib/nethackdir/symbols" Your personal configuration file: "/home/johndoe/.nethackrc" --- doc/nethack.6 | 7 +++ include/decl.h | 2 +- include/extern.h | 1 + src/allmain.c | 4 ++ src/files.c | 100 ++++++++++++++++++++++++++++++++++++++++++- sys/unix/unixmain.c | 6 ++- sys/winnt/windmain.c | 5 +++ 7 files changed, 122 insertions(+), 3 deletions(-) diff --git a/doc/nethack.6 b/doc/nethack.6 index ea704bb2f..dda4c89f4 100644 --- a/doc/nethack.6 +++ b/doc/nethack.6 @@ -47,6 +47,9 @@ nethack \- Exploring The Mazes of Menace .B \-ibm ] [ +.BR \-\-showpaths +] +[ .BR \-\-version [ :paste ] ] .PP @@ -223,6 +226,10 @@ the list of top scorers, and a subdirectory .I save where games are saved. .PP +.B \-\-showpaths +can be used to cause NetHack to show where it is expecting +to find various configuration files. +.PP .B \-\-version can be used to cause NetHack to show the version information it was compiled with, then exit. That will include the diff --git a/include/decl.h b/include/decl.h index 974af0f10..d5a2fe8cc 100644 --- a/include/decl.h +++ b/include/decl.h @@ -447,7 +447,7 @@ struct breadcrumbs { E const char *ARGV0; #endif -enum earlyarg {ARG_DEBUG, ARG_VERSION +enum earlyarg {ARG_DEBUG, ARG_VERSION, ARG_SHOWPATHS #ifdef WIN32 ,ARG_WINDOWS #endif diff --git a/include/extern.h b/include/extern.h index 989f07f50..ecef02aac 100644 --- a/include/extern.h +++ b/include/extern.h @@ -846,6 +846,7 @@ E void NDECL(really_close); #ifdef DEBUG E boolean FDECL(debugcore, (const char *, BOOLEAN_P)); #endif +E void NDECL(reveal_paths); E boolean FDECL(read_tribute, (const char *, const char *, int, char *, int, unsigned)); E boolean FDECL(Death_quote, (char *, int)); diff --git a/src/allmain.c b/src/allmain.c index 57170b66c..5111c69a7 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -767,6 +767,7 @@ const char *msg; static struct early_opt earlyopts[] = { {ARG_DEBUG, "debug", 5, TRUE}, {ARG_VERSION, "version", 4, TRUE}, + {ARG_SHOWPATHS, "showpaths", 9, FALSE}, #ifdef WIN32 {ARG_WINDOWS, "windows", 4, TRUE}, #endif @@ -845,6 +846,9 @@ enum earlyarg e_arg; early_version_info(insert_into_pastebuf); return 2; } + case ARG_SHOWPATHS: { + return 2; + } #ifdef WIN32 case ARG_WINDOWS: { if (extended_opt) { diff --git a/src/files.c b/src/files.c index c8bdb8ce1..48c9d37b4 100644 --- a/src/files.c +++ b/src/files.c @@ -3197,7 +3197,13 @@ fopen_sym_file() { FILE *fp; - fp = fopen_datafile(SYMBOLS, "r", HACKPREFIX); + fp = fopen_datafile(SYMBOLS, "r", +#ifdef WIN32 + SYSCONFPREFIX +#else + HACKPREFIX +#endif + ); return fp; } @@ -3966,6 +3972,98 @@ boolean wildcards; #endif /*DEBUG*/ +void +reveal_paths(VOID_ARGS) +{ + int i; +#define PATHBUFSZ 1024 + char buf[PATHBUFSZ]; +#ifdef UNIX + char *envp, *slash, nhpath[PATHBUFSZ]; +#endif + + /* write out path details */ +#ifdef PREFIXES_IN_USE + raw_print("Variable playground locations:"); + for (i = 0; i < PREFIX_COUNT; i++) + raw_printf(" [%-10s]=\"%s\"", fqn_prefix_names[i], + fqn_prefix[i] + ? fqn_prefix[i] + : "not set"); +#endif + /* sysconf file */ +#ifdef PREFIXES_IN_USE + Sprintf(buf, " (in %s)", + fqn_prefix_names[SYSCONFPREFIX]); +#else + buf[0] = '\0'; +#endif + raw_printf("Your system configuration file%s:", buf); + set_configfile_name(fqname(SYSCF_FILE, SYSCONFPREFIX, 0)); + raw_printf(" \"%s\"", configfile); +#ifdef UNIX + Strcpy(nhpath, configfile); + slash = rindex(nhpath, '/'); + if (slash) + *slash = '\0'; +#endif + + /* symbols file */ +#ifdef PREFIXES_IN_USE + Sprintf(buf, " (in %s)", +#ifdef WIN32 + fqn_prefix_names[SYSCONFPREFIX]); +#else + fqn_prefix_names[HACKPREFIX]); +#endif /* WIN32 */ +#else /* PREFIXES_IN_USE */ + buf[0] = '\0'; +#endif + + raw_printf("Your system symbols file%s:", buf); +#ifdef UNIX + Sprintf(buf, "%s/%s", nhpath, SYMBOLS); +#else +#ifdef PREFIXES_IN_USE + Sprintf(buf, "%s", + fqname(SYMBOLS, +#ifdef WIN32 + SYSCONFPREFIX, 2)); +#else + HACKPREFIX, 2)); +#endif +#endif /* PREFIXES_IN_USE */ +#endif /* UNIX */ + raw_printf(" \"%s\"", buf); + + /* configuration file */ +#ifdef PREFIXES_IN_USE + Sprintf(buf, " (in %s)", + fqn_prefix_names[CONFIGPREFIX]); +#else /* PREFIXES_IN_USE */ + buf[0] = '\0'; +#endif + raw_printf("Your personal configuration file%s:", buf); +#ifdef UNIX + envp = nh_getenv("HOME"); + if (!envp) + Strcpy(nhpath, ".nethackrc"); + else + Sprintf(nhpath, "%s/%s", envp, default_configfile); +#endif + raw_printf(" \"%s\"", +#ifdef UNIX + nhpath); +#else +#ifdef PREFIXES_IN_USE + fqname(default_configfile, CONFIGPREFIX, 3)); +#else + default_configfile); +#endif /* PREFIXES_IN_USE */ +#endif /* UNIX */ + raw_print(""); +} + /* ---------- BEGIN TRIBUTE ----------- */ /* 3.6 tribute code diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index 7e0fcd94a..90f07d63a 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -114,11 +114,15 @@ char *argv[]; if (argcheck(argc, argv, ARG_VERSION) == 2) exit(EXIT_SUCCESS); + if (argcheck(argc, argv, ARG_SHOWPATHS) == 2) { + initoptions(); + reveal_paths(); + exit(EXIT_SUCCESS); + } if (argcheck(argc, argv, ARG_DEBUG) == 1) { argc--; argv++; } - if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') { /* avoid matching "-dec" for DECgraphics; since the man page * says -d directory, hope nobody's using -desomething_else diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 14ccd0089..950706b28 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -580,6 +580,11 @@ char *argv[]; if (argcheck(argc, argv, ARG_VERSION) == 2) nethack_exit(EXIT_SUCCESS); + if (argcheck(argc, argv, ARG_SHOWPATHS) == 2) { + initoptions(); + reveal_paths(); + nethack_exit(EXIT_SUCCESS); + } if (argcheck(argc, argv, ARG_DEBUG) == 1) { argc--; argv++; From e6bafb3f90e46446758fd22e409d81f3c22c31c2 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 9 Nov 2019 13:52:36 -0500 Subject: [PATCH 198/529] default to little-endian in 3.7 --- src/sys.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sys.c b/src/sys.c index 6dd668dc5..aeb1c220c 100644 --- a/src/sys.c +++ b/src/sys.c @@ -80,6 +80,8 @@ sys_early_init() sysopt.check_plname = 0; sysopt.seduce = 1; /* if it's compiled in, default to on */ sysopt_seduce_set(sysopt.seduce); + /* default to little-endian in 3.7 */ + sysopt.saveformat[0] = sysopt.bonesformat[0] = lendian; sysopt.accessibility = 0; return; } From 75d22a2dbf9919cfabd40ff3107cfed1a0f5a1ae Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 9 Nov 2019 16:19:05 -0500 Subject: [PATCH 199/529] separate MAIL functionality from MAIL-related structure inclusion With 3.7+ aspirations of improving savefile interoperability between 32-bit and 64-bit builds, as well as between platforms, it is better to not have the underlying struct/array content be conditional. This splits off some of the MAIL code into MAIL_STRUCTURES code. In theory, since MAIL_STRUCTURES is unconditionally included, the macro could just go away and leave that code unconditional, but this commit doesn't go that far. --- include/global.h | 8 ++++++++ src/bones.c | 2 +- src/dogmove.c | 2 +- src/eat.c | 4 ++-- src/exper.c | 2 +- src/mail.c | 4 ++++ src/makemon.c | 2 +- src/mkobj.c | 2 +- src/mon.c | 4 ++-- src/monmove.c | 2 +- src/monst.c | 2 +- src/objects.c | 2 +- src/objnam.c | 8 ++++---- src/options.c | 2 +- src/role.c | 2 +- src/trap.c | 4 ++-- src/write.c | 4 ++-- src/zap.c | 6 +++--- util/makedefs.c | 4 ++-- win/share/tilemap.c | 4 ++-- 20 files changed, 41 insertions(+), 29 deletions(-) diff --git a/include/global.h b/include/global.h index 037e09dfc..b52d14b3c 100644 --- a/include/global.h +++ b/include/global.h @@ -352,6 +352,14 @@ struct savefile_info { #define MAXMONNO 120 /* extinct monst after this number created */ #define MHPMAX 500 /* maximum monster hp */ +/* + * Version 3.7.x has aspirations of portable file formats. We + * make a distinction between MAIL functionality and MAIL_STRUCTURES + * so that the underlying structures are consistent, whether MAIL is + * defined or not. + */ +#define MAIL_STRUCTURES + /* PANICTRACE: Always defined for NH_DEVEL_STATUS != NH_STATUS_RELEASED but only for supported platforms. */ #ifdef UNIX diff --git a/src/bones.c b/src/bones.c index b57d592a8..1e55db088 100644 --- a/src/bones.c +++ b/src/bones.c @@ -135,7 +135,7 @@ boolean restore; if (otmp->otyp == SLIME_MOLD) { goodfruit(otmp->spe); -#ifdef MAIL +#ifdef MAIL_STRUCTURES } else if (otmp->otyp == SCR_MAIL) { /* 0: delivered in-game via external event; 1: from bones or wishing; 2: written with marker */ diff --git a/src/dogmove.c b/src/dogmove.c index e74c0a418..a70c9c70a 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -432,7 +432,7 @@ int udist; } else { if ((obj = g.level.objects[omx][omy]) != 0 && !index(nofetch, obj->oclass) -#ifdef MAIL +#ifdef MAIL_STRUCTURES && obj->otyp != SCR_MAIL #endif ) { diff --git a/src/eat.c b/src/eat.c index abad8bf9c..85f07348f 100644 --- a/src/eat.c +++ b/src/eat.c @@ -2104,7 +2104,7 @@ eatspecial() return; } if (objects[otmp->otyp].oc_material == PAPER) { -#ifdef MAIL +#ifdef MAIL_STRUCTURES if (otmp->otyp == SCR_MAIL) /* no nutrition */ pline("This junk mail is less than satisfying."); @@ -2550,7 +2550,7 @@ doeat() /* oc_nutrition is usually weight anyway */ else basenutrit = objects[otmp->otyp].oc_nutrition; -#ifdef MAIL +#ifdef MAIL_STRUCTURES if (otmp->otyp == SCR_MAIL) { basenutrit = 0; nodelicious = TRUE; diff --git a/src/exper.c b/src/exper.c index ab5a84348..73bfe9f4b 100644 --- a/src/exper.c +++ b/src/exper.c @@ -128,7 +128,7 @@ register int nk; if (mtmp->m_lev > 8) tmp += 50; -#ifdef MAIL +#ifdef MAIL_STRUCTURES /* Mail daemons put up no fight. */ if (mtmp->data == &mons[PM_MAIL_DAEMON]) tmp = 1; diff --git a/src/mail.c b/src/mail.c index 839e030a4..a6ec5ddc6 100644 --- a/src/mail.c +++ b/src/mail.c @@ -10,8 +10,12 @@ # include # include #endif /* SIMPLE_MAIL */ +#endif /* MAIL */ +#ifdef MAIL_STRUCTURES #include "mail.h" +#endif +#ifdef MAIL /* * Notify user when new mail has arrived. Idea by Merlyn Leroy. * diff --git a/src/makemon.c b/src/makemon.c index 5d74c1c96..dfe7940e4 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -1623,7 +1623,7 @@ int mndx, mvflagsmask, genomask; return FALSE; if (is_placeholder(ptr)) return FALSE; -#ifdef MAIL +#ifdef MAIL_STRUCTURES /* special levels might ask for random demon type; reject this one */ if (ptr == &mons[PM_MAIL_DAEMON]) return FALSE; diff --git a/src/mkobj.c b/src/mkobj.c index 29f44a91b..54416100e 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -980,7 +980,7 @@ boolean artif; break; case POTION_CLASS: /* note: potions get some additional init below */ case SCROLL_CLASS: -#ifdef MAIL +#ifdef MAIL_STRUCTURES if (otmp->otyp != SCR_MAIL) #endif blessorcurse(otmp, 4); diff --git a/src/mon.c b/src/mon.c index fd030dbee..3edeac039 100644 --- a/src/mon.c +++ b/src/mon.c @@ -2038,7 +2038,7 @@ register struct monst *mtmp; /* if it's a (possibly polymorphed) quest leader, mark him as dead */ if (mtmp->m_id == g.quest_status.leader_m_id) g.quest_status.leader_is_dead = TRUE; -#ifdef MAIL +#ifdef MAIL_STRUCTURES /* if the mail daemon dies, no more mail delivery. -3. */ if (tmp == PM_MAIL_DAEMON) g.mvitals[tmp].mvflags |= G_GENOD; @@ -2412,7 +2412,7 @@ int xkill_flags; /* 1: suppress message, 2: suppress corpse, 4: pacifist */ if (nocorpse || LEVEL_SPECIFIC_NOCORPSE(mdat)) goto cleanup; -#ifdef MAIL +#ifdef MAIL_STRUCTURES if (mdat == &mons[PM_MAIL_DAEMON]) { stackobj(mksobj_at(SCR_MAIL, x, y, FALSE, FALSE)); } diff --git a/src/monmove.c b/src/monmove.c index 0e805492c..3ec0afef9 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -925,7 +925,7 @@ register int after; mmoved = 0; } -#ifdef MAIL +#ifdef MAIL_STRUCTURES if (ptr == &mons[PM_MAIL_DAEMON]) { if (!Deaf && canseemon(mtmp)) verbalize("I'm late!"); diff --git a/src/monst.c b/src/monst.c index 4c798aec3..23af5d298 100644 --- a/src/monst.c +++ b/src/monst.c @@ -2589,7 +2589,7 @@ struct permonst _mons2[] = { M3_INFRAVISIBLE | M3_INFRAVISION | M3_DISPLACES, 34, HI_LORD), /* other demons */ -#ifdef MAIL +#ifdef MAIL_STRUCTURES MON("mail daemon", S_DEMON, LVL(56, 24, 10, 127, 0), (G_NOGEN | G_NOCORPSE), A(NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), diff --git a/src/objects.c b/src/objects.c index 984a67e3e..adb86dc80 100644 --- a/src/objects.c +++ b/src/objects.c @@ -876,7 +876,7 @@ 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_STRUCTURES SCROLL("mail", "stamped", 0, 0, 0), #endif SCROLL("blank paper", "unlabeled", 0, 28, 60), diff --git a/src/objnam.c b/src/objnam.c index 079de1bbf..cc95bc653 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1013,7 +1013,7 @@ unsigned doname_flags; || ((!known || !objects[obj->otyp].oc_charged || obj->oclass == ARMOR_CLASS || obj->oclass == RING_CLASS) -#ifdef MAIL +#ifdef MAIL_STRUCTURES && obj->otyp != SCR_MAIL #endif && obj->otyp != FAKE_AMULET_OF_YENDOR @@ -1326,7 +1326,7 @@ struct obj *otmp; return FALSE; /* always fully ID'd */ /* check fundamental ID hallmarks first */ if (!otmp->known || !otmp->dknown -#ifdef MAIL +#ifdef MAIL_STRUCTURES || (!otmp->bknown && otmp->otyp != SCR_MAIL) #else || !otmp->bknown @@ -3861,7 +3861,7 @@ struct obj *no_wish; case STATUE: /* otmp->cobj already done in mksobj() */ break; -#ifdef MAIL +#ifdef MAIL_STRUCTURES case SCR_MAIL: /* 0: delivered in-game via external event (or randomly for fake mail); 1: from bones or wishing; 2: written with marker */ @@ -3909,7 +3909,7 @@ struct obj *no_wish; break; case FIGURINE: if (!(mons[mntmp].geno & G_UNIQ) && !is_human(&mons[mntmp]) -#ifdef MAIL +#ifdef MAIL_STRUCTURES && mntmp != PM_MAIL_DAEMON #endif ) diff --git a/src/options.c b/src/options.c index 5c18d6521..e4cc893d0 100644 --- a/src/options.c +++ b/src/options.c @@ -151,7 +151,7 @@ static const struct Bool_Opt { { "legacy", &flags.legacy, TRUE, DISP_IN_GAME }, { "lit_corridor", &flags.lit_corridor, FALSE, SET_IN_GAME }, { "lootabc", &flags.lootabc, FALSE, SET_IN_GAME }, -#ifdef MAIL +#ifdef MAIL_STRUCTURES { "mail", &flags.biff, TRUE, SET_IN_GAME }, #else { "mail", (boolean *) 0, TRUE, SET_IN_FILE }, diff --git a/src/role.c b/src/role.c index 487999ac7..349c736b8 100644 --- a/src/role.c +++ b/src/role.c @@ -2084,7 +2084,7 @@ struct monst *mtmp; return "Aloha"; /* Hawaiian */ case PM_VALKYRIE: return -#ifdef MAIL +#ifdef MAIL_STRUCTURES (mtmp && mtmp->data == &mons[PM_MAIL_DAEMON]) ? "Hallo" : #endif "Velkommen"; /* Norse */ diff --git a/src/trap.c b/src/trap.c index dfb06a258..119589a47 100644 --- a/src/trap.c +++ b/src/trap.c @@ -3455,7 +3455,7 @@ struct obj *obj; grease_protect(obj, (char *) 0, victim); } else if (obj->oclass == SCROLL_CLASS && obj->otyp != SCR_BLANK_PAPER) { if (obj->otyp != SCR_BLANK_PAPER -#ifdef MAIL +#ifdef MAIL_STRUCTURES && obj->otyp != SCR_MAIL #endif ) { @@ -3531,7 +3531,7 @@ boolean force; return ER_NOTHING; } else if (obj->oclass == SCROLL_CLASS) { if (obj->otyp == SCR_BLANK_PAPER -#ifdef MAIL +#ifdef MAIL_STRUCTURES || obj->otyp == SCR_MAIL #endif ) return 0; diff --git a/src/write.c b/src/write.c index be48b67b5..a21fc816c 100644 --- a/src/write.c +++ b/src/write.c @@ -18,7 +18,7 @@ register struct obj *otmp; return (10 * objects[otmp->otyp].oc_level); switch (otmp->otyp) { -#ifdef MAIL +#ifdef MAIL_STRUCTURES case SCR_MAIL: return 2; #endif @@ -333,7 +333,7 @@ found: } new_obj->blessed = (curseval > 0); new_obj->cursed = (curseval < 0); -#ifdef MAIL +#ifdef MAIL_STRUCTURES if (new_obj->otyp == SCR_MAIL) /* 0: delivered in-game via external event (or randomly for fake mail); 1: from bones or wishing; 2: written with marker */ diff --git a/src/zap.c b/src/zap.c index a98ce852e..be7c85464 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1231,7 +1231,7 @@ int mat, minwt; continue; if (obj_resists(otmp, 0, 0)) continue; /* preserve unique objects */ -#ifdef MAIL +#ifdef MAIL_STRUCTURES if (otmp->otyp == SCR_MAIL) continue; #endif @@ -1358,7 +1358,7 @@ struct obj *obj; { long i; -#ifdef MAIL +#ifdef MAIL_STRUCTURES if (obj->otyp == SCR_MAIL) return; #endif @@ -1456,7 +1456,7 @@ int id; /* preserve inventory letter if in inventory */ if (obj_location == OBJ_INVENT) otmp->invlet = obj->invlet; -#ifdef MAIL +#ifdef MAIL_STRUCTURES /* You can't send yourself 100 mail messages and then * polymorph them into useful scrolls */ diff --git a/util/makedefs.c b/util/makedefs.c index 953fdddd1..608491894 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1111,7 +1111,7 @@ make_version() version.feature_set = (unsigned long) (0L /* levels and/or topology (0..4) */ /* monsters (5..9) */ -#ifdef MAIL +#ifdef MAIL_STRUCTURES | (1L << 6) #endif /* objects (10..14) */ @@ -1561,7 +1561,7 @@ static const char *build_opts[] = { #ifdef PANICLOG "errors and warnings log file", #endif -#ifdef MAIL +#ifdef MAIL_STRUCTURES "mail daemon", #endif #ifdef GNUDOS diff --git a/win/share/tilemap.c b/win/share/tilemap.c index 39f3d4fc3..6651332e9 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -54,7 +54,7 @@ struct conditionals { #ifndef CHARON /* not supported yet */ { MON_GLYPH, PM_CROESUS, "Charon" }, #endif -#ifndef MAIL +#ifndef MAIL_STRUCTURES { MON_GLYPH, PM_FAMINE, "mail daemon" }, #endif /* commented out in monst.c at present */ @@ -69,7 +69,7 @@ struct conditionals { /* allow slime mold to look like slice of pizza, since we * don't know what a slime mold should look like when renamed anyway */ -#ifndef MAIL +#ifndef MAIL_STRUCTURES { OBJ_GLYPH, SCR_STINKING_CLOUD + EXTRA_SCROLL_DESCR_COUNT, "stamped / mail" }, #endif From 15dbf661d96d98332718b71ebd3e42bd1a1e5bf9 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 9 Nov 2019 16:36:41 -0800 Subject: [PATCH 200/529] more slippery gloves Move makeplural(body_part(FINGER)) into its own routine, with option to substitute gloves when wearing such. Wearing slippery gloves (ie, wearing gloves while having slippery fingers) wouldn't let you put on a ring because you can't take the gloves off, but removing a worn ring lacked the same restriction. After changing that, teach prayer that slippery gloves is another reason why a ring of levitation can't be removed. --- include/extern.h | 3 ++- src/apply.c | 13 +++++-------- src/cmd.c | 6 ++---- src/do_wear.c | 44 +++++++++++++++++++++++++++++++++++--------- src/eat.c | 9 +++------ src/invent.c | 4 ++-- src/potion.c | 5 ++--- src/pray.c | 8 +++++++- src/write.c | 4 ++-- 9 files changed, 60 insertions(+), 36 deletions(-) diff --git a/include/extern.h b/include/extern.h index 9526bb45b..9467371b4 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1573290414 2019/11/09 09:06:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.736 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1573346164 2019/11/10 00:36:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.738 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -474,6 +474,7 @@ E int NDECL(Helmet_on); E int FDECL(select_off, (struct obj *)); E int NDECL(take_off); #endif +E const char *FDECL(fingers_or_gloves, (BOOLEAN_P)); E void FDECL(off_msg, (struct obj *)); E void FDECL(set_wear, (struct obj *)); E boolean FDECL(donning, (struct obj *)); diff --git a/src/apply.c b/src/apply.c index a7f1b9a15..e77db07d4 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 apply.c $NHDT-Date: 1573290415 2019/11/09 09:06:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.282 $ */ +/* NetHack 3.6 apply.c $NHDT-Date: 1573346182 2019/11/10 00:36:22 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.283 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2293,20 +2293,19 @@ struct obj *obj; if (Glib) { pline("%s from your %s.", Tobjnam(obj, "slip"), - makeplural(body_part(FINGER))); + fingers_or_gloves(FALSE)); dropx(obj); return; } if (obj->spe > 0) { - const char *fingers_or_gloves; int oldglib; if ((obj->cursed || Fumbling) && !rn2(2)) { consume_obj_charge(obj, TRUE); pline("%s from your %s.", Tobjnam(obj, "slip"), - makeplural(body_part(FINGER))); + fingers_or_gloves(FALSE)); dropx(obj); return; } @@ -2317,8 +2316,6 @@ struct obj *obj; return; consume_obj_charge(obj, TRUE); - fingers_or_gloves = !uarmg ? makeplural(body_part(FINGER)) - : gloves_simple_name(uarmg); oldglib = (int) (Glib & TIMEOUT); if (otmp != &zeroobj) { You("cover %s with a thick layer of grease.", yname(otmp)); @@ -2326,11 +2323,11 @@ struct obj *obj; if (obj->cursed && !nohands(youmonst.data)) { make_glib(oldglib + rn1(6, 10)); /* + 10..15 */ pline("Some of the grease gets all over your %s.", - fingers_or_gloves); + fingers_or_gloves(TRUE)); } } else { make_glib(oldglib + rn1(11, 5)); /* + 5..15 */ - You("coat your %s with grease.", fingers_or_gloves); + You("coat your %s with grease.", fingers_or_gloves(TRUE)); } } else { if (obj->known) diff --git a/src/cmd.c b/src/cmd.c index f62e4e1ff..dca4c54ea 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1573290415 2019/11/09 09:06:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.348 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1573346187 2019/11/10 00:36:27 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.349 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2477,9 +2477,7 @@ int final; } } if (Glib) { - Sprintf(buf, "slippery %s", - !uarmg ? makeplural(body_part(FINGER)) - : gloves_simple_name(uarmg)); + Sprintf(buf, "slippery %s", fingers_or_gloves(TRUE)); if (wizard) Sprintf(eos(buf), " (%ld)", (Glib & TIMEOUT)); you_have(buf, ""); diff --git a/src/do_wear.c b/src/do_wear.c index 27661c677..94e578175 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_wear.c $NHDT-Date: 1573290416 2019/11/09 09:06:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.112 $ */ +/* NetHack 3.6 do_wear.c $NHDT-Date: 1573346188 2019/11/10 00:36:28 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.113 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -44,6 +44,16 @@ STATIC_PTR int FDECL(accessory_or_armor_on, (struct obj *)); STATIC_DCL void FDECL(already_wearing, (const char *)); STATIC_DCL void FDECL(already_wearing2, (const char *, const char *)); +/* plural "fingers" or optionally "gloves" */ +const char * +fingers_or_gloves(check_gloves) +boolean check_gloves; +{ + return ((check_gloves && uarmg) + ? gloves_simple_name(uarmg) /* "gloves" or "gauntlets" */ + : makeplural(body_part(FINGER))); /* "fingers" */ +} + void off_msg(otmp) struct obj *otmp; @@ -1537,7 +1547,15 @@ struct obj *otmp; boolean use_plural = (is_boots(otmp) || is_gloves(otmp) || otmp->otyp == LENSES || otmp->quan > 1L); - You("can't. %s cursed.", use_plural ? "They are" : "It is"); + /* might be trying again after applying grease to hands */ + if (Glib && otmp->bknown + /* for weapon, we'll only get here via 'A )' */ + && (uarmg ? (otmp == uwep) + : ((otmp->owornmask & (W_WEP | W_RING)) != 0))) + pline("Despite your slippery %s, you can't.", + fingers_or_gloves(TRUE)); + else + You("can't. %s cursed.", use_plural ? "They are" : "It is"); set_bknown(otmp, 1); return 1; } @@ -1749,7 +1767,7 @@ boolean noisy; gloved fingers */ if (noisy) Your("%s are too slippery to pull on %s.", - makeplural(body_part(FINGER)), gloves_simple_name(otmp)); + fingers_or_gloves(FALSE), gloves_simple_name(otmp)); err++; } else *mask = W_ARMG; @@ -1848,7 +1866,7 @@ struct obj *obj; if (uleft && uright) { There("are no more %s%s to fill.", humanoid(youmonst.data) ? "ring-" : "", - makeplural(body_part(FINGER))); + fingers_or_gloves(FALSE)); return 0; } if (uleft) { @@ -2039,7 +2057,7 @@ doputon() /* 'P' message doesn't mention armor */ Your("%s%s are full, and you're already wearing an amulet and %s.", humanoid(youmonst.data) ? "ring-" : "", - makeplural(body_part(FINGER)), + fingers_or_gloves(FALSE), (ublindf->otyp == LENSES) ? "some lenses" : "a blindfold"); return 0; } @@ -2109,7 +2127,7 @@ glibr() /* changed so cursed rings don't fall off, GAN 10/30/86 */ Your("%s off your %s.", (leftfall && rightfall) ? "rings slip" : "ring slips", - (leftfall && rightfall) ? makeplural(body_part(FINGER)) + (leftfall && rightfall) ? fingers_or_gloves(FALSE) : body_part(FINGER)); xfl++; if (leftfall) { @@ -2231,6 +2249,10 @@ int otyp; return uarmg; if (ring->cursed) return ring; + /* normally outermost layer is processed first, but slippery gloves + wears off quickly so uncurse ring itself before handling those */ + if (uarmg && Glib) + return uarmg; } /* either no ring or not right type or nothing prevents its removal */ return (struct obj *) 0; @@ -2259,17 +2281,21 @@ register struct obj *otmp; /* special ring checks */ if (otmp == uright || otmp == uleft) { + struct obj glibdummy; + if (nolimbs(youmonst.data)) { pline_The("ring is stuck."); return 0; } + glibdummy = zeroobj; why = 0; /* the item which prevents ring removal */ if (welded(uwep) && (otmp == uright || bimanual(uwep))) { Sprintf(buf, "free a weapon %s", body_part(HAND)); why = uwep; - } else if (uarmg && uarmg->cursed) { - Sprintf(buf, "take off your %s", c_gloves); - why = uarmg; + } else if (uarmg && (uarmg->cursed || Glib)) { + Sprintf(buf, "take off your %s%s", + Glib ? "slippery " : "", gloves_simple_name(uarmg)); + why = !Glib ? uarmg : &glibdummy; } if (why) { You("cannot %s to remove the ring.", buf); diff --git a/src/eat.c b/src/eat.c index 3d1ca80fa..9620c372f 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 eat.c $NHDT-Date: 1573290417 2019/11/09 09:06:57 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.204 $ */ +/* NetHack 3.6 eat.c $NHDT-Date: 1573346189 2019/11/10 00:36:29 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.205 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1380,9 +1380,7 @@ const char *mesg; /* Assume !Glib, because you can't open tins when Glib. */ make_glib(rn1(11, 5)); /* 5..15 */ pline("Eating %s food made your %s very slippery.", - tintxts[r].txt, - !uarmg ? makeplural(body_part(FINGER)) - : gloves_simple_name(uarmg)); + tintxts[r].txt, fingers_or_gloves(TRUE)); } } else { /* spinach... */ @@ -1507,8 +1505,7 @@ struct obj *otmp; no_opener: pline("It is not so easy to open this tin."); if (Glib) { - pline_The("tin slips from your %s.", - makeplural(body_part(FINGER))); + pline_The("tin slips from your %s.", fingers_or_gloves(FALSE)); if (otmp->quan > 1L) { otmp = splitobj(otmp, 1L); } diff --git a/src/invent.c b/src/invent.c index 0e11e52f4..5cb094bcc 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 invent.c $NHDT-Date: 1571436003 2019/10/18 22:00:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.265 $ */ +/* NetHack 3.6 invent.c $NHDT-Date: 1573346190 2019/11/10 00:36:30 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.266 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1719,7 +1719,7 @@ register const char *let, *word; if (iflags.force_invmenu) Sprintf(menuquery, "What do you want to %s?", word); if (!strcmp(word, "grease")) - Sprintf(qbuf, "your %s", makeplural(body_part(FINGER))); + Sprintf(qbuf, "your %s", fingers_or_gloves(FALSE)); else if (!strcmp(word, "write with")) Sprintf(qbuf, "your %s", body_part(FINGERTIP)); else if (!strcmp(word, "wield")) diff --git a/src/potion.c b/src/potion.c index 268103967..4f9a42d51 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 potion.c $NHDT-Date: 1573290421 2019/11/09 09:07:01 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.165 $ */ +/* NetHack 3.6 potion.c $NHDT-Date: 1573346191 2019/11/10 00:36:31 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.166 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2138,8 +2138,7 @@ dodip() fire_damage(obj, TRUE, u.ux, u.uy); } else if (potion->cursed) { pline_The("potion spills and covers your %s with oil.", - !uarmg ? makeplural(body_part(FINGER)) - : gloves_simple_name(uarmg)); + fingers_or_gloves(TRUE)); make_glib((int) (Glib & TIMEOUT) + d(2, 10)); } else if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) { /* the following cases apply only to weapons */ diff --git a/src/pray.c b/src/pray.c index 42e5f8be8..79369fc02 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pray.c $NHDT-Date: 1564532667 2019/07/31 00:24:27 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.117 $ */ +/* NetHack 3.6 pray.c $NHDT-Date: 1573346192 2019/11/10 00:36:32 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.118 $ */ /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -494,6 +494,12 @@ int trouble; impossible("fix_worst_trouble: nothing to uncurse."); return; } + if (otmp == uarmg && Glib) { + make_glib(0); + Your("%s are no longer slippery.", gloves_simple_name(uarmg)); + if (!otmp->cursed) + break; + } if (!Blind || (otmp == ublindf && Blindfolded_only)) { pline("%s %s.", what ? what : (const char *) Yobjnam2(otmp, "softly glow"), diff --git a/src/write.c b/src/write.c index c9047589f..34afaf61c 100644 --- a/src/write.c +++ b/src/write.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 write.c $NHDT-Date: 1450261366 2015/12/16 10:22:46 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.17 $ */ +/* NetHack 3.6 write.c $NHDT-Date: 1573346194 2019/11/10 00:36:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.20 $ */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" @@ -109,7 +109,7 @@ register struct obj *pen; return 0; } else if (Glib) { pline("%s from your %s.", Tobjnam(pen, "slip"), - makeplural(body_part(FINGER))); + fingers_or_gloves(FALSE)); dropx(pen); return 1; } From fddffc2fa062c08094d8557012408ba590f8b993 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 9 Nov 2019 21:20:46 -0500 Subject: [PATCH 201/529] updates to reveal_paths --- src/files.c | 141 ++++++++++++++++++++++++++------------------ sys/unix/unixmain.c | 3 + 2 files changed, 85 insertions(+), 59 deletions(-) diff --git a/src/files.c b/src/files.c index 48c9d37b4..5311d28a6 100644 --- a/src/files.c +++ b/src/files.c @@ -3972,17 +3972,22 @@ boolean wildcards; #endif /*DEBUG*/ +#ifdef UNIX +#ifndef PATH_MAX +#include +#endif +#endif + void reveal_paths(VOID_ARGS) { - int i; -#define PATHBUFSZ 1024 - char buf[PATHBUFSZ]; + int i, maxlen = 0; + const char *fqn, *filep; + char *strp, buf[BUFSZ]; #ifdef UNIX - char *envp, *slash, nhpath[PATHBUFSZ]; + char *envp, cwdbuf[PATH_MAX]; #endif - /* write out path details */ #ifdef PREFIXES_IN_USE raw_print("Variable playground locations:"); for (i = 0; i < PREFIX_COUNT; i++) @@ -3991,75 +3996,93 @@ reveal_paths(VOID_ARGS) ? fqn_prefix[i] : "not set"); #endif + /* sysconf file */ + +#ifdef SYSCF #ifdef PREFIXES_IN_USE - Sprintf(buf, " (in %s)", - fqn_prefix_names[SYSCONFPREFIX]); + strp = fqn_prefix_names[SYSCONFPREFIX]; + maxlen = BUFSZ - sizeof " (in )"; + if (strp && strlen(strp) < (size_t) maxlen) + Sprintf(buf, " (in %s)", strp); #else buf[0] = '\0'; #endif raw_printf("Your system configuration file%s:", buf); - set_configfile_name(fqname(SYSCF_FILE, SYSCONFPREFIX, 0)); - raw_printf(" \"%s\"", configfile); -#ifdef UNIX - Strcpy(nhpath, configfile); - slash = rindex(nhpath, '/'); - if (slash) - *slash = '\0'; +#ifdef SYSCF_FILE + filep = SYSCF_FILE; +#else + filep = "sysconf"; #endif + fqn = fqname(filep, SYSCONFPREFIX, 0); + if (fqn) { + set_configfile_name(fqn); + filep = configfile; + } + raw_printf(" \"%s\"", filep); +#endif /* SYSCF */ /* symbols file */ -#ifdef PREFIXES_IN_USE - Sprintf(buf, " (in %s)", -#ifdef WIN32 - fqn_prefix_names[SYSCONFPREFIX]); -#else - fqn_prefix_names[HACKPREFIX]); -#endif /* WIN32 */ -#else /* PREFIXES_IN_USE */ - buf[0] = '\0'; -#endif - raw_printf("Your system symbols file%s:", buf); -#ifdef UNIX - Sprintf(buf, "%s/%s", nhpath, SYMBOLS); -#else -#ifdef PREFIXES_IN_USE - Sprintf(buf, "%s", - fqname(SYMBOLS, -#ifdef WIN32 - SYSCONFPREFIX, 2)); -#else - HACKPREFIX, 2)); -#endif -#endif /* PREFIXES_IN_USE */ -#endif /* UNIX */ - raw_printf(" \"%s\"", buf); - - /* configuration file */ -#ifdef PREFIXES_IN_USE - Sprintf(buf, " (in %s)", - fqn_prefix_names[CONFIGPREFIX]); -#else /* PREFIXES_IN_USE */ buf[0] = '\0'; -#endif +#ifndef UNIX +#ifdef PREFIXES_IN_USE +#ifdef WIN32 + strp = fqn_prefix_names[SYSCONFPREFIX]; +#else + strp = fqn_prefix_names[HACKPREFIX]; +#endif /* WIN32 */ + maxlen = BUFSZ - sizeof " (in )"; + if (strp && strlen(strp) < (size_t) maxlen) + Sprintf(buf, " (in %s)", strp); +#endif /* PREFIXES_IN_USE */ + raw_printf("Your game's loadable symbols file%s:", buf); +#endif /* UNIX */ + +#ifdef UNIX + envp = getcwd(cwdbuf, PATH_MAX); + if (envp) { + raw_print("Your game's loadable symbols file:"); + raw_printf(" \"%s/%s\"", envp, SYMBOLS); + } +#else /* UNIX */ + filep = SYMBOLS; +#ifdef PREFIXES_IN_USE +#ifdef WIN32 + fqn = fqname(filep, SYSCONFPREFIX, 1); +#else + fqn = fqname(filep, HACKPREFIX, 1); +#endif /* WIN32 */ + if (fqn) + filep = fqn; +#endif /* PREFIXES_IN_USE */ + raw_printf(" \"%s\"", filep); +#endif /* UNIX */ + + /* personal configuration file */ + + buf[0] = '\0'; +#ifdef PREFIXES_IN_USE + strp = fqn_prefix_names[CONFIGPREFIX]; + maxlen = BUFSZ - sizeof " (in )"; + if (strp && strlen(strp) < (size_t) maxlen) + Sprintf(buf, " (in %s)", strp); +#endif /* PREFIXES_IN_USE */ raw_printf("Your personal configuration file%s:", buf); + #ifdef UNIX envp = nh_getenv("HOME"); - if (!envp) - Strcpy(nhpath, ".nethackrc"); - else - Sprintf(nhpath, "%s/%s", envp, default_configfile); -#endif - raw_printf(" \"%s\"", -#ifdef UNIX - nhpath); -#else + raw_printf(" \"%s%s%s\"", + envp ? + envp : "", + envp ? + "/" : "", default_configfile); +#else /* UNIX */ + fqn = (const char *) 0; #ifdef PREFIXES_IN_USE - fqname(default_configfile, CONFIGPREFIX, 3)); -#else - default_configfile); -#endif /* PREFIXES_IN_USE */ + fqn = fqname(default_configfile, CONFIGPREFIX, 2); +#endif + raw_printf(" \"%s\"", fqn ? fqn : default_configfile); #endif /* UNIX */ raw_print(""); } diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index 90f07d63a..50c047ff8 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -115,6 +115,9 @@ char *argv[]; exit(EXIT_SUCCESS); if (argcheck(argc, argv, ARG_SHOWPATHS) == 2) { +#ifdef CHDIR + chdirx((char *) 0, 0); +#endif initoptions(); reveal_paths(); exit(EXIT_SUCCESS); From 593ba7ebb4c553a38dc350dee087591fb6c600d0 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 9 Nov 2019 20:01:53 -0800 Subject: [PATCH 202/529] --showpaths Fix a couple of warnings about unused variables but mainly handle OSX's multiple-choice for configuration file name. I tried moving my ~/.nethackrc to '~/Library/Prefences/NetHack Defaults.txt' and both regular play and --showpaths are finding it successfully. Also an untested fix for VMS. "nethackini" is not supposed to have any path information attached. --- src/files.c | 65 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/src/files.c b/src/files.c index 5311d28a6..15c2148b1 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 files.c $NHDT-Date: 1573066357 2019/11/06 18:52:37 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.260 $ */ +/* NetHack 3.6 files.c $NHDT-Date: 1573358489 2019/11/10 04:01:29 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.263 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2021,7 +2021,7 @@ int src; /* constructed full path names don't need fqname() */ #ifdef VMS /* no punctuation, so might be a logical name */ - set_configfile_name(fqname("nethackini", CONFIGPREFIX, 0)); + set_configfile_name("nethackini"); if ((fp = fopenp(configfile, "r")) != (FILE *) 0) return fp; set_configfile_name("sys$login:nethack.ini"); @@ -2057,7 +2057,7 @@ int src; set_configfile_name(tmp_config); if ((fp = fopenp(configfile, "r")) != (FILE *) 0) return fp; - /* may be easier for user to edit if filename as '.txt' suffix */ + /* may be easier for user to edit if filename has '.txt' suffix */ Sprintf(tmp_config, "%s/%s", envp, "Library/Preferences/NetHack Defaults.txt"); set_configfile_name(tmp_config); @@ -3981,20 +3981,21 @@ boolean wildcards; void reveal_paths(VOID_ARGS) { - int i, maxlen = 0; const char *fqn, *filep; - char *strp, buf[BUFSZ]; + char buf[BUFSZ]; +#if defined(UNIX) || defined(PREFIXES_IN_USE) + char *strp; +#endif #ifdef UNIX char *envp, cwdbuf[PATH_MAX]; #endif - #ifdef PREFIXES_IN_USE + int i, maxlen = 0; + raw_print("Variable playground locations:"); for (i = 0; i < PREFIX_COUNT; i++) raw_printf(" [%-10s]=\"%s\"", fqn_prefix_names[i], - fqn_prefix[i] - ? fqn_prefix[i] - : "not set"); + fqn_prefix[i] ? fqn_prefix[i] : "not set"); #endif /* sysconf file */ @@ -4020,7 +4021,9 @@ reveal_paths(VOID_ARGS) filep = configfile; } raw_printf(" \"%s\"", filep); -#endif /* SYSCF */ +#else /* !SYSCF */ + raw_printf("No system configuration file."); +#endif /* ?SYSCF */ /* symbols file */ @@ -4071,19 +4074,45 @@ reveal_paths(VOID_ARGS) raw_printf("Your personal configuration file%s:", buf); #ifdef UNIX - envp = nh_getenv("HOME"); - raw_printf(" \"%s%s%s\"", - envp ? - envp : "", - envp ? - "/" : "", default_configfile); -#else /* UNIX */ + buf[0] = '\0'; + if ((envp = nh_getenv("HOME")) != 0) { + copynchars(buf, envp, (int) sizeof buf - 1 - 1); + Strcat(buf, "/"); + } + strp = eos(buf); + copynchars(strp, default_configfile, + (int) (sizeof buf - 1 - strlen(buf))); +#if defined(__APPLE__) /* UNIX+__APPLE__ => MacOSX aka OSX aka macOS */ + if (envp) { + if (access(buf, 4) == -1) { /* 4: R_OK, -1: failure */ + /* read access to default failed; might be protected excessively + but more likely it doesn't exist; try first alternate: + "$HOME/Library/Pref..."; 'strp' points past '/' */ + copynchars(strp, "Library/Preferences/NetHack Defaults", + (int) (sizeof buf - 1 - strlen(buf))); + if (access(buf, 4) == -1) { + /* first alternate failed, try second: + ".../NetHack Defaults.txt"; no 'strp', just append */ + copynchars(eos(buf), ".txt", + (int) (sizeof buf - 1 - strlen(buf))); + if (access(buf, 4) == -1) { + /* second alternate failed too, so revert to the + original default ("$HOME/.nethackrc") for message */ + copynchars(strp, default_configfile, + (int) (sizeof buf - 1 - strlen(buf))); + } + } + } + } +#endif /* __APPLE__ */ + raw_printf(" \"%s\"", buf); +#else /* !UNIX */ fqn = (const char *) 0; #ifdef PREFIXES_IN_USE fqn = fqname(default_configfile, CONFIGPREFIX, 2); #endif raw_printf(" \"%s\"", fqn ? fqn : default_configfile); -#endif /* UNIX */ +#endif /* ?UNIX */ raw_print(""); } From a6b752e6f103a6eabc9b018390e55b575ff8afad Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 10 Nov 2019 17:36:51 +0200 Subject: [PATCH 203/529] Lua: Default dungeon and level chance is 100 --- src/dungeon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dungeon.c b/src/dungeon.c index 324e50fef..b888d1970 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -880,7 +880,7 @@ init_dungeons() int dgn_range = get_table_int_opt(L, "range", 0); int dgn_align = dgnaligns2i[get_table_option(L, "alignment", "unaligned", dgnaligns)]; int dgn_entry = get_table_int_opt(L, "entry", 0); - int dgn_chance = get_table_int_opt(L, "chance", 0); + int dgn_chance = get_table_int_opt(L, "chance", 100); int dgn_flags = get_dgn_flags(L); debugpline4("DUNGEON[%i]: %s, base=(%i,%i)", i, dgn_name, dgn_base, dgn_range); @@ -910,7 +910,7 @@ init_dungeons() int lvl_base = get_table_int(L, "base"); int lvl_range = get_table_int_opt(L, "range", 0); int lvl_nlevels = get_table_int_opt(L, "nlevels", 0); - int lvl_chance = get_table_int_opt(L, "chance", 0); + int lvl_chance = get_table_int_opt(L, "chance", 100); char *lvl_chain = get_table_str_opt(L, "chainlevel", NULL); int lvl_align = dgnaligns2i[get_table_option(L, "alignment", "unaligned", dgnaligns)]; int lvl_flags = get_dgn_flags(L); From b21f6ef46dfb074881130c5b9f9223c652f4b6ee Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 11 Nov 2019 09:16:56 -0500 Subject: [PATCH 204/529] merge fallout bit from 3.6 to 3.7 --- src/files.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/files.c b/src/files.c index 3faa3c7dc..94b410072 100644 --- a/src/files.c +++ b/src/files.c @@ -4242,10 +4242,10 @@ boolean wildcards; void reveal_paths(VOID_ARGS) { - const char *fqn, *filep, *strp; + const char *fqn, *filep; char buf[BUFSZ]; #if defined(UNIX) || defined(PREFIXES_IN_USE) - char *strp; + const char *strp; #endif #ifdef UNIX char *envp, cwdbuf[PATH_MAX]; From 277e6c71269a45638db9cf6aecb46d35c3d89826 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 11 Nov 2019 09:33:06 -0500 Subject: [PATCH 205/529] more 3.6 to 3.7 merge fix 3.7 adds const const char *fqn_prefix_names[PREFIX_COUNT]; --- src/files.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/files.c b/src/files.c index 94b410072..a9566c687 100644 --- a/src/files.c +++ b/src/files.c @@ -4244,8 +4244,11 @@ reveal_paths(VOID_ARGS) { const char *fqn, *filep; char buf[BUFSZ]; -#if defined(UNIX) || defined(PREFIXES_IN_USE) - const char *strp; +#if defined(UNIX) + char *strp; +#endif +#if defined(PREFIXES_IN_USE) + const char *cstrp; #endif #ifdef UNIX char *envp, cwdbuf[PATH_MAX]; @@ -4263,10 +4266,10 @@ reveal_paths(VOID_ARGS) #ifdef SYSCF #ifdef PREFIXES_IN_USE - strp = fqn_prefix_names[SYSCONFPREFIX]; + cstrp = fqn_prefix_names[SYSCONFPREFIX]; maxlen = BUFSZ - sizeof " (in )"; - if (strp && strlen(strp) < (size_t) maxlen) - Sprintf(buf, " (in %s)", strp); + if (cstrp && strlen(cstrp) < (size_t) maxlen) + Sprintf(buf, " (in %s)", cstrp); #else buf[0] = '\0'; #endif @@ -4292,13 +4295,13 @@ reveal_paths(VOID_ARGS) #ifndef UNIX #ifdef PREFIXES_IN_USE #ifdef WIN32 - strp = fqn_prefix_names[SYSCONFPREFIX]; + cstrp = fqn_prefix_names[SYSCONFPREFIX]; #else - strp = fqn_prefix_names[HACKPREFIX]; + cstrp = fqn_prefix_names[HACKPREFIX]; #endif /* WIN32 */ maxlen = BUFSZ - sizeof " (in )"; - if (strp && strlen(strp) < (size_t) maxlen) - Sprintf(buf, " (in %s)", strp); + if (cstrp && strlen(cstrp) < (size_t) maxlen) + Sprintf(buf, " (in %s)", cstrp); #endif /* PREFIXES_IN_USE */ raw_printf("Your game's loadable symbols file%s:", buf); #endif /* UNIX */ @@ -4327,10 +4330,10 @@ reveal_paths(VOID_ARGS) buf[0] = '\0'; #ifdef PREFIXES_IN_USE - strp = fqn_prefix_names[CONFIGPREFIX]; + cstrp = fqn_prefix_names[CONFIGPREFIX]; maxlen = BUFSZ - sizeof " (in )"; - if (strp && strlen(strp) < (size_t) maxlen) - Sprintf(buf, " (in %s)", strp); + if (cstrp && strlen(cstrp) < (size_t) maxlen) + Sprintf(buf, " (in %s)", cstrp); #endif /* PREFIXES_IN_USE */ raw_printf("Your personal configuration file%s:", buf); From c2bbbebd8eddc544207fce6e62118568ad254f82 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 11 Nov 2019 10:59:07 -0500 Subject: [PATCH 206/529] restrict a recent deaf message change to player actions only --- doc/fixes36.3 | 1 + src/zap.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 707de2ca2..1f7985f01 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -248,6 +248,7 @@ in symset:curses, symbol S_tree was accidentally set to horizontal line where plus-or-minus sign was meant; also, change S_bars to not-equals sign percentage highlighting for Xp broke up/down/changed highlighting for it; it was flagged as having gone up every time the percentage changed +deaf change to zap_over_floor needed to be restricted to player actions only curses: sometimes the message window would show a blank line after a prompt curses: the change to show map in columns 1..79 instead of 2..80 made the highlight for '@' show up in the wrong place if clipped map had been diff --git a/src/zap.c b/src/zap.c index bc4189a47..308754340 100644 --- a/src/zap.c +++ b/src/zap.c @@ -4443,7 +4443,9 @@ short exploding_wand_typ; } else if (is_pool(x, y)) { const char *msgtxt = (!Deaf) ? "You hear hissing gas." /* Deaf-aware */ - : "That seemed remarkably uneventful."; + : (type >= 0) + ? "That seemed remarkably uneventful." + : (const char *) 0; if (lev->typ != POOL) { /* MOAT or DRAWBRIDGE_UP */ if (see_it) @@ -4457,7 +4459,8 @@ short exploding_wand_typ; if (see_it) msgtxt = "The water evaporates."; } - Norep("%s", msgtxt); + if (msgtxt) + Norep("%s", msgtxt); if (lev->typ == ROOM) newsym(x, y); } else if (IS_FOUNTAIN(lev->typ)) { From c2f7fb7d841eb170dbdd0c3bd37e85472aea26d6 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 11 Nov 2019 18:46:14 +0200 Subject: [PATCH 207/529] Fix heap-use-after-free bcsign was used on a freed obj --- src/muse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/muse.c b/src/muse.c index ffaf63ab6..772a01777 100644 --- a/src/muse.c +++ b/src/muse.c @@ -2497,8 +2497,8 @@ boolean by_you; /* true: if mon kills itself, hero gets credit/blame */ vis = FALSE; /* skip makeknown() below */ res = FALSE; /* failed to cure sliming */ } else { - m_useup(mon, obj); /* before explode() */ dmg = (2 * (rn1(3, 3) + 2 * bcsign(obj)) + 1) / 3; + m_useup(mon, obj); /* before explode() */ /* -11 => monster's fireball */ explode(mon->mx, mon->my, -11, dmg, SCROLL_CLASS, /* by_you: override -11 for mon but not others */ From 91b4bd0da92a100e41d279ffdfca890948df3506 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 11 Nov 2019 11:46:49 -0500 Subject: [PATCH 208/529] new prefix_locked bits conditionalized to WIN32 --- include/decl.h | 2 ++ src/decl.c | 4 +++- src/files.c | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/decl.h b/include/decl.h index ff7404af3..c2e0648e1 100644 --- a/include/decl.h +++ b/include/decl.h @@ -398,7 +398,9 @@ E const char *const monexplain[], invisexplain[], *const oclass_names[]; #endif E char *fqn_prefix[PREFIX_COUNT]; +#ifdef WIN32 E boolean fqn_prefix_locked[PREFIX_COUNT]; +#endif #ifdef PREFIXES_IN_USE E char *fqn_prefix_names[PREFIX_COUNT]; #endif diff --git a/src/decl.c b/src/decl.c index d732df35c..d3706ef3b 100644 --- a/src/decl.c +++ b/src/decl.c @@ -286,11 +286,13 @@ char *fqn_prefix[PREFIX_COUNT] = { (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0 }; +#ifdef WIN32 boolean fqn_prefix_locked[PREFIX_COUNT] = { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }; - +#endif + #ifdef PREFIXES_IN_USE char *fqn_prefix_names[PREFIX_COUNT] = { "hackdir", "leveldir", "savedir", "bonesdir", "datadir", diff --git a/src/files.c b/src/files.c index e9af0a3c5..f8e77cfdf 100644 --- a/src/files.c +++ b/src/files.c @@ -2159,8 +2159,10 @@ int prefixid; if (!bufp) return; +#ifdef WIN32 if (fqn_prefix_locked[prefixid]) return; +#endif /* Backward compatibility, ignore trailing ;n */ if ((ptr = index(bufp, ';')) != 0) *ptr = '\0'; @@ -3870,9 +3872,10 @@ assure_syscf_file() { int fd; +#ifdef WIN32 /* We are checking that the sysconf exists ... lock the path */ fqn_prefix_locked[SYSCONFPREFIX] = TRUE; - +#endif /* * All we really care about is the end result - can we read the file? * So just check that directly. From 6dfbff9d4bcd3aa0dfa43bae90ab3dbc39c1d663 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 11 Nov 2019 12:49:54 -0500 Subject: [PATCH 209/529] --showpaths wasn't returning the paths if there was an error in a config file Also, Windows only: Introduces some environment variable substitution for paths specified in a config file --- include/flag.h | 2 ++ src/files.c | 17 +++++++++++- src/options.c | 2 +- sys/unix/unixmain.c | 2 ++ sys/winnt/windmain.c | 61 ++++++++++++++++++++++++++++++++++++++++++-- 5 files changed, 80 insertions(+), 4 deletions(-) diff --git a/include/flag.h b/include/flag.h index 8fe94339b..5370faab7 100644 --- a/include/flag.h +++ b/include/flag.h @@ -268,6 +268,8 @@ struct instance_flags { boolean mon_polycontrol; /* debug: control monster polymorphs */ boolean in_dumplog; /* doing the dumplog right now? */ boolean in_parse; /* is a command being parsed? */ + /* suppress terminate during options parsing, for --showpaths */ + boolean initoptions_noterminate; /* stuff that is related to options and/or user or platform preferences */ diff --git a/src/files.c b/src/files.c index f8e77cfdf..38a692113 100644 --- a/src/files.c +++ b/src/files.c @@ -151,6 +151,10 @@ static int lockptr; #ifndef WIN_CE #define DeleteFile unlink #endif +#ifdef WIN32 +/*from windmain.c */ +extern char *FDECL(translate_path_variables, (const char *, char *)); +#endif #endif #ifdef MAC @@ -350,6 +354,10 @@ const char *basenam; int whichprefix UNUSED_if_not_PREFIXES_IN_USE; int buffnum UNUSED_if_not_PREFIXES_IN_USE; { +#ifdef WIN32 + char tmpbuf[BUFSZ]; + +#endif #ifndef PREFIXES_IN_USE return basenam; #else @@ -367,9 +375,16 @@ int buffnum UNUSED_if_not_PREFIXES_IN_USE; basenam); return basenam; /* XXX */ } +#ifdef WIN32 + if (strchr(fqn_prefix[whichprefix], '%') || + strchr(fqn_prefix[whichprefix], '~')) + Strcpy(fqn_filename_buffer[buffnum], + translate_path_variables(fqn_prefix[whichprefix], tmpbuf)); + else +#endif Strcpy(fqn_filename_buffer[buffnum], fqn_prefix[whichprefix]); return strcat(fqn_filename_buffer[buffnum], basenam); -#endif +#endif /* !PREFIXES_IN_USE */ } int diff --git a/src/options.c b/src/options.c index bfeb08604..203532cde 100644 --- a/src/options.c +++ b/src/options.c @@ -673,7 +673,7 @@ initoptions() /* ... and _must_ parse correctly. */ if (!read_config_file(SYSCF_FILE, SET_IN_SYS)) { - if (config_error_done()) + if (config_error_done() && !iflags.initoptions_noterminate) nh_terminate(EXIT_FAILURE); } config_error_done(); diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index 50c047ff8..c2690ce4a 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -118,7 +118,9 @@ char *argv[]; #ifdef CHDIR chdirx((char *) 0, 0); #endif + iflags.initoptions_noterminate = TRUE; initoptions(); + iflags.initoptions_noterminate = FALSE; reveal_paths(); exit(EXIT_SUCCESS); } diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 22809751c..e1faeab50 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -24,6 +24,7 @@ static void FDECL(process_options, (int argc, char **argv)); static void NDECL(nhusage); static char *NDECL(get_executable_path); +char *FDECL(translate_path_variables, (char *, char *)); char *NDECL(exename); boolean NDECL(fakeconsole); void NDECL(freefakeconsole); @@ -62,8 +63,7 @@ char default_window_sys[] = "mswin"; static struct stat hbuf; #endif #include -#if defined(WIN32) || defined(MSDOS) -#endif + extern char orgdir[]; @@ -548,7 +548,9 @@ char *argv[]; nethack_exit(EXIT_SUCCESS); if (argcheck(argc, argv, ARG_SHOWPATHS) == 2) { + iflags.initoptions_noterminate = TRUE; initoptions(); + iflags.initoptions_noterminate = FALSE; reveal_paths(); nethack_exit(EXIT_SUCCESS); } @@ -853,6 +855,61 @@ get_executable_path() return path_buffer; } +char * +translate_path_variables(str, buf) +const char *str; +char *buf; +{ + const char *src; + char evar[BUFSZ], *dest, *envp, *eptr = (char *) 0; + boolean in_evar; + size_t ccount, ecount, destcount, slen = str ? strlen(str) : 0; + + if (!slen || !buf) { + if (buf) + *buf = '\0'; + return buf; + } + + dest = buf; + src = str; + in_evar = FALSE; + destcount = ecount = 0; + for (ccount = 0; ccount < slen && destcount < (BUFSZ - 1) && + ecount < (BUFSZ - 1); ++ccount, ++src) { + if (*src == '%') { + if (in_evar) { + *eptr = '\0'; + envp = nh_getenv(evar); + if (envp) { + size_t elen = strlen(envp); + + if ((elen + destcount) < (size_t) (BUFSZ - 1)) { + Strcpy(dest, envp); + dest += elen; + destcount += elen; + } + } + } else { + eptr = evar; + ecount = 0; + } + in_evar = !in_evar; + continue; + } + if (in_evar) { + *eptr++ = *src; + ecount++; + } else { + *dest++ = *src; + destcount++; + } + } + *dest = '\0'; + return buf; +} + + /*ARGSUSED*/ void windows_raw_print(str) From 02da5f2d38c3166d5c3c7d87dc876ddf358d80f6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 11 Nov 2019 14:19:16 -0500 Subject: [PATCH 210/529] more Windows path environ variable translation bits --- src/files.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/files.c b/src/files.c index 38a692113..454a80bc7 100644 --- a/src/files.c +++ b/src/files.c @@ -354,10 +354,13 @@ const char *basenam; int whichprefix UNUSED_if_not_PREFIXES_IN_USE; int buffnum UNUSED_if_not_PREFIXES_IN_USE; { +#ifdef PREFIXES_IN_USE + char *bufptr; +#endif #ifdef WIN32 char tmpbuf[BUFSZ]; - #endif + #ifndef PREFIXES_IN_USE return basenam; #else @@ -369,20 +372,17 @@ int buffnum UNUSED_if_not_PREFIXES_IN_USE; impossible("Invalid fqn_filename_buffer specified: %d", buffnum); buffnum = 0; } - if (strlen(fqn_prefix[whichprefix]) + strlen(basenam) - >= FQN_MAX_FILENAME) { - impossible("fqname too long: %s + %s", fqn_prefix[whichprefix], - basenam); + bufptr = fqn_prefix[whichprefix]; +#ifdef WIN32 + if (strchr(fqn_prefix[whichprefix], '%') + || strchr(fqn_prefix[whichprefix], '~')) + bufptr = translate_path_variables(fqn_prefix[whichprefix], tmpbuf); +#endif + if (strlen(bufptr) + strlen(basenam) >= FQN_MAX_FILENAME) { + impossible("fqname too long: %s + %s", bufptr, basenam); return basenam; /* XXX */ } -#ifdef WIN32 - if (strchr(fqn_prefix[whichprefix], '%') || - strchr(fqn_prefix[whichprefix], '~')) - Strcpy(fqn_filename_buffer[buffnum], - translate_path_variables(fqn_prefix[whichprefix], tmpbuf)); - else -#endif - Strcpy(fqn_filename_buffer[buffnum], fqn_prefix[whichprefix]); + Strcpy(fqn_filename_buffer[buffnum], bufptr); return strcat(fqn_filename_buffer[buffnum], basenam); #endif /* !PREFIXES_IN_USE */ } From a49f039e6fa359d7e763fa86c40ced166f2a53c4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 11 Nov 2019 15:24:01 -0500 Subject: [PATCH 211/529] fixes catch-up --- doc/fixes36.3 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 1f7985f01..ebaed0e3c 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -221,6 +221,7 @@ playing music while hallucinating: message misspelled "butterflies" putting on gloves while having slippery fingers transfered slipperiness to those gloves; taking off slippery gloves directly was disallowed but losing them in other ways transfered slipperiness to bare fingers +fix use of bcsign on a freed obj Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository From f5452848a55a4d68adeef5fa0336b9b91892c41f Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 11 Nov 2019 12:55:50 -0800 Subject: [PATCH 212/529] width of curses menus Menus with wide header or separator lines were rendered wide enough to avoid wrapping those lines, but ones with narrow header/separators and wide selectable entries were limited to half the display even though lots of lines that would fit with full width were being wrapped. Change the latter behavior. Menus are right justified with the edge of the map when narrower than it, left justified otherwise, and if the display is wider than the map, they'll extend beyond its right edge. (That hasn't actually changed; it's just that left-justification is more likely now that menus will be wide enough to show wide inventory lines without wrapping.) Get rid of my ridiculous hack to force wider menu for the 'symset' and 'roguesymset' sub-menus of 'O' since it's no longer useful. There's still room for improvement. If any lines need to be wrapped despite using the full width, or perhaps are just a lot wider than most of the entries, menu width could be narrowed to just enough for 'normal' lines to fit so that one or two really long entries don't distort the menu. That's a bit more complicated than I want to deal with right now. [If implemented, it would be relevant for tty too.] --- doc/fixes36.3 | 6 ++++-- src/options.c | 40 +--------------------------------------- win/curses/cursdial.c | 39 +++++++++++++++++++-------------------- 3 files changed, 24 insertions(+), 61 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index ebaed0e3c..85dbbdf79 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.168 $ $NHDT-Date: 1573290414 2019/11/09 09:06:54 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.171 $ $NHDT-Date: 1573505739 2019/11/11 20:55:39 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -221,7 +221,8 @@ playing music while hallucinating: message misspelled "butterflies" putting on gloves while having slippery fingers transfered slipperiness to those gloves; taking off slippery gloves directly was disallowed but losing them in other ways transfered slipperiness to bare fingers -fix use of bcsign on a freed obj +when a monster reads a scroll of fire to cure sliming, don't access that + scroll's memory after it has been used up (bcsign) Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository @@ -329,6 +330,7 @@ curses: enable the 'use_inverse' boolean option (via wincap WC_INVERSE flag) to override default of False (for tty's benefit) curses: force 'O' command's menus for 'symset' and 'roguesymset' options to be wider so that fewer entries with set descriptions will wrap +curses: stop restricting menu width to half the display width curses+'perm_invent': entries were wrapping without any control; usually not noticeable because next entry overwrote, but visible for final entry when whole inventory fit within the available height; looked ok with diff --git a/src/options.c b/src/options.c index 203532cde..c1c95c69e 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1572303730 2019/10/28 23:02:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.383 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1573505739 2019/11/11 20:55:39 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.386 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -5432,44 +5432,6 @@ boolean setinitial, setfromfile; tmpwin = create_nhwindow(NHW_MENU); start_menu(tmpwin); any = zeroany; -#ifdef CURSES_GRAPHICS /* this ought to be handled within curses... */ - /* - * Symbol sets are formatted in two columns, "name description", - * on selectable lines. curses bases menu width on the length - * of non-selectable lines (main header, separators if present, - * with trailing spaces ignored) and defaults to half the map. - * Without something like this separator (shown after the menu - * title and a blank line which follows that) to force a wider - * menu, entries with long descriptions wrap. That would be - * ok if wrapping operated on the same two columns, but the - * menu doesn't know anything about those and the description - * is wrapping into the next line's name column, making long - * descriptions--and menus containing them--hard to read. - */ - if (WINDOWPORT("curses")) { - char tmp1[BUFSZ], tmp2[BUFSZ], bigbuf[BUFSZ + 1 + BUFSZ]; - - /* 4: room for space+letter+paren+space, fake selector; - 2: added to 'biggest' when constructing 'fmtstr'; - 1: space between symset name+2 and symset description */ - if (4 + biggest + 2 + 1 > (int) sizeof tmp1 - 1) - biggest = (int) sizeof tmp1 - 1 - (4 + 2 + 1); - (void) memset((genericptr_t) tmp1, '-', biggest); - tmp1[biggest] = '\0'; - if (big_desc > (int) sizeof tmp2 - 1) - big_desc = (int) sizeof tmp2 - 1; - (void) memset((genericptr_t) tmp2, '-', big_desc); - tmp2[big_desc] = '\0'; - Sprintf(bigbuf, "%4s", ""); - Sprintf(eos(bigbuf), fmtstr, tmp1, tmp2); - bigbuf[BUFSZ - 1] = '\0'; - any.a_int = 0; - add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, - bigbuf, MENU_UNSELECTED); - } -#else - nhUse(big_desc); -#endif any.a_int = 1; /* -1 + 2 [see 'if (sl->name) {' below]*/ if (!symset_name) defindx = any.a_int; diff --git a/win/curses/cursdial.c b/win/curses/cursdial.c index 0dea1d26e..864b29687 100644 --- a/win/curses/cursdial.c +++ b/win/curses/cursdial.c @@ -759,11 +759,10 @@ curses_display_nhmenu(winid wid, int how, MENU_ITEM_P ** _selected) menu_determine_pages(current_menu); /* Display pre and post-game menus centered */ - if (((moves <= 1) && !invent) || program_state.gameover) { + if ((moves <= 1 && !invent) || program_state.gameover) { win = curses_create_window(current_menu->width, current_menu->height, CENTER); } else { /* Display during-game menus on the right out of the way */ - win = curses_create_window(current_menu->width, current_menu->height, RIGHT); } @@ -1000,13 +999,13 @@ static void menu_win_size(nhmenu *menu) { int maxwidth, maxheight, curentrywidth, lastline; - int maxentrywidth = (int) strlen(menu->prompt); - int maxheaderwidth = 0; + int maxentrywidth = 0; + int maxheaderwidth = menu->prompt ? (int) strlen(menu->prompt) : 0; nhmenu_item *menu_item_ptr; if (program_state.gameover) { /* for final inventory disclosure, use full width */ - maxwidth = term_cols - 2; + maxwidth = term_cols - 2; /* +2: borders assumed */ } else { /* this used to be 38, which is 80/2 - 2 (half a 'normal' sized screen minus room for a border box), but some data files @@ -1029,7 +1028,7 @@ menu_win_size(nhmenu *menu) maxheaderwidth = curentrywidth; } } else { - /* Add space for accelerator */ + /* Add space for accelerator (selector letter) */ curentrywidth += 4; #if 0 /* FIXME: menu glyphs */ if (menu_item_ptr->glyph != NO_GLYPH && iflags.use_menu_glyphs) @@ -1041,20 +1040,20 @@ menu_win_size(nhmenu *menu) } } - /* If widest entry is smaller than maxwidth, reduce maxwidth - accordingly (but not too far; minimum width will be applied below) */ - if (maxentrywidth < maxwidth) { - maxwidth = maxentrywidth; - } - - /* Try not to wrap headers/normal text lines if possible. We can - go wider than half the screen for this purpose if need be */ - - if (maxheaderwidth > maxwidth) { - if (maxheaderwidth < (term_cols - 2)) - maxwidth = maxheaderwidth; - else - maxwidth = term_cols - 2; + /* + * 3.6.3: This used to set maxwidth to maxheaderwidth when that was + * bigger but only set it to maxentrywidth if the latter was smaller, + * so entries wider than the default would always wrap unless at + * least one header or separator line was long, even when there was + * lots of space available to display them without wrapping. The + * reason to force narrow menus isn't known. It may have been to + * reduce the amount of map rewriting when menu is dismissed, but if + * so, that was an issue due to excessive screen writing for the map + * (output was flushed for each character) which was fixed long ago. + */ + maxwidth = max(maxentrywidth, maxheaderwidth); + if (maxwidth > term_cols - 2) { /* -2: space for left and right borders */ + maxwidth = term_cols - 2; } /* Possibly reduce height if only 1 page */ From 2359a9820e6eac96a5979742fc8feaf73e045fc7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 11 Nov 2019 18:12:39 -0500 Subject: [PATCH 213/529] prototype fix after Windows gcc complaint --- sys/winnt/windmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index e1faeab50..bd4740c51 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -24,7 +24,7 @@ static void FDECL(process_options, (int argc, char **argv)); static void NDECL(nhusage); static char *NDECL(get_executable_path); -char *FDECL(translate_path_variables, (char *, char *)); +char *FDECL(translate_path_variables, (const char *, char *)); char *NDECL(exename); boolean NDECL(fakeconsole); void NDECL(freefakeconsole); From ec9162631606b474f17b1bd31ffae82709ee64f6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 12 Nov 2019 12:42:42 -0500 Subject: [PATCH 214/529] fix mingw Makefile.gcc for 3.7 and lua support --- sys/winnt/Makefile.gcc | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 66399fab7..81c1e06f3 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -160,7 +160,7 @@ SKIP_NETHACKW=Y #============================================================================== # The version of the game this Makefile was designed for -NETHACK_VERSION="3.6.3" +NETHACK_VERSION="3.7.0" # A brief version for use in macros NHV1=$(subst .,,$(NETHACK_VERSION)) @@ -328,7 +328,7 @@ VOBJ29 = $(O)sfstruct.o $(O)sfascii.o $(O)sflendian.o #VOBJ31 = $(O)win10.o ifeq "$(ADD_LUA)" "Y" -LUAOBJ = $(O)nhlua.c $(O)nhlsel.c +LUAOBJ = $(O)nhlua.o $(O)nhlsel.o endif DLBOBJ = $(O)dlb.o @@ -414,9 +414,10 @@ OPTIONS_FILE = $(DAT)\options # Source from http://www.lua.org/ftp/lua-5.3.5.tar.gz #================================================================= +LUAVER = 5.3.5 LUASRC = $(LUATOP)/src -LUALIB = $(O)lua-5.3.5.static.a -LUADLL = $(O)lua-5.3.5.a +LUALIB = $(O)lua-$(LUAVER).static.a +LUADLL = $(O)lua-$(LUAVER).a LUAINCL = -I$(LUASRC) #LUAFLAGS = unix added -lm here? LUATARGETS = lua.exe luac.exe $(LUADLL) $(LUALIB) @@ -730,8 +731,8 @@ SHELL=CMD.EXE # Since DOS doesn't allow / as path separator, and GCC doesn't allow \ as # path separator, we must change all pathnames when performing DOS commands. # This is done by blindly applying $(subst /,\, ...) on every command. -# Where any command contain / for another reason (switch char, or echoing -# comment lines to lev/dungeon files) a little more care is taken. +# Where any command contain / for another reason (switch char, a little +# more care is taken. # # The default make target (so just typing 'nmake' is useful). @@ -749,8 +750,8 @@ install: initialchk $(O)utility.tag $(GAMEDIR)/NetHack.exe $(NETHACKW_EXE) \ @echo NetHack is up to date. @echo Done. -$(O)install.tag: $(DAT)/data $(DAT)/rumors $(DAT)/dungeon \ - $(DAT)/oracles $(DAT)/quest.dat $(O)sp_lev.tag $(DLB) +$(O)install.tag: $(DAT)/data $(DAT)/rumors $(DAT)/oracles \ + $(DAT)/quest.dat $(O)sp_lev.tag $(DLB) ifdef TRAVIS_COMPILER ls -l $(SRC) ls -l $(DAT) @@ -1052,7 +1053,7 @@ nhdat$(NHV): $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \ $(subst /,\,echo epitaph >>$(DAT)/dlb.lst) $(subst /,\,echo bogusmon >>$(DAT)/dlb.lst) $(subst /,\,echo tribute >>$(DAT)/dlb.lst) - dir /l /b /-p $(subst /,\,*.lua >>$(DAT)/dlb.lst) + dir /l /b /-p $(subst /,\,$(DAT)/*.lua >>$(DAT)/dlb.lst) $(subst /,\,$(U)dlb_main CcIf $(DAT) dlb.lst $(SRC)/nhdat) #========================================== @@ -1158,11 +1159,11 @@ lua.exe: $(O)lua.o $(LUALIB) luac.exe: $(O)luac.o $(LUALIB) $(link) $(LFLAGSU) -o$@ $(O)luac.o $(LUALIB) -lua5.3.5.dll: $(LUAOBJFILES) +$(LUADLL): $(LUAOBJFILES) $(cc) -shared -Wl,--export-all-symbols \ - -Wl,--add-stdcall-alias -o $@ $< + -Wl,--add-stdcall-alias -o $@ $(LUAOBJSFILES) -lua5.3.5-static.a: $(LUAOBJFILES) +$(LUALIB): $(LUAOBJFILES) ar rcs $@ $(LUAOBJFILES) $(O)lua.o: $(LUASRC)/lua.c @@ -1201,8 +1202,10 @@ ifneq "$(W_DAT)" "" if exist $(W_DAT)\oracles del $(W_DAT)\oracles if exist $(W_DAT)\rumors del $(W_DAT)\rumors if exist $(W_DAT)\quest.dat del $(W_DAT)\quest.dat +ifdef OBSOLETE_DGN_COMPILER if exist $(W_DAT)\dungeon del $(W_DAT)\dungeon if exist $(W_DAT)\dungeon.pdf del $(W_DAT)\dungeon.pdf +endif if exist $(W_DAT)\data del $(W_DAT)\data if exist $(W_DAT)\options del $(W_DAT)\options if exist $(W_DAT)\ttyoptions del $(W_DAT)\ttyoptions From bc0d78138f477a0009b79b115ce9f481e385abc4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 12 Nov 2019 19:58:48 -0500 Subject: [PATCH 215/529] some, but not all, vms issues fixed --- include/vmsconf.h | 8 +++++++- src/files.c | 2 +- src/topten.c | 12 +++++++----- sys/vms/vmsbuild.com | 2 +- sys/vms/vmsmain.c | 27 ++++++++++++++++++++++----- sys/vms/vmsunix.c | 2 +- 6 files changed, 39 insertions(+), 14 deletions(-) diff --git a/include/vmsconf.h b/include/vmsconf.h index a815e704a..9f061563b 100644 --- a/include/vmsconf.h +++ b/include/vmsconf.h @@ -172,7 +172,13 @@ PANICTRACE_GDB=2 #at conclusion of panic, show a call traceback and then * The remainder of the file should not need to be changed. */ -/* data librarian defs */ +/* This used to be force-defined for VMS in topten.c, but with + * the global variable consolidation into g in 3.7, it has to be + * defined here so that decl.h includes the field in g. + */ +#define UPDATE_RECORD_IN_PLACE + +/* data librarian defs */ #ifdef DLB #define DLBFILE "nh-data.dlb" /* diff --git a/src/files.c b/src/files.c index fd275c904..274934c47 100644 --- a/src/files.c +++ b/src/files.c @@ -1036,7 +1036,7 @@ boolean regularize_it; Sprintf(g.SAVEF, "[.save]%d%s", getuid(), g.plname); regoffset = 7; indicator_spot = 1; - postappend = ";1"); + postappend = ";1"; #endif #if defined(WIN32) if (regularize_it) { diff --git a/src/topten.c b/src/topten.c index 22347595d..34c43e536 100644 --- a/src/topten.c +++ b/src/topten.c @@ -11,11 +11,13 @@ #include "patchlevel.h" #endif -#ifdef VMS -/* We don't want to rewrite the whole file, because that entails - creating a new version which requires that the old one be deletable. */ -#define UPDATE_RECORD_IN_PLACE -#endif +/* If UPDATE_RECORD_IN_PLACE is defined, we don't want to rewrite the + * whole file, because that entails creating a new version which + * requires that the old one be deletable. UPDATE_RECORD_IN_PLACE + * had to be defined more centrally in 3.7 to ensure that the + * final_fpos field gets included in struct instance_globals aka 'g'. +*/ + /* * Updating in place can leave junk at the end of the file in some diff --git a/sys/vms/vmsbuild.com b/sys/vms/vmsbuild.com index 788838ba2..de04754bc 100755 --- a/sys/vms/vmsbuild.com +++ b/sys/vms/vmsbuild.com @@ -34,7 +34,7 @@ $ gnuc_ = "GCC" $ if f$type(gcc).eqs."STRING" then gnuc_ = gcc $ gnulib = "gnu_cc:[000000]gcclib/Library" !(not used w/ vaxc) $ ! common CC options (/obj=file doesn't work for GCC 1.36, use rename instead) -$ c_c_ = "/INCLUDE=[-.INCLUDE]" +$ c_c_ = "/INCLUDE=([-.INCLUDE],[-.-.LUA535.SRC])/DEFINE=(""LUA_USE_C89"", ""LUA_32BITS"")" $ veryold_vms = f$extract(1,1,f$getsyi("VERSION")).eqs."4" - .and. f$extract(3,3,f$getsyi("VERSION")).lts."6" $ if veryold_vms then c_c_ = c_c_ + "/DEFINE=(""VERYOLD_VMS"")" diff --git a/sys/vms/vmsmain.c b/sys/vms/vmsmain.c index f9df5d926..f4631557c 100644 --- a/sys/vms/vmsmain.c +++ b/sys/vms/vmsmain.c @@ -32,7 +32,7 @@ main(argc, argv) int argc; char *argv[]; { - register int fd; + NHFILE *nhfp; #ifdef CHDIR register char *dir; #endif @@ -49,7 +49,7 @@ char *argv[]; atexit(byebye); g.hname = argv[0]; g.hname = vms_basename(g.hname); /* name used in 'usage' type messages */ - hackpid = getpid(); + g.hackpid = getpid(); (void) umask(0); choose_windows(DEFAULT_WINDOW_SYS); @@ -67,8 +67,25 @@ char *argv[]; dir = nh_getenv("HACKDIR"); #endif if (argc > 1) { + if (argcheck(argc, argv, ARG_VERSION) == 2) + exit(EXIT_SUCCESS); + + if (argcheck(argc, argv, ARG_SHOWPATHS) == 2) { #ifdef CHDIR - if (!strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') { + chdirx((char *) 0, 0); +#endif + iflags.initoptions_noterminate = TRUE; + initoptions(); + iflags.initoptions_noterminate = FALSE; + reveal_paths(); + exit(EXIT_SUCCESS); + } + if (argcheck(argc, argv, ARG_DEBUG) == 1) { + argc--; + argv++; + } +#ifdef CHDIR + if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') { /* avoid matching "-dec" for DECgraphics; since the man page * says -d directory, hope nobody's using -desomething_else */ @@ -175,7 +192,7 @@ char *argv[]; * We'll return here if new game player_selection() renames the hero. */ attempt_restore: - if ((fd = restore_saved_game()) >= 0) { + if ((nhfp = restore_saved_game()) != 0) { const char *fq_save = fqname(g.SAVEF, SAVEPREFIX, 1); (void) chmod(fq_save, 0); /* disallow parallel restores */ @@ -188,7 +205,7 @@ attempt_restore: #endif pline("Restoring save file..."); mark_synch(); /* flush output */ - if (dorecover(fd)) { + if (dorecover(nhfp)) { resuming = TRUE; /* not starting new game */ wd_message(); if (discover || wizard) { diff --git a/sys/vms/vmsunix.c b/sys/vms/vmsunix.c index 81e71efeb..2eec83b01 100644 --- a/sys/vms/vmsunix.c +++ b/sys/vms/vmsunix.c @@ -110,7 +110,7 @@ getlock() 'a','b',&c below; override the default and use if we aren't restricting the number of simultaneous games */ if (!g.locknum) - Sprintf(g.lock, "_%u%s", (unsigned) getuid(), plname); + Sprintf(g.lock, "_%u%s", (unsigned) getuid(), g.plname); regularize(g.lock); set_levelfile_name(g.lock, 0); From 392ddb2fef8d72886a1d8977a2677fb281124446 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 12 Nov 2019 23:41:01 -0500 Subject: [PATCH 216/529] updates to vmsbuild.com to include lua and new 3.7 files --- sys/vms/vmsbuild.com | 53 +++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/sys/vms/vmsbuild.com b/sys/vms/vmsbuild.com index de04754bc..5ff0385b9 100755 --- a/sys/vms/vmsbuild.com +++ b/sys/vms/vmsbuild.com @@ -1,4 +1,4 @@ -$ ! vms/vmsbuild.com -- compile and link NetHack 3.6.* [pr] +$ ! vms/vmsbuild.com -- compile and link NetHack 3.7.* [pr] $ version_number = "3.7.0" $ ! $NHDT-Date: 1557701799 2019/05/12 22:56:39 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.23 $ $ ! Copyright (c) 2018 by Robert Patrick Rankin @@ -34,7 +34,8 @@ $ gnuc_ = "GCC" $ if f$type(gcc).eqs."STRING" then gnuc_ = gcc $ gnulib = "gnu_cc:[000000]gcclib/Library" !(not used w/ vaxc) $ ! common CC options (/obj=file doesn't work for GCC 1.36, use rename instead) -$ c_c_ = "/INCLUDE=([-.INCLUDE],[-.-.LUA535.SRC])/DEFINE=(""LUA_USE_C89"", ""LUA_32BITS"")" +$ ! c_c_ = "/INCLUDE=([-.INCLUDE],[-.-.LUA535.SRC])/DEFINE=(""LUA_USE_C89"",""LUA_32BITS"")" +$ c_c_ = "/INCLUDE=([-.INCLUDE],[-.-.LUA535.SRC])/DEFINE=(""LUA_USE_C89"")" $ veryold_vms = f$extract(1,1,f$getsyi("VERSION")).eqs."4" - .and. f$extract(3,3,f$getsyi("VERSION")).lts."6" $ if veryold_vms then c_c_ = c_c_ + "/DEFINE=(""VERYOLD_VMS"")" @@ -303,6 +304,28 @@ $ c_list = "uhitm,vault,vision,vis_tab,weapon,were,wield,windows" - + ",wizard,worm,worn,write,zap" $ gosub compile_list $! +$! Files added in 3.7 +$! +$ c_list = "sfbase,sfdata,sfstruct,sflendian,sfascii,nhlua,nhlsel" +$ gosub compile_list +$! +$! 3.7 runtime LUA level parser/loader +$! +$ c_list = "[-.-.LUA535.SRC]lapi,[-.-.LUA535.SRC]lauxlib,[-.-.LUA535.SRC]lbaselib" - + + ",[-.-.LUA535.SRC]lbitlib,[-.-.LUA535.SRC]lcode,[-.-.LUA535.SRC]lcorolib" - + + ",[-.-.LUA535.SRC]lctype,[-.-.LUA535.SRC]ldblib,[-.-.LUA535.SRC]ldebug" - + + ",[-.-.LUA535.SRC]ldo,[-.-.LUA535.SRC]ldump,[-.-.LUA535.SRC]lfunc" - + + ",[-.-.LUA535.SRC]lgc,[-.-.LUA535.SRC]linit,[-.-.LUA535.SRC]liolib" - + + ",[-.-.LUA535.SRC]llex" +$ gosub compile_list +$ c_list = "[-.-.LUA535.SRC]lmathlib,[-.-.LUA535.SRC]lmem,[-.-.LUA535.SRC]loadlib" - + + ",[-.-.LUA535.SRC]lobject,[-.-.LUA535.SRC]lopcodes,[-.-.LUA535.SRC]loslib" - + + ",[-.-.LUA535.SRC]lparser,[-.-.LUA535.SRC]lstate,[-.-.LUA535.SRC]lstring" - + + ",[-.-.LUA535.SRC]lstrlib,[-.-.LUA535.SRC]ltable,[-.-.LUA535.SRC]ltablib" - + + ",[-.-.LUA535.SRC]ltm,[-.-.LUA535.SRC]lundump,[-.-.LUA535.SRC]lutf8lib" - + + ",[-.-.LUA535.SRC]lvm,[-.-.LUA535.SRC]lzio" +$ gosub compile_list +$! $link: $ milestone "" $ link/Exe=nethack.exe nethack.opt/Options,ident.opt/Options,crtl.opt/Options @@ -313,19 +336,19 @@ $! $! build special level and dungeon compilers $! $ set default [-.util] -$ c_list = "#panic,#lev_main,#lev_yacc,#dgn_main,#dgn_yacc" -$ if c_opt.eq.o_SPCL then c_list = "[-.sys.vms]vmsfiles," + c_list -$ gosub compile_list -$ c_list = "#lev_lex,#dgn_lex" -$ copy [-.sys.vms]lev_lex.h stdio.*/Prot=(s:rwd,o:rwd) -$ gosub compile_list -$ rename stdio.h lev_lex.* -$ link/exe=lev_comp.exe lev_main.obj,lev_yacc.obj,lev_lex.obj,- - panic.obj,'nethacklib'/Lib,[-.src]ident.opt/Opt,[-.src]crtl.opt/Opt -$ milestone "lev_comp" -$ link/exe=dgn_comp.exe dgn_main.obj,dgn_yacc.obj,dgn_lex.obj,- - panic.obj,'nethacklib'/Lib,[-.src]ident.opt/Opt,[-.src]crtl.opt/Opt -$ milestone "dgn_comp" +$! c_list = "#panic,#lev_main,#lev_yacc,#dgn_main,#dgn_yacc" +$! if c_opt.eq.o_SPCL then c_list = "[-.sys.vms]vmsfiles," + c_list +$! gosub compile_list +$! c_list = "#lev_lex,#dgn_lex" +$! copy [-.sys.vms]lev_lex.h stdio.*/Prot=(s:rwd,o:rwd) +$! gosub compile_list +$! rename stdio.h lev_lex.* +$! link/exe=lev_comp.exe lev_main.obj,lev_yacc.obj,lev_lex.obj,- +$! panic.obj,'nethacklib'/Lib,[-.src]ident.opt/Opt,[-.src]crtl.opt/Opt +$! milestone "lev_comp" +$! link/exe=dgn_comp.exe dgn_main.obj,dgn_yacc.obj,dgn_lex.obj,- +$! panic.obj,'nethacklib'/Lib,[-.src]ident.opt/Opt,[-.src]crtl.opt/Opt +$! milestone "dgn_comp" $! $ c_list = "#dlb_main,#recover" $ gosub compile_list From f3a923d647fcfa7255f6302d718b86ba237f3c1e Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 13 Nov 2019 15:47:46 -0800 Subject: [PATCH 217/529] fix #H1554, #H1736, github issue #240 - silver ) Fixes #240 Monster versus monster (melee and throwing) didn't handle shades (need silver or blessed weapon to take damage) or silver feedback (extra info when silver-haters are hit). I did a lot of test, revise, re-test but didn't always re-test everything that had previously been tested, so bugs that I thought were quashed might have crept in. Now if a missile weapon "passes harmlessly through the shade" it will continue on and maybe hit something else. (Regular misses still stop at the missed target.) A couple of minor ball&chain changes accidentally got included. --- doc/fixes36.3 | 3 +- include/extern.h | 4 +- src/dothrow.c | 12 ++++-- src/mhitm.c | 95 ++++++++++++++++++++++++++++++++++++++++++------ src/mhitu.c | 13 +++++-- src/mthrowu.c | 32 ++++++++++++---- src/uhitm.c | 62 ++++++++++++++++++++++--------- src/zap.c | 13 +++++-- 8 files changed, 187 insertions(+), 47 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 85dbbdf79..66cb47b5b 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.171 $ $NHDT-Date: 1573505739 2019/11/11 20:55:39 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.172 $ $NHDT-Date: 1573688684 2019/11/13 23:44:44 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -223,6 +223,7 @@ putting on gloves while having slippery fingers transfered slipperiness to losing them in other ways transfered slipperiness to bare fingers when a monster reads a scroll of fire to cure sliming, don't access that scroll's memory after it has been used up (bcsign) +monster vs monster attacks didn't handle shades or silver weapon feedback Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/include/extern.h b/include/extern.h index 9467371b4..00fa63ee0 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1573346164 2019/11/10 00:36:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.738 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1573688684 2019/11/13 23:44:44 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.739 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2566,6 +2566,8 @@ E int FDECL(find_roll_to_hit, (struct monst *, UCHAR_P, struct obj *, int *, int *)); E boolean FDECL(attack, (struct monst *)); E boolean FDECL(hmon, (struct monst *, struct obj *, int, int)); +E boolean FDECL(shade_miss, (struct monst *, struct monst *, struct obj *, + BOOLEAN_P, BOOLEAN_P)); E int FDECL(damageum, (struct monst *, struct attack *, int)); E void FDECL(missum, (struct monst *, struct attack *, BOOLEAN_P)); E int FDECL(passive, (struct monst *, struct obj *, BOOLEAN_P, int, diff --git a/src/dothrow.c b/src/dothrow.c index 827cdca73..c1a415a58 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 dothrow.c $NHDT-Date: 1569276989 2019/09/23 22:16:29 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.161 $ */ +/* NetHack 3.6 dothrow.c $NHDT-Date: 1573688688 2019/11/13 23:44:48 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.164 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1151,6 +1151,10 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */ will be left with a stale pointer. */ if (u.uswallow) { + if (obj == uball) { + uball->ox = uchain->ox = u.ux; + uball->oy = uchain->oy = u.uy; + } mon = u.ustuck; bhitpos.x = mon->mx; bhitpos.y = mon->my; @@ -1285,7 +1289,7 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */ (void) snuff_candle(obj); notonhead = (bhitpos.x != mon->mx || bhitpos.y != mon->my); obj_gone = thitmonst(mon, obj); - /* Monster may have been tamed; this frees old mon */ + /* Monster may have been tamed; this frees old mon [obsolete] */ mon = m_at(bhitpos.x, bhitpos.y); /* [perhaps this should be moved into thitmonst or hmon] */ @@ -1310,8 +1314,8 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */ clear_thrownobj = TRUE; goto throwit_return; } else { - /* Mjollnir must we wielded to be thrown--caller verifies this; - aklys must we wielded as primary to return when thrown */ + /* Mjollnir must be wielded to be thrown--caller verifies this; + aklys must be wielded as primary to return when thrown */ if (iflags.returning_missile) { /* Mjollnir or aklys */ if (rn2(100)) { if (tethered_weapon) diff --git a/src/mhitm.c b/src/mhitm.c index 7d436ac84..c69597227 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mhitm.c $NHDT-Date: 1560161806 2019/06/10 10:16:46 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.116 $ */ +/* NetHack 3.6 mhitm.c $NHDT-Date: 1573688692 2019/11/13 23:44:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.117 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -63,16 +63,35 @@ struct attack *mattk; { const char *fmt; char buf[BUFSZ]; + boolean showit = FALSE; + + /* unhiding or unmimicking happens even if hero can't see it + because the formerly concealed monster is now in action */ + if (M_AP_TYPE(mdef)) { + seemimic(mdef); + showit |= vis; + } else if (mdef->mundetected) { + mdef->mundetected = 0; + showit |= vis; + } + if (M_AP_TYPE(magr)) { + seemimic(magr); + showit |= vis; + } else if (magr->mundetected) { + magr->mundetected = 0; + showit |= vis; + } if (vis) { if (!canspotmon(magr)) map_invisible(magr->mx, magr->my); + else if (showit) + newsym(magr->mx, magr->my); if (!canspotmon(mdef)) map_invisible(mdef->mx, mdef->my); - if (M_AP_TYPE(mdef)) - seemimic(mdef); - if (M_AP_TYPE(magr)) - seemimic(magr); + else if (showit) + newsym(mdef->mx, mdef->my); + fmt = (could_seduce(magr, mdef, mattk) && !magr->mcan) ? "%s pretends to be friendly to" : "%s misses"; @@ -512,24 +531,48 @@ hitmm(magr, mdef, mattk) register struct monst *magr, *mdef; struct attack *mattk; { + boolean weaponhit = ((mattk->aatyp == AT_WEAP + || (mattk->aatyp == AT_CLAW && otmp))), + silverhit = (weaponhit && otmp + && objects[otmp->otyp].oc_material == SILVER), + showit = FALSE; + + /* unhiding or unmimicking happens even if hero can't see it + because the formerly concealed monster is now in action */ + if (M_AP_TYPE(mdef)) { + seemimic(mdef); + showit |= vis; + } else if (mdef->mundetected) { + mdef->mundetected = 0; + showit |= vis; + } + if (M_AP_TYPE(magr)) { + seemimic(magr); + showit |= vis; + } else if (magr->mundetected) { + magr->mundetected = 0; + showit |= vis; + } + if (vis) { int compat; char buf[BUFSZ]; if (!canspotmon(magr)) map_invisible(magr->mx, magr->my); + else if (showit) + newsym(magr->mx, magr->my); if (!canspotmon(mdef)) map_invisible(mdef->mx, mdef->my); - if (M_AP_TYPE(mdef)) - seemimic(mdef); - if (M_AP_TYPE(magr)) - seemimic(magr); + else if (showit) + newsym(mdef->mx, mdef->my); + if ((compat = could_seduce(magr, mdef, mattk)) && !magr->mcan) { Sprintf(buf, "%s %s", Monnam(magr), mdef->mcansee ? "smiles at" : "talks to"); pline("%s %s %s.", buf, mon_nam(mdef), compat == 2 ? "engagingly" : "seductively"); - } else { + } else if (!shade_miss(magr, mdef, otmp, FALSE, TRUE)) { char magr_name[BUFSZ]; Strcpy(magr_name, Monnam(magr)); @@ -559,6 +602,28 @@ struct attack *mattk; Sprintf(buf, "%s hits", magr_name); } pline("%s %s.", buf, mon_nam_too(mdef, magr)); + + if (mon_hates_silver(mdef) && silverhit) { + char *mdef_name = mon_nam_too(mdef, magr); + + /* note: mon_nam_too returns a modifiable buffer; so + does s_suffix, but it returns a single static buffer + and we might be calling it twice for this message */ + Strcpy(magr_name, s_suffix(magr_name)); + if (!noncorporeal(mdef->data) && !amorphous(mdef->data)) { + if (mdef != magr) { + mdef_name = s_suffix(mdef_name); + } else { + (void) strsubst(mdef_name, "himself", "his own"); + (void) strsubst(mdef_name, "herself", "her own"); + (void) strsubst(mdef_name, "itself", "its own"); + } + Strcat(mdef_name, " flesh"); + } + + pline("%s %s sears %s!", magr_name, /*s_suffix(magr_name), */ + simpleonames(otmp), mdef_name); + } } } else noises(magr, mattk); @@ -895,13 +960,21 @@ register struct attack *mattk; physical: if (mattk->aatyp == AT_KICK && thick_skinned(pd)) { tmp = 0; - } else if (mattk->aatyp == AT_WEAP) { + } else if (mattk->aatyp == AT_WEAP + || (mattk->aatyp == AT_CLAW && otmp)) { + if (mdef->data == &mons[PM_SHADE] + && !(otmp && objects[otmp->otyp].oc_material == SILVER)) { + /* "passes harmlessly through" given by hitmm() */ + tmp = 0; + break; + } if (otmp) { struct obj *marmg; if (otmp->otyp == CORPSE && touch_petrifies(&mons[otmp->corpsenm])) goto do_stone; + tmp += dmgval(otmp, mdef); if ((marmg = which_armor(magr, W_ARMG)) != 0 && marmg->otyp == GAUNTLETS_OF_POWER) diff --git a/src/mhitu.c b/src/mhitu.c index 664955fb9..f14ddbb63 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mhitu.c $NHDT-Date: 1562800504 2019/07/10 23:15:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.166 $ */ +/* NetHack 3.6 mhitu.c $NHDT-Date: 1573688693 2019/11/13 23:44:53 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.167 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1793,8 +1793,7 @@ struct attack *mattk; if (!engulf_target(mtmp, &youmonst)) return 0; - if ((t && is_pit(t->ttyp)) - && sobj_at(BOULDER, u.ux, u.uy)) + if ((t && is_pit(t->ttyp)) && sobj_at(BOULDER, u.ux, u.uy)) return 0; if (Punished) @@ -1877,6 +1876,14 @@ struct attack *mattk; if (mtmp != u.ustuck) return 0; + if (Punished) { + /* ball&chain are in limbo while swallowed; update their internal + location to be at swallower's spot */ + if (uchain->where == OBJ_FREE) + uchain->ox = mtmp->mx, uchain->oy = mtmp->my; + if (uball->where == OBJ_FREE) + uball->ox = mtmp->mx, uball->oy = mtmp->my; + } if (u.uswldtim > 0) u.uswldtim -= 1; diff --git a/src/mthrowu.c b/src/mthrowu.c index 1c65e2488..7ecbbb2b2 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mthrowu.c $NHDT-Date: 1564767726 2019/08/02 17:42:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.85 $ */ +/* NetHack 3.6 mthrowu.c $NHDT-Date: 1573688695 2019/11/13 23:44:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.86 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2016. */ /* NetHack may be freely redistributed. See license for details. */ @@ -354,6 +354,10 @@ boolean verbose; /* give message(s) even when you can't see what happened */ damage = dmgval(otmp, mtmp); if (otmp->otyp == ACID_VENOM && resists_acid(mtmp)) damage = 0; +#if 0 /* can't use this because we don't have the attacker */ + if (is_orc(mtmp->data) && is_elf(?magr?)) + damage++; +#endif if (ismimic) seemimic(mtmp); mtmp->msleeping = 0; @@ -384,10 +388,19 @@ boolean verbose; /* give message(s) even when you can't see what happened */ } if (objects[otmp->otyp].oc_material == SILVER && mon_hates_silver(mtmp)) { - if (vis) - pline_The("silver sears %s flesh!", s_suffix(mon_nam(mtmp))); - else if (verbose && !target) - pline("Its flesh is seared!"); + boolean flesh = (!noncorporeal(mtmp->data) + && !amorphous(mtmp->data)); + + /* note: extra silver damage is handled by dmgval() */ + if (vis) { + char *m_name = mon_nam(mtmp); + + if (flesh) /* s_suffix returns a modifiable buffer */ + m_name = strcat(s_suffix(m_name), " flesh"); + pline_The("silver sears %s!", m_name); + } else if (verbose && !target) { + pline("%s is seared!", flesh ? "Its flesh" : "It"); + } } if (otmp->otyp == ACID_VENOM && cansee(mtmp->mx, mtmp->my)) { if (resists_acid(mtmp)) { @@ -539,7 +552,12 @@ struct obj *obj; /* missile (or stack providing it) */ while (range-- > 0) { /* Actually the loop is always exited by break */ bhitpos.x += dx; bhitpos.y += dy; - if ((mtmp = m_at(bhitpos.x, bhitpos.y)) != 0) { + mtmp = m_at(bhitpos.x, bhitpos.y); + if (mtmp && shade_miss(mon, mtmp, singleobj, TRUE, TRUE)) { + /* if mtmp is a shade and missile passes harmlessly through it, + give message and skip it in order to keep going */ + mtmp = (struct monst *) 0; + } else if (mtmp) { if (ohitmon(mtmp, singleobj, range, TRUE)) break; } else if (bhitpos.x == u.ux && bhitpos.y == u.uy) { @@ -754,7 +772,7 @@ struct attack *mattk; break; default: impossible("bad attack type in spitmu"); - /* fall through */ + /*FALLTHRU*/ case AD_ACID: otmp = mksobj(ACID_VENOM, TRUE, FALSE); break; diff --git a/src/uhitm.c b/src/uhitm.c index 29120a78a..a95595548 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 uhitm.c $NHDT-Date: 1567805813 2019/09/06 21:36:53 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.212 $ */ +/* NetHack 3.6 uhitm.c $NHDT-Date: 1573688694 2019/11/13 23:44:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.214 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -696,10 +696,8 @@ int dieroll; long silverhit = 0L; int wtype; struct obj *monwep; - char unconventional[BUFSZ]; /* substituted for word "attack" in msg */ char saved_oname[BUFSZ]; - unconventional[0] = '\0'; saved_oname[0] = '\0'; wakeup(mon, TRUE); @@ -872,7 +870,6 @@ int dieroll; } else { if (mdat == &mons[PM_SHADE] && !shade_aware(obj)) { tmp = 0; - Strcpy(unconventional, cxname(obj)); } else { switch (obj->otyp) { case BOULDER: /* 1d20 */ @@ -1143,21 +1140,14 @@ int dieroll; poiskilled = TRUE; } if (tmp < 1) { + boolean mon_is_shade = (mon->data == &mons[PM_SHADE]); + /* make sure that negative damage adjustment can't result in inadvertently boosting the victim's hit points */ - tmp = 0; - if (mdat == &mons[PM_SHADE]) { - if (!hittxt) { - const char *what = *unconventional ? unconventional : "attack"; - - Your("%s %s harmlessly through %s.", what, - vtense(what, "pass"), mon_nam(mon)); - hittxt = TRUE; - } - } else { - if (get_dmg_bonus) - tmp = 1; - } + tmp = (get_dmg_bonus && !mon_is_shade) ? 1 : 0; + if (mon_is_shade && !hittxt + && thrown != HMON_THROWN && thrown != HMON_KICKED) + hittxt = shade_miss(&youmonst, mon, obj, FALSE, TRUE); } if (jousting) { @@ -1367,6 +1357,44 @@ struct obj *obj; return FALSE; } +/* used for hero vs monster and monster vs monster; also handles + monster vs hero but that won't happen because hero can't be a shade */ +boolean +shade_miss(magr, mdef, obj, thrown, verbose) +struct monst *magr, *mdef; +struct obj *obj; +boolean thrown, verbose; +{ + const char *what, *whose, *target; + boolean youagr = (magr == &youmonst), youdef = (mdef == &youmonst); + + /* we're using dmgval() for zero/not-zero, not for actual damage amount */ + if (mdef->data != &mons[PM_SHADE] || (obj && dmgval(obj, mdef))) + return FALSE; + + if (verbose + && ((youdef || cansee(mdef->mx, mdef->my) || sensemon(mdef)) + || (magr == &youmonst && distu(mdef->mx, mdef->my) <= 2))) { + static const char harmless[] = " harmlessly through "; + + what = (!obj || shade_aware(obj)) ? "attack" : cxname(obj); + target = youdef ? "you" : mon_nam(mdef); + if (!thrown) { + whose = youagr ? "Your" : s_suffix(Monnam(magr)); + pline("%s %s %s%s%s.", whose, what, + vtense(what, "pass"), harmless, mon_nam(mdef)); + } else { + pline("%s %s%s%s.", The(what), /* note: not pline_The() */ + vtense(what, "pass"), harmless, mon_nam(mdef)); + } + if (!youdef && !canspotmon(mdef)) + map_invisible(mdef->mx, mdef->my); + } + if (!youdef) + mdef->msleeping = 0; + return TRUE; +} + /* check whether slippery clothing protects from hug or wrap attack */ /* [currently assumes that you are the attacker] */ STATIC_OVL boolean diff --git a/src/zap.c b/src/zap.c index 308754340..1c7a5debb 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 zap.c $NHDT-Date: 1561927499 2019/06/30 20:44:59 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.312 $ */ +/* NetHack 3.6 zap.c $NHDT-Date: 1573688696 2019/11/13 23:44:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.316 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3349,13 +3349,20 @@ struct obj **pobj; /* object tossed/used, set to NULL if (range > 3) /* another bounce? */ skiprange(range, &skiprange_start, &skiprange_end); } else if (mtmp && M_IN_WATER(mtmp->data)) { - if ((!Blind && canseemon(mtmp)) || sensemon(mtmp)) + if (!Blind && canspotmon(mtmp)) pline("%s %s over %s.", Yname2(obj), otense(obj, "pass"), mon_nam(mtmp)); + mtmp = (struct monst *) 0; } } - if (mtmp && !(in_skip && M_IN_WATER(mtmp->data))) { + /* if mtmp is a shade and missile passes harmlessly through it, + give message and skip it in order to keep going */ + if (mtmp && (weapon == THROWN_WEAPON || weapon == KICKED_WEAPON) + && shade_miss(&youmonst, mtmp, obj, TRUE, TRUE)) + mtmp = (struct monst *) 0; + + if (mtmp) { notonhead = (bhitpos.x != mtmp->mx || bhitpos.y != mtmp->my); if (weapon == FLASHED_LIGHT) { /* FLASHED_LIGHT hitting invisible monster should From 78716ab4bfeb7a06047076ed3324e10fd5033f93 Mon Sep 17 00:00:00 2001 From: keni Date: Thu, 14 Nov 2019 08:20:38 -0500 Subject: [PATCH 218/529] attempt to fix .BR macro --- doc/tmac.nh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/tmac.nh b/doc/tmac.nh index 6165c6c82..5a1bd0a60 100644 --- a/doc/tmac.nh +++ b/doc/tmac.nh @@ -117,10 +117,10 @@ .\" .BR - hard line break with vertical padding inserted .\" $1 - repeat count for amount of padding (optional; default is 1) .de BR -.nr bR (\\$1-0) -.if \\n(bR<1 .nr bR 1 -.nr bR \\n(bR*\\n(pd -.sn \\n(bRu +.ie \\.$==0 .nr bR 1v +.el .nr bR (\\$1-0)v +\0 +.sp \\n(bR .br .. .\" .UR url From 8e7888d631337d8abf850ea1a7114af36d5c17e0 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 14 Nov 2019 14:10:56 -0500 Subject: [PATCH 219/529] introduce msdos build support for cross-compiling on other platforms --- doc/fixes36.3 | 5 + src/files.c | 2 +- sys/msdos/Makefile1.cross | 705 +++++++++++++++++++++ sys/msdos/Makefile2.cross | 1258 +++++++++++++++++++++++++++++++++++++ sys/share/pcmain.c | 4 +- 5 files changed, 1970 insertions(+), 4 deletions(-) create mode 100644 sys/msdos/Makefile1.cross create mode 100644 sys/msdos/Makefile2.cross diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 66cb47b5b..25d065ddd 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -355,6 +355,11 @@ curses+EDIT_GETLIN: the preceding fix handled an answer which spanned more than one line but didn't remove the answer properly if the prompt portion of prompt+answer spanned more than one line msdos: code fixes to allow a build with curses and PDCurses +msdos: added Makefile1.cross (host portion) and Makefile2.cross (target + platform portion) to assist in moving this port toward a cross-compiled + build hosted on linux/OSX/Windows with recent C dialect support; that + will also pave the way for CI automation and testing of the msdos port + build in future should the port remain on the radar tty: re-do one optimization used when status conditions have all been removed and remove another that tried to check whether condition text to be displayed next was the same as the existing value; sometimes new diff --git a/src/files.c b/src/files.c index 454a80bc7..67047a9e1 100644 --- a/src/files.c +++ b/src/files.c @@ -52,7 +52,7 @@ const #endif #if defined(MSDOS) || defined(OS2) || defined(TOS) || defined(WIN32) -#ifndef GNUDOS +#ifndef __DJGPP__ #include #else #include diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross new file mode 100644 index 000000000..7e34932ad --- /dev/null +++ b/sys/msdos/Makefile1.cross @@ -0,0 +1,705 @@ +# NetHack 3.6 Makefile1.cross $NHDT-Date:$ $NHDT-Branch:$:$NHDT-Revision:$ +# Cross-compile msdos version of NetHack using a +# linux-hosted djgpp cross compiler. +# +# Makefile1.cross (this file) is for the host-side obj files and +# utilities that will run on the host platform only. +# +# Makefile2.cross is the the target platform obj files +# and utilities. +# +# Makefile2 utilizes the djgpp cross compiler from Andrew Wu: +# https://github.com/andrewwutw/build-djgpp +# +# The GNU Make has a problem if you include a drive spec below. +GAMEDIR =../binary + +# +#============================================================================== +# This marks the end of the BUILD DECISIONS section. +#============================================================================== +# +# Directories, gcc likes unix style directory specs +# + +OBJ = o +HOBJ = host_o +DAT = ../dat +DOC = ../doc +INCL = ../include +MSYS = ../sys/msdos +SRC = ../src +SSHR = ../sys/share +UTIL = ../util +WIN = ../win/tty +WCURSES = ../win/curses +WSHR = ../win/share + +# +# Executables. +# +HOST_CC = gcc +HOST_LINK = gcc +MAKEBIN = make + +# +# Special libraries and how to link them in. +# +LIBS = -lpc +LIBRARIES = $(LIBS) + +# +# Yacc/Lex off +# +YACC_LEX = N + +# +# Uncomment the line below if you want to store all the level files, +# help files, etc. in a single library file. +# +USE_DLB = Y + +#=============================================== +#======= End of Modification Section =========== +#=============================================== +################################################ +# # +# Nothing below here should have to be changed.# +# # +################################################ + +# Changing this conditional block is not recommended +ifeq "$(USE_DLB)" "Y" +DLBFLG = -DDLB +else +DLBFLG = +endif + +TERMLIB = + +#========================================== +#================ MACROS ================== +#========================================== +# This section creates shorthand macros for many objects +# referenced later on in the Makefile. +# +# Have windows path styles available for use in commands +# +W_OBJ =$(subst /,\, $(OBJ)) +W_INCL =$(subst /,\, $(INCL)) +W_DAT =$(subst /,\, $(DAT)) +W_DOC =$(subst /,\, $(DOC)) +W_UTIL =$(subst /,\, $(UTIL)) +W_SRC =$(subst /,\, $(SRC)) +W_SSYS =$(subst /,\, $(SSYS)) +W_MSWSYS =$(subst /,\, $(MSWSYS)) +W_TTY =$(subst /,\, $(TTY)) +W_MSWIN =$(subst /,\, $(MSWIN)) +ifeq "$(ADD_CURSES)" "Y" +W_WCURSES =$(subst /,\, $(WCURSES)) +endif +W_WSHR =$(subst /,\, $(WSHR)) +W_GAMEDIR =$(subst /,\, $(GAMEDIR)) + +# +# Shorten up the location for some files +# + +O = $(OBJ)/ +HOST_O = $(HOBJ)/ +U = $(UTIL)/ + +#========================================== +# Utility Objects. +#========================================== + +MAKESRC = makedefs.c + +MAKEDEFSOBJS = $(HOST_O)makedefs.o $(HOST_O)monst.o $(HOST_O)objects.o + +#SPLEVSRC = lev_yacc.c lev_$(LEX).c lev_main.c panic.c +#DGNCOMPSRC = dgn_yacc.c dgn_$(LEX).c dgn_main.c +#SPLEVOBJS = $(HOST_O)lev_yacc.o $(HOST_O)lev_$(LEX).o $(HOST_O)lev_main.o $(HOST_O)alloc.o \ +# $(HOST_O)monst.o $(HOST_O)objects.o $(HOST_O)panic.o \ +# $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)stubvid.o +#DGNCOMPOBJS = $(HOST_O)dgn_yacc.o $(HOST_O)dgn_$(LEX).o $(HOST_O)dgn_main.o $(HOST_O)alloc.o \ +# $(HOST_O)panic.o + +#========================================== +# Tile related object files. +#========================================== + +TILOBJ = $(HOST_O)tile.o $(VGAOBJ) + +TILOBJ2 = $(HOST_O)tileset.o $(HOST_O)bmptiles.o $(HOST_O)giftiles.o + +TEXTIO = $(HOST_O)tiletext.o $(HOST_O)tiletxt.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \ + $(HOST_O)objects.o + +TEXTIO2 = $(HOST_O)tiletex2.o $(HOST_O)tiletxt2.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \ + $(HOST_O)objects.o + +TILE_BMP = $(DAT)/nhtiles.bmp + +TILEUTIL = $(TILOBJ) $(U)tile2bin $(U)til2bin2 $(TILE_BMP) + +TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt + +TILEFILES2 = $(WSHR)/monthin.txt $(WSHR)/objthin.txt $(WSHR)/oththin.txt + +GIFREADERS = $(HOST_O)gifread.o $(HOST_O)alloc.o $(HOST_O)panic.o + +GIFREAD2 = $(HOST_O)gifread2.o $(HOST_O)alloc.o $(HOST_O)panic.o + +PPMWRITERS = $(HOST_O)ppmwrite.o $(HOST_O)alloc.o $(HOST_O)panic.o + +PPMWRIT2 = $(HOST_O)ppmwrit2.o $(HOST_O)alloc.o $(HOST_O)panic.o + +#========================================== +# Object files. +#========================================== + +DLBOBJ = $(HOST_O)dlb.o + +ALLOBJ = $(MAKEDEFSOBJS) $(TILOBJ) $(TILOBJ2) $(TEXTIO) $(TEXTIO2) + +#========================================== +# Header file macros +#========================================== + +PATCHLEV_H = $(INCL)/patchlev.h +DGN_FILE_H = $(INCL)/align.h $(INCL)/dgn_file.h +DUNGEON_H = $(INCL)/align.h $(INCL)/dungeon.h +MONDATA_H = $(INCL)/align.h $(INCL)/mondata.h +MONST_H = $(INCL)/align.h $(INCL)/monst.h $(INCL)/mextra.h +PERMONST_H = $(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/align.h \ + $(INCL)/permonst.h +REGION_H = $(INCL)/region.h +RM_H = $(INCL)/align.h $(INCL)/rm.h +SKILLS_H = $(INCL)/skills.h +SP_LEV_H = $(INCL)/align.h $(INCL)/sp_lev.h +YOUPROP_H = $(PERMONST_H) $(MONDATA_H) $(INCL)/prop.h \ + $(INCL)/pm.h $(INCL)/youprop.h +YOU_H = $(MONST_H) $(YOUPROP_H) $(INCL)/align.h \ + $(INCL)/attrib.h $(INCL)/you.h +DISPLAY_H = $(MONDATA_H) $(INCL)/vision.h $(INCL)/display.h +PCCONF_H = $(INCL)/micro.h $(INCL)/system.h $(INCL)/pcconf.h \ + $(MSYS)/pcvideo.h +CONFIG_H = $(GLOBAL_H) $(INCL)/tradstdc.h $(INCL)/config1.h \ + $(INCL)/config.h +DECL_H = $(YOU_H) $(INCL)/spell.h $(INCL)/color.h \ + $(INCL)/obj.h $(INCL)/onames.h $(INCL)/pm.h \ + $(INCL)/decl.h +GLOBAL_H = $(PCCONF_H) $(INCL)/coord.h $(INCL)/global.h +HACK_H = $(CONFIG_H) $(INCL)/context.h $(DUNGEON_H) \ + $(DECL_H) $(DISPLAY_H) $(INCL)/monsym.h \ + $(INCL)/mkroom.h $(INCL)/objclass.h $(INCL)/trap.h \ + $(INCL)/flag.h $(RM_H) $(INCL)/vision.h \ + $(INCL)/wintype.h $(INCL)/engrave.h $(INCL)/rect.h \ + $(INCL)/trampoli.h $(INCL)/hack.h $(REGION_H) \ + $(INCL)/sys.h +DLB_H = $(INCL)/dlb.h + +ifeq ($(SUPPRESS_GRAPHICS),Y) +TILE_H = +else +TILE_H = $(WSHR)/tile.h $(INCL)/tileset.h +endif + +ifeq ($(USE_DLB),Y) +DLB = dlb +DLBOBJS = $(HOST_O)dlb_main.o $(HOST_O)dlb.o $(HOST_O)alloc.o $(HOST_O)panic.o +else +DLB = +DLBOBJS = +endif + +#========================================== +# More compiler setup macros +#========================================== +# +CURSESDEF= +CURSESLIB= +INCLDIR=-I../include -I../sys/msdos +# Debugging +#cflags = -pg -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS +#LFLAGS = -pg +# +cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS +LFLAGS = +# +# Debugging +#cflags = -g -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES +#LFLAGS = -g +# +# Normal +cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES +LFLAGS = + +#========================================== +#================ RULES ================== +#========================================== + +.SUFFIXES: .o .til .uu .c .y .l + +#========================================== +# Rules for host files in src +#========================================== + +$(HOST_O)%.o : $(SRC)/%.c + $(HOST_CC) $(cflags) -o$@ $< + +#========================================== +# Rules for host files in sys/msdos +#========================================== + +$(HOST_O)%.o : $(MSYS)/%.c + $(HOST_CC) $(cflags) -I../sys/msdos -o$@ $< + +#========================================== +# Rules for host files in util +#========================================== + +$(HOST_O)%.o : $(SRC)/%.c + $(HOST_CC) $(cflags) -o$@ $< + +$(HOST_O)%.o : %.c + $(HOST_CC) $(cflags) -o$@ $< + +#========================================== +# Rules for host files in win/share +#========================================== + +$(HOST_O)%.o : $(WSHR)/%.c + $(HOST_CC) $(cflags) -I../win/share -o$@ $< + +#========================================== +# Primary Targets. +#========================================== + +# The default target. + +all : prereq + +prereq: $(HOST_O)prereq.tag + @echo Done. + +default: prereq + +util: $(HOST_O)utility.tag + +$(HOST_O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \ + $(INCL)/pm.h vis_tab.c $(TILEUTIL) + echo host utilities made > $@ + +tileutil: $(U)gif2txt $(U)txt2ppm + @echo Optional tile development utilities are up to date. + +$(HOST_O)prereq.tag: hobj.tag $(U)makedefs $(HOST_O)utility.tag \ + $(HOST_O)thintile.tag $(DAT)/nhdat + echo prereq done >$@ + +#========================================== +# Other host targets. +#========================================== + +#note that dir below assumes bin/dir from djgpp distribution +# +$(DAT)/nhdat: $(U)dlb_main $(DAT)/data $(DAT)/rumors \ + $(DAT)/oracles $(DAT)/quest.dat \ + $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute + cd $(DAT); \ + pwd; \ + cp $(MSYS)/msdoshlp.txt .; \ + ls -1 data oracles options quest.dat rumors help hh >dlb.lst; \ + ls -1 cmdhelp history opthelp wizhelp license >>dlb.lst; \ + ls -1 bogusmon engrave epitaph tribute msdoshlp.txt >>dlb.lst; \ + $(U)dlb_main cvIf dlb.lst nhdat + cd $(SRC) + +$(U)dlb_main: $(DLBOBJS) + $(HOST_LINK) $(LFLAGS) -o$@ $(DLBOBJS) + +$(HOST_O)dlb_main.o: $(U)dlb_main.c $(INCL)/config.h $(DLB_H) + $(HOST_CC) $(cflags) -o$@ $(U)dlb_main.c + + +$(INCL)/date.h : $(U)makedefs + -$(U)makedefs -v + +$(INCL)/onames.h: $(U)makedefs + -$(U)makedefs -o + +$(INCL)/pm.h: $(U)makedefs + -$(U)makedefs -p + +#monstr.c: $(U)makedefs +# -$(U)makedefs -m + +$(INCL)/vis_tab.h: $(U)makedefs + -$(U)makedefs -z + +vis_tab.c: $(U)makedefs + -$(U)makedefs -z + +# make data.base an 8.3 filename to prevent an make warning +DATABASE = $(DAT)/data.bas + +$(DAT)/data: $(HOST_O)utility.tag $(DATABASE) + $(U)makedefs -d + +$(DAT)/rumors: $(HOST_O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal + $(U)makedefs -r + +$(DAT)/quest.dat: $(HOST_O)utility.tag $(DAT)/quest.txt + $(U)makedefs -q + +$(DAT)/oracles: $(HOST_O)utility.tag $(DAT)/oracles.txt + $(U)makedefs -h + +$(DAT)/bogusmon: $(HOST_O)utility.tag $(DAT)/bogusmon.txt + $(U)makedefs -s + +$(DAT)/engrave: $(HOST_O)utility.tag $(DAT)/engrave.txt + $(U)makedefs -s + +$(DAT)/epitaph: $(HOST_O)utility.tag $(DAT)/epitaph.txt + $(U)makedefs -s + +#=============================================== +# Create directory for holding host object files +#=============================================== + +hobj.tag: + mkdir -p ./$(HOBJ) + echo directory ready ./$(HOBJ) + +#========================================== +# Makedefs Stuff +#========================================== + +$(U)makedefs: $(MAKEDEFSOBJS) + $(HOST_LINK) $(LFLAGS) -o$@ $(MAKEDEFSOBJS) + +$(HOST_O)makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/objclass.h \ + $(INCL)/monsym.h $(INCL)/qtext.h $(U)makedefs.c + $(HOST_CC) $(cflags) -o$@ $(U)makedefs.c + +#========================================== +# Level Compiler Dependencies +#========================================== + +#$(U)lev_comp: $(SPLEVOBJS) +# -rm -f temp.a +# ar r temp.a $(SPLEVOBJS) +# $(HOST_LINK) $(LFLAGS) -o$@ temp.a +# +#$(HOST_O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h $(U)lev_yacc.c +# $(HOST_CC) $(cflags) -o$@ $(U)lev_yacc.c +# +#$(HOST_O)lev_$(LEX).o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h \ +# $(U)lev_$(LEX).c +# $(HOST_CC) $(cflags) -o$@ $(U)lev_$(LEX).c +# +#$(HOST_O)lev_main.o: $(HACK_H) $(INCL)/sp_lev.h $(INCL)/date.h $(U)lev_main.c +# +#$(U)lev_yacc.c: $(SSHR)/lev_yacc.c +# @echo --- +# @echo For now, we will copy the prebuilt +# @echo lev_comp.c from $(SSHR) into $(U) and use that. +# @cp $(SSHR)/lev_yacc.c $(U)lev_yacc.c +# @echo.>>$(U)lev_yacc.c +# +#$(INCL)/lev_comp.h : $(SSHR)/lev_comp.h +# @echo For now, we will copy the prebuilt lev_comp.h +# @echo from $(SSHR) into $(INCL) and use that. +# @cp $(SSHR)/lev_comp.h $@ +#$(U)lev_lex.c: $(SSHR)/lev_lex.c +# @echo.>>$(INCL)/lev_comp.h +# @echo For now, we will copy the prebuilt lev_lex.c +# @echo from $(SSHR) into $(U) and use it. +# @cp $(SSHR)/lev_lex.c $@ +# @echo.>>$@ + +#========================================== +# Dungeon Dependencies +#========================================== + +#$(U)dgn_comp: $(DGNCOMPOBJS) +# $(HOST_LINK) $(LFLAGS) -o$@ $(DGNCOMPOBJS) +# +#$(U)dgn_yacc.c: $(SSHR)/dgn_yacc.c +# @echo --- +# @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and +# @echo dgn_comp.h from $(SSHR) into $(U) and use that. +# @cp $(SSHR)/dgn_yacc.c $(U)dgn_yacc.c +# @echo.>>$(U)dgn_yacc.c +# +#$(INCL)/dgn_comp.h: $(SSHR)/dgn_comp.h +# @echo --- +# @echo For now, we will copy the prebuilt dgn_comp.h +# @echo from $(SSHR) into $(INCL) and use that. +# @cp $(SSHR)/dgn_comp.h $@ +# @echo.>>$(INCL)/dgn_comp.h +# +#$(U)dgn_$(LEX).c: $(SSHR)/dgn_lex.c $(INCL)/dgn_comp.h +# @echo --- +# @echo For now, we will copy the prebuilt dgn_lex.c +# @echo from $(SSHR) into $(U) and use it. +# @cp $(SSHR)/dgn_lex.c $@ +# @echo.>>$@ + +#========================================== +# Header file moves required for tile support +#========================================== + +ifeq ($(SUPPRESS_GRAPHICS),Y) + +else +# +# Tile Mapping +# + +$(SRC)/tile.c: $(U)tilemap + @$(U)tilemap + @echo A new $@ has been created + +$(U)tilemap: $(HOST_O)tilemap.o + $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tilemap.o + +$(HOST_O)tilemap.o: $(WSHR)/tilemap.c $(HACK_H) $(TILE_H) + $(HOST_CC) $(cflags) -I$(WSHR) -I$(MSYS) -o$@ $(WSHR)/tilemap.c + + +#========================================== +# Tile Utilities +# Required for tile support +#========================================== + +$(DAT)/nhtiles.bmp: $(TILEFILES) $(U)tile2bmp + @echo Creating binary tile files which may take some time + @cd $(DAT) + @$(U)tile2bmp $@ + @cd $(SRC) + +$(U)tile2bmp: $(HOST_O)tile2bmp.o $(TEXTIO) + -rm -f temp.a + ar r temp.a $(TEXTIO) + $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bmp.o temp.a + +$(U)tile2bin: $(HOST_O)tile2bin.o $(TEXTIO) + -rm -f temp.a + ar r temp.a $(TEXTIO) + $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bin.o temp.a + +$(U)til2bin2: $(HOST_O)til2bin2.o $(TEXTIO2) + -rm -f temp.a + ar r temp.a $(TEXTIO2) + $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)til2bin2.o temp.a + +$(U)thintile: $(HOST_O)thintile.o + $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)thintile.o + +#$(HOST_O)thintile.o: $(HACK_H) $(WSHR)/tile.h $(WSHR)/thintile.c +# -rm -f temp.a +# ar r temp.a $(TEXTIO) +# $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bmp.o temp.a + +$(HOST_O)thintile.o: $(HACK_H) $(WSHR)/tile.h $(WSHR)/thintile.c + $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE -DOVERVIEW_FILE -o$@ $(WSHR)/thintile.c + +$(HOST_O)thintile.tag: $(U)thintile $(TILEFILES) + $(U)thintile + echo thintiles created >$@ + +$(HOST_O)tile2bmp.o: $(HACK_H) $(TILE_H) $(WSHR)/tile2bmp.c + $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(WSHR)/tile2bmp.c + +$(HOST_O)tile2bin.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c + $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/tile2bin.c + +$(HOST_O)til2bin2.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c + $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE_X=8 -DOVERVIEW_FILE -o$@ $(MSYS)/tile2bin.c + +$(HOST_O)tiletext.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tiletext.c + $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(WSHR)/tiletext.c + +$(HOST_O)tiletex2.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tiletext.c + $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE_X=8 -o$@ $(WSHR)/tiletext.c + +$(HOST_O)tiletxt.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tilemap.c + $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILETEXT -o$@ $(WSHR)/tilemap.c + +$(HOST_O)tiletxt2.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tilemap.c + $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILETEXT -DTILE_X=8 -o$@ $(WSHR)/tilemap.c +# +# Optional GIF Utilities (for development) +# + +$(U)gif2txt: $(GIFREADERS) $(TEXTIO) + $(HOST_LINK) $(LFLAGS) -o$@ $(GIFREADERS) $(TEXTIO) + +$(U)gif2txt2: $(GIFREAD2) $(TEXTIO2) + $(HOST_LINK) $(LFLAGS) -o$@ $(GIFREAD2) $(TEXTIO2) + +$(U)txt2ppm: $(PPMWRITERS) $(TEXTIO) + $(HOST_LINK) $(LFLAGS) -o$@ $(PPMWRITERS) $(TEXTIO) + +$(U)txt2ppm2: $(PPMWRIT2) $(TEXTIO2) + $(HOST_LINK) $(LFLAGS) -o$@ $(PPMWRIT2) $(TEXTIO2) + +$(HOST_O)gifread.o: $(CONFIG_H) $(WSHR)/tile.h $(WSHR)/gifread.c + +$(HOST_O)gifread2.o: $(CONFIG_H) $(WSHR)/tile.h $(WSHR)/gifread.c + $(HOST_CC) $(cflags) -DTILE_X=8 -o$@ $(WSHR)/gifread.c + +ppmwrite.c: $(WSHR)/ppmwrite.c + cp $(WSHR)/ppmwrite.c . + +$(HOST_O)ppmwrite.o: $(CONFIG_H) $(WSHR)/tile.h + +$(HOST_O)ppmwrit2.o: $(CONFIG_H) $(WSHR)/tile.h ppmwrite.c + $(HOST_CC) $(cflags) -DTILE_X=8 -o$@ ppmwrite.c + +# +# Optional tile viewer (development sources only) +# + +$(U)viewtib: $(HOST_O)viewtib.o + $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)viewtib.o $(LIBRARIES) + +$(HOST_O)viewtib.o: $(MSYS)/viewtib.c + +endif + +#========================================== +# Other host Util Dependencies. +#========================================== + +$(HOST_O)monst.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/monsym.h \ + $(INCL)/color.h monst.c + $(HOST_CC) $(cflags) -o$@ monst.c + +$(HOST_O)objects.o: $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ + $(INCL)/prop.h $(INCL)/color.h objects.c + $(HOST_CC) $(cflags) -o$@ objects.c + +$(HOST_O)panic.o: $(CONFIG_H) $(U)panic.c + $(HOST_CC) $(cflags) -o$@ $(U)panic.c + +#$(HOST_O)sp_lev.tag: $(HOST_O)utility.tag \ +# $(DAT)/bigroom.des $(DAT)/castle.des \ +# $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \ +# $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \ +# $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \ +# $(DAT)/caveman.des $(DAT)/healer.des $(DAT)/knight.des \ +# $(DAT)/monk.des $(DAT)/priest.des $(DAT)/ranger.des \ +# $(DAT)/rogue.des $(DAT)/samurai.des $(DAT)/tourist.des \ +# $(DAT)/valkyrie.des $(DAT)/wizard.des +# cd $(DAT) +# $(U)lev_comp bigroom.des +# $(U)lev_comp castle.des +# $(U)lev_comp endgame.des +# $(U)lev_comp gehennom.des +# $(U)lev_comp knox.des +# $(U)lev_comp mines.des +# $(U)lev_comp medusa.des +# $(U)lev_comp oracle.des +# $(U)lev_comp sokoban.des +# $(U)lev_comp tower.des +# $(U)lev_comp yendor.des +# $(U)lev_comp arch.des +# $(U)lev_comp barb.des +# $(U)lev_comp caveman.des +# $(U)lev_comp healer.des +# $(U)lev_comp knight.des +# $(U)lev_comp monk.des +# $(U)lev_comp priest.des +# $(U)lev_comp ranger.des +# $(U)lev_comp rogue.des +# $(U)lev_comp samurai.des +# $(U)lev_comp tourist.des +# $(U)lev_comp valkyrie.des +# $(U)lev_comp wizard.des +# cd $(SRC) +# echo sp_levs done > $@ + +#$(DAT)/dungeon: $(HOST_O)utility.tag $(DAT)/dungeon.def +# $(U)makedefs -e +# cd $(DAT) +# $(U)dgn_comp dungeon.pdf +# cd $(SRC) + +#========================================== +# Housekeeping for host side. +#========================================== + +clean: + rm ./host_o/*.o + if [ -f $(HOST_O)prereq.tag ]; then rm $(HOST_O)prereq.tag; fi; + if [ -f hobj.tag ]; then rm hobj.tag; fi; + if [ -f $(HOST_O)utility.tag ]; then rm $(HOST_O)utility.tag; fi; + if [ -f temp.a ]; then rm temp.a; fi; + +spotless: clean + + if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi; +# if [ -f $(U)dgn_flex.c ]; then rm $(U)dgn_flex.c; fi; +# if [ -f $(U)dgn_lex.c ]; then rm $(U)dgn_lex.c; fi; +# if [ -f $(U)makedefs ]; then rm $(U)makedefs; fi; +# if [ -f $(U)dgn_comp ]; then rm $(U)dgn_comp; fi; +# if [ -f $(U)recover.exe ]; then rm $(U)recover.exe; fi; +# if [ -f $(U)tilemap ]; then rm $(U)tilemap; fi; +# if [ -f $(U)tile2bmp ]; then rm $(U)tile2bmp; fi; +# if [ -f $(U)tile2bin ]; then rm $(U)tile2bin; fi; +# if [ -f $(U)til2bin2 ]; then rm $(U)til2bin2; fi; +# if [ -f $(U)thintile ]; then rm $(U)thintile; fi; +# if [ -f $(U)dlb_main ]; then rm $(U)dlb_main; fi; +# if [ -f $(INCL)/vis_tab.h ]; then rm $(INCL)/vis_tab.h; fi; +# if [ -f $(INCL)/onames.h ]; then rm $(INCL)/onames.h; fi; +# if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi; +# if [ -f $(INCL)/date.h ]; then rm $(INCL)/date.h; fi; +# if [ -f $(INCL)/dgn_comp.h ]; then rm $(INCL)/dgn_comp.h; fi; +# if [ -f $(INCL)/lev_comp.h ]; then rm $(INCL)/lev_comp.h; fi; +# if [ -f $(SRC)/vis_tab.c ]; then rm $(SRC)/vis_tab.c; fi; +# if [ -f $(SRC)/tile.c ]; then rm $(SRC)/tile.c; fi; +# if [ -f $(DAT)/options ]; then rm $(DAT)/options; fi; +# if [ -f $(DAT)/data ]; then rm $(DAT)/data; fi; +# if [ -f $(DAT)/rumors ]; then rm $(DAT)/rumors; fi; +# if [ -f $(DAT)/dungeon.pdf ]; then rm $(DAT)/dungeon.pdf; fi; +# if [ -f $(DAT)/dungeon ]; then rm $(DAT)/dungeon; fi; +# if [ -f $(DAT)/oracles ]; then rm $(DAT)/oracles; fi; +# if [ -f $(DAT)/quest.dat ]; then rm $(DAT)/quest.dat; fi; +# if [ -f $(DAT)/bogusmon ]; then rm $(DAT)/bogusmon; fi; +# if [ -f $(DAT)/engrave ]; then rm $(DAT)/engrave; fi; +# if [ -f $(DAT)/epitaph ]; then rm $(DAT)/epitaph; fi; +# if [ -f $(DAT)/dlb.lst ]; then rm $(DAT)/dlb.lst; fi; +# if [ -f $(DAT)/nhdat ]; then rm $(DAT)/nhdat; fi; +# if [ -f $(DAT)/*.lev ]; then rm $(DAT)/*.lev; fi; +# if [ -f $(TILE_BMP) ]; then rm $(TILE_BMP); fi; +# if [ -f $(WSHR)/monthin.txt ]; then rm $(WSHR)/monthin.txt; fi; +# if [ -f $(WSHR)/objthin.txt ]; then rm $(WSHR)/objthin.txt; fi; +# if [ -f $(WSHR)/oththin.txt ]; then rm $(WSHR)/oththin.txt; fi; + +#========================================== +# Game Dependencies +#========================================== + +# src dependencies + +$(HOST_O)tile.o: tile.c $(HACK_H) +$(HOST_O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)/vis_tab.h +$(HOST_O)alloc.o: alloc.c $(CONFIG_H) +$(HOST_O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h + $(HOST_CC) $(cflags) -I../sys/msdos -o$@ dlb.c +$(HOST_O)monst.o: monst.c $(CONFIG_H) $(INCL)/permonst.h $(INCL)/align.h \ + $(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/monsym.h \ + $(INCL)/color.h +$(HOST_O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ + $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h +$(HOST_O)tileset.o: $(WSHR)/tileset.c $(HACK_H) +$(HOST_O)bmptiles.o: $(WSHR)/bmptiles.c $(INCL)/config.h $(INCL)/tileset.h $(INCL)/integer.h +$(HOST_O)giftiles.o: $(WSHR)/giftiles.c $(INCL)/config.h $(INCL)/tileset.h $(INCL)/integer.h + +# end of file + diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross new file mode 100644 index 000000000..22a9f8c8a --- /dev/null +++ b/sys/msdos/Makefile2.cross @@ -0,0 +1,1258 @@ +# NetHack 3.6 Makefile2.cross $NHDT-Date:$ $NHDT-Branch:$:$NHDT-Revision:$ +# Cross-compile msdos version of NetHack using a +# linux-hosted djgpp cross compiler. +# +# Makefile1.cross is for the host-side obj files and utilities that +# will run on the host platform only. +# +# Makefile2.cross (this file) is the the target platform obj files +# and utilities. +# +# Makefile2 utilizes the djgpp cross compiler from Andrew Wu: +# https://github.com/andrewwutw/build-djgpp +# +# Game Installation Variables +# NOTE: Make sure GAMEDIR exists before make is started. + +GAME = nethack +# The GNU Make has a problem if you include a drive spec below (unfortunately). +GAMEDIR =../binary + +# Optional PDCurses support +# Uncomment these and set them appropriately if you want to +# include curses port support alongside TTY support in your +# NetHack.exe binary. +# +# You'll have to set PDCURSES_H to the correct location of the +# PDCurses header (.h) files and PDCURSES_C to the location +# of your PDCurses C files which must already be resident on +# your machine. +# +ADD_CURSES=Y +PDCURSES_TOP=../../pdcurses + +# Set top of djgpp if not specified through ENV variables prior to make: +#DJGPP_TOP = $(HOME)/djgpp + +# +#============================================================================== +# This marks the end of the BUILD DECISIONS section. +#============================================================================== +# +# Directories, gcc likes unix style directory specs +# + +OBJ = o +HOBJ = host_o +DAT = ../dat +DOC = ../doc +INCL = ../include +MSYS = ../sys/msdos +SRC = ../src +SSHR = ../sys/share +UTIL = ../util +WIN = ../win/tty +WCURSES = ../win/curses +WSHR = ../win/share + +# +# Executables. +ifndef DJGPP_TOP +ifdef TRAVIS_BUILD_DIR +DJGPP_TOP = TRAVIS_BUILD_DIR/djgpp +else +DJGPP_TOP = $(HOME)/djgpp +endif +endif + +TARGET_CC = $(DJGPP_TOP)/i586-pc-msdosdjgpp/bin/gcc +TARGET_LINK = $(DJGPP_TOP)/i586-pc-msdosdjgpp/bin/gcc +TARGET_STUBEDIT = $(DJGPP_TOP)/i586-pc-msdosdjgpp/bin/stubedit +MAKEBIN = make + +# +# Special libraries and how to link them in. + +LIBS = -lpc + +# If TERMLIB is defined in pcconf.h, comment out the upper line and +# uncomment the lower. Note that you must build the termc library +# and place it in djgpp's lib directory. See termcap.zip for details + +TERMLIB = +#TERMLIB = -ltermc + +LIBRARIES = $(LIBS) $(TERMLIB) + +# +# Yacc/Lex ... if you got 'em. +# +# If you have yacc/lex or a work-alike set YACC_LEX to Y +# +YACC_LEX = N + +ifeq "$(YACC_LEX)" "Y" +DO_YACC = YACC_ACT +DO_LEX = LEX_ACT +endif + +# If YACC_LEX is Y above, set the following to values appropriate for +# your tools. +# +YACC = bison -y +LEX = lex +# +# If your flex and bison port mess with the output names directly +# you must set the file names to the appropriate output file names +# here +#YTABC = y_tab.c +#YTABH = y_tab.h +#LEXYYC = lexyy.c +# +# If your flex and bison are able to produce files named +# y.tab.c, y.tab.h or lex.yy.c you might have to set these +# to the short file name equivalent (DIR /X to reveal them): +YTABC = ytab~1.c +YTABH = ytab~1.h +LEXYYC = lexyy~1.c + +# +# Uncomment the line below if you want to store all the level files, +# help files, etc. in a single library file. + +USE_DLB = Y + +# djgpp includes ls.exe and touch.exe in fil41b.zip from the v2gnu +# folder so be sure to include that when downloading djgpp. Doing +# so will make changing this unnecessary. + +LS = ls -1 # ls.exe from djgpp distribution +#LS = dir /l/b # DOS command + +# To build a binary without any graphics +# suitable for blind players, +# set SUPPRESS_GRAPHICS to Y +# (Note: binary will require ANSI.SYS driver or equivalent loaded) +# SUPPRESS_GRAPHICS = Y +SUPPRESS_GRAPHICS = + +# ZLIB Support +# To support zlib compression in bones and save files, you must +# define ZLIB_COMP in include/config.h. +# You must also have a zlib library to link NetHack with, and +# for the djgpp build, you need one compatible with djgpp. +# At the time that this was written (post-NetHack 3.4.3) the +# following URL was a valid place to get a pre-built djgpp library +# to add to your djgpp tools directory tree. +# http://www.delorie.com/pub/djgpp/current/v2tk/zlib114b.zip +# +# If you defined ZLIB_COMP in include/config.h to build in support +# for ZLIB compression, you need to uncomment the line below. +#ZLIB= -lz + +#=============================================== +#======= End of Modification Section =========== +#=============================================== +################################################ +# # +# Nothing below here should have to be changed.# +# # +################################################ + +GAMEFILE = $(GAMEDIR)/$(GAME).exe + +# Changing this conditional block is not recommended +ifeq "$(USE_DLB)" "Y" +DLBFLG = -DDLB +else +DLBFLG = +endif + +TERMLIB = +# Build NetHack suitable for blind players + +#========================================== +#================ MACROS ================== +#========================================== +# This section creates shorthand macros for many objects +# referenced later on in the Makefile. +# +# Have windows path styles available for use in commands +# +W_OBJ =$(subst /,\, $(OBJ)) +W_INCL =$(subst /,\, $(INCL)) +W_DAT =$(subst /,\, $(DAT)) +W_DOC =$(subst /,\, $(DOC)) +W_UTIL =$(subst /,\, $(UTIL)) +W_SRC =$(subst /,\, $(SRC)) +W_SSYS =$(subst /,\, $(SSYS)) +W_MSWSYS =$(subst /,\, $(MSWSYS)) +W_TTY =$(subst /,\, $(TTY)) +W_MSWIN =$(subst /,\, $(MSWIN)) +ifeq "$(ADD_CURSES)" "Y" +W_WCURSES =$(subst /,\, $(WCURSES)) +endif +W_WSHR =$(subst /,\, $(WSHR)) +W_GAMEDIR =$(subst /,\, $(GAMEDIR)) + +# +# Shorten up the location for some files +# + +O = $(OBJ)/ +HOST_O = $(HOBJ)/ +U = $(UTIL)/ + +#========================================== +# Utility Objects. +#========================================== + +VGAOBJ = $(O)vidvga.o $(O)vidvesa.o + +MAKESRC = makedefs.c + +#SPLEVSRC = lev_yacc.c lev_$(LEX).c lev_main.c panic.c + +#DGNCOMPSRC = dgn_yacc.c dgn_$(LEX).c dgn_main.c + +MAKEDEFSOBJS = $(HOST_O)makedefs.o $(HOST_O)monst.o $(HOST_O)objects.o + +#SPLEVOBJS = $(HOST_O)lev_yacc.o $(HOST_O)lev_$(LEX).o $(HOST_O)lev_main.o $(HOST_O)alloc.o \ +# $(HOST_O)monst.o $(HOST_O)objects.o $(HOST_O)panic.o \ +# $(HOST_O)drawing.o $(HOST_O)decl.o $(O)stubvid.o + +#DGNCOMPOBJS = $(HOST_O)dgn_yacc.o $(HOST_O)dgn_$(LEX).o $(HOST_O)dgn_main.o $(HOST_O)alloc.o \ +# $(HOST_O)panic.o + +RECOVOBJS = $(O)recover.o + + +#========================================== +# Tile related object files. +#========================================== + +ifeq ($(SUPPRESS_GRAPHICS),Y) +TILOBJ = +TILOBJ2 = +TEXTIO = +TEXTIO2 = +TILE_BMP = +TILEUTIL = +TILEFILES = +TILEFILES2 = +GIFREADERS = +GIFREAD2 = +PPMWRITERS = +PPMWRIT2 = + +else + +TILOBJ = $(O)tile.o $(VGAOBJ) + +TILOBJ2 = $(O)tileset.o $(O)bmptiles.o $(O)giftiles.o + +TEXTIO = $(HOST_O)tiletext.o $(HOST_O)tiletxt.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \ + $(HOST_O)objects.o $(HOST_O)stubvid.o + +TEXTIO2 = $(HOST_O)tiletex2.o $(HOST_O)tiletxt2.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \ + $(HOST_O)objects.o $(HOST_O)stubvid.o + +TILE_BMP = $(DAT)/nhtiles.bmp + +TILEUTIL = $(TILOBJ) $(U)tile2bin $(U)til2bin2 $(TILE_BMP) + +TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt + +TILEFILES2 = $(WSHR)/monthin.txt $(WSHR)/objthin.txt $(WSHR)/oththin.txt + +GIFREADERS = $(HOST_O)gifread.o $(HOST_O)alloc.o $(HOST_O)panic.o + +GIFREAD2 = $(HOST_O)gifread2.o $(HOST_O)alloc.o $(HOST_O)panic.o + +PPMWRITERS = $(HOST_O)ppmwrite.o $(HOST_O)alloc.o $(HOST_O)panic.o + +PPMWRIT2 = $(HOST_O)ppmwrit2.o $(HOST_O)alloc.o $(HOST_O)panic.o +endif + +#REGEX = $(O)pmatchregex.o +#REGEX = $(O)cppregex.o +REGEX = $(O)posixreg.o + +DLBOBJ = $(O)dlb.o + +# Object files for the game itself. + + +VOBJ01 = $(O)allmain.o $(O)alloc.o $(O)apply.o $(O)artifact.o $(O)attrib.o +VOBJ02 = $(O)ball.o $(O)bones.o $(O)botl.o $(O)cmd.o $(O)dbridge.o +VOBJ03 = $(O)decl.o $(O)detect.o $(O)display.o $(O)do.o $(O)do_name.o +VOBJ04 = $(O)do_wear.o $(O)dog.o $(O)dogmove.o $(O)dokick.o $(O)dothrow.o +VOBJ05 = $(O)drawing.o $(O)dungeon.o $(O)eat.o $(O)end.o $(O)engrave.o +VOBJ06 = $(O)exper.o $(O)explode.o $(O)extralev.o $(O)files.o $(O)fountain.o +VOBJ07 = $(O)getline.o $(O)hack.o $(O)hacklib.o $(O)invent.o $(O)lock.o +VOBJ08 = $(O)mail.o $(O)main.o $(O)makemon.o $(O)mapglyph.o $(O)mcastu.o $(O)mhitm.o +VOBJ09 = $(O)mhitu.o $(O)minion.o $(O)mkmap.o $(O)mklev.o $(O)mkmaze.o +VOBJ10 = $(O)mkobj.o $(O)mkroom.o $(O)mon.o $(O)mondata.o $(O)monmove.o +VOBJ11 = $(O)monst.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o +VOBJ12 = $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o $(O)options.o +VOBJ13 = $(O)pickup.o $(O)pline.o $(O)polyself.o $(O)potion.o $(O)quest.o +VOBJ14 = $(O)questpgr.o $(O)pager.o $(O)pray.o $(O)priest.o $(O)read.o +VOBJ15 = $(O)rect.o $(O)restore.o $(O)rip.o $(O)rnd.o $(O)role.o +VOBJ16 = $(O)rumors.o $(O)save.o $(O)shk.o $(O)shknam.o $(O)sit.o +VOBJ17 = $(O)sounds.o $(O)sp_lev.o $(O)spell.o $(O)steal.o $(O)steed.o +VOBJ18 = $(O)termcap.o $(O)timeout.o $(O)topl.o $(O)topten.o $(O)track.o +VOBJ19 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o $(O)vision.o +VOBJ20 = $(O)vis_tab.o $(O)weapon.o $(O)were.o $(O)wield.o $(O)windows.o +VOBJ21 = $(O)wintty.o $(O)wizard.o $(O)worm.o $(O)worn.o $(O)write.o +VOBJ22 = $(O)zap.o $(O)light.o $(O)dlb.o $(O)dig.o $(O)teleport.o +VOBJ23 = $(O)region.o $(O)sys.o $(REGEX) $(O)isaac64.o + +SOBJ = $(O)msdos.o $(O)sound.o $(O)pcsys.o $(O)tty.o $(O)unix.o \ + $(O)video.o $(O)vidtxt.o $(O)pckeys.o + +VVOBJ = $(O)version.o + +ifeq "$(ADD_CURSES)" "Y" +CURSESOBJ= $(O)cursdial.o $(O)cursinit.o $(O)cursinvt.o $(O)cursmain.o \ + $(O)cursmesg.o $(O)cursmisc.o $(O)cursstat.o $(O)curswins.o +else +CURSESOBJ= +endif + +VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ + $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \ + $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ + $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ + $(VOBJ21) $(VOBJ22) $(VOBJ23) \ + $(CURSESOBJ) + +ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(TILOBJ2) $(VVOBJ) + +ifeq "$(ADD_CURSES)" "Y" +#========================================== +# PDCurses build macros +#========================================== +PDCURSES_CURSES_H = $(PDCURSES_TOP)/curses.h +PDCURSES_CURSPRIV_H = $(PDCURSES_TOP)/curspriv.h +PDCURSES_HEADERS = $(PDCURSES_CURSES_H) $(PDCURSES_CURSPRIV_H) +PDCSRC = $(PDCURSES_TOP)/pdcurses +PDCDOS = $(PDCURSES_TOP)/dos +PDCLIBOBJS1 = $(O)addch.o $(O)addchstr.o $(O)addstr.o $(O)attr.o $(O)beep.o \ + $(O)bkgd.o $(O)border.o $(O)clear.o $(O)color.o $(O)delch.o $(O)deleteln.o \ + $(O)getch.o +PDCLIBOBJS2 = $(O)getstr.o $(O)getyx.o $(O)inch.o $(O)inchstr.o $(O)initscr.o \ + $(O)inopts.o $(O)insch.o $(O)insstr.o $(O)instr.o $(O)kernel.o \ + $(O)keyname.o $(O)mouse.o +PDCLIBOBJS3 = $(O)move.o $(O)outopts.o $(O)overlay.o $(O)pad.o $(O)panel.o \ + $(O)printw.o $(O)refresh.o $(O)scanw.o $(O)scr_dump.o $(O)scroll.o \ + $(O)slk.o $(O)termattr.o +PDCLIBOBJS4 = $(O)touch.o $(O)util.o $(O)window.o $(O)debug.o +PDCLIBOBJS = $(PDCLIBOBJS1) $(PDCLIBOBJS2) $(PDCLIBOBJS3) $(PDCLIBOBJS4) + +PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o \ + $(O)pdcscrn.o $(O)pdcsetsc.o $(O)pdcutil.o + +#PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o $(O)pdcscrn.o \ +# $(O)pdcsetsc.o $(O)pdcutil.o + +PDCLIB = $(O)pdcurses.a + +#PDCINCL = -I$(PDCURSES_TOP) -I$(PDCSRC) -I$(PDCDOS) +PDCINCL = -I$(PDCURSES_TOP) -I$(PDCDOS) +else +PDCLIB = +endif + +#========================================== +# Header file macros +#========================================== + +PATCHLEV_H = $(INCL)/patchlev.h +DGN_FILE_H = $(INCL)/align.h $(INCL)/dgn_file.h +DUNGEON_H = $(INCL)/align.h $(INCL)/dungeon.h +MONDATA_H = $(INCL)/align.h $(INCL)/mondata.h +MONST_H = $(INCL)/align.h $(INCL)/monst.h $(INCL)/mextra.h +PERMONST_H = $(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/align.h \ + $(INCL)/permonst.h +REGION_H = $(INCL)/region.h +RM_H = $(INCL)/align.h $(INCL)/rm.h +SKILLS_H = $(INCL)/skills.h +SP_LEV_H = $(INCL)/align.h $(INCL)/sp_lev.h +YOUPROP_H = $(PERMONST_H) $(MONDATA_H) $(INCL)/prop.h \ + $(INCL)/pm.h $(INCL)/youprop.h +YOU_H = $(MONST_H) $(YOUPROP_H) $(INCL)/align.h \ + $(INCL)/attrib.h $(INCL)/you.h +DISPLAY_H = $(MONDATA_H) $(INCL)/vision.h $(INCL)/display.h +PCCONF_H = $(INCL)/micro.h $(INCL)/system.h $(INCL)/pcconf.h \ + $(MSYS)/pcvideo.h +CONFIG_H = $(GLOBAL_H) $(INCL)/tradstdc.h $(INCL)/config1.h \ + $(INCL)/config.h +DECL_H = $(YOU_H) $(INCL)/spell.h $(INCL)/color.h \ + $(INCL)/obj.h $(INCL)/onames.h $(INCL)/pm.h \ + $(INCL)/decl.h +GLOBAL_H = $(PCCONF_H) $(INCL)/coord.h $(INCL)/global.h +HACK_H = $(CONFIG_H) $(INCL)/context.h $(DUNGEON_H) \ + $(DECL_H) $(DISPLAY_H) $(INCL)/monsym.h \ + $(INCL)/mkroom.h $(INCL)/objclass.h $(INCL)/trap.h \ + $(INCL)/flag.h $(RM_H) $(INCL)/vision.h \ + $(INCL)/wintype.h $(INCL)/engrave.h $(INCL)/rect.h \ + $(INCL)/trampoli.h $(INCL)/hack.h $(REGION_H) \ + $(INCL)/sys.h +DLB_H = $(INCL)/dlb.h + +ifeq ($(SUPPRESS_GRAPHICS),Y) +TILE_H = +else +TILE_H = $(WSHR)/tile.h $(INCL)/tileset.h +endif + +ifeq ($(USE_DLB),Y) +DLB = dlb +DLBOBJS = $(O)dlb_main.o $(O)dlb.o $(O)alloc.o $(O)panic.o +else +DLB = +DLBOBJS = +endif + +ifdef DJGPP +DJ1 = $(dir $(DJGPP)) +CWSDPMI = $(subst /,\,$(DJ1))bin\CWSDPMI.* +endif + +#========================================== +# More compiler setup macros +#========================================== +# +ifeq "$(ADD_CURSES)" "Y" +CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE" +else +CURSESDEF= +CURSESLIB= +endif + +INCLDIR=-I../include -I../sys/msdos + +# Debugging +#cflags = -pg -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS +#LFLAGS = -pg + +cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS +LFLAGS = + +# Debugging +#cflags = -g -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES +#LFLAGS = -g + +# Normal +cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES +LFLAGS = + +#========================================== +#================ RULES ================== +#========================================== + +.SUFFIXES: .o .til .uu .c .y .l + +#========================================== +# Rules for files in src +#========================================== + +$(OBJ)/%.o : %.c + $(TARGET_CC) $(cflags) -o$@ $< + +$(OBJ)/%.o : $(SRC)/%.c + $(TARGET_CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in sys/share +#========================================== + +$(OBJ)/%.o : $(SSHR)/%.c + $(TARGET_CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in sys/msdos +#========================================== + +$(OBJ)/%.o : $(MSYS)/%.c + $(TARGET_CC) $(cflags) -I../sys/msdos -o$@ $< + +#========================================== +# Rules for files in util +#========================================== + +$(OBJ)/%.o : $(UTIL)/%.c + $(TARGET_CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in win/share +#========================================== + +$(OBJ)/%.o : $(WSHR)/%.c + $(TARGET_CC) $(cflags) -I../win/share -o$@ $< + +#========================================== +# Rules for files in win/tty +#========================================== + +$(OBJ)/%.o : $(TTY)/%.c + $(TARGET_CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in win/curses +#========================================== + +$(OBJ)/%.o : $(WCURSES)/%.c + $(TARGET_CC) -DPDC_NCMOUSE $(PDCINCL) $(cflags) -o$@ $< + +#========================================== +# Rules for files in PDCurses +#========================================== + +$(OBJ)/%.o : $(PDCURSES_TOP)/%.c + $(TARGET_CC) $(PDCINCL) $(cflags) -o$@ $< + +$(OBJ)/%.o : $(PDCSRC)/%.c + $(TARGET_CC) $(PDCINCL) $(cflags) -o$@ $< + +$(OBJ)/%.o : $(PDCDOS)/%.c + $(TARGET_CC) $(PDCINCL) $(cflags) -o$@ $< + +#========================================== +# Primary Targets. +#========================================== + +# The default target. + +all : install + +install: $(GAMEFILE) $(O)install.tag + @echo Done. + +default: $(GAMEFILE) + +util: $(O)utility.tag + +#LEVCOMPEXE = $(U)lev_comp + +$(O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \ + $(INCL)/pm.h vis_tab.c $(TILEUTIL) + echo utilities made > $@ + +tileutil: $(U)gif2txt $(U)txt2ppm + @echo Optional tile development utilities are up to date. + +recover.exe: $(U)recover +# @$(subst /,\,if exist $(U)recover copy $(U)recover $(GAMEDIR)) +# @$(subst /,\,if exist $(DOC)/recover.txt copy $(DOC)/recover.txt $(GAMEDIR)) + +$(O)install.tag: $(DAT)/nhdat $(GAMEFILE) +ifeq ($(USE_DLB),Y) + cp $(DAT)/nhdat $(GAMEDIR) + cp $(DAT)/license $(GAMEDIR) +else + cp $(DAT)/*. $(GAMEDIR) + cp $(DAT)/*.dat $(GAMEDIR) + cp $(DAT)/*.lev $(GAMEDIR) + cp $(MSYS)/msdoshlp.txt $(GAMEDIR)) +endif +ifdef TERMLIB + cp $(SSHR)/termcap $(GAMEDIR)) +endif +# if [ -f $(TILE_BMP) ]; then rm $(TILE_BMP); fi; + if [ -f $(TILE_BMP) ]; then cp $(TILE_BMP) $(GAMEDIR); fi; + if [ -f $(DAT)/symbols ]; then cp $(DAT)/symbols $(GAMEDIR); fi; + if [ -f $(SSHR)/NetHack.cnf ]; then cp $(SSHR)/NetHack.cnf $(GAMEDIR); fi; + -touch $(GAMEDIR)/record + if [ -f ../sys/winnt/sysconf ]; then cp ../sys/winnt/sysconf $(GAMEDIR); fi; + if [ -f $(DOC)/nethack.txt ]; then cp $(DOC)/nethack.txt $(GAMEDIR); fi; +ifdef CWSDPMI + if [ -f $(CWSDPMI) ]; then cp $(CWSDPMI) $(GAMEDIR); fi; +else + @echo Could not find a copy of CWSDPMI.EXE to put into $(GAMEDIR) +endif + @echo install done > $@ + +#========================================== +# The main target. +#========================================== + +$(GAMEFILE): $(O)obj.tag $(PATCHLEV_H) $(PDCLIB) \ + $(O)utility.tag $(ALLOBJ) $(O)$(GAME).lnk + if [ -f temp.a ]; then rm temp.a; fi; + @ar r temp.a $(VOBJ01) + @ar r temp.a $(VOBJ02) + @ar r temp.a $(VOBJ03) + @ar r temp.a $(VOBJ04) + @ar r temp.a $(VOBJ05) + @ar r temp.a $(VOBJ06) + @ar r temp.a $(VOBJ07) + @ar r temp.a $(VOBJ08) + @ar r temp.a $(VOBJ09) + @ar r temp.a $(VOBJ10) + @ar r temp.a $(VOBJ11) + @ar r temp.a $(VOBJ12) + @ar r temp.a $(VOBJ13) + @ar r temp.a $(VOBJ14) + @ar r temp.a $(VOBJ15) + @ar r temp.a $(VOBJ16) + @ar r temp.a $(VOBJ17) + @ar r temp.a $(VOBJ18) + @ar r temp.a $(VOBJ19) + @ar r temp.a $(VOBJ20) + @ar r temp.a $(VOBJ21) + @ar r temp.a $(VOBJ22) + @ar r temp.a $(VOBJ23) + @ar r temp.a $(VOBJ24) + @ar r temp.a $(VOBJ25) + @ar r temp.a $(SOBJ) + @ar r temp.a $(TILOBJ) + @ar r temp.a $(TILOBJ2) + @ar r temp.a $(VVOBJ) +ifeq "$(ADD_CURSES)" "Y" + @ar r temp.a $(CURSESOBJ) +endif + $(TARGET_LINK) $(LFLAGS) -o$(GAME).exe temp.a $(PDCLIB) $(LIBRARIES) $(ZLIB) + $(TARGET_STUBEDIT) $(GAME).exe minstack=2048K + cp $(GAME).exe $(GAMEFILE) + rm $(GAME).exe + +$(O)$(GAME).lnk: $(ALLOBJ) + echo $(VOBJ01) > $(subst /,\,$@) + echo $(VOBJ02) >> $(subst /,\,$@) + echo $(VOBJ03) >> $(subst /,\,$@) + echo $(VOBJ04) >> $(subst /,\,$@) + echo $(VOBJ05) >> $(subst /,\,$@) + echo $(VOBJ06) >> $(subst /,\,$@) + echo $(VOBJ07) >> $(subst /,\,$@) + echo $(VOBJ08) >> $(subst /,\,$@) + echo $(VOBJ09) >> $(subst /,\,$@) + echo $(VOBJ10) >> $(subst /,\,$@) + echo $(VOBJ11) >> $(subst /,\,$@) + echo $(VOBJ12) >> $(subst /,\,$@) + echo $(VOBJ13) >> $(subst /,\,$@) + echo $(VOBJ14) >> $(subst /,\,$@) + echo $(VOBJ15) >> $(subst /,\,$@) + echo $(VOBJ16) >> $(subst /,\,$@) + echo $(VOBJ17) >> $(subst /,\,$@) + echo $(VOBJ18) >> $(subst /,\,$@) + echo $(VOBJ19) >> $(subst /,\,$@) + echo $(VOBJ20) >> $(subst /,\,$@) + echo $(VOBJ21) >> $(subst /,\,$@) + echo $(VOBJ22) >> $(subst /,\,$@) + echo $(VOBJ23) >> $(subst /,\,$@) + echo $(VOBJ24) >> $(subst /,\,$@) + echo $(VOBJ25) >> $(subst /,\,$@) + echo $(SOBJ) >> $(subst /,\,$@) + echo $(TILOBJ) >> $(subst /,\,$@) + echo $(TILOBJ2) >> $(subst /,\,$@) + echo $(VVOBJ) >> $(subst /,\,$@) +ifeq "$(ADD_CURSES)" "Y" + echo $(CURSESOBJ) >> $(subst /,\,$@) +endif + +#========================================== +#=========== SECONDARY TARGETS ============ +#========================================== +# +# The following include files depend on makedefs to be created. +# +# date.h should be remade every time any of the source or include +# files is modified. +# +# +#$(INCL)/date.h : $(U)makedefs +# -$(U)makedefs -v +# +#$(INCL)/onames.h: $(U)makedefs +# -$(U)makedefs -o +# +#$(INCL)/pm.h: $(U)makedefs +# -$(U)makedefs -p +# +#monstr.c: $(U)makedefs +# -$(U)makedefs -m +# +#$(INCL)/vis_tab.h: $(U)makedefs +# -$(U)makedefs -z +# +#vis_tab.c: $(U)makedefs +# -$(U)makedefs -z +# +#========================================== +# Level Compiler Dependencies +#========================================== +# +#$(U)lev_comp: $(SPLEVOBJS) +# -rm -f temp.a +# @ar ru temp.a $(SPLEVOBJS) +# $(HOST_LINK) $(LFLAGS) -o$@ temp.a +# +#$(HOST_O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h $(U)lev_yacc.c +# $(HOST_CC) $(cflags) -o$@ $(U)lev_yacc.c +# +#$(HOST_O)lev_$(LEX).o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h \ +# $(U)lev_$(LEX).c +# $(HOST_CC) $(cflags) -o$@ $(U)lev_$(LEX).c +# +#$(HOST_O)lev_main.o: $(HACK_H) $(INCL)/sp_lev.h $(INCL)/date.h $(U)lev_main.c +# +#$(U)lev_yacc.c: $(SSHR)/lev_yacc.c +# @echo --- +# @echo For now, we will copy the prebuilt +# @echo lev_comp.c from $(SSHR) into $(U) and use that. +# @cp $(SSHR)/lev_yacc.c $(U)lev_yacc.c +# @echo.>>$(U)lev_yacc.c +# +#$(INCL)/lev_comp.h : $(SSHR)/lev_comp.h +# @echo For now, we will copy the prebuilt lev_comp.h +# @echo from $(SSHR) into $(INCL) and use that. +# @cp $(SSHR)/lev_comp.h $@ +#$(U)lev_lex.c: $(SSHR)/lev_lex.c +# @echo.>>$(INCL)/lev_comp.h +# @echo For now, we will copy the prebuilt lev_lex.c +# @echo from $(SSHR) into $(U) and use it. +# @cp $(SSHR)/lev_lex.c $@ +# @echo.>>$@ +# +#========================================== +# Dungeon Dependencies +#========================================== +# +#$(U)dgn_comp: $(DGNCOMPOBJS) +# $(HOST_LINK) $(LFLAGS) -o$@ $(DGNCOMPOBJS) +# +#$(U)dgn_yacc.c: $(SSHR)/dgn_yacc.c +# @echo --- +# @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and +# @echo dgn_comp.h from $(SSHR) into $(U) and use that. +# @cp $(SSHR)/dgn_yacc.c $(U)dgn_yacc.c +# @echo.>>$(U)dgn_yacc.c +# +#$(INCL)/dgn_comp.h: $(SSHR)/dgn_comp.h +# @echo --- +# @echo For now, we will copy the prebuilt dgn_comp.h +# @echo from $(SSHR) into $(INCL) and use that. +# @cp $(SSHR)/dgn_comp.h $@ +# @echo.>>$(INCL)/dgn_comp.h +# +#$(U)dgn_$(LEX).c: $(SSHR)/dgn_lex.c $(INCL)/dgn_comp.h +# @echo --- +# @echo For now, we will copy the prebuilt dgn_lex.c +# @echo from $(SSHR) into $(U) and use it. +# @cp $(SSHR)/dgn_lex.c $@ +# @echo.>>$@ + +#========================================== +# Recover Utility +#========================================== + +$(U)recover.exe: $(RECOVOBJS) + $(TARGET_LINK) $(LFLAGS) -o$@ $(O)recover.o + +$(O)recover.o: $(CONFIG_H) $(U)recover.c + $(TARGET_CC) $(cflags) -o$@ $(U)recover.c + +#========================================== +# Header file moves required for tile support +#========================================== + +ifeq ($(SUPPRESS_GRAPHICS),Y) + +else +# +# Tile Mapping +# + +#$(SRC)/tile.c: $(U)tilemap +# @$(U)tilemap +# @echo A new $@ has been created + +endif + +#========================================== +# PDCurses Library +#========================================== + +$(O)pdcurses.a : $(PDCLIBOBJS) $(PDCOBJS) + ar rcS $@ $(PDCLIBOBJS1) + ar rcS $@ $(PDCLIBOBJS2) + ar rcS $@ $(PDCLIBOBJS3) + ar rcS $@ $(PDCLIBOBJS4) + ar rcs $@ $(PDCOBJS) + +#========================================== +# Other Util Dependencies. +#========================================== + +$(O)alloc.o: $(CONFIG_H) alloc.c + $(TARGET_CC) $(cflags) -o$@ alloc.c + +$(O)drawing.o: $(CONFIG_H) drawing.c $(MSYS)/pcvideo.h + $(TARGET_CC) $(cflags) -I$(MSYS) -o$@ drawing.c + +$(O)decl.o: $(CONFIG_H) decl.c + $(TARGET_CC) $(cflags) -o$@ decl.c + +$(O)monst.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/monsym.h \ + $(INCL)/color.h monst.c + $(TARGET_CC) $(cflags) -o$@ monst.c + +$(O)objects.o: $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ + $(INCL)/prop.h $(INCL)/color.h objects.c + $(TARGET_CC) $(cflags) -o$@ objects.c + +$(O)dat.tag: $(DAT)/nhdat + @echo dat done >$@ + +#$(HOST_O)monst.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/monsym.h \ +# $(INCL)/color.h monst.c +# $(HOST_CC) $(cflags) -o$@ monst.c + +#$(HOST_O)objects.o: $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ +# $(INCL)/prop.h $(INCL)/color.h objects.c +# $(HOST_CC) $(cflags) -o$@ objects.c + +#$(O)panic.o: $(CONFIG_H) $(U)panic.c + +# make data.base an 8.3 filename to prevent an make warning +#DATABASE = $(DAT)/data.bas +# +# +# +#$(DAT)/data: $(O)utility.tag $(DATABASE) +# $(U)makedefs -d +# +#$(DAT)/rumors: $(O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal +# $(U)makedefs -r +# +#$(DAT)/quest.dat: $(O)utility.tag $(DAT)/quest.txt +# $(U)makedefs -q +# +#$(DAT)/oracles: $(O)utility.tag $(DAT)/oracles.txt +# $(U)makedefs -h +# +#$(DAT)/bogusmon: $(O)utility.tag $(DAT)/bogusmon.txt +# $(U)makedefs -s +# +#$(DAT)/engrave: $(O)utility.tag $(DAT)/engrave.txt +# $(U)makedefs -s +# +#$(DAT)/epitaph: $(O)utility.tag $(DAT)/epitaph.txt +# $(U)makedefs -s +# +#$(O)sp_lev.tag: $(O)utility.tag \ +# $(DAT)/bigroom.des $(DAT)/castle.des \ +# $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \ +# $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \ +# $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \ +# $(DAT)/caveman.des $(DAT)/healer.des $(DAT)/knight.des \ +# $(DAT)/monk.des $(DAT)/priest.des $(DAT)/ranger.des \ +# $(DAT)/rogue.des $(DAT)/samurai.des $(DAT)/tourist.des \ +# $(DAT)/valkyrie.des $(DAT)/wizard.des +# cd $(DAT) +# $(U)lev_comp bigroom.des +# $(U)lev_comp castle.des +# $(U)lev_comp endgame.des +# $(U)lev_comp gehennom.des +# $(U)lev_comp knox.des +# $(U)lev_comp mines.des +# $(U)lev_comp medusa.des +# $(U)lev_comp oracle.des +# $(U)lev_comp sokoban.des +# $(U)lev_comp tower.des +# $(U)lev_comp yendor.des +# $(U)lev_comp arch.des +# $(U)lev_comp barb.des +# $(U)lev_comp caveman.des +# $(U)lev_comp healer.des +# $(U)lev_comp knight.des +# $(U)lev_comp monk.des +# $(U)lev_comp priest.des +# $(U)lev_comp ranger.des +# $(U)lev_comp rogue.des +# $(U)lev_comp samurai.des +# $(U)lev_comp tourist.des +# $(U)lev_comp valkyrie.des +# $(U)lev_comp wizard.des +# cd $(SRC) +# echo sp_levs done > $@ +# +#$(DAT)/dungeon: $(O)utility.tag $(DAT)/dungeon.def +# $(U)makedefs -e +# cd $(DAT) +# $(U)dgn_comp dungeon.pdf +# cd $(SRC) + +#========================================== +# DLB stuff +#========================================== + +#note that dir below assumes bin/dir from djgpp distribution +# +#$(DAT)/nhdat: $(U)dlb_main $(DAT)/data $(DAT)/rumors $(DAT)/dungeon \ +# $(DAT)/oracles $(DAT)/quest.dat $(O)sp_lev.tag \ +# $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute +# echo dat done >$(O)dat.tag +# cd $(DAT) +# copy $(MSYS)/msdoshlp.txt . +# @$(LS) data dungeon oracles options quest.dat rumors help hh >dlb.lst +# @$(LS) cmdhelp history opthelp wizhelp license msdoshlp.txt >>dlb.lst +# @$(LS) bogusmon engrave epitaph tribute >>dlb.lst +# $(LS) $(subst /,\,*.lev) >>dlb.lst +# $(U)dlb_main cvIf dlb.lst nhdat +# cd $(SRC) +# +#$(U)dlb_main: $(DLBOBJS) +# $(HOST_LINK) $(LFLAGS) -o$@ $(DLBOBJS) +# +#$(HOST_O)dlb_main.o: $(U)dlb_main.c $(INCL)/config.h $(DLB_H) +# $(HOST_CC) $(cflags) -o$@ $(U)dlb_main.c + +#========================================== +# Housekeeping. +#========================================== + +clean: + rm ./o/*.o + if [ -f $(O)install.tag ]; then rm $(O)install.tag; fi; + if [ -f $(O)obj.tag ]; then rm $(O)obj.tag; fi; + if [ -f $(O)$(GAME).lnk ]; then rm temp.a; fi; + if [ -f temp.a ]; then rm temp.a; fi; + +spotless: clean + + if [ -f dgn_flex.c ]; then rm dgn_flex.c; fi; + if [ -f dgn_lex.c ]; then rm dgn_lex.c; fi; + if [ -f $(U)dgn_comp.exe ]; then rm $(U)dgn_comp.exe; fi; + if [ -f $(U)recover.exe ]; then rm $(U)recover.exe; fi; + if [ -f $(INCL)/vis_tab.h ]; then rm $(INCL)/vis_tab.h; fi; + if [ -f $(INCL)/onames.h ]; then rm $(INCL)/onames.h; fi; + if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi; + if [ -f $(INCL)/date.h ]; then rm $(INCL)/date.h; fi; + if [ -f $(INCL)/dgn_comp.h ]; then rm $(INCL)/dgn_comp.h; fi; + if [ -f $(INCL)/lev_comp.h ]; then rm $(INCL)/lev_comp.h; fi; +# if [ -f $(SRC)/monstr.c ]; then rm $(SRC)/monstr.c; fi; + if [ -f $(SRC)/vis_tab.c ]; then rm $(SRC)/vis_tab.c; fi; + if [ -f $(SRC)/tile.c ]; then rm $(SRC)/tile.c; fi; + if [ -f $(DAT)/options ]; then rm $(DAT)/options; fi; + if [ -f $(DAT)/data ]; then rm $(DAT)/data; fi; + if [ -f $(DAT)/rumors ]; then rm $(DAT)/rumors; fi; + if [ -f $(DAT)/dungeon.pdf ]; then rm $(DAT)/dungeon.pdf; fi; + if [ -f $(DAT)/dungeon ]; then rm $(DAT)/dungeon; fi; + if [ -f $(DAT)/oracles ]; then rm $(DAT)/oracles; fi; + if [ -f $(DAT)/quest.dat ]; then rm $(DAT)/quest.dat; fi; + if [ -f $(DAT)/bogusmon ]; then rm $(DAT)/bogusmon; fi; + if [ -f $(DAT)/engrave ]; then rm $(DAT)/engrave; fi; + if [ -f $(DAT)/epitaph ]; then rm $(DAT)/epitaph; fi; + if [ -f $(DAT)/dlb.lst ]; then rm $(DAT)/dlb.lst; fi; + if [ -f $(TILE_BMP) ]; then rm $(TILE_BMP); fi; + if [ -f $(WSHR)/monthin.txt ]; then rm $(WSHR)/monthin.txt; fi; + if [ -f $(WSHR)/objthin.txt ]; then rm $(WSHR)/objthin.txt; fi; + if [ -f $(WSHR)/oththin.txt ]; then rm $(WSHR)/oththin.txt; fi; + -rm $(DAT)/*.lev + +#========================================== +# Create directory for holding object files +#========================================== + +$(O)obj.tag: + -mkdir -p $(OBJ) + @echo directory ready $(OBJ) + +#========================================== +# Game Dependencies +#========================================== + +# sys/share +$(O)main.o: $(HACK_H) $(DLB_H) $(SSHR)/pcmain.c + $(TARGET_CC) $(cflags) -o$@ $(SSHR)/pcmain.c + +$(O)tty.o: $(HACK_H) $(INCL)/wintty.h $(SSHR)/pctty.c + $(TARGET_CC) $(cflags) -o$@ $(SSHR)/pctty.c + +$(O)unix.o: $(HACK_H) $(SSHR)/pcunix.c + $(TARGET_CC) $(cflags) -o$@ $(SSHR)/pcunix.c + +$(O)pcsys.o : $(HACK_H) $(SSHR)/pcsys.c + $(TARGET_CC) $(cflags) -o$@ $(SSHR)/pcsys.c + +$(O)posixreg.o : $(HACK_H) $(SSHR)/posixreg.c + $(TARGET_CC) $(cflags) -o$@ $(SSHR)/posixreg.c + +$(O)cppregex.o : $(HACK_H) $(SSHR)/cppregex.cpp + gpp $(cflags) -std=c++11 -o$@ $(SSHR)/cppregex.cpp + +$(O)pmatchre.o : $(HACK_H) $(SSHR)/pmatchre.c + $(TARGET_CC) $(cflags) -o$@ $(SSHR)/pmatchre.c + +# sys/msdos +$(O)msdos.o : $(HACK_H) $(MSYS)/msdos.c +$(O)pckeys.o : $(HACK_H) $(MSYS)/pckeys.c +$(O)pctiles.o : $(HACK_H) $(MSYS)/pctiles.c $(MSYS)/portio.h + $(TARGET_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/pctiles.c +$(O)sound.o : $(HACK_H) $(MSYS)/sound.c $(MSYS)/portio.h +$(O)video.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(MSYS)/video.c +$(O)vidvga.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(TILE_H) $(MSYS)/vidvga.c + $(TARGET_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/vidvga.c +$(O)vidvesa.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(TILE_H) $(MSYS)/vidvesa.c + $(TARGET_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/vidvesa.c +$(O)vidtxt.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(TILE_H) $(MSYS)/vidtxt.c +$(O)stubvid.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/video.c + $(TARGET_CC) $(cflags) -I$(MSYS) -DSTUBVIDEO -o$@ $(MSYS)/video.c +# +# The rest are stolen from sys/unix/Makefile.src, +# with the following changes: +# o -c (which is included in cflags) substituted with -o$@ , +# o an explicit build instruction for dlb.o because it requires +# a .h file in ../sys/msdos. +# o the PATCHLEV_H macro is substitued for $(INCL)/patchlevel.h +# to work around a long filename issue. +# o $(CFLAGS) changed to $(cflags) +# Other than that, these dependencies are untouched. +# That means that there is some irrelevant stuff +# in here, but maintenance should be easier. +# +# +# src dependencies +#$(O)tos.o: ../sys/atari/tos.c $(HACK_H) $(INCL)/tcap.h + $(TARGET_CC) $(cflags) -o$@ ../sys/atari/tos.c +$(O)pcmain.o: ../sys/share/pcmain.c $(HACK_H) $(INCL)/dlb.h \ + #$(INCL)/win32api.h + $(TARGET_CC) $(cflags) -o$@ ../sys/share/pcmain.c +$(O)pctty.o: ../sys/share/pctty.c $(HACK_H) + $(TARGET_CC) $(cflags) -o$@ ../sys/share/pctty.c +$(O)pcunix.o: ../sys/share/pcunix.c $(HACK_H) + $(TARGET_CC) $(cflags) -o$@ ../sys/share/pcunix.c +$(O)random.o: ../sys/share/random.c $(HACK_H) + $(TARGET_CC) $(cflags) -o$@ ../sys/share/random.c +$(O)ioctl.o: ../sys/share/ioctl.c $(HACK_H) $(INCL)/tcap.h + $(TARGET_CC) $(cflags) -o$@ ../sys/share/ioctl.c +$(O)unixtty.o: ../sys/share/unixtty.c $(HACK_H) + $(TARGET_CC) $(cflags) -o$@ ../sys/share/unixtty.c +$(O)unixmain.o: ../sys/unix/unixmain.c $(HACK_H) $(INCL)/dlb.h + $(TARGET_CC) $(cflags) -o$@ ../sys/unix/unixmain.c +$(O)unixunix.o: ../sys/unix/unixunix.c $(HACK_H) + $(TARGET_CC) $(cflags) -o$@ ../sys/unix/unixunix.c +$(O)unixres.o: ../sys/unix/unixres.c $(CONFIG_H) + $(TARGET_CC) $(cflags) -o$@ ../sys/unix/unixres.c +$(O)bemain.o: ../sys/be/bemain.c $(HACK_H) $(INCL)/dlb.h + $(TARGET_CC) $(cflags) -o$@ ../sys/be/bemain.c +$(O)getline.o: ../win/tty/getline.c $(HACK_H) $(INCL)/func_tab.h + $(TARGET_CC) $(cflags) -o$@ ../win/tty/getline.c +$(O)termcap.o: ../win/tty/termcap.c $(HACK_H) $(INCL)/tcap.h + $(TARGET_CC) $(cflags) -o$@ ../win/tty/termcap.c +$(O)topl.o: ../win/tty/topl.c $(HACK_H) $(INCL)/tcap.h + $(TARGET_CC) $(cflags) -o$@ ../win/tty/topl.c +$(O)wintty.o: ../win/tty/wintty.c $(HACK_H) $(INCL)/dlb.h \ + $(INCL)/date.h $(PATCHLEV_H) $(INCL)/tcap.h + $(TARGET_CC) $(cflags) -o$@ ../win/tty/wintty.c +$(O)Window.o: ../win/X11/Window.c $(INCL)/xwindowp.h $(INCL)/xwindow.h \ + $(CONFIG_H) + $(TARGET_CC) $(cflags) -o$@ ../win/X11/Window.c +$(O)dialogs.o: ../win/X11/dialogs.c $(CONFIG_H) + $(TARGET_CC) $(cflags) -o$@ ../win/X11/dialogs.c +$(O)winX.o: ../win/X11/winX.c $(HACK_H) $(INCL)/winX.h $(INCL)/dlb.h \ + $(PATCHLEV_H) ../win/X11/nh72icon \ + ../win/X11/nh56icon ../win/X11/nh32icon + $(TARGET_CC) $(cflags) -o$@ ../win/X11/winX.c +$(O)winmap.o: ../win/X11/winmap.c $(INCL)/xwindow.h $(HACK_H) $(INCL)/dlb.h \ + $(INCL)/winX.h $(INCL)/tile2x11.h + $(TARGET_CC) $(cflags) -o$@ ../win/X11/winmap.c +$(O)winmenu.o: ../win/X11/winmenu.c $(HACK_H) $(INCL)/winX.h + $(TARGET_CC) $(cflags) -o$@ ../win/X11/winmenu.c +$(O)winmesg.o: ../win/X11/winmesg.c $(INCL)/xwindow.h $(HACK_H) $(INCL)/winX.h + $(TARGET_CC) $(cflags) -o$@ ../win/X11/winmesg.c +$(O)winmisc.o: ../win/X11/winmisc.c $(HACK_H) $(INCL)/func_tab.h \ + $(INCL)/winX.h + $(TARGET_CC) $(cflags) -o$@ ../win/X11/winmisc.c +$(O)winstat.o: ../win/X11/winstat.c $(HACK_H) $(INCL)/winX.h + $(TARGET_CC) $(cflags) -o$@ ../win/X11/winstat.c +$(O)wintext.o: ../win/X11/wintext.c $(HACK_H) $(INCL)/winX.h $(INCL)/xwindow.h + $(TARGET_CC) $(cflags) -o$@ ../win/X11/wintext.c +$(O)winval.o: ../win/X11/winval.c $(HACK_H) $(INCL)/winX.h + $(TARGET_CC) $(cflags) -o$@ ../win/X11/winval.c +$(O)tile.o: tile.c $(HACK_H) +$(HOST_O)tile.o: tile.c $(HACK_H) +$(O)gnaskstr.o: ../win/gnome/gnaskstr.c ../win/gnome/gnaskstr.h \ + ../win/gnome/gnmain.h + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnaskstr.c +$(O)gnbind.o: ../win/gnome/gnbind.c ../win/gnome/gnbind.h ../win/gnome/gnmain.h \ + ../win/gnome/gnaskstr.h ../win/gnome/gnyesno.h + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnbind.c +$(O)gnglyph.o: ../win/gnome/gnglyph.c ../win/gnome/gnglyph.h $(INCL)/tile2x11.h + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnglyph.c +$(O)gnmain.o: ../win/gnome/gnmain.c ../win/gnome/gnmain.h ../win/gnome/gnsignal.h \ + ../win/gnome/gnbind.h ../win/gnome/gnopts.h $(HACK_H) \ + $(INCL)/date.h + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnmain.c +$(O)gnmap.o: ../win/gnome/gnmap.c ../win/gnome/gnmap.h ../win/gnome/gnglyph.h \ + ../win/gnome/gnsignal.h $(HACK_H) + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnmap.c +$(O)gnmenu.o: ../win/gnome/gnmenu.c ../win/gnome/gnmenu.h ../win/gnome/gnmain.h \ + ../win/gnome/gnbind.h + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnmenu.c +$(O)gnmesg.o: ../win/gnome/gnmesg.c ../win/gnome/gnmesg.h ../win/gnome/gnsignal.h + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnmesg.c +$(O)gnopts.o: ../win/gnome/gnopts.c ../win/gnome/gnopts.h ../win/gnome/gnglyph.h \ + ../win/gnome/gnmain.h ../win/gnome/gnmap.h $(HACK_H) + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnopts.c +$(O)gnplayer.o: ../win/gnome/gnplayer.c ../win/gnome/gnplayer.h \ + ../win/gnome/gnmain.h $(HACK_H) + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnplayer.c +$(O)gnsignal.o: ../win/gnome/gnsignal.c ../win/gnome/gnsignal.h \ + ../win/gnome/gnmain.h + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnsignal.c +$(O)gnstatus.o: ../win/gnome/gnstatus.c ../win/gnome/gnstatus.h \ + ../win/gnome/gnsignal.h ../win/gnome/gn_xpms.h \ + ../win/gnome/gnomeprv.h + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnstatus.c +$(O)gntext.o: ../win/gnome/gntext.c ../win/gnome/gntext.h ../win/gnome/gnmain.h \ + ../win/gnome/gn_rip.h + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gntext.c +$(O)gnworn.o: ../win/gnome/gnworn.c ../win/gnome/gnworn.h ../win/gnome/gnglyph.h \ + ../win/gnome/gnsignal.h ../win/gnome/gnomeprv.h + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnworn.c +$(O)gnyesno.o: ../win/gnome/gnyesno.c ../win/gnome/gnbind.h ../win/gnome/gnyesno.h + $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnyesno.c +$(O)wingem.o: ../win/gem/wingem.c $(HACK_H) $(INCL)/func_tab.h $(INCL)/dlb.h \ + $(PATCHLEV_H) $(INCL)/wingem.h + $(TARGET_CC) $(cflags) -o$@ ../win/gem/wingem.c +$(O)wingem1.o: ../win/gem/wingem1.c $(INCL)/gem_rsc.h $(INCL)/load_img.h \ + $(INCL)/gr_rect.h $(INCL)/wintype.h $(INCL)/wingem.h + $(TARGET_CC) $(cflags) -o$@ ../win/gem/wingem1.c +$(O)load_img.o: ../win/gem/load_img.c $(INCL)/load_img.h + $(TARGET_CC) $(cflags) -o$@ ../win/gem/load_img.c +$(O)gr_rect.o: ../win/gem/gr_rect.c $(INCL)/gr_rect.h + $(TARGET_CC) $(cflags) -o$@ ../win/gem/gr_rect.c +$(O)tile.o: tile.c $(HACK_H) +$(O)qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) $(INCL)/func_tab.h \ + $(INCL)/dlb.h $(PATCHLEV_H) $(INCL)/tile2x11.h \ + $(INCL)/qt_win.h $(INCL)/qt_clust.h $(INCL)/qt_kde0.h \ + $(INCL)/qt_xpms.h qt_win.moc qt_kde0.moc qttableview.moc + $(CXX) $(CXXFLAGS) -o$@ ../win/Qt/qt_win.cpp +$(O)qt_clust.o: ../win/Qt/qt_clust.cpp $(INCL)/qt_clust.h + $(CXX) $(CXXFLAGS) -o$@ ../win/Qt/qt_clust.cpp +$(O)qttableview.o: ../win/Qt/qttableview.cpp $(INCL)/qttableview.h + $(CXX) $(CXXFLAGS) -o$@ ../win/Qt/qttableview.cpp +#$(O)monstr.o: monstr.c $(CONFIG_H) +$(O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)/vis_tab.h +$(O)allmain.o: allmain.c $(HACK_H) +$(O)alloc.o: alloc.c $(CONFIG_H) +$(O)apply.o: apply.c $(HACK_H) +$(O)artifact.o: artifact.c $(HACK_H) $(INCL)/artifact.h $(INCL)/artilist.h +$(O)attrib.o: attrib.c $(HACK_H) +$(O)ball.o: ball.c $(HACK_H) +$(O)bones.o: bones.c $(HACK_H) $(INCL)/lev.h +$(O)botl.o: botl.c $(HACK_H) +$(O)cmd.o: cmd.c $(HACK_H) $(INCL)/func_tab.h +$(O)dbridge.o: dbridge.c $(HACK_H) +$(O)decl.o: decl.c $(HACK_H) +$(O)detect.o: detect.c $(HACK_H) $(INCL)/artifact.h +$(O)dig.o: dig.c $(HACK_H) +$(O)display.o: display.c $(HACK_H) +$(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h + $(TARGET_CC) $(cflags) -I../sys/msdos -o$@ dlb.c +$(O)do.o: do.c $(HACK_H) $(INCL)/lev.h +$(O)do_name.o: do_name.c $(HACK_H) +$(O)do_wear.o: do_wear.c $(HACK_H) +$(O)dog.o: dog.c $(HACK_H) +$(O)dogmove.o: dogmove.c $(HACK_H) $(INCL)/mfndpos.h +$(O)dokick.o: dokick.c $(HACK_H) +$(O)dothrow.o: dothrow.c $(HACK_H) +$(O)drawing.o: drawing.c $(HACK_H) $(INCL)/tcap.h +$(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)/dgn_file.h $(INCL)/dlb.h +$(O)eat.o: eat.c $(HACK_H) +$(O)end.o: end.c $(HACK_H) $(INCL)/lev.h $(INCL)/dlb.h +$(O)engrave.o: engrave.c $(HACK_H) $(INCL)/lev.h +$(O)exper.o: exper.c $(HACK_H) +$(O)explode.o: explode.c $(HACK_H) +$(O)extralev.o: extralev.c $(HACK_H) +$(O)files.o: files.c $(HACK_H) $(INCL)/dlb.h +$(O)fountain.o: fountain.c $(HACK_H) +$(O)hack.o: hack.c $(HACK_H) +$(O)hacklib.o: hacklib.c $(HACK_H) +$(O)invent.o: invent.c $(HACK_H) +$(O)light.o: light.c $(HACK_H) $(INCL)/lev.h +$(O)lock.o: lock.c $(HACK_H) +$(O)mail.o: mail.c $(HACK_H) $(INCL)/mail.h +$(O)makemon.o: makemon.c $(HACK_H) +$(O)mapglyph.o: mapglyph.c $(HACK_H) +$(O)mcastu.o: mcastu.c $(HACK_H) +$(O)mhitm.o: mhitm.c $(HACK_H) $(INCL)/artifact.h +$(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)/artifact.h +$(O)minion.o: minion.c $(HACK_H) +$(O)mklev.o: mklev.c $(HACK_H) +$(O)mkmap.o: mkmap.c $(HACK_H) $(INCL)/sp_lev.h +$(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)/sp_lev.h $(INCL)/lev.h +$(O)mkobj.o: mkobj.c $(HACK_H) +$(O)mkroom.o: mkroom.c $(HACK_H) +$(O)mon.o: mon.c $(HACK_H) $(INCL)/mfndpos.h +$(O)mondata.o: mondata.c $(HACK_H) +$(O)monmove.o: monmove.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/artifact.h +$(O)monst.o: monst.c $(CONFIG_H) $(INCL)/permonst.h $(INCL)/align.h \ + $(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/monsym.h \ + $(INCL)/color.h +$(O)mplayer.o: mplayer.c $(HACK_H) +$(O)mthrowu.o: mthrowu.c $(HACK_H) +$(O)muse.o: muse.c $(HACK_H) +$(O)music.o: music.c $(HACK_H) #interp.c +$(O)o_init.o: o_init.c $(HACK_H) $(INCL)/lev.h +$(O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ + $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h +$(O)objnam.o: objnam.c $(HACK_H) +$(O)options.o: options.c $(CONFIG_H) $(INCL)/objclass.h $(INCL)/flag.h \ + $(HACK_H) $(INCL)/tcap.h +$(O)pager.o: pager.c $(HACK_H) $(INCL)/dlb.h +$(O)pickup.o: pickup.c $(HACK_H) +$(O)pline.o: pline.c $(HACK_H) +$(O)polyself.o: polyself.c $(HACK_H) +$(O)potion.o: potion.c $(HACK_H) +$(O)pray.o: pray.c $(HACK_H) +$(O)priest.o: priest.c $(HACK_H) $(INCL)/mfndpos.h +$(O)quest.o: quest.c $(HACK_H) $(INCL)/qtext.h +$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(INCL)/qtext.h +$(O)read.o: read.c $(HACK_H) +$(O)rect.o: rect.c $(HACK_H) +$(O)region.o: region.c $(HACK_H) $(INCL)/lev.h +$(O)restore.o: restore.c $(HACK_H) $(INCL)/lev.h $(INCL)/tcap.h +$(O)rip.o: rip.c $(HACK_H) +$(O)rnd.o: rnd.c $(HACK_H) +$(O)role.o: role.c $(HACK_H) +$(O)rumors.o: rumors.c $(HACK_H) $(INCL)/lev.h $(INCL)/dlb.h +$(O)save.o: save.c $(HACK_H) $(INCL)/lev.h +$(O)shk.o: shk.c $(HACK_H) +$(O)shknam.o: shknam.c $(HACK_H) +$(O)sit.o: sit.c $(HACK_H) $(INCL)/artifact.h +$(O)sounds.o: sounds.c $(HACK_H) +$(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)/dlb.h $(INCL)/sp_lev.h +$(O)spell.o: spell.c $(HACK_H) +$(O)steal.o: steal.c $(HACK_H) +$(O)steed.o: steed.c $(HACK_H) +$(O)sys.o: sys.c $(HACK_H) +$(O)teleport.o: teleport.c $(HACK_H) +$(O)timeout.o: timeout.c $(HACK_H) $(INCL)/lev.h +$(O)topten.o: topten.c $(HACK_H) $(INCL)/dlb.h $(PATCHLEV_H) +$(O)track.o: track.c $(HACK_H) +$(O)trap.o: trap.c $(HACK_H) +$(O)u_init.o: u_init.c $(HACK_H) +$(O)uhitm.o: uhitm.c $(HACK_H) +$(O)vault.o: vault.c $(HACK_H) +$(O)version.o: version.c $(HACK_H) $(INCL)/date.h $(PATCHLEV_H) +$(O)vision.o: vision.c $(HACK_H) $(INCL)/vis_tab.h +$(O)weapon.o: weapon.c $(HACK_H) +$(O)were.o: were.c $(HACK_H) +$(O)wield.o: wield.c $(HACK_H) +$(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h +$(O)wizard.o: wizard.c $(HACK_H) $(INCL)/qtext.h +$(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h +$(O)worn.o: worn.c $(HACK_H) +$(O)write.o: write.c $(HACK_H) +$(O)zap.o: zap.c $(HACK_H) +$(O)pmatchre.o: $(SSHR)/pmatchre.c $(HACK_H) +$(O)tileset.o: $(WSHR)/tileset.c $(HACK_H) +$(O)bmptiles.o: $(WSHR)/bmptiles.c $(INCL)/config.h $(INCL)/tileset.h $(INCL)/integer.h +$(O)giftiles.o: $(WSHR)/giftiles.c $(INCL)/config.h $(INCL)/tileset.h $(INCL)/integer.h + +# end of file + diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index 1f67b0efb..6e26cef4e 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -14,13 +14,11 @@ #include -#if !defined(AMIGA) && !defined(GNUDOS) +#if !defined(AMIGA) && !defined(__DJGPP__) #include #else -#ifdef GNUDOS #include #endif -#endif #ifdef __DJGPP__ #include /* for getcwd() prototype */ From abdec86a3d1147130bf5ae7bce2436f6ff2f972b Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 14 Nov 2019 12:56:08 -0800 Subject: [PATCH 220/529] fix #H9425 - shade_miss target Fix 'unused' variable by using it as intended. Thinko brought on by too many revisions... --- src/uhitm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uhitm.c b/src/uhitm.c index a95595548..2eedb184f 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 uhitm.c $NHDT-Date: 1573688694 2019/11/13 23:44:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.214 $ */ +/* NetHack 3.6 uhitm.c $NHDT-Date: 1573764936 2019/11/14 20:55:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.215 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1375,17 +1375,17 @@ boolean thrown, verbose; if (verbose && ((youdef || cansee(mdef->mx, mdef->my) || sensemon(mdef)) || (magr == &youmonst && distu(mdef->mx, mdef->my) <= 2))) { - static const char harmless[] = " harmlessly through "; + static const char harmlessly_thru[] = " harmlessly through "; what = (!obj || shade_aware(obj)) ? "attack" : cxname(obj); target = youdef ? "you" : mon_nam(mdef); if (!thrown) { whose = youagr ? "Your" : s_suffix(Monnam(magr)); pline("%s %s %s%s%s.", whose, what, - vtense(what, "pass"), harmless, mon_nam(mdef)); + vtense(what, "pass"), harmlessly_thru, target); } else { pline("%s %s%s%s.", The(what), /* note: not pline_The() */ - vtense(what, "pass"), harmless, mon_nam(mdef)); + vtense(what, "pass"), harmlessly_thru, target); } if (!youdef && !canspotmon(mdef)) map_invisible(mdef->mx, mdef->my); From 501541635a77fc5692dc9d0b3c9d138c2478571b Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 14 Nov 2019 14:18:59 -0800 Subject: [PATCH 221/529] fix #H9426 - curses_procs null stubs --- win/curses/cursmain.c | 45 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index e0b69b42c..6cf98fcb2 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -24,6 +24,15 @@ extern char erase_char, kill_char; extern long curs_mesg_suppress_turn; /* from cursmesg.c */ +/* stubs for curses_procs{} */ +#ifdef POSITIONBAR +static void dummy_update_position_bar(char *); +#endif +#ifdef CHANGE_COLOR +static void dummy_change_color(int, long, int); +static char *dummy_get_color_string(VOID_ARGS); +#endif + /* Public functions for curses NetHack interface */ /* Interface definition, for windows.c */ @@ -69,7 +78,7 @@ struct window_procs curses_procs = { curses_cliparound, #endif #ifdef POSITIONBAR - donull, + dummy_update_position_bar, #endif curses_print_glyph, curses_raw_print, @@ -83,9 +92,13 @@ struct window_procs curses_procs = { curses_get_ext_cmd, curses_number_pad, curses_delay_output, -#ifdef CHANGE_COLOR /* only a Mac option currently */ - donull, - donull, +#ifdef CHANGE_COLOR + dummy_change_color, +#ifdef MAC /* old OS 9, not OSX */ + (void (*)(int)) 0, + (short (*)(winid, char *)) 0, +#endif + dummy_get_color_string, #endif curses_start_screen, curses_end_screen, @@ -945,4 +958,28 @@ curs_reset_windows(boolean redo_main, boolean redo_status) } } +/* stubs for curses_procs{} */ + +#ifdef POSITIONBAR +static void +dummy_update_position_bar(char *arg UNUSED) +{ + return; +} +#endif + +#ifdef CHANGE_COLOR +static void +dummy_change_color(int a1 UNUSED, long a2 UNUSED, int a3 UNUSED) +{ + return; +} + +static char * +dummy_get_color_string(VOID_ARGS) +{ + return (char *) 0; +} +#endif + /*cursmain.c*/ From 5abf64adaf2e30b626f89e4e1ef5b7579b08a094 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 14 Nov 2019 15:28:32 -0800 Subject: [PATCH 222/529] fix #H9424 - mon vs shade damage despite harmless Monster vs monster non-weapon attack against a shade that failed due to non-silver and non-blessed hit was inflicting damage. --- doc/fixes36.3 | 3 ++- src/mhitm.c | 41 +++++++++++++++++++++++++++-------------- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 25d065ddd..9fdefdb20 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.172 $ $NHDT-Date: 1573688684 2019/11/13 23:44:44 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.174 $ $NHDT-Date: 1573773953 2019/11/14 23:25:53 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -252,6 +252,7 @@ in symset:curses, symbol S_tree was accidentally set to horizontal line where percentage highlighting for Xp broke up/down/changed highlighting for it; it was flagged as having gone up every time the percentage changed deaf change to zap_over_floor needed to be restricted to player actions only +monster vs shade attack inflicted damage despite "passes harmlessly through" curses: sometimes the message window would show a blank line after a prompt curses: the change to show map in columns 1..79 instead of 2..80 made the highlight for '@' show up in the wrong place if clipped map had been diff --git a/src/mhitm.c b/src/mhitm.c index c69597227..5d33df493 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mhitm.c $NHDT-Date: 1573688692 2019/11/13 23:44:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.117 $ */ +/* NetHack 3.6 mhitm.c $NHDT-Date: 1573773926 2019/11/14 23:25:26 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.118 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -411,9 +411,9 @@ register struct monst *magr, *mdef; || mdef->data == &mons[PM_BROWN_PUDDING]) && (otmp && (objects[otmp->otyp].oc_material == IRON || objects[otmp->otyp].oc_material == METAL)) - && mdef->mhp > 1 - && !mdef->mcan) { + && mdef->mhp > 1 && !mdef->mcan) { struct monst *mclone; + if ((mclone = clone_mon(mdef, 0, 0)) != 0) { if (vis && canspotmon(mdef)) { char buf[BUFSZ]; @@ -455,6 +455,13 @@ register struct monst *magr, *mdef; break; case AT_ENGL: + if (mdef->data == &mons[PM_SHADE]) { /* no silver teeth... */ + if (vis) + pline("%s attempt to engulf %s is futile.", + s_suffix(Monnam(magr)), mon_nam(mdef)); + strike = 0; + break; + } if (u.usteed && mdef == u.usteed) { strike = 0; break; @@ -572,7 +579,9 @@ struct attack *mattk; mdef->mcansee ? "smiles at" : "talks to"); pline("%s %s %s.", buf, mon_nam(mdef), compat == 2 ? "engagingly" : "seductively"); - } else if (!shade_miss(magr, mdef, otmp, FALSE, TRUE)) { + } else if (shade_miss(magr, mdef, otmp, FALSE, TRUE)) { + return MM_MISS; /* bypass mdamagem() */ + } else { char magr_name[BUFSZ]; Strcpy(magr_name, Monnam(magr)); @@ -851,11 +860,12 @@ mdamagem(magr, mdef, mattk) register struct monst *magr, *mdef; register struct attack *mattk; { - struct obj *obj; + struct obj *obj, dmgwep; char buf[BUFSZ]; struct permonst *pa = magr->data, *pd = mdef->data; - int armpro, num, tmp = d((int) mattk->damn, (int) mattk->damd), - res = MM_MISS; + int armpro, num, + tmp = d((int) mattk->damn, (int) mattk->damd), + res = MM_MISS; boolean cancelled; if ((touch_petrifies(pd) /* or flesh_petrifies() */ @@ -958,16 +968,19 @@ register struct attack *mattk; case AD_HEAL: case AD_PHYS: physical: - if (mattk->aatyp == AT_KICK && thick_skinned(pd)) { + /* this shade check is necessary in case any attacks which + dish out physical damage bypass hitmm() to get here */ + if ((mattk->aatyp == AT_WEAP || mattk->aatyp == AT_CLAW) && otmp) + dmgwep = *otmp; + else + dmgwep = zeroobj; + + if (shade_miss(magr, mdef, &dmgwep, FALSE, TRUE)) { + tmp = 0; + } else if (mattk->aatyp == AT_KICK && thick_skinned(pd)) { tmp = 0; } else if (mattk->aatyp == AT_WEAP || (mattk->aatyp == AT_CLAW && otmp)) { - if (mdef->data == &mons[PM_SHADE] - && !(otmp && objects[otmp->otyp].oc_material == SILVER)) { - /* "passes harmlessly through" given by hitmm() */ - tmp = 0; - break; - } if (otmp) { struct obj *marmg; From 6ea483242ee49ef04dd8889c354480677ab3f6c2 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 14 Nov 2019 19:12:14 -0500 Subject: [PATCH 223/529] some msdos cross-compile additional notes and a clarification --- doc/fixes36.3 | 6 ++++-- sys/msdos/Makefile1.cross | 8 ++++++-- sys/msdos/Makefile2.cross | 5 +++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 25d065ddd..7df1b4e7a 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.172 $ $NHDT-Date: 1573688684 2019/11/13 23:44:44 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.174 $ $NHDT-Date: 1573776729 2019/11/15 00:12:09 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -359,7 +359,9 @@ msdos: added Makefile1.cross (host portion) and Makefile2.cross (target platform portion) to assist in moving this port toward a cross-compiled build hosted on linux/OSX/Windows with recent C dialect support; that will also pave the way for CI automation and testing of the msdos port - build in future should the port remain on the radar + build in future should the port remain on the radar; currently only + useful for testing the msdos port compile as it cannot yet build a + complete game tty: re-do one optimization used when status conditions have all been removed and remove another that tried to check whether condition text to be displayed next was the same as the existing value; sometimes new diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index 7e34932ad..71f96b06b 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -1,6 +1,6 @@ # NetHack 3.6 Makefile1.cross $NHDT-Date:$ $NHDT-Branch:$:$NHDT-Revision:$ # Cross-compile msdos version of NetHack using a -# linux-hosted djgpp cross compiler. +# linux-hosted djgpp cross-compiler. # # Makefile1.cross (this file) is for the host-side obj files and # utilities that will run on the host platform only. @@ -8,9 +8,13 @@ # Makefile2.cross is the the target platform obj files # and utilities. # -# Makefile2 utilizes the djgpp cross compiler from Andrew Wu: +# Makefile2 utilizes the djgpp cross-compiler from Andrew Wu: # https://github.com/andrewwutw/build-djgpp # +# Currently, in NetHack 3.6, the cross-compile for msdos cannot be +# used to build the entire game to a playable point but it is useful +# for testing the msdos port build of the evolving NetHack code.0 +# # The GNU Make has a problem if you include a drive spec below. GAMEDIR =../binary diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 22a9f8c8a..add9eff37 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -11,6 +11,11 @@ # Makefile2 utilizes the djgpp cross compiler from Andrew Wu: # https://github.com/andrewwutw/build-djgpp # +# Currently, in NetHack 3.6, the cross-compile for msdos cannot be +# used to build the entire game to a playable point but it is useful +# for testing the msdos port build of the evolving NetHack code. +# + # Game Installation Variables # NOTE: Make sure GAMEDIR exists before make is started. From c72795b2dd45fb1e0af1098aa95d570030c92a89 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 14 Nov 2019 16:17:15 -0800 Subject: [PATCH 224/529] fix #H9421 - typo in Soul Music #7 Misspelled "genius". Typo in the transcription, not in the book. --- dat/tribute | 4 ++-- doc/fixes36.3 | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dat/tribute b/dat/tribute index bacde1efe..3d7b56850 100644 --- a/dat/tribute +++ b/dat/tribute @@ -1,4 +1,4 @@ -# NetHack 3.6 tribute $NHDT-Date: 1565090653 2019/08/06 11:24:13 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.83 $ +# NetHack 3.6 tribute $NHDT-Date: 1573777025 2019/11/15 00:17:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.84 $ # Copyright (c) 2017 by Robert Patrick Rankin # NetHack may be freely redistributed. See license for details. # A tribute introduced in NetHack 3.6.0 to: @@ -3694,7 +3694,7 @@ reader's brain. For example, the big volume open in front of him contained some of the collected drawings of Leonard of Quirm, skilled artist and certified -genious, with a mind that wandered so much it came back with souvenirs. +genius, with a mind that wandered so much it came back with souvenirs. Leonard's books were full of sketches--of kittens, of the way water flows, of the wives of influential Ankh-Morporkian merchants whose portraits had diff --git a/doc/fixes36.3 b/doc/fixes36.3 index b125800da..c7bf521dc 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.174 $ $NHDT-Date: 1573773953 2019/11/14 23:25:53 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.176 $ $NHDT-Date: 1573777025 2019/11/15 00:17:05 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -115,7 +115,8 @@ for multi-shot shooting by monsters, a typo checked hero's weapon for when a boulder was teleported, if it landed in a pit or trap door or hole its former location wasn't updated to show that it wasn't there anymore (noticed in Sokoban but not limited to there) -Terry Pratchett tribute, fix typo in passage #4 for Mort ("the" -> "they") +Terry Pratchett tribute, fix typo in passage #4 for Mort ("the" -> "they"); + also passage #7 for Soul Music ("genious" -> "genius") fix typo in end_of_input() present since 3.6.0 that would prevent compilation for NOSAVEONHANGUP+INSURANCE configuration when a status condition becomes fatal, keep it listed as an active condition From 61a8ad35f555dee97828f500719455ff0ed94e75 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 14 Nov 2019 19:17:44 -0500 Subject: [PATCH 225/529] more minor msdos Makefile bits --- sys/msdos/Makefile1.cross | 2 +- sys/msdos/Makefile2.cross | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index 71f96b06b..a60110855 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -1,4 +1,4 @@ -# NetHack 3.6 Makefile1.cross $NHDT-Date:$ $NHDT-Branch:$:$NHDT-Revision:$ +# NetHack 3.6 Makefile1.cross $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ # Cross-compile msdos version of NetHack using a # linux-hosted djgpp cross-compiler. # diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index add9eff37..cede4fd47 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -1,6 +1,6 @@ -# NetHack 3.6 Makefile2.cross $NHDT-Date:$ $NHDT-Branch:$:$NHDT-Revision:$ +# NetHack 3.6 Makefile2.cross $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ # Cross-compile msdos version of NetHack using a -# linux-hosted djgpp cross compiler. +# linux-hosted djgpp cross-compiler. # # Makefile1.cross is for the host-side obj files and utilities that # will run on the host platform only. @@ -8,7 +8,7 @@ # Makefile2.cross (this file) is the the target platform obj files # and utilities. # -# Makefile2 utilizes the djgpp cross compiler from Andrew Wu: +# Makefile2 utilizes the djgpp cross-compiler from Andrew Wu: # https://github.com/andrewwutw/build-djgpp # # Currently, in NetHack 3.6, the cross-compile for msdos cannot be From e0fbd52359721fecb651ead2d5cd00725c89dc7a Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 14 Nov 2019 19:18:49 -0500 Subject: [PATCH 226/529] header issues so just remove them for now on msdos *.cross Makefiles --- sys/msdos/Makefile1.cross | 2 +- sys/msdos/Makefile2.cross | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index a60110855..e24bbab3f 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -1,4 +1,4 @@ -# NetHack 3.6 Makefile1.cross $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.6 Makefile1.cross # Cross-compile msdos version of NetHack using a # linux-hosted djgpp cross-compiler. # diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index cede4fd47..2d25a3d6b 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -1,4 +1,4 @@ -# NetHack 3.6 Makefile2.cross $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.6 Makefile2.cross # Cross-compile msdos version of NetHack using a # linux-hosted djgpp cross-compiler. # From 616e07cde9a55f1cb51e0ed12bdb682adf25914c Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 14 Nov 2019 16:42:53 -0800 Subject: [PATCH 227/529] more #H9392 - deafness vs music The report mentioned whistles but I had forgotten all about them by the time I tried to deal with musical instruments. Plain whistles had deaf handling but magic whistles didn't. --- doc/fixes36.3 | 3 ++- src/apply.c | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index c7bf521dc..1291c29d7 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.176 $ $NHDT-Date: 1573777025 2019/11/15 00:17:05 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.177 $ $NHDT-Date: 1573778559 2019/11/15 00:42:39 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -254,6 +254,7 @@ percentage highlighting for Xp broke up/down/changed highlighting for it; it was flagged as having gone up every time the percentage changed deaf change to zap_over_floor needed to be restricted to player actions only monster vs shade attack inflicted damage despite "passes harmlessly through" +fix for feedback from musical instruments played while deaf ignored whistles curses: sometimes the message window would show a blank line after a prompt curses: the change to show map in columns 1..79 instead of 2..80 made the highlight for '@' show up in the wrong place if clipped map had been diff --git a/src/apply.c b/src/apply.c index e77db07d4..e77984d30 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 apply.c $NHDT-Date: 1573346182 2019/11/10 00:36:22 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.283 $ */ +/* NetHack 3.6 apply.c $NHDT-Date: 1573778560 2019/11/15 00:42:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.284 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -449,7 +449,8 @@ register struct obj *obj; return res; } -static const char whistle_str[] = "produce a %s whistling sound."; +static const char whistle_str[] = "produce a %s whistling sound.", + alt_whistle_str[] = "produce a %s, sharp vibration."; STATIC_OVL void use_whistle(obj) @@ -461,8 +462,7 @@ struct obj *obj; You("blow bubbles through %s.", yname(obj)); } else { if (Deaf) - You_feel("rushing air tickle your %s.", - body_part(NOSE)); + You_feel("rushing air tickle your %s.", body_part(NOSE)); else You(whistle_str, obj->cursed ? "shrill" : "high"); wake_nearby(); @@ -480,16 +480,17 @@ struct obj *obj; if (!can_blow(&youmonst)) { You("are incapable of using the whistle."); } else if (obj->cursed && !rn2(2)) { - You("produce a %shigh-pitched humming noise.", - Underwater ? "very " : ""); + You("produce a %shigh-%s.", Underwater ? "very " : "", + Deaf ? "frequency vibration" : "pitched humming noise"); wake_nearby(); } else { int pet_cnt = 0, omx, omy; /* it's magic! it works underwater too (at a higher pitch) */ - You(whistle_str, - Hallucination ? "normal" : Underwater ? "strange, high-pitched" - : "strange"); + You(Deaf ? alt_whistle_str : whistle_str, + Hallucination ? "normal" + : (Underwater && !Deaf) ? "strange, high-pitched" + : "strange"); for (mtmp = fmon; mtmp; mtmp = nextmon) { nextmon = mtmp->nmon; /* trap might kill mon */ if (DEADMONSTER(mtmp)) From b7d16efd7625a4c8dc534340680b3731f3ca8ca6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 15 Nov 2019 09:51:04 -0500 Subject: [PATCH 228/529] Makefile.msc updates post-Lua integration --- sys/winnt/Makefile.msc | 162 ++++++++++++++++++++++++++--------------- 1 file changed, 104 insertions(+), 58 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 9b4fce411..a4449bf76 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -1,17 +1,18 @@ -# NetHack 3.6 Makefile.msc $NHDT-Date: 1572748386 2019/11/03 02:33:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.167 $ */ +# NetHack 3.7 Makefile.msc # Copyright (c) NetHack PC Development Team 1993-2019 # #============================================================================== # Build Tools Environment # -# NetHack 3.7 Makefile for MS Visual Studio Visual C++ compiler -# +# NetHack 3.7 Work-in-progress Makefile for +# MS Visual Studio Visual C++ compiler +# # Visual Studio Compilers Tested: # - Microsoft Visual Studio 2017 Community Edition # - Microsoft Visual Studio 2019 Community Edition # #============================================================================== -# This is used for building two versions of NetHack: +# This is used for building two distinct executables of NetHack: # # A tty port utilizing the Win32 Console I/O subsystem, Console # NetHack.exe @@ -19,59 +20,77 @@ # A Win32 native port built on the Windows API, Graphical NetHack or # NetHackW.exe # -# In addition to your C compiler, +# BEFORE YOU START, in addition to your C compiler and linker, # -# if you want to change you will need a -# files with suffix workalike for -# .y yacc (such as bison) -# .l lex (such as flex) +# o You will need a complete Lua source tree parallel to your +# NetHack source tree. Lua is not an optional requirement, +# it is required in order to process the level and dungeon +# description files during the game. You can obtain the +# Lua source from here: +# https://www.lua.org/download.html # -# If you have any questions read the sys/winnt/Install.nt file included -# with the distribution. -#======================================================================================== +# o If you want to include the curses Window port in the non-GUI +# NetHack.exe build, you will need a complete PDCurses source +# tree parallel to your NetHack source tree. You can obtain the +# PDCurses source from here: +# https://sourceforge.net/projects/pdcurses/files/pdcurses/ +# or via git from here: +# git clone https://github.com/wmcbrine/PDCurses.git ../pdcurses +# +# o If you want your build of NetHack to include support for +# compressing your save files, or to be able to exchange and use +# compressed save files that originated on another platform such +# as Linux or a handheld phone or tablet, then you will need +# a copy of the zlib source tree parallel to your NetHack source +# tree. You can obtain the zlib source from here: +# https://www.zlib.net/zlib1211.zip +# +# If you want to find out more information about Lua, PDCurses, or zlib, +# here are the home page links for each at the time of this writing: +# +# Lua: https://www.lua.org/ +# PDCurses: https://pdcurses.org/ +# zlib: https://www.zlib.net/ +# +# If you have any questions about building NetHack for the Windows platform +# please read sys/winnt/Install.nt file included in the distribution. +# +#============================================================================== # DECISIONS SECTION # # Build Options Decisions # -# There are currently 4 decisions that you can choose to make. -# none of the 4 decisions are absolutely required because defaults are in place: -# 1. Where do you want your build to end up? -# 2. Do you want debug information in the executable? -# 3. Do you want to explicitly override auto-detection of a 32-bit or 64-bit target? -# 4. Do you want to include the optional curses port? +# There are currently 5 decisions that you can choose to make. +# none of the 5 decisions are absolutely required because defaults +# are in place: # -# Mandatory LUA source Location +# 1. Where do you want your build results to end up? +# 2. Do you want to include the optional curses port? +# 3. Do you want to include compressed savefile support to +# transfer compressed savefiles between platforms? +# 4. Do you want debug information in the executable? +# 5. Do you want to explicitly override auto-detection of +# a 32-bit or 64-bit target? # -# LUA source code or is required to build NetHack-3.7. -# LUATOP must point to the location of the LUA sources. +# Mandatory Lua source Location (not optional) # -#----------------------------------------------------------------------------------------- -#========================================================================================= - -#--------------------------------------------------------------- +# Lua source code or is required to build NetHack-3.7. +# LUATOP below must point to the correct location of the LUA sources. +# By default it is assumed to be parallel to your NetHack source tree in +# the same parent directory/folder. +# +#------------------------------------------------------------------------------ +#============================================================================== +# +#------------------------------------------------------------------------------ # 1. Where do you want the game to be built (which folder)? - -GAMEDIR = ..\binary # Default game build directory - -#--------------------------------------------------------------- -# 2. Do you want debug information available to the executable? - -DEBUGINFO = Y - -#--------------------------------------------------------------- -# 3. This Makefile will attempt to auto-detect your selected target architecture -# based on Visual Studio command prompt configuration settins etc. -# However, if you want to manually override generation of a -# 32-bit or 64-bit build target, you can uncomment the apppropriate -# TARGET_CPU line below. # -#TARGET_CPU=x64 -#TARGET_CPU=x86 - -#--------------------------------------------------------------- +GAMEDIR = ..\binary # Default game build directory +# +#------------------------------------------------------------------------------ # OPTIONAL - Curses window port support # -# 4. Uncomment these and set them appropriately if you want to +# 2. Uncomment these and set them appropriately if you want to # include curses port support alongside TTY support in your # NetHack.exe binary. # @@ -79,10 +98,40 @@ DEBUGINFO = Y # PDCurses header (.h) files and PDCURSES_C to the location # of your PDCurses C files. # -ADD_CURSES=Y -PDCURSES_TOP=..\..\pdcurses +#ADD_CURSES=Y +#PDCURSES_TOP=..\..\pdcurses +# +#------------------------------------------------------------------------------ +# OPTIONAL - zlib support (to allow compressed savefile exchange across platforms +# +# 3. Location of zlib sources +# +# +#ADD_ZLIB=Y +#ZLIBTOP=..\..\zlib +# +#------------------------------------------------------------------------------ +# 4. Do you want debug information available to the executable? +# +DEBUGINFO = Y +# +#------------------------------------------------------------------------------ +# 5. This Makefile will attempt to auto-detect your selected target architecture +# based on Visual Studio command prompt configuration settins etc. +# However, if you want to manually override generation of a +# 32-bit or 64-bit build target, you can uncomment the apppropriate +# TARGET_CPU line below. +# +#TARGET_CPU=x64 +#TARGET_CPU=x86 +# +# +#============================================================================== +#============================================================================== +# This marks the end of the BUILD DECISIONS section. +#============================================================================== +#============================================================================== # -#--------------------------------------------------------------- # Location of LUA # # Original source needs to be obtained from: @@ -91,23 +140,20 @@ PDCURSES_TOP=..\..\pdcurses # This build assumes that the LUA sources are located # at the specified location. If they are actually elsewhere # you'll need to specify the correct spot below in order to -# successfully build NetHack-3.7. +# successfully build NetHack-3.7. You cannot build a functional +# version of NetHack-3.7 Work-in-progress without including Lua. # LUATOP=..\..\lua-5.3.5 # #============================================================================== -# This marks the end of the BUILD DECISIONS section. +#======================== End of Modification Section ========================= #============================================================================== # -#=============================================== -#======= End of Modification Section =========== -#=============================================== -# -################################################ -# # -# Nothing below here should have to be changed.# -# # -################################################ +# ################################################# +# # # +# # Nothing below here should have to be changed. # +# # # +# ################################################# # #============================================================================== # From 8bd6ef629af8d36be9bdcdbdd3aefbe0ab1bbeb7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 15 Nov 2019 11:12:00 -0500 Subject: [PATCH 229/529] update post-Lua add lib/ to .gitignore add optional "make fetch-Lua" step to simplify prerequisite to "make all" --- .gitignore | 1 + sys/unix/Makefile.top | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index 08346d41c..9dc6b49f5 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ Release/ binary/ build/ ipch/ +lib/ Nethack.sln Nethack.sdf Nethack.opensdf diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 13ceb19bf..9d3cceeb8 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -74,6 +74,9 @@ VARDAT = $(VARDATD) $(VARDATND) #CHOWN = chown #CHGRP = chgrp +# Lua version +LUA_VERSION = 5.3.5 + # # end of configuration # @@ -232,7 +235,15 @@ dofiles-nodlb: -( cd $(INSTDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \ $(CHGRP) $(GAMEGRP) $(DAT) ; \ chmod $(FILEPERM) $(DAT) ) +# +# This is not part of the dependency build hierarchy. +# It requires an explicit "make fetch-Lua". +fetch-lua: fetch-Lua +fetch-Lua: + ( mkdir -p lib ; cd lib ; \ + curl -R -O http://www.lua.org/ftp/lua-$(LUA_VERSION).tar.gz ; \ + tar zxf lua-$(LUA_VERSION).tar.gz ; rm -f lua-$(LUA_VERSION).tar.gz ) update: $(GAME) recover $(VARDAT) spec_levs # (don't yank the old version out from under people who're playing it) -mv $(INSTDIR)/$(GAME) $(INSTDIR)/$(GAME).old From 304673dcab704b4c8ec2b252769f84e4cd8b37e1 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 15 Nov 2019 10:12:45 -0800 Subject: [PATCH 230/529] hints/macosx10.14 comment A comment in macosx10.14 describing how to create a signed package had the last sample command wrong. Fix it now in case that part carries over to hypothetical--but likely--new macosx10.15 hints. Also, shorten a couple of wide comment lines in the same area. --- sys/unix/hints/macosx10.14 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/unix/hints/macosx10.14 b/sys/unix/hints/macosx10.14 index 751ba7774..e43b5f19d 100644 --- a/sys/unix/hints/macosx10.14 +++ b/sys/unix/hints/macosx10.14 @@ -1,5 +1,5 @@ # -# NetHack 3.6 macosx10.14 $NHDT-Date: 1566346605 2019/08/21 00:16:45 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.59 $ +# NetHack 3.6 macosx10.14 $NHDT-Date: 1573841535 2019/11/15 18:12:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.60 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. # NetHack may be freely redistributed. See license for details. # @@ -229,12 +229,12 @@ ifdef MAKEFILE_TOP # Notes: # 1) The Apple developer utilities must be installed in the default location. # 2) Do a normal build before trying to package the game. -# 3) This matches the 3.4.3 Term package, but there are some things that should -# be changed. +# 3) This matches the 3.4.3 Term package, but there are some things that +# should be changed. # -# Packages that are being distributed must be signed by a Developer ID Installer -# certificate. Set DEVELOPER_CERT to the name of the certificate if you wish -# for your package to be signed for distribution. +# Packages that are being distributed must be signed by a Developer ID +# Installer certificate. Set DEVELOPER_CERT to the name of the certificate +# if you wish for your package to be signed for distribution. # # If building a package for signing, you must use sudo approriately. # the binaries and package using sudo but you DO NOT use sudo to sign the @@ -242,7 +242,7 @@ ifdef MAKEFILE_TOP # # sudo make all # sudo make build_tty_pkg -# sudo sign_tty_pkg +# make sign_tty_pkg # From 8d154121ca77d7ecc6cc17c94b763fbe56f5181b Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 15 Nov 2019 12:09:45 -0800 Subject: [PATCH 231/529] fix #H9420 - dipping while blind Fix several feedback anomalies for dipping into potions. --- doc/fixes36.3 | 9 +++++++- src/potion.c | 64 +++++++++++++++++++++++++++++++++------------------ 2 files changed, 50 insertions(+), 23 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 1291c29d7..287b74044 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.177 $ $NHDT-Date: 1573778559 2019/11/15 00:42:39 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.178 $ $NHDT-Date: 1573848574 2019/11/15 20:09:34 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -225,6 +225,13 @@ putting on gloves while having slippery fingers transfered slipperiness to when a monster reads a scroll of fire to cure sliming, don't access that scroll's memory after it has been used up (bcsign) monster vs monster attacks didn't handle shades or silver weapon feedback +successful alchemy would show new potion's description (color) even when blind +dipping some types of objects into oil would yield " gleams with an + oily sheen" even when blind +dipping into an undiscovered potion would offer chance to give a name to the + potion even when its description wasn't known (picked up while blind) +dipping lichen corpse into acid when not blind and acid was undicovered would + not offer a chance to give a name to the potion after lichen feedback Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/potion.c b/src/potion.c index 4f9a42d51..16b2c5dda 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 potion.c $NHDT-Date: 1573346191 2019/11/10 00:36:31 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.166 $ */ +/* NetHack 3.6 potion.c $NHDT-Date: 1573848199 2019/11/15 20:03:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.167 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2030,7 +2030,7 @@ dodip() around for potionbreathe() [and we can't set obj->in_use to 'amt' because that's not implemented] */ obj->in_use = 1; - pline("BOOM! They explode!"); + pline("%sThey explode!", !Deaf ? "BOOM! " : ""); wake_nearto(u.ux, u.uy, (BOLT_LIM + 1) * (BOLT_LIM + 1)); exercise(A_STR, FALSE); if (!breathless(youmonst.data) || haseyes(youmonst.data)) @@ -2048,6 +2048,8 @@ dodip() if (mixture != STRANGE_OBJECT) { obj->otyp = mixture; } else { + struct obj *otmp; + switch (obj->odiluted ? 1 : rnd(8)) { case 1: obj->otyp = POT_WATER; @@ -2056,17 +2058,15 @@ dodip() case 3: obj->otyp = POT_SICKNESS; break; - case 4: { - struct obj *otmp = mkobj(POTION_CLASS, FALSE); - + case 4: + otmp = mkobj(POTION_CLASS, FALSE); obj->otyp = otmp->otyp; obfree(otmp, (struct obj *) 0); break; - } default: useupall(obj); - if (!Blind) - pline_The("mixture glows brightly and evaporates."); + pline_The("mixture %sevaporates.", + !Blind ? "glows brightly and " : ""); return 1; } } @@ -2092,11 +2092,16 @@ dodip() } if (potion->otyp == POT_ACID && obj->otyp == CORPSE - && obj->corpsenm == PM_LICHEN && !Blind) { + && obj->corpsenm == PM_LICHEN) { pline("%s %s %s around the edges.", The(cxname(obj)), - otense(obj, "turn"), - potion->odiluted ? hcolor(NH_ORANGE) : hcolor(NH_RED)); + otense(obj, "turn"), Blind ? "wrinkled" + : potion->odiluted ? hcolor(NH_ORANGE) + : hcolor(NH_RED)); potion->in_use = FALSE; /* didn't go poof */ + if (potion->dknown + && !objects[potion->otyp].oc_name_known + && !objects[potion->otyp].oc_uname) + docall(potion); return 1; } @@ -2150,10 +2155,14 @@ dodip() } else if ((!is_rustprone(obj) && !is_corrodeable(obj)) || is_ammo(obj) || (!obj->oeroded && !obj->oeroded2)) { /* uses up potion, doesn't set obj->greased */ - pline("%s %s with an oily sheen.", Yname2(obj), - otense(obj, "gleam")); + if (!Blind) + pline("%s %s with an oily sheen.", Yname2(obj), + otense(obj, "gleam")); + else /*if (!uarmg)*/ + pline("%s %s oily.", Yname2(obj), otense(obj, "feel")); } else { - pline("%s %s less %s.", Yname2(obj), otense(obj, "are"), + pline("%s %s less %s.", Yname2(obj), + otense(obj, !Blind ? "are" : "feel"), (obj->oeroded && obj->oeroded2) ? "corroded and rusty" : obj->oeroded ? "rusty" : "corroded"); @@ -2164,7 +2173,8 @@ dodip() wisx = TRUE; } exercise(A_WIS, wisx); - makeknown(potion->otyp); + if (potion->dknown) + makeknown(potion->otyp); useup(potion); return 1; } @@ -2200,7 +2210,8 @@ dodip() useup(potion); exercise(A_WIS, TRUE); } - makeknown(POT_OIL); + if (potion->dknown) + makeknown(POT_OIL); obj->spe = 1; update_inventory(); return 1; @@ -2238,16 +2249,24 @@ dodip() singlepotion->dknown = FALSE; } else { singlepotion->dknown = !Hallucination; + *newbuf = '\0'; if (mixture == POT_WATER && singlepotion->dknown) Sprintf(newbuf, "clears"); - else + else if (!Blind) Sprintf(newbuf, "turns %s", hcolor(OBJ_DESCR(objects[mixture]))); - pline_The("%spotion%s %s.", oldbuf, - more_than_one ? " that you dipped into" : "", newbuf); - if (!objects[old_otyp].oc_uname - && !objects[old_otyp].oc_name_known && old_dknown) { + if (*newbuf) + pline_The("%spotion%s %s.", oldbuf, + more_than_one ? " that you dipped into" : "", + newbuf); + else + pline("Somehing happens."); + + if (old_dknown + && !objects[old_otyp].oc_name_known + && !objects[old_otyp].oc_uname) { struct obj fakeobj; + fakeobj = zeroobj; fakeobj.dknown = 1; fakeobj.otyp = old_otyp; @@ -2269,7 +2288,8 @@ dodip() return 1; poof: - if (!objects[potion->otyp].oc_name_known + if (potion->dknown + && !objects[potion->otyp].oc_name_known && !objects[potion->otyp].oc_uname) docall(potion); useup(potion); From ae415589e921c3333359c8254848cb23fddc4057 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 15 Nov 2019 17:51:20 -0800 Subject: [PATCH 232/529] have --showpaths show DUMPLOG file While not a path exactly, the dumplog file isn't placed somewhere fixed so being able to see where it is placed could be useful. This cascaded a bit during testing. Fix one of the warnings from hardfought (fqn_prefix_names[]). And a few more that came up with SYSCF disabled (panictrace_gdb, two unused variables if files.c). --- include/decl.h | 4 +-- include/extern.h | 13 ++++++---- src/decl.c | 4 +-- src/end.c | 10 ++++---- src/files.c | 58 +++++++++++++++++++++++++++-------------- src/windows.c | 67 +++++++++++++++++++++++++++++++++++------------- 6 files changed, 105 insertions(+), 51 deletions(-) diff --git a/include/decl.h b/include/decl.h index c2e0648e1..c6e298b43 100644 --- a/include/decl.h +++ b/include/decl.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 decl.h $NHDT-Date: 1559601011 2019/06/03 22:30:11 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.150 $ */ +/* NetHack 3.6 decl.h $NHDT-Date: 1573869061 2019/11/16 01:51:01 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.165 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2007. */ /* NetHack may be freely redistributed. See license for details. */ @@ -402,7 +402,7 @@ E char *fqn_prefix[PREFIX_COUNT]; E boolean fqn_prefix_locked[PREFIX_COUNT]; #endif #ifdef PREFIXES_IN_USE -E char *fqn_prefix_names[PREFIX_COUNT]; +E const char *fqn_prefix_names[PREFIX_COUNT]; #endif E NEARDATA struct savefile_info sfcap, sfrestinfo, sfsaveinfo; diff --git a/include/extern.h b/include/extern.h index 00fa63ee0..d4a4b432d 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1573688684 2019/11/13 23:44:44 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.739 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1573869062 2019/11/16 01:51:02 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.740 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2864,10 +2864,13 @@ E void NDECL(nhwindows_hangup); #endif E void NDECL(genl_status_init); E void NDECL(genl_status_finish); -E void FDECL(genl_status_enablefield, - (int, const char *, const char *, BOOLEAN_P)); -E void FDECL(genl_status_update, (int, genericptr_t, int, int, int, unsigned long *)); - +E void FDECL(genl_status_enablefield, (int, const char *, const char *, + BOOLEAN_P)); +E void FDECL(genl_status_update, (int, genericptr_t, int, int, int, + unsigned long *)); +#ifdef DUMPLOG +E char *FDECL(dump_fmtstr, (const char *, char *, BOOLEAN_P)); +#endif E void FDECL(dump_open_log, (time_t)); E void NDECL(dump_close_log); E void FDECL(dump_redirect, (BOOLEAN_P)); diff --git a/src/decl.c b/src/decl.c index d3706ef3b..4ae704d41 100644 --- a/src/decl.c +++ b/src/decl.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 decl.c $NHDT-Date: 1571352532 2019/10/17 22:48:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.146 $ */ +/* NetHack 3.6 decl.c $NHDT-Date: 1573869062 2019/11/16 01:51:02 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.149 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2009. */ /* NetHack may be freely redistributed. See license for details. */ @@ -294,7 +294,7 @@ boolean fqn_prefix_locked[PREFIX_COUNT] = { FALSE, FALSE, FALSE, #endif #ifdef PREFIXES_IN_USE -char *fqn_prefix_names[PREFIX_COUNT] = { +const char *fqn_prefix_names[PREFIX_COUNT] = { "hackdir", "leveldir", "savedir", "bonesdir", "datadir", "scoredir", "lockdir", "sysconfdir", "configdir", "troubledir" }; diff --git a/src/end.c b/src/end.c index c8d25775b..f3d4a5bda 100644 --- a/src/end.c +++ b/src/end.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 end.c $NHDT-Date: 1562532734 2019/07/07 20:52:14 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.179 $ */ +/* NetHack 3.6 end.c $NHDT-Date: 1573869062 2019/11/16 01:51:02 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.180 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -257,8 +257,8 @@ NH_panictrace_gdb() #ifdef PANICTRACE_GDB /* A (more) generic method to get a stack trace - invoke * gdb on ourself. */ - char *gdbpath = GDBVAR; - char *greppath = GREPVAR; + const char *gdbpath = GDBVAR; + const char *greppath = GREPVAR; char buf[BUFSZ]; FILE *gdb; @@ -267,8 +267,8 @@ NH_panictrace_gdb() if (greppath == NULL || greppath[0] == 0) return FALSE; - sprintf(buf, "%s -n -q %s %d 2>&1 | %s '^#'", gdbpath, ARGV0, getpid(), - greppath); + sprintf(buf, "%s -n -q %s %d 2>&1 | %s '^#'", + gdbpath, ARGV0, getpid(), greppath); gdb = popen(buf, "w"); if (gdb) { raw_print("Generating more information you may report:\n"); diff --git a/src/files.c b/src/files.c index 67047a9e1..5a0e1a7b2 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 files.c $NHDT-Date: 1573358489 2019/11/10 04:01:29 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.263 $ */ +/* NetHack 3.6 files.c $NHDT-Date: 1573869063 2019/11/16 01:51:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.269 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2302,13 +2302,12 @@ char *origbuf; static boolean ramdisk_specified = FALSE; #endif #ifdef SYSCF - int n; + int n, src = iflags.parse_config_file_src; #endif char *bufp, buf[4 * BUFSZ]; uchar translate[MAXPCHARS]; int len; boolean retval = TRUE; - int src = iflags.parse_config_file_src; /* convert any tab to space, condense consecutive spaces into one, remove leading and trailing spaces (exception: if there is nothing @@ -4004,15 +4003,16 @@ boolean wildcards; void reveal_paths(VOID_ARGS) { - const char *fqn, *filep; + const char *fqn, *gamename = (hname && *hname) ? hname : "NetHack"; char buf[BUFSZ]; -#if defined(UNIX) || defined(PREFIXES_IN_USE) - char *strp; +#if defined(SYSCF) || !defined(UNIX) + const char *filep; #endif #ifdef UNIX - char *envp, cwdbuf[PATH_MAX]; + char *endp, *envp, cwdbuf[PATH_MAX]; #endif #ifdef PREFIXES_IN_USE + const char *strp; int i, maxlen = 0; raw_print("Variable playground locations:"); @@ -4027,12 +4027,12 @@ reveal_paths(VOID_ARGS) #ifdef PREFIXES_IN_USE strp = fqn_prefix_names[SYSCONFPREFIX]; maxlen = BUFSZ - sizeof " (in )"; - if (strp && strlen(strp) < (size_t) maxlen) + if (strp && (int) strlen(strp) < maxlen) Sprintf(buf, " (in %s)", strp); #else buf[0] = '\0'; #endif - raw_printf("Your system configuration file%s:", buf); + raw_printf("%s system configuration file%s:", s_suffix(gamename), buf); #ifdef SYSCF_FILE filep = SYSCF_FILE; #else @@ -4059,16 +4059,16 @@ reveal_paths(VOID_ARGS) strp = fqn_prefix_names[HACKPREFIX]; #endif /* WIN32 */ maxlen = BUFSZ - sizeof " (in )"; - if (strp && strlen(strp) < (size_t) maxlen) + if (strp && (int) strlen(strp) < maxlen) Sprintf(buf, " (in %s)", strp); #endif /* PREFIXES_IN_USE */ - raw_printf("Your game's loadable symbols file%s:", buf); + raw_printf("%s loadable symbols file%s:", s_suffix(gamename), buf); #endif /* UNIX */ #ifdef UNIX envp = getcwd(cwdbuf, PATH_MAX); if (envp) { - raw_print("Your game's loadable symbols file:"); + raw_printf("%s loadable symbols file:", s_suffix(gamename)); raw_printf(" \"%s/%s\"", envp, SYMBOLS); } #else /* UNIX */ @@ -4091,7 +4091,7 @@ reveal_paths(VOID_ARGS) #ifdef PREFIXES_IN_USE strp = fqn_prefix_names[CONFIGPREFIX]; maxlen = BUFSZ - sizeof " (in )"; - if (strp && strlen(strp) < (size_t) maxlen) + if (strp && (int) strlen(strp) < maxlen) Sprintf(buf, " (in %s)", strp); #endif /* PREFIXES_IN_USE */ raw_printf("Your personal configuration file%s:", buf); @@ -4102,26 +4102,26 @@ reveal_paths(VOID_ARGS) copynchars(buf, envp, (int) sizeof buf - 1 - 1); Strcat(buf, "/"); } - strp = eos(buf); - copynchars(strp, default_configfile, + endp = eos(buf); + copynchars(endp, default_configfile, (int) (sizeof buf - 1 - strlen(buf))); #if defined(__APPLE__) /* UNIX+__APPLE__ => MacOSX aka OSX aka macOS */ if (envp) { if (access(buf, 4) == -1) { /* 4: R_OK, -1: failure */ /* read access to default failed; might be protected excessively but more likely it doesn't exist; try first alternate: - "$HOME/Library/Pref..."; 'strp' points past '/' */ - copynchars(strp, "Library/Preferences/NetHack Defaults", + "$HOME/Library/Pref..."; 'endp' points past '/' */ + copynchars(endp, "Library/Preferences/NetHack Defaults", (int) (sizeof buf - 1 - strlen(buf))); if (access(buf, 4) == -1) { /* first alternate failed, try second: - ".../NetHack Defaults.txt"; no 'strp', just append */ + ".../NetHack Defaults.txt"; no 'endp', just append */ copynchars(eos(buf), ".txt", (int) (sizeof buf - 1 - strlen(buf))); if (access(buf, 4) == -1) { /* second alternate failed too, so revert to the original default ("$HOME/.nethackrc") for message */ - copynchars(strp, default_configfile, + copynchars(endp, default_configfile, (int) (sizeof buf - 1 - strlen(buf))); } } @@ -4136,6 +4136,26 @@ reveal_paths(VOID_ARGS) #endif raw_printf(" \"%s\"", fqn ? fqn : default_configfile); #endif /* ?UNIX */ + +#ifdef DUMPLOG +#ifdef SYSCF + fqn = sysopt.dumplogfile; +#else /* !SYSCF */ +#ifdef DUMPLOG_FILE + fqn = DUMPLOG_FILE; +#else + fqn = (char *) 0; +#endif +#endif /* ?SYSCF */ + if (fqn) { + raw_print("Your end-of-game dump file:"); + (void) dump_fmtstr(fqn, buf, FALSE); + buf[sizeof buf - sizeof " \"\""] = '\0'; + raw_printf(" \"%s\"", buf); + } else +#endif /* DUMPLOG */ + raw_print("No end-of-game dump file."); + raw_print(""); } diff --git a/src/windows.c b/src/windows.c index ad7b91b0d..7dac248a0 100644 --- a/src/windows.c +++ b/src/windows.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 windows.c $NHDT-Date: 1526933747 2018/05/21 20:15:47 $ $NHDT-Branch: NetHack-3.6.2 $:$NHDT-Revision: 1.48 $ */ +/* NetHack 3.6 windows.c $NHDT-Date: 1573869064 2019/11/16 01:51:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.58 $ */ /* Copyright (c) D. Cohrs, 1993. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1091,12 +1091,13 @@ STATIC_VAR FILE *dumplog_file; #ifdef DUMPLOG STATIC_VAR time_t dumplog_now; -STATIC_DCL char *FDECL(dump_fmtstr, (const char *, char *)); - -STATIC_OVL char * -dump_fmtstr(fmt, buf) +char * +dump_fmtstr(fmt, buf, fullsubs) const char *fmt; char *buf; +boolean fullsubs; /* True -> full substitution for file name, False -> + * partial substitution for '--showpaths' feedback + * where there's no game in progress when executed */ { const char *fp = fmt; char *bp = buf; @@ -1119,7 +1120,7 @@ char *buf; * may or may not interfere with that usage.] */ - while (fp && *fp && len < BUFSZ-1) { + while (fp && *fp && len < BUFSZ - 1) { if (*fp == '%') { fp++; switch (*fp) { @@ -1130,17 +1131,29 @@ char *buf; Sprintf(tmpbuf, "%%"); break; case 't': /* game start, timestamp */ - Sprintf(tmpbuf, "%lu", (unsigned long) ubirthday); + if (fullsubs) + Sprintf(tmpbuf, "%lu", (unsigned long) ubirthday); + else + Strcpy(tmpbuf, "{game start cookie}"); break; case 'T': /* current time, timestamp */ - Sprintf(tmpbuf, "%lu", (unsigned long) now); + if (fullsubs) + Sprintf(tmpbuf, "%lu", (unsigned long) now); + else + Strcpy(tmpbuf, "{current time cookie}"); break; case 'd': /* game start, YYYYMMDDhhmmss */ - Sprintf(tmpbuf, "%08ld%06ld", - yyyymmdd(ubirthday), hhmmss(ubirthday)); + if (fullsubs) + Sprintf(tmpbuf, "%08ld%06ld", + yyyymmdd(ubirthday), hhmmss(ubirthday)); + else + Strcpy(tmpbuf, "{game start date+time}"); break; case 'D': /* current time, YYYYMMDDhhmmss */ - Sprintf(tmpbuf, "%08ld%06ld", yyyymmdd(now), hhmmss(now)); + if (fullsubs) + Sprintf(tmpbuf, "%08ld%06ld", yyyymmdd(now), hhmmss(now)); + else + Strcpy(tmpbuf, "{current date+time}"); break; case 'v': /* version, eg. "3.6.2-0" */ Sprintf(tmpbuf, "%s", version_string(verbuf)); @@ -1149,19 +1162,37 @@ char *buf; Sprintf(tmpbuf, "%ld", uid); break; case 'n': /* player name */ - Sprintf(tmpbuf, "%s", *plname ? plname : "unknown"); + if (fullsubs) + Sprintf(tmpbuf, "%s", *plname ? plname : "unknown"); + else + Strcpy(tmpbuf, "{hero name}"); break; case 'N': /* first character of player name */ - Sprintf(tmpbuf, "%c", *plname ? *plname : 'u'); + if (fullsubs) + Sprintf(tmpbuf, "%c", *plname ? *plname : 'u'); + else + Strcpy(tmpbuf, "{hero initial}"); break; } + if (fullsubs) { + /* replace potentially troublesome characters (including + even though it might be an acceptable file name + character); user shouldn't be able to get ' ' or '/' + or '\\' into plname[] but play things safe */ + (void) strNsubst(tmpbuf, " ", "_", 0); + (void) strNsubst(tmpbuf, "/", "_", 0); + (void) strNsubst(tmpbuf, "\\", "_", 0); + /* note: replacements are only done on field substitutions, + not on the template (from sysconf or DUMPLOG_FILE) */ + } - slen = strlen(tmpbuf); - if (len + slen < BUFSZ-1) { + slen = (int) strlen(tmpbuf); + if (len + slen < BUFSZ - 1) { len += slen; Sprintf(bp, "%s", tmpbuf); bp += slen; - if (*fp) fp++; + if (*fp) + fp++; } else break; } else { @@ -1189,9 +1220,9 @@ time_t now; #ifdef SYSCF if (!sysopt.dumplogfile) return; - fname = dump_fmtstr(sysopt.dumplogfile, buf); + fname = dump_fmtstr(sysopt.dumplogfile, buf, TRUE); #else - fname = dump_fmtstr(DUMPLOG_FILE, buf); + fname = dump_fmtstr(DUMPLOG_FILE, buf, TRUE); #endif dumplog_file = fopen(fname, "w"); dumplog_windowprocs_backup = windowprocs; From 298af2294fc7d17f3c71d586dd63651fc2de0fe6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 15 Nov 2019 21:20:38 -0500 Subject: [PATCH 233/529] quiet some macosx warnings --- include/decl.h | 3 ++ include/system.h | 6 ++++ src/decl.c | 2 ++ src/dungeon.c | 42 +++++++++++++++++---------- src/nhlsel.c | 36 +++++++++++++++++++++-- src/nhlua.c | 24 ++++++++++------ src/sp_lev.c | 75 +++++++++++++++++++++++++++++------------------- 7 files changed, 133 insertions(+), 55 deletions(-) mode change 100644 => 100755 include/decl.h mode change 100644 => 100755 include/system.h mode change 100644 => 100755 src/decl.c mode change 100644 => 100755 src/dungeon.c mode change 100644 => 100755 src/nhlsel.c mode change 100644 => 100755 src/nhlua.c mode change 100644 => 100755 src/sp_lev.c diff --git a/include/decl.h b/include/decl.h old mode 100644 new mode 100755 index 66033f783..72f6e605e --- a/include/decl.h +++ b/include/decl.h @@ -339,6 +339,9 @@ E const struct c_common_strings c_common_strings; /* material strings */ E const char *materialnm[]; +/* empty string that is non-const for parameter use */ +E char emptystr[]; + /* Monster name articles */ #define ARTICLE_NONE 0 #define ARTICLE_THE 1 diff --git a/include/system.h b/include/system.h old mode 100644 new mode 100755 index bb0ee071d..fe29cbf4c --- a/include/system.h +++ b/include/system.h @@ -573,4 +573,10 @@ E int FDECL(atoi, (const char *)); #include "lualib.h" #include "lauxlib.h" +#if defined(WIN32) +#define LUA_INTCAST(i) ((int) i) +#else +#define LUA_INTCAST(i) (i) +#endif + #endif /* SYSTEM_H */ diff --git a/src/decl.c b/src/decl.c old mode 100644 new mode 100755 index 42c8b62b5..6b68fb1c3 --- a/src/decl.c +++ b/src/decl.c @@ -108,6 +108,8 @@ const char *materialnm[] = { "mysterious", "liquid", "wax", "organic", "platinum", "mithril", "plastic", "glass", "gemstone", "stone" }; +char emptystr[] = {0}; /* non-const */ + /* Global windowing data, defined here for multi-window-system support */ NEARDATA winid WIN_MESSAGE, WIN_STATUS, WIN_MAP, WIN_INVEN; #ifdef WIN32 diff --git a/src/dungeon.c b/src/dungeon.c old mode 100644 new mode 100755 index b888d1970..5bbdcc081 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -35,7 +35,9 @@ struct lchoice { char menuletter; }; +#if 0 static void FDECL(Fread, (genericptr_t, int, int, dlb *)); +#endif static xchar FDECL(dname_to_dnum, (const char *)); static int FDECL(find_branch, (const char *, struct proto_dungeon *)); static xchar FDECL(parent_dnum, (const char *, struct proto_dungeon *)); @@ -293,6 +295,7 @@ NHFILE *nhfp; } } +#if 0 static void Fread(ptr, size, nitems, stream) genericptr_t ptr; @@ -308,6 +311,7 @@ dlb *stream; nh_terminate(EXIT_FAILURE); } } +#endif static xchar dname_to_dnum(s) @@ -776,7 +780,7 @@ lua_State *L; if (lua_type(L, -1) == LUA_TTABLE) { int f, nflags; lua_len(L, -1); - nflags = lua_tointeger(L, -1); + nflags = LUA_INTCAST(lua_tointeger(L, -1)); lua_pop(L, 1); for (f = 0; f < nflags; f++) { lua_pushinteger(L, f+1); @@ -807,7 +811,9 @@ init_dungeons() register s_level *x; struct proto_dungeon pd; struct level_map *lev_map; + int tidx; + nhUse(cb); (void) memset(&pd, 0, sizeof(struct proto_dungeon)); pd.n_levs = pd.n_brs = 0; @@ -850,7 +856,7 @@ init_dungeons() panic("dungeon is not a lua table"); lua_len(L, -1); - g.n_dgns = lua_tointeger(L, -1); + g.n_dgns = LUA_INTCAST(lua_tointeger(L, -1)); lua_pop(L, 1); pd.start = 0; @@ -865,23 +871,26 @@ init_dungeons() if (g.n_dgns >= MAXDUNGEON) panic("init_dungeons: too many dungeons"); - int tidx = lua_gettop(L); + tidx = lua_gettop(L); lua_pushnil(L); /* first key */ i = 0; while (lua_next(L, tidx) != 0) { + char *dgn_name, *dgn_bonetag, *dgn_protoname; + int dgn_base, dgn_range, dgn_align, dgn_entry, dgn_chance, dgn_flags; + if (!lua_istable(L, -1)) panic("dungeon[%i] is not a lua table", i); - char *dgn_name = get_table_str(L, "name"); - char *dgn_bonetag = get_table_str_opt(L, "bonetag", ""); /* TODO: single char or "none" */ - char *dgn_protoname = get_table_str_opt(L, "protofile", ""); - int dgn_base = get_table_int(L, "base"); - int dgn_range = get_table_int_opt(L, "range", 0); - int dgn_align = dgnaligns2i[get_table_option(L, "alignment", "unaligned", dgnaligns)]; - int dgn_entry = get_table_int_opt(L, "entry", 0); - int dgn_chance = get_table_int_opt(L, "chance", 100); - int dgn_flags = get_dgn_flags(L); + dgn_name = get_table_str(L, "name"); + dgn_bonetag = get_table_str_opt(L, "bonetag", emptystr); /* TODO: single char or "none" */ + dgn_protoname = get_table_str_opt(L, "protofile", emptystr); + dgn_base = get_table_int(L, "base"); + dgn_range = get_table_int_opt(L, "range", 0); + dgn_align = dgnaligns2i[get_table_option(L, "alignment", "unaligned", dgnaligns)]; + dgn_entry = get_table_int_opt(L, "entry", 0); + dgn_chance = get_table_int_opt(L, "chance", 100); + dgn_flags = get_dgn_flags(L); debugpline4("DUNGEON[%i]: %s, base=(%i,%i)", i, dgn_name, dgn_base, dgn_range); @@ -897,7 +906,7 @@ init_dungeons() if (lua_type(L, -1) == LUA_TTABLE) { int f, nlevels; lua_len(L, -1); - nlevels = lua_tointeger(L, -1); + nlevels = LUA_INTCAST(lua_tointeger(L, -1)); pd.tmpdungeon[i].levels = nlevels; lua_pop(L, 1); for (f = 0; f < nlevels; f++) { @@ -906,7 +915,7 @@ init_dungeons() if (lua_type(L, -1) == LUA_TTABLE) { int bi; char *lvl_name = get_table_str(L, "name"); - char *lvl_bonetag = get_table_str_opt(L, "bonetag", ""); + char *lvl_bonetag = get_table_str_opt(L, "bonetag", emptystr); int lvl_base = get_table_int(L, "base"); int lvl_range = get_table_int_opt(L, "range", 0); int lvl_nlevels = get_table_int_opt(L, "nlevels", 0); @@ -915,6 +924,9 @@ init_dungeons() int lvl_align = dgnaligns2i[get_table_option(L, "alignment", "unaligned", dgnaligns)]; int lvl_flags = get_dgn_flags(L); struct tmplevel *tmpl = &pd.tmplevel[pd.n_levs + f]; + + nhUse(lvl_bonetag); + nhUse(lvl_align); debugpline4("LEVEL[%i]:%s,(%i,%i)", f, lvl_name, lvl_base, lvl_range); tmpl->name = lvl_name; tmpl->chainlvl = lvl_chain; @@ -953,7 +965,7 @@ init_dungeons() if (lua_type(L, -1) == LUA_TTABLE) { int f, nbranches; lua_len(L, -1); - nbranches = lua_tointeger(L, -1); + nbranches = LUA_INTCAST(lua_tointeger(L, -1)); pd.tmpdungeon[i].branches = nbranches; lua_pop(L, 1); for (f = 0; f < nbranches; f++) { diff --git a/src/nhlsel.c b/src/nhlsel.c old mode 100644 new mode 100755 index fcd4534f1..d5b78f0b5 --- a/src/nhlsel.c +++ b/src/nhlsel.c @@ -23,17 +23,27 @@ static int FDECL(l_selection_filter_mapchar, (lua_State *)); static int FDECL(l_selection_flood, (lua_State *)); static int FDECL(l_selection_circle, (lua_State *)); static int FDECL(l_selection_ellipse, (lua_State *)); -static int FDECL(l_selection_gradient, (lua_State *)); -static int FDECL(l_selection_iterate, (lua_State *)); static int FDECL(l_selection_gc, (lua_State *)); static int FDECL(l_selection_not, (lua_State *)); static int FDECL(l_selection_and, (lua_State *)); static int FDECL(l_selection_or, (lua_State *)); static int FDECL(l_selection_xor, (lua_State *)); static int FDECL(l_selection_not, (lua_State *)); +#if 0 +/* the following do not appear to currently be + used and because they are static, the OSX + compiler is complaining about them. I've + if ifdef'd out the prototype here and the + function body below. + */ +static int FDECL(l_selection_gradient, (lua_State *)); +static int FDECL(l_selection_iterate, (lua_State *)); static int FDECL(l_selection_add, (lua_State *)); static int FDECL(l_selection_sub, (lua_State *)); static int FDECL(l_selection_ipairs, (lua_State *)); +/* this prototype was missing but function body was below */ +static struct selectionvar *FDECL(l_selection_to, (lua_State *, int)); +#endif struct selectionvar * l_selection_check(L, index) @@ -588,6 +598,17 @@ lua_State *L; filled = (int) luaL_optinteger(L, 5, 0); /* TODO: boolean */ } else { nhl_error(L, "wrong parameters"); + /* + * FIXME: OSX compiler is issuing a complaint + * about r being passed to selection_do_ellipse() + * below without ever having been initialized + * to something when this else clause is encountered. + * I could have added an initializer to r at the + * top, but I didn't know what it should be initialized + * to in order for selection_do_ellipse() to not + * misbehave. The parameters passed in previous versions + * were related to xaxis and yaxis. + */ } get_location_coord(&x, &y, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x,y)); @@ -639,6 +660,17 @@ lua_State *L; filled = (int) luaL_optinteger(L, 6, 0); /* TODO: boolean */ } else { nhl_error(L, "wrong parameters"); + /* + * FIXME: OSX compiler is issuing a complaint + * about r1 and r2 being passed to selection_do_ellipse() + * below without ever having been initialized + * to something when this else clause is encountered. + * I could have added an initializer to r1,r2 at the + * top, but I didn't know what they should be initialized + * to in order for selection_do_ellipse() to not + * misbehave. The parameters passed in previous versions + * were related to xaxis and yaxis. + */ } get_location_coord(&x, &y, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x,y)); diff --git a/src/nhlua.c b/src/nhlua.c old mode 100644 new mode 100755 index 17d0c2736..7898879bb --- a/src/nhlua.c +++ b/src/nhlua.c @@ -16,7 +16,9 @@ /* lua_CFunction prototypes */ static int FDECL(nhl_test, (lua_State *)); static int FDECL(nhl_getmap, (lua_State *)); +#if 0 static int FDECL(nhl_setmap, (lua_State *)); +#endif static int FDECL(nhl_pline, (lua_State *)); static int FDECL(nhl_verbalize, (lua_State *)); static int FDECL(nhl_menu, (lua_State *)); @@ -87,7 +89,7 @@ schar defval; char *ter; xchar typ; - ter = get_table_str_opt(L, name, ""); + ter = get_table_str_opt(L, name, emptystr); if (name && *ter) { typ = check_mapchr(ter); if (typ == INVALID_TYPE) @@ -213,8 +215,8 @@ lua_State *L; int argc = lua_gettop(L); if (argc == 2) { - int x = lua_tointeger(L, 1); - int y = lua_tointeger(L, 2); + int x = LUA_INTCAST(lua_tointeger(L, 1)); + int y = LUA_INTCAST(lua_tointeger(L, 2)); if (x >= 0 && x < COLNO && y >= 0 && y < ROWNO) { char buf[BUFSZ]; @@ -572,7 +574,9 @@ const char *name; if (ltyp == LUA_TSTRING) { const char *const boolstr[] = { "true", "false", "yes", "no", NULL }; const int boolstr2i[] = { TRUE, FALSE, TRUE, FALSE, -1 }; + ret = luaL_checkoption(L, -1, NULL, boolstr); + nhUse(boolstr2i[0]); } else if (ltyp == LUA_TBOOLEAN) { ret = lua_toboolean(L, -1); } else if (ltyp == LUA_TNUMBER) { @@ -625,14 +629,17 @@ static int nhl_test(L) lua_State *L; { + int x, y; + char *name, Player[] = "Player"; + /* discard any extra arguments passed in */ lua_settop(L, 1); luaL_checktype(L, 1, LUA_TTABLE); - int x = get_table_int(L, "x"); - int y = get_table_int(L, "y"); - char *name = get_table_str_opt(L, "name", "Player"); + x = get_table_int(L, "x"); + y = get_table_int(L, "y"); + name = get_table_str_opt(L, "name", Player); pline("TEST:{ x=%i, y=%i, name=\"%s\" }", x,y, name); @@ -645,8 +652,9 @@ static const struct luaL_Reg nhl_functions[] = { {"test", nhl_test}, {"getmap", nhl_getmap}, - /*{"setmap", nhl_setmap},*/ - +#if 0 + {"setmap", nhl_setmap}, +#endif {"pline", nhl_pline}, {"verbalize", nhl_verbalize}, {"menu", nhl_menu}, diff --git a/src/sp_lev.c b/src/sp_lev.c old mode 100644 new mode 100755 index e014f3e50..7ef66d2a2 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -64,17 +64,13 @@ static void FDECL(wallify_map, (int, int, int, int)); static void FDECL(maze1xy, (coord *, int)); static void NDECL(fill_empty_maze); static void FDECL(splev_initlev, (lev_init *)); +#if 0 +/* macosx complains that these are unused */ static long FDECL(sp_code_jmpaddr, (long, long)); -static void NDECL(spo_end_moninvent); -static void NDECL(spo_pop_container); static void FDECL(spo_room, (struct sp_coder *)); -static void FDECL(spo_endroom, (struct sp_coder *)); static void FDECL(spo_trap, (struct sp_coder *)); static void FDECL(spo_gold, (struct sp_coder *)); static void FDECL(spo_corridor, (struct sp_coder *)); -static void FDECL(sel_set_ter, (int, int, genericptr_t)); -static void FDECL(sel_set_feature, (int, int, genericptr_t)); -static void FDECL(sel_set_door, (int, int, genericptr_t)); static void FDECL(spo_feature, (struct sp_coder *)); static void FDECL(spo_terrain, (struct sp_coder *)); static void FDECL(spo_replace_terrain, (struct sp_coder *)); @@ -84,8 +80,15 @@ static void FDECL(spo_drawbridge, (struct sp_coder *)); static void FDECL(spo_mazewalk, (struct sp_coder *)); static void FDECL(spo_wall_property, (struct sp_coder *)); static void FDECL(spo_room_door, (struct sp_coder *)); -static void FDECL(sel_set_wallify, (int, int, genericptr_t)); static void FDECL(spo_wallify, (struct sp_coder *)); +static void FDECL(sel_set_wallify, (int, int, genericptr_t)); +#endif +static void NDECL(spo_end_moninvent); +static void NDECL(spo_pop_container); +static void FDECL(spo_endroom, (struct sp_coder *)); +static void FDECL(sel_set_ter, (int, int, genericptr_t)); +static void FDECL(sel_set_door, (int, int, genericptr_t)); +static void FDECL(sel_set_feature, (int, int, genericptr_t)); static int FDECL(get_coord, (lua_State *, int, int *, int *)); static int FDECL(get_table_region, (lua_State *, const char *, int *, int *, int *, int *, BOOLEAN_P)); @@ -2247,13 +2250,14 @@ lev_init *linit; } } +#if 0 static long sp_code_jmpaddr(curpos, jmpaddr) long curpos, jmpaddr; { return (curpos + jmpaddr); } - +#endif /*ARGUSED*/ @@ -2282,6 +2286,7 @@ lua_State *L; { char *levmsg; int old_n, n; + const char *msg; int argc = lua_gettop(L); @@ -2292,7 +2297,7 @@ lua_State *L; create_des_coder(); - const char *msg = luaL_checkstring(L, 1); + msg = luaL_checkstring(L, 1); old_n = g.lev_message ? (strlen(g.lev_message) + 1) : 0; n = strlen(msg); @@ -2315,10 +2320,10 @@ int get_table_align(L) lua_State *L; { - const char *const aligns[] = { "noalign", "law", "neutral", "chaos", "coaligned", "noncoaligned", "random", NULL }; + const char *const gtaligns[] = { "noalign", "law", "neutral", "chaos", "coaligned", "noncoaligned", "random", NULL }; const int aligns2i[] = { AM_NONE, AM_LAWFUL, AM_NEUTRAL, AM_CHAOTIC, AM_SPLEV_CO, AM_SPLEV_NONCO, AM_SPLEV_RANDOM, 0 }; - int a = aligns2i[get_table_option(L, "align", "random", aligns)]; + int a = aligns2i[get_table_option(L, "align", "random", gtaligns)]; return a; } @@ -2347,6 +2352,7 @@ const char *s; for (i = LOW_PM; i < NUMMONS; i++) if (!strcmpi(mons[i].mname, s)) return i; + nhUse(L); return NON_PM; } @@ -2501,7 +2507,7 @@ lua_State *L; tmpmons.coord = SP_COORD_PACK(mx, my); if (tmpmons.id != NON_PM && tmpmons.class == -1) - tmpmons.class = def_monsyms[mons[tmpmons.id].mlet].sym; + tmpmons.class = def_monsyms[(int) mons[tmpmons.id].mlet].sym; create_monster(&tmpmons, g.coder->croom); @@ -2528,6 +2534,7 @@ const char *name; int rndval; { int ret; + char buf[BUFSZ]; lua_getfield(L, 1, name); if (lua_type(L, -1) == LUA_TNIL) { @@ -2541,7 +2548,6 @@ int rndval; lua_pop(L, 1); return rndval; } - char buf[BUFSZ]; Sprintf(buf, "Expected integer or \"random\" for \"%s\", got %s", name, tmp); nhl_error(L, buf); lua_pop(L, 1); @@ -2626,7 +2632,9 @@ int lspo_object(L) lua_State *L; { +#if 0 int nparams = 0; +#endif long quancnt; object tmpobj; int ox = -1, oy = -1; @@ -2727,8 +2735,9 @@ lua_State *L; tmpobj.id = -1; if (tmpobj.id == STATUE || tmpobj.id == EGG || tmpobj.id == CORPSE || tmpobj.id == TIN) { - int flags = 0; + int lflags = 0; const char *montype = get_table_str_opt(L, "montype", NULL); + if (montype) { struct permonst *pm = NULL; if (strlen(montype) == 1 && def_char_to_monclass(*montype) != MAXMCLASSES) { @@ -2747,10 +2756,10 @@ lua_State *L; nhl_error(L, "Unknown montype"); } if (tmpobj.id == STATUE) { - flags |= (get_table_boolean_opt(L, "historic", 0) ? STATUE_HISTORIC : 0x00); - flags |= (get_table_boolean_opt(L, "male", 0) ? STATUE_MALE : 0x00); - flags |= (get_table_boolean_opt(L, "female", 0) ? STATUE_FEMALE : 0x00); - tmpobj.spe = flags; + lflags |= (get_table_boolean_opt(L, "historic", 0) ? STATUE_HISTORIC : 0x00); + lflags |= (get_table_boolean_opt(L, "male", 0) ? STATUE_MALE : 0x00); + lflags |= (get_table_boolean_opt(L, "female", 0) ? STATUE_FEMALE : 0x00); + tmpobj.spe = lflags; } else if (tmpobj.id == EGG) { tmpobj.spe = get_table_boolean_opt(L, "laid_by_you", 0) ? 1 : 0; } @@ -2877,7 +2886,7 @@ int lspo_engraving(L) lua_State *L; { - int etyp; + int etyp = DUST; char *txt = (char *) 0; long ecoord; const char *const engrtypes[] = { "dust", "engrave", "burn", "mark", "blood", NULL }; @@ -2885,6 +2894,8 @@ lua_State *L; xchar x, y; int argc = lua_gettop(L); + x = y = 0; /* FIXME: quiet a warning for else clause below. + should it actually be -1? */ create_des_coder(); if (argc == 1) { @@ -2903,6 +2914,8 @@ lua_State *L; txt = dupstr(luaL_checkstring(L, 3)); } else { nhl_error(L, "Wrong parameters"); + /* FIXME: this clause left etyp uninitialized so initialization + to DUST was added above to quiet a macosx warning */ } if (x == -1 && y == -1) @@ -2975,7 +2988,7 @@ lua_State *L; const char *name; int defval; { - char *roomstr = get_table_str_opt(L, name, ""); + char *roomstr = get_table_str_opt(L, name, emptystr); if (roomstr && *roomstr) { int i; for (i = 0; room_types[i].name; i++) @@ -3055,7 +3068,7 @@ lua_State *L; static void spo_endroom(coder) -struct sp_coder *coder; +struct sp_coder *coder UNUSED; { if (g.coder->n_subroom > 1) { g.coder->n_subroom--; @@ -3095,15 +3108,15 @@ lua_State *L; const int stairdirs2i[] = { 0, 1 }; long scoord; - int ax = -1,ay = -1; + int ax = -1, ay = -1; int up; int ltype = lua_type(L, 1); create_des_coder(); - if (argc == 1 && ltype == LUA_TSTRING) + if (argc == 1 && ltype == LUA_TSTRING) { up = stairdirs2i[luaL_checkoption(L, 1, "down", stairdirs)]; - else if (argc == 3 && ltype == LUA_TSTRING) { + } else if (argc == 3 && ltype == LUA_TSTRING) { up = stairdirs2i[luaL_checkoption(L, 1, "down", stairdirs)]; ax = luaL_checkinteger(L, 2); ay = luaL_checkinteger(L, 3); @@ -3154,15 +3167,15 @@ lua_State *L; const int stairdirs2i[] = { 0, 1 }; long scoord; - int ax, ay; + int ax = -1, ay = -1; /* FIXME: initializers added, macosx warning */ int up; int ltype = lua_type(L, 1); create_des_coder(); - if (argc == 1 && ltype == LUA_TSTRING) + if (argc == 1 && ltype == LUA_TSTRING) { up = stairdirs2i[luaL_checkoption(L, 1, "down", stairdirs)]; - else if (argc == 3 && ltype == LUA_TSTRING) { + } else if (argc == 3 && ltype == LUA_TSTRING) { up = stairdirs2i[luaL_checkoption(L, 1, "down", stairdirs)]; ax = luaL_checkinteger(L, 2); ay = luaL_checkinteger(L, 3); @@ -3325,7 +3338,7 @@ lua_State *L; const char *name; int defval; { - char *trapstr = get_table_str_opt(L, name, ""); + char *trapstr = get_table_str_opt(L, name, emptystr); if (trapstr && *trapstr) { int i; for (i = 0; trap_types[i].name; i++) @@ -3474,7 +3487,7 @@ lua_State *L; /* random_corridors(); */ int lspo_random_corridors(L) -lua_State *L; +lua_State *L UNUSED; { corridor tc; @@ -5119,6 +5132,7 @@ lua_State *L; return 0; } +#if 0 /*ARGSUSED*/ static void sel_set_wallify(x, y, arg) @@ -5127,6 +5141,7 @@ genericptr_t arg UNUSED; { wallify_map(x, y, x, y); } +#endif /* TODO: wallify(selection) */ /* wallify({ x1=NN,y1=NN, x2=NN,y2=NN }); */ @@ -5161,7 +5176,7 @@ lua_State *L; /* reset_level is only needed for testing purposes */ int lspo_reset_level(L) -lua_State *L; +lua_State *L UNUSED; /* macosx complaint needed UNUSED */ { boolean wtower = In_W_tower(u.ux, u.uy, &u.uz); From 8a7169eda9f0c1b7b8d7dd2176825c35fb2dca61 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 15 Nov 2019 19:03:11 -0800 Subject: [PATCH 234/529] fix curses compile warning From hardfought; latest gcc complains that /* fall through other stuff */ doesn't match its pattern for /* fall through */ comment indicating that omitted 'break' statement is intentional and one switch case is deliberately continuing into the code for another. --- win/curses/curswins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/curses/curswins.c b/win/curses/curswins.c index 006589510..81d8ab435 100644 --- a/win/curses/curswins.c +++ b/win/curses/curswins.c @@ -87,7 +87,7 @@ curses_create_window(int width, int height, orient orientation) switch (orientation) { default: impossible("curses_create_window: Bad orientation"); - /* fall through to centre */ + /*FALLTHRU*/ case CENTER: startx = (term_cols / 2) - (width / 2); starty = (term_rows / 2) - (height / 2); From 29d378116e5f1b2273d3e2c1f10d13cd1d6c840f Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 15 Nov 2019 22:22:19 -0500 Subject: [PATCH 235/529] fix unplanned perm change --- include/decl.h | 0 include/system.h | 0 src/decl.c | 0 src/dungeon.c | 0 src/nhlsel.c | 0 src/nhlua.c | 0 src/sp_lev.c | 0 7 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 include/decl.h mode change 100755 => 100644 include/system.h mode change 100755 => 100644 src/decl.c mode change 100755 => 100644 src/dungeon.c mode change 100755 => 100644 src/nhlsel.c mode change 100755 => 100644 src/nhlua.c mode change 100755 => 100644 src/sp_lev.c diff --git a/include/decl.h b/include/decl.h old mode 100755 new mode 100644 diff --git a/include/system.h b/include/system.h old mode 100755 new mode 100644 diff --git a/src/decl.c b/src/decl.c old mode 100755 new mode 100644 diff --git a/src/dungeon.c b/src/dungeon.c old mode 100755 new mode 100644 diff --git a/src/nhlsel.c b/src/nhlsel.c old mode 100755 new mode 100644 diff --git a/src/nhlua.c b/src/nhlua.c old mode 100755 new mode 100644 diff --git a/src/sp_lev.c b/src/sp_lev.c old mode 100755 new mode 100644 From 8b1c6148f61c47d3629911258d4767f937cd4f32 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 16 Nov 2019 08:27:07 -0500 Subject: [PATCH 236/529] improve pluralization on some words ending with a k-sound fixes #245 --- doc/fixes36.3 | 1 + src/objnam.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 287b74044..d65976a9d 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -232,6 +232,7 @@ dipping into an undiscovered potion would offer chance to give a name to the potion even when its description wasn't known (picked up while blind) dipping lichen corpse into acid when not blind and acid was undicovered would not offer a chance to give a name to the potion after lichen feedback +pluralization improvement for words ending in a k-sound like "biotech" Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/objnam.c b/src/objnam.c index 765414417..ba301b9cf 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -2435,7 +2435,10 @@ const char *oldstr; /* Ends in z, x, s, ch, sh; add an "es" */ if (index("zxs", lo_c) - || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1)))) + || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1))) + /* 21st century k-sound */ + && !(len >= 4 && !strcmpi(spot - 2, "ech") + && index("tm", lowc(*(spot - 4))))) /* Kludge to get "tomatoes" and "potatoes" right */ || (len >= 4 && !strcmpi(spot - 2, "ato")) || (len >= 5 && !strcmpi(spot - 4, "dingo"))) { From 6a3dcc6a382f69fbd6fe990e163cc69ddb8ca95e Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 16 Nov 2019 10:08:21 -0500 Subject: [PATCH 237/529] more pluralization --- src/objnam.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/objnam.c b/src/objnam.c index ba301b9cf..3eea10d94 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -2205,6 +2205,11 @@ const char *const *alt_as_is; /* another set like as_is[] */ } } + /* Leave "craft" as a suffix as-is (aircraft, hovercraft); + "craft" itself is (arguably) not included in our likely context */ + if ((baselen > 5) && (!BSTRCMPI(basestr, endstring - 5, "craft"))) + return TRUE; + /* avoid false hit on one_off[].plur == "lice" or .sing == "goose"; if more of these turn up, one_off[] entries will need to flagged as to which are whole words and which are matchable as suffices @@ -2215,6 +2220,7 @@ const char *const *alt_as_is; /* another set like as_is[] */ Strcasecpy(endstring, "s"); return TRUE; } + /* skip "ox" -> "oxen" entry when pluralizing "ox" unless it is muskox */ if (to_plural && baselen > 2 && !strcmpi(endstring - 2, "ox") @@ -2435,10 +2441,7 @@ const char *oldstr; /* Ends in z, x, s, ch, sh; add an "es" */ if (index("zxs", lo_c) - || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1))) - /* 21st century k-sound */ - && !(len >= 4 && !strcmpi(spot - 2, "ech") - && index("tm", lowc(*(spot - 4))))) + || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1)))) /* Kludge to get "tomatoes" and "potatoes" right */ || (len >= 4 && !strcmpi(spot - 2, "ato")) || (len >= 5 && !strcmpi(spot - 4, "dingo"))) { From 340851ecf516371c501d43bcd8a3499a31d38538 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 16 Nov 2019 10:13:49 -0500 Subject: [PATCH 238/529] Revert "more pluralization" This reverts commit 6a3dcc6a382f69fbd6fe990e163cc69ddb8ca95e. --- src/objnam.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/objnam.c b/src/objnam.c index 3eea10d94..ba301b9cf 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -2205,11 +2205,6 @@ const char *const *alt_as_is; /* another set like as_is[] */ } } - /* Leave "craft" as a suffix as-is (aircraft, hovercraft); - "craft" itself is (arguably) not included in our likely context */ - if ((baselen > 5) && (!BSTRCMPI(basestr, endstring - 5, "craft"))) - return TRUE; - /* avoid false hit on one_off[].plur == "lice" or .sing == "goose"; if more of these turn up, one_off[] entries will need to flagged as to which are whole words and which are matchable as suffices @@ -2220,7 +2215,6 @@ const char *const *alt_as_is; /* another set like as_is[] */ Strcasecpy(endstring, "s"); return TRUE; } - /* skip "ox" -> "oxen" entry when pluralizing "ox" unless it is muskox */ if (to_plural && baselen > 2 && !strcmpi(endstring - 2, "ox") @@ -2441,7 +2435,10 @@ const char *oldstr; /* Ends in z, x, s, ch, sh; add an "es" */ if (index("zxs", lo_c) - || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1)))) + || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1))) + /* 21st century k-sound */ + && !(len >= 4 && !strcmpi(spot - 2, "ech") + && index("tm", lowc(*(spot - 4))))) /* Kludge to get "tomatoes" and "potatoes" right */ || (len >= 4 && !strcmpi(spot - 2, "ato")) || (len >= 5 && !strcmpi(spot - 4, "dingo"))) { From cdbad827fe5b187f4c6abdb9b5fafb355541a827 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 16 Nov 2019 10:15:55 -0500 Subject: [PATCH 239/529] reinstate bit - gak! --- src/objnam.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/objnam.c b/src/objnam.c index ba301b9cf..9cf7edda0 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -2205,7 +2205,11 @@ const char *const *alt_as_is; /* another set like as_is[] */ } } - /* avoid false hit on one_off[].plur == "lice" or .sing == "goose"; + /* Leave "craft" as a suffix as-is (aircraft, hovercraft); + "craft" itself is (arguably) not included in our likely context */ + if ((baselen > 5) && (!BSTRCMPI(basestr, endstring - 5, "craft"))) + return TRUE; + /* avoid false hit on one_off[].plur == "lice" or .sing == "goose"; if more of these turn up, one_off[] entries will need to flagged as to which are whole words and which are matchable as suffices then matching in the loop below will end up becoming more complex */ From 4d3828f6ec46a092fe08ad128561595cd6dcd571 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 16 Nov 2019 10:03:57 -0800 Subject: [PATCH 240/529] curses lint 'orient' is the name of an enum defined in wincurs.h so don't use it as a variable name in cursstat.c. My compiler didn't complain using '-Wshadow' but apparently some other one does. Make the same change in the dead code located in the second half of that file, plus a couple of formatting tweaks. --- win/curses/cursstat.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/win/curses/cursstat.c b/win/curses/cursstat.c index 69f0f758c..a2b83d861 100644 --- a/win/curses/cursstat.c +++ b/win/curses/cursstat.c @@ -209,8 +209,8 @@ static void draw_status() { WINDOW *win = curses_get_nhwin(STATUS_WIN); - int orient = curses_get_window_orientation(STATUS_WIN); - boolean horiz = (orient != ALIGN_RIGHT && orient != ALIGN_LEFT); + orient statorient = (orient) curses_get_window_orientation(STATUS_WIN); + boolean horiz = (statorient != ALIGN_RIGHT && statorient != ALIGN_LEFT); boolean border = curses_window_has_border(STATUS_WIN); /* Figure out if we have proper window dimensions for horizontal @@ -1722,18 +1722,14 @@ void curses_update_stats(void) { WINDOW *win = curses_get_nhwin(STATUS_WIN); + orient statorient = (orient) curses_get_window_orientation(STATUS_WIN); + boolean horiz = (statorient != ALIGN_RIGHT && statorient != ALIGN_LEFT); + boolean border = curses_window_has_border(STATUS_WIN); /* Clear the window */ werase(win); - int orient = curses_get_window_orientation(STATUS_WIN); - - boolean horiz = FALSE; - if ((orient != ALIGN_RIGHT) && (orient != ALIGN_LEFT)) - horiz = TRUE; - boolean border = curses_window_has_border(STATUS_WIN); - - /* Figure out if we have proper window dimensions for horizontal statusbar. */ + /* Figure out if we have proper window dimensions for horizontal status */ if (horiz) { /* correct y */ int cy = 3; @@ -1752,7 +1748,8 @@ curses_update_stats(void) curses_last_messages(); doredraw(); - /* Reset XP highlight (since classic_status and new show different numbers) */ + /* Reset XP highlight (since classic_status and new show + different numbers) */ prevexp.highlight_turns = 0; curses_update_stats(); return; @@ -1778,7 +1775,7 @@ curses_update_stats(void) hpmax = u.mhmax; } - if (orient != ALIGN_RIGHT && orient != ALIGN_LEFT) + if (horiz) draw_horizontal(x, y, hp, hpmax); else draw_vertical(x, y, hp, hpmax); @@ -1791,7 +1788,8 @@ curses_update_stats(void) if (first) { first = FALSE; - /* Zero highlight timers. This will call curses_update_status again if needed */ + /* Zero highlight timers. This will call curses_update_status again + if needed */ curses_decrement_highlights(TRUE); } } From d74718fc2bf236e11ab47da8a2d1341d3a631508 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 16 Nov 2019 14:17:11 -0500 Subject: [PATCH 241/529] likely final pluralization change for today --- src/objnam.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/objnam.c b/src/objnam.c index 9cf7edda0..796c90e84 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -2437,6 +2437,16 @@ const char *oldstr; lo_c = lowc(*spot); + /* codex/spadix/neocortex and the like */ + if (len >= 5 + && (!strcmpi(spot - 2, "dex") + ||!strcmpi(spot - 2, "dix") + ||!strcmpi(spot - 2, "tex")) + /* indices would have been ok too, but stick with indexes */ + && (strcmpi(spot - 4,"index") != 0)) { + Strcasecpy(spot - 1, "ices"); /* ex|ix -> ices */ + goto bottom; + } /* Ends in z, x, s, ch, sh; add an "es" */ if (index("zxs", lo_c) || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1))) From 020825bc73d3142a0781a87d19a4f5da463b6456 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 16 Nov 2019 11:46:50 -0800 Subject: [PATCH 242/529] monsters entering regions Region processing does a lot of looping--when there are actually regions present--and calls functions in those loops which do more looping of their own. This moves some of the simpler tests so that they get done sooner and can avoid some of those function calls. I was hoping that it would speed up the turn cycle on the Plane of Fire where the spontaneous irregularly shaped fumaroles are composed of a lot of small regions but I don't think there's any noticeable difference. In process of doing that, I discovered a bug (no doubt copy+paste which escaped an intended update) with monster handling. The check for whether a monster is entering a region depends upon whether the hero is in that same region rather than whether the monster is already inside. So a monster can enter a region--or have a moving one enclose it--with impunity if the hero is already in that region. Once the hero moves out of it, the monster will finally enter it. --- doc/fixes36.3 | 4 ++- src/region.c | 94 +++++++++++++++++++++++++++++---------------------- 2 files changed, 56 insertions(+), 42 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index d65976a9d..302dd0e0c 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.178 $ $NHDT-Date: 1573848574 2019/11/15 20:09:34 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.180 $ $NHDT-Date: 1573933605 2019/11/16 19:46:45 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -233,6 +233,8 @@ dipping into an undiscovered potion would offer chance to give a name to the dipping lichen corpse into acid when not blind and acid was undicovered would not offer a chance to give a name to the potion after lichen feedback pluralization improvement for words ending in a k-sound like "biotech" +check for whether a monster was entering a region (gas cloud) erroneously + depended upon whether or not the hero was inside the same region Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/region.c b/src/region.c index ad94426fa..9422de20c 100644 --- a/src/region.c +++ b/src/region.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 region.c $NHDT-Date: 1543455828 2018/11/29 01:43:48 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.43 $ */ +/* NetHack 3.6 region.c $NHDT-Date: 1573933605 2019/11/16 19:46:45 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.44 $ */ /* Copyright (c) 1996 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -430,24 +430,25 @@ xchar x, y; { int i, f_indx; - /* First check if we can do the move */ + /* First check if hero can do the move */ for (i = 0; i < n_regions; i++) { - if (inside_region(regions[i], x, y) && !hero_inside(regions[i]) - && !regions[i]->attach_2_u) { - if ((f_indx = regions[i]->can_enter_f) != NO_CALLBACK) - if (!(*callbacks[f_indx])(regions[i], (genericptr_t) 0)) - return FALSE; - } else if (hero_inside(regions[i]) && !inside_region(regions[i], x, y) - && !regions[i]->attach_2_u) { - if ((f_indx = regions[i]->can_leave_f) != NO_CALLBACK) - if (!(*callbacks[f_indx])(regions[i], (genericptr_t) 0)) - return FALSE; + if (regions[i]->attach_2_u) + continue; + if (inside_region(regions[i], x, y) + ? (!hero_inside(regions[i]) + && (f_indx = regions[i]->can_enter_f) != NO_CALLBACK) + : (hero_inside(regions[i]) + && (f_indx = regions[i]->can_leave_f) != NO_CALLBACK)) { + if (!(*callbacks[f_indx])(regions[i], (genericptr_t) 0)) + return FALSE; } } - /* Callbacks for the regions we do leave */ - for (i = 0; i < n_regions; i++) - if (hero_inside(regions[i]) && !regions[i]->attach_2_u + /* Callbacks for the regions hero does leave */ + for (i = 0; i < n_regions; i++) { + if (regions[i]->attach_2_u) + continue; + if (hero_inside(regions[i]) && !inside_region(regions[i], x, y)) { clear_hero_inside(regions[i]); if (regions[i]->leave_msg != (const char *) 0) @@ -455,10 +456,13 @@ xchar x, y; if ((f_indx = regions[i]->leave_f) != NO_CALLBACK) (void) (*callbacks[f_indx])(regions[i], (genericptr_t) 0); } + } - /* Callbacks for the regions we do enter */ - for (i = 0; i < n_regions; i++) - if (!hero_inside(regions[i]) && !regions[i]->attach_2_u + /* Callbacks for the regions hero does enter */ + for (i = 0; i < n_regions; i++) { + if (regions[i]->attach_2_u) + continue; + if (!hero_inside(regions[i]) && inside_region(regions[i], x, y)) { set_hero_inside(regions[i]); if (regions[i]->enter_msg != (const char *) 0) @@ -466,12 +470,14 @@ xchar x, y; if ((f_indx = regions[i]->enter_f) != NO_CALLBACK) (void) (*callbacks[f_indx])(regions[i], (genericptr_t) 0); } + } + return TRUE; } /* - * check whether a monster enters/leaves one or more region. -*/ + * check whether a monster enters/leaves one or more regions. + */ boolean m_in_out_region(mon, x, y) struct monst *mon; @@ -479,40 +485,44 @@ xchar x, y; { int i, f_indx; - /* First check if we can do the move */ + /* First check if mon can do the move */ for (i = 0; i < n_regions; i++) { - if (inside_region(regions[i], x, y) && !mon_in_region(regions[i], mon) - && regions[i]->attach_2_m != mon->m_id) { - if ((f_indx = regions[i]->can_enter_f) != NO_CALLBACK) - if (!(*callbacks[f_indx])(regions[i], mon)) - return FALSE; - } else if (mon_in_region(regions[i], mon) - && !inside_region(regions[i], x, y) - && regions[i]->attach_2_m != mon->m_id) { - if ((f_indx = regions[i]->can_leave_f) != NO_CALLBACK) - if (!(*callbacks[f_indx])(regions[i], mon)) - return FALSE; + if (regions[i]->attach_2_m == mon->m_id) + continue; + if (inside_region(regions[i], x, y) + ? (!mon_in_region(regions[i], mon) + && (f_indx = regions[i]->can_enter_f) != NO_CALLBACK) + : (mon_in_region(regions[i], mon) + && (f_indx = regions[i]->can_leave_f) != NO_CALLBACK)) { + if (!(*callbacks[f_indx])(regions[i], mon)) + return FALSE; } } - /* Callbacks for the regions we do leave */ - for (i = 0; i < n_regions; i++) + /* Callbacks for the regions mon does leave */ + for (i = 0; i < n_regions; i++) { + if (regions[i]->attach_2_m == mon->m_id) + continue; if (mon_in_region(regions[i], mon) - && regions[i]->attach_2_m != mon->m_id && !inside_region(regions[i], x, y)) { remove_mon_from_reg(regions[i], mon); if ((f_indx = regions[i]->leave_f) != NO_CALLBACK) (void) (*callbacks[f_indx])(regions[i], mon); } + } - /* Callbacks for the regions we do enter */ - for (i = 0; i < n_regions; i++) - if (!hero_inside(regions[i]) && !regions[i]->attach_2_u + /* Callbacks for the regions mon does enter */ + for (i = 0; i < n_regions; i++) { + if (regions[i]->attach_2_m == mon->m_id) + continue; + if (!mon_in_region(regions[i], mon) && inside_region(regions[i], x, y)) { add_mon_to_reg(regions[i], mon); if ((f_indx = regions[i]->enter_f) != NO_CALLBACK) (void) (*callbacks[f_indx])(regions[i], mon); } + } + return TRUE; } @@ -598,10 +608,12 @@ xchar x, y; { register int i; - for (i = 0; i < n_regions; i++) - if (inside_region(regions[i], x, y) && regions[i]->visible - && regions[i]->ttl != -2L) + for (i = 0; i < n_regions; i++) { + if (!regions[i]->visible || regions[i]->ttl == -2L) + continue; + if (inside_region(regions[i], x, y)) return regions[i]; + } return (NhRegion *) 0; } From 43e4100dd8cac189d0e0595a7504baa4cb7931b8 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 16 Nov 2019 12:05:05 -0800 Subject: [PATCH 243/529] partial fix for #H9430 - gas clouds vs monsters Don't show the gas cloud glyph at locations where monsters can be sensed (telepathy, warning, extended detection). It will work better when/if vision of gas cloud locations gets fixed. (Such clouds behave as the hero can see into them, so warning doesn't have any unseen monsters to show unless they're unseen for some reason other than the gas cloud.) --- src/display.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/display.c b/src/display.c index 7d948deae..e09e9ff45 100644 --- a/src/display.c +++ b/src/display.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 display.c $NHDT-Date: 1567213890 2019/08/31 01:11:30 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.106 $ */ +/* NetHack 3.6 display.c $NHDT-Date: 1573934698 2019/11/16 20:04:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.107 $ */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ @@ -762,12 +762,19 @@ register int x, y; */ lev->waslit = (lev->lit != 0); /* remember lit condition */ - /* normal region shown only on accessible positions, but poison clouds - * also shown above lava, pools and moats. + mon = m_at(x, y); + worm_tail = is_worm_tail(mon); + + /* + * Normal region shown only on accessible positions, but + * poison clouds also shown above lava, pools and moats. + * However, sensed monsters take precedence over all regions. */ - if (reg && (ACCESSIBLE(lev->typ) - || (reg->glyph == cmap_to_glyph(S_poisoncloud) - && is_pool_or_lava(x, y)))) { + if (reg + && (ACCESSIBLE(lev->typ) + || (reg->glyph == cmap_to_glyph(S_poisoncloud) + && is_pool_or_lava(x, y))) + && (!mon || worm_tail || !sensemon(mon))) { show_region(reg, x, y); return; } @@ -782,8 +789,6 @@ register int x, y; if (see_self) display_self(); } else { - mon = m_at(x, y); - worm_tail = is_worm_tail(mon); see_it = mon && (mon_visible(mon) || (!worm_tail && (tp_sensemon(mon) || MATCH_WARN_OF_MON(mon)))); From 2a50fb1845c5dc22a3405f895cf1e5920af1e727 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 16 Nov 2019 13:42:25 -0800 Subject: [PATCH 244/529] place_monster() debugging Show more information if place_monster() detects something wrong. I don't know whether it will actually be useful. --- include/extern.h | 3 ++- src/do_name.c | 38 +++++++++++++++++++++++++++++++++++++- src/steed.c | 16 ++++++++++------ 3 files changed, 49 insertions(+), 8 deletions(-) diff --git a/include/extern.h b/include/extern.h index d4a4b432d..0a2fa788d 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1573869062 2019/11/16 01:51:02 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.740 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1573940539 2019/11/16 21:42:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.741 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -450,6 +450,7 @@ E char *FDECL(Amonnam, (struct monst *)); E char *FDECL(a_monnam, (struct monst *)); E char *FDECL(distant_monnam, (struct monst *, int, char *)); E char *FDECL(mon_nam_too, (struct monst *, struct monst *)); +E char *FDECL(minimal_monnam, (struct monst *, BOOLEAN_P)); E char *FDECL(rndmonnam, (char *)); E const char *FDECL(hcolor, (const char *)); E const char *NDECL(rndcolor); diff --git a/src/do_name.c b/src/do_name.c index 999fe2055..c8965a706 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_name.c $NHDT-Date: 1560611967 2019/06/15 15:19:27 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.149 $ */ +/* NetHack 3.6 do_name.c $NHDT-Date: 1573940540 2019/11/16 21:42:20 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.150 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1978,6 +1978,42 @@ struct monst *mon, *other_mon; return outbuf; } +/* for debugging messages, where data might be suspect and we aren't + taking what the hero does or doesn't know into consideration */ +char * +minimal_monnam(mon, ckloc) +struct monst *mon; +boolean ckloc; +{ + struct permonst *ptr; + char *outbuf = nextmbuf(); + + if (!mon) { + Strcpy(outbuf, "[Null monster]"); + } else if ((ptr = mon->data) == 0) { + Strcpy(outbuf, "[Null mon->data]"); + } else if (ptr < &mons[0]) { + Sprintf(outbuf, "[Invalid mon->data %s < %s]", + fmt_ptr((genericptr_t) mon->data), + fmt_ptr((genericptr_t) &mons[0])); + } else if (ptr >= &mons[NUMMONS]) { + Sprintf(outbuf, "[Invalid mon->data %s >= %s]", + fmt_ptr((genericptr_t) mon->data), + fmt_ptr((genericptr_t) &mons[NUMMONS])); + } else if (ckloc && ptr == &mons[PM_LONG_WORM] + && level.monsters[mon->mx][mon->my] != mon) { + Sprintf(outbuf, "%s <%d,%d>", + mons[PM_LONG_WORM_TAIL].mname, mon->mx, mon->my); + } else { + Sprintf(outbuf, "%s%s <%d,%d>", + mon->mtame ? "tame " : mon->mpeaceful ? "peaceful " : "", + mon->data->mname, mon->mx, mon->my); + if (mon->cham != NON_PM) + Sprintf(eos(outbuf), "{%s}", mons[mon->cham].mname); + } + return outbuf; +} + /* fake monsters used to be in a hard-coded array, now in a data file */ STATIC_OVL char * bogusmon(buf, code) diff --git a/src/steed.c b/src/steed.c index c7540a28a..2f09e5896 100644 --- a/src/steed.c +++ b/src/steed.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 steed.c $NHDT-Date: 1559670610 2019/06/04 17:50:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.66 $ */ +/* NetHack 3.6 steed.c $NHDT-Date: 1573940541 2019/11/16 21:42:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.67 $ */ /* Copyright (c) Kevin Hugo, 1998-1999. */ /* NetHack may be freely redistributed. See license for details. */ @@ -742,6 +742,8 @@ place_monster(mon, x, y) struct monst *mon; int x, y; { + struct monst *othermon; + const char *monnm, *othnm; char buf[QBUFSZ]; buf[0] = '\0'; @@ -749,8 +751,8 @@ int x, y; vault guards (either living or dead) are parked at <0,0> */ if (!isok(x, y) && (x != 0 || y != 0 || !mon->isgd)) { describe_level(buf); - impossible("trying to place monster at <%d,%d> mstate:%lx on %s", - x, y, mon->mstate, buf); + impossible("trying to place %s at <%d,%d> mstate:%lx on %s", + minimal_monnam(mon, TRUE), x, y, mon->mstate, buf); x = y = 0; } if (mon == u.usteed @@ -762,10 +764,12 @@ int x, y; mon->mstate, buf); return; } - if (level.monsters[x][y]) { + if ((othermon = level.monsters[x][y]) != 0) { describe_level(buf); - impossible("placing monster over another at <%d,%d>, mstates:%lx %lx on %s?", - x, y, level.monsters[x][y]->mstate, mon->mstate, buf); + monnm = minimal_monnam(mon, FALSE); + othnm = (mon != othermon) ? minimal_monnam(othermon, TRUE) : "itself"; + impossible("placing %s over %s at <%d,%d>, mstates:%lx %lx on %s?", + monnm, othnm, x, y, othermon->mstate, mon->mstate, buf); } mon->mx = x, mon->my = y; level.monsters[x][y] = mon; From 145ba8ec12a97fec407eb2f2d41c52e678dabc55 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 16 Nov 2019 13:47:21 -0800 Subject: [PATCH 245/529] ball&chain reformatting This has been sitting around for a while. --- src/ball.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/ball.c b/src/ball.c index 9a309676a..c02e6d2f5 100644 --- a/src/ball.c +++ b/src/ball.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 ball.c $NHDT-Date: 1570566373 2019/10/08 20:26:13 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.43 $ */ +/* NetHack 3.6 ball.c $NHDT-Date: 1573940835 2019/11/16 21:47:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.44 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) David Cohrs, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -178,7 +178,7 @@ check_restriction(restriction) int restriction; { boolean ret = FALSE; - + if (!bcrestriction || (restriction == override_restriction)) ret = TRUE; else @@ -194,8 +194,7 @@ placebc() #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) char panicbuf[BUFSZ]; - Sprintf(panicbuf, - "placebc denied, restriction in effect"); + Sprintf(panicbuf, "placebc denied, restriction in effect"); paniclog("placebc", panicbuf); #endif return; @@ -239,10 +238,9 @@ int pin; #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) char panicbuf[BUFSZ]; - Sprintf(panicbuf, - "lift_covet_and_placebc denied, %s", - (pin != bcrestriction) ? - "pin mismatch" : "restriction in effect"); + Sprintf(panicbuf, "lift_covet_and_placebc denied, %s", + (pin != bcrestriction) ? "pin mismatch" + : "restriction in effect"); paniclog("placebc", panicbuf); #endif return; @@ -265,8 +263,7 @@ int linenum; #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) char panicbuf[BUFSZ]; - Sprintf(panicbuf, - "Placebc denied to %s:%d, restricted by %s:%d", + Sprintf(panicbuf, "Placebc denied to %s:%d, restricted by %s:%d", funcnm, linenum, bcpbreadcrumbs.funcnm, bcpbreadcrumbs.linenum); paniclog("Placebc", panicbuf); @@ -296,10 +293,9 @@ int linenum; if (bcrestriction) { char panicbuf[BUFSZ]; - Sprintf(panicbuf, - "Unplacebc from %s:%d, when restricted to %s:%d", - funcnm, linenum, - bcubreadcrumbs.funcnm, bcubreadcrumbs.linenum); + Sprintf(panicbuf, "Unplacebc from %s:%d, when restricted to %s:%d", + funcnm, linenum, + bcubreadcrumbs.funcnm, bcubreadcrumbs.linenum); paniclog("Unplacebc", panicbuf); } bcpbreadcrumbs.in_effect = FALSE; @@ -342,8 +338,8 @@ int linenum; #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) char panicbuf[BUFSZ]; - Sprintf(panicbuf, - "Lift_covet_and_placebc denied to %s:%d, restricted by %s:%d", + Sprintf(panicbuf, + "Lift_covet_and_placebc denied to %s:%d, restricted by %s:%d", funcnm, linenum, bcpbreadcrumbs.funcnm, bcpbreadcrumbs.linenum); paniclog("Lift_covet_and_placebc", panicbuf); From 2a079240631a724e2ff5e047d3fde002dac00ad4 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 16 Nov 2019 14:31:57 -0800 Subject: [PATCH 246/529] rename S_player_override to S_hero_override --- doc/Guidebook.mn | 8 ++++---- doc/Guidebook.tex | 6 +++--- doc/fixes36.3 | 3 ++- include/rm.h | 4 ++-- src/drawing.c | 4 ++-- src/mapglyph.c | 28 ++++++++++++++++------------ src/pager.c | 23 ++++++++++++----------- sys/unix/sysconf | 4 ++-- sys/winnt/sysconf.template | 2 +- 9 files changed, 44 insertions(+), 38 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index f3a8a9818..e61a2f78c 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.329 $ $NHDT-Date: 1573171723 2019/11/08 00:08:43 $ +.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.331 $ $NHDT-Date: 1573943499 2019/11/16 22:31:39 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -4615,7 +4615,7 @@ Y S_yeti (apelike creature) Z S_zombie (zombie) z S_zruty (zruty) \ S_pet_override (any pet if ACCESSIBILITY=1 is set) -\ S_player_override (hero if ACCESSIBILITY=1 is set) +\ S_hero_override (hero if ACCESSIBILITY=1 is set) .\"TABLE_END Do not delete this line. .TE .\" don't hyphenate file name across lines @@ -4625,7 +4625,7 @@ z S_zruty (zruty) .lp "*" Several symbols in this table appear to be blank. They are the space character, except for S_pet_override -and S_player_override which don't have any default value +and S_hero_override which don't have any default value and can only be used if enabled in the \(lqsysconf\(rq file. .lp "*" S_rock is misleadingly named; rocks and stones use S_gem. @@ -4677,7 +4677,7 @@ and \fBROGUESYMBOLS=\fP in your configuration file to better suit your preferences. See the previous section for the special symbols S_pet_override to force a consistent symbol for all pets and -S_player_override to force a unique symbol for the player character +S_hero_override to force a unique symbol for the player character if \fBaccessibility\fP is enabled in the sysconf file. .pg The most crucial settings to make the game more accessible are: diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 290373dae..4c42b06f1 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -5100,7 +5100,7 @@ Default & Symbol Name & Description\\ \verb@Z@ & S\verb+_+zombie & (zombie)\\ \verb@z@ & S\verb+_+zruty & (zruty)\\ \verb@ @ & S\verb+_+pet\verb+_+override & (any pet if ACCESSIBILITY=1 is set)\\ -\verb@ @ & S\verb+_+player\verb+_+override & (hero if ACCESSIBILITY=1 is set) +\verb@ @ & S\verb+_+hero\verb+_+override & (hero if ACCESSIBILITY=1 is set) \end{longtable}% } @@ -5111,7 +5111,7 @@ Notes: %.lp "*" Several symbols in this table appear to be blank. They are the space character, except for S\verb+_+pet\verb+_+override -and S\verb+_+player\verb+_+override which don't have any default value +and S\verb+_+hero\verb+_+override which don't have any default value and can only be used if enabled in the ``sysconf'' file. %.lp "*" @@ -5165,7 +5165,7 @@ and with editing files, you may want to alter settings via {\it SYMBOLS=\/} and {\it ROGUESYMBOLS=\/} in your configuration file to better suit your preferences. See the previous section for the special symbols S\verb+_+pet\verb+_+override -to force a consistent symbol for all pets and S\verb+_+player\verb+_+override +to force a consistent symbol for all pets and S\verb+_+hero\verb+_+override to force a unique symbol for the player character if {\it accessibility\/} is enabled in the {\it sysconf\/} file. diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 302dd0e0c..1b2caaebf 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.180 $ $NHDT-Date: 1573933605 2019/11/16 19:46:45 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.181 $ $NHDT-Date: 1573943506 2019/11/16 22:31:46 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -265,6 +265,7 @@ percentage highlighting for Xp broke up/down/changed highlighting for it; deaf change to zap_over_floor needed to be restricted to player actions only monster vs shade attack inflicted damage despite "passes harmlessly through" fix for feedback from musical instruments played while deaf ignored whistles +special map display symbol S_player_override renamed to S_hero_override curses: sometimes the message window would show a blank line after a prompt curses: the change to show map in columns 1..79 instead of 2..80 made the highlight for '@' show up in the wrong place if clipped map had been diff --git a/include/rm.h b/include/rm.h index 1d27c95e9..37b3fff7d 100644 --- a/include/rm.h +++ b/include/rm.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 rm.h $NHDT-Date: 1571347960 2019/10/17 21:32:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.64 $ */ +/* NetHack 3.6 rm.h $NHDT-Date: 1573943499 2019/11/16 22:31:39 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.66 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2017. */ /* NetHack may be freely redistributed. See license for details. */ @@ -267,7 +267,7 @@ struct symparse { #define SYM_BOULDER 0 #define SYM_INVISIBLE 1 #define SYM_PET_OVERRIDE 2 -#define SYM_PLAYER_OVERRIDE 3 +#define SYM_HERO_OVERRIDE 3 #define MAXOTHER 4 /* linked list of symsets and their characteristics */ diff --git a/src/drawing.c b/src/drawing.c index 91bd3d3b4..ca5283835 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 drawing.c $NHDT-Date: 1571347973 2019/10/17 21:32:53 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.62 $ */ +/* NetHack 3.6 drawing.c $NHDT-Date: 1573943500 2019/11/16 22:31:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.64 $ */ /* Copyright (c) NetHack Development Team 1992. */ /* NetHack may be freely redistributed. See license for details. */ @@ -817,7 +817,7 @@ struct symparse loadsyms[] = { { SYM_OTH, SYM_BOULDER + SYM_OFF_X, "S_boulder" }, { SYM_OTH, SYM_INVISIBLE + SYM_OFF_X, "S_invisible" }, { SYM_OTH, SYM_PET_OVERRIDE + SYM_OFF_X, "S_pet_override" }, - { SYM_OTH, SYM_PLAYER_OVERRIDE + SYM_OFF_X, "S_player_override" }, + { SYM_OTH, SYM_HERO_OVERRIDE + SYM_OFF_X, "S_hero_override" }, { 0, 0, (const char *) 0 } /* fence post */ }; diff --git a/src/mapglyph.c b/src/mapglyph.c index 6245a4847..d6a78bc22 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mapglyph.c $NHDT-Date: 1552945095 2019/03/18 21:38:15 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.48 $ */ +/* NetHack 3.6 mapglyph.c $NHDT-Date: 1573943501 2019/11/16 22:31:41 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.51 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -66,7 +66,7 @@ unsigned *ospecial; { register int offset, idx; int color = NO_COLOR; - nhsym ch, ovsym; + nhsym ch; unsigned special = 0; /* condense multiple tests in macro version down to single */ boolean has_rogue_ibm_graphics = HAS_ROGUE_IBM_GRAPHICS, @@ -224,16 +224,20 @@ unsigned *ospecial; /* These were requested by a blind player to enhance screen reader use */ if (sysopt.accessibility == 1) { - ovsym = Is_rogue_level(&u.uz) - ? ov_rogue_syms[SYM_PET_OVERRIDE + SYM_OFF_X] - : ov_primary_syms[SYM_PET_OVERRIDE + SYM_OFF_X]; - if (ovsym && (special & MG_PET)) - idx = SYM_PET_OVERRIDE + SYM_OFF_X; - ovsym = Is_rogue_level(&u.uz) - ? ov_rogue_syms[SYM_PLAYER_OVERRIDE + SYM_OFF_X] - : ov_primary_syms[SYM_PLAYER_OVERRIDE + SYM_OFF_X]; - if (ovsym && is_you) - idx = SYM_PLAYER_OVERRIDE + SYM_OFF_X; + int ovidx; + + if ((special & MG_PET) != 0) { + ovidx = SYM_PET_OVERRIDE + SYM_OFF_X; + if (Is_rogue_level(&u.uz) ? ov_rogue_syms[ovidx] + : ov_primary_syms[ovidx]) + idx = ovidx; + } + if (is_you) { + ovidx = SYM_HERO_OVERRIDE + SYM_OFF_X; + if (Is_rogue_level(&u.uz) ? ov_rogue_syms[ovidx] + : ov_primary_syms[ovidx]) + idx = ovidx; + } } ch = showsyms[idx]; diff --git a/src/pager.c b/src/pager.c index 531ca122b..647df5150 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pager.c $NHDT-Date: 1571531890 2019/10/20 00:38:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.157 $ */ +/* NetHack 3.6 pager.c $NHDT-Date: 1573943502 2019/11/16 22:31:42 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.159 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1053,27 +1053,27 @@ struct permonst **for_supplement; break; case SYM_PET_OVERRIDE + SYM_OFF_X: if (looked) { - int oc = 0; + int oc = 0, idx = SYM_PET_OVERRIDE + SYM_OFF_X; unsigned os = 0; nhsym save_override; if (Is_rogue_level(&u.uz)) { - save_override = ov_rogue_syms[SYM_PET_OVERRIDE + SYM_OFF_X]; - ov_rogue_syms[SYM_PET_OVERRIDE + SYM_OFF_X] = 0; + save_override = ov_rogue_syms[idx]; + ov_rogue_syms[idx] = 0; } else { - save_override = ov_primary_syms[SYM_PET_OVERRIDE + SYM_OFF_X]; - ov_primary_syms[SYM_PET_OVERRIDE + SYM_OFF_X] = 0; + save_override = ov_primary_syms[idx]; + ov_primary_syms[idx] = 0; } - /* convert to symbol without the override in effect */ + /* convert to symbol without override in effect */ (void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y); if (Is_rogue_level(&u.uz)) - ov_rogue_syms[SYM_PET_OVERRIDE + SYM_OFF_X] = save_override; + ov_rogue_syms[idx] = save_override; else - ov_primary_syms[SYM_PET_OVERRIDE + SYM_OFF_X] = save_override; + ov_primary_syms[idx] = save_override; goto check_monsters; } break; - case SYM_PLAYER_OVERRIDE + SYM_OFF_X: + case SYM_HERO_OVERRIDE + SYM_OFF_X: sym = showsyms[S_HUMAN + SYM_OFF_M]; goto check_monsters; } @@ -1081,7 +1081,8 @@ struct permonst **for_supplement; } #if 0 /* handle optional boulder symbol as a special case */ - if (o_syms[SYM_BOULDER + SYM_OFF_X] && sym == o_syms[SYM_BOULDER + SYM_OFF_X]) { + if (o_syms[SYM_BOULDER + SYM_OFF_X] + && sym == o_syms[SYM_BOULDER + SYM_OFF_X]) { if (!found) { *firstmatch = "boulder"; Sprintf(out_str, "%s%s", prefix, an(*firstmatch)); diff --git a/sys/unix/sysconf b/sys/unix/sysconf index 66df42c63..856d36b18 100644 --- a/sys/unix/sysconf +++ b/sys/unix/sysconf @@ -1,4 +1,4 @@ -# NetHack 3.6 sysconf $NHDT-Date: 1524689450 2018/04/25 20:50:50 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.27 $ +# NetHack 3.6 sysconf $NHDT-Date: 1573943504 2019/11/16 22:31:44 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.31 $ # Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland # NetHack may be freely redistributed. See license for details. # @@ -62,7 +62,7 @@ MAXPLAYERS=10 #SEDUCE=0 # Uncomment the next line to enable some accessibility features such -# as S_player_override and S_pet_override symbols for screen readers +# as S_hero_override and S_pet_override symbols for screen readers # in the user config file. #ACCESSIBILITY=1 diff --git a/sys/winnt/sysconf.template b/sys/winnt/sysconf.template index 058b29122..7971031bb 100644 --- a/sys/winnt/sysconf.template +++ b/sys/winnt/sysconf.template @@ -53,7 +53,7 @@ WIZARDS=* #SEDUCE=0 # Uncomment the next line to enable some accessibility features such -# as S_player_override and S_pet_override symbols for screen readers +# as S_hero_override and S_pet_override symbols for screen readers # in the user config file. #ACCESSIBILITY=1 From 0bc2cd281c3a1f65083eba2d5122d15b0fc9c7cf Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 16 Nov 2019 17:33:37 -0500 Subject: [PATCH 247/529] bad merge fix --- src/do_name.c | 245 ++++++++++++++++++++++++++++---------------------- 1 file changed, 138 insertions(+), 107 deletions(-) diff --git a/src/do_name.c b/src/do_name.c index 999fe2055..cb8d36215 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1,30 +1,30 @@ -/* NetHack 3.6 do_name.c $NHDT-Date: 1560611967 2019/06/15 15:19:27 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.149 $ */ +/* NetHack 3.6 do_name.c $NHDT-Date: 1573940540 2019/11/16 21:42:20 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.150 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2018. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -STATIC_DCL char *NDECL(nextmbuf); -STATIC_DCL void FDECL(getpos_help, (BOOLEAN_P, const char *)); -STATIC_DCL int FDECL(CFDECLSPEC cmp_coord_distu, (const void *, const void *)); -STATIC_DCL boolean FDECL(gather_locs_interesting, (int, int, int)); -STATIC_DCL void FDECL(gather_locs, (coord **, int *, int)); -STATIC_DCL int FDECL(gloc_filter_floodfill_matcharea, (int, int)); -STATIC_DCL void FDECL(auto_describe, (int, int)); -STATIC_DCL void NDECL(do_mname); -STATIC_DCL boolean FDECL(alreadynamed, (struct monst *, char *, char *)); -STATIC_DCL void FDECL(do_oname, (struct obj *)); -STATIC_PTR char *FDECL(docall_xname, (struct obj *)); -STATIC_DCL void NDECL(namefloorobj); -STATIC_DCL char *FDECL(bogusmon, (char *,char *)); +static char *NDECL(nextmbuf); +static void FDECL(getpos_help, (BOOLEAN_P, const char *)); +static int FDECL(CFDECLSPEC cmp_coord_distu, (const void *, const void *)); +static boolean FDECL(gather_locs_interesting, (int, int, int)); +static void FDECL(gather_locs, (coord **, int *, int)); +static int FDECL(gloc_filter_floodfill_matcharea, (int, int)); +static void FDECL(auto_describe, (int, int)); +static void NDECL(do_mname); +static boolean FDECL(alreadynamed, (struct monst *, char *, char *)); +static void FDECL(do_oname, (struct obj *)); +static char *FDECL(docall_xname, (struct obj *)); +static void NDECL(namefloorobj); +static char *FDECL(bogusmon, (char *,char *)); extern const char what_is_an_unknown_object[]; /* from pager.c */ #define NUMMBUF 5 /* manage a pool of BUFSZ buffers, so callers don't have to */ -STATIC_OVL char * +static char * nextmbuf() { static char NEARDATA bufs[NUMMBUF][BUFSZ]; @@ -87,7 +87,7 @@ int gloc; } /* the response for '?' help request in getpos() */ -STATIC_OVL void +static void getpos_help(force, goal) boolean force; const char *goal; @@ -100,7 +100,7 @@ const char *goal; Sprintf(sbuf, "Use '%c', '%c', '%c', '%c' to move the cursor to %s.", /* hjkl */ - Cmd.move_W, Cmd.move_S, Cmd.move_N, Cmd.move_E, goal); + g.Cmd.move_W, g.Cmd.move_S, g.Cmd.move_N, g.Cmd.move_E, goal); putstr(tmpwin, 0, sbuf); Sprintf(sbuf, "Use 'H', 'J', 'K', 'L' to fast-move the cursor, %s.", @@ -108,47 +108,47 @@ const char *goal; putstr(tmpwin, 0, sbuf); putstr(tmpwin, 0, "Or enter a background symbol (ex. '<')."); Sprintf(sbuf, "Use '%s' to move the cursor on yourself.", - visctrl(Cmd.spkeys[NHKF_GETPOS_SELF])); + visctrl(g.Cmd.spkeys[NHKF_GETPOS_SELF])); putstr(tmpwin, 0, sbuf); if (!iflags.terrainmode || (iflags.terrainmode & TER_MON) != 0) { getpos_help_keyxhelp(tmpwin, - visctrl(Cmd.spkeys[NHKF_GETPOS_MON_NEXT]), - visctrl(Cmd.spkeys[NHKF_GETPOS_MON_PREV]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_MON_NEXT]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_MON_PREV]), GLOC_MONS); } if (!iflags.terrainmode || (iflags.terrainmode & TER_OBJ) != 0) { getpos_help_keyxhelp(tmpwin, - visctrl(Cmd.spkeys[NHKF_GETPOS_OBJ_NEXT]), - visctrl(Cmd.spkeys[NHKF_GETPOS_OBJ_PREV]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_OBJ_NEXT]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_OBJ_PREV]), GLOC_OBJS); } if (!iflags.terrainmode || (iflags.terrainmode & TER_MAP) != 0) { /* these are primarily useful when choosing a travel destination for the '_' command */ getpos_help_keyxhelp(tmpwin, - visctrl(Cmd.spkeys[NHKF_GETPOS_DOOR_NEXT]), - visctrl(Cmd.spkeys[NHKF_GETPOS_DOOR_PREV]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_DOOR_NEXT]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_DOOR_PREV]), GLOC_DOOR); getpos_help_keyxhelp(tmpwin, - visctrl(Cmd.spkeys[NHKF_GETPOS_UNEX_NEXT]), - visctrl(Cmd.spkeys[NHKF_GETPOS_UNEX_PREV]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_UNEX_NEXT]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_UNEX_PREV]), GLOC_EXPLORE); getpos_help_keyxhelp(tmpwin, - visctrl(Cmd.spkeys[NHKF_GETPOS_INTERESTING_NEXT]), - visctrl(Cmd.spkeys[NHKF_GETPOS_INTERESTING_PREV]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_INTERESTING_NEXT]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_INTERESTING_PREV]), GLOC_INTERESTING); } Sprintf(sbuf, "Use '%s' to change fast-move mode to %s.", - visctrl(Cmd.spkeys[NHKF_GETPOS_MOVESKIP]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_MOVESKIP]), fastmovemode[!iflags.getloc_moveskip]); putstr(tmpwin, 0, sbuf); if (!iflags.terrainmode || (iflags.terrainmode & TER_DETECT) == 0) { Sprintf(sbuf, "Use '%s' to toggle menu listing for possible targets.", - visctrl(Cmd.spkeys[NHKF_GETPOS_MENU])); + visctrl(g.Cmd.spkeys[NHKF_GETPOS_MENU])); putstr(tmpwin, 0, sbuf); Sprintf(sbuf, "Use '%s' to change the mode of limiting possible targets.", - visctrl(Cmd.spkeys[NHKF_GETPOS_LIMITVIEW])); + visctrl(g.Cmd.spkeys[NHKF_GETPOS_LIMITVIEW])); putstr(tmpwin, 0, sbuf); } if (!iflags.terrainmode) { @@ -156,56 +156,56 @@ const char *goal; if (getpos_getvalid) { Sprintf(sbuf, "Use '%s' or '%s' to move to valid locations.", - visctrl(Cmd.spkeys[NHKF_GETPOS_VALID_NEXT]), - visctrl(Cmd.spkeys[NHKF_GETPOS_VALID_PREV])); + visctrl(g.Cmd.spkeys[NHKF_GETPOS_VALID_NEXT]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_VALID_PREV])); putstr(tmpwin, 0, sbuf); } if (getpos_hilitefunc) { Sprintf(sbuf, "Use '%s' to display valid locations.", - visctrl(Cmd.spkeys[NHKF_GETPOS_SHOWVALID])); + visctrl(g.Cmd.spkeys[NHKF_GETPOS_SHOWVALID])); putstr(tmpwin, 0, sbuf); } Sprintf(sbuf, "Use '%s' to toggle automatic description.", - visctrl(Cmd.spkeys[NHKF_GETPOS_AUTODESC])); + visctrl(g.Cmd.spkeys[NHKF_GETPOS_AUTODESC])); putstr(tmpwin, 0, sbuf); if (iflags.cmdassist) { /* assisting the '/' command, I suppose... */ Sprintf(sbuf, (iflags.getpos_coords == GPCOORDS_NONE) ? "(Set 'whatis_coord' option to include coordinates with '%s' text.)" : "(Reset 'whatis_coord' option to omit coordinates from '%s' text.)", - visctrl(Cmd.spkeys[NHKF_GETPOS_AUTODESC])); + visctrl(g.Cmd.spkeys[NHKF_GETPOS_AUTODESC])); } /* disgusting hack; the alternate selection characters work for any getpos call, but only matter for dowhatis (and doquickwhatis) */ doing_what_is = (goal == what_is_an_unknown_object); if (doing_what_is) { Sprintf(kbuf, "'%s' or '%s' or '%s' or '%s'", - visctrl(Cmd.spkeys[NHKF_GETPOS_PICK]), - visctrl(Cmd.spkeys[NHKF_GETPOS_PICK_Q]), - visctrl(Cmd.spkeys[NHKF_GETPOS_PICK_O]), - visctrl(Cmd.spkeys[NHKF_GETPOS_PICK_V])); + visctrl(g.Cmd.spkeys[NHKF_GETPOS_PICK]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_PICK_Q]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_PICK_O]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_PICK_V])); } else { - Sprintf(kbuf, "'%s'", visctrl(Cmd.spkeys[NHKF_GETPOS_PICK])); + Sprintf(kbuf, "'%s'", visctrl(g.Cmd.spkeys[NHKF_GETPOS_PICK])); } Sprintf(sbuf, "Type a %s when you are at the right place.", kbuf); putstr(tmpwin, 0, sbuf); if (doing_what_is) { Sprintf(sbuf, " '%s' describe current spot, show 'more info', move to another spot.", - visctrl(Cmd.spkeys[NHKF_GETPOS_PICK_V])); + visctrl(g.Cmd.spkeys[NHKF_GETPOS_PICK_V])); putstr(tmpwin, 0, sbuf); Sprintf(sbuf, " '%s' describe current spot,%s move to another spot;", - visctrl(Cmd.spkeys[NHKF_GETPOS_PICK]), + visctrl(g.Cmd.spkeys[NHKF_GETPOS_PICK]), flags.help ? " prompt if 'more info'," : ""); putstr(tmpwin, 0, sbuf); Sprintf(sbuf, " '%s' describe current spot, move to another spot;", - visctrl(Cmd.spkeys[NHKF_GETPOS_PICK_Q])); + visctrl(g.Cmd.spkeys[NHKF_GETPOS_PICK_Q])); putstr(tmpwin, 0, sbuf); Sprintf(sbuf, " '%s' describe current spot, stop looking at things;", - visctrl(Cmd.spkeys[NHKF_GETPOS_PICK_O])); + visctrl(g.Cmd.spkeys[NHKF_GETPOS_PICK_O])); putstr(tmpwin, 0, sbuf); } } @@ -216,7 +216,7 @@ const char *goal; destroy_nhwindow(tmpwin); } -STATIC_OVL int +static int cmp_coord_distu(a, b) const void *a; const void *b; @@ -244,13 +244,9 @@ const void *b; && glyph_to_cmap(levl[(x)][(y)].glyph) == S_stone \ && !levl[(x)][(y)].seenv) -static struct opvar *gloc_filter_map = (struct opvar *) 0; - #define GLOC_SAME_AREA(x,y) \ (isok((x), (y)) \ - && (selection_getpoint((x),(y), gloc_filter_map))) - -static int gloc_filter_floodfill_match_glyph; + && (selection_getpoint((x),(y), g.gloc_filter_map))) int gloc_filter_classify_glyph(glyph) @@ -276,7 +272,7 @@ int glyph; return 0; } -STATIC_OVL int +static int gloc_filter_floodfill_matcharea(x, y) int x, y; { @@ -285,11 +281,11 @@ int x, y; if (!levl[x][y].seenv) return FALSE; - if (glyph == gloc_filter_floodfill_match_glyph) + if (glyph == g.gloc_filter_floodfill_match_glyph) return TRUE; if (gloc_filter_classify_glyph(glyph) - == gloc_filter_classify_glyph(gloc_filter_floodfill_match_glyph)) + == gloc_filter_classify_glyph(g.gloc_filter_floodfill_match_glyph)) return TRUE; return FALSE; @@ -299,18 +295,18 @@ void gloc_filter_floodfill(x, y) int x, y; { - gloc_filter_floodfill_match_glyph = back_to_glyph(x, y); + g.gloc_filter_floodfill_match_glyph = back_to_glyph(x, y); set_selection_floodfillchk(gloc_filter_floodfill_matcharea); - selection_floodfill(gloc_filter_map, x, y, FALSE); + selection_floodfill(g.gloc_filter_map, x, y, FALSE); } void gloc_filter_init() { if (iflags.getloc_filter == GFILTER_AREA) { - if (!gloc_filter_map) { - gloc_filter_map = selection_opvar((char *) 0); + if (!g.gloc_filter_map) { + g.gloc_filter_map = selection_new(); } /* special case: if we're in a doorway, try to figure out which direction we're moving, and use that side of the doorway */ @@ -329,13 +325,14 @@ gloc_filter_init() void gloc_filter_done() { - if (gloc_filter_map) { - opvar_free_x(gloc_filter_map); - gloc_filter_map = (struct opvar *) 0; + if (g.gloc_filter_map) { + selection_free(g.gloc_filter_map); + g.gloc_filter_map = (struct selectionvar *) 0; + } } -STATIC_OVL boolean +static boolean gather_locs_interesting(x, y, gloc) int x, y, gloc; { @@ -407,7 +404,7 @@ int x, y, gloc; } /* gather locations for monsters or objects shown on the map */ -STATIC_OVL void +static void gather_locs(arr_p, cnt_p, gloc) coord **arr_p; int *cnt_p; @@ -534,7 +531,7 @@ char *outbuf, cmode; return outbuf; } -STATIC_OVL void +static void auto_describe(cx, cy) int cx, cy; { @@ -585,7 +582,7 @@ int gloc; tmpwin = create_nhwindow(NHW_MENU); start_menu(tmpwin); - any = zeroany; + any = cg.zeroany; /* gather_locs returns array[0] == you. skip it. */ for (i = 1; i < gcount; i++) { @@ -666,18 +663,18 @@ const char *goal; int gidx[NUM_GLOCS] = DUMMY; for (i = 0; i < SIZE(pick_chars_def); i++) - pick_chars[i] = Cmd.spkeys[pick_chars_def[i].nhkf]; + pick_chars[i] = g.Cmd.spkeys[pick_chars_def[i].nhkf]; pick_chars[SIZE(pick_chars_def)] = '\0'; for (i = 0; i < SIZE(mMoOdDxX_def); i++) - mMoOdDxX[i] = Cmd.spkeys[mMoOdDxX_def[i]]; + mMoOdDxX[i] = g.Cmd.spkeys[mMoOdDxX_def[i]]; mMoOdDxX[SIZE(mMoOdDxX_def)] = '\0'; if (!goal) goal = "desired location"; if (flags.verbose) { pline("(For instructions type a '%s')", - visctrl(Cmd.spkeys[NHKF_GETPOS_HELP])); + visctrl(g.Cmd.spkeys[NHKF_GETPOS_HELP])); msg_given = TRUE; } cx = ccp->x; @@ -712,7 +709,7 @@ const char *goal; if (iflags.autodescribe) msg_given = FALSE; - if (c == Cmd.spkeys[NHKF_ESC]) { + if (c == g.Cmd.spkeys[NHKF_ESC]) { cx = cy = -10; msg_given = TRUE; /* force clear */ result = -1; @@ -734,12 +731,12 @@ const char *goal; for (i = 0; i < 8; i++) { int dx, dy; - if (Cmd.dirchars[i] == c) { + if (g.Cmd.dirchars[i] == c) { /* a normal movement letter or digit */ dx = xdir[i]; dy = ydir[i]; - } else if (Cmd.alphadirchars[i] == lowc((char) c) - || (Cmd.num_pad && Cmd.dirchars[i] == (c & 0177))) { + } else if (g.Cmd.alphadirchars[i] == lowc((char) c) + || (g.Cmd.num_pad && g.Cmd.dirchars[i] == (c & 0177))) { /* a shifted movement letter or Meta-digit */ if (iflags.getloc_moveskip) { /* skip same glyphs */ @@ -782,15 +779,15 @@ const char *goal; goto nxtc; } - if (c == Cmd.spkeys[NHKF_GETPOS_HELP] || redraw_cmd(c)) { - if (c == Cmd.spkeys[NHKF_GETPOS_HELP]) + if (c == g.Cmd.spkeys[NHKF_GETPOS_HELP] || redraw_cmd(c)) { + if (c == g.Cmd.spkeys[NHKF_GETPOS_HELP]) getpos_help(force, goal); else /* ^R */ docrt(); /* redraw */ /* update message window to reflect that we're still targetting */ show_goal_msg = TRUE; msg_given = TRUE; - } else if (c == Cmd.spkeys[NHKF_GETPOS_SHOWVALID] + } else if (c == g.Cmd.spkeys[NHKF_GETPOS_SHOWVALID] && getpos_hilitefunc) { if (!hilite_state) { (*getpos_hilitefunc)(0); @@ -798,7 +795,7 @@ const char *goal; hilite_state = TRUE; } goto nxtc; - } else if (c == Cmd.spkeys[NHKF_GETPOS_AUTODESC]) { + } else if (c == g.Cmd.spkeys[NHKF_GETPOS_AUTODESC]) { iflags.autodescribe = !iflags.autodescribe; pline("Automatic description %sis %s.", flags.verbose ? "of features under cursor " : "", @@ -807,7 +804,7 @@ const char *goal; show_goal_msg = TRUE; msg_given = TRUE; goto nxtc; - } else if (c == Cmd.spkeys[NHKF_GETPOS_LIMITVIEW]) { + } else if (c == g.Cmd.spkeys[NHKF_GETPOS_LIMITVIEW]) { static const char *const view_filters[NUM_GFILTER] = { "Not limiting targets", "Limiting targets to those in sight", @@ -825,7 +822,7 @@ const char *goal; pline("%s.", view_filters[iflags.getloc_filter]); msg_given = TRUE; goto nxtc; - } else if (c == Cmd.spkeys[NHKF_GETPOS_MENU]) { + } else if (c == g.Cmd.spkeys[NHKF_GETPOS_MENU]) { iflags.getloc_usemenu = !iflags.getloc_usemenu; pline("%s a menu to show possible targets%s.", iflags.getloc_usemenu ? "Using" : "Not using", @@ -833,7 +830,7 @@ const char *goal; ? " for 'm|M', 'o|O', 'd|D', and 'x|X'" : ""); msg_given = TRUE; goto nxtc; - } else if (c == Cmd.spkeys[NHKF_GETPOS_SELF]) { + } else if (c == g.Cmd.spkeys[NHKF_GETPOS_SELF]) { /* reset 'm&M', 'o&O', &c; otherwise, there's no way for player to achieve that except by manually cycling through all spots */ for (i = 0; i < NUM_GLOCS; i++) @@ -841,7 +838,7 @@ const char *goal; cx = u.ux; cy = u.uy; goto nxtc; - } else if (c == Cmd.spkeys[NHKF_GETPOS_MOVESKIP]) { + } else if (c == g.Cmd.spkeys[NHKF_GETPOS_MOVESKIP]) { iflags.getloc_moveskip = !iflags.getloc_moveskip; pline("%skipping over similar terrain when fastmoving the cursor.", iflags.getloc_moveskip ? "S" : "Not s"); @@ -887,7 +884,7 @@ const char *goal; || glyph_to_cmap(k) == S_corr || glyph_to_cmap(k) == S_litcorr) continue; - if (c == defsyms[sidx].sym || c == (int) showsyms[sidx]) + if (c == defsyms[sidx].sym || c == (int) g.showsyms[sidx]) matching[sidx] = (char) ++k; } if (k) { @@ -908,7 +905,7 @@ const char *goal; goto foundc; /* next, try glyph that's remembered here (might be trap or object) */ - if (level.flags.hero_memory + if (g.level.flags.hero_memory /* !terrainmode: don't move to remembered trap or object if not currently shown */ && !iflags.terrainmode) { @@ -918,7 +915,7 @@ const char *goal; goto foundc; } /* last, try actual terrain here (shouldn't - we be using lastseentyp[][] instead?) */ + we be using g.lastseentyp[][] instead?) */ if (levl[tx][ty].seenv) { k = back_to_glyph(tx, ty); if (glyph_is_cmap(k) @@ -946,8 +943,8 @@ const char *goal; Strcpy(note, "aborted"); else /* hjkl */ Sprintf(note, "use '%c', '%c', '%c', '%c' or '%s'", - Cmd.move_W, Cmd.move_S, Cmd.move_N, Cmd.move_E, - visctrl(Cmd.spkeys[NHKF_GETPOS_PICK])); + g.Cmd.move_W, g.Cmd.move_S, g.Cmd.move_N, g.Cmd.move_E, + visctrl(g.Cmd.spkeys[NHKF_GETPOS_PICK])); pline("Unknown direction: '%s' (%s).", visctrl((char) c), note); msg_given = TRUE; @@ -1071,7 +1068,7 @@ const char *name; int lth; char buf[PL_PSIZ]; - /* dogname & catname are PL_PSIZ arrays; object names have same limit */ + /* g.dogname & g.catname are PL_PSIZ arrays; object names have same limit */ lth = (name && *name) ? ((int) strlen(name) + 1) : 0; if (lth > PL_PSIZ) { lth = PL_PSIZ; @@ -1086,7 +1083,7 @@ const char *name; /* check whether user-supplied name matches or nearly matches an unnameable monster's name; if so, give an alternate reject message for do_mname() */ -STATIC_OVL boolean +static boolean alreadynamed(mtmp, monnambuf, usrbuf) struct monst *mtmp; char *monnambuf, *usrbuf; @@ -1116,7 +1113,7 @@ char *monnambuf, *usrbuf; } /* allow player to assign a name to some chosen monster */ -STATIC_OVL void +static void do_mname() { char buf[BUFSZ], monnambuf[BUFSZ], qbuf[QBUFSZ]; @@ -1140,7 +1137,7 @@ do_mname() mtmp = u.usteed; } else { pline("This %s creature is called %s and cannot be renamed.", - beautiful(), plname); + beautiful(), g.plname); return; } } else @@ -1195,14 +1192,12 @@ do_mname() (void) christen_monst(mtmp, buf); } -STATIC_VAR int via_naming = 0; - /* * This routine used to change the address of 'obj' so be unsafe if not * used with extreme care. Applying a name to an object no longer * allocates a replacement object, so that old risk is gone. */ -STATIC_OVL +static void do_oname(obj) register struct obj *obj; @@ -1274,9 +1269,9 @@ register struct obj *obj; a valid artifact name */ u.uconduct.literate++; } - ++via_naming; /* This ought to be an argument rather than a static... */ + ++g.via_naming; /* This ought to be an argument rather than a static... */ obj = oname(obj, buf); - --via_naming; /* ...but oname() is used in a lot of places, so defer. */ + --g.via_naming; /* ...but oname() is used in a lot of places, so defer. */ } struct obj * @@ -1316,7 +1311,7 @@ const char *name; /* if obj is owned by a shop, increase your bill */ if (obj->unpaid) alter_cost(obj, 0L); - if (via_naming) { + if (g.via_naming) { /* violate illiteracy conduct since successfully wrote arti-name */ u.uconduct.literate++; } @@ -1354,11 +1349,11 @@ docallcmd() win = create_nhwindow(NHW_MENU); start_menu(win); - any = zeroany; + any = cg.zeroany; any.a_char = 'm'; /* group accelerator 'C' */ add_menu(win, NO_GLYPH, &any, abc ? 0 : any.a_char, 'C', ATR_NONE, "a monster", MENU_UNSELECTED); - if (invent) { + if (g.invent) { /* we use y and n as accelerators so that we can accept user's response keyed to old "name an individual object?" prompt */ any.a_char = 'i'; /* group accelerator 'y' */ @@ -1432,7 +1427,7 @@ docallcmd() } /* for use by safe_qbuf() */ -STATIC_PTR char * +static char * docall_xname(obj) struct obj *obj; { @@ -1512,7 +1507,7 @@ struct obj *obj; } } -STATIC_OVL void +static void namefloorobj() { coord cc; @@ -1526,7 +1521,7 @@ namefloorobj() been moved off the hero's '@' yet, but there's no way to adjust the help text once getpos() has started */ Sprintf(buf, "object on map (or '.' for one %s you)", - (u.uundetected && hides_under(youmonst.data)) ? "over" : "under"); + (u.uundetected && hides_under(g.youmonst.data)) ? "over" : "under"); if (getpos(&cc, FALSE, buf) < 0 || cc.x <= 0) return; if (cc.x == u.ux && cc.y == u.uy) { @@ -1557,9 +1552,9 @@ namefloorobj() char tmpbuf[BUFSZ]; /* straight role name */ - unames[0] = ((Upolyd ? u.mfemale : flags.female) && urole.name.f) - ? urole.name.f - : urole.name.m; + unames[0] = ((Upolyd ? u.mfemale : flags.female) && g.urole.name.f) + ? g.urole.name.f + : g.urole.name.m; /* random rank title for hero's role note: the 30 is hardcoded in xlev_to_rank, so should be @@ -1607,7 +1602,7 @@ static const char *const ghostnames[] = { const char * rndghostname() { - return rn2(7) ? ghostnames[rn2(SIZE(ghostnames))] : (const char *) plname; + return rn2(7) ? ghostnames[rn2(SIZE(ghostnames))] : (const char *) g.plname; } /* @@ -1657,7 +1652,7 @@ boolean called; boolean name_at_start, has_adjectives; char *bp; - if (program_state.gameover) + if (g.program_state.gameover) suppress |= SUPPRESS_HALLUCINATION; if (article == ARTICLE_YOUR && !mtmp->mtame) article = ARTICLE_THE; @@ -1665,7 +1660,7 @@ boolean called; do_hallu = Hallucination && !(suppress & SUPPRESS_HALLUCINATION); do_invis = mtmp->minvis && !(suppress & SUPPRESS_INVISIBLE); do_it = !canspotmon(mtmp) && article != ARTICLE_YOUR - && !program_state.gameover && mtmp != u.usteed + && !g.program_state.gameover && mtmp != u.usteed && !(u.uswallow && mtmp == u.ustuck) && !(suppress & SUPPRESS_IT); do_saddle = !(suppress & SUPPRESS_SADDLE); do_name = !(suppress & SUPPRESS_NAME) || type_is_pname(mdat); @@ -1978,8 +1973,44 @@ struct monst *mon, *other_mon; return outbuf; } +/* for debugging messages, where data might be suspect and we aren't + taking what the hero does or doesn't know into consideration */ +char * +minimal_monnam(mon, ckloc) +struct monst *mon; +boolean ckloc; +{ + struct permonst *ptr; + char *outbuf = nextmbuf(); + + if (!mon) { + Strcpy(outbuf, "[Null monster]"); + } else if ((ptr = mon->data) == 0) { + Strcpy(outbuf, "[Null mon->data]"); + } else if (ptr < &mons[0]) { + Sprintf(outbuf, "[Invalid mon->data %s < %s]", + fmt_ptr((genericptr_t) mon->data), + fmt_ptr((genericptr_t) &mons[0])); + } else if (ptr >= &mons[NUMMONS]) { + Sprintf(outbuf, "[Invalid mon->data %s >= %s]", + fmt_ptr((genericptr_t) mon->data), + fmt_ptr((genericptr_t) &mons[NUMMONS])); + } else if (ckloc && ptr == &mons[PM_LONG_WORM] + && g.level.monsters[mon->mx][mon->my] != mon) { + Sprintf(outbuf, "%s <%d,%d>", + mons[PM_LONG_WORM_TAIL].mname, mon->mx, mon->my); + } else { + Sprintf(outbuf, "%s%s <%d,%d>", + mon->mtame ? "tame " : mon->mpeaceful ? "peaceful " : "", + mon->data->mname, mon->mx, mon->my); + if (mon->cham != NON_PM) + Sprintf(eos(outbuf), "{%s}", mons[mon->cham].mname); + } + return outbuf; +} + /* fake monsters used to be in a hard-coded array, now in a data file */ -STATIC_OVL char * +static char * bogusmon(buf, code) char *buf, *code; { From 22980d81712c2639c4c477aae0e4196e44038e71 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 16 Nov 2019 18:31:30 -0800 Subject: [PATCH 248/529] gas cloud fix remove_region() calls newsym() when removing gas clouds, but when newsym() checked whether it was updating a gas cloud location it always got a false 'yes' because the region hadn't been removed yet. Fixing this didn't seem to make any observable difference so it must be followed fairly rapidly by a full vision recalc. --- src/region.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/region.c b/src/region.c index 9422de20c..fae8883ff 100644 --- a/src/region.c +++ b/src/region.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 region.c $NHDT-Date: 1573933605 2019/11/16 19:46:45 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.44 $ */ +/* NetHack 3.6 region.c $NHDT-Date: 1573957877 2019/11/17 02:31:17 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.45 $ */ /* Copyright (c) 1996 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -340,6 +340,11 @@ NhRegion *reg; if (i == n_regions) return; + /* remove region before potential newsym() calls, but don't free it yet */ + if (--n_regions != i) + regions[i] = regions[n_regions]; + regions[n_regions] = (NhRegion *) 0; + /* Update screen if necessary */ reg->ttl = -2L; /* for visible_region_at */ if (reg->visible) @@ -349,9 +354,6 @@ NhRegion *reg; newsym(x, y); free_region(reg); - regions[i] = regions[n_regions - 1]; - regions[n_regions - 1] = (NhRegion *) 0; - n_regions--; } /* From a364348098b054e615aad709d670896110282223 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 16 Nov 2019 22:49:36 -0500 Subject: [PATCH 249/529] add an mgflags parameter to mapglyph() to alter how it behaves internally avoid a recent save-value,call,restore-value kludge by adding an mgflags parameter to mapglyph() to control its behavior Changes to be committed: modified: doc/window.doc modified: include/extern.h modified: include/hack.h modified: src/detect.c modified: src/mapglyph.c modified: src/pager.c modified: sys/amiga/winfuncs.c modified: sys/wince/mhmap.c modified: win/Qt/qt_win.cpp modified: win/Qt4/qt4map.cpp modified: win/X11/winmap.c modified: win/curses/cursdial.c modified: win/curses/cursinvt.c modified: win/curses/cursmain.c modified: win/gem/wingem.c modified: win/tty/wintty.c modified: win/win32/mhmap.c modified: win/win32/mswproc.c --- doc/window.doc | 3 ++- include/extern.h | 2 +- include/hack.h | 4 ++++ src/detect.c | 2 +- src/mapglyph.c | 7 ++++--- src/pager.c | 17 +++-------------- sys/amiga/winfuncs.c | 2 +- sys/wince/mhmap.c | 2 +- win/Qt/qt_win.cpp | 2 +- win/Qt4/qt4map.cpp | 8 ++++---- win/X11/winmap.c | 2 +- win/curses/cursdial.c | 2 +- win/curses/cursinvt.c | 2 +- win/curses/cursmain.c | 2 +- win/gem/wingem.c | 2 +- win/tty/wintty.c | 2 +- win/win32/mhmap.c | 6 +++--- win/win32/mswproc.c | 2 +- 18 files changed, 32 insertions(+), 37 deletions(-) diff --git a/doc/window.doc b/doc/window.doc index 0b7cbf52f..da1790253 100644 --- a/doc/window.doc +++ b/doc/window.doc @@ -926,7 +926,8 @@ These are not part of the interface. They may be called by your window port routines to perform the desired task, instead of duplicating the necessary code in each window port. -int mapglyph(int glyph, int *ochar, int *ocolor, unsigned *special, int x, int y) +int mapglyph(int glyph, int *ochar, int *ocolor, unsigned *special, + int x, int y, unsigned mgflags) -- Maps glyph at x,y to NetHack ascii character and color. The return value is an index into the showsyms[] array, in case a port wants to index into its own alternative diff --git a/include/extern.h b/include/extern.h index 0a2fa788d..4316a6f62 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1209,7 +1209,7 @@ E boolean FDECL(usmellmon, (struct permonst *)); /* ### mapglyph.c ### */ -E int FDECL(mapglyph, (int, int *, int *, unsigned *, int, int)); +E int FDECL(mapglyph, (int, int *, int *, unsigned *, int, int, unsigned)); E char *FDECL(encglyph, (int)); E char *FDECL(decode_mixed, (char *, const char *)); E void FDECL(genl_putmixed, (winid, int, const char *)); diff --git a/include/hack.h b/include/hack.h index 5ba3bb9a0..b0e44dde6 100644 --- a/include/hack.h +++ b/include/hack.h @@ -69,6 +69,10 @@ enum dismount_types { DISMOUNT_BYCHOICE = 6 }; +/* mgflags for mapglyph() */ +#define MG_FLAG_NORMAL 0x00 +#define MG_FLAG_NOOVERRIDE 0x01 + /* Special returns from mapglyph() */ #define MG_CORPSE 0x01 #define MG_INVIS 0x02 diff --git a/src/detect.c b/src/detect.c index 0afaa9373..8ddf0a061 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1934,7 +1934,7 @@ dump_map() glyph = reveal_terrain_getglyph(x, y, FALSE, u.uswallow, default_glyph, subset); - (void) mapglyph(glyph, &ch, &color, &special, x, y); + (void) mapglyph(glyph, &ch, &color, &special, x, y, 0); buf[x - 1] = ch; if (ch != ' ') { blankrow = FALSE; diff --git a/src/mapglyph.c b/src/mapglyph.c index d6a78bc22..388e318a0 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -59,10 +59,11 @@ static const int explcolors[] = { /*ARGSUSED*/ int -mapglyph(glyph, ochar, ocolor, ospecial, x, y) +mapglyph(glyph, ochar, ocolor, ospecial, x, y, mgflags) int glyph, *ocolor, x, y; int *ochar; unsigned *ospecial; +unsigned mgflags; { register int offset, idx; int color = NO_COLOR; @@ -223,7 +224,7 @@ unsigned *ospecial; } /* These were requested by a blind player to enhance screen reader use */ - if (sysopt.accessibility == 1) { + if (sysopt.accessibility == 1 && !(mgflags & MG_FLAG_NOOVERRIDE)) { int ovidx; if ((special & MG_PET) != 0) { @@ -300,7 +301,7 @@ const char *str; gv = (gv * 16) + ((int) (dp - hex) / 2); else break; - so = mapglyph(gv, &ch, &oc, &os, 0, 0); + so = mapglyph(gv, &ch, &oc, &os, 0, 0, 0); *put++ = showsyms[so]; /* 'str' is ready for the next loop iteration and '*str' should not be copied at the end of this iteration */ diff --git a/src/pager.c b/src/pager.c index 647df5150..a7a3b2006 100644 --- a/src/pager.c +++ b/src/pager.c @@ -826,7 +826,7 @@ struct permonst **for_supplement; glyph = glyph_at(cc.x, cc.y); /* Convert glyph at selected position to a symbol for use below. */ - (void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y); + (void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y, 0); Sprintf(prefix, "%s ", encglyph(glyph)); } else @@ -1055,21 +1055,10 @@ struct permonst **for_supplement; if (looked) { int oc = 0, idx = SYM_PET_OVERRIDE + SYM_OFF_X; unsigned os = 0; - nhsym save_override; - if (Is_rogue_level(&u.uz)) { - save_override = ov_rogue_syms[idx]; - ov_rogue_syms[idx] = 0; - } else { - save_override = ov_primary_syms[idx]; - ov_primary_syms[idx] = 0; - } /* convert to symbol without override in effect */ - (void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y); - if (Is_rogue_level(&u.uz)) - ov_rogue_syms[idx] = save_override; - else - ov_primary_syms[idx] = save_override; + (void) mapglyph(glyph, &sym, &oc, &os, + cc.x, cc.y, MG_FLAG_NOOVERRIDE); goto check_monsters; } break; diff --git a/sys/amiga/winfuncs.c b/sys/amiga/winfuncs.c index 84838ed22..380954681 100644 --- a/sys/amiga/winfuncs.c +++ b/sys/amiga/winfuncs.c @@ -1978,7 +1978,7 @@ if(u.uz.dlevel != x){ } else /* AMII, or Rogue level in either version */ { /* map glyph to character and color */ - (void) mapglyph(glyph, &och, &color, &special, x, y); + (void) mapglyph(glyph, &och, &color, &special, x, y, 0); ch = (uchar) och; if (WINVERS_AMIV) { /* implies Rogue level here */ amii_curs(win, x, y); diff --git a/sys/wince/mhmap.c b/sys/wince/mhmap.c index 61a2b9f52..dbdbb5f0b 100644 --- a/sys/wince/mhmap.c +++ b/sys/wince/mhmap.c @@ -632,7 +632,7 @@ onPaint(HWND hWnd) #else /* rely on NetHack core helper routine */ (void) mapglyph(data->map[i][j], &mgch, &color, - &special, i, j); + &special, i, j, 0); ch = (char) mgch; if (((special & MG_PET) && iflags.hilite_pet) || ((special & MG_DETECT) diff --git a/win/Qt/qt_win.cpp b/win/Qt/qt_win.cpp index 28a68207a..ca2e59343 100644 --- a/win/Qt/qt_win.cpp +++ b/win/Qt/qt_win.cpp @@ -1688,7 +1688,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event) painter.setPen( green ); /* map glyph to character and color */ - (void)mapglyph(g, &och, &color, &special, i, j); + (void)mapglyph(g, &och, &color, &special, i, j, 0); ch = (uchar)och; #ifdef TEXTCOLOR painter.setPen( nhcolor_to_pen(color) ); diff --git a/win/Qt4/qt4map.cpp b/win/Qt4/qt4map.cpp index f3425bab2..00598e79b 100644 --- a/win/Qt4/qt4map.cpp +++ b/win/Qt4/qt4map.cpp @@ -137,7 +137,7 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event) painter.setPen( Qt::green ); /* map glyph to character and color */ - mapglyph(g, &ch, &color, &special, i, j); + mapglyph(g, &ch, &color, &special, i, j, 0); ch = cp437(ch); #ifdef TEXTCOLOR painter.setPen( nhcolor_to_pen(color) ); @@ -176,7 +176,7 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event) int color; int ch; unsigned special; - mapglyph(g, &ch, &color, &special, i, j); + mapglyph(g, &ch, &color, &special, i, j, 0); qt_settings->glyphs().drawCell(painter, g, i, j); #ifdef TEXTCOLOR if (((special & MG_PET) != 0) && ::iflags.hilite_pet) { @@ -829,7 +829,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event) painter.setPen( Qt::green ); /* map glyph to character and color */ - mapglyph(g, &ch, &color, &special, i, j); + mapglyph(g, &ch, &color, &special, i, j, 0); #ifdef TEXTCOLOR painter.setPen( nhcolor_to_pen(color) ); #endif @@ -859,7 +859,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event) int color; int ch; unsigned special; - mapglyph(g, &ch, &color, &special, i, j); + mapglyph(g, &ch, &color, &special, i, j, 0); qt_settings->glyphs().drawCell(painter, g, i, j); #ifdef TEXTCOLOR if (((special & MG_PET) != 0) && ::iflags.hilite_pet) { diff --git a/win/X11/winmap.c b/win/X11/winmap.c index 3d5ab1d99..b0eb620f8 100644 --- a/win/X11/winmap.c +++ b/win/X11/winmap.c @@ -107,7 +107,7 @@ int bkglyph UNUSED; #endif /* map glyph to character and color */ - (void) mapglyph(glyph, &och, &color, &special, x, y); + (void) mapglyph(glyph, &och, &color, &special, x, y, 0); ch = (uchar) och; if (special != map_info->tile_map.glyphs[y][x].special) { diff --git a/win/curses/cursdial.c b/win/curses/cursdial.c index 864b29687..7858ee618 100644 --- a/win/curses/cursdial.c +++ b/win/curses/cursdial.c @@ -1176,7 +1176,7 @@ menu_display_page(nhmenu *menu, WINDOW * win, int page_num, char *selectors) if (menu_item_ptr->glyph != NO_GLYPH && iflags.use_menu_glyphs) { unsigned special; /*notused */ - mapglyph(menu_item_ptr->glyph, &curletter, &color, &special, 0, 0); + mapglyph(menu_item_ptr->glyph, &curletter, &color, &special, 0, 0, 0); curses_toggle_color_attr(win, color, NONE, ON); mvwaddch(win, menu_item_ptr->line_num + 1, start_col, curletter); curses_toggle_color_attr(win, color, NONE, OFF); diff --git a/win/curses/cursinvt.c b/win/curses/cursinvt.c index c31effe48..64fd0197d 100644 --- a/win/curses/cursinvt.c +++ b/win/curses/cursinvt.c @@ -125,7 +125,7 @@ curses_add_inv(int y, int symbol = 0; attr_t glyphclr; - mapglyph(glyph, &symbol, &color, &dummy, u.ux, u.uy); + mapglyph(glyph, &symbol, &color, &dummy, u.ux, u.uy, 0); glyphclr = curses_color_attr(color, 0); wattron(win, glyphclr); wprintw(win, "%c ", symbol); diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index 6cf98fcb2..447255343 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -665,7 +665,7 @@ curses_print_glyph(winid wid, XCHAR_P x, XCHAR_P y, int glyph, int attr = -1; /* map glyph to character and color */ - mapglyph(glyph, &ch, &color, &special, x, y); + mapglyph(glyph, &ch, &color, &special, x, y, 0); if ((special & MG_PET) && iflags.hilite_pet) { attr = iflags.wc2_petattr; } diff --git a/win/gem/wingem.c b/win/gem/wingem.c index 09567cda6..a83c7760f 100644 --- a/win/gem/wingem.c +++ b/win/gem/wingem.c @@ -930,7 +930,7 @@ int glyph; unsigned special; /* map glyph to character and color */ - (void) mapglyph(glyph, &ch, &color, &special, x, y); + (void) mapglyph(glyph, &ch, &color, &special, x, y, 0); #ifdef TEXTCOLOR /* Turn off color if rogue level. */ diff --git a/win/tty/wintty.c b/win/tty/wintty.c index c4deaa151..7c95bfc3f 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -3378,7 +3378,7 @@ int bkglyph UNUSED; } #endif /* map glyph to character and color */ - (void) mapglyph(glyph, &ch, &color, &special, x, y); + (void) mapglyph(glyph, &ch, &color, &special, x, y, 0); print_vt_code2(AVTC_SELECT_WINDOW, window); diff --git a/win/win32/mhmap.c b/win/win32/mhmap.c index 18bca2571..fdd7b3a33 100644 --- a/win/win32/mhmap.c +++ b/win/win32/mhmap.c @@ -710,7 +710,7 @@ onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) mgch = ' '; } else { (void) mapglyph(data->map[col][row], &mgch, &color, - &special, col, row); + &special, col, row, 0); } msg_data->buffer[index] = mgch; index++; @@ -824,7 +824,7 @@ paintTile(PNHMapWindow data, int i, int j, RECT * rect) #ifdef USE_PILEMARK /* rely on NetHack core helper routine */ (void) mapglyph(data->map[i][j], &mgch, &color, &special, - i, j); + i, j, 0); if ((glyph != NO_GLYPH) && (special & MG_PET) #else if ((glyph != NO_GLYPH) && glyph_is_pet(glyph) @@ -899,7 +899,7 @@ paintGlyph(PNHMapWindow data, int i, int j, RECT * rect) #else /* rely on NetHack core helper routine */ (void) mapglyph(data->map[i][j], &mgch, &color, - &special, i, j); + &special, i, j, 0); ch = (char) mgch; if (((special & MG_PET) && iflags.hilite_pet) || ((special & (MG_DETECT | MG_BW_LAVA)) diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 38b4b0b29..65a729891 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -3091,7 +3091,7 @@ mswin_status_update(int idx, genericptr_t ptr, int chg, int percent, int color, ochar = GOLD_SYM; else mapglyph(objnum_to_glyph(GOLD_PIECE), - &ochar, &ocolor, &ospecial, 0, 0); + &ochar, &ocolor, &ospecial, 0, 0, 0); buf[0] = ochar; p = strchr(text, ':'); if (p) { From 21e4595127b2cde566f9c730e1bf8c04ce127e07 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 17 Nov 2019 00:16:02 -0500 Subject: [PATCH 250/529] sysconf template for windows --- sys/winnt/sysconf.template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/winnt/sysconf.template b/sys/winnt/sysconf.template index 7971031bb..d77b114a3 100644 --- a/sys/winnt/sysconf.template +++ b/sys/winnt/sysconf.template @@ -78,20 +78,20 @@ WIZARDS=* # point at must exist. NetHack will not create them for you. # # The location that users can adjust their config file startup options -#CONFIGDIR=c:\User\USERNAME\NetHack +#CONFIGDIR=%USERPROFILE%\NetHack # # The location that a record of game aborts and self-diagnosed game problems # is kept (default=HACKDIR, writeable) -#TROUBLEDIR=c:\User\USERNAME\NetHack\3.6 +#TROUBLEDIR=%USERPROFILE%\NetHack\3.6 # # The location that documentation and helps files are placed -#HACKDIR=c:\User\USERNAME\NetHack\3.6 +#HACKDIR=%USERPROFILE%\NetHack\3.6 # # The location that level files in progress are stored (writeable) -#LEVELDIR=c:\User\USERNAME\AppData\Local\NetHack\3.6 +LEVELDIR=%USERPROFILE%\AppData\Local\NetHack\3.6 # # The location where saved games are kept (writeable) -#SAVEDIR=c:\User\USERNAME\AppData\Local\NetHack\3.6 +#SAVEDIR=%USERPROFILE%\AppData\Local\NetHack\3.6 # # The location that bones files are kept (writeable) #BONESDIR=c:\ProgramData\NetHack\3.6 From cc5ecbcb56c42e6ad7b642c4871cdc90e95bbc9a Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 17 Nov 2019 00:19:33 -0500 Subject: [PATCH 251/529] Merge NetHack-3.6 --- sys/winnt/sysconf.template | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/winnt/sysconf.template b/sys/winnt/sysconf.template index d77b114a3..42240edc3 100644 --- a/sys/winnt/sysconf.template +++ b/sys/winnt/sysconf.template @@ -1,5 +1,5 @@ # -# NetHack 3.6 sysconf $NHDT-Date: 1524689357 2018/04/25 20:49:17 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.22 $ +# NetHack 3.7 sysconf $NHDT-Date: 1524689357 2018/04/25 20:49:17 $ $NHDT-Branch: NetHack-3.7.0 $:$NHDT-Revision: 1.22 $ # Copyright (c) 2015 by Michael Allison # NetHack may be freely redistributed. See license for details. # @@ -24,7 +24,7 @@ WIZARDS=* # Only available if NetHack was compiled with DUMPLOG # Allows following placeholders: # %% literal '%' -# %v version (eg. "3.6.2-0") +# %v version (eg. "3.7.0-0") # %u game UID # %t game start time, UNIX timestamp format # %T current time, UNIX timestamp format @@ -82,22 +82,22 @@ WIZARDS=* # # The location that a record of game aborts and self-diagnosed game problems # is kept (default=HACKDIR, writeable) -#TROUBLEDIR=%USERPROFILE%\NetHack\3.6 +#TROUBLEDIR=%USERPROFILE%\NetHack\3.7 # # The location that documentation and helps files are placed -#HACKDIR=%USERPROFILE%\NetHack\3.6 +#HACKDIR=%USERPROFILE%\NetHack\3.7 # # The location that level files in progress are stored (writeable) -LEVELDIR=%USERPROFILE%\AppData\Local\NetHack\3.6 +LEVELDIR=%USERPROFILE%\AppData\Local\NetHack\3.7 # # The location where saved games are kept (writeable) -#SAVEDIR=%USERPROFILE%\AppData\Local\NetHack\3.6 +#SAVEDIR=%USERPROFILE%\AppData\Local\NetHack\3.7 # # The location that bones files are kept (writeable) -#BONESDIR=c:\ProgramData\NetHack\3.6 +#BONESDIR=c:\ProgramData\NetHack\3.7 # # The location that score files are kept (writeable) -#SCOREDIR=c:\ProgramData\NetHack\3.6 +#SCOREDIR=c:\ProgramData\NetHack\3.7 # # The location that file synchronization locks are stored (writeable) -#LOCKDIR=c:\ProgramData\NetHack\3.6 +#LOCKDIR=c:\ProgramData\NetHack\3.7 From 9ea7b074fe89f9252618e97dad5e472cf9c6527e Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 17 Nov 2019 09:25:26 -0800 Subject: [PATCH 252/529] pager warning fix and formatting The mapglyph() change made a variable obsolete but it got left in (idx = SYM_PET_OVERRIDE...). Take it out and fix up the formatting for the block of code that had it. --- src/pager.c | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/src/pager.c b/src/pager.c index a7a3b2006..77cff068b 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pager.c $NHDT-Date: 1573943502 2019/11/16 22:31:42 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.159 $ */ +/* NetHack 3.6 pager.c $NHDT-Date: 1574011494 2019/11/17 17:24:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.161 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1039,32 +1039,33 @@ struct permonst **for_supplement; for (j = SYM_OFF_X; j < SYM_MAX; ++j) { if (j == (SYM_INVISIBLE + SYM_OFF_X)) continue; /* already handled above */ - tmpsym = Is_rogue_level(&u.uz) ? ov_rogue_syms[j] : ov_primary_syms[j]; + tmpsym = Is_rogue_level(&u.uz) ? ov_rogue_syms[j] + : ov_primary_syms[j]; if (tmpsym && sym == tmpsym) { - switch(j) { - case SYM_BOULDER + SYM_OFF_X: - if (!found) { - *firstmatch = "boulder"; - Sprintf(out_str, "%s%s", prefix, an(*firstmatch)); - found++; - } else { - found += append_str(out_str, "boulder"); - } - break; - case SYM_PET_OVERRIDE + SYM_OFF_X: - if (looked) { - int oc = 0, idx = SYM_PET_OVERRIDE + SYM_OFF_X; - unsigned os = 0; + switch (j) { + case SYM_BOULDER + SYM_OFF_X: + if (!found) { + *firstmatch = "boulder"; + Sprintf(out_str, "%s%s", prefix, an(*firstmatch)); + found++; + } else { + found += append_str(out_str, "boulder"); + } + break; + case SYM_PET_OVERRIDE + SYM_OFF_X: + if (looked) { + int oc = 0; + unsigned os = 0; - /* convert to symbol without override in effect */ - (void) mapglyph(glyph, &sym, &oc, &os, - cc.x, cc.y, MG_FLAG_NOOVERRIDE); - goto check_monsters; - } - break; - case SYM_HERO_OVERRIDE + SYM_OFF_X: - sym = showsyms[S_HUMAN + SYM_OFF_M]; - goto check_monsters; + /* convert to symbol without override in effect */ + (void) mapglyph(glyph, &sym, &oc, &os, + cc.x, cc.y, MG_FLAG_NOOVERRIDE); + goto check_monsters; + } + break; + case SYM_HERO_OVERRIDE + SYM_OFF_X: + sym = showsyms[S_HUMAN + SYM_OFF_M]; + goto check_monsters; } } } From e32a132a7c29ef2acfa4330a893d955b2eadd08b Mon Sep 17 00:00:00 2001 From: keni Date: Sun, 17 Nov 2019 18:41:03 -0500 Subject: [PATCH 253/529] grammar tid --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b93ed982c..e2522cfa9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -114,5 +114,5 @@ deploy: tags: true prerelease: true name: "Pre-release build of NetHack 3.6.3" - body: "This is auto generated pre-release build of NetHack 3.6.3." + body: "This is an auto generated pre-release build of NetHack 3.6.3." From 57584a22d7eb05adcde0422252d56f350d73019c Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 17 Nov 2019 19:13:23 -0500 Subject: [PATCH 254/529] add some guard code to the Is_*_level macros in dungeon.h All Is_*_level tests during early startup would test as true until dungeon_topology was initialized in a new game or restored from a save file. That could result in some unexpected code paths being taken. --- doc/fixes36.3 | 3 +++ include/dungeon.h | 55 ++++++++++++++++++++++++++--------------------- 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 1b2caaebf..16ab5de31 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -235,6 +235,9 @@ dipping lichen corpse into acid when not blind and acid was undicovered would pluralization improvement for words ending in a k-sound like "biotech" check for whether a monster was entering a region (gas cloud) erroneously depended upon whether or not the hero was inside the same region +all Is_*_level tests during early startup would test as true until + dungeon_topology was initialized in a new game or restored from + a save file Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/include/dungeon.h b/include/dungeon.h index 45246f150..1d476ff7a 100644 --- a/include/dungeon.h +++ b/include/dungeon.h @@ -98,31 +98,36 @@ typedef struct branch { * * Depth corresponds to the number of floors below the surface. */ -#define Is_astralevel(x) (on_level(x, &astral_level)) -#define Is_earthlevel(x) (on_level(x, &earth_level)) -#define Is_waterlevel(x) (on_level(x, &water_level)) -#define Is_firelevel(x) (on_level(x, &fire_level)) -#define Is_airlevel(x) (on_level(x, &air_level)) -#define Is_medusa_level(x) (on_level(x, &medusa_level)) -#define Is_oracle_level(x) (on_level(x, &oracle_level)) -#define Is_valley(x) (on_level(x, &valley_level)) -#define Is_juiblex_level(x) (on_level(x, &juiblex_level)) -#define Is_asmo_level(x) (on_level(x, &asmodeus_level)) -#define Is_baal_level(x) (on_level(x, &baalzebub_level)) -#define Is_wiz1_level(x) (on_level(x, &wiz1_level)) -#define Is_wiz2_level(x) (on_level(x, &wiz2_level)) -#define Is_wiz3_level(x) (on_level(x, &wiz3_level)) -#define Is_sanctum(x) (on_level(x, &sanctum_level)) -#define Is_portal_level(x) (on_level(x, &portal_level)) -#define Is_rogue_level(x) (on_level(x, &rogue_level)) -#define Is_stronghold(x) (on_level(x, &stronghold_level)) -#define Is_bigroom(x) (on_level(x, &bigroom_level)) -#define Is_qstart(x) (on_level(x, &qstart_level)) -#define Is_qlocate(x) (on_level(x, &qlocate_level)) -#define Is_nemesis(x) (on_level(x, &nemesis_level)) -#define Is_knox(x) (on_level(x, &knox_level)) -#define Is_mineend_level(x) (on_level(x, &mineend_level)) -#define Is_sokoend_level(x) (on_level(x, &sokoend_level)) + +/* These both can't be zero, or dungeon_topology isn't init'd / restored */ +#define Lassigned(y) ((y)->dlevel || (y)->dnum) +#define Lcheck(x,z) (Lassigned(z) && on_level(x, z)) + +#define Is_astralevel(x) (Lcheck(x, &astral_level)) +#define Is_earthlevel(x) (Lcheck(x, &earth_level)) +#define Is_waterlevel(x) (Lcheck(x, &water_level)) +#define Is_firelevel(x) (Lcheck(x, &fire_level)) +#define Is_airlevel(x) (Lcheck(x, &air_level)) +#define Is_medusa_level(x) (Lcheck(x, &medusa_level)) +#define Is_oracle_level(x) (Lcheck(x, &oracle_level)) +#define Is_valley(x) (Lcheck(x, &valley_level)) +#define Is_juiblex_level(x) (Lcheck(x, &juiblex_level)) +#define Is_asmo_level(x) (Lcheck(x, &asmodeus_level)) +#define Is_baal_level(x) (Lcheck(x, &baalzebub_level)) +#define Is_wiz1_level(x) (Lcheck(x, &wiz1_level)) +#define Is_wiz2_level(x) (Lcheck(x, &wiz2_level)) +#define Is_wiz3_level(x) (Lcheck(x, &wiz3_level)) +#define Is_sanctum(x) (Lcheck(x, &sanctum_level)) +#define Is_portal_level(x) (Lcheck(x, &portal_level)) +#define Is_rogue_level(x) (Lcheck(x, &rogue_level)) +#define Is_stronghold(x) (Lcheck(x, &stronghold_level)) +#define Is_bigroom(x) (Lcheck(x, &bigroom_level)) +#define Is_qstart(x) (Lcheck(x, &qstart_level)) +#define Is_qlocate(x) (Lcheck(x, &qlocate_level)) +#define Is_nemesis(x) (Lcheck(x, &nemesis_level)) +#define Is_knox(x) (Lcheck(x, &knox_level)) +#define Is_mineend_level(x) (Lcheck(x, &mineend_level)) +#define Is_sokoend_level(x) (Lcheck(x, &sokoend_level)) #define In_sokoban(x) ((x)->dnum == sokoban_dnum) #define Inhell In_hell(&u.uz) /* now gehennom */ From 1301e3bd764fb771d1d0af21e570751be874892f Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 17 Nov 2019 16:45:10 -0800 Subject: [PATCH 255/529] '--showpaths' dlb vs non-dlbb Have the --showpaths feedback mention whether dlb is in use or not, and show the container file name(s) when it is. Users of prebuilt binaries or who build with a hints file instead of picking and choosing things in config.h might not know, and vms (if it ever catches up with --showpaths) uses a different container name from everybody else ("nh-data.dlb" instead of "nhdat"). --- src/files.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/files.c b/src/files.c index 5a0e1a7b2..a9bee528a 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 files.c $NHDT-Date: 1573869063 2019/11/16 01:51:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.269 $ */ +/* NetHack 3.6 files.c $NHDT-Date: 1574037901 2019/11/18 00:45:01 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.270 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2598,8 +2598,8 @@ char *origbuf; #endif /* SYSCF */ } else if (match_varname(buf, "BOULDER", 3)) { - (void) get_uchars(bufp, &ov_primary_syms[SYM_BOULDER + SYM_OFF_X], TRUE, 1, - "BOULDER"); + (void) get_uchars(bufp, &ov_primary_syms[SYM_BOULDER + SYM_OFF_X], + TRUE, 1, "BOULDER"); } else if (match_varname(buf, "MENUCOLOR", 9)) { if (!add_menu_coloring(bufp)) retval = FALSE; @@ -4062,13 +4062,13 @@ reveal_paths(VOID_ARGS) if (strp && (int) strlen(strp) < maxlen) Sprintf(buf, " (in %s)", strp); #endif /* PREFIXES_IN_USE */ - raw_printf("%s loadable symbols file%s:", s_suffix(gamename), buf); + raw_printf("The loadable symbols file%s:", buf); #endif /* UNIX */ #ifdef UNIX envp = getcwd(cwdbuf, PATH_MAX); if (envp) { - raw_printf("%s loadable symbols file:", s_suffix(gamename)); + raw_print("The loadable symbols file:"); raw_printf(" \"%s/%s\"", envp, SYMBOLS); } #else /* UNIX */ @@ -4085,6 +4085,27 @@ reveal_paths(VOID_ARGS) raw_printf(" \"%s\"", filep); #endif /* UNIX */ + /* dlb vs non-dlb */ + + buf[0] = '\0'; +#ifdef PREFIXES_IN_USE + strp = fqn_prefix_names[DATAPREFIX]; + maxlen = BUFSZ - sizeof " (in )"; + if (strp && (int) strlen(strp) < maxlen) + Sprintf(buf, " (in %s)", strp); +#endif +#ifdef DLB + raw_printf("Basic data files%s are collected inside:", buf); + filep = DLBFILE; + raw_printf(" \"%s\"", filep); +#ifdef DLBFILE2 + filep = DLBFILE2; + raw_printf(" \"%s\"", filep); +#endif +#else /* !DLB */ + raw_printf("Basic data files%s are in many separate files.", buf); +#endif /* ?DLB */ + /* personal configuration file */ buf[0] = '\0'; From f75939e27e0728f73a30ecf1623cff8faa3226c6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 17 Nov 2019 19:55:50 -0500 Subject: [PATCH 256/529] re-enable ifdef'd out code during code sleuthing a while back --- src/options.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/options.c b/src/options.c index c1c95c69e..ecb0d773b 100644 --- a/src/options.c +++ b/src/options.c @@ -4134,14 +4134,12 @@ boolean tinitial, tfrom_file; } } -#if 0 /* Is it a symbol? */ if (strstr(opts, "S_") == opts && parsesymbols(opts, PRIMARY)) { switch_symbols(TRUE); check_gold_symbol(); return retval; } -#endif /* out of valid options */ config_error_add("Unknown option '%s'", opts); From e85646816cec5ae749bb564f0617425c6dead620 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 17 Nov 2019 20:06:21 -0500 Subject: [PATCH 257/529] mark source tree as beta, previously marked work-in-progress --- README | 6 +++--- include/global.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README b/README index a8746c435..013a63153 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ - NetHack 3.6.3 work-in-progress -- General information + NetHack 3.6.3 beta1 -- General information NetHack 3.6 is an enhancement to the dungeon exploration game NetHack, which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.4 as there was no NetHack 3.5 release. -NetHack 3.6.3 work-in-progress is not an official release of NetHack. It -currently contains a collection of over 140 bug fixes to NetHack 3.6.2 +NetHack 3.6.3 beta1 is not an official release of NetHack. It +currently contains a collection of over 150 bug fixes to NetHack 3.6.2 and more than 16 enhancements and community contributions. The file doc/fixes36.3 in the source distribution has a full list of them. The text in there was written for the development team's own use and is diff --git a/include/global.h b/include/global.h index feb9f75fb..9fb64ebf0 100644 --- a/include/global.h +++ b/include/global.h @@ -18,7 +18,7 @@ /* * Development status of this NetHack version. */ -#define NH_DEVEL_STATUS NH_STATUS_WIP +#define NH_DEVEL_STATUS NH_STATUS_BETA #ifndef DEBUG /* allow tool chains to define without causing warnings */ #define DEBUG From a045763f560d55592b322ce019b08f4d387b5c4c Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 17 Nov 2019 20:19:41 -0500 Subject: [PATCH 258/529] date bump --- doc/Guidebook.mn | 2 +- doc/Guidebook.tex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index e61a2f78c..c039e3bba 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "November 7, 2019 +.ds f2 "November 17, 2019 . .\" A note on some special characters: .\" \(lq = left double quote diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 4c42b06f1..4c0edfabc 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{November 7, 2019} +\date{November 17, 2019} \maketitle From 8a6ce7d7eff94e8fc26d49edf809729ee7efc2f9 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Sun, 17 Nov 2019 20:23:28 -0500 Subject: [PATCH 259/529] This is cron-daily v1-Oct-31-2019. files updated: Files --- Files | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Files b/Files index dc18600ed..3e137d1fe 100644 --- a/Files +++ b/Files @@ -143,11 +143,13 @@ mttymain.c sys/msdos: (files for MSDOS version - untested for 3.6.2) -Install.dos Makefile.BC Makefile.GCC Makefile.MSC SCHEMA35.MSC -moveinit.pat msdos.c msdoshlp.txt ovlinit.c pckeys.c -pctiles.c pctiles.h pcvideo.h portio.h schema1.BC -schema2.BC schema3.MSC setup.bat sound.c tile2bin.c -vesa.h video.c vidtxt.c vidvesa.c vidvga.c +Install.dos Makefile.BC Makefile.GCC Makefile.MSC +Makefile1.cross Makefile2.cross SCHEMA35.MSC moveinit.pat +msdos.c msdoshlp.txt ovlinit.c pckeys.c +pctiles.c pctiles.h pcvideo.h portio.h +schema1.BC schema2.BC schema3.MSC setup.bat +sound.c tile2bin.c vesa.h video.c +vidtxt.c vidvesa.c vidvga.c (files for running MSDOS binary under Windows) nhico.uu nhpif.uu From 32e61f7dd285b86e316e71c7d03c2433f8c143b6 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Sun, 17 Nov 2019 20:23:20 -0500 Subject: [PATCH 260/529] This is cron-daily v1-Oct-31-2019. guidebook updated: doc/Guidebook.txt --- doc/Guidebook.txt | 912 +++++++++++++++++++++++----------------------- 1 file changed, 456 insertions(+), 456 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index 595c02aae..d8a3bc93d 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -126,7 +126,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -192,7 +192,7 @@ you have seen on the current dungeon level; as you explore more - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -258,7 +258,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -324,7 +324,7 @@ Intelligence affects your ability to cast spells and read - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -456,7 +456,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -588,7 +588,7 @@ symbol at the chosen location, conditionally check for "More - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -605,7 +605,7 @@ and also not bother asking you to choose another location to examine; `:' will show additional info, if any, without ask- ing for confirmation. When picking a location, pressing the - ESC key will terminate this command, or pressing `?' will + ESC key will terminate this command, or pressing `?' will give a brief reminder about how it works. If the autodescribe option is on, a short description of @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -720,7 +720,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -786,7 +786,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -852,7 +852,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -918,7 +918,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -984,7 +984,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1050,7 +1050,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1116,7 +1116,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1248,7 +1248,7 @@ paranoid_confirmation:quit option to require a response of - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1314,7 +1314,7 @@ Show mobile light sources. Autocompletes. Debug mode only. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1380,7 +1380,7 @@ instead. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1446,7 +1446,7 @@ number_pad is on. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1512,7 +1512,7 @@ Sit down. Autocompletes. Default key is `M-s'. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1578,7 +1578,7 @@ combat, or it will be automatically turned off. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1644,7 +1644,7 @@ Create a monster. May be prefixed by a count to create more - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1710,7 +1710,7 @@ lowed by the other key, you may set the altmeta option to have - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1776,7 +1776,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1842,7 +1842,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1908,7 +1908,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -1974,7 +1974,7 @@ tory depletion. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2040,7 +2040,7 @@ very useful under certain circumstances. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2106,7 +2106,7 @@ it is the one who moved rather than you. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2172,7 +2172,7 @@ extremely obvious, you will be asked what you want to call this - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2238,7 +2238,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2304,7 +2304,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2370,7 +2370,7 @@ become highly skilled in daggers or staves but not in swords or - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2436,7 +2436,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2502,7 +2502,7 @@ of armor, you immediately find out the armor class and any - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2568,7 +2568,7 @@ vironment variable to the file name of your mailbox. You may - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2634,7 +2634,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2700,7 +2700,7 @@ "Weapon proficiency".) - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2766,7 +2766,7 @@ much less valuable. All rocks, however, can be used as - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2832,7 +2832,7 @@ with these challenges. Note that it is perfectly acceptable to - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2898,7 +2898,7 @@ - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2964,7 +2964,7 @@ how NetHack behaves. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -2993,7 +2993,7 @@ er's home directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor. - On Windows, it is ".nethackrc" in "\%USERPRO- + On Windows, it is ".nethackrc" in the folder "\%USERPRO- FILE%\NetHack\3.6". The file may not exist, but it is a normal ASCII text file can can be created with any text editor. After running NetHack for the first time, you should find a default @@ -3030,7 +3030,7 @@ sistent, and apply only to new games. You can specify multiple - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3096,7 +3096,7 @@ Format is key followed by the command, separated by a colon. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3162,7 +3162,7 @@ is processed by the function that handles wishing. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3178,20 +3178,25 @@ - Here is a short example of config file contents: + Here is an example of configuration file contents: + + # Set your character's role, race, gender, and alignment. + OPTIONS=role:Valkyrie, race:Human, gender:female, align:lawful + # + # Turn on autopickup, set automatically picked up object types + OPTIONS=autopickup,pickup_types:$"=/!?+ + # + # Map customization + OPTIONS=color # Display things in color if possible + OPTIONS=lit_corridor # Show lit corridors differently + OPTIONS=hilite_pet,hilite_pile + # Replace small punctuation (tick marks) with digits + SYMBOLS=S_boulder:0,S_golem:7 + # + # No startup splash screen. Windows GUI only. + OPTIONS=!splash_screen + - # Set your character's role, race, gender, and alignment. - OPTIONS=role:Valkyrie, race:Human, gender:female, align:lawful - # - # Turn on autopickup, set automatically picked up object types - OPTIONS=autopickup,pickup_types:$"=/!?+ - # Show colored text if possible - OPTIONS=color - # Show lit corridors differently - OPTIONS=lit_corridor - # - # No startup splash screen. Windows GUI only. - OPTIONS=!splash_screen 9.3. Using the NETHACKOPTIONS environment variable @@ -3221,14 +3226,9 @@ The NETHACKOPTIONS value is effectively the same as a single OPTIONS statement in a configuration file. The "OPTIONS=" prefix is implied and comma separated options are processed from right - to left. Other types of configuration statements such as BIND or - MSGTYPE are not allowed. - - Instead of a comma-separated list of options, NETHACKOPTIONS - can be set to the full name of a configuration file you want to - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3238,6 +3238,11 @@ + to left. Other types of configuration statements such as BIND or + MSGTYPE are not allowed. + + Instead of a comma-separated list of options, NETHACKOPTIONS + can be set to the full name of a configuration file you want to use. If that full name doesn't start with a slash, precede it with `@' (at-sign) to let NetHack know that the rest is intended as a file name. If it does start with `/', the at-sign is op- @@ -3287,14 +3292,9 @@ This option controls what happens when you attempt the `f' (fire) command when nothing is quivered or readied (default false). When true, the computer will fill your quiver or - quiver sack or make ready some suitable weapon. Note that it - will not take into account the blessed/cursed status, enchant- - ment, damage, or quality of the weapon; you are free to manual- - ly fill your quiver or quiver sack or make ready with the `Q' - command instead. If no weapon is found or the option is false, - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3304,6 +3304,11 @@ + quiver sack or make ready some suitable weapon. Note that it + will not take into account the blessed/cursed status, enchant- + ment, damage, or quality of the weapon; you are free to manual- + ly fill your quiver or quiver sack or make ready with the `Q' + command instead. If no weapon is found or the option is false, the `t' (throw) command is executed instead. Persistent. blind @@ -3354,13 +3359,8 @@ dark_room Show out-of-sight areas of lit rooms (default on). Persistent. - disclose - Controls what information the program reveals when the game - ends. Value is a space separated list of prompting/category - pairs (default is "ni na nv ng nc no", prompt with default - - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3370,8 +3370,12 @@ - response of `n' for each candidate). Persistent. The possi- - bilities are: + disclose + Controls what information the program reveals when the game + ends. Value is a space separated list of prompting/category + pairs (default is "ni na nv ng nc no", prompt with default re- + sponse of `n' for each candidate). Persistent. The possibili- + ties are: i - disclose your inventory; a - disclose your attributes; @@ -3420,13 +3424,9 @@ Name your starting dog (for example "dogname:Fang"). Cannot be set with the `O' command. - extmenu - Changes the extended commands interface to pop-up a menu of - available commands. It is keystroke compatible with the tradi- - tional interface except that it does not require that you hit - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3436,6 +3436,10 @@ + extmenu + Changes the extended commands interface to pop-up a menu of + available commands. It is keystroke compatible with the tradi- + tional interface except that it does not require that you hit Enter. It is implemented for the tty interface (default off). For the X11 interface, which always uses a menu for choosing an @@ -3486,13 +3490,9 @@ the `/' command, ask if you want to see it (default on). Turn- ing help off makes just looking at things faster, since you aren't interrupted with the "More info?" prompt, but it also - means that you might miss some interesting and/or important in- - formation. Persistent. - - - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3502,6 +3502,9 @@ + means that you might miss some interesting and/or important in- + formation. Persistent. + herecmd_menu When using a windowport that supports mouse and clicking on yourself or next to you, show a menu of possible actions for @@ -3553,12 +3556,9 @@ lootabc When using a menu to interact with a container, use the old `a', `b', and `c' keyboard shortcuts rather than the mnemonics - `o', `i', and `b' (default off). Persistent. - - - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3568,6 +3568,8 @@ + `o', `i', and `b' (default off). Persistent. + mail Enable mail delivery during the game (default on). Persistent. @@ -3620,11 +3622,9 @@ Menu character accelerator to invert all items in a menu. Im- plemented by the Amiga, Gem, X11 and tty ports. Default `@'. - menu_invert_page - Menu character accelerator to invert all items on this page of - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3634,6 +3634,8 @@ + menu_invert_page + Menu character accelerator to invert all items on this page of a menu. Implemented by the Amiga, Gem and tty ports. Default `~'. @@ -3680,17 +3682,15 @@ are: 0 - disabled - 1 - enabled and make OS adjustments to support mouse use in the game + 1 - enabled and make OS adjustments to support mouse use 2 - like 1 but does not make any OS adjustments Omitting a value is the same as specifying 1 and negating mouse_support is the same as specifying 0. - msghistory - The number of top line messages to keep (and be able to recall - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3700,6 +3700,8 @@ + msghistory + The number of top line messages to keep (and be able to recall with `^P') (default 20). Cannot be set with the `O' command. msg_window @@ -3751,12 +3753,10 @@ specifying 1 and negating number_pad is the same as specifying 0. (Settings 2 and 4 are for compatibility with MS-DOS or old PC Hack; in addition to the different behavior for `5', `Alt-5' - acts as `G' and `Alt-0' acts as `I'. Setting -1 is to accommo- - date some QWERTZ keyboards which have the location of the `y' - and `z' keys swapped.) When moving by numbers, to enter a + acts as `G' and `Alt-0' acts as `I'. Setting -1 is to - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3766,8 +3766,10 @@ - count prefix for those commands which accept one (such as "12s" - to search twelve times), precede it with the letter `n' + accommodate some QWERTZ keyboards which have the location of + the `y' and `z' keys swapped.) When moving by numbers, to en- + ter a count prefix for those commands which accept one (such as + "12s" to search twelve times), precede it with the letter `n' ("n12s"). packorder @@ -3817,12 +3819,10 @@ This only makes sense for windowing system interfaces that im- plement this feature. - petattr - Specifies one or more text highlighting attributes to use when - showing pets on the map. Effectively a superset of the - NetHack 3.6 November 2, 2019 + + NetHack 3.6 November 17, 2019 @@ -3832,6 +3832,9 @@ + petattr + Specifies one or more text highlighting attributes to use when + showing pets on the map. Effectively a superset of the hilite_pet boolean option. Curses interface only; value is one or more of the following letters. @@ -3882,13 +3885,10 @@ uration file lines to further refine autopickup behavior. Per- sistent. - pile_limit - When walking across a pile of objects on the floor, threshold - at which the message "there are few/several/many objects here" - is given instead of showing a popup list of those objects. A - NetHack 3.6 November 2, 2019 + + NetHack 3.6 November 17, 2019 @@ -3898,6 +3898,10 @@ + pile_limit + When walking across a pile of objects on the floor, threshold + at which the message "there are few/several/many objects here" + is given instead of showing a popup list of those objects. A value of 0 means "no limit" (always list the objects); a value of 1 effectively means "never show the objects" since the pile size will always be at least that big; default value is 5. @@ -3948,13 +3952,9 @@ the map. Not all ports support run length compression. It has no effect on reading an existing save file. - runmode - Controls the amount of screen updating for the map window when - engaged in multi-turn movement (running via shift+direction or - control+direction and so forth, or via the travel command or - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -3964,6 +3964,10 @@ + runmode + Controls the amount of screen updating for the map window when + engaged in multi-turn movement (running via shift+direction or + control+direction and so forth, or via the travel command or mouse click). The possible values are: teleport - update the map after movement has finished; @@ -4014,13 +4018,9 @@ values are: full - always sort the lists; - loot - only sort the lists that don't use inventory letters, - like with the #loot and pickup commands; - none - show lists the traditional way without sorting. - - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -4030,6 +4030,10 @@ + loot - only sort the lists that don't use inventory letters, + like with the #loot and pickup commands; + none - show lists the traditional way without sorting. + sortpack Sort the pack contents by type when displaying inventory (de- fault on). Persistent. @@ -4079,14 +4083,10 @@ toptenwin Put the ending display in a NetHack window instead of on stdout - (default off). Setting this option makes the score list visi- - ble when a windowing version of NetHack is started without a - parent window, but it no longer leaves the score list around - after game end on a terminal or emulating window. + (default off). Setting this option makes the score list - - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -4096,6 +4096,10 @@ + visible when a windowing version of NetHack is started without + a parent window, but it no longer leaves the score list around + after game end on a terminal or emulating window. + travel Allow the travel command (default on). Turning this option off will prevent the game from attempting unintended moves if you @@ -4146,13 +4150,9 @@ whatis_moveskip When getting a location on the map, and using shifted movement - keys or meta-digit keys to fast-move, instead of moving 8 units - at a time, move by skipping the same glyphs. (default off) - - - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -4162,6 +4162,9 @@ + keys or meta-digit keys to fast-move, instead of moving 8 units + at a time, move by skipping the same glyphs. (default off) + windowtype When the program has been built to support multiple interfaces, select which one to use, such as "tty" or "X11" (default de- @@ -4191,13 +4194,13 @@ that you have chosen. Character strings that are too long may be truncated. Not all window ports will adjust for all settings listed here. You can safely add any of these options to your - config file, and if the window port is capable of adjusting to - suit your preferences, it will attempt to do so. If it can't it - will silently ignore it. You can find out if an option is sup- - ported by the window port that you are currently using by check- - ing to see if it shows up in the Options list. Some options are - dynamic and can be specified during the game with the `O' com- - mand. + configuration file, and if the window port is capable of adjust- + ing to suit your preferences, it will attempt to do so. If it + can't it will silently ignore it. You can find out if an option + is supported by the window port that you are currently using by + checking to see if it shows up in the Options list. Some options + are dynamic and can be specified during the game with the `O' + command. align_message Where to align or place the message window (top, bottom, left, @@ -4213,12 +4216,9 @@ color If NetHack can, it should display color if it can for different - monsters, objects, and dungeon features. - - - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -4228,6 +4228,8 @@ + monsters, objects, and dungeon features. + eight_bit_tty If NetHack can, it should pass eight-bit character values (for example, specified with the traps option) straight through to @@ -4280,11 +4282,9 @@ some non-map data (such as menu selector letters). Curses in- terface only; default is on. - large_font - If NetHack can, it should use a large font. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -4294,6 +4294,9 @@ + large_font + If NetHack can, it should use a large font. + map_mode If NetHack can, it should display the map in the manner speci- fied. @@ -4345,12 +4348,9 @@ Curses interface only. Number of columns and rows to use for the display. Curses will attempt to resize to the values spec- ified but will settle for smaller sizes if they are too big. - Default is the current window size. - - - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -4360,6 +4360,8 @@ + Default is the current window size. + tiled_map If NetHack can, it should display a tiled map if it can. @@ -4412,11 +4414,9 @@ silver, maroon, fuchsia, lime, olive, navy, teal, aqua), or one of Windows UI colors (activeborder, activecaption, appworkspace, background, btnface, btnshadow, btntext, captiontext, graytext, - greytext, highlight, highlighttext, inactiveborder, inactivecap- - tion, menu, menutext, scrollbar, window, windowframe, - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -4426,7 +4426,9 @@ - windowtext). + greytext, highlight, highlighttext, inactiveborder, inactivecap- + tion, menu, menutext, scrollbar, window, windowframe, window- + text). wraptext If NetHack can, it should wrap long lines of text if they don't @@ -4477,12 +4479,10 @@ page_wait (default on, Mac NetHack only). - rawio - Force raw (non-cbreak) mode for faster output and more bullet- - proof input (MS-DOS sometimes treats `^P' as a printer toggle - NetHack 3.6 November 2, 2019 + + NetHack 3.6 November 17, 2019 @@ -4492,6 +4492,9 @@ + rawio + Force raw (non-cbreak) mode for faster output and more bullet- + proof input (MS-DOS sometimes treats `^P' as a printer toggle without it) (default off, OS/2, PC, and ST NetHack only). Note: DEC Rainbows hang if this is turned on. Cannot be set with the `O' command. @@ -4506,8 +4509,8 @@ compensate for international keyboard issues. OPTIONS=subkey- value:171/92 will return 92 to NetHack, if 171 was originally going to be returned. You can use multiple subkeyvalue state- - ments in the config file if needed. Cannot be set with the `O' - command. + ments in the configuration file if needed. Cannot be set with + the `O' command. video Set the video mode used (PC NetHack only). Values are "autode- @@ -4540,15 +4543,12 @@ terns. This applies to Autopickup exceptions, Message types, Menu colors, and User sounds. - 9.8. Configuring Autopickup Exceptions - - You can further refine the behavior of the autopickup option - beyond what is available through the pickup_types option. - NetHack 3.6 November 2, 2019 + + NetHack 3.6 November 17, 2019 @@ -4558,6 +4558,11 @@ + 9.8. Configuring Autopickup Exceptions + + You can further refine the behavior of the autopickup option + beyond what is available through the pickup_types option. + By placing autopickup_exception lines in your configuration file, you can define patterns to be checked when the game is about to autopickup something. @@ -4575,13 +4580,13 @@ > - never pickup an object that matches rest of pattern. The autopickup_exception rules are processed in the order in - which they appear in your config file, thus allowing a later - rule to override an earlier rule. + which they appear in your configuration file, thus allowing a + later rule to override an earlier rule. Exceptions can be set with the `O' command, but because they - are not included in your config file, they won't be in effect - if you save and then restore your game. autopickup_exception - rules and not saved with the game. + are not included in your configuration file, they won't be in + effect if you save and then restore your game. autopickup_ex- + ception rules and not saved with the game. Here are some examples: @@ -4605,16 +4610,11 @@ For example: - BIND=^X:getpos.autodescribe - BIND={:menu_first_page - BIND=v:loot - - Extended command keys - You can bind multiple keys to the same extended command. Un- - bind a key by using "nothing" as the extended command to bind - NetHack 3.6 November 2, 2019 + + + NetHack 3.6 November 17, 2019 @@ -4624,13 +4624,20 @@ + BIND=^X:getpos.autodescribe + BIND={:menu_first_page + BIND=v:loot + + Extended command keys + You can bind multiple keys to the same extended command. Un- + bind a key by using "nothing" as the extended command to bind to. You can also bind the "", "", and "" keys. Menu accelerator keys The menu control or accelerator keys can also be rebound via - OPTIONS-lines in the config file. You cannot bind object sym- - bols into menu accelerators. + OPTIONS lines in the configuration file. You cannot bind ob- + ject symbols into menu accelerators. Special command keys Below are the special commands you can rebind. Some of them @@ -4670,17 +4677,10 @@ fault is `#'. getpos.all.next - When asked for a location, the key to go to next closest inter- - esting thing. Default is `a'. - - getpos.all.prev - When asked for a location, the key to go to previous closest - interesting thing. Default is `A'. + When asked for a location, the key to go to next closest - - - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -4690,6 +4690,12 @@ + interesting thing. Default is `a'. + + getpos.all.prev + When asked for a location, the key to go to previous closest + interesting thing. Default is `A'. + getpos.door.next When asked for a location, the key to go to next closest door or doorway. Default is `d'. @@ -4738,15 +4744,9 @@ When asked for a location, the key to choose the location, and possibly ask for more info. Default is `.'. - getpos.pick.once - When asked for a location, the key to choose the location, and - skip asking for more info. Default is `,'. - - getpos.pick.quick - When asked for a location, the key to choose the location, skip - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -4756,6 +4756,12 @@ + getpos.pick.once + When asked for a location, the key to choose the location, and + skip asking for more info. Default is `,'. + + getpos.pick.quick + When asked for a location, the key to choose the location, skip asking for more info, and exit the location asking loop. De- fault is `;'. @@ -4803,16 +4809,10 @@ reqmenu Prefix key to request menu from some commands. Default is `m'. - run - Prefix key to run towards a direction. Default is `G'. - - run.nopickup - Prefix key to run towards a direction without picking up items - on the way. Default is `M'. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -4822,6 +4822,13 @@ + run + Prefix key to run towards a direction. Default is `G'. + + run.nopickup + Prefix key to run towards a direction without picking up items + on the way. Default is `M'. + run.numpad Prefix key to run towards a direction. With number_pad only. Default is `5'. @@ -4834,8 +4841,8 @@ You can change the way the messages are shown in the message area, when the message matches a user-defined pattern. - In general, the config file entries to configure the message - types look like this: MSGTYPE=type "pattern" + In general, the configuration file entries to describe the + message types look like this: MSGTYPE=type "pattern" type - how the message should be shown; pattern - the pattern to match. @@ -4860,25 +4867,18 @@ the user is prompted with more-prompt, and a message matching "You displaced ." is not shown at all. - The order of the defined MSGTYPE-lines is important; the last + The order of the defined MSGTYPE lines is important; the last matching rule is used. Put the general case first, exceptions below them. 9.11. Configuring Menu Colors Some platforms allow you to define colors used in menu lines - when the line matches a user-defined pattern. At this time the - tty, win32tty and win32gui support this. - - In general, the config file entries to configure the menu - color mappings look like this: - - MENUCOLOR="pattern"=color&attribute - - pattern - the pattern to match; + when the line matches a user-defined pattern. At this time the + tty, curses, win32tty and win32gui interfaces support this. - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -4888,6 +4888,12 @@ + In general, the configuration file entries to describe the + menu color mappings look like this: + + MENUCOLOR="pattern"=color&attribute + + pattern - the pattern to match; color - the color to use for lines matching the pat- tern; attribute - the attribute to use for lines matching the @@ -4919,9 +4925,9 @@ will be shown in green color, lines with " cursed " will be shown in red, and lines with " cursed " followed by "(being worn)" on the same line will be shown in red color and under- - lined. You can have multiple MENUCOLOR entries in your config - file, and the last MENUCOLOR-line in your config file that - matches a menu line will be used for the line. + lined. You can have multiple MENUCOLOR entries in your config- + uration file, and the last MENUCOLOR line that matches a menu + line will be used for the line. Note that if you intend to have one or more color specifica- tions match " uncursed ", you will probably want to turn the im- @@ -4935,16 +4941,10 @@ to the message window. At this time the Qt port and the win32tty and win32gui ports support the use of user sounds. - The following config file entries are relevant to mapping - user sounds to messages: - - SOUNDDIR - The directory that houses the sound files to be played. - - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -4954,6 +4954,12 @@ + The following configuration file entries are relevant to + mapping user sounds to messages: + + SOUNDDIR + The directory that houses the sound files to be played. + SOUND An entry that maps a sound file to a user-specified message pattern. Each SOUND entry is broken down into the following @@ -5003,14 +5009,8 @@ and inverse. "Normal" is a synonym for "none"; they should not be used in combination with any of the other attributes. - To specify both a color and an attribute, use `&' to combine - them. To specify multiple attributes, use `+' to combine those. - For example: "magenta&inverse+dim". - - - - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -5020,6 +5020,10 @@ + To specify both a color and an attribute, use `&' to combine + them. To specify multiple attributes, use `+' to combine those. + For example: "magenta&inverse+dim". + Note that the display may substitute or ignore particular attributes depending upon its capabilities, and in general may interpret the attributes any way it wants. For example, on some @@ -5070,13 +5074,9 @@ or "down" rule which matches a change in the field's val- ue, the "up" or "down" one takes precedence.) - * percentage sets the field attribute when the field value - matches the percentage. It is specified as a number be- - tween 0 and 100, followed by `%' (percent sign). If the - percentage is prefixed with `<=' or `>=', it also matches - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 @@ -5086,6 +5086,10 @@ + * percentage sets the field attribute when the field value + matches the percentage. It is specified as a number be- + tween 0 and 100, followed by `%' (percent sign). If the + percentage is prefixed with `<=' or `>=', it also matches when value is below or above the percentage. Use prefix `<' or `>' to match when strictly below or above. (The numeric limit is relaxed slightly for those: >-1% and @@ -5120,13 +5124,34 @@ the character's name is ignored. The in-game options menu can help you determine the correct - syntax for a config file. + syntax for a configuration file. The whole feature can be disabled by setting option sta- tushilites to 0. Example hilites: + + + + + + + + + + + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 79 + + + OPTION=hilite_status: gold/up/yellow/down/brown OPTION=hilite_status: characteristics/up/green/down/red OPTION=hilite_status: hitpoints/100%/gray&normal @@ -5138,20 +5163,6 @@ OPTION=hilite_status: condition/major/orange&inverse OPTION=hilite_status: condition/lev+fly/red&inverse - - - - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 79 - - - 9.14. Modifying NetHack Symbols NetHack can load entire symbol sets from the symbol file. @@ -5167,13 +5178,13 @@ play on the rogue level. You can also override one or more symbols using the SYMBOLS - and ROGUESYMBOLS config file options. Symbols are specified as - name:value pairs. Note that NetHack escape-processes the value - string in conventional C fashion. This means that \ is a prefix - to take the following character literally. Thus \ needs to be - represented as \\. The special prefix form \m switches on the - meta bit in the symbol value, and the ^ prefix causes the follow- - ing character to be treated as a control character. + and ROGUESYMBOLS configuration file options. Symbols are speci- + fied as name:value pairs. Note that NetHack escape-processes the + value string in conventional C fashion. This means that \ is a + prefix to take the following character literally. Thus \ needs + to be represented as \\. The special prefix form \m switches on + the meta bit in the symbol value, and the ^ prefix causes the + following character to be treated as a control character. NetHack Symbols Symbol Name Description @@ -5194,6 +5205,19 @@ - S_blcorn (bottom left corner) b S_blob (blob) + S_book (spellbook) + + + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 80 + + + ) S_boomleft (boomerang open left) ( S_boomright (boomerang open right) ` S_boulder (boulder) @@ -5205,19 +5229,6 @@ $ S_coin (pile of coins) # S_corr (corridor) - S_crwall (wall) - - - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 80 - - - # S_darkroom (dark room) ^ S_dart_trap (dart trap) & S_demon (major demon) @@ -5260,6 +5271,19 @@ ^ S_hole (hole) @ S_human (human or elf) h S_humanoid (humanoid) + + + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 81 + + + - S_hwall (horizontal wall) . S_ice (ice) i S_imp (imp or minor demon) @@ -5271,19 +5295,6 @@ ^ S_land_mine (land mine) } S_lava (molten lava) l S_leprechaun (leprechaun) - - - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 81 - - - ^ S_level_teleporter (level teleporter) L S_lich (lich) y S_light (light) @@ -5326,6 +5337,19 @@ ^ S_squeaky_board (squeaky board) 0 S_ss1 (magic shield 1 of 4) # S_ss2 (magic shield 2 of 4) + + + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 82 + + + @ S_ss3 (magic shield 3 of 4) * S_ss4 (magic shield 4 of 4) ^ S_statue_trap (statue trap) @@ -5337,19 +5361,6 @@ / S_sw_br (swallow bottom right) | S_sw_ml (swallow middle left) | S_sw_mr (swallow middle right) - - - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 82 - - - - S_sw_tc (swallow top center) / S_sw_tl (swallow top left) \ S_sw_tr (swallow top right) @@ -5392,21 +5403,10 @@ Y S_yeti (apelike creature) Z S_zombie (zombie) z S_zruty (zruty) - S_pet_override (any pet if ACCESSIBILITY=1 is set) - S_player_override (hero if ACCESSIBILITY=1 is set) - - Notes: several symbols in this table appear to be blank. - They are the space character, except for S_pet_override and - S_player_override which don't have any default value and can only - be used if enabled in the "sysconf" file. - - S_rock is misleadingly named; rocks and stones use S_gem. - Statues and boulders are the rock being referred to, but since - version 3.6.0, statues are displayed as the monster they depict. - So S_rock is only used for boulders and not used at all if - NetHack 3.6 November 2, 2019 + + NetHack 3.6 November 17, 2019 @@ -5416,7 +5416,21 @@ - overridden by the more specific S_boulder. + S_pet_override (any pet if ACCESSIBILITY=1 is set) + S_hero_override (hero if ACCESSIBILITY=1 is set) + + Notes: + + * Several symbols in this table appear to be blank. They are the + space character, except for S_pet_override and S_hero_override + which don't have any default value and can only be used if en- + abled in the "sysconf" file. + + * S_rock is misleadingly named; rocks and stones use S_gem. + Statues and boulders are the rock being referred to, but since + version 3.6.0, statues are displayed as the monster they de- + pict. So S_rock is only used for boulders and not used at all + if overridden by the more specific S_boulder. 9.15. Configuring NetHack for Play by the Blind @@ -5456,9 +5470,21 @@ game to run in a manner accessible to the blind. After you have gained some experience with the game and with editing files, you may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your + + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 84 + + + configuration file to better suit your preferences. See the pre- vious section for the special symbols S_pet_override to force a - consistent symbol for all pets and S_player_override to force a + consistent symbol for all pets and S_hero_override to force a unique symbol for the player character if accessibility is en- abled in the sysconf file. @@ -5470,18 +5496,6 @@ roguesymset:NHAccess Load a symbol set for the rogue level that is appropriate for - - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 84 - - - use by blind players. menustyle:traditional @@ -5521,6 +5535,19 @@ screen, if your screen-reader reads those lines. The same in- formation can be seen via the "#attributes" command. + + + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 85 + + + 9.16. Global Configuration for System Administrators If NetHack is compiled with the SYSCF option, a system ad- @@ -5537,17 +5564,6 @@ value of a single asterisk (*) allows anyone to start a game in debug mode. - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 85 - - - SHELLERS = A list of users who are allowed to use the shell es- cape command (!). The syntax is the same as WIZARDS. @@ -5587,6 +5603,17 @@ PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- spectively, to identify unique people for the score file. + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 86 + + + MAX_STATUENAME_RANK = Maximum number of score file entries to use for random statue names (default is 10). @@ -5602,18 +5629,6 @@ %T - current time, UNIX timestamp format %d - game start time, YYYYMMDDhhmmss format %D - current time, YYYYMMDDhhmmss format - - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 86 - - - %n - player name %N - first character of player name @@ -5653,6 +5668,18 @@ There are two ways of enabling explore mode. One is to start the game with the -X command-line switch or with the play- mode:explore option. The other is to issue the "#exploremode" + + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 87 + + + extended command while already playing the game. Starting a new game in explore mode provides your character with a wand of wish- ing in initial inventory; switching during play does not. The @@ -5668,18 +5695,6 @@ vide god-like powers to your character, and players who attempt debugging are expected to figure out how to use it themselves. It is initiated by starting the game with the -D command-line - - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 87 - - - switch or with the playmode:debug option. For some systems, the player must be logged in under a par- @@ -5719,6 +5734,18 @@ Mike Stephenson merged these various versions back together, incorporating many of the added features, and produced NetHack + + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 88 + + + 1.4. He then coordinated a cast of thousands in enhancing and debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. @@ -5734,18 +5761,6 @@ Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm Meluch, Stephen Spackman and Pierre Martineau designed overlay - - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 88 - - - code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the Macintosh. Along with various other Dungeoneers, they continued to enhance the PC, Macintosh, and Amiga ports through the later @@ -5786,6 +5801,17 @@ velopment Team and tile support was then added to other plat- forms. + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 89 + + + The 3.2 NetHack Development Team, comprised of Michael Alli- son, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Er- @@ -5800,18 +5826,6 @@ the founding members of the NetHack Development Team, Dr. Izchak Miller, was diagnosed with cancer and passed away. That release of the game was dedicated to him by the development and porting - - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 89 - - - teams. During the lifespan of NetHack 3.1 and 3.2, several enthusi- @@ -5852,6 +5866,18 @@ first version to allow you to ride a steed, and was the first version to have a publicly available web-site listing all the bugs that had been discovered. Despite that constantly growing + + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 90 + + + bug list, 3.3 proved stable enough to last for more than a year and a half. @@ -5865,19 +5891,6 @@ as a whole as well as supporting ports on the different platforms that NetHack runs on: - - - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 90 - - - Pat Rankin maintained 3.4 for VMS. Michael Allison maintained NetHack 3.4 for the MS-DOS plat- @@ -5919,6 +5932,18 @@ In September 2014, an interim snapshot of the code under de- velopment was released publicly by other parties. Since that code + + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 91 + + + was a work-in-progress and had not gone through the process of debugging it as a suitable release, it was decided that the ver- sion numbers present on that code snapshot would be retired and @@ -5932,18 +5957,6 @@ At the beginning of development for what would eventually get released as 3.6.0, the NetHack Development Team consisted of - - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 91 - - - Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- son, Janet Walz, and Paul Winner. In early 2015, ahead of the @@ -5985,6 +5998,18 @@ The NetHack Development Team at the time of release of 3.6.1 con- sisted of Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, + + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 92 + + + Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz, and Paul Winner. @@ -5999,17 +6024,6 @@ The official NetHack web site is maintained by Ken Lorber at http://www.nethack.org/. - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 92 - - - 12.1. SPECIAL THANKS On behalf of the NetHack community, thank you very much once @@ -6049,6 +6063,19 @@ David Gentzel Ken Washikita Ron Van Iwaarden David Hairston Kevin Darcy Ronnen Miller Dean Luick Kevin Hugo Ross Brown + + + + NetHack 3.6 November 17, 2019 + + + + + + NetHack Guidebook 93 + + + Del Lamb Kevin Sitze Sascha Wostmann Derek S. Ray Kevin Smolkowski Scott Bigham Deron Meranda Kevin Sweet Scott R. Turner @@ -6063,19 +6090,6 @@ Frederick Roeber Merlyn LeRoy Tim Lennan Gil Neiger Michael Allison Timo Hakulinen Greg Laskin Michael Feir Tom Almy - - - - NetHack 3.6 November 2, 2019 - - - - - - NetHack Guidebook 93 - - - Greg Olson Michael Hamel Tom West Gregg Wonderly Michael Sokolov Warren Cheung Hao-yang Wang Mike Engber Warwick Allison @@ -6118,21 +6132,7 @@ - - - - - - - - - - - - - - - NetHack 3.6 November 2, 2019 + NetHack 3.6 November 17, 2019 From 65ccd1d89e20778b3010ad590cb9d52d4a3f23dd Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 18 Nov 2019 09:16:51 +0200 Subject: [PATCH 261/529] Fix double DLB definition in linux hints file --- sys/unix/hints/linux | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/unix/hints/linux b/sys/unix/hints/linux index 1d9c45509..dcdee332d 100644 --- a/sys/unix/hints/linux +++ b/sys/unix/hints/linux @@ -20,7 +20,8 @@ VARDIR = $(HACKDIR) POSTINSTALL=cp -n sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf; -CFLAGS=-g -O -I../include -DNOTPARMDECL -DDLB +CFLAGS=-g -O -I../include -DNOTPARMDECL +CFLAGS+=-DDLB CFLAGS+=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE CFLAGS+=-DTIMED_DELAY @@ -33,7 +34,6 @@ CFLAGS+=-DCURSES_GRAPHICS #CFLAGS+=-DSCORE_ON_BOTL #CFLAGS+=-DMSGHANDLER #CFLAGS+=-DTTY_TILES_ESCCODES -#CFLAGS+=-DDLB LINK=$(CC) # Only needed for GLIBC stack trace: From 450957bfe98e6b25b352f72dad9495cf08ed01ca Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 18 Nov 2019 13:23:13 -0500 Subject: [PATCH 262/529] further refine k-sound pluralization --- src/objnam.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/objnam.c b/src/objnam.c index 796c90e84..9bc9148b4 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -2451,8 +2451,11 @@ const char *oldstr; if (index("zxs", lo_c) || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1))) /* 21st century k-sound */ - && !(len >= 4 && !strcmpi(spot - 2, "ech") - && index("tm", lowc(*(spot - 4))))) + && !(len >= 4 && + ((lowc(*(spot - 2)) == 'e' + && index("mt", lowc(*(spot - 3)))) || + (lowc(*(spot - 2)) == 'o' + && index("lp", lowc(*(spot - 3))))))) /* Kludge to get "tomatoes" and "potatoes" right */ || (len >= 4 && !strcmpi(spot - 2, "ato")) || (len >= 5 && !strcmpi(spot - 4, "dingo"))) { From 516761b9bba0986522404190022294e338ae94dd Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 18 Nov 2019 11:01:26 -0800 Subject: [PATCH 263/529] another tribute typo: The Light Fantastic #11 Another transciption mistake ("to"; the book has "do"). --- dat/tribute | 4 ++-- doc/fixes36.3 | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dat/tribute b/dat/tribute index 3d7b56850..143db9874 100644 --- a/dat/tribute +++ b/dat/tribute @@ -1,4 +1,4 @@ -# NetHack 3.6 tribute $NHDT-Date: 1573777025 2019/11/15 00:17:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.84 $ +# NetHack 3.6 tribute $NHDT-Date: 1574103673 2019/11/18 19:01:13 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.85 $ # Copyright (c) 2017 by Robert Patrick Rankin # NetHack may be freely redistributed. See license for details. # A tribute introduced in NetHack 3.6.0 to: @@ -549,7 +549,7 @@ explain the observed facts, and they are completely and utterly wrong. %e passage # p. 205 %passage 11 -"Where to they all come from?" said Twoflower, as they fled yet another mob. +"Where do they all come from?" said Twoflower, as they fled yet another mob. "Inside every sane person there's a madman struggling to get out," said the shopkeeper, "That's what I've always thought. No one goes mad quicker than diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 16ab5de31..0433c99c1 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.181 $ $NHDT-Date: 1573943506 2019/11/16 22:31:46 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.183 $ $NHDT-Date: 1574103672 2019/11/18 19:01:12 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -116,7 +116,8 @@ when a boulder was teleported, if it landed in a pit or trap door or hole its former location wasn't updated to show that it wasn't there anymore (noticed in Sokoban but not limited to there) Terry Pratchett tribute, fix typo in passage #4 for Mort ("the" -> "they"); - also passage #7 for Soul Music ("genious" -> "genius") + also passage #7 for Soul Music ("genious" -> "genius"); + and passage #11 for The Light Fantastic ("to" -> "do") fix typo in end_of_input() present since 3.6.0 that would prevent compilation for NOSAVEONHANGUP+INSURANCE configuration when a status condition becomes fatal, keep it listed as an active condition From 040c13f6aab14ca7ceee191e5baa722b2c191cdd Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 18 Nov 2019 11:56:45 -0800 Subject: [PATCH 264/529] more tribute: Eric #3, Witches Abroad #10 --- dat/tribute | 10 +++++----- doc/fixes36.3 | 6 ++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/dat/tribute b/dat/tribute index 143db9874..73a5a3815 100644 --- a/dat/tribute +++ b/dat/tribute @@ -1,4 +1,4 @@ -# NetHack 3.6 tribute $NHDT-Date: 1574103673 2019/11/18 19:01:13 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.85 $ +# NetHack 3.6 tribute $NHDT-Date: 1574107001 2019/11/18 19:56:41 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.86 $ # Copyright (c) 2017 by Robert Patrick Rankin # NetHack may be freely redistributed. See license for details. # A tribute introduced in NetHack 3.6.0 to: @@ -786,7 +786,7 @@ back of his skull. [Equal Rites, by Terry Pratchett] %e passage -# p. 185 (actually uses four periods to mark a sentence ending in a ellipsis) +# p. 185 (actually uses four periods to mark a sentence ending in an ellipsis) %passage 10 There may be universes where librarianship is considered a peaceful sort of occupation, and where the risks are limited to large volumes falling off @@ -2004,7 +2004,7 @@ road to Hell, and demons were, after all, traditionalists. %e passage # pp. 9-10 (passage has an interesting start but not much of a finish...) %passage 3 -"It's a haunting," he ventured. "Some short of ghost, maybe. A bell, book +"It's a haunting," he ventured. "Some sort of ghost, maybe. A bell, book and candle job." The Bursar sighed. "We tried that, Archchancellor." @@ -2816,8 +2816,8 @@ It carried on turning, pulling her with it. Blimey. Oh, well... -Then she did was neither Granny Weatherwax nor Magrat would have dreamed of -doing in the circumstances. But Nanny Ogg's voyages on the sea of +Then she did what neither Granny Weatherwax nor Magrat would have dreamed +of doing in the circumstances. But Nanny Ogg's voyages on the sea of intersexual dalliance had gone rather further than twice around the lighthouse, and she saw nothing demeaning in getting a man to help her. diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 0433c99c1..02d19b96a 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.183 $ $NHDT-Date: 1574103672 2019/11/18 19:01:12 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.184 $ $NHDT-Date: 1574107001 2019/11/18 19:56:41 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -117,7 +117,9 @@ when a boulder was teleported, if it landed in a pit or trap door or hole its (noticed in Sokoban but not limited to there) Terry Pratchett tribute, fix typo in passage #4 for Mort ("the" -> "they"); also passage #7 for Soul Music ("genious" -> "genius"); - and passage #11 for The Light Fantastic ("to" -> "do") + and passage #11 for The Light Fantastic ("to" -> "do"); + passage #3 for Eric ("short" -> "sort"); + passage #10 for Witches Abroad ("was" -> "what") fix typo in end_of_input() present since 3.6.0 that would prevent compilation for NOSAVEONHANGUP+INSURANCE configuration when a status condition becomes fatal, keep it listed as an active condition From fbd10e4b0e3e469336055c13a889d4a7dab82132 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 18 Nov 2019 15:12:38 -0500 Subject: [PATCH 265/529] some further refinements to --showpaths The Windows data file path has to be constructed because Windows defines VERSION_IN_DLB_FILENAME. Keep the personal configuration file details as the last information displayed. --- src/files.c | 48 +++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/src/files.c b/src/files.c index a9bee528a..61612e20f 100644 --- a/src/files.c +++ b/src/files.c @@ -4097,6 +4097,14 @@ reveal_paths(VOID_ARGS) #ifdef DLB raw_printf("Basic data files%s are collected inside:", buf); filep = DLBFILE; +#ifdef VERSION_IN_DLB_FILENAME + Strcpy(buf, build_dlb_filename((const char *) 0)); +#ifdef PREFIXES_IN_USE + fqn = fqname(buf, DATAPREFIX, 1); + if (fqn) + filep = fqn; +#endif /* PREFIXES_IN_USE */ +#endif raw_printf(" \"%s\"", filep); #ifdef DLBFILE2 filep = DLBFILE2; @@ -4106,6 +4114,27 @@ reveal_paths(VOID_ARGS) raw_printf("Basic data files%s are in many separate files.", buf); #endif /* ?DLB */ + /* dumplog */ + +#ifdef DUMPLOG +#ifdef SYSCF + fqn = sysopt.dumplogfile; +#else /* !SYSCF */ +#ifdef DUMPLOG_FILE + fqn = DUMPLOG_FILE; +#else + fqn = (char *) 0; +#endif +#endif /* ?SYSCF */ + if (fqn) { + raw_print("Your end-of-game dump file:"); + (void) dump_fmtstr(fqn, buf, FALSE); + buf[sizeof buf - sizeof " \"\""] = '\0'; + raw_printf(" \"%s\"", buf); + } else +#endif /* DUMPLOG */ + raw_print("No end-of-game dump file."); + /* personal configuration file */ buf[0] = '\0'; @@ -4158,25 +4187,6 @@ reveal_paths(VOID_ARGS) raw_printf(" \"%s\"", fqn ? fqn : default_configfile); #endif /* ?UNIX */ -#ifdef DUMPLOG -#ifdef SYSCF - fqn = sysopt.dumplogfile; -#else /* !SYSCF */ -#ifdef DUMPLOG_FILE - fqn = DUMPLOG_FILE; -#else - fqn = (char *) 0; -#endif -#endif /* ?SYSCF */ - if (fqn) { - raw_print("Your end-of-game dump file:"); - (void) dump_fmtstr(fqn, buf, FALSE); - buf[sizeof buf - sizeof " \"\""] = '\0'; - raw_printf(" \"%s\"", buf); - } else -#endif /* DUMPLOG */ - raw_print("No end-of-game dump file."); - raw_print(""); } From ea17a00310f122c118799f08ad859146f7204fa5 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 18 Nov 2019 15:37:27 -0500 Subject: [PATCH 266/529] add some additional pluralization tests, order alphabetically to ease adds --- test/test_src.lua | 94 ++++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 45 deletions(-) diff --git a/test/test_src.lua b/test/test_src.lua index 57686d05b..7c549679b 100644 --- a/test/test_src.lua +++ b/test/test_src.lua @@ -3,65 +3,69 @@ local tests = { makeplural = { - stamen = "stamens", - caveman = "cavemen", - zorkmid = "zorkmids", - shaman = "shamans", algae = "algae", - larvae = "larvae", - woman = "women", - nerf = "nerfs", - serf = "serfs", - knife = "knives", - baluchitherium = "baluchitheria", - mycelium = "mycelia", - hyphae = "hyphae", amoeba = "amoebae", - vertebra = "vertebrae", - fungus = "fungi", - homunculus = "homunculi", - bus = "buses", - lotus = "lotuses", - wumpus = "wumpuses", - nemesis = "nemeses", - matzoh = "matzot", - matzah = "matzot", - gateau = "gateaus", - gateaux = "gateauxes", + baluchitherium = "baluchitheria", bordeau = "bordeaus", - ox = "oxen", - VAX = "VAXES", - goose = "geese", - tomato = "tomatoes", - potato = "potatoes", - dingo = "dingoes", - fox = "foxes", - cookie = "cookies", ["bunch of grapes"] = "bunches of grapes", + bus = "buses", candelabrum = "candelabra", + caveman = "cavemen", + child = "children", + cookie = "cookies", deer = "deer", + dingo = "dingoes", + epoch = "epochs", fish = "fish", foot = "feet", - tuna = "tuna", - manes = "manes", - ninja = "ninja", - sheep = "sheep", - ronin = "ronin", - roshi = "roshi", - shito = "shito", - tengu = "tengu", - vortex = "vortices", - child = "children", - scale = "scales", - tooth = "teeth", + fox = "foxes", + fungus = "fungi", + gateau = "gateaus", + gateaux = "gateauxes", gauntlet = "gauntlets", ["gauntlet of power"] = "gauntlets of power", - priestess = "priestesses", - valkyrie = "valkyries", + goose = "geese", + homunculus = "homunculi", hoof = "hooves", + hyphae = "hyphae", + knife = "knives", + larvae = "larvae", + loch = "lochs", + lotus = "lotuses", louse = "lice", + manes = "manes", + matzah = "matzot", + matzoh = "matzot", + mech = "mechs", mouse = "mice", + mycelium = "mycelia", + nemesis = "nemeses", + nerf = "nerfs", + ninja = "ninja", + ox = "oxen", + potato = "potatoes", + priestess = "priestesses", + ronin = "ronin", + roshi = "roshi", + scale = "scales", + serf = "serfs", + shaman = "shamans", + sheep = "sheep", + shito = "shito", ["slice of cake"] = "slices of cake", + stamen = "stamens", + tech = "techs", + tengu = "tengu", + tomato = "tomatoes", + tooth = "teeth", + tuna = "tuna", + valkyrie = "valkyries", + VAX = "VAXES", + vertebra = "vertebrae", + vortex = "vortices", + woman = "women", + wumpus = "wumpuses", + zorkmid = "zorkmids", }, an = { a = "an a", From a763b99afd5f5ea3ece99bbcc8b38e6914dcc2e1 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 18 Nov 2019 16:56:52 -0500 Subject: [PATCH 267/529] catch up on some post-beta1 corrections --- doc/fixes36.3 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 02d19b96a..500f079a7 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -286,6 +286,16 @@ tty: revert the attempt to fix "message line anomaly: if autodecribe feedback prompts that spanned more than one line, a more significant issue +Fixes post-beta1 +------------------------------------------------------------------ +fix several tribute typos +pluralization correction for unlikely epoch and loch +ensure that --showpaths displays the personal confuration file last +unix: Fix double DLB definition in linux hints file +windows: fix --showpaths output for the data file which relies on being + constructed programmatically to incorporate the version suffix + + Platform- and/or Interface-Specific Fixes or Features ----------------------------------------------------- EDIT_GETLIN: wizard mode 'monpolycontrol' was using the getlin() answer buffer From 22180fc523c92353ab01e0d715823b6db3efc42a Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 18 Nov 2019 16:58:43 -0500 Subject: [PATCH 268/529] typo in fixes36.3 --- doc/fixes36.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 500f079a7..07a97fe56 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -290,7 +290,7 @@ Fixes post-beta1 ------------------------------------------------------------------ fix several tribute typos pluralization correction for unlikely epoch and loch -ensure that --showpaths displays the personal confuration file last +ensure that --showpaths displays the personal configuration file last unix: Fix double DLB definition in linux hints file windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix From fc2886efb4df88630e61782c46aca4ca3aa6b7ec Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 18 Nov 2019 14:28:25 -0800 Subject: [PATCH 269/529] yet more --showpaths (dumplog) Provide a little more information when dumplog is unavailable. While testing various permutations, I encountered a couple of problems with conditionally declared variables. --- src/files.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/files.c b/src/files.c index 61612e20f..5f24956b8 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 files.c $NHDT-Date: 1574037901 2019/11/18 00:45:01 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.270 $ */ +/* NetHack 3.6 files.c $NHDT-Date: 1574116097 2019/11/18 22:28:17 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.272 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -4003,10 +4003,13 @@ boolean wildcards; void reveal_paths(VOID_ARGS) { - const char *fqn, *gamename = (hname && *hname) ? hname : "NetHack"; + const char *fqn, *nodumpreason; char buf[BUFSZ]; -#if defined(SYSCF) || !defined(UNIX) +#if defined(SYSCF) || !defined(UNIX) || defined(DLB) const char *filep; +#ifdef SYSCF + const char *gamename = (hname && *hname) ? hname : "NetHack"; +#endif #endif #ifdef UNIX char *endp, *envp, cwdbuf[PATH_MAX]; @@ -4116,7 +4119,10 @@ reveal_paths(VOID_ARGS) /* dumplog */ -#ifdef DUMPLOG +#ifndef DUMPLOG + nodumpreason = "not supported"; +#else + nodumpreason = "disabled"; #ifdef SYSCF fqn = sysopt.dumplogfile; #else /* !SYSCF */ @@ -4126,14 +4132,14 @@ reveal_paths(VOID_ARGS) fqn = (char *) 0; #endif #endif /* ?SYSCF */ - if (fqn) { - raw_print("Your end-of-game dump file:"); + if (fqn && *fqn) { + raw_print("Your end-of-game disclosure file:"); (void) dump_fmtstr(fqn, buf, FALSE); buf[sizeof buf - sizeof " \"\""] = '\0'; raw_printf(" \"%s\"", buf); } else -#endif /* DUMPLOG */ - raw_print("No end-of-game dump file."); +#endif /* ?DUMPLOG */ + raw_printf("No end-of-game disclosure file (%s).", nodumpreason); /* personal configuration file */ From 893fa4efa8feebe6d48c511b5aa1a6cd4db48891 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 18 Nov 2019 19:20:03 -0500 Subject: [PATCH 270/529] update nhusage output on Windows --- sys/winnt/windmain.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index bd4740c51..5fba32d74 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -726,6 +726,9 @@ nhusage() #ifdef NEWS ADD_USAGE(" [-n]"); #endif + (void) Sprintf(buf2, "\n or\n%s [--showpaths]", + hname); + ADD_USAGE(buf2); if (!iflags.window_inited) raw_printf("%s\n", buf1); else From 4a8b9ee26c0f553d4b14d1e6c36999b586409965 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 18 Nov 2019 19:21:50 -0500 Subject: [PATCH 271/529] merge fix --- sys/winnt/windmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 91ee9cb23..56b4e3c6f 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -726,7 +726,7 @@ nhusage() ADD_USAGE(" [-n]"); #endif (void) Sprintf(buf2, "\n or\n%s [--showpaths]", - hname); + g.hname); ADD_USAGE(buf2); if (!iflags.window_inited) raw_printf("%s\n", buf1); From 786a90415ec5fad163d3687abd3257ad173f22e4 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 19 Nov 2019 17:31:50 +0200 Subject: [PATCH 272/529] Fix some memory leaks --- src/dungeon.c | 22 +++++++++++++++++++--- src/sp_lev.c | 3 ++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/dungeon.c b/src/dungeon.c index 5bbdcc081..de7319b88 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -925,8 +925,6 @@ init_dungeons() int lvl_flags = get_dgn_flags(L); struct tmplevel *tmpl = &pd.tmplevel[pd.n_levs + f]; - nhUse(lvl_bonetag); - nhUse(lvl_align); debugpline4("LEVEL[%i]:%s,(%i,%i)", f, lvl_name, lvl_base, lvl_range); tmpl->name = lvl_name; tmpl->chainlvl = lvl_chain; @@ -934,7 +932,9 @@ init_dungeons() tmpl->lev.rand = lvl_range; tmpl->chance = lvl_chance; tmpl->rndlevs = lvl_nlevels; - tmpl->flags = lvl_flags; + tmpl->flags = lvl_flags | lvl_align; + tmpl->boneschar = *lvl_bonetag ? *lvl_bonetag : 0; + free(lvl_bonetag); tmpl->chain = -1; if (lvl_chain) { debugpline1("CHAINLEVEL: %s", lvl_chain); @@ -947,6 +947,7 @@ init_dungeons() } if (tmpl->chain == -1) panic("Could not chain level %s to %s", lvl_name, lvl_chain); + free(lvl_chain); } } else panic("dungeon[%i].levels[%i] is not a hash", i, f); @@ -999,6 +1000,9 @@ init_dungeons() tmpb->chain = bi; break; } + if (tmpb->chain == -1) + panic("Could not chain branch %s to level %s", br_name, br_chain); + free(br_chain); } } else panic("dungeon[%i].branches[%i] is not a hash", i, f); @@ -1025,6 +1029,8 @@ init_dungeons() Strcpy(g.dungeons[i].dname, dgn_name); /* FIXME: dname length */ Strcpy(g.dungeons[i].proto, dgn_protoname); /* FIXME: proto length */ g.dungeons[i].boneid = *dgn_bonetag ? *dgn_bonetag : 0; + free(dgn_protoname); + free(dgn_bonetag); if (dgn_range) g.dungeons[i].num_dunlevs = (xchar) rn1(dgn_range, dgn_base); @@ -1196,6 +1202,16 @@ init_dungeons() lua_close(L); + for (i = 0; i < pd.n_brs; i++) { + free(pd.tmpbranch[i].name); + } + for (i = 0; i < pd.n_levs; i++) { + free(pd.tmplevel[i].name); + } + for (i = 0; i < g.n_dgns; i++) { + free(pd.tmpdungeon[i].name); + } + #ifdef DEBUG dumpit(); #endif diff --git a/src/sp_lev.c b/src/sp_lev.c index 7ef66d2a2..a25af7435 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -2736,7 +2736,7 @@ lua_State *L; if (tmpobj.id == STATUE || tmpobj.id == EGG || tmpobj.id == CORPSE || tmpobj.id == TIN) { int lflags = 0; - const char *montype = get_table_str_opt(L, "montype", NULL); + char *montype = get_table_str_opt(L, "montype", NULL); if (montype) { struct permonst *pm = NULL; @@ -2754,6 +2754,7 @@ lua_State *L; tmpobj.corpsenm = monsndx(pm); else nhl_error(L, "Unknown montype"); + free(montype); } if (tmpobj.id == STATUE) { lflags |= (get_table_boolean_opt(L, "historic", 0) ? STATUE_HISTORIC : 0x00); From 791657f4e68fa0e7b4482e54f163745b77e31aa0 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 20 Nov 2019 20:09:16 +0200 Subject: [PATCH 273/529] Fix memory leaks in lua integration --- src/nhlsel.c | 1 + src/sp_lev.c | 27 +++++++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/nhlsel.c b/src/nhlsel.c index d5b78f0b5..9fe66047c 100644 --- a/src/nhlsel.c +++ b/src/nhlsel.c @@ -93,6 +93,7 @@ lua_State *L; sel->hei = tmp->hei; sel->map = dupstr(tmp->map); selection_free(tmp); + free(tmp); return sel; } diff --git a/src/sp_lev.c b/src/sp_lev.c index a25af7435..2a4e13b79 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -3739,6 +3739,7 @@ int dir; selection_setpoint(x, y, ov, 1); selection_free(tmp); + free(tmp); } static int FDECL((*selection_flood_check_func), (int, int)); @@ -3850,6 +3851,7 @@ boolean diagonals; #undef SEL_FLOOD_STACK #undef SEL_FLOOD_CHKDIR selection_free(tmp); + free(tmp); } /* McIlroy's Ellipse Algorithm */ @@ -4489,7 +4491,9 @@ struct selectionvar *ov; res = FALSE; gotitdone: selection_free(ov2); + free(ov2); selection_free(ov3); + free(ov3); return res; } @@ -4534,6 +4538,7 @@ ensure_way_out() outhere: ; } while (!ret); selection_free(ov); + free(ov); } int @@ -5081,6 +5086,7 @@ lua_State *L; { int prop = W_NONDIGGABLE; int argc = lua_gettop(L); + boolean freesel = FALSE; struct selectionvar *sel = (struct selectionvar *) 0; /* REVIEW: compiler warning, all assignments conditional @@ -5091,14 +5097,18 @@ lua_State *L; if (argc == 1) sel = l_selection_check(L, -1); else if (argc == 0) { + freesel = TRUE; sel = selection_new(); selection_not(sel); } - if (sel) + if (sel) { selection_iterate(sel, sel_set_wall_property, (genericptr_t) &prop); - - /* TODO: Free(sel)? */ + if (freesel) { + selection_free(sel); + free(sel); + } + } return 0; } @@ -5111,6 +5121,7 @@ lua_State *L; { int prop = W_NONPASSWALL; int argc = lua_gettop(L); + boolean freesel = FALSE; struct selectionvar *sel = (struct selectionvar *) 0; /* REVIEW: compiler warning, all assignments conditional @@ -5121,14 +5132,18 @@ lua_State *L; if (argc == 1) sel = l_selection_check(L, -1); else if (argc == 0) { + freesel = TRUE; sel = selection_new(); selection_not(sel); } - if (sel) + if (sel) { selection_iterate(sel, sel_set_wall_property, (genericptr_t) &prop); - - /* TODO: Free(sel)? */ + if (freesel) { + selection_free(sel); + free(sel); + } + } return 0; } From a338f8bd8888dbf21ecfc1228925e71bf00fa6a1 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 20 Nov 2019 21:07:00 +0200 Subject: [PATCH 274/529] Fix wizmakemap calling mklev twice --- src/cmd.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index dda11d2b0..8bd50d1c4 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -839,10 +839,6 @@ boolean pre, wiztower; zero_nhfile(&tmpnhfp); /* also sets fd to -1 as desired */ tmpnhfp.mode = FREEING; savelev(&tmpnhfp, ledger_no(&u.uz)); - /* create a new level; various things like bestowing a guardian - angel on Astral or setting off alarm on Ft.Ludios are handled - by goto_level(do.c) so won't occur for replacement levels */ - mklev(); } else { vision_reset(); g.vision_full_recalc = 1; From cb4d350424f4e70b62c24f6c1a98223b1fc51afe Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 20 Nov 2019 21:20:35 +0200 Subject: [PATCH 275/529] Fix unnecessary string copy --- src/nhlua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nhlua.c b/src/nhlua.c index 7898879bb..1347fc3ac 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -119,7 +119,7 @@ const char *name; const char *value; { lua_pushstring(L, name); - lua_pushstring(L, dupstr(value)); + lua_pushstring(L, value); lua_rawset(L, -3); } void From a62d6145bdfee7666a41946315045512d9fbc08e Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 21 Nov 2019 17:43:55 -0800 Subject: [PATCH 276/529] fix part of #H9397 - hallucinatory mon names Fix the issue where a hallucinatory monster name which begins with a slash is having that stripped off as if it was a gendor and/or personal-name flag. The main issue was pronouns ignoring hallucination and this doesn't attempt to address that. Also, add new hallucinatory name "leathery-winged avian" which has been lurking for a while. --- dat/bogusmon.txt | 5 ++++- doc/fixes36.3 | 3 ++- src/do_name.c | 9 +++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dat/bogusmon.txt b/dat/bogusmon.txt index 8f88d3f60..a4ac2389d 100644 --- a/dat/bogusmon.txt +++ b/dat/bogusmon.txt @@ -1,4 +1,4 @@ -# NetHack 3.6 bogusmon.txt $NHDT-Date: 1524689579 2018/04/25 20:52:59 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.7 $ +# NetHack 3.6 bogusmon.txt $NHDT-Date: 1574387024 2019/11/22 01:43:44 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.8 $ # Copyright (c) 2016 by Pasi Kallinen # NetHack may be freely redistributed. See license for details. # @@ -189,6 +189,9 @@ Dalek microscopic space fleet Ravenous Bugblatter Beast of Traal +# The Tough Guide to Fantasyland +leathery-winged avian + # TMNT teenage mutant ninja turtle diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 07a97fe56..4f7ec8ea6 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.184 $ $NHDT-Date: 1574107001 2019/11/18 19:56:41 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.187 $ $NHDT-Date: 1574387029 2019/11/22 01:43:49 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -291,6 +291,7 @@ Fixes post-beta1 fix several tribute typos pluralization correction for unlikely epoch and loch ensure that --showpaths displays the personal configuration file last +don't strip leading slash from hallucinatory monster name "/b/tard" unix: Fix double DLB definition in linux hints file windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix diff --git a/src/do_name.c b/src/do_name.c index c8965a706..354850a81 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_name.c $NHDT-Date: 1573940540 2019/11/16 21:42:20 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.150 $ */ +/* NetHack 3.6 do_name.c $NHDT-Date: 1574387027 2019/11/22 01:43:47 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.151 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1738,8 +1738,8 @@ boolean called; Strcat(buf, "saddled "); has_adjectives = (buf[0] != '\0'); - /* Put the actual monster name or type into the buffer now */ - /* Be sure to remember whether the buffer starts with a name */ + /* Put the actual monster name or type into the buffer now. + Remember whether the buffer starts with a personal name. */ if (do_hallu) { char rnamecode; char *rname = rndmonnam(&rnamecode); @@ -2019,11 +2019,12 @@ STATIC_OVL char * bogusmon(buf, code) char *buf, *code; { + static const char bogon_codes[] = "-_+|="; /* see dat/bonusmon.txt */ char *mname = buf; get_rnd_text(BOGUSMONFILE, buf, rn2_on_display_rng); /* strip prefix if present */ - if (!letter(*mname)) { + if (index(bogon_codes, *mname)) { if (code) *code = *mname; ++mname; From 3545374e9cf0348a7bfb448cd17ac28d63fe0ea3 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 21 Nov 2019 23:41:11 -0500 Subject: [PATCH 277/529] internal self-recover fix and bones name buffers --- doc/fixes37.0 | 2 + include/decl.h | 7 +- src/files.c | 192 ++++++++++++++++++++++++++++++----------- sys/winnt/Makefile.msc | 1 + sys/winnt/windmain.c | 4 + 5 files changed, 154 insertions(+), 52 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index ce51bf64f..08e5903a4 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -7,6 +7,8 @@ hero polymorphed into a vampire can use #monster to shape-shift rather than just do a one-shot polymorph into bat/cloud/wolf and shifted vampire hero can use #monster again to take on another form (randomly chosen among the shiftable shapes and true vampire form) +adjust bones filename buffer sizes to accommodate suffix +fix internal self-recover to work with recent fields added to checkpoint file Fixes to Pre-3.7.0 Problems that Were Exposed Via git Repository diff --git a/include/decl.h b/include/decl.h index c57eafc18..4cd23a7bc 100644 --- a/include/decl.h +++ b/include/decl.h @@ -10,7 +10,7 @@ #if !defined(MICRO) && !defined(VMS) && !defined(WIN32) #define LOCKNAMESIZE (PL_NSIZ + 14) /* long enough for uid+name+.99 */ #define LOCKNAMEINIT "1lock" -#define BONESINIT "bonesnn.xxx" +#define BONESINIT "bonesnn.xxx.le" #define BONESSIZE sizeof(BONESINIT) #else #if defined(MICRO) @@ -22,13 +22,13 @@ #if defined(VMS) #define LOCKNAMESIZE (PL_NSIZ + 17) /* long enough for _uid+name+.99;1 */ #define LOCKNAMEINIT "1lock" -#define BONESINIT "bonesnn.xxx;1" +#define BONESINIT "bonesnn.xxx_le;1" #define BONESSIZE sizeof(BONESINIT) #endif #if defined(WIN32) #define LOCKNAMESIZE (PL_NSIZ + 25) /* long enough for username+-+name+.99 */ #define LOCKNAMEINIT "" -#define BONESINIT "bonesnn.xxx" +#define BONESINIT "bonesnn.xxx.le" #define BONESSIZE sizeof(BONESINIT) #endif #endif @@ -170,6 +170,7 @@ struct sinfo { int exiting; /* an exit handler is executing */ int in_moveloop; int in_impossible; + int in_self_recover; #ifdef PANICLOG int in_paniclog; #endif diff --git a/src/files.c b/src/files.c index 6677f3e64..eb8f09756 100644 --- a/src/files.c +++ b/src/files.c @@ -757,12 +757,12 @@ d_level *lev; char *dptr; /* - * "bonD0.nn" = bones for level nn in the main dungeon; - * "bonM0.T" = bones for Minetown; - * "bonQBar.n" = bones for level n in the Barbarian quest; - * "bon3D0.nn" = \ - * "bon3M0.T" = > same as above, but for bones pool #3. - * "bon3QBar.n" = / + * "bonD0.nn.le" = bones for level nn in the main dungeon; + * "bonM0.T.le" = bones for Minetown; + * "bonQBar.n.le" = bones for level n in the Barbarian quest; + * "bon3D0.nn.le" = \ + * "bon3M0.T.le" = > same as above, but for bones pool #3. + * "bon3QBar.n.le" = / * * Return value for content validation skips "bon" and the * pool number (if present), making it feasible for the admin @@ -1032,6 +1032,17 @@ boolean regularize_it; if (idx > historical && idx <= ascii) sfindicator = sfoprocs[idx].ext; #endif + if (g.program_state.in_self_recover) { + /* self_recover needs to be done as historical + structlevel content until that process is + re-written to use something other than + copy_bytes() to retrieve data content from + level files (which are structlevel) and + place it into the save file. + */ + idx = historical; + sfindicator = sfoprocs[idx].ext; + } #ifdef VMS Sprintf(g.SAVEF, "[.save]%d%s", getuid(), g.plname); regoffset = 7; @@ -1108,7 +1119,7 @@ boolean regularize_it; (idx == lendian) ? 'l' : (idx == ascii) ? 'a' : '\0'; } - sfindicator = sfoprocs[idx].ext; + sfindicator = (g.program_state.in_self_recover) ? "" : sfoprocs[idx].ext; #endif #endif } else @@ -1176,6 +1187,7 @@ create_savefile() int failed = 0; const char *fq_save; NHFILE *nhfp = (NHFILE *) 0; + boolean do_historical = TRUE; fq_save = fqname(g.SAVEF, SAVEPREFIX, 0); nhfp = new_nhfile(); @@ -1186,7 +1198,21 @@ create_savefile() nhfp->mode = WRITING; #ifdef SYSCF if (sysopt.saveformat[0] > historical && - sysopt.saveformat[0] <= ascii) { + sysopt.saveformat[0] <= ascii) + do_historical = FALSE; +#endif /* SYSCF */ + if (g.program_state.in_self_recover) { + do_historical = TRUE; /* force it */ + nhfp->structlevel = TRUE; + nhfp->fieldlevel = FALSE; + nhfp->addinfo = FALSE; + nhfp->style.deflt = FALSE; + nhfp->style.binary = TRUE; + nhfp->fnidx = historical; + nhfp->fd = -1; + nhfp->fpdef = (FILE *) 0; + } + if (!do_historical) { nhfp->structlevel = FALSE; nhfp->fieldlevel = TRUE; nhfp->addinfo = TRUE; @@ -1203,7 +1229,6 @@ create_savefile() failed = errno; } } -#endif /* SYSCF */ if (nhfp->structlevel) { #if defined(MICRO) || defined(WIN32) nhfp->fd = open(fq_save, O_WRONLY | O_BINARY | O_CREAT | O_TRUNC, FCMASK); @@ -1240,6 +1265,7 @@ open_savefile() int failed = 0; const char *fq_save; NHFILE *nhfp = (NHFILE *) 0; + boolean do_historical = TRUE; fq_save = fqname(g.SAVEF, SAVEPREFIX, 0); nhfp = new_nhfile(); @@ -1250,7 +1276,21 @@ open_savefile() nhfp->mode = READING; #ifdef SYSCF if (sysopt.saveformat[0] > historical && - sysopt.saveformat[0] <= ascii) { + sysopt.saveformat[0] <= ascii) + do_historical = FALSE; +#endif /* SYSCF */ + if (g.program_state.in_self_recover) { + do_historical = TRUE; /* force it */ + nhfp->structlevel = TRUE; + nhfp->fieldlevel = FALSE; + nhfp->addinfo = FALSE; + nhfp->style.deflt = FALSE; + nhfp->style.binary = TRUE; + nhfp->fnidx = historical; + nhfp->fd = -1; + nhfp->fpdef = (FILE *) 0; + } + if (!do_historical) { nhfp->structlevel = FALSE; nhfp->fieldlevel = TRUE; nhfp->addinfo = TRUE; @@ -1267,7 +1307,6 @@ open_savefile() failed = errno; } } -#endif /* SYSCF */ if (nhfp->structlevel) { #ifdef MAC nhfp->fd = macopen(fq_save, O_RDONLY | O_BINARY, SAVE_TYPE); @@ -3943,14 +3982,15 @@ boolean recover_savefile() { NHFILE *gnhfp, *lnhfp, *snhfp; - int lev, savelev, hpid, pltmpsiz; + int lev, savelev, hpid, pltmpsiz, filecmc; xchar levc; struct version_info version_data; int processed[256]; - char savename[SAVESIZE], errbuf[BUFSZ]; + char savename[SAVESIZE], errbuf[BUFSZ], indicator; struct savefile_info sfi; char tmpplbuf[PL_NSIZ]; - + const char *savewrite_failure = (const char *) 0; + for (lev = 0; lev < 256; lev++) processed[lev] = 0; @@ -3985,6 +4025,10 @@ recover_savefile() } if ((read(gnhfp->fd, (genericptr_t) savename, sizeof savename) != sizeof savename) + || (read(gnhfp->fd, (genericptr_t) &indicator, sizeof indicator) + != sizeof indicator) + || (read(gnhfp->fd, (genericptr_t) &filecmc, sizeof filecmc) + != sizeof filecmc) || (read(gnhfp->fd, (genericptr_t) &version_data, sizeof version_data) != sizeof version_data) || (read(gnhfp->fd, (genericptr_t) &sfi, sizeof sfi) != sizeof sfi) @@ -3997,6 +4041,7 @@ recover_savefile() } /* save file should contain: + * format indicator and cmc * version info * savefile info * player name @@ -4004,6 +4049,22 @@ recover_savefile() * (non-level-based) game state * other levels */ + + /* + * Things are different now. We could be in a situation + * where the default save file format is not structlevel. + * self-recover is currently written to use copy_bytes() + * to move content from the level files into the savefile. + * Until the code is updated to use something other than + * copy_bytes, what we need to do is force the recovery + * save to be structlevel, finish creating it, then read + * it back in. The save after that can be fieldlevel again. + * + * Set a flag for the savefile routines to know the + * circumstances and act accordingly: + * g.program_state.in_self_recover + */ + g.program_state.in_self_recover = TRUE; set_savefile_name(TRUE); snhfp = create_savefile(); if (!snhfp) { @@ -4021,47 +4082,66 @@ recover_savefile() return FALSE; } - if (write(snhfp->fd, (genericptr_t) &version_data, sizeof version_data) - != sizeof version_data) { - raw_printf("\nError writing %s; recovery failed.", g.SAVEF); - close_nhfile(gnhfp); - close_nhfile(snhfp); - close_nhfile(lnhfp); - delete_savefile(); - return FALSE; + /* + * Our savefile output format might _not_ be structlevel. + * We have to check and use the correct output routine here. + */ + /*store_formatindicator(snhfp); */ + store_version(snhfp); +#if 0 + if (snhfp->structlevel) { + if (write(snhfp->fd, (genericptr_t) &version_data, sizeof version_data) + != sizeof version_data) + savewrite_failure = "version_info"; } - - if (write(snhfp->fd, (genericptr_t) &sfi, sizeof sfi) != sizeof sfi) { - raw_printf("\nError writing %s; recovery failed (savefile_info).\n", - g.SAVEF); - close_nhfile(gnhfp); - close_nhfile(snhfp); - close_nhfile(lnhfp); - delete_savefile(); - return FALSE; + if (snhfp->fieldlevel) { + sfo_version_info(snhfp, (struct version_info *) &version_data, + "version", "version_info", 1); + savewrite_failure = (const char *) 0; } + if (savewrite_failure) + goto cleanup; +#endif - if (write(snhfp->fd, (genericptr_t) &pltmpsiz, sizeof pltmpsiz) - != sizeof pltmpsiz) { - raw_printf("Error writing %s; recovery failed (player name size).\n", - g.SAVEF); - close_nhfile(gnhfp); - close_nhfile(snhfp); - close_nhfile(lnhfp); - delete_savefile(); - return FALSE; + if (snhfp->structlevel) { + if (write(snhfp->fd, (genericptr_t) &sfi, sizeof sfi) != sizeof sfi) + savewrite_failure = "savefileinfo"; } - - if (write(snhfp->fd, (genericptr_t) &tmpplbuf, pltmpsiz) != pltmpsiz) { - raw_printf("Error writing %s; recovery failed (player name).\n", - g.SAVEF); - close_nhfile(gnhfp); - close_nhfile(snhfp); - close_nhfile(lnhfp); - delete_savefile(); - return FALSE; + if (snhfp->fieldlevel) { + sfo_savefile_info(snhfp, &sfsaveinfo, "savefileinfo", "savefile_info", 1); + savewrite_failure = (const char *) 0; } + if (savewrite_failure) + goto cleanup; + if (snhfp->structlevel) { + if (write(snhfp->fd, (genericptr_t) &pltmpsiz, sizeof pltmpsiz) + != sizeof pltmpsiz) + savewrite_failure = "player name size"; + } + if (snhfp->fieldlevel) { + sfo_int(snhfp, &pltmpsiz, "plname", "plname_size", 1); + savewrite_failure = (const char *) 0; + } + if (savewrite_failure) + goto cleanup; + + if (snhfp->structlevel) { + if (write(snhfp->fd, (genericptr_t) &tmpplbuf, pltmpsiz) != pltmpsiz) + savewrite_failure = "player name"; + } + if (snhfp->fieldlevel) { + sfo_str(snhfp, tmpplbuf, "plname", "tmpplbuf", pltmpsiz); + savewrite_failure = (const char *) 0; + } + if (savewrite_failure) + goto cleanup; + + /* + * copy_bytes isn't good enough anymore. + * We could be reading from a structlevel file but + * writing into a fieldlevel save file. Yikes! + */ if (!copy_bytes(lnhfp->fd, snhfp->fd)) { close_nhfile(gnhfp); close_nhfile(snhfp); @@ -4116,6 +4196,20 @@ recover_savefile() (void) unlink(fq_lock); } } + cleanup: + if (savewrite_failure) { + raw_printf("\nError writing %s; recovery failed (%s).\n", + g.SAVEF, savewrite_failure); + close_nhfile(gnhfp); + close_nhfile(snhfp); + close_nhfile(lnhfp); + g.program_state.in_self_recover = FALSE; + delete_savefile(); + return FALSE; + } + /* we don't clear g.program_state.in_self_recover here, we + leave it as a flag to reload the structlevel savefile + in the caller. The caller should then clear it. */ return TRUE; } diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index a4449bf76..484f5576e 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -2027,6 +2027,7 @@ $(O)vision.o: vision.c $(HACK_H) $(INCL)\vis_tab.h $(O)weapon.o: weapon.c $(HACK_H) $(O)were.o: were.c $(HACK_H) $(O)wield.o: wield.c $(HACK_H) +$(O)windmain.o: $(MSWSYS)\windmain.c $(HACK_H) #$(O)windows.o: windows.c $(HACK_H) $(INCL)\wingem.h $(INCL)\winGnome.h $(O)wizard.o: wizard.c $(HACK_H) $(INCL)\qtext.h $(O)worm.o: worm.c $(HACK_H) $(INCL)\lev.h diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 56b4e3c6f..9b2e8f4be 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -503,6 +503,10 @@ attempt_restore: } } } + if (g.program_state.in_self_recover) { + g.program_state.in_self_recover = FALSE; + set_savefile_name(TRUE); + } } if (!resuming) { From 5cad6a15dca7fdaee25412bc80649306d609bb16 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 22 Nov 2019 09:24:19 +0200 Subject: [PATCH 278/529] More hallu monsters --- dat/bogusmon.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dat/bogusmon.txt b/dat/bogusmon.txt index a4ac2389d..7179c8b11 100644 --- a/dat/bogusmon.txt +++ b/dat/bogusmon.txt @@ -80,6 +80,15 @@ tofurkey shrinking violet shallow one spherical cow +electric giraffe +steam dragon +omnibus +slinky +maxotaur +octahedron +dungeon core +quale +holloway # Quendor (Zork, &c.) grue @@ -242,6 +251,7 @@ corpulent porpoise quokka potoo lemming +dhole # european cryptids wolpertinger @@ -278,6 +288,7 @@ netsplit wiki peer COBOL +wire shark # bugs bohrbug @@ -329,6 +340,7 @@ bold face boustrophedon ligature rebus +dinkus # Their actual character apostrophe golem @@ -339,6 +351,10 @@ voluptuous ampersand +Strong Bad +Magical Trevor +# Girl Genius +smakken +mimmoth + # KoL one-winged dewinged stab-bat @@ -427,6 +443,9 @@ womble # Fraggle Rock fraggle +# Harry Harrison +stainless steel rat + # Spoonerism mock role @@ -478,6 +497,7 @@ geriatric snake gnat ant giant bath grant beetle +greater snake grind bug giant mango glossy golem From d4df876a6f8247f0f5b6bc6df8cbe58776d525fb Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 22 Nov 2019 02:46:28 -0800 Subject: [PATCH 279/529] docall fix Noticed while testing something: hero drank a potion of see invisible and nearby invisible monster could now be seen--in theory--but I was asked what to call the potion while the updated map was buffered. So I didn't see the invisible monster until after naming the potion. pline() flushes buffered map updates, but getlin() doesn't. I didn't change that, but I've made docall() do so since the updated map may make a difference in what the player can tell about whatever is being 'called'. --- doc/fixes36.3 | 5 ++++- src/do_name.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 4f7ec8ea6..978496348 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.187 $ $NHDT-Date: 1574387029 2019/11/22 01:43:49 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.188 $ $NHDT-Date: 1574419578 2019/11/22 10:46:18 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -292,6 +292,9 @@ fix several tribute typos pluralization correction for unlikely epoch and loch ensure that --showpaths displays the personal configuration file last don't strip leading slash from hallucinatory monster name "/b/tard" +quaffing unknown potion of see invisible resulted in asking what to call the + potion while updated monster display was buffered so not yet shown, + hence potentially noticeable effect was concealed from player unix: Fix double DLB definition in linux hints file windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix diff --git a/src/do_name.c b/src/do_name.c index 354850a81..ed0eea5a1 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_name.c $NHDT-Date: 1574387027 2019/11/22 01:43:47 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.151 $ */ +/* NetHack 3.6 do_name.c $NHDT-Date: 1574419578 2019/11/22 10:46:18 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.152 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1473,6 +1473,7 @@ struct obj *obj; if (!obj->dknown) return; /* probably blind */ + flush_screen(1); /* buffered updates might matter to player's response */ if (obj->oclass == POTION_CLASS && obj->fromsink) /* kludge, meaning it's sink water */ From 7af479767158d602e780208361fee98819acb788 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 22 Nov 2019 07:40:17 -0500 Subject: [PATCH 280/529] when decl.h changes, ensure windmain is rebuilt --- sys/winnt/Makefile.gcc | 1 + sys/winnt/Makefile.msc | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 9bb2f920e..e9d7bbf6e 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -1753,6 +1753,7 @@ $(O)vision.o: vision.c $(HACK_H) $(INCL)/vis_tab.h $(O)weapon.o: weapon.c $(HACK_H) $(O)were.o: were.c $(HACK_H) $(O)wield.o: wield.c $(HACK_H) +$(O)windmain.o: $(MSWSYS)\windmain.c $(HACK_H) $(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h $(O)wizard.o: wizard.c $(HACK_H) $(INCL)/qtext.h $(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 8a9eb0d2f..8e0da5bd4 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -1745,6 +1745,7 @@ $(O)vision.o: vision.c $(HACK_H) $(INCL)\vis_tab.h $(O)weapon.o: weapon.c $(HACK_H) $(O)were.o: were.c $(HACK_H) $(O)wield.o: wield.c $(HACK_H) +$(O)windmain.o: $(MSWSYS)\windmain.c $(HACK_H) #$(O)windows.o: windows.c $(HACK_H) $(INCL)\wingem.h $(INCL)\winGnome.h $(O)wizard.o: wizard.c $(HACK_H) $(INCL)\qtext.h $(O)worm.o: worm.c $(HACK_H) $(INCL)\lev.h From c8af8e23c12a41db0251d192dad3579e8f9a57cd Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 22 Nov 2019 07:45:43 -0500 Subject: [PATCH 281/529] slash vs backslash Makefile bit --- sys/winnt/Makefile.gcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index e9d7bbf6e..d19532369 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -1753,7 +1753,7 @@ $(O)vision.o: vision.c $(HACK_H) $(INCL)/vis_tab.h $(O)weapon.o: weapon.c $(HACK_H) $(O)were.o: were.c $(HACK_H) $(O)wield.o: wield.c $(HACK_H) -$(O)windmain.o: $(MSWSYS)\windmain.c $(HACK_H) +$(O)windmain.o: $(MSWSYS)/windmain.c $(HACK_H) $(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h $(O)wizard.o: wizard.c $(HACK_H) $(INCL)/qtext.h $(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h From ce46c97e6e6749fc1107db64db7bc1475d00193b Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 22 Nov 2019 18:16:59 -0800 Subject: [PATCH 282/529] fix #H9375 - unintended Rider corpse suppression Don't let Riders swap places with something (fog or ooze, perhaps) located at a closed door spot because if it gets killed there, there won't be any corpse and it will stop auto-reviving. Just avoid moving to spots where mondied() won't place a corpse instead of worrying about whether a bargethrough creature (if there ever are any besides the Riders) might be able to survive at the destination (so ignore pass-walls, door-opening, swimming, &c). --- doc/fixes36.3 | 7 ++++++- src/monmove.c | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 978496348..e50f1b296 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.188 $ $NHDT-Date: 1574419578 2019/11/22 10:46:18 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.189 $ $NHDT-Date: 1574475416 2019/11/23 02:16:56 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -295,6 +295,11 @@ don't strip leading slash from hallucinatory monster name "/b/tard" quaffing unknown potion of see invisible resulted in asking what to call the potion while updated monster display was buffered so not yet shown, hence potentially noticeable effect was concealed from player +when Riders use their bargethrough capability, don't let them swap places with + something located at a spot where corpses can't be created (their + door opening ability was letting them exchange places with something + co-located with a closed door without opening it; if killed there, + there'd be no corpse so no auto-revive) unix: Fix double DLB definition in linux hints file windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix diff --git a/src/monmove.c b/src/monmove.c index 2f7ae6f5c..c4833c131 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 monmove.c $NHDT-Date: 1557094802 2019/05/05 22:20:02 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.113 $ */ +/* NetHack 3.6 monmove.c $NHDT-Date: 1574475416 2019/11/23 02:16:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.114 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1605,8 +1605,8 @@ register struct monst *mtmp; */ boolean undesirable_disp(mtmp, x, y) -struct monst *mtmp; -xchar x, y; +struct monst *mtmp; /* barging creature */ +xchar x, y; /* spot 'mtmp' is considering moving to */ { boolean is_pet = (mtmp && mtmp->mtame && !mtmp->isminion); struct trap *trap = t_at(x, y); @@ -1625,6 +1625,17 @@ xchar x, y; return TRUE; } + /* oversimplification: creatures that bargethrough can't do so when + target monster is in rock or closed door or water (in particular, + avoid moving to spots where mondied() won't leave a corpse) */ + if (!accessible(x, y) + /* mondied() allows ispool() as an exception to !accessible(), + but we'll only do that if both or neither of mtmp's spot and + destination spot are water so that we don't swap a water + critter onto land or the inverse */ + && (!is_pool(x, y) ^ !is_pool(mtmp->mx, mtmp->my))) + return TRUE; + return FALSE; } From 1e0c03b3f6f2e7b67df7098d13de95f5ba5fcc78 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 22 Nov 2019 22:35:48 -0500 Subject: [PATCH 283/529] incremental improvements to cross-compiling support in NetHack 3.7 Some support of new code #defines to faciliate cross-compiling: OPTIONS_AT_RUNTIME If this is defined, code to support obtaining the compile time options and features is included. If you define this, you'll also have to compile sys/mdlib.c and link the resulting object file into your game binary/executable. CROSSCOMPILE Flags that this is a cross-compiled NetHack build, where there are two stages: 1. makedefs and some other utilities are compiled on the host platform and executed there to generate some output files and header files needed by the game. 2. the NetHack game files are compiled by a cross-compiler to generate binary/executables for a different platform than the one the build is being run on. The executables produced for the target platform may not be able to execute on the build platform, except perhaps via a software emulator. The 2-stage process (1. host, 2.target) can be done on the same platform to test the cross-compile process. In that case, the host and target platforms would be the same. CROSSCOMPILE_HOST Separates/identifies code paths that should only be be included in the compile on the host side, for utilities that will be run on the host as part of stage 1 to produce output files needed to build the game. Examples are the code for makedefs, tile conversion utilities, uudecode, dlb, etc. CROSSCOMPILE_TARGET Separates/identifies code paths that should be included on the build for the target platform during stage 2, the cross-compiler stage. That includes most of the pieces of the game itself but the code is only flagged as such if it must not execute on the host. If you don't define any of those, things should build as before. One follow-on change that is likely required is setting the new dependency makedefs has on src/mdlib.c in Makefiles etc. More information about the changes: makedefs - splinter off some of makedefs functionality into a separate file called src/mdlib.c. - src/mdlib.c, while included during the compile of makedefs.c for producing the makedefs utility, can also be compiled as a stand-alone object file for inclusion in the link step of your NetHack game build. The src/mdlib.c code can then deliver the same functionality that it provided to makedefs right to your NetHack game code at run-time. For example, do_runtime_info() will provide the caller with the features and options that were built into the game. Previously, that information was produced at build time on the host and stored in a dat file. Under a cross-compile situation, those values are highly suspect and might not even reflect the correct options and setting for the cross-compiled target platform's binary/executable. The compile of those values and the functionality to obtain them needs to move to the target cross-compiler stage of the build (stage 2). - date information on the target-side binary is produced from the cross-compiler preprocessor pre-defined macros __DATE__ and __TIME__, as they reflect the actual compile time of the cross-compiled target and not host-side execution of a utility to produce them. The cross-compiler itself, through those pre-defined preprocessor macros, provides them to the target platform binary/executable. They reflect the actual build time of the target binary/executable (not values produced at the time the makefiles utility was built and the appropriate option selected to store them in a text file.) - most Makefiles should not require adding the new file src/mdlib.c because util/makedefs.c has a preprocessor include "../src/mdlib.c" to draw in its contents. As previously stated though, the Makefile dependency may be required: makedefs.o: ../util/makedefs.c ../src/mdlib.c ^^^^^^^^^^^^^^^ --- include/artilist.h | 6 +- include/extern.h | 26 +- include/global.h | 35 ++ include/qtext.h | 6 +- include/sfproto.h | 4 +- include/system.h | 5 +- src/allmain.c | 3 + src/mdlib.c | 761 +++++++++++++++++++++++++++++++ src/sfdata.c | 7 +- src/version.c | 70 ++- sys/msdos/Makefile1.cross | 33 +- sys/msdos/Makefile2.cross | 615 ++++++++++--------------- sys/msdos/msdos-cross-compile.sh | 60 +++ sys/winnt/Makefile.msc | 238 ++++++---- util/makedefs.c | 642 +++----------------------- util/readtags.c | 59 ++- win/win32/mhmain.c | 12 +- win/win32/mhsplash.c | 4 + 18 files changed, 1501 insertions(+), 1085 deletions(-) create mode 100644 src/mdlib.c create mode 100644 sys/msdos/msdos-cross-compile.sh diff --git a/include/artilist.h b/include/artilist.h index 4a8b40554..d7b8f250c 100644 --- a/include/artilist.h +++ b/include/artilist.h @@ -3,7 +3,7 @@ /*-Copyright (c) Robert Patrick Rankin, 2017. */ /* NetHack may be freely redistributed. See license for details. */ -#ifdef MAKEDEFS_C +#if defined(MAKEDEFS_C) || defined (MDLIB_C) /* in makedefs.c, all we care about is the list of names */ #define A(nam, typ, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost, clr) nam @@ -32,7 +32,7 @@ static const char *artifact_names[] = { /* clang-format on */ static NEARDATA struct artifact artilist[] = { -#endif /* MAKEDEFS_C */ +#endif /* MAKEDEFS_C || MDLIB_C */ /* Artifact cost rationale: * 1. The more useful the artifact, the better its cost. @@ -256,7 +256,7 @@ A("The Palantir of Westernesse", CRYSTAL_BALL, #undef A -#ifndef MAKEDEFS_C +#if !defined(MAKEDEFS_C) && !defined(MDLIB_C) #undef NO_ATTK #undef NO_DFNS #undef DFNS diff --git a/include/extern.h b/include/extern.h index aba2bdcfd..08ca0b29a 100644 --- a/include/extern.h +++ b/include/extern.h @@ -16,7 +16,7 @@ E char *FDECL(fmt_ptr, (const genericptr)); /* This next pre-processor directive covers almost the entire file, * interrupted only occasionally to pick up specific functions as needed. */ -#if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C) +#if !defined(MAKEDEFS_C) && !defined(MDLIB_C) && !defined(LEV_LEX_C) /* ### allmain.c ### */ @@ -583,10 +583,10 @@ E boolean FDECL(hurtle_jump, (genericptr_t, int, int)); E boolean FDECL(hurtle_step, (genericptr_t, int, int)); /* ### drawing.c ### */ -#endif /* !MAKEDEFS_C && !LEV_LEX_C */ +#endif /* !MAKEDEFS_C && !MDLIB_C && !LEV_LEX_C */ E int FDECL(def_char_to_objclass, (CHAR_P)); E int FDECL(def_char_to_monclass, (CHAR_P)); -#if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C) +#if !defined(MAKEDEFS_C) && !defined(MDLIB_C) && !defined(LEV_LEX_C) E void FDECL(switch_symbols, (int)); E void FDECL(assign_graphics, (int)); E void NDECL(init_symbols); @@ -713,9 +713,9 @@ E int NDECL(done2); E void FDECL(done_intr, (int)); #endif E void FDECL(done_in_by, (struct monst *, int)); -#endif /* !MAKEDEFS_C && !LEV_LEX_C */ +#endif /* !MAKEDEFS_C && MDLIB_C && !LEV_LEX_C */ E void VDECL(panic, (const char *, ...)) PRINTF_F(1, 2) NORETURN; -#if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C) +#if !defined(MAKEDEFS_C) && !defined(MDLIB_C) && !defined(LEV_LEX_C) E void FDECL(done, (int)); E void FDECL(container_contents, (struct obj *, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P)); @@ -1663,10 +1663,14 @@ E char *NDECL(lan_username); #endif /* ### nhlsel.c ### */ +#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET) E struct selectionvar *FDECL(l_selection_check, (lua_State *, int)); E int FDECL(l_selection_register, (lua_State *)); +#endif /* ### nhlua.c ### */ + +#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET) E lua_State * NDECL(nhl_init); E boolean FDECL(nhl_loadlua, (lua_State *, const char *)); E boolean FDECL(load_lua, (const char *)); @@ -1685,14 +1689,21 @@ E int FDECL(get_table_boolean_opt, (lua_State *, const char *, int)); E int FDECL(get_table_option, (lua_State *, const char *, const char *, const char *const *)); E int FDECL(str_lines_max_width, (const char *)); E char *FDECL(stripdigits, (char *)); +#endif /* !CROSSCOMPILE || CROSSCOMPILE_TARGET */ /* ### nhregex.c ### */ + E struct nhregex *NDECL(regex_init); E boolean FDECL(regex_compile, (const char *, struct nhregex *)); E const char *FDECL(regex_error_desc, (struct nhregex *)); E boolean FDECL(regex_match, (const char *, struct nhregex *)); E void FDECL(regex_free, (struct nhregex *)); +/* ### mdlib.c ### */ + +E void NDECL(runtime_info_init); +E const char *FDECL(do_runtime_info, (int *)); + /* ### nttty.c ### */ #ifdef WIN32 @@ -2405,7 +2416,7 @@ E void NDECL(sysopt_release); E void FDECL(sysopt_seduce_set, (int)); /* ### sp_lev.c ### */ - +#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET) E boolean FDECL(check_room, (xchar *, xchar *, xchar *, xchar *, BOOLEAN_P)); E boolean FDECL(create_room, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P)); @@ -2434,6 +2445,7 @@ E void FDECL(set_floodfillchk_match_under, (XCHAR_P)); E void FDECL(selection_do_ellipse, (struct selectionvar *, int, int, int, int, int)); E void NDECL(update_croom); E void FDECL(l_register_des, (lua_State *)); +#endif /* !CROSSCOMPILE || CROSSCOMPILE_TARGET */ /* ### spell.c ### */ @@ -3069,7 +3081,7 @@ E int FDECL(destroy_mitem, (struct monst *, int, int)); E int FDECL(resist, (struct monst *, CHAR_P, int, int)); E void NDECL(makewish); -#endif /* !MAKEDEFS_C && !LEV_LEX_C */ +#endif /* !MAKEDEFS_C && !MDLIB_C && !LEV_LEX_C */ #undef E diff --git a/include/global.h b/include/global.h index e98cdf84d..7bc33dcd8 100644 --- a/include/global.h +++ b/include/global.h @@ -124,6 +124,41 @@ typedef uchar nhsym; #define LARGEST_INT 32767 #include "coord.h" + +#if defined(CROSSCOMPILE) +struct cross_target_s { + const char *build_date; + const char *copyright_banner_c; + const char *git_sha; + const char *git_branch; + const char *version_string; + const char *version_id; + unsigned long version_number; + unsigned long version_features; + unsigned long ignored_features; + unsigned long version_sanity1; + unsigned long version_sanity2; + unsigned long version_sanity3; + unsigned long build_time; +}; +extern struct cross_target_s cross_target; +#if defined(CROSSCOMPILE_TARGET) && !defined(MAKEDEFS_C) +#define BUILD_DATE cross_target.build_date /* "Wed Apr 1 00:00:01 2020" */ +#define COPYRIGHT_BANNER_C cross_target.copyright_banner_c +#define NETHACK_GIT_SHA cross_target.git_sha +#define NETHACK_GIT_BRANCH cross_target.git_branch +#define VERSION_ID cross_target.version_id +#define IGNORED_FEATURES cross_target.ignored_features +#define VERSION_FEATURES cross_target.version_features +#define VERSION_NUMBER cross_target.version_number +#define VERSION_SANITY1 cross_target.version_sanity1 +#define VERSION_SANITY2 cross_target.version_sanity2 +#define VERSION_SANITY3 cross_target.version_sanity3 +#define VERSION_STRING cross_target.version_string +#define BUILD_TIME cross_target.build_time /* (1574157640UL) */ +#endif /* CROSSCOMPILE_TARGET && !MAKEDEFS_C */ +#endif /* CROSSCOMPILE */ + /* * Automatic inclusions for the subsidiary files. * Please don't change the order. It does matter. diff --git a/include/qtext.h b/include/qtext.h index 752938423..29993d29a 100644 --- a/include/qtext.h +++ b/include/qtext.h @@ -15,7 +15,7 @@ struct qtmsg { long offset, size, summary_size; }; -#ifdef MAKEDEFS_C /***** MAKEDEFS *****/ +#if defined(MAKEDEFS_C) || defined(MDLIB_C) /***** MAKEDEFS *****/ #define N_MSG 100 /* arbitrary */ @@ -47,7 +47,7 @@ struct qthdr { "Too many messages in class (line %d)\nAdjust N_MSG in qtext.h and " \ "recompile.\n" -#else /***** !MAKEDEFS *****/ +#else /***** !MAKEDEFS && !MDLIB_C *****/ struct qtlists { struct qtmsg *common, @@ -113,6 +113,6 @@ struct qtlists { #define QTN_DEMONIC 20 #define QT_BANISHED 60 -#endif /***** !MAKEDEFS *****/ +#endif /***** !MAKEDEFS && !MDLIB_C *****/ #endif /* QTEXT_H */ diff --git a/include/sfproto.h b/include/sfproto.h index 7655f328a..bb30ac4f2 100644 --- a/include/sfproto.h +++ b/include/sfproto.h @@ -1,5 +1,5 @@ -/* NetHack 3.7 sfproto.h Tue Jun 25 09:57:33 2019 */ -/* Copyright (c) NetHack Development Team 2018. */ +/* NetHack 3.7 sfproto.h */ +/* Copyright (c) NetHack Development Team 2019. */ /* NetHack may be freely redistributed. See license for details. */ /* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE! */ diff --git a/include/system.h b/include/system.h index fe29cbf4c..265f46f98 100644 --- a/include/system.h +++ b/include/system.h @@ -527,7 +527,7 @@ E char *FDECL(tgetstr, (const char *, char **)); E char *FDECL(tgoto, (const char *, int, int)); #endif -#if defined(ALLOC_C) || defined(MAKEDEFS_C) +#if defined(ALLOC_C) || defined(MAKEDEFS_C) || defined(MDLIB_C) E genericptr_t FDECL(malloc, (size_t)); E genericptr_t FDECL(realloc, (genericptr_t, size_t)); #endif @@ -569,6 +569,7 @@ E int FDECL(atoi, (const char *)); #endif /* !__cplusplus && !__GO32__ */ #endif /* WIN32 */ +#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET) #include "lua.h" #include "lualib.h" #include "lauxlib.h" @@ -578,5 +579,5 @@ E int FDECL(atoi, (const char *)); #else #define LUA_INTCAST(i) (i) #endif - +#endif /* !CROSSCOMPILE || CROSSCOMPILE_TARGET */ #endif /* SYSTEM_H */ diff --git a/src/allmain.c b/src/allmain.c index 0c50a07df..96bd35c35 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -25,6 +25,9 @@ early_init() decl_globals_init(); objects_globals_init(); monst_globals_init(); +#if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) + runtime_info_init(); +#endif sys_early_init(); } diff --git a/src/mdlib.c b/src/mdlib.c new file mode 100644 index 000000000..6d3dcdd5d --- /dev/null +++ b/src/mdlib.c @@ -0,0 +1,761 @@ +/* NetHack 3.7 mdlib.c $NHDT-Date: 1562180226 2019/07/03 18:57:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.149 $ */ +/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ +/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ +/* Copyright (c) M. Stephenson, 1990, 1991. */ +/* Copyright (c) Dean Luick, 1990. */ +/* NetHack may be freely redistributed. See license for details. */ + +/* + * This can be linked into a binary to provide the functionality + * via the contained functions, or it can be #included directly + * into util/makedefs.c to provide it there. + */ + +#ifndef MAKEDEFS_C +#define MDLIB_C +#include "config.h" +#ifdef MONITOR_HEAP +#undef free /* makedefs, mdlib don't use the alloc and free in src/alloc.c */ +#endif +#include "permonst.h" +#include "objclass.h" +#include "monsym.h" +#include "artilist.h" +#include "dungeon.h" +#include "obj.h" +#include "monst.h" +#include "you.h" +#include "context.h" +#include "flag.h" +#include "dlb.h" +#include +/* version information */ +#ifdef SHORT_FILENAMES +#include "patchlev.h" +#else +#include "patchlevel.h" +#endif +#define Fprintf (void) fprintf +#define Fclose (void) fclose +#define Unlink (void) unlink +#if !defined(AMIGA) || defined(AZTEC_C) +#define rewind(fp) fseek((fp), 0L, SEEK_SET) /* guarantee a return value */ +#endif /* AMIGA || AZTEC_C */ + +#endif /* !MAKEDEFS_C */ + +void NDECL(build_options); +static char *FDECL(bannerc_string, (char *, const char *)); +static void FDECL(opt_out_words, (char *, int *)); +static void NDECL(build_savebones_compat_string); +static int idxopttext, done_runtime_opt_init_once = 0; +#define MAXOPT 30 +static char rttimebuf[MAXOPT]; +static char *opttext[ROWNO] = {0}; +char optbuf[BUFSZ]; +static struct version_info version; +static const char opt_indent[] = " "; + +#ifndef MAKEDEFS_C +static int FDECL(case_insensitive_comp, (const char *, const char *)); +static void NDECL(make_version); +static char *FDECL(version_id_string, (char *, const char *)); +static char *FDECL(version_string, (char *, const char *)); +static char *FDECL(eos, (char *)); +/* REPRODUCIBLE_BUILD will change this to TRUE */ +static boolean date_via_env = FALSE; +#endif /* !MAKEDEFS_C */ + +struct win_info { + const char *id, /* DEFAULT_WINDOW_SYS string */ + *name; /* description, often same as id */ +}; + +static struct win_info window_opts[] = { +#ifdef TTY_GRAPHICS + { "tty", + /* testing 'USE_TILES' here would bring confusion because it could + apply to another interface such as X11, so check MSDOS explicitly + instead; even checking TTY_TILES_ESCCODES would probably be + confusing to most users (and it will already be listed separately + in the compiled options section so users aware of it can find it) */ +#ifdef MSDOS + "traditional text with optional 'tiles' graphics" +#else + /* assume that one or more of IBMgraphics, DECgraphics, or MACgraphics + can be enabled; we can't tell from here whether that is accurate */ + "traditional text with optional line-drawing" +#endif + }, +#endif /*TTY_GRAPHICS */ +#ifdef CURSES_GRAPHICS + { "curses", "terminal-based graphics" }, +#endif +#ifdef X11_GRAPHICS + { "X11", "X11" }, +#endif +#ifdef QT_GRAPHICS /* too vague; there are multiple incompatible versions */ + { "Qt", "Qt" }, +#endif +#ifdef GNOME_GRAPHICS /* unmaintained/defunct */ + { "Gnome", "Gnome" }, +#endif +#ifdef MAC /* defunct OS 9 interface */ + { "mac", "Mac" }, +#endif +#ifdef AMIGA_INTUITION /* unmaintained/defunct */ + { "amii", "Amiga Intuition" }, +#endif +#ifdef GEM_GRAPHICS /* defunct Atari interface */ + { "Gem", "Gem" }, +#endif +#ifdef MSWIN_GRAPHICS /* win32 */ + { "mswin", "mswin" }, +#endif +#ifdef BEOS_GRAPHICS /* unmaintained/defunct */ + { "BeOS", "BeOS InterfaceKit" }, +#endif + { 0, 0 } +}; + +/* + * Use this to explicitly mask out features during version checks. + * + * ZEROCOMP, RLECOMP, and ZLIB_COMP describe compression features + * that the port/plaform which wrote the savefile was capable of + * dealing with. Don't reject a savefile just because the port + * reading the savefile doesn't match on all/some of them. + * The actual compression features used to produce the savefile are + * recorded in the savefile_info structure immediately following the + * version_info, and that is what needs to be checked against the + * feature set of the port that is reading the savefile back in. + * That check is done in src/restore.c now. + * + */ +#ifndef MD_IGNORED_FEATURES +#define MD_IGNORED_FEATURES \ + (0L | (1L << 19) /* SCORE_ON_BOTL */ \ + | (1L << 27) /* ZEROCOMP */ \ + | (1L << 28) /* RLECOMP */ \ + ) +#endif /* MD_IGNORED_FEATUES */ + +static void +make_version() +{ + register int i; + + /* + * integer version number + */ + version.incarnation = ((unsigned long) VERSION_MAJOR << 24) + | ((unsigned long) VERSION_MINOR << 16) + | ((unsigned long) PATCHLEVEL << 8) + | ((unsigned long) EDITLEVEL); + /* + * encoded feature list + * Note: if any of these magic numbers are changed or reassigned, + * EDITLEVEL in patchlevel.h should be incremented at the same time. + * The actual values have no special meaning, and the category + * groupings are just for convenience. + */ + version.feature_set = (unsigned long) (0L +/* levels and/or topology (0..4) */ +/* monsters (5..9) */ +#ifdef MAIL_STRUCTURES + | (1L << 6) +#endif +/* objects (10..14) */ +/* flag bits and/or other global variables (15..26) */ +#ifdef TEXTCOLOR + | (1L << 17) +#endif +#ifdef INSURANCE + | (1L << 18) +#endif +#ifdef SCORE_ON_BOTL + | (1L << 19) +#endif +/* data format (27..31) + * External compression methods such as COMPRESS and ZLIB_COMP + * do not affect the contents and are thus excluded from here */ +#ifdef ZEROCOMP + | (1L << 27) +#endif +#ifdef RLECOMP + | (1L << 28) +#endif + ); + /* + * Value used for object & monster sanity check. + * (NROFARTIFACTS<<24) | (NUM_OBJECTS<<12) | (NUMMONS<<0) + */ + for (i = 1; artifact_names[i]; i++) + continue; + version.entity_count = (unsigned long) (i - 1); + for (i = 1; objects[i].oc_class != ILLOBJ_CLASS; i++) + continue; + version.entity_count = (version.entity_count << 12) | (unsigned long) i; + for (i = 0; mons[i].mlet; i++) + continue; + version.entity_count = (version.entity_count << 12) | (unsigned long) i; + /* + * Value used for compiler (word size/field alignment/padding) check. + */ + version.struct_sizes1 = + (((unsigned long) sizeof(struct context_info) << 24) + | ((unsigned long) sizeof(struct obj) << 17) + | ((unsigned long) sizeof(struct monst) << 10) + | ((unsigned long) sizeof(struct you))); + version.struct_sizes2 = (((unsigned long) sizeof(struct flag) << 10) | +/* free bits in here */ +#ifdef SYSFLAGS + ((unsigned long) sizeof(struct sysflag))); +#else + ((unsigned long) 0L)); +#endif + return; +} + +static char * +version_string(outbuf, delim) +char *outbuf; +const char *delim; +{ + Sprintf(outbuf, "%d%s%d%s%d", VERSION_MAJOR, delim, VERSION_MINOR, delim, + PATCHLEVEL); +#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) + Sprintf(eos(outbuf), "-%d", EDITLEVEL); +#endif + return outbuf; +} + +static char * +version_id_string(outbuf, build_date) +char *outbuf; +const char *build_date; +{ + char subbuf[64], versbuf[64]; + char betabuf[64]; + +#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) +#if (NH_DEVEL_STATUS == NH_STATUS_BETA) + Strcpy(betabuf, " Beta"); +#else + Strcpy(betabuf, " Work-in-progress"); +#endif +#else + betabuf[0] = '\0'; +#endif + subbuf[0] = '\0'; +#ifdef PORT_SUB_ID + subbuf[0] = ' '; + Strcpy(&subbuf[1], PORT_SUB_ID); +#endif + + Sprintf(outbuf, "%s NetHack%s Version %s%s - last %s %s.", PORT_ID, + subbuf, version_string(versbuf, "."), betabuf, + date_via_env ? "revision" : "build", build_date); + return outbuf; +} + +static char * +bannerc_string(outbuf, build_date) +char *outbuf; +const char *build_date; +{ + char subbuf[64], versbuf[64]; + + subbuf[0] = '\0'; +#ifdef PORT_SUB_ID + subbuf[0] = ' '; + Strcpy(&subbuf[1], PORT_SUB_ID); +#endif +#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) +#if (NH_DEVEL_STATUS == NH_STATUS_BETA) + Strcat(subbuf, " Beta"); +#else + Strcat(subbuf, " Work-in-progress"); +#endif +#endif + + Sprintf(outbuf, " Version %s %s%s, %s %s.", + version_string(versbuf, "."), PORT_ID, subbuf, + date_via_env ? "revised" : "built", &build_date[4]); +#if 0 + Sprintf(outbuf, "%s NetHack%s %s Copyright 1985-%s (built %s)", + PORT_ID, subbuf, version_string(versbuf,"."), RELEASE_YEAR, + &build_date[4]); +#endif + return outbuf; +} + +static int +case_insensitive_comp(s1, s2) +const char *s1; +const char *s2; +{ + uchar u1, u2; + + for (;; s1++, s2++) { + u1 = (uchar) *s1; + if (isupper(u1)) + u1 = tolower(u1); + u2 = (uchar) *s2; + if (isupper(u2)) + u2 = tolower(u2); + if (u1 == '\0' || u1 != u2) + break; + } + return u1 - u2; +} + +static char * +eos(str) +char *str; +{ + while (*str) + str++; + return str; +} + +static char save_bones_compat_buf[BUFSZ]; + +static void +build_savebones_compat_string() +{ +#ifdef VERSION_COMPATIBILITY + unsigned long uver = VERSION_COMPATIBILITY; +#endif + Strcpy(save_bones_compat_buf, + "save and bones files accepted from version"); +#ifdef VERSION_COMPATIBILITY + Sprintf(eos(save_bones_compat_buf), "s %lu.%lu.%lu through %d.%d.%d", + ((uver & 0xFF000000L) >> 24), ((uver & 0x00FF0000L) >> 16), + ((uver & 0x0000FF00L) >> 8), VERSION_MAJOR, VERSION_MINOR, + PATCHLEVEL); +#else + Sprintf(eos(save_bones_compat_buf), " %d.%d.%d only", VERSION_MAJOR, + VERSION_MINOR, PATCHLEVEL); +#endif +} + +static const char *build_opts[] = { +#ifdef AMIGA_WBENCH + "Amiga WorkBench support", +#endif +#ifdef ANSI_DEFAULT + "ANSI default terminal", +#endif +#ifdef TEXTCOLOR + "color", +#endif +#ifdef TTY_GRAPHICS +#ifdef TTY_TILES_ESCCODES + "console escape codes for tile hinting", +#endif +#endif +#ifdef COM_COMPL + "command line completion", +#endif +#ifdef LIFE + "Conway's Game of Life", +#endif +#ifdef COMPRESS + "data file compression", +#endif +#ifdef ZLIB_COMP + "ZLIB data file compression", +#endif +#ifdef DLB +#ifndef VERSION_IN_DLB_FILENAME + "data librarian", +#else + "data librarian with a version-dependent name", +#endif +#endif +#ifdef DUMPLOG + "end-of-game dumplogs", +#endif +#ifdef HOLD_LOCKFILE_OPEN + "exclusive lock on level 0 file", +#endif +#if defined(MSGHANDLER) && (defined(POSIX_TYPES) || defined(__GNUC__)) + "external program as a message handler", +#endif +#ifdef MFLOPPY + "floppy drive support", +#endif +#ifdef INSURANCE + "insurance files for recovering from crashes", +#endif +#ifdef LOGFILE + "log file", +#endif +#ifdef XLOGFILE + "extended log file", +#endif +#ifdef PANICLOG + "errors and warnings log file", +#endif +#ifdef MAIL_STRUCTURES + "mail daemon", +#endif +#if defined(GNUDOS) || defined(__DJGPP__) + "MSDOS protected mode", +#endif +#ifdef NEWS + "news file", +#endif +#ifdef OVERLAY +#ifdef MOVERLAY + "MOVE overlays", +#else +#ifdef VROOMM + "VROOMM overlays", +#else + "overlays", +#endif +#endif +#endif + /* pattern matching method will be substituted by nethack at run time */ + "pattern matching via :PATMATCH:", +#ifdef USE_ISAAC64 + "pseudo random numbers generated by ISAAC64", +#ifdef DEV_RANDOM +#ifdef NHSTDC + /* include which specific one */ + "strong PRNG seed available from " DEV_RANDOM, +#else + "strong PRNG seed available from DEV_RANDOM", +#endif +#else +#ifdef WIN32 + "strong PRNG seed available from CNG BCryptGenRandom()", +#endif +#endif /* DEV_RANDOM */ +#else /* ISAAC64 */ +#ifdef RANDOM + "pseudo random numbers generated by random()", +#else + "pseudo random numbers generated by C rand()", +#endif +#endif /* ISAAC64 */ +#ifdef SELECTSAVED + "restore saved games via menu", +#endif +#ifdef SCORE_ON_BOTL + "score on status line", +#endif +#ifdef CLIPPING + "screen clipping", +#endif +#ifdef NO_TERMS +#ifdef MAC + "screen control via mactty", +#endif +#ifdef SCREEN_BIOS + "screen control via BIOS", +#endif +#ifdef SCREEN_DJGPPFAST + "screen control via DJGPP fast", +#endif +#ifdef SCREEN_VGA + "screen control via VGA graphics", +#endif +#ifdef WIN32CON + "screen control via WIN32 console I/O", +#endif +#endif /* NO_TERMS */ +#ifdef SHELL + "shell command", +#endif + "traditional status display", +#ifdef STATUS_HILITES + "status via windowport with highlighting", +#else + "status via windowport without highlighting", +#endif +#ifdef SUSPEND + "suspend command", +#endif +#ifdef TTY_GRAPHICS +#ifdef TERMINFO + "terminal info library", +#else +#if defined(TERMLIB) || (!defined(MICRO) && !defined(WIN32)) + "terminal capability library", +#endif +#endif +#endif /*TTY_GRAPHICS*/ +#ifdef USE_XPM + "tiles file in XPM format", +#endif +#ifdef GRAPHIC_TOMBSTONE + "graphical RIP screen", +#endif +#ifdef TIMED_DELAY + "timed wait for display effects", +#endif +#ifdef USER_SOUNDS + "user sounds", +#endif +#ifdef PREFIXES_IN_USE + "variable playground", +#endif +#ifdef VISION_TABLES + "vision tables", +#endif +#ifdef ZEROCOMP + "zero-compressed save files", +#endif +#ifdef RLECOMP + "run-length compression of map in save files", +#endif +#ifdef SYSCF + "system configuration at run-time", +#endif + save_bones_compat_buf, + "and basic NetHack features" +}; + +static void +opt_out_words(str, length_p) +char *str; /* input, but modified during processing */ +int *length_p; /* in/out */ +{ + char *word; + + while (*str) { + word = index(str, ' '); +#if 0 + /* treat " (" as unbreakable space */ + if (word && *(word + 1) == '(') + word = index(word + 1, ' '); +#endif + if (word) + *word = '\0'; + if (*length_p + (int) strlen(str) > COLNO - 5) { + opttext[idxopttext] = strdup(optbuf); + if (idxopttext < (MAXOPT - 1)) + idxopttext++; + Sprintf(optbuf, "%s", opt_indent), + *length_p = (int) strlen(opt_indent); + } else { + Sprintf(eos(optbuf), " "), (*length_p)++; + } + Sprintf(eos(optbuf), + "%s", str), *length_p += (int) strlen(str); + str += strlen(str) + (word ? 1 : 0); + } +} + +void +build_options() +{ + char buf[BUFSZ]; + int i, length, winsyscnt; + + build_savebones_compat_string(); + opttext[idxopttext] = strdup(optbuf); + if (idxopttext < (MAXOPT - 1)) + idxopttext++; + Sprintf(optbuf, + "%sNetHack version %d.%d.%d%s\n", + opt_indent, + VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, +#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) +#if (NH_DEVEL_STATUS == NH_STATUS_BETA) + " [beta]" +#else + " [work-in-progress]" +#endif +#else + "" +#endif /* NH_DEVEL_STATUS == NH_STATUS_RELEASED */ + ); + opttext[idxopttext] = strdup(optbuf); + if (idxopttext < (MAXOPT - 1)) + idxopttext++; + Sprintf(optbuf, + "Options compiled into this edition:"); + opttext[idxopttext] = strdup(optbuf); + if (idxopttext < (MAXOPT - 1)) + idxopttext++; + optbuf[0] = '\0'; + length = COLNO + 1; /* force 1st item onto new line */ + for (i = 0; i < SIZE(build_opts); i++) { + opt_out_words(strcat(strcpy(buf, build_opts[i]), + (i < SIZE(build_opts) - 1) ? "," : "."), + &length); + } + opttext[idxopttext] = strdup(optbuf); + if (idxopttext < (MAXOPT - 1)) + idxopttext++; + optbuf[0] = '\0'; + winsyscnt = SIZE(window_opts) - 1; + opttext[idxopttext] = strdup(optbuf); + if (idxopttext < (MAXOPT - 1)) + idxopttext++; + Sprintf(optbuf, "Supported windowing system%s:", + (winsyscnt > 1) ? "s" : ""); + opttext[idxopttext] = strdup(optbuf); + if (idxopttext < (MAXOPT - 1)) + idxopttext++; + optbuf[0] = '\0'; + length = COLNO + 1; /* force 1st item onto new line */ + for (i = 0; i < winsyscnt; i++) { + Sprintf(buf, "\"%s\"", window_opts[i].id); + if (strcmp(window_opts[i].name, window_opts[i].id)) + Sprintf(eos(buf), " (%s)", window_opts[i].name); + /* + * 1 : foo. + * 2 : foo and bar (note no period; comes from 'with default' below) + * 3+: for, bar, and quux + */ + opt_out_words(strcat(buf, (winsyscnt == 1) ? "." /* no 'default' */ + : (winsyscnt == 2 && i == 0) ? " and" + : (i == winsyscnt - 2) ? ", and" + : ","), + &length); + } + if (winsyscnt > 1) { + Sprintf(buf, "with a default of \"%s\".", DEFAULT_WINDOW_SYS); + opt_out_words(buf, &length); + } + opttext[idxopttext] = strdup(optbuf); + if (idxopttext < (MAXOPT - 1)) + idxopttext++; + optbuf[0] = '\0'; + + /* end with a blank line */ + opttext[idxopttext] = strdup(optbuf); + if (idxopttext < (MAXOPT - 1)) + idxopttext++; + optbuf[0] = '\0'; + return; +} + +#if defined(__DATE__) && defined(__TIME__) +#define extract_field(t,s,n,z) \ + do { \ + for (i = 0; i < n; ++i) \ + t[i] = s[i + z]; \ + t[i] = '\0'; \ + } while (0) +#endif + +void +runtime_info_init() +{ + int i; + char tmpbuf[BUFSZ], *strp; + const char *mth[] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; + struct tm t = {0}; + time_t timeresult; + + if (!done_runtime_opt_init_once) { + done_runtime_opt_init_once = 1; + build_savebones_compat_string(); + /* construct the current version number */ + make_version(); + /* + * In a cross-compiled environment, you can't execute + * the target binaries during the build, so we can't + * use makedefs to write the values of the build + * date and time to a file for retrieval. Not for + * information meaningful to the target execution + * environment. + * + * How can we capture the build date/time of the target + * binaries in such a situation? We need to rely on the + * cross-compiler itself to do it for us during the + * cross-compile. + * + * To that end, we are going to make use of the + * following pre-defined preprocessor macros for this: + * gcc, msvc, clang __DATE__ "Feb 12 1996" + * gcc, msvc, clang __TIME__ "23:59:01" + * + */ + +#if defined(__DATE__) && defined(__TIME__) + if (sizeof __DATE__ + sizeof __TIME__ + sizeof "123" < + sizeof rttimebuf) + Sprintf(rttimebuf, "%s %s", __DATE__, __TIME__); + /* "Feb 12 1996 23:59:01" + 01234567890123456789 */ + if ((int) strlen(rttimebuf) == 20) { + extract_field(tmpbuf, rttimebuf, 4, 7); /* year */ + t.tm_year = atoi(tmpbuf) - 1900; + extract_field(tmpbuf, rttimebuf, 3, 0); /* mon */ + for (i = 0; i < SIZE(mth); ++i) + if (!case_insensitive_comp(tmpbuf, mth[i])) { + t.tm_mon = i; + break; + } + extract_field(tmpbuf, rttimebuf, 2, 4); /* mday */ + strp = tmpbuf; + if (*strp == ' ') + strp++; + t.tm_mday = atoi(strp); + extract_field(tmpbuf, rttimebuf, 2, 12); /* hour */ + t.tm_hour = atoi(tmpbuf); + extract_field(tmpbuf, rttimebuf, 2, 15); /* min */ + t.tm_min = atoi(tmpbuf); + extract_field(tmpbuf, rttimebuf, 2, 18); /* sec */ + t.tm_sec = atoi(tmpbuf); + timeresult = mktime(&t); +#if defined(CROSSCOMPILE_TARGET) && !defined(MAKEDEFS_C) + BUILD_TIME = (unsigned long) timeresult; + BUILD_DATE = rttimebuf; +#endif +#else /* __DATE__ && __TIME__ */ + nhUse(strp); +#endif /* __DATE__ && __TIME__ */ + +#if defined(CROSSCOMPILE_TARGET) && !defined(MAKEDEFS_C) + VERSION_NUMBER = version.incarnation; + VERSION_FEATURES = version.feature_set; +#ifdef MD_IGNORED_FEATURES + IGNORED_FEATURES = MD_IGNORED_FEATURES; +#endif + VERSION_SANITY1 = version.entity_count; + VERSION_SANITY2 = version.struct_sizes1; + VERSION_SANITY3 = version.struct_sizes2; + + VERSION_STRING = strdup(version_string(tmpbuf, ".")); + VERSION_ID = strdup(version_id_string(tmpbuf, BUILD_DATE)); + COPYRIGHT_BANNER_C = strdup(bannerc_string(tmpbuf, BUILD_DATE)); +#ifdef HOST_NETHACK_GIT_SHA + NETHACK_GIT_SHA = strdup(HOST_NETHACK_GIT_SHA); +#endif +#ifdef HOST_NETHACK_GIT_BRANCH + NETHACK_GIT_BRANCH = strdup(HOST_NETHACK_GIT_BRANCH); +#endif +#endif /* CROSSCOMPILE_TARGET && !MAKEDEFS_C */ + } + idxopttext = 0; + build_options(); + } +} + +const char * +do_runtime_info(rtcontext) +int *rtcontext; +{ + const char *retval = (const char *) 0; + + if (!done_runtime_opt_init_once) + runtime_info_init(); + if (idxopttext && rtcontext) + if (*rtcontext >= 0 && *rtcontext < (MAXOPT - 1)) { + retval = opttext[*rtcontext]; + *rtcontext += 1; + } + return retval; +} + +/*mdlib.c*/ diff --git a/src/sfdata.c b/src/sfdata.c index 4ebf3d9c0..ac6fe5fc5 100644 --- a/src/sfdata.c +++ b/src/sfdata.c @@ -1,5 +1,5 @@ -/* NetHack 3.7 sfdata.c $Date$ $Revision$ */ -/* Copyright (c) NetHack Development Team 2018. */ +/* NetHack 3.7 sfdata.c */ +/* Copyright (c) NetHack Development Team 2019. */ /* NetHack may be freely redistributed. See license for details. */ /* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE! */ @@ -12,9 +12,6 @@ #include "wintype.h" #include "sfproto.h" -#define BUILD_DATE "Tue Jun 25 09:57:33 2019" -#define BUILD_TIME (1561471053L) - #define NHTYPE_SIMPLE 1 #define NHTYPE_COMPLEX 2 struct nhdatatypes_t { diff --git a/src/version.c b/src/version.c index 3eedd3ac9..0ab1d8249 100644 --- a/src/version.c +++ b/src/version.c @@ -19,11 +19,44 @@ #include "patchlevel.h" #endif +#if defined(CROSSCOMPILE) +struct cross_target_s cross_target = { + /* https://groups.google.com/forum/#!original/ + comp.sources.games/91SfKYg_xzI/dGnR3JnspFkJ */ + "Tue, 28-Jul-87 13:18:57 EDT", + "Version 1.0, built Jul 28 13:18:57 1987.", + "0000000000000000000000000000000000000000", + "master", + "1.0.0-0", + "NetHack Version 1.0.0-0 - last build Tue Jul 28 13:18:57 1987.", + 0x01010000UL, + 0x00000000UL, + 0x00000000UL, + 0x00000000UL, + 0x00000000UL, + 0x00000000UL, + 554476737UL, +}; +#endif /* CROSSCOMPILE */ + #if defined(NETHACK_GIT_SHA) -const char *NetHack_git_sha = NETHACK_GIT_SHA; +const char *NetHack_git_sha +#if !defined(CROSSCOMPILE) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST)) + = NETHACK_GIT_SHA +#else + = NETHACK_HOST_GIT_SHA #endif +; +#endif + #if defined(NETHACK_GIT_BRANCH) -const char *NetHack_git_branch = NETHACK_GIT_BRANCH; +const char *NetHack_git_branch +#if !defined(CROSSCOMPILE) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST)) + = NETHACK_GIT_BRANCH +#else + = NETHACK_HOST_GIT_BRANCH +#endif +; #endif static void FDECL(insert_rtoption, (char *)); @@ -98,7 +131,12 @@ doversion() int doextversion() { +#if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) + const char *rtbuf; + int rtcontext = 0; +#else dlb *f; +#endif char buf[BUFSZ], *p = 0; winid win = create_nhwindow(NHW_TEXT); @@ -119,12 +157,15 @@ doextversion() putstr(win, 0, p); } +#if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) +#else f = dlb_fopen(OPTIONS_USED, "r"); if (!f) { putstr(win, 0, ""); Sprintf(buf, "[Configuration '%s' not available?]", OPTIONS_USED); putstr(win, 0, buf); } else { +#endif /* * already inserted above: * + outdented program name and version plus build date and time @@ -146,8 +187,15 @@ doextversion() */ boolean prolog = TRUE; /* to skip indented program name */ +#if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) + while ((rtbuf = do_runtime_info(&rtcontext))) { + if ((int) strlen(rtbuf) >= (BUFSZ - 1)) + continue; + Strcpy(buf, rtbuf); +#else while (dlb_fgets(buf, BUFSZ, f)) { (void) strip_newline(buf); +#endif if (index(buf, '\t') != 0) (void) tabexpand(buf); @@ -167,10 +215,16 @@ doextversion() if (*buf) putstr(win, 0, buf); } +#if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) +#else (void) dlb_fclose(f); +#endif display_nhwindow(win, FALSE); destroy_nhwindow(win); +#if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) +#else } +#endif return 0; } @@ -370,11 +424,23 @@ void store_version(nhfp) NHFILE *nhfp; { +#if !defined(CROSSCOMPILE) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST)) static const struct version_info version_data = { VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY1, VERSION_SANITY2, VERSION_SANITY3 +#else + struct version_info version_data = { + 0UL,0UL,0UL,0UL,0Ul +#endif }; +#if defined(CROSSCOMPILE) && !defined(CROSSCOMPILE_HOST) + version_data.incarnation = VERSION_NUMBER; /* actual version number */ + version_data.feature_set = VERSION_FEATURES; /* bitmask of config settings */ + version_data.entity_count = VERSION_SANITY1; /* # of monsters and objects */ + version_data.struct_sizes1 = VERSION_SANITY2; /* size of key structs */ + version_data.struct_sizes2 = VERSION_SANITY3; /* size of more key structs */ +#endif if (nhfp->structlevel) { bufoff(nhfp->fd); /* bwrite() before bufon() uses plain write() */ diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index e24bbab3f..1e692237c 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -16,7 +16,7 @@ # for testing the msdos port build of the evolving NetHack code.0 # # The GNU Make has a problem if you include a drive spec below. -GAMEDIR =../binary +GAMEDIR =../msdos-binary # #============================================================================== @@ -143,9 +143,11 @@ TEXTIO = $(HOST_O)tiletext.o $(HOST_O)tiletxt.o $(HOST_O)drawing.o $(HOST_O TEXTIO2 = $(HOST_O)tiletex2.o $(HOST_O)tiletxt2.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \ $(HOST_O)objects.o -TILE_BMP = $(DAT)/nhtiles.bmp +PLANAR_TIB = $(DAT)/NETHACK1.TIB +OVERVIEW_TIB = $(DAT)/NETHACKO.TIB +TILE_BMP = $(DAT)/NHTILES.BMP -TILEUTIL = $(TILOBJ) $(U)tile2bin $(U)til2bin2 $(TILE_BMP) +TILEUTIL = $(TILOBJ) $(U)tile2bin $(U)til2bin2 $(TILE_BMP) $(PLANAR_TIB) $(OVERVIEW_TIB) TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt @@ -226,18 +228,18 @@ CURSESDEF= CURSESLIB= INCLDIR=-I../include -I../sys/msdos # Debugging -#cflags = -pg -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS +#cflags = -pg -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS -DCROSSCOMPILE -CROSSCOMPILE_HOST #LFLAGS = -pg # -cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS -LFLAGS = +#cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS -DCROSSCOMPILE -DCROSSCOMPILE_HOST +#LFLAGS = # # Debugging -#cflags = -g -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES +#cflags = -g -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_HOST #LFLAGS = -g # # Normal -cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES +cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_HOST LFLAGS = #========================================== @@ -318,6 +320,7 @@ $(DAT)/nhdat: $(U)dlb_main $(DAT)/data $(DAT)/rumors \ ls -1 data oracles options quest.dat rumors help hh >dlb.lst; \ ls -1 cmdhelp history opthelp wizhelp license >>dlb.lst; \ ls -1 bogusmon engrave epitaph tribute msdoshlp.txt >>dlb.lst; \ + ls -1 *.lua >>dlb.lst; \ $(U)dlb_main cvIf dlb.lst nhdat cd $(SRC) @@ -480,7 +483,19 @@ $(HOST_O)tilemap.o: $(WSHR)/tilemap.c $(HACK_H) $(TILE_H) # Required for tile support #========================================== -$(DAT)/nhtiles.bmp: $(TILEFILES) $(U)tile2bmp +$(DAT)/NetHack1.tib: $(TILEFILES) $(U)tile2bin + @echo Creating binary tile files + cd $(DAT) + $(U)tile2bin + cd $(SRC) + +$(DAT)/NetHacko.tib: $(HOST_O)thintile.tag $(TILEFILES2) $(U)til2bin2 + @echo Creating overview binary tile files + cd $(DAT) + $(U)til2bin2 + cd $(SRC) + +$(DAT)/NHTILES.BMP: $(TILEFILES) $(U)tile2bmp @echo Creating binary tile files which may take some time @cd $(DAT) @$(U)tile2bmp $@ diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 2d25a3d6b..3cc926015 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -1,4 +1,4 @@ -# NetHack 3.6 Makefile2.cross +# NetHack 3.7 Makefile2.cross # Cross-compile msdos version of NetHack using a # linux-hosted djgpp cross-compiler. # @@ -11,17 +11,17 @@ # Makefile2 utilizes the djgpp cross-compiler from Andrew Wu: # https://github.com/andrewwutw/build-djgpp # -# Currently, in NetHack 3.6, the cross-compile for msdos cannot be -# used to build the entire game to a playable point but it is useful -# for testing the msdos port build of the evolving NetHack code. +# In NetHack 3.7, the cross-compile for msdos can be used to +# build the entire game to a complete ms-dos package and +# result (in theory). # # Game Installation Variables # NOTE: Make sure GAMEDIR exists before make is started. -GAME = nethack +GAME = NETHACK # The GNU Make has a problem if you include a drive spec below (unfortunately). -GAMEDIR =../binary +GAMEDIR =../msdos-binary # Optional PDCurses support # Uncomment these and set them appropriately if you want to @@ -39,6 +39,20 @@ PDCURSES_TOP=../../pdcurses # Set top of djgpp if not specified through ENV variables prior to make: #DJGPP_TOP = $(HOME)/djgpp +#--------------------------------------------------------------- +# Location of LUA +# +# Original source needs to be obtained from: +# http://www.lua.org/ftp/lua-5.3.5.tar.gz +# +# This build assumes that the LUA sources are located +# at the specified location. If they are actually elsewhere +# you'll need to specify the correct spot below in order to +# successfully build NetHack-3.7. +# +ADD_LUA=Y +LUATOP=../lib/lua-5.3.5 +# # #============================================================================== # This marks the end of the BUILD DECISIONS section. @@ -47,7 +61,8 @@ PDCURSES_TOP=../../pdcurses # Directories, gcc likes unix style directory specs # -OBJ = o +TARGET = msdos +OBJ = $(TARGET)_o HOBJ = host_o DAT = ../dat DOC = ../doc @@ -73,6 +88,7 @@ endif TARGET_CC = $(DJGPP_TOP)/i586-pc-msdosdjgpp/bin/gcc TARGET_LINK = $(DJGPP_TOP)/i586-pc-msdosdjgpp/bin/gcc TARGET_STUBEDIT = $(DJGPP_TOP)/i586-pc-msdosdjgpp/bin/stubedit +TARGET_AR = $(DJGPP_TOP)/i586-pc-msdosdjgpp/bin/ar MAKEBIN = make # @@ -164,7 +180,7 @@ SUPPRESS_GRAPHICS = # # ################################################ -GAMEFILE = $(GAMEDIR)/$(GAME).exe +GAMEFILE = $(GAMEDIR)/$(GAME).EXE # Changing this conditional block is not recommended ifeq "$(USE_DLB)" "Y" @@ -208,82 +224,60 @@ O = $(OBJ)/ HOST_O = $(HOBJ)/ U = $(UTIL)/ -#========================================== -# Utility Objects. -#========================================== - -VGAOBJ = $(O)vidvga.o $(O)vidvesa.o - -MAKESRC = makedefs.c - -#SPLEVSRC = lev_yacc.c lev_$(LEX).c lev_main.c panic.c - -#DGNCOMPSRC = dgn_yacc.c dgn_$(LEX).c dgn_main.c - -MAKEDEFSOBJS = $(HOST_O)makedefs.o $(HOST_O)monst.o $(HOST_O)objects.o - -#SPLEVOBJS = $(HOST_O)lev_yacc.o $(HOST_O)lev_$(LEX).o $(HOST_O)lev_main.o $(HOST_O)alloc.o \ -# $(HOST_O)monst.o $(HOST_O)objects.o $(HOST_O)panic.o \ -# $(HOST_O)drawing.o $(HOST_O)decl.o $(O)stubvid.o - -#DGNCOMPOBJS = $(HOST_O)dgn_yacc.o $(HOST_O)dgn_$(LEX).o $(HOST_O)dgn_main.o $(HOST_O)alloc.o \ -# $(HOST_O)panic.o - -RECOVOBJS = $(O)recover.o - - #========================================== # Tile related object files. #========================================== -ifeq ($(SUPPRESS_GRAPHICS),Y) -TILOBJ = -TILOBJ2 = -TEXTIO = -TEXTIO2 = -TILE_BMP = -TILEUTIL = -TILEFILES = -TILEFILES2 = -GIFREADERS = -GIFREAD2 = -PPMWRITERS = -PPMWRIT2 = +#ifeq ($(SUPPRESS_GRAPHICS),Y) +#TILOBJ = +#TILOBJ2 = +#TEXTIO = +#TEXTIO2 = +#TILE_BMP = +#TILEUTIL = +#TILEFILES = +#TILEFILES2 = +#GIFREADERS = +#GIFREAD2 = +#PPMWRITERS = +#PPMWRIT2 = +# +#else +# +#TILOBJ = $(O)tile.o $(VIDEO_OBJ) +# +#TILOBJ2 = $(O)tileset.o $(O)bmptiles.o $(O)giftiles.o +# +#TEXTIO = $(HOST_O)tiletext.o $(HOST_O)tiletxt.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \ +# $(HOST_O)objects.o $(HOST_O)stubvid.o +# +#TEXTIO2 = $(HOST_O)tiletex2.o $(HOST_O)tiletxt2.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \ +# $(HOST_O)objects.o $(HOST_O)stubvid.o +#TILEUTIL = $(TILOBJ) $(U)tile2bin $(U)til2bin2 $(TILE_BMP) $(PLANAR_TIB) $(OVERVIEW_TIB) +# +#TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt +# +#TILEFILES2 = $(WSHR)/monthin.txt $(WSHR)/objthin.txt $(WSHR)/oththin.txt +# +#GIFREADERS = $(HOST_O)gifread.o $(HOST_O)alloc.o $(HOST_O)panic.o +# +#GIFREAD2 = $(HOST_O)gifread2.o $(HOST_O)alloc.o $(HOST_O)panic.o +# +#PPMWRITERS = $(HOST_O)ppmwrite.o $(HOST_O)alloc.o $(HOST_O)panic.o +# +#PPMWRIT2 = $(HOST_O)ppmwrit2.o $(HOST_O)alloc.o $(HOST_O)panic.o +#endif -else +PLANAR_TIB = $(DAT)/NETHACK1.tib +OVERVIEW_TIB = $(DAT)/NETHACKO.tib +TILE_BMP = $(DAT)/NHTILES.BMP -TILOBJ = $(O)tile.o $(VGAOBJ) - -TILOBJ2 = $(O)tileset.o $(O)bmptiles.o $(O)giftiles.o - -TEXTIO = $(HOST_O)tiletext.o $(HOST_O)tiletxt.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \ - $(HOST_O)objects.o $(HOST_O)stubvid.o - -TEXTIO2 = $(HOST_O)tiletex2.o $(HOST_O)tiletxt2.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \ - $(HOST_O)objects.o $(HOST_O)stubvid.o - -TILE_BMP = $(DAT)/nhtiles.bmp - -TILEUTIL = $(TILOBJ) $(U)tile2bin $(U)til2bin2 $(TILE_BMP) - -TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt - -TILEFILES2 = $(WSHR)/monthin.txt $(WSHR)/objthin.txt $(WSHR)/oththin.txt - -GIFREADERS = $(HOST_O)gifread.o $(HOST_O)alloc.o $(HOST_O)panic.o - -GIFREAD2 = $(HOST_O)gifread2.o $(HOST_O)alloc.o $(HOST_O)panic.o - -PPMWRITERS = $(HOST_O)ppmwrite.o $(HOST_O)alloc.o $(HOST_O)panic.o - -PPMWRIT2 = $(HOST_O)ppmwrit2.o $(HOST_O)alloc.o $(HOST_O)panic.o -endif - -#REGEX = $(O)pmatchregex.o -#REGEX = $(O)cppregex.o -REGEX = $(O)posixreg.o - -DLBOBJ = $(O)dlb.o +##REGEX = $(O)pmatchregex.o +##REGEX = $(O)cppregex.o +REGEX = $(O)posixreg.o +DLBOBJ = $(O)dlb.o +VIDEO_OBJ = $(O)vidvga.o $(O)vidvesa.o $(O)tile.o $(O)tileset.o $(O)bmptiles.o $(O)giftiles.o +RECOVOBJS = $(O)recover.o # Object files for the game itself. @@ -310,13 +304,19 @@ VOBJ19 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o $(O)vision.o VOBJ20 = $(O)vis_tab.o $(O)weapon.o $(O)were.o $(O)wield.o $(O)windows.o VOBJ21 = $(O)wintty.o $(O)wizard.o $(O)worm.o $(O)worn.o $(O)write.o VOBJ22 = $(O)zap.o $(O)light.o $(O)dlb.o $(O)dig.o $(O)teleport.o -VOBJ23 = $(O)region.o $(O)sys.o $(REGEX) $(O)isaac64.o +VOBJ23 = $(O)region.o $(O)sys.o $(REGEX) $(O)isaac64.o $(VIDEO_OBJ) +VOBJ24 = $(O)sfbase.o $(O)sfdata.o +VOBJ25 = $(O)sfstruct.o $(O)sfascii.o $(O)sflendian.o -SOBJ = $(O)msdos.o $(O)sound.o $(O)pcsys.o $(O)tty.o $(O)unix.o \ +SOBJ = $(O)msdos.o $(O)pcsys.o $(O)tty.o $(O)unix.o \ $(O)video.o $(O)vidtxt.o $(O)pckeys.o VVOBJ = $(O)version.o +ifeq "$(ADD_LUA)" "Y" +LUAOBJ = $(O)nhlua.o $(O)nhlsel.o +endif + ifeq "$(ADD_CURSES)" "Y" CURSESOBJ= $(O)cursdial.o $(O)cursinit.o $(O)cursinvt.o $(O)cursmain.o \ $(O)cursmesg.o $(O)cursmisc.o $(O)cursstat.o $(O)curswins.o @@ -328,11 +328,54 @@ VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \ $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ - $(VOBJ21) $(VOBJ22) $(VOBJ23) \ - $(CURSESOBJ) + $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \ + $(LUAOBJ) $(CURSESOBJ) ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(TILOBJ2) $(VVOBJ) +ifeq "$(ADD_LUA)" "Y" +#===============-================================================= +# LUA library +# Source from http://www.lua.org/ftp/lua-5.3.5.tar.gz +#================================================================= + +LUASRC = $(LUATOP)/src +LUALIB = $(O)lua535s.a +#LUADLL = $(O)lua535.a +LUAINCL = -I$(LUASRC) +#LUAFLAGS = unix added -lm here? +LUATARGETS = lua.exe luac.exe $(LUALIB) +#LUATARGETS = $(LUADLL) $(LUALIB) + +LUASRCFILES = lapi.c lauxlib.c lbaselib.c lbitlib.c lcode.c \ + lcorolib.c lctype.c ldblib.c ldebug.c ldo.c \ + ldump.c lfunc.c lgc.c linit.c liolib.c llex.c \ + lmathlib.c lmem.c loadlib.c lobject.c lopcodes.c \ + loslib.c lparser.c lstate.c lstring.c lstrlib.c \ + ltable.c ltablib.c ltm.c lundump.c lutf8lib.c \ + lvm.c lzio.c + +LUAOBJFILES1 = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o \ + $(O)lcode.o $(O)lcorolib.o $(O)lctype.o $(O)ldblib.o +LUAOBJFILES2 = $(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \ + $(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o +LUAOBJFILES3 = $(O)lmathlib.o $(O)lmem.o $(O)loadlib.o $(O)lobject.o \ + $(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o +LUAOBJFILES3 = $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \ + $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o + +#LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o \ +# $(O)lcode.o $(O)lcorolib.o $(O)lctype.o $(O)ldblib.o \ +# $(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \ +# $(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o \ +# $(O)lmathlib.o $(O)lmem.o $(O)loadlib.o $(O)lobject.o \ +# $(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o \ +# $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \ +# $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o + +LUALIBOBJS = $(LUAOBJFILES1) $(LUAOBJFILES2) $(LUAOBJFILES3) $(LUAOBJFILES4) +endif + ifeq "$(ADD_CURSES)" "Y" #========================================== # PDCurses build macros @@ -419,11 +462,6 @@ DLB = DLBOBJS = endif -ifdef DJGPP -DJ1 = $(dir $(DJGPP)) -CWSDPMI = $(subst /,\,$(DJ1))bin\CWSDPMI.* -endif - #========================================== # More compiler setup macros #========================================== @@ -435,21 +473,21 @@ CURSESDEF= CURSESLIB= endif -INCLDIR=-I../include -I../sys/msdos +INCLDIR=-I../include -I../sys/msdos $(LUAINCL) # Debugging -#cflags = -pg -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS +#cflags = -pg -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS -DCROSSCOMPILE -DCROSSCOMPILE_TARGET #LFLAGS = -pg -cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS -LFLAGS = +#cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS -DCROSSCOMPILE-DCROSSCOMPILE_TARGET +#LFLAGS = # Debugging -#cflags = -g -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES +#cflags = -g -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_TARGET #LFLAGS = -g # Normal -cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES +cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_TARGET LFLAGS = #========================================== @@ -523,6 +561,15 @@ $(OBJ)/%.o : $(PDCSRC)/%.c $(OBJ)/%.o : $(PDCDOS)/%.c $(TARGET_CC) $(PDCINCL) $(cflags) -o$@ $< +ifeq "$(ADD_LUA)" "Y" +#========================================== +# Rules for LUA files +#========================================== + +$(OBJ)/%.o : $(LUASRC)/%.c + $(TARGET_CC) $(cflags) -o$@ $< +endif + #========================================== # Primary Targets. #========================================== @@ -538,8 +585,6 @@ default: $(GAMEFILE) util: $(O)utility.tag -#LEVCOMPEXE = $(U)lev_comp - $(O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \ $(INCL)/pm.h vis_tab.c $(TILEUTIL) echo utilities made > $@ @@ -553,201 +598,119 @@ recover.exe: $(U)recover $(O)install.tag: $(DAT)/nhdat $(GAMEFILE) ifeq ($(USE_DLB),Y) - cp $(DAT)/nhdat $(GAMEDIR) - cp $(DAT)/license $(GAMEDIR) + cp $(DAT)/nhdat $(GAMEDIR)/NHDAT + cp $(DAT)/license $(GAMEDIR)/LICENSE else cp $(DAT)/*. $(GAMEDIR) cp $(DAT)/*.dat $(GAMEDIR) - cp $(DAT)/*.lev $(GAMEDIR) cp $(MSYS)/msdoshlp.txt $(GAMEDIR)) +ifeq "$(ADD_LUA)" "Y" + cp $(DAT)/*.lua $(GAMEDIR) +endif endif ifdef TERMLIB - cp $(SSHR)/termcap $(GAMEDIR)) + cp $(SSHR)/termcap $(GAMEDIR)/TERMCAP) endif # if [ -f $(TILE_BMP) ]; then rm $(TILE_BMP); fi; - if [ -f $(TILE_BMP) ]; then cp $(TILE_BMP) $(GAMEDIR); fi; - if [ -f $(DAT)/symbols ]; then cp $(DAT)/symbols $(GAMEDIR); fi; - if [ -f $(SSHR)/NetHack.cnf ]; then cp $(SSHR)/NetHack.cnf $(GAMEDIR); fi; - -touch $(GAMEDIR)/record - if [ -f ../sys/winnt/sysconf ]; then cp ../sys/winnt/sysconf $(GAMEDIR); fi; - if [ -f $(DOC)/nethack.txt ]; then cp $(DOC)/nethack.txt $(GAMEDIR); fi; -ifdef CWSDPMI - if [ -f $(CWSDPMI) ]; then cp $(CWSDPMI) $(GAMEDIR); fi; -else - @echo Could not find a copy of CWSDPMI.EXE to put into $(GAMEDIR) -endif + if [ -f $(TILE_BMP) ]; then cp $(TILE_BMP) $(GAMEDIR)/NHTILES.BMP; fi; + if [ -f $(DAT)/symbols ]; then cp $(DAT)/symbols $(GAMEDIR)/SYMBOLS; fi; + if [ -f $(SSHR)/NetHack.cnf ]; then cp $(SSHR)/NetHack.cnf $(GAMEDIR)/NETHACK.CNF; fi; + -touch $(GAMEDIR)/RECORD + if [ -f ../sys/winnt/sysconf ]; then cp ../sys/winnt/sysconf $(GAMEDIR)/SYSCONF; fi; + if [ -f $(DOC)/nethack.txt ]; then cp $(DOC)/nethack.txt $(GAMEDIR)/NETHACK.TXT; fi; +# if [ -f $(PLANAR_TIB) ]; then cp $(PLANAR_TIB) $(GAMEDIR)/$(PLANAR_TIB^^); fi; +# if [ -f $(OVERVIEW_TIB ]; then cp $(OVERVIEW_TIB) $(GAMEDIR)/$(OVERVIEW_TIB^^); fi; @echo install done > $@ #========================================== # The main target. #========================================== -$(GAMEFILE): $(O)obj.tag $(PATCHLEV_H) $(PDCLIB) \ +$(GAMEFILE): $(O)obj.tag $(PDCLIB) $(LUALIB) \ $(O)utility.tag $(ALLOBJ) $(O)$(GAME).lnk if [ -f temp.a ]; then rm temp.a; fi; - @ar r temp.a $(VOBJ01) - @ar r temp.a $(VOBJ02) - @ar r temp.a $(VOBJ03) - @ar r temp.a $(VOBJ04) - @ar r temp.a $(VOBJ05) - @ar r temp.a $(VOBJ06) - @ar r temp.a $(VOBJ07) - @ar r temp.a $(VOBJ08) - @ar r temp.a $(VOBJ09) - @ar r temp.a $(VOBJ10) - @ar r temp.a $(VOBJ11) - @ar r temp.a $(VOBJ12) - @ar r temp.a $(VOBJ13) - @ar r temp.a $(VOBJ14) - @ar r temp.a $(VOBJ15) - @ar r temp.a $(VOBJ16) - @ar r temp.a $(VOBJ17) - @ar r temp.a $(VOBJ18) - @ar r temp.a $(VOBJ19) - @ar r temp.a $(VOBJ20) - @ar r temp.a $(VOBJ21) - @ar r temp.a $(VOBJ22) - @ar r temp.a $(VOBJ23) - @ar r temp.a $(VOBJ24) - @ar r temp.a $(VOBJ25) - @ar r temp.a $(SOBJ) - @ar r temp.a $(TILOBJ) - @ar r temp.a $(TILOBJ2) - @ar r temp.a $(VVOBJ) -ifeq "$(ADD_CURSES)" "Y" - @ar r temp.a $(CURSESOBJ) + @$(TARGET_AR) r temp.a $(VOBJ01) + @$(TARGET_AR) r temp.a $(VOBJ02) + @$(TARGET_AR) r temp.a $(VOBJ03) + @$(TARGET_AR) r temp.a $(VOBJ04) + @$(TARGET_AR) r temp.a $(VOBJ05) + @$(TARGET_AR) r temp.a $(VOBJ06) + @$(TARGET_AR) r temp.a $(VOBJ07) + @$(TARGET_AR) r temp.a $(VOBJ08) + @$(TARGET_AR) r temp.a $(VOBJ09) + @$(TARGET_AR) r temp.a $(VOBJ10) + @$(TARGET_AR) r temp.a $(VOBJ11) + @$(TARGET_AR) r temp.a $(VOBJ12) + @$(TARGET_AR) r temp.a $(VOBJ13) + @$(TARGET_AR) r temp.a $(VOBJ14) + @$(TARGET_AR) r temp.a $(VOBJ15) + @$(TARGET_AR) r temp.a $(VOBJ16) + @$(TARGET_AR) r temp.a $(VOBJ17) + @$(TARGET_AR) r temp.a $(VOBJ18) + @$(TARGET_AR) r temp.a $(VOBJ19) + @$(TARGET_AR) r temp.a $(VOBJ20) + @$(TARGET_AR) r temp.a $(VOBJ21) + @$(TARGET_AR) r temp.a $(VOBJ22) + @$(TARGET_AR) r temp.a $(VOBJ23) + @$(TARGET_AR) r temp.a $(VOBJ24) + @$(TARGET_AR) r temp.a $(VOBJ25) + @$(TARGET_AR) r temp.a $(VIDEO_OBJ) + @$(TARGET_AR) r temp.a $(SOBJ) + @$(TARGET_AR) r temp.a $(TILOBJ) + @$(TARGET_AR) r temp.a $(TILOBJ2) +ifeq "$(ADD_LUA)" "Y" + @$(TARGET_AR) r temp.a $(LUAOBJ) endif - $(TARGET_LINK) $(LFLAGS) -o$(GAME).exe temp.a $(PDCLIB) $(LIBRARIES) $(ZLIB) + @$(TARGET_AR) r temp.a $(VVOBJ) +ifeq "$(ADD_CURSES)" "Y" + @$(TARGET_AR) r temp.a $(CURSESOBJ) +endif + $(TARGET_LINK) $(LFLAGS) -o$(GAME).exe temp.a $(PDCLIB) $(LUALIB) $(LIBRARIES) $(ZLIB) $(TARGET_STUBEDIT) $(GAME).exe minstack=2048K cp $(GAME).exe $(GAMEFILE) rm $(GAME).exe $(O)$(GAME).lnk: $(ALLOBJ) - echo $(VOBJ01) > $(subst /,\,$@) - echo $(VOBJ02) >> $(subst /,\,$@) - echo $(VOBJ03) >> $(subst /,\,$@) - echo $(VOBJ04) >> $(subst /,\,$@) - echo $(VOBJ05) >> $(subst /,\,$@) - echo $(VOBJ06) >> $(subst /,\,$@) - echo $(VOBJ07) >> $(subst /,\,$@) - echo $(VOBJ08) >> $(subst /,\,$@) - echo $(VOBJ09) >> $(subst /,\,$@) - echo $(VOBJ10) >> $(subst /,\,$@) - echo $(VOBJ11) >> $(subst /,\,$@) - echo $(VOBJ12) >> $(subst /,\,$@) - echo $(VOBJ13) >> $(subst /,\,$@) - echo $(VOBJ14) >> $(subst /,\,$@) - echo $(VOBJ15) >> $(subst /,\,$@) - echo $(VOBJ16) >> $(subst /,\,$@) - echo $(VOBJ17) >> $(subst /,\,$@) - echo $(VOBJ18) >> $(subst /,\,$@) - echo $(VOBJ19) >> $(subst /,\,$@) - echo $(VOBJ20) >> $(subst /,\,$@) - echo $(VOBJ21) >> $(subst /,\,$@) - echo $(VOBJ22) >> $(subst /,\,$@) - echo $(VOBJ23) >> $(subst /,\,$@) - echo $(VOBJ24) >> $(subst /,\,$@) - echo $(VOBJ25) >> $(subst /,\,$@) - echo $(SOBJ) >> $(subst /,\,$@) - echo $(TILOBJ) >> $(subst /,\,$@) - echo $(TILOBJ2) >> $(subst /,\,$@) - echo $(VVOBJ) >> $(subst /,\,$@) + echo $(VOBJ01) > $@ + echo $(VOBJ02) >> $@ + echo $(VOBJ03) >> $@ + echo $(VOBJ04) >> $@ + echo $(VOBJ05) >> $@ + echo $(VOBJ06) >> $@ + echo $(VOBJ07) >> $@ + echo $(VOBJ08) >> $@ + echo $(VOBJ09) >> $@ + echo $(VOBJ10) >> $@ + echo $(VOBJ11) >> $@ + echo $(VOBJ12) >> $@ + echo $(VOBJ13) >> $@ + echo $(VOBJ14) >> $@ + echo $(VOBJ15) >> $@ + echo $(VOBJ16) >> $@ + echo $(VOBJ17) >> $@ + echo $(VOBJ18) >> $@ + echo $(VOBJ19) >> $@ + echo $(VOBJ20) >> $@ + echo $(VOBJ21) >> $@ + echo $(VOBJ22) >> $@ + echo $(VOBJ23) >> $@ + echo $(VOBJ24) >> $@ + echo $(VOBJ25) >> $@ + echo $(SOBJ) >> $@ + echo $(TILOBJ) >> $@ + echo $(TILOBJ2) >> $@ +ifeq "$(ADD_LUA)" "Y" + echo $(LUAOBJ) >> $@ +endif + echo $(VVOBJ) >> $@ ifeq "$(ADD_CURSES)" "Y" - echo $(CURSESOBJ) >> $(subst /,\,$@) + echo $(CURSESOBJ) >> $@ endif #========================================== #=========== SECONDARY TARGETS ============ #========================================== # -# The following include files depend on makedefs to be created. -# -# date.h should be remade every time any of the source or include -# files is modified. -# -# -#$(INCL)/date.h : $(U)makedefs -# -$(U)makedefs -v -# -#$(INCL)/onames.h: $(U)makedefs -# -$(U)makedefs -o -# -#$(INCL)/pm.h: $(U)makedefs -# -$(U)makedefs -p -# -#monstr.c: $(U)makedefs -# -$(U)makedefs -m -# -#$(INCL)/vis_tab.h: $(U)makedefs -# -$(U)makedefs -z -# -#vis_tab.c: $(U)makedefs -# -$(U)makedefs -z -# -#========================================== -# Level Compiler Dependencies -#========================================== -# -#$(U)lev_comp: $(SPLEVOBJS) -# -rm -f temp.a -# @ar ru temp.a $(SPLEVOBJS) -# $(HOST_LINK) $(LFLAGS) -o$@ temp.a -# -#$(HOST_O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h $(U)lev_yacc.c -# $(HOST_CC) $(cflags) -o$@ $(U)lev_yacc.c -# -#$(HOST_O)lev_$(LEX).o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h \ -# $(U)lev_$(LEX).c -# $(HOST_CC) $(cflags) -o$@ $(U)lev_$(LEX).c -# -#$(HOST_O)lev_main.o: $(HACK_H) $(INCL)/sp_lev.h $(INCL)/date.h $(U)lev_main.c -# -#$(U)lev_yacc.c: $(SSHR)/lev_yacc.c -# @echo --- -# @echo For now, we will copy the prebuilt -# @echo lev_comp.c from $(SSHR) into $(U) and use that. -# @cp $(SSHR)/lev_yacc.c $(U)lev_yacc.c -# @echo.>>$(U)lev_yacc.c -# -#$(INCL)/lev_comp.h : $(SSHR)/lev_comp.h -# @echo For now, we will copy the prebuilt lev_comp.h -# @echo from $(SSHR) into $(INCL) and use that. -# @cp $(SSHR)/lev_comp.h $@ -#$(U)lev_lex.c: $(SSHR)/lev_lex.c -# @echo.>>$(INCL)/lev_comp.h -# @echo For now, we will copy the prebuilt lev_lex.c -# @echo from $(SSHR) into $(U) and use it. -# @cp $(SSHR)/lev_lex.c $@ -# @echo.>>$@ -# -#========================================== -# Dungeon Dependencies -#========================================== -# -#$(U)dgn_comp: $(DGNCOMPOBJS) -# $(HOST_LINK) $(LFLAGS) -o$@ $(DGNCOMPOBJS) -# -#$(U)dgn_yacc.c: $(SSHR)/dgn_yacc.c -# @echo --- -# @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and -# @echo dgn_comp.h from $(SSHR) into $(U) and use that. -# @cp $(SSHR)/dgn_yacc.c $(U)dgn_yacc.c -# @echo.>>$(U)dgn_yacc.c -# -#$(INCL)/dgn_comp.h: $(SSHR)/dgn_comp.h -# @echo --- -# @echo For now, we will copy the prebuilt dgn_comp.h -# @echo from $(SSHR) into $(INCL) and use that. -# @cp $(SSHR)/dgn_comp.h $@ -# @echo.>>$(INCL)/dgn_comp.h -# -#$(U)dgn_$(LEX).c: $(SSHR)/dgn_lex.c $(INCL)/dgn_comp.h -# @echo --- -# @echo For now, we will copy the prebuilt dgn_lex.c -# @echo from $(SSHR) into $(U) and use it. -# @cp $(SSHR)/dgn_lex.c $@ -# @echo.>>$@ - #========================================== # Recover Utility #========================================== @@ -810,109 +773,32 @@ $(O)objects.o: $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ $(O)dat.tag: $(DAT)/nhdat @echo dat done >$@ -#$(HOST_O)monst.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/monsym.h \ -# $(INCL)/color.h monst.c -# $(HOST_CC) $(cflags) -o$@ monst.c +#============================================================= +# Lua +#============================================================= -#$(HOST_O)objects.o: $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ -# $(INCL)/prop.h $(INCL)/color.h objects.c -# $(HOST_CC) $(cflags) -o$@ objects.c +lua.exe: $(O)lua.o $(LUALIB) + $(TARGET_LINK) $(LFLAGS) -o$@ $(O)lua.o $(LUALIB) -#$(O)panic.o: $(CONFIG_H) $(U)panic.c +luac.exe: $(O)luac.o $(LUALIB) + $(TARGET_LINK) $(LFLAGSU) -o$@ $(O)luac.o $(LUALIB) -# make data.base an 8.3 filename to prevent an make warning -#DATABASE = $(DAT)/data.bas -# -# -# -#$(DAT)/data: $(O)utility.tag $(DATABASE) -# $(U)makedefs -d -# -#$(DAT)/rumors: $(O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal -# $(U)makedefs -r -# -#$(DAT)/quest.dat: $(O)utility.tag $(DAT)/quest.txt -# $(U)makedefs -q -# -#$(DAT)/oracles: $(O)utility.tag $(DAT)/oracles.txt -# $(U)makedefs -h -# -#$(DAT)/bogusmon: $(O)utility.tag $(DAT)/bogusmon.txt -# $(U)makedefs -s -# -#$(DAT)/engrave: $(O)utility.tag $(DAT)/engrave.txt -# $(U)makedefs -s -# -#$(DAT)/epitaph: $(O)utility.tag $(DAT)/epitaph.txt -# $(U)makedefs -s -# -#$(O)sp_lev.tag: $(O)utility.tag \ -# $(DAT)/bigroom.des $(DAT)/castle.des \ -# $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \ -# $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \ -# $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \ -# $(DAT)/caveman.des $(DAT)/healer.des $(DAT)/knight.des \ -# $(DAT)/monk.des $(DAT)/priest.des $(DAT)/ranger.des \ -# $(DAT)/rogue.des $(DAT)/samurai.des $(DAT)/tourist.des \ -# $(DAT)/valkyrie.des $(DAT)/wizard.des -# cd $(DAT) -# $(U)lev_comp bigroom.des -# $(U)lev_comp castle.des -# $(U)lev_comp endgame.des -# $(U)lev_comp gehennom.des -# $(U)lev_comp knox.des -# $(U)lev_comp mines.des -# $(U)lev_comp medusa.des -# $(U)lev_comp oracle.des -# $(U)lev_comp sokoban.des -# $(U)lev_comp tower.des -# $(U)lev_comp yendor.des -# $(U)lev_comp arch.des -# $(U)lev_comp barb.des -# $(U)lev_comp caveman.des -# $(U)lev_comp healer.des -# $(U)lev_comp knight.des -# $(U)lev_comp monk.des -# $(U)lev_comp priest.des -# $(U)lev_comp ranger.des -# $(U)lev_comp rogue.des -# $(U)lev_comp samurai.des -# $(U)lev_comp tourist.des -# $(U)lev_comp valkyrie.des -# $(U)lev_comp wizard.des -# cd $(SRC) -# echo sp_levs done > $@ -# -#$(DAT)/dungeon: $(O)utility.tag $(DAT)/dungeon.def -# $(U)makedefs -e -# cd $(DAT) -# $(U)dgn_comp dungeon.pdf -# cd $(SRC) +$(O)lua.o: $(LUASRC)/lua.c +$(O)luac.o: $(LUASRC)/luac.c #========================================== -# DLB stuff +# Lua lib #========================================== -#note that dir below assumes bin/dir from djgpp distribution -# -#$(DAT)/nhdat: $(U)dlb_main $(DAT)/data $(DAT)/rumors $(DAT)/dungeon \ -# $(DAT)/oracles $(DAT)/quest.dat $(O)sp_lev.tag \ -# $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute -# echo dat done >$(O)dat.tag -# cd $(DAT) -# copy $(MSYS)/msdoshlp.txt . -# @$(LS) data dungeon oracles options quest.dat rumors help hh >dlb.lst -# @$(LS) cmdhelp history opthelp wizhelp license msdoshlp.txt >>dlb.lst -# @$(LS) bogusmon engrave epitaph tribute >>dlb.lst -# $(LS) $(subst /,\,*.lev) >>dlb.lst -# $(U)dlb_main cvIf dlb.lst nhdat -# cd $(SRC) -# -#$(U)dlb_main: $(DLBOBJS) -# $(HOST_LINK) $(LFLAGS) -o$@ $(DLBOBJS) -# -#$(HOST_O)dlb_main.o: $(U)dlb_main.c $(INCL)/config.h $(DLB_H) -# $(HOST_CC) $(cflags) -o$@ $(U)dlb_main.c +$(LUALIB): $(LUALIBOBJS) + $(TARGET_AR) rcS $@ $(LUAOBJFILES1) + $(TARGET_AR) rcS $@ $(LUAOBJFILES2) + $(TARGET_AR) rcS $@ $(LUAOBJFILES3) + $(TARGET_AR) rcS $@ $(LUAOBJFILES4) + +#$(LUADLL): $(LUALIBOBJS) +# $(TARGET_CC) -shared -Wl,--export-all-symbols \ +# -Wl,--add-stdcall-alias -o $@ $< #========================================== # Housekeeping. @@ -927,24 +813,17 @@ clean: spotless: clean - if [ -f dgn_flex.c ]; then rm dgn_flex.c; fi; - if [ -f dgn_lex.c ]; then rm dgn_lex.c; fi; - if [ -f $(U)dgn_comp.exe ]; then rm $(U)dgn_comp.exe; fi; if [ -f $(U)recover.exe ]; then rm $(U)recover.exe; fi; if [ -f $(INCL)/vis_tab.h ]; then rm $(INCL)/vis_tab.h; fi; if [ -f $(INCL)/onames.h ]; then rm $(INCL)/onames.h; fi; if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi; if [ -f $(INCL)/date.h ]; then rm $(INCL)/date.h; fi; - if [ -f $(INCL)/dgn_comp.h ]; then rm $(INCL)/dgn_comp.h; fi; - if [ -f $(INCL)/lev_comp.h ]; then rm $(INCL)/lev_comp.h; fi; # if [ -f $(SRC)/monstr.c ]; then rm $(SRC)/monstr.c; fi; if [ -f $(SRC)/vis_tab.c ]; then rm $(SRC)/vis_tab.c; fi; if [ -f $(SRC)/tile.c ]; then rm $(SRC)/tile.c; fi; if [ -f $(DAT)/options ]; then rm $(DAT)/options; fi; if [ -f $(DAT)/data ]; then rm $(DAT)/data; fi; if [ -f $(DAT)/rumors ]; then rm $(DAT)/rumors; fi; - if [ -f $(DAT)/dungeon.pdf ]; then rm $(DAT)/dungeon.pdf; fi; - if [ -f $(DAT)/dungeon ]; then rm $(DAT)/dungeon; fi; if [ -f $(DAT)/oracles ]; then rm $(DAT)/oracles; fi; if [ -f $(DAT)/quest.dat ]; then rm $(DAT)/quest.dat; fi; if [ -f $(DAT)/bogusmon ]; then rm $(DAT)/bogusmon; fi; @@ -952,10 +831,11 @@ spotless: clean if [ -f $(DAT)/epitaph ]; then rm $(DAT)/epitaph; fi; if [ -f $(DAT)/dlb.lst ]; then rm $(DAT)/dlb.lst; fi; if [ -f $(TILE_BMP) ]; then rm $(TILE_BMP); fi; + if [ -f $(PLANAR_TIB) ]; then rm $(PLANAR_TIB); fi; + if [ -f $(OVERVIEW_TIB) ]; then rm $(OVERVIEW_TIB); fi; if [ -f $(WSHR)/monthin.txt ]; then rm $(WSHR)/monthin.txt; fi; if [ -f $(WSHR)/objthin.txt ]; then rm $(WSHR)/objthin.txt; fi; if [ -f $(WSHR)/oththin.txt ]; then rm $(WSHR)/oththin.txt; fi; - -rm $(DAT)/*.lev #========================================== # Create directory for holding object files @@ -1077,8 +957,8 @@ $(O)wintext.o: ../win/X11/wintext.c $(HACK_H) $(INCL)/winX.h $(INCL)/xwindow.h $(TARGET_CC) $(cflags) -o$@ ../win/X11/wintext.c $(O)winval.o: ../win/X11/winval.c $(HACK_H) $(INCL)/winX.h $(TARGET_CC) $(cflags) -o$@ ../win/X11/winval.c -$(O)tile.o: tile.c $(HACK_H) -$(HOST_O)tile.o: tile.c $(HACK_H) +#$(O)tile.o: tile.c $(HACK_H) +#$(HOST_O)tile.o: tile.c $(HACK_H) $(O)gnaskstr.o: ../win/gnome/gnaskstr.c ../win/gnome/gnaskstr.h \ ../win/gnome/gnmain.h $(TARGET_CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnaskstr.c @@ -1130,7 +1010,6 @@ $(O)load_img.o: ../win/gem/load_img.c $(INCL)/load_img.h $(TARGET_CC) $(cflags) -o$@ ../win/gem/load_img.c $(O)gr_rect.o: ../win/gem/gr_rect.c $(INCL)/gr_rect.h $(TARGET_CC) $(cflags) -o$@ ../win/gem/gr_rect.c -$(O)tile.o: tile.c $(HACK_H) $(O)qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) $(INCL)/func_tab.h \ $(INCL)/dlb.h $(PATCHLEV_H) $(INCL)/tile2x11.h \ $(INCL)/qt_win.h $(INCL)/qt_clust.h $(INCL)/qt_kde0.h \ diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh new file mode 100644 index 000000000..c5de2b97f --- /dev/null +++ b/sys/msdos/msdos-cross-compile.sh @@ -0,0 +1,60 @@ +#!/bin/sh +if [ -z "$TRAVIS_BUIILD_DIR" ]; then + export DJGPP_TOP=$(pwd)/djgpp +else + export DJGPP_TOP="$TRAVIS_BUILD_DIR/djgpp" +fi +export +cd util +if [ ! -d ../djgpp/i586-pc-msdosdjgpp ]; then + if [ "$(uname)" = "Darwin" ]; then + #Mac + wget --no-hsts https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/djgpp-osx-gcc550.tar.bz2 + elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then + #Linux + wget --no-hsts https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/djgpp-linux64-gcc550.tar.bz2 + elif [ "$(expr substr $(uname -s) 1 10)" = "MINGW32_NT" ]; then + #mingw + wget --no-hsts https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/djgpp-mingw-gcc550-standalone.zip + fi + if [ ! -d djgpp/i586-pc-msdosdjgpp ]; then + tar xjf util/djgpp-linux64-gcc550.tar.bz2 + fi +fi +cd ../ +# PDCurses +if [ ! -d "../pdcurses" ]; then + echo "Getting ../pdcurses from https://github.com/wmcbrine/PDCurses.git" + git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses +fi +cd djgpp +# DOS-extender for use with djgpp +if [ ! -d cwsdpmi ]; then + wget --no-hsts http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip + mkdir -p cwsdpmi + cd cwsdpmi + unzip ../csdpmi7b.zip + cd ../ + rm csdpmi7b.zip +fi +cd ../src +pwd +mkdir -p ../binary +cp ../dat/data.base ../dat/data.bas +cp ../include/patchlevel.h ../include/patchlev.h +cp ../doc/Guidebook.txt ../doc/guidebk.txt +cp ../sys/share/posixregex.c ../sys/share/posixreg.c +cp ../sys/msdos/Makefile1.cross ../src/Makefile1 +cp ../sys/msdos/Makefile2.cross ../src/Makefile2 +make -f Makefile1 +cat ../include/date.h +export GCC_EXEC_PREFIX=$DJGPP_TOP/lib/gcc/ +export +pwd +make -f Makefile2 +unset GCC_EXEC_PREFIX +if [ -f $TRAVIS_BUILD_DIR/djgpp/cwsdpmi/bin/cwsdpmi.exe ]; then + cp $TRAVIS_BUILD_DIR/djgpp/cwsdpmi/bin/cwsdpmi.exe ../binary/CWSDPMI.EXE; +fi +ls -l ../binary + diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 484f5576e..8455cd075 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -145,6 +145,12 @@ DEBUGINFO = Y # LUATOP=..\..\lua-5.3.5 # +# +#============================================================================== +# +#TEST_CROSSCOMPILE=Y +#OPTIONS_AT_RUNTIME=Y +# #============================================================================== #======================== End of Modification Section ========================= #============================================================================== @@ -314,6 +320,28 @@ REGEX = $(O)cppregex.o TTYOBJ = $(O)topl.o $(O)getline.o $(O)wintty.o +!IFDEF TEST_CROSSCOMPILE +CROSSDEFINE_TARGET = -DCROSSCOMPILE_TARGET +CROSSDEFINE_HOST = -DCROSSCOMPILE_HOST +CROSSCOMPILE = -DCROSSCOMPILE +CROSSDEFINES = $(CROSSCOMPILE) $(CROSSDEFINE_HOST) $(CROSSDEFINE_TARGET) +OPTIONS_AT_RUNTIME=Y +!ELSE +CROSSDEFINE_TARGET = +CROSSDEFINE_HOST = +CROSSCOMPILE = +CROSSDEFINES = +CROSSDEFINES = +!ENDIF + +!IF "$(OPTIONS_AT_RUNTIME)" == "Y" +MDLIB = $(O)mdlib.o +RUNTIMEOPTDEF=-DOPTIONS_AT_RUNTIME +!ELSE +MDLIB = +RUNTIMEOPTDEF= +!ENDIF + !IFNDEF ADD_CURSES CURSESOBJ= !ELSE @@ -330,7 +358,7 @@ OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \ $(VOBJ26) $(VOBJ27) $(VOBJ28) $(VOBJ29) $(VOBJ30) \ - $(REGEX) $(CURSESOBJ) + $(REGEX) $(CURSESOBJ) $(MDLIB) GUIOBJ = $(O)mhaskyn.o $(O)mhdlg.o \ $(O)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \ @@ -608,7 +636,7 @@ CURSESLIB= ccommon= -c -nologo -D"_CONSOLE" -D"_CRT_NONSTDC_NO_DEPRECATE" -D"_CRT_SECURE_NO_DEPRECATE" \ -D"_LIB" -D"_SCL_SECURE_NO_DEPRECATE" -D"_VC80_UPGRADE=0x0600" -D"DLB" -D"_MBCS" \ -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -D"NDEBUG" -D"YY_NO_UNISTD_H" \ - -DHAS_STDINT_H -DHAS_INLINE $(CURSESDEF) \ + -DHAS_STDINT_H -DHAS_INLINE $(CURSESDEF) $(RUNTIMEOPTDEF) \ -EHsc -fp:precise -Gd -GF -GS -Gy \ $(CL_RECENT) -WX- -Zc:forScope -Zc:wchar_t -Zi cdebug= -analyze- -D"_DEBUG" -MTd -RTC1 -Od @@ -708,20 +736,20 @@ DLB = #========================================== .c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< {$(SRC)}.c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< #========================================== # Rules for files in sys\share #========================================== {$(SSYS)}.c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< {$(SSYS)}.cpp{$(OBJ)}.o: - @$(cc) $(cflagsBuild) /EHsc -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSDEFINES) /EHsc -Fo$@ $< #========================================== # Rules for files in sys\winnt @@ -738,14 +766,14 @@ DLB = #========================================== {$(UTIL)}.c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< #========================================== # Rules for files in win\share #========================================== {$(WSHR)}.c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< {$(WSHR)}.h{$(INCL)}.h: @copy $< $@ @@ -758,7 +786,7 @@ DLB = #========================================== {$(TTY)}.c{$(OBJ)}.o: - $(cc) $(cflagsBuild) -Fo$@ $< + $(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< #========================================== @@ -766,14 +794,14 @@ DLB = #========================================== {$(MSWIN)}.c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) -Fo$@ $< + $(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< #========================================== # Rules for files in win\curses #========================================== {$(WCURSES)}.c{$(OBJ)}.o: - @$(cc) -DPDC_NCMOUSE $(PDCINCL) $(cflagsBuild) -Fo$@ $< + @$(cc) -DPDC_NCMOUSE $(PDCINCL) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< #{$(WCURSES)}.txt{$(DAT)}.txt: # @copy $< $@ @@ -783,20 +811,20 @@ DLB = #========================================== {$(PDCURSES_TOP)}.c{$(OBJ)}.o: - @$(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $< + @$(cc) $(PDCINCL) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< {$(PDCSRC)}.c{$(OBJ)}.o: - @$(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $< + @$(cc) $(PDCINCL) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< {$(PDCWINCON)}.c{$(OBJ)}.o: - @$(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $< + @$(cc) $(PDCINCL) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< #========================================== # Rules for LUA files #========================================== {$(LUASRC)}.c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< #========================================== #=============== TARGETS ================== @@ -1063,7 +1091,7 @@ $(U)nhsizes.exe: $(O)nhsizes.o $(link) $(lflagsBuild) -out:$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o $(O)nhsizes.o: $(CONFIG_H) nhsizes.c - @$(cc) $(cflagsBuild) -Fo$@ nhsizes.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ nhsizes.c $(U)makedefs.exe: $(MAKEOBJS) @echo Linking $(@:\=/) @@ -1074,7 +1102,8 @@ $(O)makedefs.o: $(CONFIG_H) $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\objcla $(U)makedefs.c @if not exist $(OBJ)\*.* echo creating directory $(OBJ:\=/) @if not exist $(OBJ)\*.* mkdir $(OBJ) - @$(cc) -DENUM_PM $(cflagsBuild) -Fo$@ $(U)makedefs.c + $(cc) -DENUM_PM $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(U)makedefs.c +# $(cc) -DENUM_PM $(cflagsBuild) $(CROSSDEFINES) /EP -Fo$@ $(U)makedefs.c >makedefs.c.preprocessed # # date.h should be remade every time any of the source or include @@ -1105,7 +1134,7 @@ $(U)uudecode.exe: $(O)uudecode.o @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)uudecode.o $(O)uudecode.o: $(SSYS)\uudecode.c - @$(cc) $(cflagsBuild) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c $(MSWSYS)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu chdir $(MSWSYS) @@ -1271,10 +1300,10 @@ $(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o << $(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)\dlb.h - @$(cc) $(cflagsBuild) /Fo$@ $(SRC)\dlb.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) /Fo$@ $(SRC)\dlb.c $(O)dlb_main.o: $(UTIL)\dlb_main.c $(INCL)\config.h $(INCL)\dlb.h - @$(cc) $(cflagsBuild) /Fo$@ $(UTIL)\dlb_main.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) /Fo$@ $(UTIL)\dlb_main.c $(DAT)\porthelp: $(MSWSYS)\porthelp @copy $(MSWSYS)\porthelp $@ >nul @@ -1320,7 +1349,7 @@ $(U)recover.exe: $(RECOVOBJS) $(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(RECOVOBJS) $(O)recover.o: $(CONFIG_H) $(U)recover.c $(MSWSYS)\win32api.h - @$(cc) $(cflagsBuild) -Fo$@ $(U)recover.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(U)recover.c #========================================== # Tile Mapping @@ -1335,28 +1364,28 @@ $(U)tilemap.exe: $(O)tilemap.o @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)tilemap.o $(O)tilemap.o: $(WSHR)\tilemap.c $(HACK_H) - @$(cc) $(cflagsBuild) -Fo$@ $(WSHR)\tilemap.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(WSHR)\tilemap.c $(O)tiletx32.o: $(WSHR)\tilemap.c $(HACK_H) - @$(cc) $(cflagsBuild) /DTILETEXT /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tilemap.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) /DTILETEXT /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tilemap.c $(O)tiletxt.o: $(WSHR)\tilemap.c $(HACK_H) - @$(cc) $(cflagsBuild) /DTILETEXT -Fo$@ $(WSHR)\tilemap.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) /DTILETEXT -Fo$@ $(WSHR)\tilemap.c $(O)gifread.o: $(WSHR)\gifread.c $(CONFIG_H) $(TILE_H) - @$(cc) $(cflagsBuild) -I$(WSHR) -Fo$@ $(WSHR)\gifread.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) -Fo$@ $(WSHR)\gifread.c $(O)gifrd32.o: $(WSHR)\gifread.c $(CONFIG_H) $(TILE_H) - @$(cc) $(cflagsBuild) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\gifread.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\gifread.c $(O)ppmwrite.o: $(WSHR)\ppmwrite.c $(CONFIG_H) $(TILE_H) - @$(cc) $(cflagsBuild) -I$(WSHR) -Fo$@ $(WSHR)\ppmwrite.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) -Fo$@ $(WSHR)\ppmwrite.c $(O)tiletext.o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H) - @$(cc) $(cflagsBuild) -I$(WSHR) -Fo$@ $(WSHR)\tiletext.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) -Fo$@ $(WSHR)\tiletext.c $(O)tilete32.o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H) - @$(cc) $(cflagsBuild) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tiletext.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tiletext.c #========================================== # Optional Tile Utilities @@ -1414,10 +1443,10 @@ $(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32) << $(O)tile2bmp.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h - @$(cc) $(cflagsBuild) -I$(WSHR) /DPACKED_FILE /Fo$@ $(WSHR)\tile2bmp.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) /DPACKED_FILE /Fo$@ $(WSHR)\tile2bmp.c $(O)til2bm32.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h - @$(cc) $(cflagsBuild) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c #=============================================================================== # PDCurses @@ -1427,7 +1456,7 @@ $(O)pdcurses.lib : $(PDCLIBOBJS) $(PDCOBJS) lib -nologo /out:$@ $(PDCLIBOBJS) $(PDCOBJS) $(O)pdcscrn.o : $(PDCURSES_HEADERS) $(PDCWINCON)\pdcscrn.c $(MSWSYS)\stub-pdcscrn.c - $(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $(MSWSYS)\stub-pdcscrn.c + $(cc) $(PDCINCL) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(MSWSYS)\stub-pdcscrn.c #=============================================================================== # LUA @@ -1448,7 +1477,25 @@ $(O)lua$(LUAVER)-static.lib: $(LUAOBJFILES) $(O)lua.o: $(LUASRC)\lua.c $(O)luac.o: $(LUASRC)\luac.c $(O)lapi.o: $(LUASRC)\lapi.c - @$(cc) $(cflagsBuild) -wd4244 -Fo$@ $(LUASRC)\lapi.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -wd4244 -Fo$@ $(LUASRC)\lapi.c + +#=============================================================================== +# CROSSCOMPILE +#=============================================================================== + +# Under a cross-compile, some of the values stored statically into +# text files cannot be trusted as being representative of the +# settings and features used on the build of the target binaries. +# +# We move some of that stuff into the game run-time by separating +# out the functions into src\mdlib.c to get some of the required +# functionality at game runtime instead of from a previously written +# data file. +# + +$(O)mdlib.o: $(SRC)\mdlib.c + $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_TARGET) -DMAKEDEFS_MDOBJ -Fo$@ $(SRC)\mdlib.c +# $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_TARGET) -DMAKEDEFS_MDOBJ /EP -Fo$@ $(SRC)\mdlib.c >mdlib.c.preprocessed #=============================================================================== # Housekeeping @@ -1642,31 +1689,32 @@ $(DAT)\dungeon: $(O)utility.tag $(DAT)\dungeon.def # $(O)nttty.o: $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h $(MSWSYS)\nttty.c - @$(cc) $(cflagsBuild) -I$(WSHR) -Fo$@ $(MSWSYS)\nttty.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) -Fo$@ $(MSWSYS)\nttty.c $(O)winnt.o: $(HACK_H) $(MSWSYS)\win32api.h $(MSWSYS)\winnt.c - @$(cc) $(cflagsBuild) -I$(MSWSYS) -I$(MSWIN) -Fo$@ $(MSWSYS)\win10.c - @$(cc) $(cflagsBuild) -Fo$@ $(MSWSYS)\winnt.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(MSWSYS) -I$(MSWIN) -Fo$@ $(MSWSYS)\win10.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(MSWSYS)\winnt.c $(O)ntsound.o: $(HACK_H) $(MSWSYS)\ntsound.c - @$(cc) $(cflagsBuild) -Fo$@ $(MSWSYS)\ntsound.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(MSWSYS)\ntsound.c +$(O)windmain.o: $(MSWSYS)\windmain.c $(HACK_H) #if you aren't linking in the full gui then #include the following stub for proper linkage. $(O)guistub.o: $(HACK_H) $(MSWSYS)\stubs.c - @$(cc) $(cflagsBuild) -DGUISTUB -Fo$@ $(MSWSYS)\stubs.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -DGUISTUB -Fo$@ $(MSWSYS)\stubs.c # # WIN32 dependencies # $(O)NetHackW.o: $(HACK_H) $(MSWIN)\NetHackW.c - @$(cc) $(cflagsBuild) -I$(MSWSYS) -I$(MSWIN) -Fo$@ $(MSWIN)\NetHackW.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(MSWSYS) -I$(MSWIN) -Fo$@ $(MSWIN)\NetHackW.c #if you aren't linking in the full tty then #include the following stub for proper linkage. $(O)ttystub.o: $(HACK_H) $(MSWSYS)\stubs.c - @$(cc) $(cflagsBuild) -DTTYSTUB -Fo$@ $(MSWSYS)\stubs.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -DTTYSTUB -Fo$@ $(MSWSYS)\stubs.c # #============================================ @@ -1675,19 +1723,19 @@ $(O)ttystub.o: $(HACK_H) $(MSWSYS)\stubs.c $(O)sfbase.o: $(HACK_H) $(INCL)\sfproto.h $(INCL)\sfprocs.h \ $(SRC)\sfbase.c - @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfbase.c +# @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfbase.c $(O)sfdata.o: $(HACK_H) $(INCL)\sfprocs.h $(SRC)\sfdata.c - @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfdata.c +# @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfdata.c $(O)sfstruct.o: $(HACK_H) $(SRC)\sfstruct.c - @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfstruct.c +# @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfstruct.c $(O)sfascii.o: $(HACK_H) $(INCL)\sfprocs.h $(SRC)\sfascii.c - @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfascii.c +# @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfascii.c $(O)sflendian.o: $(HACK_H) $(INCL)\sfprocs.h $(SRC)\sflendian.c - @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sflendian.c +# @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sflendian.c $(SRC)\sfdata.c: $(U)readtags.exe $(U)nethack.tags $(U)readtags.exe @@ -1699,7 +1747,7 @@ $(U)readtags.exe: $(O)readtags.o @$(link) $(lflagsBuild) -out:$@ $(O)readtags.o $(O)readtags.o: $(U)readtags.c $(U)nethack.tags $(CONFIG_H) $(PATCHLEVEL_H) - @$(cc) $(cflagsBuild) $(TEMPL) -Fo$@ $(U)readtags.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) $(TEMPL) -Fo$@ $(U)readtags.c # #tested only with exuberant ctags from http://ctags.sourceforge.net @@ -1763,14 +1811,14 @@ $(U)nethack.tags: $(CTAGDEP) # $(O)panic.o: $(U)panic.c $(CONFIG_H) - @$(cc) $(cflagsBuild) -Fo$@ $(U)panic.c + @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(U)panic.c # # sys/share dependencies # (O)cppregex.o: $(O)cppregex.cpp $(HACK_H) - @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\cppregex.cpp + @$(CC) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ ..\sys\share\cppregex.cpp # # curses window port dependencies @@ -1798,126 +1846,126 @@ $(O)curswins.o: $(WCURSES)\curswins.c $(WCURSES)\curswins.h $(INCL)\wincurs.h # $(O)tos.o: ..\sys\atari\tos.c $(HACK_H) $(INCL)\tcap.h - @$(CC) $(cflagsBuild) -Fo$@ ..\sys\atari\tos.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\atari\tos.c $(O)pctty.o: ..\sys\share\pctty.c $(HACK_H) - @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\pctty.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\pctty.c $(O)isaac64.o: ..\src\isaac64.c $(HACK_H) $(INCL)\isaac64.h $(INCL)\integer.h - @$(CC) $(cflagsBuild) -Fo$@ ..\src\isaac64.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\src\isaac64.c $(O)random.o: ..\sys\share\random.c $(HACK_H) - @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\random.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\random.c $(O)ioctl.o: ..\sys\share\ioctl.c $(HACK_H) $(INCL)\tcap.h - @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\ioctl.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\ioctl.c $(O)unixtty.o: ..\sys\share\unixtty.c $(HACK_H) - @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\unixtty.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\unixtty.c $(O)unixmain.o: ..\sys\unix\unixmain.c $(HACK_H) $(INCL)\dlb.h - @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixmain.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixmain.c $(O)unixunix.o: ..\sys\unix\unixunix.c $(HACK_H) - @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixunix.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixunix.c $(O)unixres.o: ..\sys\unix\unixres.c $(CONFIG_H) - @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixres.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixres.c $(O)bemain.o: ..\sys\be\bemain.c $(HACK_H) $(INCL)\dlb.h - @$(CC) $(cflagsBuild) -Fo$@ ..\sys\be\bemain.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\be\bemain.c $(O)getline.o: ..\win\tty\getline.c $(HACK_H) $(INCL)\func_tab.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\getline.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\getline.c $(O)termcap.o: ..\win\tty\termcap.c $(HACK_H) $(INCL)\tcap.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\termcap.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\termcap.c $(O)topl.o: ..\win\tty\topl.c $(HACK_H) $(INCL)\tcap.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\topl.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\topl.c $(O)wintty.o: ..\win\tty\wintty.c $(HACK_H) $(INCL)\dlb.h $(INCL)\tcap.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\wintty.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\wintty.c #$(O)Window.o: ..\win\X11\Window.c $(INCL)\xwindowp.h $(INCL)\xwindow.h \ # $(CONFIG_H) # @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\Window.c $(O)dialogs.o: ..\win\X11\dialogs.c $(CONFIG_H) - @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\dialogs.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\dialogs.c $(O)winX.o: ..\win\X11\winX.c $(HACK_H) $(INCL)\winX.h $(INCL)\dlb.h \ ..\win\X11\nh72icon ..\win\X11\nh56icon ..\win\X11\nh32icon - @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winX.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winX.c $(O)winmap.o: ..\win\X11\winmap.c $(INCL)\xwindow.h $(HACK_H) $(INCL)\dlb.h \ $(INCL)\winX.h $(INCL)\tile2x11.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmap.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmap.c $(O)winmenu.o: ..\win\X11\winmenu.c $(HACK_H) $(INCL)\winX.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmenu.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmenu.c $(O)winmesg.o: ..\win\X11\winmesg.c $(INCL)\xwindow.h $(HACK_H) $(INCL)\winX.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmesg.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmesg.c $(O)winmisc.o: ..\win\X11\winmisc.c $(HACK_H) $(INCL)\func_tab.h \ $(INCL)\winX.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmisc.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmisc.c $(O)winstat.o: ..\win\X11\winstat.c $(HACK_H) $(INCL)\winX.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winstat.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winstat.c $(O)wintext.o: ..\win\X11\wintext.c $(HACK_H) $(INCL)\winX.h $(INCL)\xwindow.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\wintext.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\wintext.c $(O)winval.o: ..\win\X11\winval.c $(HACK_H) $(INCL)\winX.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winval.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winval.c $(O)tile.o: $(SRC)\tile.c $(HACK_H) $(O)gnaskstr.o: ..\win\gnome\gnaskstr.c ..\win\gnome\gnaskstr.h \ ..\win\gnome\gnmain.h - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnaskstr.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnaskstr.c $(O)gnbind.o: ..\win\gnome\gnbind.c ..\win\gnome\gnbind.h ..\win\gnome\gnmain.h \ ..\win\gnome\gnmenu.h ..\win\gnome\gnaskstr.h \ ..\win\gnome\gnyesno.h - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnbind.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnbind.c $(O)gnglyph.o: ..\win\gnome\gnglyph.c ..\win\gnome\gnglyph.h $(INCL)\tile2x11.h - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnglyph.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnglyph.c $(O)gnmain.o: ..\win\gnome\gnmain.c ..\win\gnome\gnmain.h ..\win\gnome\gnsignal.h \ ..\win\gnome\gnbind.h ..\win\gnome\gnopts.h $(HACK_H) \ $(INCL)\date.h - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmain.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmain.c $(O)gnmap.o: ..\win\gnome\gnmap.c ..\win\gnome\gnmap.h ..\win\gnome\gnglyph.h \ ..\win\gnome\gnsignal.h $(HACK_H) - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmap.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmap.c $(O)gnmenu.o: ..\win\gnome\gnmenu.c ..\win\gnome\gnmenu.h ..\win\gnome\gnmain.h \ ..\win\gnome\gnbind.h $(INCL)\func_tab.h - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmenu.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmenu.c $(O)gnmesg.o: ..\win\gnome\gnmesg.c ..\win\gnome\gnmesg.h ..\win\gnome\gnsignal.h - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmesg.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmesg.c $(O)gnopts.o: ..\win\gnome\gnopts.c ..\win\gnome\gnopts.h ..\win\gnome\gnglyph.h \ ..\win\gnome\gnmain.h ..\win\gnome\gnmap.h $(HACK_H) - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnopts.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnopts.c $(O)gnplayer.o: ..\win\gnome\gnplayer.c ..\win\gnome\gnplayer.h \ ..\win\gnome\gnmain.h $(HACK_H) - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnplayer.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnplayer.c $(O)gnsignal.o: ..\win\gnome\gnsignal.c ..\win\gnome\gnsignal.h \ ..\win\gnome\gnmain.h - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnsignal.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnsignal.c $(O)gnstatus.o: ..\win\gnome\gnstatus.c ..\win\gnome\gnstatus.h \ ..\win\gnome\gnsignal.h ..\win\gnome\gn_xpms.h \ ..\win\gnome\gnomeprv.h - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnstatus.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnstatus.c $(O)gntext.o: ..\win\gnome\gntext.c ..\win\gnome\gntext.h ..\win\gnome\gnmain.h \ ..\win\gnome\gn_rip.h - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gntext.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gntext.c $(O)gnyesno.o: ..\win\gnome\gnyesno.c ..\win\gnome\gnbind.h ..\win\gnome\gnyesno.h - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnyesno.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnyesno.c $(O)gnworn.o: ..\win\gnome\gnworn.c ..\win\gnome\gnworn.h ..\win\gnome\gnglyph.h \ ..\win\gnome\gnsignal.h ..\win\gnome\gnomeprv.h - @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnworn.c +# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnworn.c $(O)wingem.o: ..\win\gem\wingem.c $(HACK_H) $(INCL)\func_tab.h $(INCL)\dlb.h \ $(INCL)\patchlevel.h $(INCL)\wingem.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\wingem.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\wingem.c $(O)wingem1.o: ..\win\gem\wingem1.c $(INCL)\gem_rsc.h $(INCL)\load_img.h \ $(INCL)\gr_rect.h $(INCL)\wintype.h $(INCL)\wingem.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\wingem1.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\wingem1.c $(O)load_img.o: ..\win\gem\load_img.c $(INCL)\load_img.h @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\load_img.c $(O)gr_rect.o: ..\win\gem\gr_rect.c $(INCL)\gr_rect.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\gr_rect.c +# @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\gr_rect.c $(O)tile.o: $(SRC)\tile.c $(HACK_H) $(O)qt_win.o: ..\win\Qt\qt_win.cpp $(HACK_H) $(INCL)\func_tab.h \ $(INCL)\dlb.h $(INCL)\patchlevel.h $(INCL)\tile2x11.h \ $(INCL)\qt_win.h $(INCL)\qt_clust.h $(INCL)\qt_kde0.h \ $(INCL)\qt_xpms.h qt_win.moc qt_kde0.moc qttableview.moc - $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_win.cpp +# $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_win.cpp $(O)qt_clust.o: ..\win\Qt\qt_clust.cpp $(INCL)\qt_clust.h - $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_clust.cpp +# $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_clust.cpp $(O)qttableview.o: ..\win\Qt\qttableview.cpp $(INCL)\qttableview.h - $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qttableview.cpp +# $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qttableview.cpp $(O)wc_chainin.o: ..\win\chain\wc_chainin.c $(HACK_H) - @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_chainin.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_chainin.c $(O)wc_chainout.o: ..\win\chain\wc_chainout.c $(HACK_H) - @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_chainout.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_chainout.c $(O)wc_trace.o: ..\win\chain\wc_trace.c $(HACK_H) $(INCL)\func_tab.h - @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_trace.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_trace.c $(O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)\vis_tab.h $(O)allmain.o: allmain.c $(HACK_H) $(O)alloc.o: alloc.c $(CONFIG_H) @@ -2023,11 +2071,11 @@ $(O)uhitm.o: uhitm.c $(HACK_H) $(O)vault.o: vault.c $(HACK_H) $(O)version.o: version.c $(HACK_H) $(INCL)\dlb.h $(INCL)\date.h \ $(INCL)\patchlevel.h + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_TARGET) -Fo$@ version.c $(O)vision.o: vision.c $(HACK_H) $(INCL)\vis_tab.h $(O)weapon.o: weapon.c $(HACK_H) $(O)were.o: were.c $(HACK_H) $(O)wield.o: wield.c $(HACK_H) -$(O)windmain.o: $(MSWSYS)\windmain.c $(HACK_H) #$(O)windows.o: windows.c $(HACK_H) $(INCL)\wingem.h $(INCL)\winGnome.h $(O)wizard.o: wizard.c $(HACK_H) $(INCL)\qtext.h $(O)worm.o: worm.c $(HACK_H) $(INCL)\lev.h diff --git a/util/makedefs.c b/util/makedefs.c index 608491894..c6a7a8cb4 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -53,7 +53,7 @@ #endif #if defined(UNIX) && !defined(LINT) && !defined(GCC_WARN) -static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.6\t2019/05/07"; +static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.7\t2019/11/19"; #endif /* names of files to be generated */ @@ -156,7 +156,6 @@ void FDECL(do_makedefs, (char *)); void NDECL(do_objs); void NDECL(do_data); void NDECL(do_dungeon); -void NDECL(do_date); void NDECL(do_options); void NDECL(do_monstr); void NDECL(do_permonst); @@ -164,6 +163,7 @@ void NDECL(do_questtxt); void NDECL(do_rumors); void NDECL(do_oracles); void NDECL(do_vision); +void NDECL(do_date); extern void NDECL(monst_globals_init); /* monst.c */ extern void NDECL(objects_globals_init); /* objects.c */ @@ -172,22 +172,13 @@ static char *FDECL(name_file, (const char *, const char *)); static void FDECL(delete_file, (const char *template, const char *)); static FILE *FDECL(getfp, (const char *, const char *, const char *)); static void FDECL(do_ext_makedefs, (int, char **)); - -static void NDECL(make_version); -static char *FDECL(version_string, (char *, const char *)); -static char *FDECL(version_id_string, (char *, const char *)); -static char *FDECL(bannerc_string, (char *, const char *)); static char *FDECL(xcrypt, (const char *)); static unsigned long FDECL(read_rumors_file, (const char *, int *, long *, unsigned long)); -static boolean FDECL(get_gitinfo, (char *, char *)); static void FDECL(do_rnd_access_file, (const char *)); static boolean FDECL(d_filter, (char *)); static boolean FDECL(h_filter, (char *)); -static void NDECL(build_savebones_compat_string); -static void NDECL(windowing_sanity); static void FDECL(opt_out_words, (char *, int *)); - static boolean FDECL(qt_comment, (char *)); static boolean FDECL(qt_control, (char *)); static int FDECL(get_hdr, (char *)); @@ -211,8 +202,8 @@ static int FDECL(clear_path, (int, int, int, int)); static char *FDECL(fgetline, (FILE*)); static char *FDECL(tmpdup, (const char *)); static char *FDECL(limit, (char *, int)); -static char *FDECL(eos, (char *)); -static int FDECL(case_insensitive_comp, (const char *, const char *)); +static void NDECL(windowing_sanity); +static boolean FDECL(get_gitinfo, (char *, char *)); /* input, output, tmp */ static FILE *ifp, *ofp, *tfp; @@ -228,6 +219,22 @@ static boolean use_enum = extern unsigned _stklen = STKSIZ; #endif +/* + * Some of the routines in this source file were moved into .../src/mdlib + * to facilitate the use of a cross-compiler generation of some of the + * information for the target environment during the game compile portion + * under the cross-compiler and/or at runtime in some cases. + */ +/* These actually reside in src/mdlib.c */ +static int FDECL(case_insensitive_comp, (const char *, const char *)); +static void NDECL(make_version); +static char *FDECL(version_id_string, (char *, const char *)); +static char *FDECL(version_string, (char *, const char *)); +static char *FDECL(eos, (char *)); +/* REPRODUCIBLE_BUILD will change this to TRUE */ +static boolean date_via_env = FALSE; +#include "../src/mdlib.c" + #ifdef MACsansMPWTOOL int main(void) @@ -295,7 +302,6 @@ char *argv[]; /*NOTREACHED*/ return 0; } - #endif void @@ -1069,180 +1075,6 @@ rumors_failure: exit(EXIT_FAILURE); } -/* - * Use this to explicitly mask out features during version checks. - * - * ZEROCOMP, RLECOMP, and ZLIB_COMP describe compression features - * that the port/plaform which wrote the savefile was capable of - * dealing with. Don't reject a savefile just because the port - * reading the savefile doesn't match on all/some of them. - * The actual compression features used to produce the savefile are - * recorded in the savefile_info structure immediately following the - * version_info, and that is what needs to be checked against the - * feature set of the port that is reading the savefile back in. - * That check is done in src/restore.c now. - * - */ -#define IGNORED_FEATURES \ - (0L | (1L << 19) /* SCORE_ON_BOTL */ \ - | (1L << 27) /* ZEROCOMP */ \ - | (1L << 28) /* RLECOMP */ \ - ) - -static void -make_version() -{ - register int i; - - /* - * integer version number - */ - version.incarnation = ((unsigned long) VERSION_MAJOR << 24) - | ((unsigned long) VERSION_MINOR << 16) - | ((unsigned long) PATCHLEVEL << 8) - | ((unsigned long) EDITLEVEL); - /* - * encoded feature list - * Note: if any of these magic numbers are changed or reassigned, - * EDITLEVEL in patchlevel.h should be incremented at the same time. - * The actual values have no special meaning, and the category - * groupings are just for convenience. - */ - version.feature_set = (unsigned long) (0L -/* levels and/or topology (0..4) */ -/* monsters (5..9) */ -#ifdef MAIL_STRUCTURES - | (1L << 6) -#endif -/* objects (10..14) */ -/* flag bits and/or other global variables (15..26) */ -#ifdef TEXTCOLOR - | (1L << 17) -#endif -#ifdef INSURANCE - | (1L << 18) -#endif -#ifdef SCORE_ON_BOTL - | (1L << 19) -#endif -/* data format (27..31) - * External compression methods such as COMPRESS and ZLIB_COMP - * do not affect the contents and are thus excluded from here */ -#ifdef ZEROCOMP - | (1L << 27) -#endif -#ifdef RLECOMP - | (1L << 28) -#endif - ); - /* - * Value used for object & monster sanity check. - * (NROFARTIFACTS<<24) | (NUM_OBJECTS<<12) | (NUMMONS<<0) - */ - for (i = 1; artifact_names[i]; i++) - continue; - version.entity_count = (unsigned long) (i - 1); - for (i = 1; objects[i].oc_class != ILLOBJ_CLASS; i++) - continue; - version.entity_count = (version.entity_count << 12) | (unsigned long) i; - for (i = 0; mons[i].mlet; i++) - continue; - version.entity_count = (version.entity_count << 12) | (unsigned long) i; - /* - * Value used for compiler (word size/field alignment/padding) check. - */ - version.struct_sizes1 = - (((unsigned long) sizeof(struct context_info) << 24) - | ((unsigned long) sizeof(struct obj) << 17) - | ((unsigned long) sizeof(struct monst) << 10) - | ((unsigned long) sizeof(struct you))); - version.struct_sizes2 = (((unsigned long) sizeof(struct flag) << 10) | -/* free bits in here */ -#ifdef SYSFLAGS - ((unsigned long) sizeof(struct sysflag))); -#else - ((unsigned long) 0L)); -#endif - return; -} - -/* REPRODUCIBLE_BUILD will change this to TRUE */ -static boolean date_via_env = FALSE; - -static char * -version_string(outbuf, delim) -char *outbuf; -const char *delim; -{ - Sprintf(outbuf, "%d%s%d%s%d", VERSION_MAJOR, delim, VERSION_MINOR, delim, - PATCHLEVEL); -#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) - Sprintf(eos(outbuf), "-%d", EDITLEVEL); -#endif - return outbuf; -} - -static char * -version_id_string(outbuf, build_date) -char *outbuf; -const char *build_date; -{ - char subbuf[64], versbuf[64]; - char betabuf[64]; - -#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) -#if (NH_DEVEL_STATUS == NH_STATUS_BETA) - Strcpy(betabuf, " Beta"); -#else - Strcpy(betabuf, " Work-in-progress"); -#endif -#else - betabuf[0] = '\0'; -#endif - - subbuf[0] = '\0'; -#ifdef PORT_SUB_ID - subbuf[0] = ' '; - Strcpy(&subbuf[1], PORT_SUB_ID); -#endif - - Sprintf(outbuf, "%s NetHack%s Version %s%s - last %s %s.", PORT_ID, - subbuf, version_string(versbuf, "."), betabuf, - date_via_env ? "revision" : "build", build_date); - return outbuf; -} - -static char * -bannerc_string(outbuf, build_date) -char *outbuf; -const char *build_date; -{ - char subbuf[64], versbuf[64]; - - subbuf[0] = '\0'; -#ifdef PORT_SUB_ID - subbuf[0] = ' '; - Strcpy(&subbuf[1], PORT_SUB_ID); -#endif -#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) -#if (NH_DEVEL_STATUS == NH_STATUS_BETA) - Strcat(subbuf, " Beta"); -#else - Strcat(subbuf, " Work-in-progress"); -#endif -#endif - - Sprintf(outbuf, " Version %s %s%s, %s %s.", - version_string(versbuf, "."), PORT_ID, subbuf, - date_via_env ? "revised" : "built", &build_date[4]); -#if 0 - Sprintf(outbuf, "%s NetHack%s %s Copyright 1985-%s (built %s)", - PORT_ID, subbuf, version_string(versbuf,"."), RELEASE_YEAR, - &build_date[4]); -#endif - return outbuf; -} - void do_date() { @@ -1254,6 +1086,13 @@ do_date() char githash[BUFSZ], gitbranch[BUFSZ]; char *c, cbuf[60], buf[BUFSZ]; const char *ul_sfx; +#if defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST) + int steps = 0; + const char ind[] = " "; + const char *xpref = "HOST_"; +#else + const char *xpref = (const char *) 0; +#endif /* CROSSCOMPILE && CROSSCOMPILE_HOST */ /* before creating date.h, make sure that xxx_GRAPHICS and DEFAULT_WINDOW_SYS have been set up in a viable fashion */ @@ -1345,7 +1184,7 @@ do_date() #else /* ordinary build: use current date+time */ Strcpy(cbuf, ctime(&clocktim)); -#endif +#endif /* REPRODUCIBLE_BUILD */ if ((c = index(cbuf, '\n')) != 0) *c = '\0'; /* strip off the '\n' */ @@ -1354,6 +1193,20 @@ do_date() #else ul_sfx = "L"; #endif + +#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST) + Fprintf(ofp, "\n#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST)\n"); +#if 0 + Fprintf(ofp, "/* On a CROSSCOMPILE build, NetHack is built in two steps:\n"); + Fprintf(ofp, " *%s%d. %s\n", + ind, ++steps, "Build makedefs and its prerequisites, and"); + Fprintf(ofp, " *%s %s\n", + ind, "execute makedefs to generate date.h, onames.h, and pm.h."); + Fprintf(ofp, " *%s%d. %s\n *%s %s\n */\n\n", ind, ++steps, + "Build the rest of NetHack using the cross-compiler", + ind, "to generate the game code for target platform."); +#endif +#endif /* CROSSCOMPILE || CROSSCOMPILE_HOST */ if (date_via_env) Fprintf(ofp, "#define SOURCE_DATE_EPOCH (%lu%s) /* via getenv() */\n", (unsigned long) clocktim, ul_sfx); @@ -1368,9 +1221,9 @@ do_date() ul_sfx); Fprintf(ofp, "#define VERSION_FEATURES 0x%08lx%s\n", version.feature_set, ul_sfx); -#ifdef IGNORED_FEATURES +#ifdef MD_IGNORED_FEATURES Fprintf(ofp, "#define IGNORED_FEATURES 0x%08lx%s\n", - (unsigned long) IGNORED_FEATURES, ul_sfx); + (unsigned long) MD_IGNORED_FEATURES, ul_sfx); #endif Fprintf(ofp, "#define VERSION_SANITY1 0x%08lx%s\n", version.entity_count, ul_sfx); @@ -1384,11 +1237,19 @@ do_date() version_id_string(buf, cbuf)); Fprintf(ofp, "#define COPYRIGHT_BANNER_C \\\n \"%s\"\n", bannerc_string(buf, cbuf)); - Fprintf(ofp, "\n"); if (get_gitinfo(githash, gitbranch)) { Fprintf(ofp, "#define NETHACK_GIT_SHA \"%s\"\n", githash); Fprintf(ofp, "#define NETHACK_GIT_BRANCH \"%s\"\n", gitbranch); } + if (xpref && get_gitinfo(githash, gitbranch)) { + Fprintf(ofp, "#else /* !CROSSCOMPILE || CROSSCOMPILE_HOST */\n"); + Fprintf(ofp, "#define NETHACK_%sGIT_SHA \"%s\"\n", + xpref, githash); + Fprintf(ofp, "#define NETHACK_%sGIT_BRANCH \"%s\"\n", + xpref, gitbranch); + } + Fprintf(ofp, "#endif /* !CROSSCOMPILE || CROSSCOMPILE_HOST */\n"); + Fprintf(ofp, "\n"); #ifdef AMIGA { struct tm *tm = localtime((time_t *) &clocktim); @@ -1462,281 +1323,28 @@ char *githash, *gitbranch; return FALSE; } -static int -case_insensitive_comp(s1, s2) -const char *s1; -const char *s2; +void +do_options() { - uchar u1, u2; + const char *optline; + int infocontext = 0; - for (;; s1++, s2++) { - u1 = (uchar) *s1; - if (isupper(u1)) - u1 = tolower(u1); - u2 = (uchar) *s2; - if (isupper(u2)) - u2 = tolower(u2); - if (u1 == '\0' || u1 != u2) - break; + windowing_sanity(); + filename[0] = '\0'; +#ifdef FILE_PREFIX + Strcat(filename, file_prefix); +#endif + Sprintf(eos(filename), DATA_TEMPLATE, OPTIONS_FILE); + if (!(ofp = fopen(filename, WRTMODE))) { + perror(filename); + exit(EXIT_FAILURE); } - return u1 - u2; + while ((optline = do_runtime_info(&infocontext))) + Fprintf(ofp, "%s\n", optline); + Fclose(ofp); + return; } -static char save_bones_compat_buf[BUFSZ]; - -static void -build_savebones_compat_string() -{ -#ifdef VERSION_COMPATIBILITY - unsigned long uver = VERSION_COMPATIBILITY; -#endif - Strcpy(save_bones_compat_buf, - "save and bones files accepted from version"); -#ifdef VERSION_COMPATIBILITY - Sprintf(eos(save_bones_compat_buf), "s %lu.%lu.%lu through %d.%d.%d", - ((uver & 0xFF000000L) >> 24), ((uver & 0x00FF0000L) >> 16), - ((uver & 0x0000FF00L) >> 8), VERSION_MAJOR, VERSION_MINOR, - PATCHLEVEL); -#else - Sprintf(eos(save_bones_compat_buf), " %d.%d.%d only", VERSION_MAJOR, - VERSION_MINOR, PATCHLEVEL); -#endif -} - -static const char *build_opts[] = { -#ifdef AMIGA_WBENCH - "Amiga WorkBench support", -#endif -#ifdef ANSI_DEFAULT - "ANSI default terminal", -#endif -#ifdef TEXTCOLOR - "color", -#endif -#ifdef TTY_GRAPHICS -#ifdef TTY_TILES_ESCCODES - "console escape codes for tile hinting", -#endif -#endif -#ifdef COM_COMPL - "command line completion", -#endif -#ifdef LIFE - "Conway's Game of Life", -#endif -#ifdef COMPRESS - "data file compression", -#endif -#ifdef ZLIB_COMP - "ZLIB data file compression", -#endif -#ifdef DLB -#ifndef VERSION_IN_DLB_FILENAME - "data librarian", -#else - "data librarian with a version-dependent name", -#endif -#endif -#ifdef DUMPLOG - "end-of-game dumplogs", -#endif -#ifdef HOLD_LOCKFILE_OPEN - "exclusive lock on level 0 file", -#endif -#if defined(MSGHANDLER) && (defined(POSIX_TYPES) || defined(__GNUC__)) - "external program as a message handler", -#endif -#ifdef MFLOPPY - "floppy drive support", -#endif -#ifdef INSURANCE - "insurance files for recovering from crashes", -#endif -#ifdef LOGFILE - "log file", -#endif -#ifdef XLOGFILE - "extended log file", -#endif -#ifdef PANICLOG - "errors and warnings log file", -#endif -#ifdef MAIL_STRUCTURES - "mail daemon", -#endif -#ifdef GNUDOS - "MSDOS protected mode", -#endif -#ifdef NEWS - "news file", -#endif -#ifdef OVERLAY -#ifdef MOVERLAY - "MOVE overlays", -#else -#ifdef VROOMM - "VROOMM overlays", -#else - "overlays", -#endif -#endif -#endif - /* pattern matching method will be substituted by nethack at run time */ - "pattern matching via :PATMATCH:", -#ifdef USE_ISAAC64 - "pseudo random numbers generated by ISAAC64", -#ifdef DEV_RANDOM -#ifdef NHSTDC - /* include which specific one */ - "strong PRNG seed available from " DEV_RANDOM, -#else - "strong PRNG seed available from DEV_RANDOM", -#endif -#else -#ifdef WIN32 - "strong PRNG seed available from CNG BCryptGenRandom()", -#endif -#endif /* DEV_RANDOM */ -#else /* ISAAC64 */ -#ifdef RANDOM - "pseudo random numbers generated by random()", -#else - "pseudo random numbers generated by C rand()", -#endif -#endif -#ifdef SELECTSAVED - "restore saved games via menu", -#endif -#ifdef SCORE_ON_BOTL - "score on status line", -#endif -#ifdef CLIPPING - "screen clipping", -#endif -#ifdef NO_TERMS -#ifdef MAC - "screen control via mactty", -#endif -#ifdef SCREEN_BIOS - "screen control via BIOS", -#endif -#ifdef SCREEN_DJGPPFAST - "screen control via DJGPP fast", -#endif -#ifdef SCREEN_VGA - "screen control via VGA graphics", -#endif -#ifdef WIN32CON - "screen control via WIN32 console I/O", -#endif -#endif -#ifdef SHELL - "shell command", -#endif - "traditional status display", -#ifdef STATUS_HILITES - "status via windowport with highlighting", -#else - "status via windowport without highlighting", -#endif -#ifdef SUSPEND - "suspend command", -#endif -#ifdef TTY_GRAPHICS -#ifdef TERMINFO - "terminal info library", -#else -#if defined(TERMLIB) || (!defined(MICRO) && !defined(WIN32)) - "terminal capability library", -#endif -#endif -#endif /*TTY_GRAPHICS*/ -/*#ifdef X11_GRAPHICS*/ -#ifdef USE_XPM - "tiles file in XPM format", -#endif -/*#endif*/ -/*#if (defined(QT_GRAPHICS) || defined(X11_GRAPHICS)*/ -#ifdef GRAPHIC_TOMBSTONE - "graphical RIP screen", -#endif -/*#endif*/ -#ifdef TIMED_DELAY - "timed wait for display effects", -#endif -#ifdef USER_SOUNDS - "user sounds", -#endif -#ifdef PREFIXES_IN_USE - "variable playground", -#endif -#ifdef VISION_TABLES - "vision tables", -#endif -#ifdef ZEROCOMP - "zero-compressed save files", -#endif -#ifdef RLECOMP - "run-length compression of map in save files", -#endif -#ifdef SYSCF - "system configuration at run-time", -#endif - save_bones_compat_buf, - "and basic NetHack features" -}; - -struct win_info { - const char *id, /* DEFAULT_WINDOW_SYS string */ - *name; /* description, often same as id */ -}; -static struct win_info window_opts[] = { -#ifdef TTY_GRAPHICS - { "tty", - /* testing 'USE_TILES' here would bring confusion because it could - apply to another interface such as X11, so check MSDOS explicitly - instead; even checking TTY_TILES_ESCCODES would probably be - confusing to most users (and it will already be listed separately - in the compiled options section so users aware of it can find it) */ -#ifdef MSDOS - "traditional text with optional 'tiles' graphics" -#else - /* assume that one or more of IBMgraphics, DECgraphics, or MACgraphics - can be enabled; we can't tell from here whether that is accurate */ - "traditional text with optional line-drawing" -#endif - }, -#endif -#ifdef CURSES_GRAPHICS - { "curses", "terminal-based graphics" }, -#endif -#ifdef X11_GRAPHICS - { "X11", "X11" }, -#endif -#ifdef QT_GRAPHICS /* too vague; there are multiple incompatible versions */ - { "Qt", "Qt" }, -#endif -#ifdef GNOME_GRAPHICS /* unmaintained/defunct */ - { "Gnome", "Gnome" }, -#endif -#ifdef MAC /* defunct OS 9 interface */ - { "mac", "Mac" }, -#endif -#ifdef AMIGA_INTUITION /* unmaintained/defunct */ - { "amii", "Amiga Intuition" }, -#endif -#ifdef GEM_GRAPHICS /* defunct Atari interface */ - { "Gem", "Gem" }, -#endif -#ifdef MSWIN_GRAPHICS /* win32 */ - { "mswin", "mswin" }, -#endif -#ifdef BEOS_GRAPHICS /* unmaintained/defunct */ - { "BeOS", "BeOS InterfaceKit" }, -#endif - { 0, 0 } -}; - static void windowing_sanity() { @@ -1776,107 +1384,6 @@ windowing_sanity() #endif /*DEFAULT_WINDOW_SYS*/ } -static const char opt_indent[] = " "; - -static void -opt_out_words(str, length_p) -char *str; /* input, but modified during processing */ -int *length_p; /* in/out */ -{ - char *word; - - while (*str) { - word = index(str, ' '); -#if 0 - /* treat " (" as unbreakable space */ - if (word && *(word + 1) == '(') - word = index(word + 1, ' '); -#endif - if (word) - *word = '\0'; - if (*length_p + (int) strlen(str) > COLNO - 5) - Fprintf(ofp, "\n%s", opt_indent), - *length_p = (int) strlen(opt_indent); - else - Fprintf(ofp, " "), (*length_p)++; - Fprintf(ofp, "%s", str), *length_p += (int) strlen(str); - str += strlen(str) + (word ? 1 : 0); - } -} - -void -do_options() -{ - char buf[BUFSZ]; - int i, length, winsyscnt; - - windowing_sanity(); - - filename[0] = '\0'; -#ifdef FILE_PREFIX - Strcat(filename, file_prefix); -#endif - Sprintf(eos(filename), DATA_TEMPLATE, OPTIONS_FILE); - if (!(ofp = fopen(filename, WRTMODE))) { - perror(filename); - exit(EXIT_FAILURE); - } - - build_savebones_compat_string(); - Fprintf(ofp, "\n%sNetHack version %d.%d.%d%s\n", - opt_indent, - VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, -#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) -#if (NH_DEVEL_STATUS == NH_STATUS_BETA) - " [beta]" -#else - " [work-in-progress]" -#endif -#else - "" -#endif - ); - - Fprintf(ofp, "\nOptions compiled into this edition:\n"); - length = COLNO + 1; /* force 1st item onto new line */ - for (i = 0; i < SIZE(build_opts); i++) { - opt_out_words(strcat(strcpy(buf, build_opts[i]), - (i < SIZE(build_opts) - 1) ? "," : "."), - &length); - } - Fprintf(ofp, "\n"); /* terminate last line of words */ - - winsyscnt = SIZE(window_opts) - 1; - Fprintf(ofp, "\nSupported windowing system%s:\n", - (winsyscnt > 1) ? "s" : ""); - length = COLNO + 1; /* force 1st item onto new line */ - for (i = 0; i < winsyscnt; i++) { - Sprintf(buf, "\"%s\"", window_opts[i].id); - if (strcmp(window_opts[i].name, window_opts[i].id)) - Sprintf(eos(buf), " (%s)", window_opts[i].name); - /* - * 1 : foo. - * 2 : foo and bar (note no period; comes from 'with default' below) - * 3+: for, bar, and quux - */ - opt_out_words(strcat(buf, (winsyscnt == 1) ? "." /* no 'default' */ - : (winsyscnt == 2 && i == 0) ? " and" - : (i == winsyscnt - 2) ? ", and" - : ","), - &length); - } - if (winsyscnt > 1) { - Sprintf(buf, "with a default of \"%s\".", DEFAULT_WINDOW_SYS); - opt_out_words(buf, &length); - } - Fprintf(ofp, "\n"); /* terminate last line of words */ - - /* end with a blank line */ - Fprintf(ofp, "\n"); - Fclose(ofp); - return; -} - /* routine to decide whether to discard something from data.base */ static boolean d_filter(line) @@ -2904,15 +2411,6 @@ const char *str; return buf; } -static char * -eos(str) -char *str; -{ - while (*str) - str++; - return str; -} - /* * macro used to control vision algorithms: * VISION_TABLES => generate tables diff --git a/util/readtags.c b/util/readtags.c index 4f730b43d..d9225ae48 100644 --- a/util/readtags.c +++ b/util/readtags.c @@ -68,6 +68,8 @@ struct needs_array_handling { #define SFI_PROTO c_sfiproto #define SFDATA c_sfdata #define SFPROTO c_sfproto +#define SFPROTO_NAME "../include/sfproto.h" +#define SFDATA_NAME "../src/sfdata.c" static char *fgetline(FILE*); static void quit(void); @@ -287,6 +289,8 @@ char *argv[]; showthem(); #endif generate_c_files(); + printf("Created %s\n", SFDATA_NAME); + printf("Created %s\n", SFPROTO_NAME); exit(EXIT_SUCCESS); /*NOTREACHED*/ return 0; @@ -783,19 +787,50 @@ struct tagstruct *t; return FALSE; } +/* TIME_type: type of the argument to time(); we actually use &(time_t) */ +#if defined(BSD) && !defined(POSIX_TYPES) +#define TIME_type long * +#else +#define TIME_type time_t * +#endif +/* LOCALTIME_type: type of the argument to localtime() */ +#if (defined(ULTRIX) && !(defined(ULTRIX_PROTO) || defined(NHSTDC))) \ + || (defined(BSD) && !defined(POSIX_TYPES)) +#define LOCALTIME_type long * +#else +#define LOCALTIME_type time_t * +#endif -char *preamble[] = { - "/* Copyright (c) NetHack Development Team 2018. */\n", +const char *preamble[] = { + "/* Copyright (c) NetHack Development Team %d. */\n", "/* NetHack may be freely redistributed. See license for details. */\n\n", "/* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE! */\n\n", "#include \"hack.h\"\n", "#include \"artifact.h\"\n", "#include \"func_tab.h\"\n", "#include \"lev.h\"\n", - "#include \"integer.h\"\n", - "#include \"wintype.h\"\n", + "#include \"integer.h\"\n", + "#include \"wintype.h\"\n", (char *)0 }; +char crbuf[BUFSZ]; + +static const char *get_preamble(n) +int n; +{ + const char *r = preamble[n]; + + if (!n) { + time_t datetime = 0; + struct tm *lt; + + (void) time((TIME_type) &datetime); + lt = localtime((LOCALTIME_type) &datetime); + Sprintf(crbuf, preamble[0], (1900 + lt->tm_year)); + r = crbuf; + } + return r; +} static void output_types(fp1) FILE *fp1; @@ -862,10 +897,10 @@ static void generate_c_files() int okeydokey, x, a; boolean did_i; - SFDATA = fopen("../src/sfdata.c", "w"); + SFDATA = fopen(SFDATA_NAME, "w"); if (!SFDATA) return; - SFPROTO = fopen("../include/sfproto.h", "w"); + SFPROTO = fopen(SFPROTO_NAME, "w"); if (!SFPROTO) return; SFO_DATA = fopen("../src/sfo_data.tmp", "w"); @@ -892,10 +927,10 @@ static void generate_c_files() *c = '\0'; /* strip off the '\n' */ /* begin sfproto.h */ - Fprintf(SFPROTO,"/* NetHack %d.%d sfproto.h\t%s */\n", - VERSION_MAJOR, VERSION_MINOR, cbuf); + Fprintf(SFPROTO,"/* NetHack %d.%d sfproto.h */\n", + VERSION_MAJOR, VERSION_MINOR); for (j = 0; j < 3; ++j) - Fprintf(SFPROTO, "%s", preamble[j]); + Fprintf(SFPROTO, "%s", get_preamble(j)); Fprintf(SFPROTO, "#ifndef SFPROTO_H\n#define SFPROTO_H\n\n"); Fprintf(SFPROTO, "#include \"hack.h\"\n#include \"integer.h\"\n#include \"wintype.h\"\n\n" "#define E extern\n\n"); @@ -950,13 +985,11 @@ static void generate_c_files() Fprintf(SFI_PROTO, "/* generated input functions */\n"); /* begin sfdata.c */ - Fprintf(SFDATA,"/* NetHack %d.%d sfdata.c\t$Date$ $Revision$ */\n", + Fprintf(SFDATA,"/* NetHack %d.%d sfdata.c */\n", VERSION_MAJOR, VERSION_MINOR); for (j = 0; preamble[j]; ++j) - Fprintf(SFDATA, "%s", preamble[j]); + Fprintf(SFDATA, "%s", get_preamble(j)); Fprintf(SFDATA, "#include \"sfproto.h\"\n\n"); - Fprintf(SFDATA, "#define BUILD_DATE \"%s\"\n", cbuf); - Fprintf(SFDATA, "#define BUILD_TIME (%ldL)\n\n", (long) clocktim); Fprintf(SFDATA, "#define NHTYPE_SIMPLE 1\n"); Fprintf(SFDATA, "#define NHTYPE_COMPLEX 2\n"); Fprintf(SFDATA, "struct nhdatatypes_t {\n"); diff --git a/win/win32/mhmain.c b/win/win32/mhmain.c index 15da747ce..19f04114e 100644 --- a/win/win32/mhmain.c +++ b/win/win32/mhmain.c @@ -4,7 +4,11 @@ #include "winMS.h" #include +#if !defined(CROSSCOMPILE) #include "date.h" +#else +#include "config.h" +#endif #include "patchlevel.h" #include "resource.h" #include "mhmsg.h" @@ -1063,11 +1067,11 @@ About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) SetDlgItemText(hDlg, IDC_ABOUT_VERSION, NH_A2W(buf, wbuf, sizeof(wbuf))); + Sprintf(buf, "%s\n%s\n%s\n%s", + COPYRIGHT_BANNER_A, COPYRIGHT_BANNER_B, + COPYRIGHT_BANNER_C, COPYRIGHT_BANNER_D); SetDlgItemText(hDlg, IDC_ABOUT_COPYRIGHT, - NH_A2W(COPYRIGHT_BANNER_A "\n" COPYRIGHT_BANNER_B - "\n" COPYRIGHT_BANNER_C - "\n" COPYRIGHT_BANNER_D, - wbuf, BUFSZ)); + NH_A2W(buf, wbuf, sizeof(wbuf))); /* center dialog in the main window */ GetWindowRect(GetNHApp()->hMainWnd, &main_rt); diff --git a/win/win32/mhsplash.c b/win/win32/mhsplash.c index dcb698450..c5600177d 100644 --- a/win/win32/mhsplash.c +++ b/win/win32/mhsplash.c @@ -8,7 +8,11 @@ #include "mhsplash.h" #include "mhmsg.h" #include "mhfont.h" +#if !defined(CROSSCOMPILE) #include "date.h" +#else +#include "config.h" +#endif #include "patchlevel.h" #include "dlb.h" From 7de2a0d515064f469f7146be39bd6e5039cc807d Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 22 Nov 2019 23:41:21 -0500 Subject: [PATCH 284/529] Merge branch 'NetHack-3.7' part 2 --- doc/fixes37.0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 08e5903a4..f35050e1a 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -31,6 +31,9 @@ savefile: add support to deconstruct internal data structures down into their savefile: use little-endian format for fields where that makes a difference replace build-time level compiler and dungeon compiler with run-time loading of the dungeon and level descriptions and interpreting them via LUA +split off some of the functionality that was in makedefs (compiled-in options + build date/time, etc) so that it can be built by a cross-compiler + and accessed on the target platform Platform- and/or Interface-Specific New Features From 11678e72f2748b84268f0e649eaabc2266d4f69d Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 23 Nov 2019 01:30:54 -0500 Subject: [PATCH 285/529] fix an error with msdos cross-compiler NetHack packaging --- sys/msdos/Makefile2.cross | 5 ++++- sys/msdos/msdos-cross-compile.sh | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 3cc926015..38d8615b2 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -313,6 +313,8 @@ SOBJ = $(O)msdos.o $(O)pcsys.o $(O)tty.o $(O)unix.o \ VVOBJ = $(O)version.o +MDLIB = $(O)mdlib.o + ifeq "$(ADD_LUA)" "Y" LUAOBJ = $(O)nhlua.o $(O)nhlsel.o endif @@ -329,7 +331,7 @@ VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \ - $(LUAOBJ) $(CURSESOBJ) + $(LUAOBJ) $(CURSESOBJ) $(MDLIB) ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(TILOBJ2) $(VVOBJ) @@ -665,6 +667,7 @@ endif ifeq "$(ADD_CURSES)" "Y" @$(TARGET_AR) r temp.a $(CURSESOBJ) endif + @$(TARGET_AR) r temp.a $(MDLIB) $(TARGET_LINK) $(LFLAGS) -o$(GAME).exe temp.a $(PDCLIB) $(LUALIB) $(LIBRARIES) $(ZLIB) $(TARGET_STUBEDIT) $(GAME).exe minstack=2048K cp $(GAME).exe $(GAMEFILE) diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh index c5de2b97f..1e20b0931 100644 --- a/sys/msdos/msdos-cross-compile.sh +++ b/sys/msdos/msdos-cross-compile.sh @@ -39,7 +39,7 @@ if [ ! -d cwsdpmi ]; then fi cd ../src pwd -mkdir -p ../binary +mkdir -p ../msdos-binary cp ../dat/data.base ../dat/data.bas cp ../include/patchlevel.h ../include/patchlev.h cp ../doc/Guidebook.txt ../doc/guidebk.txt @@ -53,8 +53,11 @@ export pwd make -f Makefile2 unset GCC_EXEC_PREFIX -if [ -f $TRAVIS_BUILD_DIR/djgpp/cwsdpmi/bin/cwsdpmi.exe ]; then - cp $TRAVIS_BUILD_DIR/djgpp/cwsdpmi/bin/cwsdpmi.exe ../binary/CWSDPMI.EXE; +pwd +ls ../djgpp/cwsdpmi/bin +ls . +if [ -f ../djgpp/cwsdpmi/bin/CWSDPMI.EXE ]; then + cp ../djgpp/cwsdpmi/bin/CWSDPMI.EXE ../msdos-binary/CWSDPMI.EXE; fi -ls -l ../binary +ls -l ../msdos-binary From 89b315be4785d136a589c53f128f9b8850a4f2bb Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 23 Nov 2019 08:49:55 -0500 Subject: [PATCH 286/529] Makefile?.cross bits --- sys/msdos/Makefile1.cross | 2 +- sys/msdos/Makefile2.cross | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index 1e692237c..dc530d80b 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -5,7 +5,7 @@ # Makefile1.cross (this file) is for the host-side obj files and # utilities that will run on the host platform only. # -# Makefile2.cross is the the target platform obj files +# Makefile2.cross is for the target platform obj files # and utilities. # # Makefile2 utilizes the djgpp cross-compiler from Andrew Wu: diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 38d8615b2..9c12ca7f2 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -5,7 +5,7 @@ # Makefile1.cross is for the host-side obj files and utilities that # will run on the host platform only. # -# Makefile2.cross (this file) is the the target platform obj files +# Makefile2.cross (this file) is for the target platform obj files # and utilities. # # Makefile2 utilizes the djgpp cross-compiler from Andrew Wu: @@ -13,7 +13,7 @@ # # In NetHack 3.7, the cross-compile for msdos can be used to # build the entire game to a complete ms-dos package and -# result (in theory). +# result (from theory to achieved on Nov 22, 2019). # # Game Installation Variables From 308ebea68e206c1dbd88c34ee7d8a36480b664d8 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 23 Nov 2019 10:13:10 -0500 Subject: [PATCH 287/529] add some msdos files to .gitignore, produce zip --- .gitignore | 13 +++++++++++++ sys/msdos/msdos-cross-compile.sh | 12 ++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 9dc6b49f5..a8990a153 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,16 @@ Makefile.gcc-orig .vs # Win32-specific ignores end .DS_Store +# ms-dos +# resulting zip +NH*DOS.ZIP +# 8.3 versions +dat/data.bas +sys/share/posixreg.c +include/patchlev.h +doc/guidebk.txt +# folders compiler, target objs, binary results +djgpp/ +src/msdos_o/ +msdos-binary/ +# end of ms-dos diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh index 1e20b0931..03c0e0e49 100644 --- a/sys/msdos/msdos-cross-compile.sh +++ b/sys/msdos/msdos-cross-compile.sh @@ -44,14 +44,14 @@ cp ../dat/data.base ../dat/data.bas cp ../include/patchlevel.h ../include/patchlev.h cp ../doc/Guidebook.txt ../doc/guidebk.txt cp ../sys/share/posixregex.c ../sys/share/posixreg.c -cp ../sys/msdos/Makefile1.cross ../src/Makefile1 -cp ../sys/msdos/Makefile2.cross ../src/Makefile2 -make -f Makefile1 +#cp ../sys/msdos/Makefile1.cross ../src/Makefile1 +#cp ../sys/msdos/Makefile2.cross ../src/Makefile2 +make -f ../sys/msdos/Makefile1 cat ../include/date.h export GCC_EXEC_PREFIX=$DJGPP_TOP/lib/gcc/ export pwd -make -f Makefile2 +make -f ../sys/msdos/Makefile2 unset GCC_EXEC_PREFIX pwd ls ../djgpp/cwsdpmi/bin @@ -60,4 +60,8 @@ if [ -f ../djgpp/cwsdpmi/bin/CWSDPMI.EXE ]; then cp ../djgpp/cwsdpmi/bin/CWSDPMI.EXE ../msdos-binary/CWSDPMI.EXE; fi ls -l ../msdos-binary +cd ../msdos-binary +zip -9 ../NH370DOS.ZIP * +cd ../ +ls -l NH370DOS.ZIP From 95c1ccd716227ffa0fa1aeea43ccf4e1b9ab1ed4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 23 Nov 2019 10:20:18 -0500 Subject: [PATCH 288/529] another cross-compile script bit --- sys/msdos/msdos-cross-compile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh index 03c0e0e49..7769ceccd 100644 --- a/sys/msdos/msdos-cross-compile.sh +++ b/sys/msdos/msdos-cross-compile.sh @@ -46,12 +46,12 @@ cp ../doc/Guidebook.txt ../doc/guidebk.txt cp ../sys/share/posixregex.c ../sys/share/posixreg.c #cp ../sys/msdos/Makefile1.cross ../src/Makefile1 #cp ../sys/msdos/Makefile2.cross ../src/Makefile2 -make -f ../sys/msdos/Makefile1 +make -f ../sys/msdos/Makefile1.cross cat ../include/date.h export GCC_EXEC_PREFIX=$DJGPP_TOP/lib/gcc/ export pwd -make -f ../sys/msdos/Makefile2 +make -f ../sys/msdos/Makefile2.cross unset GCC_EXEC_PREFIX pwd ls ../djgpp/cwsdpmi/bin From acf48fa3052b6c09cccdd891d98e9c6324f4bff4 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 23 Nov 2019 17:42:11 +0200 Subject: [PATCH 289/529] Fix the lua integration parts marked for review Also, explicitly allow traps of type "random". --- src/nhlua.c | 1 + src/sp_lev.c | 84 +++++++++++++++++++--------------------------------- 2 files changed, 31 insertions(+), 54 deletions(-) diff --git a/src/nhlua.c b/src/nhlua.c index 1347fc3ac..494b1d265 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -789,6 +789,7 @@ traceback_handler(L) lua_State *L; { luaL_traceback(L, L, lua_tostring(L, 1), 0); + /* TODO: call impossible() if fuzzing? */ return 1; } diff --git a/src/sp_lev.c b/src/sp_lev.c index 2a4e13b79..cb35286ed 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -216,7 +216,6 @@ xchar x1, y1, x2, y2; int prop; { register xchar x, y; - /* struct rm *lev; */ /* REVIEW: unreferenced */ x1 = max(x1, 1); x2 = min(x2, COLNO - 1); @@ -2361,7 +2360,7 @@ get_table_montype(L) lua_State *L; { char *s = get_table_str_opt(L, "id", NULL); - int ret = NON_PM /*, i */ /* REVIEW: unreferenced */; + int ret = NON_PM; if (s) { ret = find_montype(L, s); @@ -2892,11 +2891,9 @@ lua_State *L; long ecoord; const char *const engrtypes[] = { "dust", "engrave", "burn", "mark", "blood", NULL }; const int engrtypes2i[] = { DUST, ENGRAVE, BURN, MARK, ENGR_BLOOD, 0 }; - xchar x, y; + xchar x = -1, y = -1; int argc = lua_gettop(L); - x = y = 0; /* FIXME: quiet a warning for else clause below. - should it actually be -1? */ create_des_coder(); if (argc == 1) { @@ -2915,8 +2912,6 @@ lua_State *L; txt = dupstr(luaL_checkstring(L, 3)); } else { nhl_error(L, "Wrong parameters"); - /* FIXME: this clause left etyp uninitialized so initialization - to DUST was added above to quiet a macosx warning */ } if (x == -1 && y == -1) @@ -3168,7 +3163,7 @@ lua_State *L; const int stairdirs2i[] = { 0, 1 }; long scoord; - int ax = -1, ay = -1; /* FIXME: initializers added, macosx warning */ + int ax = -1, ay = -1; int up; int ltype = lua_type(L, 1); @@ -3331,7 +3326,8 @@ const struct { { "anti magic", ANTI_MAGIC }, { "polymorph", POLY_TRAP }, { "vibrating square", VIBRATING_SQUARE }, - { 0, 0 } }; + { "random", -1 }, + { 0, NO_TRAP } }; int get_table_traptype_opt(L, name, defval) @@ -3352,6 +3348,19 @@ int defval; return defval; } +int +get_traptype_byname(trapname) +char *trapname; +{ + int i; + + for (i = 0; trap_types[i].name; i++) + if (!strcmpi(trapname, trap_types[i].name)) + return trap_types[i].type; + + return NO_TRAP; +} + /* trap({ type = "hole", x = 1, y = 1 }); */ /* trap("hole", 3, 4); */ /* trap("level teleport", {5, 8}); */ @@ -3363,49 +3372,27 @@ lua_State *L; { spltrap tmptrap; int x, y; - /* long tcoord; */ /* REVIEW: unreferenced */ int argc = lua_gettop(L); create_des_coder(); if (argc == 1 && lua_type(L, 1) == LUA_TSTRING) { const char *trapstr = luaL_checkstring(L, 1); - int i; - tmptrap.type = -1; - for (i = 0; trap_types[i].name; i++) - if (!strcmpi(trapstr, trap_types[i].name)) { - tmptrap.type = trap_types[i].type; - break; - } + tmptrap.type = get_traptype_byname(trapstr); x = y = -1; } else if (argc == 2 && lua_type(L, 1) == LUA_TSTRING && lua_type(L, 2) == LUA_TTABLE) { const char *trapstr = luaL_checkstring(L, 1); - int i; - tmptrap.type = -1; - for (i = 0; trap_types[i].name; i++) - if (!strcmpi(trapstr, trap_types[i].name)) { - tmptrap.type = trap_types[i].type; - break; - } + tmptrap.type = get_traptype_byname(trapstr); get_coord(L, 2, &x, &y); } else if (argc == 3) { const char *trapstr = luaL_checkstring(L, 1); - int i; - tmptrap.type = -1; - for (i = 0; trap_types[i].name; i++) - if (!strcmpi(trapstr, trap_types[i].name)) { - tmptrap.type = trap_types[i].type; - break; - } + + tmptrap.type = get_traptype_byname(trapstr); x = luaL_checkinteger(L, 2); y = luaL_checkinteger(L, 3); - - if (tmptrap.type == -1) - nhl_error(L, "Unknown trap type"); - } else { lcheck_param_table(L); @@ -3420,6 +3407,9 @@ lua_State *L; } } + if (tmptrap.type == NO_TRAP) + nhl_error(L, "Unknown trap type"); + if (x == -1 && y == -1) tmptrap.coord = SP_COORD_PACK_RANDOM(0); else @@ -4328,11 +4318,12 @@ lua_State *L; { terrain tmpterrain; xchar x, y; - /* char *ter; */ /* REVIEW: unreferenced */ struct selectionvar *sel = NULL; int argc = lua_gettop(L); create_des_coder(); + tmpterrain.tlit = 0; + tmpterrain.ter = INVALID_TYPE; if (argc == 1) { lcheck_param_table(L); @@ -4357,12 +4348,10 @@ lua_State *L; } else if (argc == 2) { sel = l_selection_check(L, 1); tmpterrain.ter = check_mapchr(luaL_checkstring(L, 2)); - tmpterrain.tlit = luaL_optinteger(L, 3, 0); /* FIXME: this can never be here, argc==2 */ } else if (argc == 3) { x = luaL_checkinteger(L, 1); y = luaL_checkinteger(L, 2); tmpterrain.ter = check_mapchr(luaL_checkstring(L, 3)); - tmpterrain.tlit = 0; } else { nhl_error(L, "wrong parameters"); } @@ -4390,7 +4379,6 @@ lspo_replace_terrain(L) lua_State *L; { replaceterrain rt; - /* char *toter, *fromter; */ /* REVIEW: unreferenced */ xchar totyp, fromtyp; create_des_coder(); @@ -4571,8 +4559,7 @@ const char *name; int *x1, *y1, *x2, *y2; boolean optional; { - int arrlen /*, i*/ /* REVIEW: unreferenced */; - /* int retvals[4]; */ /* REVIEW: unreferenced */ + int arrlen; lua_getfield(L, 1, name); if (optional && lua_type(L, -1) == LUA_TNIL) { @@ -4904,7 +4891,6 @@ lua_State *L; const char *const dbopens[] = { "open", "closed", "random", NULL }; const int dbopens2i[] = { 1, 0, -1, -2 }; xchar x, y; -/* int dbopen; */ int mx, my, dir; int db_open; long dcoord; @@ -4922,7 +4908,6 @@ lua_State *L; y = my; get_location_coord(&x, &y, DRY | WET | HOT, g.coder->croom, dcoord); - /* REVIEW: from here down was using dbopen previously */ if (db_open == -1) db_open = !rn2(2); if (!create_drawbridge(x, y, dir, db_open ? TRUE : FALSE)) @@ -5088,9 +5073,6 @@ lua_State *L; int argc = lua_gettop(L); boolean freesel = FALSE; struct selectionvar *sel = (struct selectionvar *) 0; - /* REVIEW: compiler warning, - all assignments conditional - so initializer was added */ create_des_coder(); @@ -5123,9 +5105,6 @@ lua_State *L; int argc = lua_gettop(L); boolean freesel = FALSE; struct selectionvar *sel = (struct selectionvar *) 0; - /* REVIEW: compiler warning, - all assignments conditional - so initializer was added */ create_des_coder(); @@ -5192,15 +5171,14 @@ lua_State *L; /* reset_level is only needed for testing purposes */ int lspo_reset_level(L) -lua_State *L UNUSED; /* macosx complaint needed UNUSED */ +lua_State *L UNUSED; { boolean wtower = In_W_tower(u.ux, u.uy, &u.uz); create_des_coder(); makemap_prepost(TRUE, wtower); clear_level_structures(); - return 0; /* REVIEW: warning, int fn must return value - so added "return 0; " */ + return 0; } /* map({ x = 10, y = 10, map = [[...]] }); */ @@ -5211,9 +5189,7 @@ lspo_map(L) lua_State *L; { mazepart tmpmazepart; - /* xchar halign, valign; */ /* REVIEW: unreferenced */ xchar tmpxstart, tmpystart, tmpxsize, tmpysize; - /* unpacked_coord upc; */ /* REVIEW: unreferenced */ /* TODO: allow passing an array of strings as map data From 69136fbb9866792c1fd805a021cd461da40fa3a6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 23 Nov 2019 12:19:33 -0500 Subject: [PATCH 290/529] more cross-compile djgpp build tweaks --- sys/msdos/Makefile1.cross | 6 +++--- sys/msdos/Makefile2.cross | 18 ++++++++++-------- sys/msdos/msdos-cross-compile.sh | 16 ++++++++++++---- sys/msdos/tile2bin.c | 2 +- 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index dc530d80b..e2e6daede 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -5,7 +5,7 @@ # Makefile1.cross (this file) is for the host-side obj files and # utilities that will run on the host platform only. # -# Makefile2.cross is for the target platform obj files +# Makefile2.cross is the the target platform obj files # and utilities. # # Makefile2 utilizes the djgpp cross-compiler from Andrew Wu: @@ -143,8 +143,8 @@ TEXTIO = $(HOST_O)tiletext.o $(HOST_O)tiletxt.o $(HOST_O)drawing.o $(HOST_O TEXTIO2 = $(HOST_O)tiletex2.o $(HOST_O)tiletxt2.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \ $(HOST_O)objects.o -PLANAR_TIB = $(DAT)/NETHACK1.TIB -OVERVIEW_TIB = $(DAT)/NETHACKO.TIB +#PLANAR_TIB = $(DAT)/NETHACK1.TIB +#OVERVIEW_TIB = $(DAT)/NETHACKO.TIB TILE_BMP = $(DAT)/NHTILES.BMP TILEUTIL = $(TILOBJ) $(U)tile2bin $(U)til2bin2 $(TILE_BMP) $(PLANAR_TIB) $(OVERVIEW_TIB) diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 9c12ca7f2..7a99be2b4 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -363,7 +363,7 @@ LUAOBJFILES2 = $(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \ $(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o LUAOBJFILES3 = $(O)lmathlib.o $(O)lmem.o $(O)loadlib.o $(O)lobject.o \ $(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o -LUAOBJFILES3 = $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \ +LUAOBJFILES4 = $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \ $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o #LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o \ @@ -374,7 +374,7 @@ LUAOBJFILES3 = $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \ # $(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o \ # $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \ # $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o - + LUALIBOBJS = $(LUAOBJFILES1) $(LUAOBJFILES2) $(LUAOBJFILES3) $(LUAOBJFILES4) endif @@ -746,11 +746,12 @@ endif #========================================== $(O)pdcurses.a : $(PDCLIBOBJS) $(PDCOBJS) - ar rcS $@ $(PDCLIBOBJS1) - ar rcS $@ $(PDCLIBOBJS2) - ar rcS $@ $(PDCLIBOBJS3) - ar rcS $@ $(PDCLIBOBJS4) - ar rcs $@ $(PDCOBJS) + if [ -f $@ ]; then rm $@; fi; + $(TARGET_AR) rcS $@ $(PDCLIBOBJS1) + $(TARGET_AR) rcS $@ $(PDCLIBOBJS2) + $(TARGET_AR) rcS $@ $(PDCLIBOBJS3) + $(TARGET_AR) rcS $@ $(PDCLIBOBJS4) + $(TARGET_AR) rcs $@ $(PDCOBJS) #========================================== # Other Util Dependencies. @@ -794,10 +795,11 @@ $(O)luac.o: $(LUASRC)/luac.c #========================================== $(LUALIB): $(LUALIBOBJS) + if [ -f $@ ]; then rm $@; fi; $(TARGET_AR) rcS $@ $(LUAOBJFILES1) $(TARGET_AR) rcS $@ $(LUAOBJFILES2) $(TARGET_AR) rcS $@ $(LUAOBJFILES3) - $(TARGET_AR) rcS $@ $(LUAOBJFILES4) + $(TARGET_AR) rcs $@ $(LUAOBJFILES4) #$(LUADLL): $(LUALIBOBJS) # $(TARGET_CC) -shared -Wl,--export-all-symbols \ diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh index 7769ceccd..df298b2de 100644 --- a/sys/msdos/msdos-cross-compile.sh +++ b/sys/msdos/msdos-cross-compile.sh @@ -10,18 +10,23 @@ if [ ! -d ../djgpp/i586-pc-msdosdjgpp ]; then if [ "$(uname)" = "Darwin" ]; then #Mac wget --no-hsts https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/djgpp-osx-gcc550.tar.bz2 + cd ../ + tar xjf util/djgpp-osx-gcc550.tar.bz2 elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then #Linux wget --no-hsts https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/djgpp-linux64-gcc550.tar.bz2 + cd ../ + tar xjf util/djgpp-linux64-gcc550.tar.bz2 elif [ "$(expr substr $(uname -s) 1 10)" = "MINGW32_NT" ]; then #mingw wget --no-hsts https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/djgpp-mingw-gcc550-standalone.zip - fi - if [ ! -d djgpp/i586-pc-msdosdjgpp ]; then - tar xjf util/djgpp-linux64-gcc550.tar.bz2 + cd ../ + tar xjf util/djgpp-mingw-gcc550-standalone.zip fi fi +echo after tar cd ../ +pwd # PDCurses if [ ! -d "../pdcurses" ]; then echo "Getting ../pdcurses from https://github.com/wmcbrine/PDCurses.git" @@ -37,7 +42,10 @@ if [ ! -d cwsdpmi ]; then cd ../ rm csdpmi7b.zip fi -cd ../src +cd ../ +echo after dos extender +pwd +cd src pwd mkdir -p ../msdos-binary cp ../dat/data.base ../dat/data.bas diff --git a/sys/msdos/tile2bin.c b/sys/msdos/tile2bin.c index 4c7a3228d..5d10248e4 100644 --- a/sys/msdos/tile2bin.c +++ b/sys/msdos/tile2bin.c @@ -17,7 +17,7 @@ #include "tile.h" #include "pctiles.h" -#include +/* #include */ #ifndef MONITOR_HEAP #include #endif From fe2826c856d90ca6481152bbb3fde83f257999ee Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 23 Nov 2019 09:28:08 -0800 Subject: [PATCH 291/529] more #H9375 - Rider bargethrough I think the previous expression would allow moving (via swapping places) from a pool to solid rock or closed door which was not what was intended (but moot since there aren't any pools on the Astral level). This revised expression does what is intended: can only swap to a pool location if already located in/over (the Riders fly? they should probably be non-breathing) another pool. --- src/monmove.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/monmove.c b/src/monmove.c index c4833c131..35a57e504 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 monmove.c $NHDT-Date: 1574475416 2019/11/23 02:16:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.114 $ */ +/* NetHack 3.6 monmove.c $NHDT-Date: 1574530078 2019/11/23 17:27:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.115 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1625,15 +1625,16 @@ xchar x, y; /* spot 'mtmp' is considering moving to */ return TRUE; } - /* oversimplification: creatures that bargethrough can't do so when - target monster is in rock or closed door or water (in particular, - avoid moving to spots where mondied() won't leave a corpse) */ + /* oversimplification: creatures that bargethrough can't swap places + when target monster is in rock or closed door or water (in particular, + avoid moving to spots where mondied() won't leave a corpse; doesn't + matter whether barger is capable of moving to such a target spot if + it were unoccupied) */ if (!accessible(x, y) - /* mondied() allows ispool() as an exception to !accessible(), - but we'll only do that if both or neither of mtmp's spot and - destination spot are water so that we don't swap a water - critter onto land or the inverse */ - && (!is_pool(x, y) ^ !is_pool(mtmp->mx, mtmp->my))) + /* mondied() allows is_pool() as an exception to !accessible(), + but we'll only do that if 'mtmp' is already at a water location + so that we don't swap a water critter onto land */ + && !(is_pool(x, y) && is_pool(mtmp->mx, mtmp->my))) return TRUE; return FALSE; From 3afbcb76f552cf68ddc0eb3f467f2f29d3887729 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 23 Nov 2019 23:40:25 +0200 Subject: [PATCH 292/529] Minor msdos cross compile improvements --- sys/msdos/msdos-cross-compile.sh | 91 ++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 34 deletions(-) diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh index df298b2de..ec4bcae01 100644 --- a/sys/msdos/msdos-cross-compile.sh +++ b/sys/msdos/msdos-cross-compile.sh @@ -1,39 +1,54 @@ #!/bin/sh -if [ -z "$TRAVIS_BUIILD_DIR" ]; then + +if [ -z "$TRAVIS_BUILD_DIR" ]; then export DJGPP_TOP=$(pwd)/djgpp else export DJGPP_TOP="$TRAVIS_BUILD_DIR/djgpp" fi -export -cd util -if [ ! -d ../djgpp/i586-pc-msdosdjgpp ]; then - if [ "$(uname)" = "Darwin" ]; then - #Mac - wget --no-hsts https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/djgpp-osx-gcc550.tar.bz2 - cd ../ - tar xjf util/djgpp-osx-gcc550.tar.bz2 - elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then - #Linux - wget --no-hsts https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/djgpp-linux64-gcc550.tar.bz2 - cd ../ - tar xjf util/djgpp-linux64-gcc550.tar.bz2 - elif [ "$(expr substr $(uname -s) 1 10)" = "MINGW32_NT" ]; then - #mingw - wget --no-hsts https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/djgpp-mingw-gcc550-standalone.zip - cd ../ - tar xjf util/djgpp-mingw-gcc550-standalone.zip - fi + +DJGPP_URL="https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/" +if [ "$(uname)" = "Darwin" ]; then + #Mac + DJGPP_FILE="djgpp-osx-gcc550.tar.bz2" +elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then + #Linux + DJGPP_FILE="djgpp-linux64-gcc550.tar.bz2" +elif [ "$(expr substr $(uname -s) 1 10)" = "MINGW32_NT" ]; then + #mingw + DJGPP_FILE="djgpp-mingw-gcc550-standalone.zip" +else + echo "No DJGPP release for you, sorry." + exit 1 +fi + +DJGPP_URL="$DJGPP_URL$DJGPP_FILE" + +# export + +cd util +if [ ! -f "$DJGPP_FILE" ]; then + wget --no-hsts "$DJGPP_URL" fi -echo after tar cd ../ -pwd + + +if [ ! -d ../djgpp/i586-pc-msdosdjgpp ]; then + tar xjf "util/$DJGPP_FILE" +fi + +#echo after tar +# cd ../ + +#pwd + # PDCurses if [ ! -d "../pdcurses" ]; then echo "Getting ../pdcurses from https://github.com/wmcbrine/PDCurses.git" git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses fi -cd djgpp + # DOS-extender for use with djgpp +cd djgpp if [ ! -d cwsdpmi ]; then wget --no-hsts http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip mkdir -p cwsdpmi @@ -43,10 +58,13 @@ if [ ! -d cwsdpmi ]; then rm csdpmi7b.zip fi cd ../ -echo after dos extender -pwd + + +#echo after dos extender + + cd src -pwd + mkdir -p ../msdos-binary cp ../dat/data.base ../dat/data.bas cp ../include/patchlevel.h ../include/patchlev.h @@ -55,21 +73,26 @@ cp ../sys/share/posixregex.c ../sys/share/posixreg.c #cp ../sys/msdos/Makefile1.cross ../src/Makefile1 #cp ../sys/msdos/Makefile2.cross ../src/Makefile2 make -f ../sys/msdos/Makefile1.cross -cat ../include/date.h +#cat ../include/date.h export GCC_EXEC_PREFIX=$DJGPP_TOP/lib/gcc/ -export -pwd +# export + +#pwd + make -f ../sys/msdos/Makefile2.cross unset GCC_EXEC_PREFIX -pwd -ls ../djgpp/cwsdpmi/bin -ls . +#pwd + +#ls ../djgpp/cwsdpmi/bin +#ls . + if [ -f ../djgpp/cwsdpmi/bin/CWSDPMI.EXE ]; then cp ../djgpp/cwsdpmi/bin/CWSDPMI.EXE ../msdos-binary/CWSDPMI.EXE; fi -ls -l ../msdos-binary + +# ls -l ../msdos-binary cd ../msdos-binary zip -9 ../NH370DOS.ZIP * cd ../ -ls -l NH370DOS.ZIP +# ls -l NH370DOS.ZIP From c2f6c587d12de75500a62c998ca8156db6a38285 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Thu, 21 Nov 2019 15:39:11 -0500 Subject: [PATCH 293/529] Files and doc/Guidebook.txt from cron-daily v1-Nov-21-2019 --- Files | 160 +++--- doc/Guidebook.txt | 1290 ++++++++++++++++++++++----------------------- 2 files changed, 723 insertions(+), 727 deletions(-) diff --git a/Files b/Files index 3e137d1fe..b06422f27 100644 --- a/Files +++ b/Files @@ -30,29 +30,49 @@ prepare-commit-msg dat: (files for all versions) -Arch.des Barb.des Caveman.des GENFILES Healer.des -Knight.des Monk.des Priest.des Ranger.des Rogue.des -Samurai.des Tourist.des Valkyrie.des Wizard.des bigroom.des -bogusmon.txt castle.des cmdhelp data.base dungeon.def -endgame.des engrave.txt epitaph.txt gehennom.des help -hh history keyhelp knox.des license -medusa.des mines.des opthelp oracle.des oracles.txt -quest.txt rumors.fal rumors.tru sokoban.des symbols -tower.des tribute wizhelp yendor.des +Arc-fila.lua Arc-filb.lua Arc-goal.lua Arc-loca.lua Arc-strt.lua +Bar-fila.lua Bar-filb.lua Bar-goal.lua Bar-loca.lua Bar-strt.lua +Cav-fila.lua Cav-filb.lua Cav-goal.lua Cav-loca.lua Cav-strt.lua +GENFILES Hea-fila.lua Hea-filb.lua Hea-goal.lua Hea-loca.lua +Hea-strt.lua Kni-fila.lua Kni-filb.lua Kni-goal.lua Kni-loca.lua +Kni-strt.lua Mon-fila.lua Mon-filb.lua Mon-goal.lua Mon-loca.lua +Mon-strt.lua Pri-fila.lua Pri-filb.lua Pri-goal.lua Pri-loca.lua +Pri-strt.lua Ran-fila.lua Ran-filb.lua Ran-goal.lua Ran-loca.lua +Ran-strt.lua Rog-fila.lua Rog-filb.lua Rog-goal.lua Rog-loca.lua +Rog-strt.lua Sam-fila.lua Sam-filb.lua Sam-goal.lua Sam-loca.lua +Sam-strt.lua Tou-fila.lua Tou-filb.lua Tou-goal.lua Tou-loca.lua +Tou-strt.lua Val-fila.lua Val-filb.lua Val-goal.lua Val-loca.lua +Val-strt.lua Wiz-fila.lua Wiz-filb.lua Wiz-goal.lua Wiz-loca.lua +Wiz-strt.lua air.lua asmodeus.lua astral.lua baalz.lua +bigrm-1.lua bigrm-2.lua bigrm-3.lua bigrm-4.lua bigrm-5.lua +bigrm-6.lua bigrm-7.lua bigrm-8.lua bigrm-9.lua bigrm-10.lua +bogusmon.txt castle.lua cmdhelp data.base dungeon.lua +earth.lua engrave.txt epitaph.txt fakewiz1.lua fakewiz2.lua +fire.lua help hh history juiblex.lua +keyhelp knox.lua license medusa-1.lua medusa-2.lua +medusa-3.lua medusa-4.lua minefill.lua minend-1.lua minend-2.lua +minend-3.lua mines.des minetn-1.lua minetn-2.lua minetn-3.lua +minetn-4.lua minetn-5.lua minetn-6.lua minetn-7.lua nhlib.lua +opthelp oracle.lua oracles.txt orcus.lua quest.txt +rumors.fal rumors.tru sanctum.lua soko1-1.lua soko1-2.lua +soko2-1.lua soko2-2.lua soko3-1.lua soko3-2.lua soko4-1.lua +soko4-2.lua symbols tower1.lua tower2.lua tower3.lua +tribute valley.lua water.lua wizard1.lua wizard2.lua +wizard3.lua wizhelp doc: (files for all versions) -Guidebook.mn Guidebook.tex Guidebook.txt config.nh dgn_comp.6 -dgn_comp.txt dlb.6 dlb.txt fixes10.0 fixes14.f -fixes22.0 fixes23.e fixes30.0 fixes30.pl01 fixes30.pl02 -fixes30.pl03 fixes30.pl04 fixes30.pl05 fixes30.pl06 fixes30.pl07 -fixes30.pl08 fixes30.pl09 fixes30.pl10 fixes31.1 fixes31.2 -fixes31.3 fixes32.0 fixes32.1 fixes32.2 fixes32.3 -fixes33.0 fixes33.1 fixes34.0 fixes34.1 fixes34.2 -fixes34.3 fixes35.0 fixes36.0 fixes36.1 fixes36.2 -fixes36.3 lev_comp.6 lev_comp.txt makedefs.6 makedefs.txt -mn.7 mnh.7 nethack.6 nethack.txt recover.6 -recover.txt tmac.n tmac.nh window.doc +Guidebook.mn Guidebook.tex Guidebook.txt config.nh dlb.6 +dlb.txt fixes10.0 fixes14.f fixes22.0 fixes23.e +fixes30.0 fixes30.pl01 fixes30.pl02 fixes30.pl03 fixes30.pl04 +fixes30.pl05 fixes30.pl06 fixes30.pl07 fixes30.pl08 fixes30.pl09 +fixes30.pl10 fixes31.1 fixes31.2 fixes31.3 fixes32.0 +fixes32.1 fixes32.2 fixes32.3 fixes33.0 fixes33.1 +fixes34.0 fixes34.1 fixes34.2 fixes34.3 fixes35.0 +fixes36.0 fixes36.1 fixes36.2 fixes36.3 fixes37.0 +fixesXX.X makedefs.6 makedefs.txt mn.7 mnh.7 +nethack.6 nethack.txt recover.6 recover.txt tmac.n +tmac.nh window.doc include: (files for GEM versions) @@ -102,15 +122,17 @@ files.c fountain.c hack.c hacklib.c invent.c isaac64.c light.c lock.c mail.c makemon.c mapglyph.c mcastu.c mhitm.c mhitu.c minion.c mklev.c mkmap.c mkmaze.c mkobj.c mkroom.c mon.c mondata.c monmove.c monst.c -mplayer.c mthrowu.c muse.c music.c o_init.c objects.c -objnam.c options.c pager.c pickup.c pline.c polyself.c -potion.c pray.c priest.c quest.c questpgr.c read.c -rect.c region.c restore.c rip.c rnd.c role.c -rumors.c save.c shk.c shknam.c sit.c sounds.c -sp_lev.c spell.c steal.c steed.c sys.c teleport.c -timeout.c topten.c track.c trap.c u_init.c uhitm.c -vault.c version.c vision.c weapon.c were.c wield.c -windows.c wizard.c worm.c worn.c write.c zap.c +mplayer.c mthrowu.c muse.c music.c nhlsel.c nhlua.c +o_init.c objects.c objnam.c options.c pager.c pickup.c +pline.c polyself.c potion.c pray.c priest.c quest.c +questpgr.c read.c rect.c region.c restore.c rip.c +rnd.c role.c rumors.c save.c sfascii.c sfbase.c +sfdata.c sflendian.c sfstruct.c shk.c shknam.c sit.c +sounds.c sp_lev.c spell.c steal.c steed.c sys.c +teleport.c timeout.c topten.c track.c trap.c u_init.c +uhitm.c vault.c version.c vision.c weapon.c were.c +wield.c windows.c wizard.c worm.c worn.c write.c +zap.c sys/amiga: (files for Amiga versions - untested for 3.6.2) @@ -148,8 +170,8 @@ Makefile1.cross Makefile2.cross SCHEMA35.MSC moveinit.pat msdos.c msdoshlp.txt ovlinit.c pckeys.c pctiles.c pctiles.h pcvideo.h portio.h schema1.BC schema2.BC schema3.MSC setup.bat -sound.c tile2bin.c vesa.h video.c -vidtxt.c vidvesa.c vidvga.c +tile2bin.c vesa.h video.c vidtxt.c +vidvesa.c vidvga.c (files for running MSDOS binary under Windows) nhico.uu nhpif.uu @@ -189,9 +211,6 @@ pcsys.c pcunix.c (files for UNIX and Be versions) ioctl.c unixtty.c -(lex/yacc output for special level and dungeon compilers) -dgn_comp.h dgn_lex.c dgn_yacc.c lev_comp.h lev_lex.c lev_yacc.c - (posix regex for versions that include regex in their C library) posixregex.c @@ -284,13 +303,14 @@ stubs.c sysconf.template win10.c win10.h win32api.h windmain.c winnt.c winos.h +test: +(files in top directory) +test_des.lua test_lev.lua test_sel.lua test_src.lua + util: (files for all versions) -dgn_main.c dlb_main.c lev_main.c makedefs.c mdgrep.h mdgrep.pl -panic.c recover.c - -(lex/yacc input for special level and dungeon compilers) -dgn_comp.l dgn_comp.y lev_comp.l lev_comp.y +dlb_main.c makedefs.c mdgrep.h mdgrep.pl panic.c readtags.c +recover.c win/Qt: (files for the Qt 3 widget library - X11, Windows, Mac OS X, or Qtopia) @@ -364,21 +384,20 @@ getline.c termcap.c topl.c wintty.c win/win32: (files for Windows versions - tested up to Windows 10) NetHackW.c NetHackW.exe.manifest NetHackW.rc -dgnstuff-mingw32.mak dgnstuff.mak levstuff-mingw32.mak -levstuff.mak mhaskyn.c mhaskyn.h -mhdlg.c mhdlg.h mhfont.c -mhfont.h mhinput.c mhinput.h -mhmain.c mhmain.h mhmap.c -mhmap.h mhmenu.c mhmenu.h -mhmsg.h mhmsgwnd.c mhmsgwnd.h -mhrip.c mhrip.h mhsplash.c -mhsplash.h mhstatus.c mhstatus.h -mhtext.c mhtext.h mnsel.uu -mnselcnt.uu mnunsel.uu mswproc.c -nethack.rc nhresource.h petmark.uu -pilemark.uu record.uu resource.h -rip.uu splash.uu tiles-mingw32.mak -tiles.mak winMS.h +mhaskyn.c mhaskyn.h mhdlg.c +mhdlg.h mhfont.c mhfont.h +mhinput.c mhinput.h mhmain.c +mhmain.h mhmap.c mhmap.h +mhmenu.c mhmenu.h mhmsg.h +mhmsgwnd.c mhmsgwnd.h mhrip.c +mhrip.h mhsplash.c mhsplash.h +mhstatus.c mhstatus.h mhtext.c +mhtext.h mnsel.uu mnselcnt.uu +mnunsel.uu mswproc.c nethack.rc +nhresource.h petmark.uu pilemark.uu +record.uu resource.h rip.uu +splash.uu tiles-mingw32.mak tiles.mak +winMS.h win/win32/vs2017: (files for Visual Studio 2017 Community Edition builds) @@ -386,18 +405,16 @@ NetHack.sln NetHack.vcxproj NetHackPackage.appxmanifest NetHackPackage.wapproj NetHackProperties.props NetHackW.vcxproj PDCurses.vcxproj Package.StoreAssociation.xml -ScreenShot.PNG afterdgncomp.proj -afterdlb.proj afterlevcomp.proj +ScreenShot.PNG afterdlb.proj aftermakedefs.proj afternethack.proj afterrecover.proj aftertile2bmp.proj aftertilemap.proj afteruudecode.proj build.bat common.props config.props console.props default.props default_dll.props -default_lib.props dgncomp.vcxproj -dirs.props dlb.vcxproj -dll.props files.props -levcomp.vcxproj makedefs.vcxproj +default_lib.props dirs.props +dlb.vcxproj dll.props +files.props makedefs.vcxproj nh340key.def nh340key.vcxproj nhdefkey.def nhdefkey.vcxproj nhraykey.def nhraykey.vcxproj @@ -468,30 +485,9 @@ dat: dungeon (files generated by lev_comp at playground creation time) -Arc-fila.lev Arc-filb.lev Arc-goal.lev Arc-loca.lev Arc-strt.lev -Bar-fila.lev Bar-filb.lev Bar-goal.lev Bar-loca.lev Bar-strt.lev -Cav-fila.lev Cav-filb.lev Cav-goal.lev Cav-loca.lev Cav-strt.lev -Hea-fila.lev Hea-filb.lev Hea-goal.lev Hea-loca.lev Hea-strt.lev -Kni-fila.lev Kni-filb.lev Kni-goal.lev Kni-loca.lev Kni-strt.lev -Mon-fila.lev Mon-filb.lev Mon-goal.lev Mon-loca.lev Mon-strt.lev -Pri-fila.lev Pri-filb.lev Pri-goal.lev Pri-loca.lev Pri-strt.lev -Ran-fila.lev Ran-filb.lev Ran-goal.lev Ran-loca.lev Ran-strt.lev -Rog-fila.lev Rog-filb.lev Rog-goal.lev Rog-loca.lev Rog-strt.lev -Sam-fila.lev Sam-filb.lev Sam-goal.lev Sam-loca.lev Sam-strt.lev -Tou-fila.lev Tou-filb.lev Tou-goal.lev Tou-loca.lev Tou-strt.lev -Val-fila.lev Val-filb.lev Val-goal.lev Val-loca.lev Val-strt.lev -Wiz-fila.lev Wiz-filb.lev Wiz-goal.lev Wiz-loca.lev Wiz-strt.lev -air.lev asmodeus.lev astral.lev baalz.lev bigrm-1.lev -bigrm-2.lev bigrm-3.lev bigrm-4.lev bigrm-5.lev bigrm-6.lev -bigrm-7.lev bigrm-8.lev bigrm-9.lev bigrm-10.lev castle.lev -earth.lev fakewiz1.lev fakewiz2.lev fire.lev juiblex.lev -knox.lev medusa-1.lev medusa-2.lev medusa-3.lev medusa-4.lev minefill.lev minend-1.lev minend-2.lev minend-3.lev minetn-1.lev minetn-2.lev minetn-3.lev minetn-4.lev minetn-5.lev minetn-6.lev -minetn-7.lev oracle.lev orcus.lev sanctum.lev soko1-1.lev -soko1-2.lev soko2-1.lev soko2-2.lev soko3-1.lev soko3-2.lev -soko4-1.lev soko4-2.lev tower1.lev tower2.lev tower3.lev -valley.lev water.lev wizard1.lev wizard2.lev wizard3.lev +minetn-7.lev (files generated by makedefs at playground creation time) data dungeon.pdf options oracles quest.dat rumors diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index d8a3bc93d..aed582b7d 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -126,7 +126,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -192,7 +192,7 @@ you have seen on the current dungeon level; as you explore more - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -258,7 +258,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -324,7 +324,7 @@ Intelligence affects your ability to cast spells and read - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -456,7 +456,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -588,7 +588,7 @@ symbol at the chosen location, conditionally check for "More - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -720,7 +720,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -786,7 +786,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -852,7 +852,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -918,7 +918,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -984,7 +984,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1050,7 +1050,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1116,7 +1116,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1248,7 +1248,7 @@ paranoid_confirmation:quit option to require a response of - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1314,7 +1314,7 @@ Show mobile light sources. Autocompletes. Debug mode only. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1380,7 +1380,7 @@ instead. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1446,7 +1446,7 @@ number_pad is on. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1512,7 +1512,7 @@ Sit down. Autocompletes. Default key is `M-s'. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1578,7 +1578,7 @@ combat, or it will be automatically turned off. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1644,7 +1644,7 @@ Create a monster. May be prefixed by a count to create more - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1710,7 +1710,7 @@ lowed by the other key, you may set the altmeta option to have - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1776,7 +1776,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1842,7 +1842,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1908,7 +1908,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -1974,7 +1974,7 @@ tory depletion. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2040,7 +2040,7 @@ very useful under certain circumstances. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2106,7 +2106,7 @@ it is the one who moved rather than you. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2172,7 +2172,7 @@ extremely obvious, you will be asked what you want to call this - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2238,7 +2238,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2304,7 +2304,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2370,7 +2370,7 @@ become highly skilled in daggers or staves but not in swords or - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2436,7 +2436,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2502,7 +2502,7 @@ of armor, you immediately find out the armor class and any - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2568,7 +2568,7 @@ vironment variable to the file name of your mailbox. You may - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2634,7 +2634,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2700,7 +2700,7 @@ "Weapon proficiency".) - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2766,7 +2766,7 @@ much less valuable. All rocks, however, can be used as - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2832,7 +2832,7 @@ with these challenges. Note that it is perfectly acceptable to - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2898,7 +2898,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -2964,7 +2964,7 @@ how NetHack behaves. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3030,7 +3030,7 @@ sistent, and apply only to new games. You can specify multiple - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3096,7 +3096,7 @@ Format is key followed by the command, separated by a colon. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3162,7 +3162,7 @@ is processed by the function that handles wishing. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3228,7 +3228,7 @@ is implied and comma separated options are processed from right - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3294,7 +3294,7 @@ false). When true, the computer will fill your quiver or - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3360,7 +3360,7 @@ Show out-of-sight areas of lit rooms (default on). Persistent. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3426,7 +3426,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3492,7 +3492,7 @@ aren't interrupted with the "More info?" prompt, but it also - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3558,7 +3558,7 @@ `a', `b', and `c' keyboard shortcuts rather than the mnemonics - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3624,7 +3624,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3690,7 +3690,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3756,7 +3756,7 @@ acts as `G' and `Alt-0' acts as `I'. Setting -1 is to - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3822,7 +3822,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3888,7 +3888,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -3954,7 +3954,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4020,7 +4020,7 @@ full - always sort the lists; - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4086,7 +4086,7 @@ (default off). Setting this option makes the score list - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4152,7 +4152,7 @@ When getting a location on the map, and using shifted movement - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4218,7 +4218,7 @@ If NetHack can, it should display color if it can for different - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4284,7 +4284,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4350,7 +4350,7 @@ ified but will settle for smaller sizes if they are too big. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4416,7 +4416,7 @@ background, btnface, btnshadow, btntext, captiontext, graytext, - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4482,7 +4482,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4499,56 +4499,56 @@ Note: DEC Rainbows hang if this is turned on. Cannot be set with the `O' command. - soundcard - (default on, PC NetHack only). Cannot be set with the `O' com- - mand. - subkeyvalue - (Win32 tty NetHack only). May be used to alter the value of + (Win32 tty NetHack only). May be used to alter the value of keystrokes that the operating system returns to NetHack to help - compensate for international keyboard issues. OPTIONS=subkey- - value:171/92 will return 92 to NetHack, if 171 was originally - going to be returned. You can use multiple subkeyvalue state- - ments in the configuration file if needed. Cannot be set with + compensate for international keyboard issues. OPTIONS=subkey- + value:171/92 will return 92 to NetHack, if 171 was originally + going to be returned. You can use multiple subkeyvalue state- + ments in the configuration file if needed. Cannot be set with the `O' command. video Set the video mode used (PC NetHack only). Values are "autode- - tect", "default", or "vga". Setting "vga" (or "autodetect" - with vga hardware present) will cause the game to display + tect", "default", or "vga". Setting "vga" (or "autodetect" + with vga hardware present) will cause the game to display tiles. Cannot be set with the `O' command. videocolors - Set the color palette for PC systems using NO_TERMS (default - 4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order - of colors is red, green, brown, blue, magenta, cyan, - bright.white, bright.red, bright.green, yellow, bright.blue, - bright.magenta, and bright.cyan. Cannot be set with the `O' + Set the color palette for PC systems using NO_TERMS (default + 4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order + of colors is red, green, brown, blue, magenta, cyan, + bright.white, bright.red, bright.green, yellow, bright.blue, + bright.magenta, and bright.cyan. Cannot be set with the `O' command. videoshades Set the intensity level of the three gray scales available (de- fault dark normal light, PC NetHack only). If the game display - is difficult to read, try adjusting these scales; if this does - not correct the problem, try !color. Cannot be set with the + is difficult to read, try adjusting these scales; if this does + not correct the problem, try !color. Cannot be set with the `O' command. 9.7. Regular Expressions - Regular expressions are normally POSIX extended regular ex- - pressions. It is possible to compile NetHack without regular ex- - pression support on a platform where there is no regular expres- - sion library. While this is not true of any modern platform, if - your NetHack was built this way, patterns are instead glob pat- + Regular expressions are normally POSIX extended regular ex- + pressions. It is possible to compile NetHack without regular ex- + pression support on a platform where there is no regular expres- + sion library. While this is not true of any modern platform, if + your NetHack was built this way, patterns are instead glob pat- terns. This applies to Autopickup exceptions, Message types, Menu colors, and User sounds. + 9.8. Configuring Autopickup Exceptions + + You can further refine the behavior of the autopickup option + beyond what is available through the pickup_types option. + + By placing autopickup_exception lines in your configuration + file, you can define patterns to be checked when the game is - - - - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4558,34 +4558,27 @@ - 9.8. Configuring Autopickup Exceptions - - You can further refine the behavior of the autopickup option - beyond what is available through the pickup_types option. - - By placing autopickup_exception lines in your configuration - file, you can define patterns to be checked when the game is about to autopickup something. autopickup_exception - Sets an exception to the pickup_types option. The autopick- - up_exception option should be followed by a regular expression - to be used as a pattern to match against the singular form of + Sets an exception to the pickup_types option. The autopick- + up_exception option should be followed by a regular expression + to be used as a pattern to match against the singular form of the description of an object at your location. - In addition, some characters are treated specially if they oc- + In addition, some characters are treated specially if they oc- cur as the first character in the pattern, specifically: < - always pickup an object that matches rest of pattern; > - never pickup an object that matches rest of pattern. - The autopickup_exception rules are processed in the order in - which they appear in your configuration file, thus allowing a + The autopickup_exception rules are processed in the order in + which they appear in your configuration file, thus allowing a later rule to override an earlier rule. - Exceptions can be set with the `O' command, but because they - are not included in your configuration file, they won't be in - effect if you save and then restore your game. autopickup_ex- + Exceptions can be set with the `O' command, but because they + are not included in your configuration file, they won't be in + effect if you save and then restore your game. autopickup_ex- ception rules and not saved with the game. Here are some examples: @@ -4594,27 +4587,34 @@ autopickup_exception=">*corpse" autopickup_exception=">* cursed*" - The first example above will result in autopickup of any - type of arrow. The second example results in the exclusion of - any corpse from autopickup. The last example results in the ex- + The first example above will result in autopickup of any + type of arrow. The second example results in the exclusion of + any corpse from autopickup. The last example results in the ex- clusion of items known to be cursed from autopickup. 9.9. Changing Key Bindings - It is possible to change the default key bindings of some - special commands, menu accelerator keys, and extended commands, - by using BIND stanzas in the configuration file. Format is key, - followed by the command to bind to, separated by a colon. The + It is possible to change the default key bindings of some + special commands, menu accelerator keys, and extended commands, + by using BIND stanzas in the configuration file. Format is key, + followed by the command to bind to, separated by a colon. The key can be a single character ("x"), a control key ("^X", "C-x"), a meta key ("M-x"), or a three-digit decimal ASCII code. For example: + BIND=^X:getpos.autodescribe + BIND={:menu_first_page + BIND=v:loot + + Extended command keys + You can bind multiple keys to the same extended command. Un- + bind a key by using "nothing" as the extended command to bind + to. You can also bind the "", "", and "" + keys. - - - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4624,30 +4624,20 @@ - BIND=^X:getpos.autodescribe - BIND={:menu_first_page - BIND=v:loot - - Extended command keys - You can bind multiple keys to the same extended command. Un- - bind a key by using "nothing" as the extended command to bind - to. You can also bind the "", "", and "" - keys. - Menu accelerator keys - The menu control or accelerator keys can also be rebound via - OPTIONS lines in the configuration file. You cannot bind ob- + The menu control or accelerator keys can also be rebound via + OPTIONS lines in the configuration file. You cannot bind ob- ject symbols into menu accelerators. Special command keys - Below are the special commands you can rebind. Some of them - can be bound to same keys with no problems, others are in the - same "context", and if bound to same keys, only one of those - commands will be available. Special command can only be bound + Below are the special commands you can rebind. Some of them + can be bound to same keys with no problems, others are in the + same "context", and if bound to same keys, only one of those + commands will be available. Special command can only be bound to a single key. count - Prefix key to start a count, to repeat a command this many + Prefix key to start a count, to repeat a command this many times. With number_pad only. Default is `n'. doinv @@ -4657,19 +4647,19 @@ Prefix key to force fight a direction. Default is `F'. fight.numpad - Prefix key to force fight a direction. With number_pad only. + Prefix key to force fight a direction. With number_pad only. Default is `-'. getdir.help - When asked for a direction, the key to show the help. Default + When asked for a direction, the key to show the help. Default is `?'. getdir.self - When asked for a direction, the key to target yourself. De- + When asked for a direction, the key to target yourself. De- fault is `.'. getdir.self2 - When asked for a direction, the key to target yourself. De- + When asked for a direction, the key to target yourself. De- fault is `s'. getpos.autodescribe @@ -4677,10 +4667,20 @@ fault is `#'. getpos.all.next - When asked for a location, the key to go to next closest + When asked for a location, the key to go to next closest inter- + esting thing. Default is `a'. + + getpos.all.prev + When asked for a location, the key to go to previous closest + interesting thing. Default is `A'. + + getpos.door.next + When asked for a location, the key to go to next closest door + or doorway. Default is `d'. - NetHack 3.6 November 17, 2019 + + NetHack 3.7 November 17, 2019 @@ -4690,63 +4690,63 @@ - interesting thing. Default is `a'. - - getpos.all.prev - When asked for a location, the key to go to previous closest - interesting thing. Default is `A'. - - getpos.door.next - When asked for a location, the key to go to next closest door - or doorway. Default is `d'. - getpos.door.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest door or doorway. Default is `D'. getpos.help - When asked for a location, the key to show help. Default is + When asked for a location, the key to show help. Default is `?'. getpos.mon.next - When asked for a location, the key to go to next closest mon- + When asked for a location, the key to go to next closest mon- ster. Default is `m'. getpos.mon.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest monster. Default is `M'. getpos.obj.next - When asked for a location, the key to go to next closest ob- + When asked for a location, the key to go to next closest ob- ject. Default is `o'. getpos.obj.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest object. Default is `O'. getpos.menu - When asked for a location, and using one of the next or previ- - ous keys to cycle through targets, toggle showing a menu in- + When asked for a location, and using one of the next or previ- + ous keys to cycle through targets, toggle showing a menu in- stead. Default is `!'. getpos.moveskip - When asked for a location, and using the shifted movement keys - or meta-digit keys to fast-move around, move by skipping the + When asked for a location, and using the shifted movement keys + or meta-digit keys to fast-move around, move by skipping the same glyphs instead of by 8 units. Default is `*'. getpos.filter When asked for a location, change the filtering mode when using - one of the next or previous keys to cycle through targets. - Toggles between no filtering, in view only, and in the same + one of the next or previous keys to cycle through targets. + Toggles between no filtering, in view only, and in the same area only. Default is `"'. getpos.pick - When asked for a location, the key to choose the location, and + When asked for a location, the key to choose the location, and possibly ask for more info. Default is `.'. + getpos.pick.once + When asked for a location, the key to choose the location, and + skip asking for more info. Default is `,'. + + getpos.pick.quick + When asked for a location, the key to choose the location, skip + asking for more info, and exit the location asking loop. De- + fault is `;'. - NetHack 3.6 November 17, 2019 + + + NetHack 3.7 November 17, 2019 @@ -4756,17 +4756,8 @@ - getpos.pick.once - When asked for a location, the key to choose the location, and - skip asking for more info. Default is `,'. - - getpos.pick.quick - When asked for a location, the key to choose the location, skip - asking for more info, and exit the location asking loop. De- - fault is `;'. - getpos.pick.verbose - When asked for a location, the key to choose the location, and + When asked for a location, the key to choose the location, and show more info without asking. Default is `:'. getpos.self @@ -4774,23 +4765,23 @@ fault is `@'. getpos.unexplored.next - When asked for a location, the key to go to next closest unex- + When asked for a location, the key to go to next closest unex- plored location. Default is `x'. getpos.unexplored.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest unexplored location. Default is `X'. getpos.valid - When asked for a location, the key to go to show valid target + When asked for a location, the key to go to show valid target locations. Default is `$'. getpos.valid.next - When asked for a location, the key to go to next closest valid + When asked for a location, the key to go to next closest valid location. Default is `z'. getpos.valid.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest valid location. Default is `Z'. nopickup @@ -4800,7 +4791,7 @@ Key to redraw the screen. Default is `^R'. redraw.numpad - Key to redraw the screen. With number_pad only. Default is + Key to redraw the screen. With number_pad only. Default is `^L'. repeat @@ -4809,10 +4800,19 @@ reqmenu Prefix key to request menu from some commands. Default is `m'. + run + Prefix key to run towards a direction. Default is `G'. + + run.nopickup + Prefix key to run towards a direction without picking up items + on the way. Default is `M'. + + run.numpad + Prefix key to run towards a direction. With number_pad only. + Default is `5'. - - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4822,17 +4822,6 @@ - run - Prefix key to run towards a direction. Default is `G'. - - run.nopickup - Prefix key to run towards a direction without picking up items - on the way. Default is `M'. - - run.numpad - Prefix key to run towards a direction. With number_pad only. - Default is `5'. - rush Prefix key to rush towards a direction. Default is `g'. @@ -4841,7 +4830,7 @@ You can change the way the messages are shown in the message area, when the message matches a user-defined pattern. - In general, the configuration file entries to describe the + In general, the configuration file entries to describe the message types look like this: MSGTYPE=type "pattern" type - how the message should be shown; @@ -4854,31 +4843,42 @@ show - show message normally; hide - never show the message; stop - wait for user with more-prompt; - norep - show the message once, but not again if no other mes- + norep - show the message once, but not again if no other mes- sage is shown in between. - Here's an example of message types using NetHack's internal + Here's an example of message types using NetHack's internal pattern matching facility: MSGTYPE=stop "You feel hungry." MSGTYPE=hide "You displaced *." - specifies that whenever a message "You feel hungry" is shown, - the user is prompted with more-prompt, and a message matching + specifies that whenever a message "You feel hungry" is shown, + the user is prompted with more-prompt, and a message matching "You displaced ." is not shown at all. - The order of the defined MSGTYPE lines is important; the last - matching rule is used. Put the general case first, exceptions + The order of the defined MSGTYPE lines is important; the last + matching rule is used. Put the general case first, exceptions below them. 9.11. Configuring Menu Colors Some platforms allow you to define colors used in menu lines - when the line matches a user-defined pattern. At this time the + when the line matches a user-defined pattern. At this time the tty, curses, win32tty and win32gui interfaces support this. + In general, the configuration file entries to describe the + menu color mappings look like this: - NetHack 3.6 November 17, 2019 + MENUCOLOR="pattern"=color&attribute + + pattern - the pattern to match; + color - the color to use for lines matching the pat- + tern; + attribute - the attribute to use for lines matching the + pattern. The attribute is optional, and if + + + NetHack 3.7 November 17, 2019 @@ -4888,63 +4888,63 @@ - In general, the configuration file entries to describe the - menu color mappings look like this: - - MENUCOLOR="pattern"=color&attribute - - pattern - the pattern to match; - color - the color to use for lines matching the pat- - tern; - attribute - the attribute to use for lines matching the - pattern. The attribute is optional, and if left out, you must also leave out the preced- - ing ampersand. If no attribute is defined, + ing ampersand. If no attribute is defined, no attribute is used. The pattern should be a regular expression. - Allowed colors are black, red, green, brown, blue, magenta, - cyan, gray, orange, light-green, yellow, light-blue, light-ma- - genta, light-cyan, and white. And no-color, the default fore- - ground color, which isn't necessarily the same as any of the + Allowed colors are black, red, green, brown, blue, magenta, + cyan, gray, orange, light-green, yellow, light-blue, light-ma- + genta, light-cyan, and white. And no-color, the default fore- + ground color, which isn't necessarily the same as any of the other colors. - Allowed attributes are none, bold, dim, underline, blink, and - inverse. "Normal" is a synonym for "none". Note that the + Allowed attributes are none, bold, dim, underline, blink, and + inverse. "Normal" is a synonym for "none". Note that the platform used may interpret the attributes any way it wants. - Here's an example of menu colors using NetHack's internal pat- + Here's an example of menu colors using NetHack's internal pat- tern matching facility: MENUCOLOR="* blessed *"=green MENUCOLOR="* cursed *"=red MENUCOLOR="* cursed *(being worn)"=red&underline - specifies that any menu line with " blessed " contained in it - will be shown in green color, lines with " cursed " will be - shown in red, and lines with " cursed " followed by "(being - worn)" on the same line will be shown in red color and under- + specifies that any menu line with " blessed " contained in it + will be shown in green color, lines with " cursed " will be + shown in red, and lines with " cursed " followed by "(being + worn)" on the same line will be shown in red color and under- lined. You can have multiple MENUCOLOR entries in your config- - uration file, and the last MENUCOLOR line that matches a menu + uration file, and the last MENUCOLOR line that matches a menu line will be used for the line. Note that if you intend to have one or more color specifica- - tions match " uncursed ", you will probably want to turn the im- + tions match " uncursed ", you will probably want to turn the im- plicit_uncursed option off so that all items known to be uncursed are actually displayed with the "uncursed" description. 9.12. Configuring User Sounds - Some platforms allow you to define sound files to be played - when a message that matches a user-defined pattern is delivered + Some platforms allow you to define sound files to be played + when a message that matches a user-defined pattern is delivered to the message window. At this time the Qt port and the win32tty and win32gui ports support the use of user sounds. + The following configuration file entries are relevant to + mapping user sounds to messages: + + SOUNDDIR + The directory that houses the sound files to be played. + + SOUND + An entry that maps a sound file to a user-specified message + pattern. Each SOUND entry is broken down into the following + parts: - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -4954,18 +4954,7 @@ - The following configuration file entries are relevant to - mapping user sounds to messages: - - SOUNDDIR - The directory that houses the sound files to be played. - - SOUND - An entry that maps a sound file to a user-specified message - pattern. Each SOUND entry is broken down into the following - parts: - - MESG - message window mapping (the only one supported in + MESG - message window mapping (the only one supported in 3.6); pattern - the pattern to match; sound file - the sound file to play; @@ -4976,7 +4965,7 @@ 9.13. Configuring Status Hilites Your copy of NetHack may have been compiled with support for - "Status Hilites". If so, you can customize your game display by + "Status Hilites". If so, you can customize your game display by setting thresholds to change the color or appearance of fields in the status display. @@ -4984,8 +4973,8 @@ OPTION=hilite_status:field-name/behavior/color&attributes - For example, the following line in your configuration file - will cause the hitpoints field to display in the color red if + For example, the following line in your configuration file + will cause the hitpoints field to display in the color red if your hitpoints drop to or below a threshold of 30%: OPTION=hilite_status:hitpoints/<=30%/red/normal @@ -4993,24 +4982,35 @@ (That example is actually specifying red&normal for <=30% and no- color&normal for >30%.) - For another example, the following line in your configura- - tion file will cause wisdom to be displayed red if it drops and + For another example, the following line in your configura- + tion file will cause wisdom to be displayed red if it drops and green if it rises: OPTION=hilite_status:wisdom/down/red/up/green - Allowed colors are black, red, green, brown, blue, magenta, + Allowed colors are black, red, green, brown, blue, magenta, cyan, gray, orange, light-green, yellow, light-blue, light-magen- - ta, light-cyan, and white. And "no-color", the default fore- + ta, light-cyan, and white. And "no-color", the default fore- ground color on the display, which is not necessarily the same as black or white or any of the other colors. - Allowed attributes are none, bold, dim, underline, blink, - and inverse. "Normal" is a synonym for "none"; they should not + Allowed attributes are none, bold, dim, underline, blink, + and inverse. "Normal" is a synonym for "none"; they should not be used in combination with any of the other attributes. + To specify both a color and an attribute, use `&' to combine + them. To specify multiple attributes, use `+' to combine those. + For example: "magenta&inverse+dim". - NetHack 3.6 November 17, 2019 + Note that the display may substitute or ignore particular + attributes depending upon its capabilities, and in general may + interpret the attributes any way it wants. For example, on some + display systems a request for bold might yield blink or vice ver- + sa. On others, issuing an attribute request while another is al- + ready set up will replace the earlier attribute rather than + + + NetHack 3.7 November 17, 2019 @@ -5020,22 +5020,12 @@ - To specify both a color and an attribute, use `&' to combine - them. To specify multiple attributes, use `+' to combine those. - For example: "magenta&inverse+dim". - - Note that the display may substitute or ignore particular - attributes depending upon its capabilities, and in general may - interpret the attributes any way it wants. For example, on some - display systems a request for bold might yield blink or vice ver- - sa. On others, issuing an attribute request while another is al- - ready set up will replace the earlier attribute rather than com- - bine with it. Since NetHack issues attribute requests sequen- + combine with it. Since NetHack issues attribute requests sequen- tially (at least with the tty interface) rather than all at once, the only way a situation like that can be controlled is to speci- fy just one attribute. - You can adjust the appearance of the following status + You can adjust the appearance of the following status fields: title dungeon-level experience-level strength gold experience @@ -5046,16 +5036,16 @@ charisma armor-class condition alignment score - The pseudo-field "characteristics" can be used to set all six - of Str, Dex, Con, Int, Wis, and Cha at once. "HD" is "hit - dice", an approximation of experience level displayed when - polymorphed. "experience", "time", and "score" are condition- + The pseudo-field "characteristics" can be used to set all six + of Str, Dex, Con, Int, Wis, and Cha at once. "HD" is "hit + dice", an approximation of experience level displayed when + polymorphed. "experience", "time", and "score" are condition- ally displayed depending upon your other option settings. - Instead of a behavior, "condition" takes the following condi- - tion flags: stone, slime, strngl, foodpois, termill, blind, - deaf, stun, conf, hallu, lev, fly, and ride. You can use "ma- - jor_troubles" as an alias for stone through termill, "mi- + Instead of a behavior, "condition" takes the following condi- + tion flags: stone, slime, strngl, foodpois, termill, blind, + deaf, stun, conf, hallu, lev, fly, and ride. You can use "ma- + jor_troubles" as an alias for stone through termill, "mi- nor_troubles" for blind through hallu, "movement" for lev, fly, and ride, and "all" for every condition. @@ -5064,19 +5054,29 @@ * "always" will set the default attributes for that field. - * "up", "down" set the field attributes for when the field - value changes upwards or downwards. This attribute times + * "up", "down" set the field attributes for when the field + value changes upwards or downwards. This attribute times out after statushilites turns. * "changed" sets the field attribute for when the field val- - ue changes. This attribute times out after statushilites - turns. (If a field has both a "changed" rule and an "up" - or "down" rule which matches a change in the field's val- + ue changes. This attribute times out after statushilites + turns. (If a field has both a "changed" rule and an "up" + or "down" rule which matches a change in the field's val- ue, the "up" or "down" one takes precedence.) + * percentage sets the field attribute when the field value + matches the percentage. It is specified as a number be- + tween 0 and 100, followed by `%' (percent sign). If the + percentage is prefixed with `<=' or `>=', it also matches + when value is below or above the percentage. Use prefix + `<' or `>' to match when strictly below or above. (The + numeric limit is relaxed slightly for those: >-1% and + <101% are allowed.) Only four fields support percentage + rules. Percentages for "hitpoints" and "power" are + straightforward; they're based on the corresponding - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -5086,72 +5086,41 @@ - * percentage sets the field attribute when the field value - matches the percentage. It is specified as a number be- - tween 0 and 100, followed by `%' (percent sign). If the - percentage is prefixed with `<=' or `>=', it also matches - when value is below or above the percentage. Use prefix - `<' or `>' to match when strictly below or above. (The - numeric limit is relaxed slightly for those: >-1% and - <101% are allowed.) Only four fields support percentage - rules. Percentages for "hitpoints" and "power" are - straightforward; they're based on the corresponding maxi- - mum field. Percentage highlight rules are also allowed - for "experience level" and "experience points" (valid when - the showexp option is enabled). For those, the percentage - is based on the progress from the start of the current ex- - perience level to the start of the next level. So if lev- - el 2 starts at 20 points and level 3 starts at 40 points, - having 30 points is 50% and 35 points is 75%. 100% is - unattainable for experience because you'll gain a level - and the calculations will be reset for that new level, but - a rule for =100% is allowed and matches the special case - of being exactly 1 experience point short of the next lev- - el. + maximum field. Percentage highlight rules are also al- + lowed for "experience level" and "experience points" + (valid when the showexp option is enabled). For those, + the percentage is based on the progress from the start of + the current experience level to the start of the next lev- + el. So if level 2 starts at 20 points and level 3 starts + at 40 points, having 30 points is 50% and 35 points is + 75%. 100% is unattainable for experience because you'll + gain a level and the calculations will be reset for that + new level, but a rule for =100% is allowed and matches the + special case of being exactly 1 experience point short of + the next level. - * absolute value sets the attribute when the field value - matches that number. The number must be 0 or higher, ex- - cept for "armor-class' which allows negative values, and - may optionally be preceded by `='. If the number is pre- - ceded by `<=' or `>=' instead, it also matches when value - is below or above. If the prefix is `<' or `>', only + * absolute value sets the attribute when the field value + matches that number. The number must be 0 or higher, ex- + cept for "armor-class' which allows negative values, and + may optionally be preceded by `='. If the number is pre- + ceded by `<=' or `>=' instead, it also matches when value + is below or above. If the prefix is `<' or `>', only match when strictly above or below. * text match sets the attribute when the field value matches - the text. Text matches can only be used for "alignment", - "carrying-capacity", "hunger", "dungeon-level", and "ti- - tle". For title, only the role's rank title is tested; + the text. Text matches can only be used for "alignment", + "carrying-capacity", "hunger", "dungeon-level", and "ti- + tle". For title, only the role's rank title is tested; the character's name is ignored. - The in-game options menu can help you determine the correct + The in-game options menu can help you determine the correct syntax for a configuration file. - The whole feature can be disabled by setting option sta- + The whole feature can be disabled by setting option sta- tushilites to 0. Example hilites: - - - - - - - - - - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 79 - - - OPTION=hilite_status: gold/up/yellow/down/brown OPTION=hilite_status: characteristics/up/green/down/red OPTION=hilite_status: hitpoints/100%/gray&normal @@ -5167,23 +5136,36 @@ NetHack can load entire symbol sets from the symbol file. - The options that are used to select a particular symbol set + The options that are used to select a particular symbol set from the symbol file are: + + + + NetHack 3.7 November 17, 2019 + + + + + + NetHack Guidebook 79 + + + symset Set the name of the symbol set that you want to load. roguesymset - Set the name of the symbol set that you want to load for dis- + Set the name of the symbol set that you want to load for dis- play on the rogue level. - You can also override one or more symbols using the SYMBOLS - and ROGUESYMBOLS configuration file options. Symbols are speci- + You can also override one or more symbols using the SYMBOLS + and ROGUESYMBOLS configuration file options. Symbols are speci- fied as name:value pairs. Note that NetHack escape-processes the - value string in conventional C fashion. This means that \ is a - prefix to take the following character literally. Thus \ needs - to be represented as \\. The special prefix form \m switches on - the meta bit in the symbol value, and the ^ prefix causes the + value string in conventional C fashion. This means that \ is a + prefix to take the following character literally. Thus \ needs + to be represented as \\. The special prefix form \m switches on + the meta bit in the symbol value, and the ^ prefix causes the following character to be treated as a control character. NetHack Symbols @@ -5205,19 +5187,6 @@ - S_blcorn (bottom left corner) b S_blob (blob) + S_book (spellbook) - - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 80 - - - ) S_boomleft (boomerang open left) ( S_boomright (boomerang open right) ` S_boulder (boulder) @@ -5236,6 +5205,19 @@ > S_dnladder (ladder down) > S_dnstair (staircase down) d S_dog (dog or other canine) + + + + NetHack 3.7 November 17, 2019 + + + + + + NetHack Guidebook 80 + + + D S_dragon (dragon) ; S_eel (sea monster) E S_elemental (elemental) @@ -5271,19 +5253,6 @@ ^ S_hole (hole) @ S_human (human or elf) h S_humanoid (humanoid) - - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 81 - - - - S_hwall (horizontal wall) . S_ice (ice) i S_imp (imp or minor demon) @@ -5302,6 +5271,19 @@ : S_lizard (lizard) \ S_lslant (diagonal beam [zap animation]) ^ S_magic_portal (magic portal) + + + + NetHack 3.7 November 17, 2019 + + + + + + NetHack Guidebook 81 + + + ^ S_magic_trap (magic trap) m S_mimic (mimic) ] S_mimic_def (mimic) @@ -5337,19 +5319,6 @@ ^ S_squeaky_board (squeaky board) 0 S_ss1 (magic shield 1 of 4) # S_ss2 (magic shield 2 of 4) - - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 82 - - - @ S_ss3 (magic shield 3 of 4) * S_ss4 (magic shield 4 of 4) ^ S_statue_trap (statue trap) @@ -5368,6 +5337,19 @@ ^ S_teleportation_trap (teleportation trap) \ S_throne (opulent throne) - S_tlcorn (top left corner) + + + + NetHack 3.7 November 17, 2019 + + + + + + NetHack Guidebook 82 + + + | S_tlwall (wall) ( S_tool (useful item (pick-axe, key, lamp...)) ^ S_trap_door (trap door) @@ -5403,10 +5385,28 @@ Y S_yeti (apelike creature) Z S_zombie (zombie) z S_zruty (zruty) + S_pet_override (any pet if ACCESSIBILITY=1 is set) + S_hero_override (hero if ACCESSIBILITY=1 is set) + + Notes: + + * Several symbols in this table appear to be blank. They are the + space character, except for S_pet_override and S_hero_override + which don't have any default value and can only be used if en- + abled in the "sysconf" file. + + * S_rock is misleadingly named; rocks and stones use S_gem. + Statues and boulders are the rock being referred to, but since + version 3.6.0, statues are displayed as the monster they de- + pict. So S_rock is only used for boulders and not used at all + if overridden by the more specific S_boulder. - NetHack 3.6 November 17, 2019 + + + + NetHack 3.7 November 17, 2019 @@ -5416,63 +5416,63 @@ - S_pet_override (any pet if ACCESSIBILITY=1 is set) - S_hero_override (hero if ACCESSIBILITY=1 is set) - - Notes: - - * Several symbols in this table appear to be blank. They are the - space character, except for S_pet_override and S_hero_override - which don't have any default value and can only be used if en- - abled in the "sysconf" file. - - * S_rock is misleadingly named; rocks and stones use S_gem. - Statues and boulders are the rock being referred to, but since - version 3.6.0, statues are displayed as the monster they de- - pict. So S_rock is only used for boulders and not used at all - if overridden by the more specific S_boulder. - 9.15. Configuring NetHack for Play by the Blind - NetHack can be set up to use only standard ASCII characters - for making maps of the dungeons. This makes the MS-DOS versions - of NetHack completely accessible to the blind who use speech - and/or Braille access technologies. Players will require a good - working knowledge of their screen-reader's review features, and - will have to know how to navigate horizontally and vertically - character by character. They will also find the search capabili- - ties of their screen-readers to be quite valuable. Be certain to - examine this Guidebook before playing so you have an idea what - the screen layout is like. You'll also need to be able to locate - the PC cursor. It is always where your character is located. - Merely searching for an @-sign will not always find your charac- + NetHack can be set up to use only standard ASCII characters + for making maps of the dungeons. This makes the MS-DOS versions + of NetHack completely accessible to the blind who use speech + and/or Braille access technologies. Players will require a good + working knowledge of their screen-reader's review features, and + will have to know how to navigate horizontally and vertically + character by character. They will also find the search capabili- + ties of their screen-readers to be quite valuable. Be certain to + examine this Guidebook before playing so you have an idea what + the screen layout is like. You'll also need to be able to locate + the PC cursor. It is always where your character is located. + Merely searching for an @-sign will not always find your charac- ter since there are other humanoids represented by the same sign. - Your screen-reader should also have a function which gives you - the row and column of your review cursor and the PC cursor. - These co-ordinates are often useful in giving players a better + Your screen-reader should also have a function which gives you + the row and column of your review cursor and the PC cursor. + These co-ordinates are often useful in giving players a better sense of the overall location of items on the screen. - NetHack can also be compiled with support for sending the - game messages to an external program, such as a text-to-speech - synthesizer. If the "#version" extended command shows "external - program as a message handler", your NetHack has been compiled + NetHack can also be compiled with support for sending the + game messages to an external program, such as a text-to-speech + synthesizer. If the "#version" extended command shows "external + program as a message handler", your NetHack has been compiled with the capability. When compiling NetHack from source on Linux - and other POSIX systems, define MSGHANDLER to enable it. To use - the capability, set the environment variable NETHACK_MSGHANDLER + and other POSIX systems, define MSGHANDLER to enable it. To use + the capability, set the environment variable NETHACK_MSGHANDLER to an executable, which will be executed with the game message as the program's only parameter. - While it is not difficult for experienced users to edit the - defaults.nh file to accomplish this, novices may find this task + While it is not difficult for experienced users to edit the + defaults.nh file to accomplish this, novices may find this task somewhat daunting. Included within the "symbols" file of all of- ficial distributions of NetHack is a symset called NHAccess. Se- - lecting that symset in your configuration file will cause the - game to run in a manner accessible to the blind. After you have - gained some experience with the game and with editing files, you + lecting that symset in your configuration file will cause the + game to run in a manner accessible to the blind. After you have + gained some experience with the game and with editing files, you may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your + configuration file to better suit your preferences. See the pre- + vious section for the special symbols S_pet_override to force a + consistent symbol for all pets and S_hero_override to force a + unique symbol for the player character if accessibility is en- + abled in the sysconf file. + + The most crucial settings to make the game more accessible + are: + + symset:NHAccess + Load a symbol set appropriate for use by blind players. + + roguesymset:NHAccess + Load a symbol set for the rogue level that is appropriate for + use by blind players. - NetHack 3.6 November 17, 2019 + + NetHack 3.7 November 17, 2019 @@ -5482,22 +5482,6 @@ - configuration file to better suit your preferences. See the pre- - vious section for the special symbols S_pet_override to force a - consistent symbol for all pets and S_hero_override to force a - unique symbol for the player character if accessibility is en- - abled in the sysconf file. - - The most crucial settings to make the game more accessible - are: - - symset:NHAccess - Load a symbol set appropriate for use by blind players. - - roguesymset:NHAccess - Load a symbol set for the rogue level that is appropriate for - use by blind players. - menustyle:traditional This will assist in the interface to speech synthesizers. @@ -5505,40 +5489,56 @@ Show menus on a cleared screen and aligned to the left edge. number_pad - A lot of speech access programs use the number-pad to review + A lot of speech access programs use the number-pad to review the screen. If this is the case, disable the number_pad option and use the traditional Rogue-like commands. autodescribe - Automatically describe the terrain under the cursor when tar- + Automatically describe the terrain under the cursor when tar- geting. mention_walls - Give feedback messages when walking towards a wall or when + Give feedback messages when walking towards a wall or when travel command was interrupted. whatis_coord:compass - When targeting with cursor, describe the cursor position with + When targeting with cursor, describe the cursor position with coordinates relative to your character. whatis_filter:area - When targeting with cursor, filter possible locations so only - those in the same area (eg. same room, or same corridor) are + When targeting with cursor, filter possible locations so only + those in the same area (eg. same room, or same corridor) are considered. whatis_moveskip - When targeting with cursor and using fast-move, skip the same + When targeting with cursor and using fast-move, skip the same glyphs instead of moving 8 units at a time. nostatus_updates - Prevent updates to the status lines at the bottom of the - screen, if your screen-reader reads those lines. The same in- + Prevent updates to the status lines at the bottom of the + screen, if your screen-reader reads those lines. The same in- formation can be seen via the "#attributes" command. + 9.16. Global Configuration for System Administrators + + If NetHack is compiled with the SYSCF option, a system ad- + ministrator should set up a global configuration; this is a file + in the same format as the traditional per-user configuration file + (see above). This file should be named sysconf and placed in the + same directory as the other NetHack support files. The options + recognized in this file are listed below. Any option not set us- + es a compiled-in default (which may not be appropriate for your + system). + + WIZARDS = A space-separated list of user names who are allowed + to play in debug mode (commonly referred to as wizard mode). A + value of a single asterisk (*) allows anyone to start a game in + debug mode. - NetHack 3.6 November 17, 2019 + + NetHack 3.7 November 17, 2019 @@ -5548,47 +5548,47 @@ - 9.16. Global Configuration for System Administrators - - If NetHack is compiled with the SYSCF option, a system ad- - ministrator should set up a global configuration; this is a file - in the same format as the traditional per-user configuration file - (see above). This file should be named sysconf and placed in the - same directory as the other NetHack support files. The options - recognized in this file are listed below. Any option not set us- - es a compiled-in default (which may not be appropriate for your - system). - - WIZARDS = A space-separated list of user names who are allowed - to play in debug mode (commonly referred to as wizard mode). A - value of a single asterisk (*) allows anyone to start a game in - debug mode. - SHELLERS = A list of users who are allowed to use the shell es- cape command (!). The syntax is the same as WIZARDS. - EXPLORERS = A list of users who are allowed to use the explore + EXPLORERS = A list of users who are allowed to use the explore mode. The syntax is the same as WIZARDS. MAXPLAYERS = Limit the maximum number of games that can be run- ning at the same time. - SUPPORT = A string explaining how to get local support (no de- + SAVEFORMAT = A list of up to two save file formats separated by + space. The first format in the list will written as well as + read. The second format will be read only if no save file in + the first format exists. Valid choices are "historical" for + binary writing of entire structs, "lendian" for binary writing + of each field in little-endian order, "ascii" for writing the + save file content in ascii text. + + BONESFORMAT = A list of up to two bones file formats separated + by space. The first format in the list will written as well as + read. The second format will be read only if no bones files in + the first format exist. Valid choices are "historical" for bi- + nary writing of entire structs, "lendian" for binary writing of + each field in little-endian order, "ascii" for writing the + bones file content in ascii text. + + SUPPORT = A string explaining how to get local support (no de- fault value). - RECOVER = A string explaining how to recover a game on this + RECOVER = A string explaining how to recover a game on this system (no default value). - SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE + SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE option. When disabled, incubi and succubi behave like nymphs. - CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- + CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- ARDS, and SHELLERS check for the player name instead of the us- er's login name. CHECK_SAVE_UID = 0 or 1 to disable or enable, respectively, the - UID (used identification number) checking for save files (to - verify that the user who is restoring is the same one who + UID (used identification number) checking for save files (to + verify that the user who is restoring is the same one who saved). The following options affect the score file: @@ -5597,14 +5597,14 @@ ENTRYMAX = Maximum number of entries in the score file. - POINTSMIN = Minimum number of points to get an entry in the + POINTSMIN = Minimum number of points to get an entry in the score file. - PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- + PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- spectively, to identify unique people for the score file. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -5614,11 +5614,11 @@ - MAX_STATUENAME_RANK = Maximum number of score file entries to + MAX_STATUENAME_RANK = Maximum number of score file entries to use for random statue names (default is 10). DUMPLOGFILE = A filename where the end-of-game dumplog is - saved. Not defining this will prevent dumplog from being cre- + saved. Not defining this will prevent dumplog from being cre- ated. Only available if your game is compiled with DUMPLOG. Al- lows the following placeholders: @@ -5634,43 +5634,43 @@ 10. Scoring - NetHack maintains a list of the top scores or scorers on + NetHack maintains a list of the top scores or scorers on your machine, depending on how it is set up. In the latter case, - each account on the machine can post only one non-winning score - on this list. If you score higher than someone else on this - list, or better your previous score, you will be inserted in the - proper place under your current name. How many scores are kept + each account on the machine can post only one non-winning score + on this list. If you score higher than someone else on this + list, or better your previous score, you will be inserted in the + proper place under your current name. How many scores are kept can also be set up when NetHack is compiled. - Your score is chiefly based upon how much experience you + Your score is chiefly based upon how much experience you gained, how much loot you accumulated, how deep you explored, and how the game ended. If you quit the game, you escape with all of - your gold intact. If, however, you get killed in the Mazes of + your gold intact. If, however, you get killed in the Mazes of Menace, the guild will only hear about 90% of your gold when your - corpse is discovered (adventurers have been known to collect - finder's fees). So, consider whether you want to take one last - hit at that monster and possibly live, or quit and stop with - whatever you have. If you quit, you keep all your gold, but if + corpse is discovered (adventurers have been known to collect + finder's fees). So, consider whether you want to take one last + hit at that monster and possibly live, or quit and stop with + whatever you have. If you quit, you keep all your gold, but if you swing and live, you might find more. - If you just want to see what the current top players/games + If you just want to see what the current top players/games list is, you can type nethack -s all on most versions. 11. Explore mode - NetHack is an intricate and difficult game. Novices might + NetHack is an intricate and difficult game. Novices might falter in fear, aware of their ignorance of the means to survive. Well, fear not. Your dungeon comes equipped with an "explore" or - "discovery" mode that enables you to keep old save files and - cheat death, at the paltry cost of not getting on the high score + "discovery" mode that enables you to keep old save files and + cheat death, at the paltry cost of not getting on the high score list. - There are two ways of enabling explore mode. One is to - start the game with the -X command-line switch or with the play- - mode:explore option. The other is to issue the "#exploremode" + There are two ways of enabling explore mode. One is to + start the game with the -X command-line switch or with the play- + mode:explore option. The other is to issue the "#exploremode" - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -5680,63 +5680,63 @@ - extended command while already playing the game. Starting a new + extended command while already playing the game. Starting a new game in explore mode provides your character with a wand of wish- - ing in initial inventory; switching during play does not. The - other benefits of explore mode are left for the trepid reader to + ing in initial inventory; switching during play does not. The + other benefits of explore mode are left for the trepid reader to discover. 11.1. Debug mode Debug mode, also known as wizard mode, is undocumented aside - from this brief description and the various "debug mode only" - commands listed among the command descriptions. It is intended + from this brief description and the various "debug mode only" + commands listed among the command descriptions. It is intended for tracking down problems within the program rather than to pro- - vide god-like powers to your character, and players who attempt - debugging are expected to figure out how to use it themselves. - It is initiated by starting the game with the -D command-line + vide god-like powers to your character, and players who attempt + debugging are expected to figure out how to use it themselves. + It is initiated by starting the game with the -D command-line switch or with the playmode:debug option. - For some systems, the player must be logged in under a par- - ticular user name to be allowed to use debug mode; for others, - the hero must be given a particular character name (but may be - any role; there's no connection between "wizard mode" and the - Wizard role). Attempting to start a game in debug mode when not - allowed or not available will result in falling back to explore + For some systems, the player must be logged in under a par- + ticular user name to be allowed to use debug mode; for others, + the hero must be given a particular character name (but may be + any role; there's no connection between "wizard mode" and the + Wizard role). Attempting to start a game in debug mode when not + allowed or not available will result in falling back to explore mode instead. 12. Credits - The original hack game was modeled on the Berkeley UNIX - rogue game. Large portions of this paper were shamelessly - cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy - and Kenneth C. R. C. Arnold. Small portions were adapted from + The original hack game was modeled on the Berkeley UNIX + rogue game. Large portions of this paper were shamelessly + cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy + and Kenneth C. R. C. Arnold. Small portions were adapted from Further Exploration of the Dungeons of Doom, by Ken Arromdee. NetHack is the product of literally dozens of people's work. - Main events in the course of the game development are described + Main events in the course of the game development are described below: - Jay Fenlason wrote the original Hack, with help from Kenny + Jay Fenlason wrote the original Hack, with help from Kenny Woodland, Mike Thome and Jon Payne. Andries Brouwer did a major re-write, transforming Hack into - a very different game, and published (at least) three versions + a very different game, and published (at least) three versions (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. - Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, - producing PC HACK 1.01e, added support for DEC Rainbow graphics - in version 1.03g, and went on to produce at least four more ver- + Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, + producing PC HACK 1.01e, added support for DEC Rainbow graphics + in version 1.03g, and went on to produce at least four more ver- sions (3.0, 3.2, 3.51, and 3.6). - R. Black ported PC HACK 3.51 to Lattice C and the Atari + R. Black ported PC HACK 3.51 to Lattice C and the Atari 520/1040ST, producing ST Hack 1.03. Mike Stephenson merged these various versions back together, - incorporating many of the added features, and produced NetHack + incorporating many of the added features, and produced NetHack - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -5746,7 +5746,7 @@ - 1.4. He then coordinated a cast of thousands in enhancing and + 1.4. He then coordinated a cast of thousands in enhancing and debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. Later, Mike coordinated a major rewrite of the game, heading @@ -5754,55 +5754,55 @@ Creps, Eric Hendrickson, Izchak Miller, John Rupley, Mike Threep- oint, and Janet Walz, to produce NetHack 3.0c. - NetHack 3.0 was ported to the Atari by Eric R. Smith, to - OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three + NetHack 3.0 was ported to the Atari by Eric R. Smith, to + OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three of them and Kevin Darcy later joined the main NetHack Development Team to produce subsequent revisions of 3.0. - Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm - Meluch, Stephen Spackman and Pierre Martineau designed overlay - code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the - Macintosh. Along with various other Dungeoneers, they continued - to enhance the PC, Macintosh, and Amiga ports through the later + Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm + Meluch, Stephen Spackman and Pierre Martineau designed overlay + code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the + Macintosh. Along with various other Dungeoneers, they continued + to enhance the PC, Macintosh, and Amiga ports through the later revisions of 3.0. - Headed by Mike Stephenson and coordinated by Izchak Miller - and Janet Walz, the NetHack Development Team which now included - Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, - Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, + Headed by Mike Stephenson and coordinated by Izchak Miller + and Janet Walz, the NetHack Development Team which now included + Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, + Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Eric Raymond, and Eric Smith undertook a radical revision of 3.0. They re-structured the game's design, and re-wrote major parts of - the code. They added multiple dungeons, a new display, special - individual character quests, a new endgame and many other new + the code. They added multiple dungeons, a new display, special + individual character quests, a new endgame and many other new features, and produced NetHack 3.1. - Ken Lorber, Gregg Wonderly and Greg Olson, with help from - Richard Addison, Mike Passaretti, and Olaf Seibert, developed + Ken Lorber, Gregg Wonderly and Greg Olson, with help from + Richard Addison, Mike Passaretti, and Olaf Seibert, developed NetHack 3.1 for the Amiga. - Norm Meluch and Kevin Smolkowski, with help from Carl Sche- + Norm Meluch and Kevin Smolkowski, with help from Carl Sche- lin, Stephen Spackman, Steve VanDevender, and Paul Winner, ported NetHack 3.1 to the PC. Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike - Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny - Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack + Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny + Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack 3.1 for the Macintosh, porting it for MPW. Building on their de- velopment, Bart House added a Think C port. Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith port- - ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua - Delahunty, was responsible for the VMS version of NetHack 3.1. + ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua + Delahunty, was responsible for the VMS version of NetHack 3.1. Michael Allison ported NetHack 3.1 to Windows NT. - Dean Luick, with help from David Cohrs, developed NetHack - 3.1 for X11. Warwick Allison wrote a tiled version of NetHack - for the Atari; he later contributed the tiles to the NetHack De- - velopment Team and tile support was then added to other plat- + Dean Luick, with help from David Cohrs, developed NetHack + 3.1 for X11. Warwick Allison wrote a tiled version of NetHack + for the Atari; he later contributed the tiles to the NetHack De- + velopment Team and tile support was then added to other plat- forms. - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -5815,60 +5815,60 @@ The 3.2 NetHack Development Team, comprised of Michael Alli- son, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Er- - ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released + ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released version 3.2 in April of 1996. Version 3.2 marked the tenth anniversary of the formation of - the development team. In a testament to their dedication to the - game, all thirteen members of the original NetHack Development - Team remained on the team at the start of work on that release. - During the interval between the release of 3.1.3 and 3.2, one of - the founding members of the NetHack Development Team, Dr. Izchak - Miller, was diagnosed with cancer and passed away. That release - of the game was dedicated to him by the development and porting + the development team. In a testament to their dedication to the + game, all thirteen members of the original NetHack Development + Team remained on the team at the start of work on that release. + During the interval between the release of 3.1.3 and 3.2, one of + the founding members of the NetHack Development Team, Dr. Izchak + Miller, was diagnosed with cancer and passed away. That release + of the game was dedicated to him by the development and porting teams. During the lifespan of NetHack 3.1 and 3.2, several enthusi- - asts of the game added their own modifications to the game and + asts of the game added their own modifications to the game and made these "variants" publicly available: - Tom Proudfoot and Yuval Oren created NetHack++, which was - quickly renamed NetHack--. Working independently, Stephen White - wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and + Tom Proudfoot and Yuval Oren created NetHack++, which was + quickly renamed NetHack--. Working independently, Stephen White + wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and his own NetHack-- to produce SLASH. Larry Stewart-Zerba and War- - wick Allison improved the spell casting system with the Wizard - Patch. Warwick Allison also ported NetHack to use the Qt inter- + wick Allison improved the spell casting system with the Wizard + Patch. Warwick Allison also ported NetHack to use the Qt inter- face. - Warren Cheung combined SLASH with the Wizard Patch to pro- - duce Slash'EM, and with the help of Kevin Hugo, added more fea- - tures. Kevin later joined the NetHack Development Team and in- + Warren Cheung combined SLASH with the Wizard Patch to pro- + duce Slash'EM, and with the help of Kevin Hugo, added more fea- + tures. Kevin later joined the NetHack Development Team and in- corporated the best of these ideas in NetHack 3.3. The final update to 3.2 was the bug fix release 3.2.3, which - was released simultaneously with 3.3.0 in December 1999 just in + was released simultaneously with 3.3.0 in December 1999 just in time for the Year 2000. - The 3.3 NetHack Development Team, consisting of Michael Al- - lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, - Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- - ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet - Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 + The 3.3 NetHack Development Team, consisting of Michael Al- + lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, + Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- + ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet + Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 in August of 2000. Version 3.3 offered many firsts. It was the first version to - separate race and profession. The Elf class was removed in pref- + separate race and profession. The Elf class was removed in pref- erence to an elf race, and the races of dwarves, gnomes, and orcs - made their first appearance in the game alongside the familiar - human race. Monk and Ranger roles joined Archeologists, Barbar- - ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, - Tourists, Valkyries and of course, Wizards. It was also the - first version to allow you to ride a steed, and was the first - version to have a publicly available web-site listing all the - bugs that had been discovered. Despite that constantly growing + made their first appearance in the game alongside the familiar + human race. Monk and Ranger roles joined Archeologists, Barbar- + ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, + Tourists, Valkyries and of course, Wizards. It was also the + first version to allow you to ride a steed, and was the first + version to have a publicly available web-site listing all the + bugs that had been discovered. Despite that constantly growing - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -5878,40 +5878,40 @@ - bug list, 3.3 proved stable enough to last for more than a year + bug list, 3.3 proved stable enough to last for more than a year and a half. - The 3.4 NetHack Development Team initially consisted of - Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin - Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet - Walz, and Paul Winner, with Warwick Allison joining just before + The 3.4 NetHack Development Team initially consisted of + Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin + Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet + Walz, and Paul Winner, with Warwick Allison joining just before the release of NetHack 3.4.0 in March 2002. - As with version 3.3, various people contributed to the game + As with version 3.3, various people contributed to the game as a whole as well as supporting ports on the different platforms that NetHack runs on: Pat Rankin maintained 3.4 for VMS. - Michael Allison maintained NetHack 3.4 for the MS-DOS plat- + Michael Allison maintained NetHack 3.4 for the MS-DOS plat- form. Paul Winner and Yitzhak Sapir provided encouragement. - Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- + Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- hanced the Macintosh port of 3.4. - Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, - and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft + Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, + and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft Windows platform. Alex Kompel contributed a new graphical inter- - face for the Windows port. Alex Kompel also contributed a Win- + face for the Windows port. Alex Kompel also contributed a Win- dows CE port for 3.4.1. Ron Van Iwaarden was the sole maintainer of NetHack for OS/2 - the past several releases. Unfortunately Ron's last OS/2 machine - stopped working in early 2006. A great many thanks to Ron for + the past several releases. Unfortunately Ron's last OS/2 machine + stopped working in early 2006. A great many thanks to Ron for keeping NetHack alive on OS/2 all these years. - Janne Salmijarvi and Teemu Suikki maintained and enhanced - the Amiga port of 3.4 after Janne Salmijarvi resurrected it for + Janne Salmijarvi and Teemu Suikki maintained and enhanced + the Amiga port of 3.4 after Janne Salmijarvi resurrected it for 3.3.1. Christian "Marvin" Bressler maintained 3.4 for the Atari af- @@ -5920,21 +5920,21 @@ The release of NetHack 3.4.3 in December 2003 marked the be- ginning of a long release hiatus. 3.4.3 proved to be a remarkably stable version that provided continued enjoyment by the community - for more than a decade. The NetHack Development Team 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 + for more than a decade. The NetHack Development Team slowly and + quietly continued to work on the game behind the scenes during + the tenure of 3.4.3. It was during that same period that several new variants emerged within the NetHack community. Notably sporkhack by Derek S. Ray, unnethack by Patric Mueller, nitrohack - and its successors originally by Daniel Thaler and then by Alex - Smith, and Dynahack by Tung Nguyen. Some of those variants con- - tinue to be developed, maintained, and enjoyed by the community + and its successors originally by Daniel Thaler and then by Alex + Smith, and Dynahack by Tung Nguyen. Some of those variants con- + tinue to be developed, maintained, and enjoyed by the community to this day. In September 2014, an interim snapshot of the code under de- velopment was released publicly by other parties. Since that code - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -5944,63 +5944,63 @@ - was a work-in-progress and had not gone through the process of - debugging it as a suitable release, it was decided that the ver- - sion numbers present on that code snapshot would be retired and - never used in an official NetHack release. An announcement was - posted on the NetHack Development Team's official nethack.org - website to that effect, stating that there would never be a + was a work-in-progress and had not gone through the process of + debugging it as a suitable release, it was decided that the ver- + sion numbers present on that code snapshot would be retired and + never used in an official NetHack release. An announcement was + posted on the NetHack Development Team's official nethack.org + website to that effect, stating that there would never be a 3.4.4, 3.5, or 3.5.0 official release version. - In January 2015, preparation began for the release of + In January 2015, preparation began for the release of NetHack 3.6. - At the beginning of development for what would eventually - get released as 3.6.0, the NetHack Development Team consisted of - Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, - Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- - son, Janet Walz, and Paul Winner. In early 2015, ahead of the + At the beginning of development for what would eventually + get released as 3.6.0, the NetHack Development Team consisted of + Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, + Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- + son, Janet Walz, and Paul Winner. In early 2015, ahead of the release of 3.6.0, new members Sean Hunt, Pasi Kallinen, and Derek S. Ray joined the NetHack Development Team. Near the end of the development of 3.6.0, one of the signif- - icant inspirations for many of the humorous and fun features - found in the game, author Terry Pratchett, passed away. NetHack + icant inspirations for many of the humorous and fun features + found in the game, author Terry Pratchett, passed away. NetHack 3.6.0 introduced a tribute to him. 3.6.0 was released in December 2015, and merged work done by - the development team since the release of 3.4.3 with some of the + the development team since the release of 3.4.3 with some of the beloved community patches. Many bugs were fixed and some code was restructured. - The NetHack Development Team, as well as Steve VanDevender + The NetHack Development Team, as well as Steve VanDevender and Kevin Smolkowski, ensured that NetHack 3.6 continued to oper- ate on various UNIX flavors and maintained the X11 interface. - Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- + Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- tained the port of NetHack 3.6 for Mac OSX. - Michael Allison, David Cohrs, Bart House, Pasi Kallinen, - Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- + Michael Allison, David Cohrs, Bart House, Pasi Kallinen, + Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- tained the port of NetHack 3.6 for Microsoft Windows. - Pat Rankin attempted to keep the VMS port running for + Pat Rankin attempted to keep the VMS port running for NetHack 3.6, hindered by limited access. Kevin Smolkowski has up- - dated and tested it for the most recent version of OpenVMS (V8.4 + dated 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. - Ray Chason resurrected the msdos port for 3.6 and contrib- + Ray Chason resurrected the msdos port for 3.6 and contrib- uted the necessary updates to the community at large. - In late April 2018, several hundred bug fixes for 3.6.0 and - some new features were assembled and released as NetHack 3.6.1. + In late April 2018, several hundred bug fixes for 3.6.0 and + some new features were assembled and released as NetHack 3.6.1. The NetHack Development Team at the time of release of 3.6.1 con- - sisted of Warwick Allison, Michael Allison, Ken Arromdee, David - Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, + sisted of Warwick Allison, Michael Allison, Ken Arromdee, David + Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -6010,14 +6010,14 @@ - Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike + Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz, and Paul Winner. In early May 2019, another 320 bug fixes along with some en- - hancements and the adopted curses window port, were released as + hancements and the adopted curses window port, were released as 3.6.2. - Bart House, who had contributed to the game as a porting + Bart House, who had contributed to the game as a porting team participant for decades, joined the NetHack Development Team in late May 2019. @@ -6027,19 +6027,19 @@ 12.1. SPECIAL THANKS On behalf of the NetHack community, thank you very much once - again to M. Drew Streib and Pasi Kallinen for providing a public - NetHack server at nethack.alt.org. Thanks to Keith Simpson and + again to M. Drew Streib and Pasi Kallinen for providing a public + NetHack server at nethack.alt.org. Thanks to Keith Simpson and Andy Thomson for hardfought.org. Thanks to all those unnamed dun- - geoneers who invest their time and effort into annual NetHack - tournaments such as Junethack, The November NetHack Tournament + geoneers who invest their time and effort into annual NetHack + tournaments such as Junethack, The November NetHack Tournament and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list + of the names of the worst of these miscreants in this, the list of Dungeoneers: Adam Aronow J. Ali Harlow Mikko Juola Alex Kompel Janet Walz Nathan Eady @@ -6066,7 +6066,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 @@ -6097,7 +6097,7 @@ Irina Rempt-Drijfhout Mike Passaretti Izchak Miller Mike Stephenson - Brand and product names are trademarks or registered trade- + Brand and product names are trademarks or registered trade- marks of their respective holders. @@ -6132,7 +6132,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.7 November 17, 2019 From 8bc171ec50f76968a38f1fc27f8dfd5badbf7aec Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 23 Nov 2019 18:57:17 -0500 Subject: [PATCH 294/529] more sys/msdos/Makefile?.cross updates --- sys/msdos/Makefile1.cross | 127 +++----------------------------------- sys/msdos/Makefile2.cross | 12 ++-- 2 files changed, 18 insertions(+), 121 deletions(-) diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index e2e6daede..dde1ad256 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -1,19 +1,19 @@ -# NetHack 3.6 Makefile1.cross +# NetHack 3.7 Makefile1.cross # Cross-compile msdos version of NetHack using a # linux-hosted djgpp cross-compiler. # # Makefile1.cross (this file) is for the host-side obj files and # utilities that will run on the host platform only. # -# Makefile2.cross is the the target platform obj files +# Makefile2.cross is for the target platform obj files # and utilities. # # Makefile2 utilizes the djgpp cross-compiler from Andrew Wu: # https://github.com/andrewwutw/build-djgpp # -# Currently, in NetHack 3.6, the cross-compile for msdos cannot be -# used to build the entire game to a playable point but it is useful -# for testing the msdos port build of the evolving NetHack code.0 +# Currently, in NetHack 3.7, it is now feasible to cross-compile +# the game in a 2-stage process. Makefile1.cross (this file) carries +# out the 1st stage. # # The GNU Make has a problem if you include a drive spec below. GAMEDIR =../msdos-binary @@ -358,12 +358,12 @@ $(DAT)/data: $(HOST_O)utility.tag $(DATABASE) $(DAT)/rumors: $(HOST_O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal $(U)makedefs -r -$(DAT)/quest.dat: $(HOST_O)utility.tag $(DAT)/quest.txt - $(U)makedefs -q - $(DAT)/oracles: $(HOST_O)utility.tag $(DAT)/oracles.txt $(U)makedefs -h +$(DAT)/quest.dat: $(HOST_O)utility.tag $(DAT)/quest.txt + $(U)makedefs -q + $(DAT)/bogusmon: $(HOST_O)utility.tag $(DAT)/bogusmon.txt $(U)makedefs -s @@ -392,73 +392,9 @@ $(HOST_O)makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/objclass.h \ $(INCL)/monsym.h $(INCL)/qtext.h $(U)makedefs.c $(HOST_CC) $(cflags) -o$@ $(U)makedefs.c -#========================================== -# Level Compiler Dependencies -#========================================== - -#$(U)lev_comp: $(SPLEVOBJS) -# -rm -f temp.a -# ar r temp.a $(SPLEVOBJS) -# $(HOST_LINK) $(LFLAGS) -o$@ temp.a -# -#$(HOST_O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h $(U)lev_yacc.c -# $(HOST_CC) $(cflags) -o$@ $(U)lev_yacc.c -# -#$(HOST_O)lev_$(LEX).o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h \ -# $(U)lev_$(LEX).c -# $(HOST_CC) $(cflags) -o$@ $(U)lev_$(LEX).c -# -#$(HOST_O)lev_main.o: $(HACK_H) $(INCL)/sp_lev.h $(INCL)/date.h $(U)lev_main.c -# -#$(U)lev_yacc.c: $(SSHR)/lev_yacc.c -# @echo --- -# @echo For now, we will copy the prebuilt -# @echo lev_comp.c from $(SSHR) into $(U) and use that. -# @cp $(SSHR)/lev_yacc.c $(U)lev_yacc.c -# @echo.>>$(U)lev_yacc.c -# -#$(INCL)/lev_comp.h : $(SSHR)/lev_comp.h -# @echo For now, we will copy the prebuilt lev_comp.h -# @echo from $(SSHR) into $(INCL) and use that. -# @cp $(SSHR)/lev_comp.h $@ -#$(U)lev_lex.c: $(SSHR)/lev_lex.c -# @echo.>>$(INCL)/lev_comp.h -# @echo For now, we will copy the prebuilt lev_lex.c -# @echo from $(SSHR) into $(U) and use it. -# @cp $(SSHR)/lev_lex.c $@ -# @echo.>>$@ - -#========================================== -# Dungeon Dependencies -#========================================== - -#$(U)dgn_comp: $(DGNCOMPOBJS) -# $(HOST_LINK) $(LFLAGS) -o$@ $(DGNCOMPOBJS) -# -#$(U)dgn_yacc.c: $(SSHR)/dgn_yacc.c -# @echo --- -# @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and -# @echo dgn_comp.h from $(SSHR) into $(U) and use that. -# @cp $(SSHR)/dgn_yacc.c $(U)dgn_yacc.c -# @echo.>>$(U)dgn_yacc.c -# -#$(INCL)/dgn_comp.h: $(SSHR)/dgn_comp.h -# @echo --- -# @echo For now, we will copy the prebuilt dgn_comp.h -# @echo from $(SSHR) into $(INCL) and use that. -# @cp $(SSHR)/dgn_comp.h $@ -# @echo.>>$(INCL)/dgn_comp.h -# -#$(U)dgn_$(LEX).c: $(SSHR)/dgn_lex.c $(INCL)/dgn_comp.h -# @echo --- -# @echo For now, we will copy the prebuilt dgn_lex.c -# @echo from $(SSHR) into $(U) and use it. -# @cp $(SSHR)/dgn_lex.c $@ -# @echo.>>$@ - -#========================================== +#============================================= # Header file moves required for tile support -#========================================== +#============================================= ifeq ($(SUPPRESS_GRAPHICS),Y) @@ -606,49 +542,6 @@ $(HOST_O)objects.o: $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ $(HOST_O)panic.o: $(CONFIG_H) $(U)panic.c $(HOST_CC) $(cflags) -o$@ $(U)panic.c -#$(HOST_O)sp_lev.tag: $(HOST_O)utility.tag \ -# $(DAT)/bigroom.des $(DAT)/castle.des \ -# $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \ -# $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \ -# $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \ -# $(DAT)/caveman.des $(DAT)/healer.des $(DAT)/knight.des \ -# $(DAT)/monk.des $(DAT)/priest.des $(DAT)/ranger.des \ -# $(DAT)/rogue.des $(DAT)/samurai.des $(DAT)/tourist.des \ -# $(DAT)/valkyrie.des $(DAT)/wizard.des -# cd $(DAT) -# $(U)lev_comp bigroom.des -# $(U)lev_comp castle.des -# $(U)lev_comp endgame.des -# $(U)lev_comp gehennom.des -# $(U)lev_comp knox.des -# $(U)lev_comp mines.des -# $(U)lev_comp medusa.des -# $(U)lev_comp oracle.des -# $(U)lev_comp sokoban.des -# $(U)lev_comp tower.des -# $(U)lev_comp yendor.des -# $(U)lev_comp arch.des -# $(U)lev_comp barb.des -# $(U)lev_comp caveman.des -# $(U)lev_comp healer.des -# $(U)lev_comp knight.des -# $(U)lev_comp monk.des -# $(U)lev_comp priest.des -# $(U)lev_comp ranger.des -# $(U)lev_comp rogue.des -# $(U)lev_comp samurai.des -# $(U)lev_comp tourist.des -# $(U)lev_comp valkyrie.des -# $(U)lev_comp wizard.des -# cd $(SRC) -# echo sp_levs done > $@ - -#$(DAT)/dungeon: $(HOST_O)utility.tag $(DAT)/dungeon.def -# $(U)makedefs -e -# cd $(DAT) -# $(U)dgn_comp dungeon.pdf -# cd $(SRC) - #========================================== # Housekeeping for host side. #========================================== diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 7a99be2b4..75b648541 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -11,9 +11,13 @@ # Makefile2 utilizes the djgpp cross-compiler from Andrew Wu: # https://github.com/andrewwutw/build-djgpp # -# In NetHack 3.7, the cross-compile for msdos can be used to -# build the entire game to a complete ms-dos package and -# result (from theory to achieved on Nov 22, 2019). +# Currently, in NetHack 3.7, it is now feasible to cross-compile +# the game in a 2-stage process. Makefile2.cross (this file) carries +# out the 2nd stage. +# +# A proof-of-concept to cross-compile NetHack 3.7 was achieved on +# November 22, 2019 using the msdos set of Makefiles. +# # # Game Installation Variables @@ -618,7 +622,7 @@ endif if [ -f $(DAT)/symbols ]; then cp $(DAT)/symbols $(GAMEDIR)/SYMBOLS; fi; if [ -f $(SSHR)/NetHack.cnf ]; then cp $(SSHR)/NetHack.cnf $(GAMEDIR)/NETHACK.CNF; fi; -touch $(GAMEDIR)/RECORD - if [ -f ../sys/winnt/sysconf ]; then cp ../sys/winnt/sysconf $(GAMEDIR)/SYSCONF; fi; + if [ -f ../sys/winnt/sysconf.template ]; then cp ../sys/winnt/sysconf.template $(GAMEDIR)/SYSCONF; fi; if [ -f $(DOC)/nethack.txt ]; then cp $(DOC)/nethack.txt $(GAMEDIR)/NETHACK.TXT; fi; # if [ -f $(PLANAR_TIB) ]; then cp $(PLANAR_TIB) $(GAMEDIR)/$(PLANAR_TIB^^); fi; # if [ -f $(OVERVIEW_TIB ]; then cp $(OVERVIEW_TIB) $(GAMEDIR)/$(OVERVIEW_TIB^^); fi; From b8a6d82c57b1e9407223c83ab719bd1fb674d9f8 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 00:11:26 -0500 Subject: [PATCH 295/529] attempt to avoid questpgr convert woes on cross-compile by making the int sizes fixed --- include/qtext.h | 17 ++++++++++++----- src/questpgr.c | 46 ++++++++++++++++++++++++++-------------------- util/makedefs.c | 27 ++++++++++++++++++++++++++- 3 files changed, 64 insertions(+), 26 deletions(-) diff --git a/include/qtext.h b/include/qtext.h index 29993d29a..efec908e9 100644 --- a/include/qtext.h +++ b/include/qtext.h @@ -5,14 +5,21 @@ #ifndef QTEXT_H #define QTEXT_H +#ifndef INTEGER_H +#include "integer.h" +#endif + #define N_HDR 16 /* Maximum number of categories */ /* (i.e., num roles + 1) */ #define LEN_HDR 3 /* Maximum length of a category name */ +#define QTOFFSIZ int64_t +#define QT_PREPROC 64 + struct qtmsg { - int msgnum; + int32_t msgnum; char delivery; - long offset, size, summary_size; + QTOFFSIZ offset, size, summary_size; }; #if defined(MAKEDEFS_C) || defined(MDLIB_C) /***** MAKEDEFS *****/ @@ -20,14 +27,14 @@ struct qtmsg { #define N_MSG 100 /* arbitrary */ struct msghdr { - int n_msg; + int32_t n_msg; struct qtmsg qt_msg[N_MSG]; }; struct qthdr { - int n_hdr; + int32_t n_hdr; char id[N_HDR][LEN_HDR]; - long offset[N_HDR]; + QTOFFSIZ offset[N_HDR]; }; /* Error message macros */ diff --git a/src/questpgr.c b/src/questpgr.c index f0cf6283f..0fb4ce259 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -16,21 +16,27 @@ #endif static void NDECL(dump_qtlist); -static void FDECL(Fread, (genericptr_t, int, int, dlb *)); -static struct qtmsg *FDECL(construct_qtlist, (long)); +static void FDECL(Fread, (genericptr_t, int32_t, int32_t, dlb *)); +static struct qtmsg *FDECL(construct_qtlist, (QTOFFSIZ)); static const char *NDECL(intermed); static struct obj *FDECL(find_qarti, (struct obj *)); static const char *NDECL(neminame); static const char *NDECL(guardname); static const char *NDECL(homebase); static void FDECL(qtext_pronoun, (CHAR_P, CHAR_P)); -static struct qtmsg *FDECL(msg_in, (struct qtmsg *, int)); +static struct qtmsg *FDECL(msg_in, (struct qtmsg *, int32_t)); static void FDECL(convert_arg, (CHAR_P)); static void FDECL(convert_line, (char *,char *)); static void FDECL(deliver_by_pline, (struct qtmsg *)); -static void FDECL(deliver_by_window, (struct qtmsg *, int)); +static void FDECL(deliver_by_window, (struct qtmsg *, int32_t)); static boolean FDECL(skip_pager, (BOOLEAN_P)); +#if (QT_PREPROC == 64) && defined(WIN32) +#define LONGCAST (long) +#else +#define LONGCAST +#endif + /* dump the character msg list to check appearance; build with DEBUG enabled and use DEBUGFILES=questpgr.c in sysconf file or environment */ @@ -44,7 +50,7 @@ dump_qtlist() return; for (msg = g.qt_list.chrole; msg->msgnum > 0; msg++) { - (void) dlb_fseek(g.msg_file, msg->offset, SEEK_SET); + (void) dlb_fseek(g.msg_file, LONGCAST msg->offset, SEEK_SET); deliver_by_window(msg, NHW_MAP); } #endif /* DEBUG */ @@ -54,7 +60,7 @@ dump_qtlist() static void Fread(ptr, size, nitems, stream) genericptr_t ptr; -int size, nitems; +int32_t size, nitems; dlb *stream; { int cnt; @@ -67,13 +73,13 @@ dlb *stream; static struct qtmsg * construct_qtlist(hdr_offset) -long hdr_offset; +QTOFFSIZ hdr_offset; { struct qtmsg *msg_list; - int n_msgs; + int32_t n_msgs; (void) dlb_fseek(g.msg_file, hdr_offset, SEEK_SET); - Fread(&n_msgs, sizeof(int), 1, g.msg_file); + Fread(&n_msgs, sizeof(int32_t), 1, g.msg_file); msg_list = (struct qtmsg *) alloc((unsigned) (n_msgs + 1) * sizeof (struct qtmsg)); @@ -83,16 +89,16 @@ long hdr_offset; Fread((genericptr_t) msg_list, n_msgs * sizeof (struct qtmsg), 1, g.msg_file); - msg_list[n_msgs].msgnum = -1; + msg_list[n_msgs].msgnum = (int32_t) -1; return msg_list; } void load_qtlist() { - int n_classes, i; + int32_t n_classes, i; char qt_classes[N_HDR][LEN_HDR]; - long qt_offsets[N_HDR]; + QTOFFSIZ qt_offsets[N_HDR]; g.msg_file = dlb_fopen(QTEXT_FILE, RDBMODE); if (!g.msg_file) @@ -103,9 +109,9 @@ load_qtlist() * each header. */ - Fread(&n_classes, sizeof (int), 1, g.msg_file); + Fread(&n_classes, sizeof (int32_t), 1, g.msg_file); Fread(&qt_classes[0][0], sizeof (char) * LEN_HDR, n_classes, g.msg_file); - Fread(qt_offsets, sizeof (long), n_classes, g.msg_file); + Fread(qt_offsets, sizeof (QTOFFSIZ), n_classes, g.msg_file); /* * Now construct the message lists for quick reference later @@ -307,7 +313,7 @@ char who, /* 'd' => deity, 'l' => leader, 'n' => nemesis, 'o' => artifact */ static struct qtmsg * msg_in(qtm_list, msgnum) struct qtmsg *qtm_list; -int msgnum; +int32_t msgnum; { struct qtmsg *qt_msg; @@ -522,9 +528,9 @@ struct qtmsg *qt_msg; static void deliver_by_window(qt_msg, how) struct qtmsg *qt_msg; -int how; +int32_t how; { - long size; + QTOFFSIZ size; char in_line[BUFSZ], out_line[BUFSZ]; boolean qtdump = (how == NHW_MAP); winid datawin = create_nhwindow(qtdump ? NHW_TEXT : how); @@ -542,7 +548,7 @@ int how; putstr(datawin, 0, ""); } #endif - for (size = 0; size < qt_msg->size; size += (long) strlen(in_line)) { + for (size = 0; size < qt_msg->size; size += (QTOFFSIZ) strlen(in_line)) { (void) dlb_fgets(in_line, sizeof in_line, g.msg_file); convert_line(in_line, out_line); putstr(datawin, 0, out_line); @@ -600,7 +606,7 @@ int msgnum; return; } - (void) dlb_fseek(g.msg_file, qt_msg->offset, SEEK_SET); + (void) dlb_fseek(g.msg_file, LONGCAST qt_msg->offset, SEEK_SET); if (qt_msg->delivery == 'p') deliver_by_pline(qt_msg); else if (msgnum == 1) @@ -635,7 +641,7 @@ int msgnum; return; } - (void) dlb_fseek(g.msg_file, qt_msg->offset, SEEK_SET); + (void) dlb_fseek(g.msg_file, LONGCAST qt_msg->offset, SEEK_SET); if (qt_msg->delivery == 'p' && strcmp(windowprocs.name, "X11")) deliver_by_pline(qt_msg); else diff --git a/util/makedefs.c b/util/makedefs.c index c6a7a8cb4..5dfd5a0cb 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -22,6 +22,7 @@ #include "context.h" #include "flag.h" #include "dlb.h" +#include "integer.h" /* version information */ #ifdef SHORT_FILENAMES @@ -2088,7 +2089,7 @@ static void adjust_qt_hdrs() { int i, j; - long count = 0L, hdr_offset = sizeof(int) + QTOFFSIZ count = 0L, hdr_offset = sizeof(int) + (sizeof(char) * LEN_HDR + sizeof(long)) * qt_hdr.n_hdr; @@ -2123,7 +2124,15 @@ put_qt_hdrs() qt_hdr.n_hdr, ofp); if (debug) { for (i = 0; i < qt_hdr.n_hdr; i++) +#if (QT_PREPROC == 64) +#ifdef WIN32 + Fprintf(stderr, "%s @ %I64d, ", qt_hdr.id[i], qt_hdr.offset[i]); +#else + Fprintf(stderr, "%s @ %I64ld, ", qt_hdr.id[i], qt_hdr.offset[i]); +#endif +#else Fprintf(stderr, "%s @ %ld, ", qt_hdr.id[i], qt_hdr.offset[i]); +#endif Fprintf(stderr, "\n"); } @@ -2142,12 +2151,28 @@ put_qt_hdrs() int j; for (j = 0; j < msg_hdr[i].n_msg; j++) { +#if (QT_PREPROC == 64) +#ifdef WIN32 + Fprintf(stderr, "msg %d @ %I64d (%I64d)", +#else + Fprintf(stderr, "msg %d @ %I64ld (%I64ld)", +#endif +#else Fprintf(stderr, "msg %d @ %ld (%ld)", +#endif msg_hdr[i].qt_msg[j].msgnum, msg_hdr[i].qt_msg[j].offset, msg_hdr[i].qt_msg[j].size); if (msg_hdr[i].qt_msg[j].summary_size) +#if (QT_PREPROC == 64) +#ifdef WIN32 + Fprintf(stderr, " [%I64d]", +#else + Fprintf(stderr, " [%I64ld]", +#endif +#else Fprintf(stderr, " [%ld]", +#endif msg_hdr[i].qt_msg[j].summary_size); Fprintf(stderr, "\n"); } From ac315adaf15a2fd74cff03b4917337d3ae7c5629 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 00:40:00 -0500 Subject: [PATCH 296/529] Revert "attempt to avoid questpgr convert woes on cross-compile by making the int sizes fixed" This reverts commit b8a6d82c57b1e9407223c83ab719bd1fb674d9f8. --- include/qtext.h | 17 +++++------------ src/questpgr.c | 46 ++++++++++++++++++++-------------------------- util/makedefs.c | 27 +-------------------------- 3 files changed, 26 insertions(+), 64 deletions(-) diff --git a/include/qtext.h b/include/qtext.h index efec908e9..29993d29a 100644 --- a/include/qtext.h +++ b/include/qtext.h @@ -5,21 +5,14 @@ #ifndef QTEXT_H #define QTEXT_H -#ifndef INTEGER_H -#include "integer.h" -#endif - #define N_HDR 16 /* Maximum number of categories */ /* (i.e., num roles + 1) */ #define LEN_HDR 3 /* Maximum length of a category name */ -#define QTOFFSIZ int64_t -#define QT_PREPROC 64 - struct qtmsg { - int32_t msgnum; + int msgnum; char delivery; - QTOFFSIZ offset, size, summary_size; + long offset, size, summary_size; }; #if defined(MAKEDEFS_C) || defined(MDLIB_C) /***** MAKEDEFS *****/ @@ -27,14 +20,14 @@ struct qtmsg { #define N_MSG 100 /* arbitrary */ struct msghdr { - int32_t n_msg; + int n_msg; struct qtmsg qt_msg[N_MSG]; }; struct qthdr { - int32_t n_hdr; + int n_hdr; char id[N_HDR][LEN_HDR]; - QTOFFSIZ offset[N_HDR]; + long offset[N_HDR]; }; /* Error message macros */ diff --git a/src/questpgr.c b/src/questpgr.c index 0fb4ce259..f0cf6283f 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -16,27 +16,21 @@ #endif static void NDECL(dump_qtlist); -static void FDECL(Fread, (genericptr_t, int32_t, int32_t, dlb *)); -static struct qtmsg *FDECL(construct_qtlist, (QTOFFSIZ)); +static void FDECL(Fread, (genericptr_t, int, int, dlb *)); +static struct qtmsg *FDECL(construct_qtlist, (long)); static const char *NDECL(intermed); static struct obj *FDECL(find_qarti, (struct obj *)); static const char *NDECL(neminame); static const char *NDECL(guardname); static const char *NDECL(homebase); static void FDECL(qtext_pronoun, (CHAR_P, CHAR_P)); -static struct qtmsg *FDECL(msg_in, (struct qtmsg *, int32_t)); +static struct qtmsg *FDECL(msg_in, (struct qtmsg *, int)); static void FDECL(convert_arg, (CHAR_P)); static void FDECL(convert_line, (char *,char *)); static void FDECL(deliver_by_pline, (struct qtmsg *)); -static void FDECL(deliver_by_window, (struct qtmsg *, int32_t)); +static void FDECL(deliver_by_window, (struct qtmsg *, int)); static boolean FDECL(skip_pager, (BOOLEAN_P)); -#if (QT_PREPROC == 64) && defined(WIN32) -#define LONGCAST (long) -#else -#define LONGCAST -#endif - /* dump the character msg list to check appearance; build with DEBUG enabled and use DEBUGFILES=questpgr.c in sysconf file or environment */ @@ -50,7 +44,7 @@ dump_qtlist() return; for (msg = g.qt_list.chrole; msg->msgnum > 0; msg++) { - (void) dlb_fseek(g.msg_file, LONGCAST msg->offset, SEEK_SET); + (void) dlb_fseek(g.msg_file, msg->offset, SEEK_SET); deliver_by_window(msg, NHW_MAP); } #endif /* DEBUG */ @@ -60,7 +54,7 @@ dump_qtlist() static void Fread(ptr, size, nitems, stream) genericptr_t ptr; -int32_t size, nitems; +int size, nitems; dlb *stream; { int cnt; @@ -73,13 +67,13 @@ dlb *stream; static struct qtmsg * construct_qtlist(hdr_offset) -QTOFFSIZ hdr_offset; +long hdr_offset; { struct qtmsg *msg_list; - int32_t n_msgs; + int n_msgs; (void) dlb_fseek(g.msg_file, hdr_offset, SEEK_SET); - Fread(&n_msgs, sizeof(int32_t), 1, g.msg_file); + Fread(&n_msgs, sizeof(int), 1, g.msg_file); msg_list = (struct qtmsg *) alloc((unsigned) (n_msgs + 1) * sizeof (struct qtmsg)); @@ -89,16 +83,16 @@ QTOFFSIZ hdr_offset; Fread((genericptr_t) msg_list, n_msgs * sizeof (struct qtmsg), 1, g.msg_file); - msg_list[n_msgs].msgnum = (int32_t) -1; + msg_list[n_msgs].msgnum = -1; return msg_list; } void load_qtlist() { - int32_t n_classes, i; + int n_classes, i; char qt_classes[N_HDR][LEN_HDR]; - QTOFFSIZ qt_offsets[N_HDR]; + long qt_offsets[N_HDR]; g.msg_file = dlb_fopen(QTEXT_FILE, RDBMODE); if (!g.msg_file) @@ -109,9 +103,9 @@ load_qtlist() * each header. */ - Fread(&n_classes, sizeof (int32_t), 1, g.msg_file); + Fread(&n_classes, sizeof (int), 1, g.msg_file); Fread(&qt_classes[0][0], sizeof (char) * LEN_HDR, n_classes, g.msg_file); - Fread(qt_offsets, sizeof (QTOFFSIZ), n_classes, g.msg_file); + Fread(qt_offsets, sizeof (long), n_classes, g.msg_file); /* * Now construct the message lists for quick reference later @@ -313,7 +307,7 @@ char who, /* 'd' => deity, 'l' => leader, 'n' => nemesis, 'o' => artifact */ static struct qtmsg * msg_in(qtm_list, msgnum) struct qtmsg *qtm_list; -int32_t msgnum; +int msgnum; { struct qtmsg *qt_msg; @@ -528,9 +522,9 @@ struct qtmsg *qt_msg; static void deliver_by_window(qt_msg, how) struct qtmsg *qt_msg; -int32_t how; +int how; { - QTOFFSIZ size; + long size; char in_line[BUFSZ], out_line[BUFSZ]; boolean qtdump = (how == NHW_MAP); winid datawin = create_nhwindow(qtdump ? NHW_TEXT : how); @@ -548,7 +542,7 @@ int32_t how; putstr(datawin, 0, ""); } #endif - for (size = 0; size < qt_msg->size; size += (QTOFFSIZ) strlen(in_line)) { + for (size = 0; size < qt_msg->size; size += (long) strlen(in_line)) { (void) dlb_fgets(in_line, sizeof in_line, g.msg_file); convert_line(in_line, out_line); putstr(datawin, 0, out_line); @@ -606,7 +600,7 @@ int msgnum; return; } - (void) dlb_fseek(g.msg_file, LONGCAST qt_msg->offset, SEEK_SET); + (void) dlb_fseek(g.msg_file, qt_msg->offset, SEEK_SET); if (qt_msg->delivery == 'p') deliver_by_pline(qt_msg); else if (msgnum == 1) @@ -641,7 +635,7 @@ int msgnum; return; } - (void) dlb_fseek(g.msg_file, LONGCAST qt_msg->offset, SEEK_SET); + (void) dlb_fseek(g.msg_file, qt_msg->offset, SEEK_SET); if (qt_msg->delivery == 'p' && strcmp(windowprocs.name, "X11")) deliver_by_pline(qt_msg); else diff --git a/util/makedefs.c b/util/makedefs.c index 5dfd5a0cb..c6a7a8cb4 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -22,7 +22,6 @@ #include "context.h" #include "flag.h" #include "dlb.h" -#include "integer.h" /* version information */ #ifdef SHORT_FILENAMES @@ -2089,7 +2088,7 @@ static void adjust_qt_hdrs() { int i, j; - QTOFFSIZ count = 0L, hdr_offset = sizeof(int) + long count = 0L, hdr_offset = sizeof(int) + (sizeof(char) * LEN_HDR + sizeof(long)) * qt_hdr.n_hdr; @@ -2124,15 +2123,7 @@ put_qt_hdrs() qt_hdr.n_hdr, ofp); if (debug) { for (i = 0; i < qt_hdr.n_hdr; i++) -#if (QT_PREPROC == 64) -#ifdef WIN32 - Fprintf(stderr, "%s @ %I64d, ", qt_hdr.id[i], qt_hdr.offset[i]); -#else - Fprintf(stderr, "%s @ %I64ld, ", qt_hdr.id[i], qt_hdr.offset[i]); -#endif -#else Fprintf(stderr, "%s @ %ld, ", qt_hdr.id[i], qt_hdr.offset[i]); -#endif Fprintf(stderr, "\n"); } @@ -2151,28 +2142,12 @@ put_qt_hdrs() int j; for (j = 0; j < msg_hdr[i].n_msg; j++) { -#if (QT_PREPROC == 64) -#ifdef WIN32 - Fprintf(stderr, "msg %d @ %I64d (%I64d)", -#else - Fprintf(stderr, "msg %d @ %I64ld (%I64ld)", -#endif -#else Fprintf(stderr, "msg %d @ %ld (%ld)", -#endif msg_hdr[i].qt_msg[j].msgnum, msg_hdr[i].qt_msg[j].offset, msg_hdr[i].qt_msg[j].size); if (msg_hdr[i].qt_msg[j].summary_size) -#if (QT_PREPROC == 64) -#ifdef WIN32 - Fprintf(stderr, " [%I64d]", -#else - Fprintf(stderr, " [%I64ld]", -#endif -#else Fprintf(stderr, " [%ld]", -#endif msg_hdr[i].qt_msg[j].summary_size); Fprintf(stderr, "\n"); } From 8b87013fba25e6a9e3acab24edcb9fd87ebdf4d9 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 24 Nov 2019 17:41:39 +0200 Subject: [PATCH 297/529] Move quest texts to lua --- dat/quest.lua | 3047 +++++++++++++++++++++++++++++++++++ dat/quest.txt | 3521 ----------------------------------------- include/extern.h | 4 +- src/allmain.c | 3 +- src/do.c | 4 +- src/quest.c | 62 +- src/questpgr.c | 333 ++-- src/restore.c | 1 - src/save.c | 1 - src/wizard.c | 7 +- sys/unix/Makefile.dat | 5 +- sys/unix/Makefile.top | 8 +- 12 files changed, 3204 insertions(+), 3792 deletions(-) create mode 100644 dat/quest.lua delete mode 100644 dat/quest.txt diff --git a/dat/quest.lua b/dat/quest.lua new file mode 100644 index 000000000..a31d3f326 --- /dev/null +++ b/dat/quest.lua @@ -0,0 +1,3047 @@ + +-- TODO: +-- - output = "verbalize" +-- - export the quest string replacements to lua, instead of %H etc +-- - allow checking if hero is carrying item (see comments for %Cp Arc 00042) +-- - fold quest_portal, quest_portal_again, quest_portal_demand into one +-- - some roles have no goal_alt, fold into goal_next? +-- - qt_pager hack(?): if (qt_msg->delivery == 'p' && strcmp(windowprocs.name, "X11")) + + + + +-- text = "something" +-- Text is shown to the user. + +-- synopsis = "something" +-- Synopsis is inserted into the message history. +-- +-- output = "pline" | "menu" | "text" +-- The output can be manually set by using output = "menu" +-- Valid values for output are "pline", "text", and "menu, defaulting to +-- pline, unless the text contains newlines, or is too long to fit a message buffer, +-- then will be shown as a text window instead. + + + +questtext = { + common = { + TEST_PATTERN = { + output = "text", + text = [[%p: return(plname); + %c: return(pl_character); + %r: return((char *)rank_of(u.ulevel)); + %R: return((char *)rank_of(MIN_QUEST_LEVEL)); + %s: return((flags.female) ? "sister" : "brother" ); + %S: return((flags.female) ? "daughter" : "son" ); + %l: return((char *)ldrname()); + %i: return(intermed()); + %o: return(artiname()); + %O: return(shortened(artiname())); + %n: return((char *)neminame()); + %g: return((char *)guardname()); + %G: return((char *)align_gtitle(u.ualignbase[1])); + %H: return((char *)homebase()); + %a: return(Alignnam(u.ualignbase[1])); + %A: return(Alignnam(u.ualign.type)); + %d: return((char *)align_gname(u.ualignbase[1])); + %D: return((char *)align_gname(A_LAWFUL)); + %C: return("chaotic"); + %N: return("neutral"); + %L: return("lawful"); + %x: return((Blind) ? "sense" : "see"); + %Z: return("The Dungeons of Doom"); + %%: return(percent_sign); + a suffix: return an(root); + A suffix: return An(root); + C suffix: return capitalized(root); + h suffix: return pronoun(he_or_she, mon_of(root)); /* for %l,%n,%d,%o */ + H suffix: return capitalized(pronoun(he_or_she, mon_of(root))); + i suffix: return pronoun(him_or_her, mon_of(root)); + I suffix: return capitalized(pronoun(him_or_her, mon_of(root))); + j suffix: return pronoun(his_or_her, mon_of(root)); + J suffix: return capitalized(pronoun(his_or_her, mon_of(root))); + p suffix: return makeplural(root); + P suffix: return makeplural(capitalized(root)); + s suffix: return s_suffix(root); + S suffix: return s_suffix(capitalized(root)); + t suffix: return strip_the_prefix(root);]], + }, + angel_cuss = { + "\"Repent, and thou shalt be saved!\"", + "\"Thou shalt pay for thine insolence!\"", + "\"Very soon, my child, thou shalt meet thy maker.\"", + "\"The great %D has sent me to make you pay for your sins!\"", + "\"The wrath of %D is now upon you!\"", + "\"Thy life belongs to %D now!\"", + "\"Dost thou wish to receive thy final blessing?\"", + "\"Thou art but a godless void.\"", + "\"Thou art not worthy to seek the Amulet.\"", + "\"No one expects the Spanish Inquisition!\"", + }, + banished = { + synopsis = "[You are banished from %H for betraying your allegiance to %d.]", + output = "text", + text = [["You have betrayed all those who hold allegiance to %d, as you once did. +My allegiance to %d holds fast and I cannot condone or accept what you +have done. + +Leave this place. You shall never set foot at %H again. +That which you seek is now lost forever, for without the Bell of Opening, +you will never be able to enter the place where he who has the Amulet +resides. + +Go now! You are banished from this place.]], + }, + demon_cuss = { + "\"I first mistook thee for a statue, when I regarded thy head of stone.\"", + "\"Come here often?\"", + "\"Doth pain excite thee? Wouldst thou prefer the whip?\"", + "\"Thinkest thou it shall tickle as I rip out thy lungs?\"", + "\"Eat slime and die!\"", + "\"Go ahead, fetch thy mama! I shall wait.\"", + "\"Go play leapfrog with a herd of unicorns!\"", + "\"Hast thou been drinking, or art thou always so clumsy?\"", + "\"This time I shall let thee off with a spanking, but let it not happen again.\"", + "\"I've met smarter (and prettier) acid blobs.\"", + "\"Look! Thy bootlace is undone!\"", + "\"Mercy! Dost thou wish me to die of laughter?\"", + "\"Run away! Live to flee another day!\"", + "\"Thou hadst best fight better than thou canst dress!\"", + "\"Twixt thy cousin and thee, Medusa is the prettier.\"", + "\"Methinks thou wert unnaturally stirred by yon corpse back there, eh, varlet?\"", + "\"Up thy nose with a rubber hose!\"", + "\"Verily, thy corpse could not smell worse!\"", + "\"Wait! I shall polymorph into a grid bug to give thee a fighting chance!\"", + "\"Why search for the Amulet? Thou wouldst but lose it, cretin.\"", + }, + legacy = { + synopsis = "[%dC has chosen you to recover the Amulet of Yendor for %dI.]", + output = "menu", + text = [[It is written in the Book of %d: + + After the Creation, the cruel god Moloch rebelled + against the authority of Marduk the Creator. + Moloch stole from Marduk the most powerful of all + the artifacts of the gods, the Amulet of Yendor, + and he hid it in the dark cavities of Gehennom, the + Under World, where he now lurks, and bides his time. + +Your %G %d seeks to possess the Amulet, and with it +to gain deserved ascendance over the other gods. + +You, a newly trained %r, have been heralded +from birth as the instrument of %d. You are destined +to recover the Amulet for your deity, or die in the +attempt. Your hour of destiny has come. For the sake +of us all: Go bravely with %d!]], + }, + quest_complete_no_bell = { + text = [["The silver bell which was hoarded by %n will be +essential in locating the Amulet of Yendor."]], + }, + quest_portal = { + text = [[You receive a faint telepathic message from %l: +Your help is urgently needed at %H! +Look for a ...ic transporter. +You couldn't quite make out that last message.]], + }, + quest_portal_again = { + text = "You again sense %l pleading for help.", + }, + quest_portal_demand = { + text = "You again sense %l demanding your attendance.", + }, + }, + Arc = { + assignquest = { + synopsis = "[%nC has stolen %o. Locate %i, defeat %ni, and return %O.]", + output = "text", + text = [["Grave times have befallen the college, for %na has +stolen %o. Without it, the board of directors of +the university will soon have no choice but to revoke our research grants. + +"You must locate the entrance to %i. Within it, +you will find %n. + +"You must then defeat %n and return %o +to me. + +"Only in this way will we be able to prevent the budget cuts that could +close this college. + +"May the wisdom of %d be your guide."]], + }, + badalign = { + synopsis = "[\"%pC, you have strayed from the %a path. Purify yourself!\"]", + output = "text", + text = [["%pC! I've heard that you've been using sloppy techniques. Your +results lately can hardly be called suitable for %ra! + +"How could you have strayed from the %a path? Go from here, and come +back only when you have purified yourself."]], + }, + badlevel = { + synopsis = "[%pC, a mere %r is too inexperienced.]", + output = "text", + text = [["%p, you are yet too inexperienced to undertake such a demanding +quest. A mere %r could not possibly face the rigors demanded and +survive. Go forth, and come here again when your adventures have further +taught you."]], + }, + discourage = { + "\"Try your best, %p. You cannot defeat me.\"", + "\"I shall rend the flesh from your body whilst you still breathe!\"", + "\"First you, %p, then I shall destroy your mentor, %l.\"", + "\"Tiring yet, %p? I draw my power from my master and cannot falter!\"", + "\"I shall rend thy soul from thy body and consume it!\"", + "\"You are far too %a -- it weakens you. You shall die in this place.\"", + "\"%d has forsaken you! You are lost now!\"", + "\"A mere %r cannot hope to defeat me!\"", + "\"If you are the best %l can send, I have nothing to fear.\"", + "\"Die %c! I shall exhibit your carcass as a trophy.\"", + }, + encourage = { + "\"Beware, for %n is powerful and cunning.\"", + "\"To locate the entrance to %i, you must pass many traps.\"", + "\"A %nt may be vulnerable to attacks by magical cold.\"", + "\"Call upon %d when you encounter %n.\"", + "\"You must destroy %n. It will pursue you otherwise.\"", + "\"%oC is a mighty talisman. With it you can destroy %n.\"", + "\"Go forth with the blessings of %d.\"", + "\"I will have my %gP watch for your return.\"", + "\"Remember not to stray from the true %a path.\"", + "\"You may be able to sense %o when you are near.\"", + }, + firsttime = { + synopsis = "[You arrive at %H, but all is not well.]", + output = "menu", + text = [[You are suddenly in familiar surroundings. The buildings in the distance +seem to be those of your old alma mater, but something is wrong. It feels +as if there has been a riot recently, or %H has +been under siege. + +All of the windows are boarded up, and there are objects scattered around +the entrance. + +Strange forbidding shapes seem to be moving in the distance.]], + }, + goal_alt = { + text = "The have returned to %ns lair.", + }, + goal_first = { + synopsis = "[This strange feeling must be the presence of %o.]", + output = "text", + text = [[A strange feeling washes over you, and you think back to things you +learned during the many lectures of %l. + +You realize the feeling must be the presence of %o.]], + }, + goal_next = { + text = "The familiar presence of %o is in the ether.", + }, + gotit = { + synopsis = "[The power of %o flows through your body! You must return it to %l.]", + output = "text", + text = [[The power of %o flows through your body! You feel +as if you could now take on the Wizard of Yendor himself and win, but +you know you must return %o to %l.]], + }, + guardtalk_after = { + "\"Did you see Lash LaRue in 'Song of Old Wyoming' the other night?\"", + "\"Hey man, got any potions of hallucination for sale?\"", + "\"I guess you are guaranteed to make full professor now.\"", + "\"So, what was worse, %n or your entrance exams?\"", + "\"%oC is impressive, but nothing like the bones I dug up!\"", + }, + guardtalk_before = { + "\"Did you see Lash LaRue in 'Song of Old Wyoming' the other night?\"", + "\"Hey man, got any potions of hallucination for sale?\"", + "\"Did you see the artifact %l brought back from the last dig?\"", + "\"So what species do *you* think we evolved from?\"", + "\"So you're %ls prize pupil! I don't know what he sees in you.\"", + }, + hasamulet = { + synopsis = "[Take the Amulet to the Astral Plane and sacrifice it at the altar of %d.]", + output = "text", + text = [["Congratulations, %p. I wondered if anyone could prevail against +the Wizard and the minions of Moloch. Now, you must embark on one +final adventure. + +"Take the Amulet, and find your way onto the Astral Plane. +There you must find the altar of %d and sacrifice the +Amulet on that altar to fulfill your destiny. + +"Remember, your path now should always be upwards."]], + }, + killed_nemesis = { + text = "The body of %n dissipates in a cloud of noxious fumes.", + }, + leader_first = { + synopsis = "[\"You have returned, %p, to a difficult task.\"]", + output = "text", + text = [["Finally you have returned, %p. You were always +my most promising student. Allow me to see if you are ready for the +most difficult task of your career."]], + }, + leader_last = { + synopsis = "[\"%pC, you have failed us. Begone!\"]", + output = "text", + text = [["%p, you have failed us. All of my careful training has been in +vain. Begone! Your tenure at this college has been revoked! + +"You are a disgrace to the profession!"]], + }, + leader_next = { + text = [["Again, %p, you stand before me. +Let me see if you have gained experience in the interim."]], + }, + leader_other = { + text = [["Once more, %p, you have returned from the field. +Are you finally ready for the task that must be accomplished?"]], + }, + locate_first = { + synopsis = "[This foreboding edifice must hide the entrance to %i.]", + output = "text", + text = [[A plain opens before you. Beyond the plain lies a foreboding edifice. + +You have the feeling that you will soon find the entrance to +%i.]], + }, + locate_next = { + text = "Once again, you are near the entrance to %i.", + }, + nemesis_first = { + synopsis = "[\"Come, %p, I shall destroy you!\"]", + output = "text", + text = [["So, %p, you think that you can succeed in recovering +%o, when your teacher, %l, has already failed. + +"Come, try your best! I shall destroy you, and gnaw on your bones."]], + }, + nemesis_next = { + synopsis = "[\"Again you try to best me, %p? You shall never recover %o.\"]", + output = "text", + text = [["Again you try to best me, eh %p? Well, you shall fail again. + +"You shall never recover %o. + +"I shall bear your soul to the Plane of Origins for my master's pleasure."]], + }, + nemesis_other = { + text = "\"You persist yet %p! Good. Now, you shall die!\"", + }, + nemesis_wantsit = { + text = [["I shall have %o from you, %p, then feast +upon your entrails!"]], + }, + nexttime = { + text = "Once again, you are back at %H.", + }, + offeredit = { + synopsis = "[%lC instructs you to guard %o from now on.]", + output = "text", + text = [[%lC touches %o briefly, gazes into it, +then smiles at you and says: + +"Well done, %p. You have defeated %n and +recovered %o. But I fear that it shall never be safe +here. + +Please take %o with you. You, %p, can +guard it now far better than I. + +May the blessings of %d follow you and guard you."]], + }, + offeredit2 = { + synopsis = "[\"Resume your search for the Amulet beyond the magic portal to %Z.\"]", + output = "text", + text = [["Careful, %p! %oC might break, and that would be +a tragic loss. You are its keeper now, and the time has come to +resume your search for the Amulet. %Z await your +return through the magic portal that brought you here."]], + }, + othertime = { + text = [[You are back at %H. +You have an odd feeling this may be the last time you ever come here.]], + }, + posthanks = { + synopsis = "[\"Have you progressed with your quest to regain the Amulet of Yendor for %d?\"]", + output = "text", + text = [["Welcome back, %p. Have you progressed with your quest to +regain the Amulet of Yendor for %d?"]], + }, + }, + Bar = { + assignquest = { + synopsis = "[\"Find %n, defeat %ni, and return %o to us.\"]", + output = "text", + text = [["The world is in great need of your assistance, %p. + +"About six months ago, I learned that a mysterious sorcerer, known +as %n, had begun to gather a large group of cutthroats and brigands +about %ni. + +"At about the same time, these people you once rode with `liberated' a +potent magical talisman, %o, from a Turanian caravan. + +"%nC and %nj Black Horde swept down upon %i and defeated +the people there, driving them out into the desert. He has taken +%o, and seeks to bend it to %nj will. I detected the +subtle changes in the currents of fate, and joined these people. +Then I sent forth a summons for you. + +"If %n can bend %o to %nj will, he will become +almost indestructible. He will then be able to enslave the minds of +men across the world. You are the only hope. The gods smile upon you, +and with %d behind you, you alone can defeat %n. + +"You must go to %i. From there, you can track down +%n, defeat %ni, and return %o to us. Only +then will the world be safe."]], + }, + badalign = { + synopsis = "[\"You have wandered from the path of the %a. Come back when you have atoned.\"]", + output = "text", + text = [["%pC! You have wandered from the path of the %a! +If you attempt to overcome %n in this state, he will surely +enslave your soul. Your only hope, and ours, lies in your purification. +Go forth, and return when you feel ready."]], + }, + badlevel = { + synopsis = "[\"You are too inexperienced. Come back when you are %Ra.\"]", + output = "text", + text = [["%p, I fear that you are as yet too inexperienced to face +%n. Only %Ra with the help of %d could ever hope to +defeat %ni."]], + }, + discourage = { + "\"My pets will dine on your carcass tonight!\"", + "\"You are a sorry excuse for %ra.\"", + "\"Run while you can, %c. My next spell will be your last.\"", + "\"I shall use your very skin to bind my next grimoire.\"", + "\"%d cannot protect you now. Here, you die.\"", + "\"Your %a nature makes you weak. You cannot defeat me.\"", + "\"Come, %c. I shall kill you, then unleash the horde on your tribe.\"", + "\"Once you are dead, my horde shall finish off %l, and your tribe.\"", + "\"Fight, %c, or are you afraid of the mighty %n?\"", + "\"You have failed, %c. Now, my victory is complete.\"", + }, + encourage = { + "\"%nC is strong in the dark arts, but not immune to cold steel.\"", + "\"Remember that %n is a great sorcerer. He lived in the time of Atlantis.\"", + "\"If you fail, %p, I will not be able to protect these people long.\"", + "\"To enter %i, you must be very stealthy. The horde will be on guard.\"", + "\"Call upon %d in your time of need.\"", + "\"May %d protect you, and guide your steps.\"", + "\"If you can lay hands upon %o, carry it for good fortune.\"", + "\"I cannot stand against %ns sorcery. But %d will help you.\"", + "\"Do not fear %n. I know you can defeat %ni.\"", + "\"You have a great road to travel, %p, but only after you defeat %n.\"", + }, + firsttime = { + synopsis = "[You reach the vicinity of %H, but sense evil magic nearby.]", + output = "menu", + text = [[Warily you scan your surroundings, all of your senses alert for signs +of possible danger. Off in the distance, you can %x the familiar shapes +of %H. + +But why, you think, should %l be there? + +Suddenly, the hairs on your neck stand on end as you detect the aura of +evil magic in the air. + +Without thought, you ready your weapon, and mutter under your breath: + + "By %d, there will be blood spilt today."]], + }, + goal_first = { + synopsis = "[This is surely the lair of %n.]", + output = "text", + text = [[The hairs on the nape of your neck lift as you sense an energy in the +very air around you. You fight down a primordial panic that seeks to +make you turn and run. This is surely the lair of %n.]], + }, + goal_next = { + text = "Yet again you feel the air around you heavy with malevolent magical energy.", + }, + gotit = { + synopsis = "[You feel the power of %o flowing through your hands.]", + output = "text", + text = [[As you pick up %o, you feel the power of it +flowing through your hands. It seems to be in two or more places +at once, even though you are holding it.]], + }, + guardtalk_after = { + "\"The battles here have been good -- our enemies' blood soaks the soil!\"", + "\"Remember that glory is crushing your enemies beneath your feet!\"", + "\"Times will be good again, now that the horde is vanquished.\"", + "\"You have brought our clan much honor in defeating %n.\"", + "\"You will be a worthy successor to %l.\"", + }, + guardtalk_before = { + "\"The battles here have been good -- our enemies' blood soaks the soil!\"", + "\"Remember that glory is crushing your enemies beneath your feet!\"", + "\"There has been little treasure to loot, since the horde arrived.\"", + "\"The horde is mighty in numbers, but they have little courage.\"", + "\"%lC is a strange one, but he has helped defend us.\"", + }, + hasamulet = { + synopsis = "[\"Take the Amulet to the altar of %d on the Astral Plane and offer it.\"]", + output = "text", + text = [["This is wondrous, %p. I feared that you could not possibly +succeed in your quest, but here you are in possession of the Amulet +of Yendor! + +"I have studied the texts of the magi constantly since you left. In +the Book of Skelos, I found this: + + %d will cause a child to be sent into the world. This child is to + be made strong by trial of battle and magic, for %d has willed it so. + It is said that the child of %d will recover the Amulet of Yendor + that was stolen from the Creator at the beginning of time. + +"As you now possess the amulet, %p, I suspect that the Book +speaks of you. + + The child of %d will take the Amulet, and travel to the Astral + Plane, where the Great Temple of %d is to be found. The Amulet + will be sacrificed to %d, there on %dJ altar. Then the child will + stand by %d as champion of all %cP for eternity. + +"This is all I know, %p. I hope it will help you."]], + }, + killed_nemesis = { + synopsis = "[%nC curses you, but you feel the overpowering aura of magic fading.]", + output = "text", + text = [[%nC falls to the ground, and utters a last curse at you. Then %nj +body fades slowly, seemingly dispersing into the air around you. You +slowly become aware that the overpowering aura of magic in the air has +begun to fade.]], + }, + leader_first = { + synopsis = "[\"At last you have returned. There is a great quest you must undertake.\"]", + output = "text", + text = [["Ah, %p. You have returned at last. The world is in dire +need of your help. There is a great quest you must undertake. + +"But first, I must see if you are ready to take on such a challenge."]], + }, + leader_last = { + synopsis = "[\"You have betrayed %d; soon %n will destroy us. Begone!\"]", + output = "text", + text = [["Pah! You have betrayed the gods, %p. You will never attain +the glory which you aspire to. Your failure to follow the true path has +closed this future to you. + +"I will protect these people as best I can, but soon %n will overcome +me and destroy all who once called you %s. Now begone!"]], + }, + leader_next = { + text = "\"%p, you are back. Are you ready now for the challenge?\"", + }, + leader_other = { + text = "\"Again, you stand before me, %p. Surely you have prepared yourself.\"", + }, + locate_first = { + synopsis = "[You have located %i.]", + output = "text", + text = [[The scent of water comes to you in the desert breeze. You know that +you have located %i.]], + }, + locate_next = { + text = "Yet again you have a chance to infiltrate %i.", + }, + nemesis_first = { + synopsis = "[%nC boasts that %nh has slain many. \"Prepare to die, %c.\"]", + output = "text", + text = [["So. This is what that second rate sorcerer %l sends to do %lj bidding. +I have slain many before you. You shall give me little sport. + +"Prepare to die, %c."]], + }, + nemesis_next = { + text = "\"I have wasted too much time on you already. Now, you shall die.\"", + }, + nemesis_other = { + text = "\"You return yet again, %c! Are you prepared for death now?\"", + }, + nemesis_wantsit = { + text = [["I shall have %o back, you pitiful excuse for %ca. +And your life as well."]], + }, + nexttime = { + text = [[Once again, you near %H. You know that %l +will be waiting.]], + }, + offeredit = { + synopsis = "[%lC tells you to guard %o, and to return when you have triumphed.]", + output = "text", + text = [[When %l sees %o, he smiles, and says: + + Well done, %p. You have saved the world from certain doom. + What, now, should be done with %o? + + These people, brave as they are, cannot hope to guard it from + other sorcerers who will detect it, as surely as %n did. + + Take %o with you, %p. It will guard you in + your adventures, and you can best guard it. You embark on a + quest far greater than you realize. + + Remember me, %p, and return when you have triumphed. I + will tell you then of what you must do. You will understand when the + time comes.]], + }, + offeredit2 = { + synopsis = "[\"You keep %o. Return to %Z to search for the Amulet.\"]", + output = "text", + text = [[%l gazes reverently at %o, then back at you. + +"You are its keeper now, and the time has come to resume your search +for the Amulet. %Z await your return through the +magic portal which brought you here."]], + }, + othertime = { + text = [[Again, and you think possibly for the last time, you approach +%H.]], + }, + posthanks = { + text = "\"Tell us, %p, have you fared well on your great quest?\"", + }, + }, + Cav = { + assignquest = { + synopsis = "[Find and defeat %n, recover %o, and return with it.]", + output = "text", + text = [["You are indeed ready now, %p. I shall tell you a tale of +great suffering among your people: + +"Shortly after you left on your vision quest, the caves were invaded by +the creatures sent against us by %n. + +"She, herself, could not attack us due to her great size, but her minions +have harassed us ever since. In the first attacks, many died, and the +minions of %n managed to steal %o. +They took it to %i and there, none of our +%g warriors have been able to go. + +"You must find %i, and within it wrest +%o from %n. She guards it as +jealously as she guards all treasures she attains. But with it, +we can make our caves safe once more. + +"Please, %p, recover %o for us, and return it here."]], + }, + badalign = { + synopsis = "[\"You no longer follow the path of the %a. Go, and purify yourself.\"]", + output = "text", + text = [["%pC! You have deviated from my teachings. You no longer follow +the path of the %a as you should. I banish you from these caves, to +go forth and purify yourself. Then, you might be able to accomplish this +quest."]], + }, + badlevel = { + synopsis = "[\"%rA is too inexperienced. Come back when you have progressed.\"]", + output = "text", + text = [["Alas, %p, you are as yet too inexperienced to embark upon such +a difficult quest as that I propose to give you. + +"%rA could not possibly survive the rigors demanded to find +%i, never mind to confront %n herself. + +"Adventure some more, and you will learn the skills you will require. +%d decrees it."]], + }, + discourage = { + "\"You are weak, %c. No challenge for the Mother of all Dragons.\"", + "\"I grow hungry, %r. You look like a nice appetizer!\"", + "\"Join me for lunch? You're the main course, %c.\"", + "\"With %o, I am invincible! You cannot succeed.\"", + "\"Your mentor, %l has failed. You are nothing to fear.\"", + "\"You shall die here, %c. %rA cannot hope to defeat me.\"", + "\"You, a mere %r challenge the might of %n? Hah!\"", + "\"I am the Mother of all Dragons! You cannot hope to defeat me.\"", + "\"My claws are sharp now. I shall rip you to shreds!\"", + "\"%d has deserted you, %c. This is my domain.\"", + }, + encourage = { + "\"%nC is immune to her own breath weapons. You should use magic upon her that she does not use herself.\"", + "\"When you encounter %n, call upon %d for assistance.\"", + "\"There will be nowhere to hide inside %ns inner sanctum.\"", + "\"Your best chance with %n will be to keep moving.\"", + "\"Do not be distracted by the great treasures in %ns lair. Concentrate on %o.\"", + "\"%oC is the only object that %n truly fears.\"", + "\"Do not be fooled by %ns size. She is fast, and it is rumored that she uses magic.\"", + "\"I would send a party of %gP with you, but we will need all of our strength to defend ourselves.\"", + "\"Remember, be %a at all times. This is your strength.\"", + "\"If only we had an amulet of reflection, this would not have happened.\"", + }, + firsttime = { + synopsis = "[You arrive back at %H, but something is wrong here.]", + output = "menu", + text = [[You descend through a barely familiar stairwell that you remember +%l showing you when you embarked upon your vision quest. + +You arrive back at %H, but something seems +wrong here. The usual smoke and glowing light of the fires of the +outer caves are absent, and an uneasy quiet fills the damp air.]], + }, + goal_first = { + synopsis = "[You enter a large cavern. %nC is present.]", + output = "text", + text = [[You find yourself in a large cavern, with neatly polished walls, that +nevertheless show signs of being scorched by fire. + +Bones litter the floor, and there are objects scattered everywhere. +The air is close with the stench of sulphurous fumes. + +%nC is clearly visible, but %nh seems to be asleep.]], + }, + goal_next = { + text = "Once again, you find yourself in the lair of %n.", + }, + gotit = { + synopsis = "[%oC fills you with a feeling of power.]", + output = "text", + text = [[As you pick up %o it seems heavy at first, but as you +hold it strength flows into your arms. + +You suddenly feel full of power, as if nothing could possibly stand +in your path.]], + }, + guardtalk_after = { + "\"The rains have returned and the land grows lush again.\"", + "\"Peace has returned, give thanks to %d!\"", + "\"Welcome back! Did you find %o?\"", + "\"So, %p, tell us the story of your fight with %n.\"", + "\"%lC grows old. Perhaps you will guide us after he ascends.\"", + }, + guardtalk_before = { + "\"We have not been able to gather as much food since the Giants sealed off our access to the outer world.\"", + "\"Since %n sent her minions, we have been constantly fighting.\"", + "\"I have heard your vision quest was successful. Is this so?\"", + "\"So, tell me, %p, how have you fared?\"", + "\"%lC grows old. We know not who will guide us after he ascends.\"", + }, + hasamulet = { + synopsis = "[\"Take the Amulet to the altar of %d on the Astral Plane and offer it.\"]", + output = "text", + text = [["You have been successful, I see, %p. + +"Now that the Amulet of Yendor is yours, here is what you must do: + +"Journey upwards to the open air. The Amulet you carry will then +take you into the Astral Planes, where the Great Temple of %d +casts its influence throughout our world. + +"Sacrifice the Amulet on the altar. Thus shall %d become supreme!"]], + }, + killed_nemesis = { + text = [[%nC sinks to the ground, her heads flailing about. +As she dies, a cloud of noxious fumes billows about her.]], + }, + leader_first = { + synopsis = "[\"You have returned. We are in dire need of your help.\"]", + output = "text", + text = [["You have returned from your vision quest, %p. Thank %d. + +"We are in dire need of your help, my %S. + +"But first, I must see if you are yet capable of the quest I would +ask you to undertake."]], + }, + leader_last = { + synopsis = "[\"You have betrayed the %L. Begone!\"]", + output = "text", + text = [["%pC! You have sealed our fate. You seem unable to reform yourself, +so I must select another to take your place. + +"Begone from %H! You have betrayed us by choosing +the path of the %C over the true path of the %L. + +"You no longer live in our eyes."]], + }, + leader_next = { + text = "\"Again, you return to us, %p. Let me see if you are ready now.\"", + }, + leader_other = { + text = "\"Ah, %p. Are you finally ready?\"", + }, + locate_first = { + synopsis = "[You %x many large claw marks, smell carrion, and notice bones.]", + output = "text", + text = [[You %x many large claw marks on the ground. The tunnels ahead +of you are larger than most of those in any cave complex you have +ever been in before. + +Your nose detects the smell of carrion from within, and bones litter +the sides of the tunnels.]], + }, + locate_next = { + text = "Once again, you approach %i.", + }, + nemesis_first = { + synopsis = "[%nC threatens to eat you.]", + output = "text", + text = [["So, follower of %l, you seek to invade the lair of +%n. Only my meals are allowed down here. Prepare +to be eaten!"]], + }, + nemesis_next = { + text = [["So, again you face me, %c. No one has ever before escaped me. +Now I shall kill you."]], + }, + nemesis_other = { + text = "\"You are getting annoying, %c. Prepare to die.\"", + }, + nemesis_wantsit = { + text = "\"I'll have %o from you, %c. You shall die.\"", + }, + nexttime = { + text = "Once again, you arrive back at %H.", + }, + offeredit = { + synopsis = "[\"Take %o with you. It will help in your quest for the Amulet of Yendor.\"]", + output = "text", + text = [[%lC glimpses %o in your possession. +He smiles and says: + + You have done it! We are saved. But I fear that %o + will always be a target for %C forces who will want it for their + own. + + To prevent further trouble, I would like you, %p, + to take %o away with you. It will help you as you + quest for the Amulet of Yendor.]], + }, + offeredit2 = { + synopsis = "[\"You are the keeper of %o now. Return to %Z to search for the Amulet.]", + output = "text", + text = [[%l grasps %o proudly for a moment, then looks at you. + +"You are its keeper now, and the time has come to resume your search +for the Amulet. %Z await your return through the +magic portal which brought you here."]], + }, + othertime = { + text = [[For some reason, you think that this may be the last time you will +enter %H.]], + }, + posthanks = { + text = [["%pC! Welcome back. +How goes your quest to recover the Amulet for %d?"]], + }, + }, + Hea = { + assignquest = { + synopsis = "[Travel to %i on your way to recover %o from %n.]", + output = "text", + text = [[For the first time, you sense a smile on %ls face. + + "You have indeed learned as much as we can teach you in preparation + for this task. Let me tell you what I know of the symptoms and hope + that you can provide a cure. + + "A short while ago, the dreaded %nt was fooled by the gods + into thinking that %nh could use %o to find a + cure for old age. Think of it, eternal youth! But %nj good + health is accomplished by drawing the health from those around %ni. + + "He has exhausted %nj own supply of healthy people and now %nh seeks to + extend %nj influence into our world. You must recover from %ni + %o and break the spell. + + "You must travel into the swamps to %i, and from there + follow the trail to %ns island lair. Be careful."]], + }, + badalign = { + synopsis = "[Return when you are more %a.]", + output = "text", + text = [["You have learned much of the remedies that benefit, but you must also +know which physic for which ail. That is why %ds teachings are a +part of your training. + +"Return to us when you have healed thyself."]], + }, + badlevel = { + synopsis = "[You are too inexperienced. Return when you are %Ra.]", + output = "text", + text = [["Alas, %p, you are yet too inexperienced to deal with the rigors +of such a task. You must be able to draw on the knowledge of botany, +alchemy and veterinary practices before I can send you on this quest +with good conscience. + +"Return when you wear %Ra's caduceus."]], + }, + discourage = { + "\"They might as well give scalpels to wizards as to let you try to use %o!\"", + "\"If I could strike %l, surrounded by %lj %gP, imagine what I can do to you here by yourself.\"", + "\"I will put my %Rp to work making a physic out of your ashes.\"", + "\"As we speak, Hades gathers your patients to join you.\"", + "\"After I'm done with you, I'll destroy %l as well.\"", + "\"You will have to kill me if you ever hope to leave this place.\"", + "\"I will impale your head on my caduceus for all to see.\"", + "\"There is no materia medica in your sack which will cure you of me!\"", + "\"Do not fight too hard, I want your soul strong, not weakened!\"", + "\"You should have stopped studying at vetenary.\"", + }, + encourage = { + "\"Remember, %p, to always wash your hands before operating.\"", + "\"%nC has no real magic of %nj own. To this %nh is vulnerable.\"", + "\"If you have been true to %d, you can draw on the power of %o.\"", + "\"Bring with you antidotes for poisons.\"", + "\"Remember this, %n can twist the powers of %o to hurt instead of heal.\"", + "\"I have sent for Chiron, but I am afraid he will come too late.\"", + "\"Maybe when you return the snakes will once again begin to shed.\"", + "\"The plague grows worse as we speak. Hurry, %p!\"", + "\"Many times %n has caused trouble in these lands. It is time that %nh was eradicated like the diseases %nh has caused.\"", + "\"With but one eye, %n should be easy to blind. Remember this.\"", + }, + firsttime = { + synopsis = "[You arrive back at %H and must find %l.]", + output = "menu", + text = [[What sorcery has brought you back to %H? The smell +of fresh funeral pyres tells you that something is amiss with the healing +powers that used to practice here. + +No rhizotomists are tending the materia medica gardens, and where are the +common folk who used to come for the cures? + +You know that you must quickly make your way to the collegium, and +%ls iatreion, and find out what has happened in your absence.]], + }, + goal_first = { + synopsis = "[You have reached the lair of %n. Take %o away from %ni.]", + output = "text", + text = [[You stand within sight of the infamous Isle of %n. Even +the words of %l had not prepared you for this. + +Steeling yourself against the wails of the ill that pierce your ears, +you hurry on your task. Maybe with %o you can +heal them on your return, but not now.]], + }, + goal_next = { + text = "Once again, you %x the Isle of %n in the distance.", + }, + gotit = { + synopsis = "[You feel the healing power of %o and should return it to %l.]", + output = "text", + text = [[As you pick up %o, you feel its healing begin to +warm your soul. You curse Zeus for taking it from its rightful owner, +but at least you hope that %l can put it to good use once +again.]], + }, + guardtalk_after = { + "\"Did you read that new treatise on the therapeutic use of leeches?\"", + "\"Paint a red caduceus on your shield and monsters won't hit you.\"", + "\"How are you feeling? Perhaps a good bleeding will improve your spirits.\"", + "\"Have you heard the absurd new theory that diseases are caused by microscopic organisms, and not ill humors?\"", + "\"I see that you bring %o, now you can cure this plague!\"", + }, + guardtalk_before = { + "\"Did you read that new treatise on the therapeutic use of leeches?\"", + "\"Paint a red caduceus on your shield and monsters won't hit you.\"", + "\"I passed handwriting so they are demoting me a rank.\"", + "\"I've heard that even %l has not been able to cure Chiron.\"", + "\"We think %n has used %nj alchemists, and %o, to unleash a new disease we call 'the cold' on Gehennom.\"", + }, + hasamulet = { + synopsis = "[\"You have recovered the Amulet. Travel to the Astral Plane and return it to %d.\"]", + output = "text", + text = [["Ah, you have recovered the Amulet, %p. Well done! + +"Now, you should know that you must travel through the Elemental Planes +to the Astral, and there return the Amulet to %d. Go forth and +may our prayers be as a wind upon your back."]], + }, + killed_nemesis = { + synopsis = "[%nC curses you as %nh dies.]", + output = "text", + text = [[The battered body of %n slumps to the ground and gasps +out one last curse: + + "You have defeated me, %p, but I shall have my revenge. + How, I shall not say, but this curse shall be like a cancer + on you." + +With that %n dies.]], + }, + leader_first = { + synopsis = "[%l is weak from the struggle with %n. %lH wants to examine you.]", + output = "text", + text = [[Feebly, %l raises %lj head to look at you. + +"It is good to see you again, %p. I see the concern in your +eyes, but do not worry for me. I am not ready for Hades yet. We have +exhausted much of our healing powers holding off %n. +I need your fresh strength to carry on our work. + +"Come closer and let me lay hands on you, and determine if you have +the skills necessary to accomplish this mission."]], + }, + leader_last = { + synopsis = "[You are a failure as a healer.]", + output = "text", + text = [["You have failed us, %p. You are a quack! A charlatan! + +"Hades will be happy to hear that you are once again practicing your +arts on the unsuspecting."]], + }, + leader_next = { + text = [["Again you return to me, %p. I sense that each trip back +the pleurisy and maladies of our land begin to infect you. Let us +hope and pray to %d that you become ready for your task before +you fall victim to the bad humors."]], + }, + leader_other = { + text = [["Chiron has fallen, Hermes has fallen, what else must I tell you to +impress upon you the importance of your mission! I hope that you +have come prepared this time."]], + }, + locate_first = { + synopsis = "[You have reached %i but all is not well.]", + output = "text", + text = [[You stand before the entrance to %i. Strange +scratching noises come from within the building. + +The swampy ground around you seems to stink with disease.]], + }, + locate_next = { + text = "Once again you stand at the entrance to %i.", + }, + nemesis_first = { + synopsis = "[\"I will take your life, then defeat %l.\"]", + output = "text", + text = [["They have made a mistake in sending you, %p. + +"When I add your youth to mine, it will just make it easier for me +to defeat %l."]], + }, + nemesis_next = { + text = "\"Unlike your patients, you seem to keep coming back, %p!\"", + }, + nemesis_other = { + text = "\"Which would you like, %p? Boils, pleurisy, convulsions?\"", + }, + nemesis_wantsit = { + text = [["I'll have %o back from you, %r. You are +not going to live to escape this place."]], + }, + nexttime = { + text = [[After your last experience you expected to be here, but you certainly +did not expect to see things so much worse. This time you must succeed.]], + }, + offeredit = { + synopsis = "[%l touches %o and tells %lj %gP to do so too, then tells you to take it with you.]", + output = "text", + text = [[As soon as %l sees %o %lh summons %lj +%gP. + +Gently, %l reaches out and touches %o. +He instructs each of the assembled to do the same. When everyone +has finished %lh speaks to you. + + "Now that we have been replenished we can defeat this plague. You must + take %o with you and replenish the worlds you have + been called upon to travel next. I wish you could ride Chiron to the + end of your journey, but I need him to help me spread the cure. Go + now and continue your journey."]], + }, + offeredit2 = { + synopsis = "[%l tells you to keep %o and return to %Z to search for the Amulet.]", + output = "text", + text = [[%l cautiously handles %o while watching you. + +"You are its keeper now, and the time has come to resume your search +for the Amulet. %Z await your return through the +magic portal which brought you here."]], + }, + othertime = { + text = [[Again, you %x %H in the distance. + +The smell of death and disease permeates the air. You do not have +to be %Ra to know that %n is on the verge of victory.]], + }, + posthanks = { + text = [["You have again returned to us, %p. We have done well in your +absence, yes? How fare you upon your quest for the Amulet?"]], + }, + }, + Kni = { + assignquest = { + synopsis = "[Pass through %i to reach %n. Destroy %ni and return with %o.]", + output = "text", + text = [["Ah, %p. Thou art truly ready, as no %c before thee hath +been. Hear now Our words: + +"As thou noticed as thou approached %H, a great battle hath +been fought recently in these fields. Know thou that Merlin himself +came to aid Us here as We battled the foul %n. In the midst of that +battle, %n struck Merlin a great blow, felling him. Then, as Our +forces were pressed back, %n stole %o. + +"We eventually turned the tide, but lost many %cP in doing so. +Merlin was taken off by his apprentice, but hath not recovered. We have +been told that so long as %n possesseth %o, +Merlin will not regain his health. + +"We hereby charge thee with this most important of duties: + +"Go forth from this place, to the fens, and there thou wilt find +%i. From there, thou must track down %n. Destroy the +beast, and return to Us %o. Only then can +We restore Merlin to health."]], + }, + badalign = { + synopsis = "[Go and do penance. Return when you are truly %a.]", + output = "text", + text = [["Thou dishonourest Us, %p! Thou hast strayed from the path of +chivalry! Go from Our presence and do penance. Only when thou art again +pure mayst thou return hence."]], + }, + badlevel = { + synopsis = "[You are not prepared to face %n. Return when you are %Ra.]", + output = "text", + text = [["Verily, %p, thou hast done well. That thou hast survived thus +far is a credit to thy valor, but thou art yet unprepared for +the demands required as Our Champion. %rA, no matter how +pure, could never hope to defeat the foul %n. + +"Journey forth from this place, and hone thy skills. Return to +Our presence when thou hast attained the noble title of %R."]], + }, + discourage = { + "\"A mere %r can never withstand me!\"", + "\"I shall kill thee now, and feast!\"", + "\"Puny %c. What manner of death dost thou wish?\"", + "\"First thee, %p, then I shall feast upon %l.\"", + "\"Hah! Thou hast failed, %r. Now thou shalt die.\"", + "\"Die, %c. Thou art as nothing against my might.\"", + "\"I shall suck the marrow from thy bones, %c.\"", + "\"Let's see... Baked? No. Fried? Nay. Broiled? Yea verily, that is the way I like my %c for dinner.\"", + "\"Thy strength waneth, %p. The time of thy death draweth near.\"", + "\"Call upon thy precious %d, %p. It shall not avail thee.\"", + }, + encourage = { + "\"Remember, %p, follow always the path of %d.\"", + "\"Though %n is verily a mighty foe, We have confidence in thy victory.\"", + "\"Beware, for %n hath surrounded %niself with hordes of foul creatures.\"", + "\"Great treasure, 'tis said, is hoarded in the lair of %n.\"", + "\"If thou possessest %o, %p, %ns magic shall therewith be thwarted.\"", + "\"The gates of %i are guarded by forces unseen, %p. Go carefully.\"", + "\"Return %o to Us quickly, %p.\"", + "\"Destroy %n, %p, else %H shall surely fall.\"", + "\"Call upon %d when thou art in need.\"", + "\"To find %i, thou must keep thy heart pure.\"", + }, + firsttime = { + synopsis = "[Signs of battle include long gouges in the walls of %H.]", + output = "menu", + text = [[You materialize in the shadows of %H. Immediately, you notice +that something is wrong. The fields around the castle are trampled and +withered, as if some great battle has been recently fought. + +Exploring further, you %x long gouges in the walls of %H. +You know of only one creature that makes those kinds of marks...]], + }, + goal_first = { + synopsis = "[You %x the entrance to a cavern inside a hill.]", + output = "text", + text = [[As you exit the swamps, you %x before you a huge, gaping hole in the +side of a hill. From within, you smell the foul stench of carrion. + +The pools on either side of the entrance are fouled with blood, and +pieces of rusted metal and broken weapons show above the surface.]], + }, + goal_next = { + text = "Again, you stand at the entrance to %ns lair.", + }, + gotit = { + synopsis = "[You feel the magic of %o.]", + output = "text", + text = [[As you pick up %o, you feel its protective fields +form around your body. You also feel a faint stirring in your mind, as +if you are in two places at once, and in the second, you are waking from +a long sleep.]], + }, + guardtalk_after = { + "\"Hail, %p! Verily, thou lookest well.\"", + "\"So, %p, didst thou find %n in the fens near %i?\"", + "\"Worthy %p, hast thou proven thy right purpose on the body of %n?\"", + "\"Verily, %l could have no better champion, %p.\"", + "\"Hast thou indeed recovered %o?\"", + }, + guardtalk_before = { + "\"Hail, %p! Verily, thou lookest well.\"", + "\"There is word, %p, that %n hath been sighted in the fens near %i.\"", + "\"Thou art our only hope now, %p.\"", + "\"Verily, %l could have no better champion, %p.\"", + "\"Many brave %cP died when %n attacked.\"", + }, + hasamulet = { + synopsis = "[Take the Amulet to the Astral Plane and deliver it to %d.]", + output = "text", + text = [["Thou hast succeeded, We see, %p! Now thou art commanded to take +the Amulet to be sacrificed to %d in the Plane of the Astral. + +"Merlin hath counseled Us that thou must travel always upwards through +the Planes of the Elements, to achieve this goal. + +"Go with %d, %p."]], + }, + killed_nemesis = { + synopsis = "[%nC curses you as %nh dies.]", + output = "text", + text = [[As %n sinks to the ground, blood gushing from %nj open mouth, %nh +defiantly curses you and %l: + + "Thou hast not won yet, %r. By the gods, I shall return + and dog thy steps to the grave!" + +%nJ tail flailing madly, %n tries to crawl towards you, but slumps +to the ground and dies in a pool of %nj own blood.]], + }, + leader_first = { + synopsis = "[%lC checks whether you are ready for a great undertaking.]", + output = "text", + text = [["Ah, %p. We see thou hast received Our summons. +We are in dire need of thy prowess. But first, We must needs +decide if thou art ready for this great undertaking."]], + }, + leader_last = { + synopsis = "[You are a disgrace as %ca.]", + output = "text", + text = [["Thou disgracest this noble court with thine impure presence. We have been +lenient with thee, but no more. Thy name shall be spoken no more. We +hereby strip thee of thy title, thy lands, and thy standing as %ca. +Begone from Our sight!"]], + }, + leader_next = { + text = "\"Welcome again, %p. We hope thou art ready now.\"", + }, + leader_other = { + text = "\"Once again, thou standest before Us, %p. Art thou ready now?\"", + }, + locate_first = { + synopsis = "[You have reached %i and can %x a shrine.]", + output = "text", + text = [[You stand at the foot of %i. Atop, you can %x a shrine. +Strange energies seem to be focused here, and the hair on the back of +your neck stands on end.]], + }, + locate_next = { + text = "Again, you stand at the foot of %i.", + }, + nemesis_first = { + synopsis = "[%nC taunts you and issues a threat against %H.]", + output = "text", + text = [["Hah! Another puny %c seeks death. I shall dine well tonight, +then tomorrow, %H shall fall!"]], + }, + nemesis_next = { + text = "\"Again, thou challengest me, %r? So be it. Thou wilt die here.\"", + }, + nemesis_other = { + text = "\"Thou art truly foolish, %r. I shall dispatch thee anon.\"", + }, + nemesis_wantsit = { + text = [["So, thou darest touch MY property! I shall have that bauble back, +puny %r. Thou wilt die in agony!"]], + }, + nexttime = { + text = "Once again you stand in the shadows of %H.", + }, + offeredit = { + synopsis = "[%oC is yours now. It will aid in your search for the Amulet.]", + output = "text", + text = [[As you approach %l, %lh beams at you and says: + + "Well done! Thou art truly the Champion of %H. We + have received word that Merlin is recovering, and shall soon + rejoin Us. + + "He hath instructed Us that thou art now to be the guardian of + %o. He feeleth that thou mayst have need of + its powers in thine adventures. It is Our wish that thou keepest + %o with thee as thou searchest for the fabled + Amulet of Yendor."]], + }, + offeredit2 = { + synopsis = "[You are the keeper of %o. Return to %Z and find the Amulet.]", + output = "text", + text = [["Careful, %p! %oC might break, and that would +be a tragic loss. Thou art its keeper now, and the time hath come +to resume thy search for the Amulet. %Z await thy +return through the magic portal that brought thee here."]], + }, + othertime = { + text = [[Again, you stand before %H. You vaguely sense that this +may be the last time you stand before %l.]], + }, + posthanks = { + text = "\"Well met, %p. How goeth thy search for the Amulet of Yendor?\"", + }, + }, + Mon = { + assignquest = { + synopsis = "[Find %i, then continue to %ns lair. Defeat %ni and return with %o.]", + output = "text", + text = [["Yes, %p. You are truly ready now. Attend to me and I shall +tell you of what has transpired: + +"During one of the Great Meditations a short time ago, %n and +a legion of elementals invaded %H. Many %gP +were killed, including the one bearing %o. + +Now, there are barely enough %gP left to keep the elementals +at bay. + +"We need you to find %i, then, from there, +travel to %ns lair. If you can manage to defeat %n and +return %o here, we can then drive off the legions +of elementals that slay our students. + +"Go with %d as your guide, %p."]], + }, + badalign = { + synopsis = "[You must atone. Come back when you are worthy of %d.]", + output = "text", + text = [["This is terrible, %p. You have deviated from the true path! +You know that %d requires the most strident devotion of this +order. The %shood must stand for utmost piety. + +"Go from here, atone for your sins against %d. Return only when +you have purified yourself."]], + }, + badlevel = { + synopsis = "[You are not ready to face %n. Come back when you are %Ra.]", + output = "text", + text = [["Alas, %p, it is not yet to be. A mere %r could never +withstand the might of %n. Go forth, again into the world, and +return when you have attained the post of %R."]], + }, + discourage = { + "\"Submit to my will, %c, and I shall spare you.\"", + "\"Your puny powers are no match for me, %c.\"", + "\"I shall have you turned into a zombie for my pleasure!\"", + "\"Despair now, %r. %d cannot help you.\"", + "\"I shall feast upon your soul for many days, %c.\"", + "\"Your death will be slow and painful. That I promise!\"", + "\"You cannot defeat %n, you fool. I shall kill you now.\"", + "\"Your precious %lt will be my next victim.\"", + "\"I feel your powers failing you, %r. You shall die now.\"", + "\"With %o, nothing can stand in my way.\"", + }, + encourage = { + "\"You can prevail, if you rely on %d.\"", + "\"Remember that %n has great magic at his command.\"", + "\"Be pure, my %S.\"", + "\"Beware, %i is surrounded by hordes of earth elementals.\"", + "\"Remember your studies, and you will prevail!\"", + "\"Acquire and wear %o if you can. They will aid you against %n.\"", + "\"Call upon %d when your need is greatest. You will be answered.\"", + "\"Remember to use the elementals' strength against them!\"", + "\"Do not lose faith, %p. If you do so, %n will grow stronger.\"", + "\"Wear %o. They will assist you in your efforts.\"", + }, + firsttime = { + synopsis = "[You have reached %H but something is wrong. %lC needs your aid.]", + output = "menu", + text = [[You find yourself standing in sight of %H. +Something is obviously wrong here. Strange shapes lumber around +outside %H! + +You realize that the %l needs your assistance!]], + }, + goal_first = { + synopsis = "[You are surrounded by brimstone, lava, and elementals.]", + output = "text", + text = [[The stench of brimstone is all about you, and the elementals close in +from all sides! + +Ahead, there is a small clearing amidst the bubbling pits of lava...]], + }, + goal_next = { + text = "Again, you have invaded %ns domain.", + }, + gotit = { + synopsis = "[You feel the essence of %d and realize that you should take %o to %l.]", + output = "text", + text = [[As you pick up %o, you feel the essence of +%d fill your soul. You know now why %n stole %oi from +%H, for with %oi, %ca of %d could +easily defeat his plans. + +You sense a message from %d. Though not verbal, you +get the impression that you must return to %l as soon +as possible.]], + }, + guardtalk_after = { + "\"Greetings, honorable %r. It is good to see you again.\"", + "\"Ah, %p! Our deepest gratitude for all of your help.\"", + "\"Greetings, %s. Perhaps you will take some time to meditate with us?\"", + "\"With this test behind you, may %d bring you enlightenment.\"", + "\"May %d be with you, %s.\"", + }, + guardtalk_before = { + "\"Greetings, honorable %r. It is good to see you.\"", + "\"Ah, %p! Surely you can help us in our hour of need.\"", + "\"Greetings, %s. %lC has great need of your help.\"", + "\"Alas, it seems as if even %d has deserted us.\"", + "\"May %d be with you, %s.\"", + }, + hasamulet = { + synopsis = "[Take the Amulet to the Astral Plane and deliver it to %d.]", + output = "text", + text = [["You have prevailed, %p! %d is surely with you. Now, +you must take the Amulet, and sacrifice it on %ds altar on +the Astral Plane. I suspect that I shall never see you again in this +life, but I hope to at %ds feet."]], + }, + killed_nemesis = { + synopsis = "[As %n dies, %nh threatens to return.]", + output = "text", + text = [[%nC gasps: + + "You have only defeated this mortal body. Know this: my spirit + is strong. I shall return and reclaim what is mine!" + +With that, %n expires.]], + }, + leader_first = { + synopsis = "[%lC checks whether you are ready for the great challenge.]", + output = "text", + text = [["Ah, %p, my %S. You have returned to us at last. +A great blow has befallen our order; perhaps you can help us. +First, however, I must determine if you are prepared for this +great challenge."]], + }, + leader_last = { + synopsis = "[You are a heretic and have failed utterly.]", + output = "text", + text = [["You are a heretic, %p! How can you, %ra, deviate so from the +teachings of %d? Begone from this temple. You are no longer +%sa to this order. We will pray to %d for other assistance, +as you have failed us utterly."]], + }, + leader_next = { + text = "\"Again, my %S, you stand before me. Are you ready now to help us?\"", + }, + leader_other = { + text = "\"Once more, %p, you stand within the sanctum. Are you ready now?\"", + }, + locate_first = { + synopsis = "[You have reached %i. %nC lurks further ahead.]", + output = "text", + text = [[You remember the descriptions of %i, given +to you by the %l. It is ahead that you will find +%n's trail.]], + }, + locate_next = { + text = "Again, you stand before %i.", + }, + nemesis_first = { + synopsis = "[You are no %g. You shall never regain %o.]", + output = "text", + text = [["Ah, so %l has sent another %g to retrieve +%o. + +"No, I see you are no %g. Perhaps I shall have some fun today +after all. Prepare to die, %r! You shall never regain +%o."]], + }, + nemesis_next = { + text = "\"So, %r. Again you challenge me.\"", + }, + nemesis_other = { + text = "\"Die now, %r. %d has no power here to aid you.\"", + }, + nemesis_wantsit = { + text = "\"You shall die, %r, and I will have %o back.\"", + }, + nexttime = { + text = "Once again, you stand before %H.", + }, + offeredit = { + synopsis = "[Keep %o. %oH will help you recover the Amulet of Yendor.]", + output = "text", + text = [["You have returned, %p. And with %o, I see. +Congratulations. + +"I have been in meditation, and have received direction from +a minion of %d. %d commands that you retain +%o. With %oi, you must recover the Amulet +of Yendor. + +"Go forth, and let %d guide your steps."]], + }, + offeredit2 = { + synopsis = "[Keep %o and return to %Z to search for the Amulet.]", + output = "text", + text = [[%lC studies %o for a moment, +then returns his gaze to you. + +"%oC must remain with you. Use %oi +as you resume your search for the Amulet. +%Z await your return through the magic portal +that brought you here."]], + }, + othertime = { + text = [[Again you face %H. Your intuition hints that this +may be the final time you come here.]], + }, + posthanks = { + text = "\"Welcome back, %p. How is your quest for the Amulet going?\"", + }, + }, + Pri = { + assignquest = { + synopsis = "[%nC invaded %H and captured %o. Defeat %ni and retrieve %oh.]", + output = "text", + text = [["Yes, %p. You are truly ready now. Attend to me and I shall +tell you of what has transpired: + +"At one of the Great Festivals a short time ago, %n and a legion +of undead invaded %H. Many %gP were killed, including +the one carrying %o. + +"As a final act of vengefulness, %n desecrated the altar here. +Without it, we could not mount a counter-attack. Now, there are +barely enough %gP left to keep the undead at bay. + +"We need you to find %i, then, from there, travel +to %ns lair. If you can manage to defeat %n and return +%o here, we can then drive off the legions of +undead that befoul the land. + +"Go with %d as your guide, %p."]], + }, + badalign = { + synopsis = "[You have deviated from the path. Return when you have purified yourself.]", + output = "text", + text = [["This is terrible, %p. You have deviated from the true path! +You know that %d requires the most strident devotion of this +order. The %shood must stand for utmost piety. + +"Go from here, atone for your sins against %d. Return only when +you have purified yourself."]], + }, + badlevel = { + synopsis = "[%rA cannot withstand %n. Come back when you are %Ra.]", + output = "text", + text = [["Alas, %p, it is not yet to be. A mere %r could never +withstand the might of %n. Go forth, again into the world, and return +when you have attained the post of %R."]], + }, + discourage = { + "\"Submit to my will, %c, and I shall spare you.\"", + "\"Your puny powers are no match for me, %c.\"", + "\"I shall have you turned into a zombie for my pleasure!\"", + "\"Despair now, %r. %d cannot help you.\"", + "\"I shall feast upon your soul for many days, %c.\"", + "\"Your death will be slow and painful. That I promise!\"", + "\"You cannot defeat %n, you fool. I shall kill you now.\"", + "\"Your precious %lt will be my next victim.\"", + "\"I feel your powers failing you, %r. You shall die now.\"", + "\"With %o, nothing can stand in my way.\"", + }, + encourage = { + "\"You can prevail, if you rely on %d.\"", + "\"Remember that %n has great magic at his command.\"", + "\"Be pure, my %S.\"", + "\"Beware, %i is surrounded by a great graveyard.\"", + "\"You may be able to affect %n with magical cold.\"", + "\"Acquire and wear %o if you can. It will aid you against %n.\"", + "\"Call upon %d when your need is greatest. You will be answered.\"", + "\"The undead legions are weakest during the daylight hours.\"", + "\"Do not lose faith, %p. If you do so, %n will grow stronger.\"", + "\"Wear %o. It will assist you against the undead.\"", + }, + firsttime = { + synopsis = "[You are at %H; the doors are closed. %lC needs your help!]", + output = "menu", + text = [[You find yourself standing in sight of %H. Something +is obviously wrong here. The doors to %H, which usually +stand open, are closed. Strange human shapes shamble around +outside. + +You realize that %l needs your assistance!]], + }, + goal_first = { + synopsis = "[The stench of brimstone surrounds you, the shrieks and moans are endless.]", + output = "text", + text = [[The stench of brimstone is all about you, and the shrieks and moans +of tortured souls assault your psyche. + +Ahead, there is a small clearing amidst the bubbling pits of lava...]], + }, + goal_next = { + text = "Again, you have invaded %ns domain.", + }, + gotit = { + synopsis = "[You feel %d as you pick up %o; return %oh to %l.]", + output = "text", + text = [[As you pick up %o, you feel the essence of +%d fill your soul. You know now why %n stole it from +%H, for with it, %ca of %d could +easily defeat his plans. + +You sense a message from %d. Though not verbal, you +get the impression that you must return to %l as soon +as possible.]], + }, + guardtalk_after = { + "\"Greetings, %r. It is good to see you again.\"", + "\"Ah, %p! Our deepest gratitude for all of your help.\"", + "\"Welcome back, %s! With %o, no undead can stand against us.\"", + "\"Praise be to %d, for delivering us from %n.\"", + "\"May %d be with you, %s.\"", + }, + guardtalk_before = { + "\"Greetings, honored %r. It is good to see you.\"", + "\"Ah, %p! Surely you can help us in our hour of need.\"", + "\"Greetings, %s. %lC has great need of your help.\"", + "\"Alas, it seems as if even %d has deserted us.\"", + "\"May %d be with you, %s.\"", + }, + hasamulet = { + synopsis = "[Take the Amulet to the Astral Plane and offer it on %ds altar.]", + output = "text", + text = [["You have prevailed, %p! %d is surely with you. Now, +you must take the amulet, and sacrifice it on %ds altar on +the Astral Plane. I suspect that I shall never see you again in this +life, but I hope to at %ds feet."]], + }, + killed_nemesis = { + synopsis = "[%nC dies. Moloch is aware of you and angry at %n.]", + output = "text", + text = [[You feel a wrenching shift in the ether as %ns body dissolves +into a cloud of noxious gas. + +Suddenly, a voice booms out: + + "Thou hast defeated the least of my minions, %r. + Know now that Moloch is aware of thy presence. + As for thee, %n, I shall deal with thy failure + at my leisure." + +You then hear the voice of %n, screaming in terror...]], + }, + leader_first = { + synopsis = "[You have returned and we need your help. Are you ready?]", + output = "text", + text = [["Ah, %p, my %S. You have returned to us at last. +A great blow has befallen our order; perhaps you can help us. +First, however, I must determine if you are prepared for this +great challenge."]], + }, + leader_last = { + synopsis = "[You are a heretic who has deviated from the teachings of %d.]", + output = "text", + text = [["You are a heretic, %p! How can you, %ra, deviate so from the +teachings of %d? Begone from this temple. You are no longer +%sa to this order. We will pray to %d for other assistance, +as you have failed us utterly."]], + }, + leader_next = { + text = "\"Again, my %S, you stand before me. Are you ready now to help us?\"", + }, + leader_other = { + text = "\"Once more, %p, you stand within the sanctum. Are you ready now?\"", + }, + locate_first = { + synopsis = "[You have found %i. The trail to %n lies ahead.]", + output = "text", + text = [[You stand facing a large graveyard. The sky above is filled with clouds +that seem to get thicker closer to the center. You sense the presence of +undead in larger numbers than you have ever encountered before. + +You remember the descriptions of %i, given to you by +%l. It is ahead that you will find %ns trail.]], + }, + locate_next = { + text = "Again, you stand before %i.", + }, + nemesis_first = { + synopsis = "[%lC has sent you, but you are no %gC. I shall destroy you.]", + output = "text", + text = [["Ah, so %l has sent another %gC to retrieve +%o. + +"No, I see you are no %gC. Perhaps I shall have some fun today +after all. Prepare to die, %r! You shall never regain +%o."]], + }, + nemesis_next = { + text = "\"So, %r. Again you challenge me.\"", + }, + nemesis_other = { + text = "\"Die now, %r. %d has no power here to aid you.\"", + }, + nemesis_wantsit = { + text = "\"You shall die, %r, and I will have %o back.\"", + }, + nexttime = { + text = "Once again, you stand before %H.", + }, + offeredit = { + synopsis = "[Congratulations, %p. Keep %o; go and recover the Amulet.]", + output = "text", + text = [["You have returned, %p. And with %o, I see. +Congratulations. + +"I have been in meditation, and have received direction from +a minion of %d. %d commands that you retain +%o. With it, you must recover the Amulet +of Yendor. + +"Go forth, and let %d guide your steps."]], + }, + offeredit2 = { + synopsis = "[%oC is yours now. Return to %Z and find the Amulet.]", + output = "text", + text = [[%lC reiterates that %o is yours now. + +"The time has come to resume your search for the Amulet. +%Z await your return through the magic portal +that brought you here."]], + }, + othertime = { + text = [[Again you face %H. Your intuition hints that this may be +the final time you come here.]], + }, + posthanks = { + text = "\"Welcome back, %p. How is your quest for the Amulet going?\"", + }, + }, + Ran = { + assignquest = { + synopsis = "[%nC has stolen %o. Infiltrate %i and retrieve %oh for us.]", + output = "text", + text = [["You are indeed ready, %p. I shall tell you what has transpired, +and why we so desperately need your help: + +"A short time ago, the mountain centaurs to the east invaded +and enslaved the plains centaurs in this area. The local +leader is now only a figurehead, and serves %n. + +"During our last gathering of worship here, we were beset by hordes of +hostile centaurs, as you witnessed. In the first onslaught a group, +headed by %n %niself, managed to breach the grove and steal +%o. + +"Since then, we have been besieged. We do not know how much longer +we will be able to maintain our magical barriers. + +"If we are to survive, you, %p, must infiltrate +%i. There, you will find a pathway down, to the +underground cavern of %n. He has always coveted +%o, and will surely keep it. + +"Recover %o for us, %p! Only then will %d be safe."]], + }, + badalign = { + synopsis = "[You are not sufficiently %a. Come back when you have purified yourself.]", + output = "text", + text = [["You have strayed, %p! You know that %d requires that +we maintain a pure devotion to things %a! + +"You must go from us. Return when you have purified yourself."]], + }, + badlevel = { + synopsis = "[You are too inexperienced. Come back when you are %Ra.]", + output = "text", + text = [["%p, you are yet too inexperienced to withstand the demands of that +which we need you to do. %RA might just be able to do this thing. + +"Return to us when you have learned more, my %S."]], + }, + discourage = { + "\"Your %d is nothing, %c. You are mine now!\"", + "\"Run away little %c! You can never hope to defeat %n!\"", + "\"My servants will rip you to shreds!\"", + "\"I shall display your head as a trophy. What do you think about that wall?\"", + "\"I shall break your %ls grove, and destroy all the %gP!\"", + "\"%d has abandoned you, %c. You are doomed.\"", + "\"%rA? %lC sends a mere %r against me? Hah!\"", + "\"%lC has failed, %c. %oC will never leave here.\"", + "\"You really think you can defeat me, eh %c? You are wrong!\"", + "\"You weaken, %c. I shall kill you now.\"", + }, + encourage = { + "\"It is rumored that the Forest and Mountain Centaurs have resolved their ancient feud and now band together against us.\"", + "\"%nC is strong, and very smart.\"", + "\"Use %o, when you find it. It will help you survive to reach us.\"", + "\"Remember, let %d be your guide.\"", + "\"Call upon %d when you face %n. The very act of doing so will infuriate him, and give you advantage.\"", + "\"%n and his kind have always hated us.\"", + "\"We cannot hold the grove much longer, %p. Hurry!\"", + "\"To infiltrate %i, you must be very stealthy.\"", + "\"Remember that %n is a braggart. Trust not what he says.\"", + "\"You can triumph, %p, if you trust in %d.\"", + }, + firsttime = { + synopsis = "[The ancient forest grove is surrounded by centaurs.]", + output = "menu", + text = [[You arrive in familiar surroundings. In the distance, you %x the +ancient forest grove, the place of worship to %d. + +Something is wrong, though. Surrounding the grove are centaurs! +And they've noticed you!]], + }, + goal_first = { + synopsis = "[You descend into a subterranean complex. Hooves clatter in the distance.]", + output = "text", + text = [[You descend into a weird place, in which roughly cut cave-like walls +join with smooth, finished ones, as if someone was in the midst of +finishing off the construction of a subterranean complex. + +Off in the distance, you hear a sound like the clattering of many +hooves on rock.]], + }, + goal_next = { + text = "Once again, you enter the distorted castle of %n.", + }, + gotit = { + synopsis = "[You pick up %o and feel power. It's time to return %oh to %l.]", + output = "text", + text = [[As you pick up %o, it seems to glow, and a warmth +fills you completely. You realize that its power is what has protected +your %sp against their enemies for so long. + +You must now return it to %l without delay -- their lives depend +on your speed.]], + }, + guardtalk_after = { + "\"%pC! I have not seen you in many moons. How do you fare?\"", + "\"Birdsong has returned to the grove, surely this means you have defeated %n.\"", + "\"%lC seems to have regained some of his strength.\"", + "\"So, tell us how you entered %i, in case some new evil arises there.\"", + "\"Is that truly %o that I see you carrying?\"", + }, + guardtalk_before = { + "\"%pC! I have not seen you in many moons. How do you fare?\"", + "\"%nC continues to threaten the grove. But we hold fast.\"", + "\"%lC is growing weak. The magic required to defend the grove drains us.\"", + "\"Remember %i is hard to enter. Beware the distraction of leatherwings.\"", + "\"We must regain %o. Without it we will be overrun.\"", + }, + hasamulet = { + synopsis = "[You have the Amulet! Take it to the Astral Plane and offer it to %d.]", + output = "text", + text = [["You have it! You have recovered the Amulet of Yendor! +Now attend to me, %p, and I will tell you what must be done: + +"The Amulet has within it magic, the capability to transport you to +the Astral Plane, where the primary circle of %d resides. + +"To activate this magic, you must travel upwards as far as you can. +When you reach the temple, sacrifice the Amulet to %d. + +"Thus will you fulfill your destiny."]], + }, + killed_nemesis = { + synopsis = "[%nC curses you as %nh dies.]", + output = "text", + text = [[%nC collapses to the ground, cursing you and %l, then says: + + "You have defeated me, %r! But I curse you one final time, with + my dying breath! You shall die before you leave my castle!"]], + }, + leader_first = { + synopsis = "[You have returned, %p. We need your help. Are you ready?]", + output = "text", + text = [["%pC! You have returned! Thank %d. + +"We have great need of you. But first, I must see if you have the +required abilities to take on this responsibility."]], + }, + leader_last = { + synopsis = "[You are not sufficiently %a. We renounce your %shood.]", + output = "text", + text = [["%pC! You have doomed us all. You fairly radiate %L influences +and weaken the power we have raised in this grove as a result! + +"Begone! We renounce your %shood with us! You are an outcast now!"]], + }, + leader_next = { + text = "\"Once again, %p, you stand in our midst. Are you ready now?\"", + }, + leader_other = { + text = "\"Ah, you are here again, %p. Allow me to determine your readiness...\"", + }, + locate_first = { + synopsis = "[This is %i. There are bats nearby. Beware the wumpus!]", + output = "text", + text = [[This must be %i. + +You are in a cave built of many different rooms, all interconnected +by tunnels. Your quest is to find and shoot the evil wumpus that +resides elsewhere in the cave without running into any bottomless +pits or using up your limited supply of arrows. Good luck. + +You are in room 9 of the cave. There are tunnels to rooms +5, 8, and 10. +*rustle* *rustle* (must be bats nearby.) +*sniff* (I can smell the evil wumpus nearby!)]], + }, + locate_next = { + synopsis = "[You are in %i. There are pits. There are bats nearby.]", + output = "text", + text = [[Once again, you descend into %i. + +*whoosh* (I feel a draft from some pits.) +*rustle* *rustle* (must be bats nearby.)]], + }, + nemesis_first = { + synopsis = "[You have come to recover %o, but I shall keep %oh and you shall die.]", + output = "text", + text = [["So, %c. %lC has sent you to recover %o. + +"Well, I shall keep that bauble. It pleases me. You, %c, shall die."]], + }, + nemesis_next = { + text = "\"Back again, eh? Well, a mere %r is no threat to me! Die, %c!\"", + }, + nemesis_other = { + text = "\"You haven't learned your lesson, %c. You can't kill me! You shall die now.\"", + }, + nemesis_wantsit = { + text = [["I shall have %o from you, %r. Then I shall +kill you."]], + }, + nexttime = { + text = "Once again, you stand before %H.", + }, + offeredit = { + synopsis = "[You have succeeded. Take %o with you as you go to find the Amulet.]", + output = "text", + text = [["%pC! You have succeeded! I feared it was not possible! + +"You have returned with %o! + +"I fear, now, that the Centaurs will regroup and plot yet another raid. +This will take some time, but if you can recover the Amulet of Yendor +for %d before that happens, we will be eternally safe. + +"Take %o with you. It will aid in your quest for +the Amulet."]], + }, + offeredit2 = { + synopsis = "[You are the keeper of %o now. Go and find the Amulet.]", + output = "text", + text = [[%l flexes %o reverently. + +"With this wondrous bow, one need never run out of arrows. +You are its keeper now, and the time has come to resume your +search for the Amulet. %Z await your return +through the magic portal that brought you here."]], + }, + othertime = { + text = [[You have the oddest feeling that this may be the last time you +are to enter %H.]], + }, + posthanks = { + text = [["Welcome, %p. How have you fared on your quest for the Amulet +of Yendor?"]], + }, + }, + Rog = { + assignquest = { + synopsis = "[Get %o from %n and bring it to %l.]", + output = "text", + text = [["Will everyone not going to retrieve %o from that +jerk, %n, take one step backwards. Good choice, +%p, because I was going to send you anyway. My other %gp +are too valuable to me. + +"Here's the deal. I want %o, %n +has %o. You are going to get %o +and bring it back to me. So simple an assignment even you can understand +it."]], + }, + badalign = { + synopsis = "[Come back when you are really %a.]", + output = "text", + text = [["Maybe I should chain you to my perch here for a while. Perhaps watching +real %a men at work will bring some sense back to you. I don't +think I could stand the sight of you for that long though. Come back +when you can be trusted to act properly."]], + }, + badlevel = { + synopsis = "[%rA is not adequately trained to handle this job.]", + output = "text", + text = [["In the time that you've been gone you've only been able to master the +arts of %ra? I've trained ten times again as many %Rp +in that time. Maybe I should send one of them, no? Where would that +leave you, %p? Oh yeah, I remember, I was going to kill you!"]], + }, + discourage = { + "\"May I suggest a compromise. Are you interested in gold or gems?\"", + "\"Please don't force me to kill you.\"", + "\"Grim times are upon us all. Will you not see reason?\"", + "\"I knew %l, and you're no %lt, thankfully.\"", + "\"It is a shame that we are not meeting under more pleasant circumstances.\"", + "\"I was once like you are now, %p. Believe in me -- our way is better.\"", + "\"Stay with me, and I will make you %os guardian.\"", + "\"When you return, with or without %o, %l will have you killed.\"", + "\"Do not be fooled; I am prepared to kill to defend %o.\"", + "\"I can reunite you with the Twain. Oh, the stories you can swap.\"", + }, + encourage = { + "\"You don't seem to understand, %o isn't here so neither should you be!\"", + "\"May %d curse you with lead fingers. Get going!\"", + "\"We don't have all year. GET GOING!\"", + "\"How would you like a scar necklace? I'm just the jeweler to do it!\"", + "\"Lazy S.O.B. Maybe I should call up someone else...\"", + "\"Maybe I should open your skull and see if my instructions are inside?\"", + "\"This is not a task you can complete in the afterlife, you know.\"", + "\"Inside every living person is a dead person trying to get out, and I have your key!\"", + "\"We're almost out of hell-hound chow, so why don't you just get moving!\"", + "\"You know, %o isn't going to come when you whistle. You must get it yourself.\"", + }, + firsttime = { + synopsis = "[You are in Ransmannsby, where you trained. Find %l.]", + output = "menu", + text = [[Unexpectedly, you find yourself back in Ransmannsby, where you trained to +be a thief. Quickly you make the guild sign, hoping that you AND word +of your arrival reach %ls den.]], + }, + goal_first = { + synopsis = "[You sense %o.]", + output = "text", + text = [[You feel a great swelling up of courage, sensing the presence of +%o. Or is it fear?]], + }, + goal_next = { + text = "The hairs on the back of your neck whisper -- it's fear.", + }, + gotit = { + synopsis = "[You pick up %o and know that %l should not have it.]", + output = "text", + text = [[As you pick up %o, the hairs on the back of your +neck fall out. At once you realize why %n was +willing to die to keep it out of %ls hands. Somehow +you know that you must do likewise.]], + }, + guardtalk_after = { + "\"I was sure wrong about Lady Tyvefelle's house; I barely got away with my life and lost my lock pick in the process.\"", + "\"You're back? Even the Twain don't come back anymore.\"", + "\"Can you spare an old cutpurse a zorkmid for some grog?\"", + "\"Fritz tried to join the other side, and now he's hell-hound chow.\"", + "\"Be careful what you steal, I hear the boss has perfected turning rocks into worthless pieces of glass.\"", + }, + guardtalk_before = { + "\"I hear that Lady Tyvefelle's household is lightly guarded.\"", + "\"You're back? Even the Twain don't come back anymore.\"", + "\"Can you spare an old cutpurse a zorkmid for some grog?\"", + "\"Fritz tried to join the other side, and now he's hell-hound chow.\"", + "\"Be careful what you steal, I hear the boss has perfected turning rocks into worthless pieces of glass.\"", + }, + hasamulet = { + synopsis = "[Take the Amulet to the Astral Plane and find %ds temple.]", + output = "text", + text = [["I see that with your abilities, and my brains, we could rule this world. + +"All that we would need to be all-powerful is for you to take that little +trinket you've got there up to the Astral Plane. From there, %d will +show you what to do with it. Once that's done, we will be invincible!"]], + }, + killed_nemesis = { + synopsis = "[Before dying, %n tells you to use the %o wisely.]", + output = "text", + text = [["I know what you are thinking, %p. It is not too late for you +to use %o wisely. For the sake of your guild +%sp, do what is right." + +You sit and wait for death to come for %n, and then you +brace yourself for your next meeting with %l!]], + }, + leader_first = { + synopsis = "[You owe back dues to your guild. You can pay them off if you're up to the job.]", + output = "text", + text = [["Well, look who it is boys -- %p has come home. You seem to have +fallen behind in your dues. I should kill you as an example to these +other worthless cutpurses, but I have a better plan. If you are ready +maybe you could work off your back dues by performing a little job for +me. Let us just see if you are ready..."]], + }, + leader_last = { + synopsis = "[You must go.]", + output = "text", + text = [["Well %gp, it looks like our friend has forgotten who is the boss +around here. Our friend seems to think that %rp have been put in +charge. Wrong. DEAD WRONG!" + +Your sudden shift in surroundings prevents you from hearing the end +of %ls curse.]], + }, + leader_next = { + synopsis = "[Are you stupid or are you ready?]", + output = "text", + text = [["Well, I didn't expect to see you back. It shows that you are either stupid, +or you are finally ready to accept my offer. Let us hope for your sake it +isn't stupidity that brings you back."]], + }, + leader_other = { + text = [["Did you perhaps mistake me for some other %lt? You must +think me as stupid as your behavior. I warn you not to try my patience."]], + }, + locate_first = { + text = "Those damn little hairs tell you that you are nearer to %o.", + }, + locate_next = { + text = "Not wanting to face %l without having stolen %o, you continue.", + }, + nemesis_first = { + text = "\"Ah! You must be %ls ... er, `hero'. A pleasure to meet you.\"", + }, + nemesis_next = { + text = "\"We meet again. Please reconsider your actions.\"", + }, + nemesis_other = { + synopsis = "[You cannot trust %l.]", + output = "text", + text = [["Surely, %p, you have learned that you cannot trust any bargains +that %l has made. I can show you how to continue on +your quest without having to run into him again."]], + }, + nemesis_wantsit = { + synopsis = "[%lC should not have %o.]", + output = "text", + text = [["Please, think for a moment about what you are doing. Do you truly +believe that %d would want %l to have +%o?"]], + }, + nexttime = { + text = [[Once again, you find yourself back in Ransmannsby. Fond memories are +replaced by fear, knowing that %l is waiting for you.]], + }, + offeredit = { + synopsis = "[Take %o with you and go.]", + output = "text", + text = [["Well, I'll be damned. You got it. I am proud of you, a fine %r +you've turned out to be. + +"While you were gone I got to thinking, you and %o +together could bring me more treasure than either of you apart, so why don't +you take it with you. All I ask is a cut of whatever loot you come by. +That is a better deal than I offered %n. + +"But, you see what happened to %n when he refused. +Don't make me find another to send after you this time."]], + }, + offeredit2 = { + synopsis = "[Take %o and acquire the Amulet.]", + output = "text", + text = [[%lC seems tempted to swap %o for +the mundane one you detect in his pocket, but noticing your alertness, +evidently chickens out. + +"Go filch the Amulet before someone else beats you to it. +%Z are back the way you came, through the magic portal."]], + }, + othertime = { + text = [[You rub your hands through your hair, hoping that the little ones on +the back of your neck stay down, and prepare yourself for your meeting +with %l.]], + }, + posthanks = { + synopsis = "[How about trading %o for something?]", + output = "text", + text = [["Quite the little thief, aren't we, %p. Can I interest you in a +swap for %o? Look around, anything in the keep +is yours for the asking."]], + }, + }, + Sam = { + assignquest = { + synopsis = "[You must enter %i, then regain %o from %n.]", + output = "text", + text = [["Domo %p-san, indeed you are ready. I can now tell you what +it is that I require of you. + +"The daimyo, %n, has betrayed us. He has stolen from us +%o and taken it to his donjon deep within +%i. + +"If I cannot show the emperor %o when he comes +for the festival he will know that I have failed in my duty, and +request that I commit seppuku. + +"You must gain entrance to %i and retrieve the +emperor's property. Be quick! The emperor will be here for the +cha-no-you in 5 sticks. + +"Wakarimasu ka?"]], + }, + badalign = { + synopsis = "[When you can think %a and act %a then return.]", + output = "text", + text = [["%p-san, you would do better to join the kyokaku. + +"You have skills, but until you can call upon the bushido to know when and +how to use them you are not samurai. When you can think %a and +act %a then return."]], + }, + badlevel = { + synopsis = "[\"I require %Ra to defeat %n. Return when you are ready.\"]", + output = "text", + text = [["%p-san, you have learned well and honored your family. +I require the skills of %Ra in order to defeat %n. +Go and seek out teachers. Learn what they have learned. When you +are ready, return to me."]], + }, + discourage = { + "\"Ahh, I finally meet the daimyo of the kyokaku!\"", + "\"There is no honor for me in your death.\"", + "\"You know that I cannot resash my swords until they have killed.\"", + "\"Your presence only compounds the dishonor of %l in not coming %liself.\"", + "\"I will make tea with your hair and serve it to %l.\"", + "\"Your fear shows in your eyes, coward!\"", + "\"I have not heard of you, %p-san; has your life been that unworthy?\"", + "\"If you will not obey me, you will die.\"", + "\"Kneel now and make the two cuts of honor. I will tell your %sp of your honorable death.\"", + "\"Your master was a poor teacher. You will pay for his mistakes in your teaching.\"", + }, + encourage = { + "\"To defeat %n you must overcome the seven emotions: hate, adoration, joy, anxiety, anger, grief, and fear.\"", + "\"Remember your honor is my honor, you perform in my name.\"", + "\"I will go to the temple and burn incense for your safe return.\"", + "\"Sayonara.\"", + "\"There can be honor in defeat, but no gain.\"", + "\"Your kami must be strong in order to succeed.\"", + "\"You are indeed a worthy %R, but now you must be a worthy samurai.\"", + "\"If you fail, %n will be like a tai-fun on the land.\"", + "\"If you are truly %a, %d will listen.\"", + "\"Sharpen your swords and your wits for the task before you.\"", + }, + firsttime = { + synopsis = "[The banner of %n flies above town. What has happened to %l?]", + output = "menu", + text = [[Even before your senses adjust, you recognize the kami of +%H. + +You %x the standard of your teki, %n, flying above +the town. How could such a thing have happened? Why are ninja +wandering freely; where are the samurai of your daimyo, %l? + +You quickly say a prayer to Izanagi and Izanami and walk towards +town.]], + }, + goal_alt = { + text = "As you arrive once again at the home of %n.", + }, + goal_first = { + synopsis = "[You feel the taunts %n, but after offering a prayer to %d, you proceed.]", + output = "text", + text = [[In your mind, you hear the taunts of %n. + +You become like the rice plant and bend to the ground, offering a +prayer to %d. But when the wind has passed, you stand +proudly again. Putting your kami in the hands of fate, you advance.]], + }, + goal_next = { + text = [[As you arrive once again at the home of %n, your thoughts +turn only to %o.]], + }, + gotit = { + synopsis = "[You feel the power of %o and are humbled.]", + output = "text", + text = [[As you pick up %o, you feel the strength of its karma. +You realize at once why so many good samurai had to die to defend it. +You are humbled knowing that you hold one of the artifacts of the +sun goddess.]], + }, + guardtalk_after = { + "\"Come, join us in celebrating with some sake.\"", + "\"Ikaga desu ka?\"", + "\"You have brought our clan and %l much honor.\"", + "\"Please %r, sit for a while and tell us how you overcame the Ninja.\"", + "\"%lC still lives! You have saved us from becoming ronin.\"", + }, + guardtalk_before = { + "\"To succeed, you must walk like a butterfly on the wind.\"", + "\"Ikaga desu ka?\"", + "\"I fear for The Land of The Gods.\"", + "\"%nC has hired the Ninja -- be careful.\"", + "\"If %o is not returned, we will all be ronin.\"", + }, + hasamulet = { + synopsis = "[Take the Amulet to the Astral Plane to finish your task.]", + output = "text", + text = [["Ah, %p-sama. You have wasted your efforts returning home. +Now that you are in possession of the Amulet, you are honor-bound to +finish the quest you have undertaken. There will be plenty of time +for saki and stories when you have finished. + +"Go now, and may our prayers be a wind at your back."]], + }, + killed_nemesis = { + synopsis = "[%nC dies without honor.]", + output = "text", + text = [[Your healing skills tell you that %ns wounds are mortal. + +You know that the bushido tells you to finish him and let his kami +die with honor, but the thought of so many samurai dead due to this +man's dishonor prevents you from giving the final blow. + +You order that his unwashed head be given to the crows and his body +thrown into the sea.]], + }, + leader_first = { + synopsis = "[%lC needs someone to lead %lj samurai against %n. Are you ready?]", + output = "text", + text = [["Ah, %p-san, it is good to see you again. I need someone who can +lead my samurai against %n. If you are ready, you will be +that person."]], + }, + leader_last = { + synopsis = "[Leave and do not come back.]", + output = "text", + text = [["You are no longer my samurai, %p. + +"Hara-kiri is denied. You are ordered to shave your head and then to +become a monk. Your fief and family are forfeit. Wakarimasu ka?"]], + }, + leader_next = { + text = [["Once again, %p-san, you kneel before me. Are you yet capable of +being my vassal?"]], + }, + leader_other = { + synopsis = "[Are you truely a samurai?]", + output = "text", + text = [["You begin to test my matsu, %p-san. +If you cannot determine what I want in a samurai, how can I rely on you +to figure out what I need from a samurai?"]], + }, + locate_first = { + text = [[You instinctively reach for your swords. You do not recognize the +lay of this land, but you know that your teki are everywhere.]], + }, + locate_next = { + text = [[Thankful that your %sp at %H cannot see +your fear, you prepare again to advance.]], + }, + nemesis_first = { + text = [["Ah, so it is to be you, %p-san. I offer you seppuku. +I will be your second if you wish."]], + }, + nemesis_next = { + text = [["I have offered you the honorable exit. Now I will have your +head to send unwashed to %l."]], + }, + nemesis_other = { + text = "\"After I have dispatched you, I will curse your kami.\"", + }, + nemesis_wantsit = { + text = [["You have fought my samurai; surely you must know that you +will not be able to take %o back to +%H."]], + }, + nexttime = { + text = "Once again, you are back at %H.", + }, + offeredit = { + synopsis = "[The emperor wants you to take %o and recover the Amulet.]", + output = "text", + text = [[As you bow before %l, he welcomes you: + + "You have brought your family great honor, %p-sama. + + "While you have been gone the emperor's advisors have discovered in + the ancient texts that the karma of the samurai who seeks to recover + the Amulet and the karma of %o are joined + as the seasons join to make a year. + + "Because you have shown such fidelity, the emperor requests + that you take leave of other obligations and continue on the + road that fate has set your feet upon. I would consider it + an honor if you would allow me to watch your household until + you return with the Amulet." + +With that, %l bows, and places his sword atop +%o.]], + }, + offeredit2 = { + synopsis = "[Take %o, return to %Z, and recover the Amulet.]", + output = "text", + text = [[%l holds %o tightly for a moment, then returns +his gaze to you. + +"The time is ripe to recover the Amulet. Return to %Z +through the magic portal that transported you here so that you may +achieve the destiny which awaits you."]], + }, + othertime = { + synopsis = "[%HC is threatened by %n.]", + output = "text", + text = [[You are back at %H. + +Instantly you sense a subtle change in your karma. You seem to know that +if you do not succeed in your quest, %n will have destroyed +the kami of %H before you return again.]], + }, + posthanks = { + text = "%lC bows. \"%p-sama, tell us of your search for the Amulet.\"", + }, + }, + Tou = { + assignquest = { + synopsis = "[Enter %i and recover %o from %n.]", + output = "text", + text = [["You have indeed proven yourself a worthy %c, %p. + +"But now your kinfolk and I must ask you to put aside your travels and +help us in our time of need. After you left us we elected a new mayor, +%n. He proved to be a most heinous and vile creature. + +"Soon after taking office he absconded with %o +and fled town, leaving behind his henchmen to rule over us. In order +for us to regain control of our town, you must enter %i +and recover %o. + +"Do not be distracted on your quest. If you do not return quickly I fear +that all will be lost. Let us both pray now that %d will guide you +and keep you safe."]], + }, + badalign = { + synopsis = "[You are not sufficiently %a. Return when you are.]", + output = "text", + text = [["It would be an affront to %d to have one not true to the +%a path undertake her bidding. + +"You must not return to us until you have purified yourself of these +bad influences on your actions. Remember, only by following the %a +path can you hope to overcome the obstacles you will face."]], + }, + badlevel = { + synopsis = "[Return when you are %Ra.]", + output = "text", + text = [["There is still too much that you have to learn before you can undertake +the next step. Return to us as a proven %R, and perhaps then +you will be ready. + +"Go back now, and may the teachings of %d serve you well."]], + }, + discourage = { + "\"I defeated %l and I will defeat you, %p.\"", + "\"Where is %d now! You must realize no one can help you here.\"", + "\"Beg for mercy now and I may be lenient on you.\"", + "\"If you were not so %a, you might have stood a chance.\"", + "\"Vengeance is mine at last, %p.\"", + "\"I only wish that %l had a more worthy %r to send against me.\"", + "\"With %o in my possession you cannot hope to defeat me.\"", + "\"%nC has never been defeated, NEVER!\"", + "\"Are you truly the best %H has to send against me? I pity %l.\"", + "\"How do you spell %p? I want to ensure the marker on your grave is correct as a warning to your %sp.\"", + }, + encourage = { + "\"Do not be fooled by the false promises of %n.\"", + "\"To enter %i you must pass many traps.\"", + "\"If you do not return with %o, your quest will be in vain.\"", + "\"Do not be afraid to call upon %d if you truly need help.\"", + "\"If you do not destroy %n, he will follow you back here!\"", + "\"Take %o from %n and you may be able to defeat him.\"", + "\"You must hurry, %p!\"", + "\"You are like %Sa to me, %p. Do not let me down.\"", + "\"If you are %a at all times you may succeed, %p.\"", + "\"Let all who meet you on your journey know that you are on a quest for %l and grant safe passage.\"", + }, + firsttime = { + synopsis = "[You find yourself back at %H, but the quiet is ominous.]", + output = "menu", + text = [[You breathe a sigh of relief as you find yourself back in the familiar +surroundings of %H. + +You quickly notice that things do not appear the way they did when you +left. The town is dark and quiet. There are no sounds coming from +behind the town walls, and no campfires burning in the fields. As a +matter of fact, you do not %x any movement in the fields at all, and +the crops seem as though they have been untended for many weeks.]], + }, + goal_alt = { + text = "You have returned to %ns lair.", + }, + goal_first = { + text = "You sense the presence of %o.", + }, + goal_next = { + text = [[You gain confidence, knowing that you may soon be united with +%o.]], + }, + gotit = { + synopsis = "[You pick up %o and feel relief. Return it to %l.]", + output = "text", + text = [[As you pick up %o, you feel a great +weight has been lifted from your shoulders. Your only thoughts are +to quickly return to %H and find %l.]], + }, + guardtalk_after = { + "\"Gehennom on 5 zorkmids a day -- more like 500 a day if you ask me.\"", + "\"Do you know where I could find some nice postcards of The Gnomish Mines?\"", + "\"Have you tried the weird toilets?\"", + "\"If you stick around, I'll show you the pictures from my latest trip.\"", + "\"Did you bring me back any souvenirs?\"", + }, + guardtalk_before = { + "\"Gehennom on 5 zorkmids a day -- more like 500 a day if you ask me.\"", + "\"Do you know where I could find some nice postcards of The Gnomish Mines?\"", + "\"Have you tried the weird toilets?\"", + "\"Don't stay at the Inn, I hear the food is terrible and it has rats.\"", + "\"They told me that this was the off season!\"", + }, + hasamulet = { + synopsis = "[You have the Amulet. Take it to the Astral Plane to finish your task.]", + output = "text", + text = [["Stand back and let me look at you, %p. +Now that you have recovered the Amulet of Yendor, I'm afraid living +out your days in %H would seem pretty tame. + +"You have come too far to stop now, for there are still more tasks that +our oral history foretells for you. Forever more, though, your name shall +be spoken by the %gP with awe. You are truly an inspiration to your +%sp!"]], + }, + killed_nemesis = { + synopsis = "[%nC curses at you as %nh dies.]", + output = "text", + text = [[You turn in the direction of %n. As his earthly body begins +to vanish before your eyes, you hear him curse: + + "You shall never be rid of me, %p! + I will find you where ever you go and regain what is rightly mine."]], + }, + leader_first = { + synopsis = "[Someone must defeat %n. Are your ready?]", + output = "text", + text = [["Is it really you, %p! I had given up hope for your return. +As you can %x, we are desperately in need of your talents. Someone must +defeat %n if our town is to become what it once was. + +"Let me see if you are ready to be that someone."]], + }, + leader_last = { + synopsis = "[Leave %H and never return.]", + output = "text", + text = [["It is too late, %p. You are not even worthy to die amongst us. +Leave %H and never return."]], + }, + leader_next = { + text = "\"Things are getting worse, %p. I hope that this time you are ready.\"", + }, + leader_other = { + text = "\"I hope that for the sake of %H you have prepared yourself this time.\"", + }, + locate_first = { + synopsis = "[You %x the handiwork of %ns henchlings.]", + output = "text", + text = [[Only your faith in %d keeps you from trembling. You %x +the handiwork of %ns henchlings everywhere.]], + }, + locate_next = { + text = "You know that this time you must find and destroy %n.", + }, + nemesis_first = { + synopsis = "[%rA will not defeat me.]", + output = "text", + text = [["So, %p, %l thinks that you can wrest +%o from me! + +"It only proves how desperate he has become that he sends %ra to +try and defeat me. When this day is over, I will have you enslaved +in the mines where you will rue the day that you ever entered +%i."]], + }, + nemesis_next = { + text = [["I let you live the last time because it gave me pleasure. +This time I will destroy you, %p."]], + }, + nemesis_other = { + synopsis = "[Run away or you will suffer severely.]", + output = "text", + text = [["These meetings come to bore me. You disturb my workings with +%o. + +"If you do not run away now, I will inflict so much suffering on you that +%l will feel guilty for ever having sent his %S to me!"]], + }, + nemesis_wantsit = { + synopsis = "[\"Return %o to me and we will rule %H.\"]", + output = "text", + text = [["You fool. You do not know how to call upon the powers of +%o. + +"Return it to me and I will teach you how to use it, and together we +will rule %H. But do so now, as my patience grows thin."]], + }, + nexttime = { + text = "Once again, you are back at %H.", + }, + offeredit = { + synopsis = "[Take %o and with %ds guidance, recover the Amulet.]", + output = "text", + text = [[As %l detects the presence of %o, +he almost smiles for the first time in many a full moon. + +As he looks up from %o he says: + + "You have recovered %o. You are its + owner now, but not its master. Let it work with you as you continue + your journey. With its help, and %d to guide you on the + %a path, you may yet recover the Amulet of Yendor."]], + }, + offeredit2 = { + synopsis = "[Keep %o and return to %Z through the portal.]", + output = "text", + text = [["%oC is yours now. %Z +await your return through the magic portal that brought you here."]], + }, + othertime = { + text = [[You are back at %H. +Things appear to have become so bad that you fear that soon +%H will not be here to return to.]], + }, + posthanks = { + text = [["I could not be more proud than if you were my own %S, %p! +Tell me of your adventures in quest of the Amulet of Yendor."]], + }, + }, + Val = { + assignquest = { + synopsis = "[Find %i; defeat %n; return with %o.]", + output = "text", + text = [["It is not clear, %p, for my sight is limited without our relic. +But it is now likely that you can defeat %n, and recover +%o. + +"A short time ago, %n and his minions attacked this place. They +opened the huge volcanic vents you %x about the hill, and attacked. I knew +that this was to come to pass, and had asked %d for a group of %gP +to help defend this place. The few you %x here are the mightiest of +Valhalla's own, and are all that are left of one hundred %d sent. + +"Despite the great and glorious battle we fought, %n managed at +last to steal %o. This has upset the balance of the universe, +and unless %oh is returned into my care, %n may start Ragnarok. + +"You must find the entrance to %i. Travel downward +from there and you will find %ns lair. Defeat him and +return %o to me."]], + }, + badalign = { + synopsis = "[You have strayed from the %a path. Return after you purify yourself.]", + output = "text", + text = [["NO! This is terrible. I see you becoming an ally of %n, and +leading his armies in the final great battles. This must not come to +pass! You have strayed from the %a path. You must purge yourself, +and return here only when you have regained a state of purity."]], + }, + badlevel = { + synopsis = "[Come back when you are %Ra.]", + output = "text", + text = [["I see you and %n fighting, %p. But you are not prepared and +shall die at %ns hand if you proceed. No. This will not do. +Go back out into the world, and grow more experienced at the ways of war. +Only when you have returned %Ra will you be able to defeat %n."]], + }, + discourage = { + "\"I am your death, %c.\"", + "\"You cannot prevail, %r. I have foreseen your every move.\"", + "\"With you out of the way, Valhalla will be mine for the taking.\"", + "\"I killed scores of %ds best when I took %o. Do you really think that one %c can stand against me?\"", + "\"Who bears the souls of %cP to Valhalla, %r?\"", + "\"No, %d cannot help you here.\"", + "\"Some instrument of %d you are, %p. You are a weakling!\"", + "\"Never have I seen %ca so clumsy in battle.\"", + "\"You die now, little %s.\"", + "\"Your body I destroy now, your soul when my hordes overrun Valhalla!\"", + }, + encourage = { + "\"Go with the blessings of %d.\"", + "\"Call upon %d when you are in need.\"", + "\"Use %o if you can. It will protect you.\"", + "\"Magical cold is very effective against %n.\"", + "\"To face %n, you will need to be immune to fire.\"", + "\"May %d strengthen your sword-arm.\"", + "\"Trust in %d. He will not desert you.\"", + "\"It becomes more likely that Ragnarok will come with every passing moment. You must hurry, %p.\"", + "\"If %n can master %o, he will be powerful enough to face %d far earlier than is fated. This must not be!\"", + "\"Remember your training, %p. You can succeed.\"", + }, + firsttime = { + synopsis = "[You arrive below %H. Something is wrong; there is lava present.]", + output = "menu", + text = [[You materialize at the base of a snowy hill. Atop the hill sits +a place you know well, %H. You immediately realize +that something here is very wrong! + +In places, the snow and ice have been melted into steaming pools of +water. Fumaroles and pools of bubbling lava surround the hill. +The stench of sulphur is carried through the air, and you %x creatures +that should not be able to live in this environment moving towards you.]], + }, + goal_first = { + synopsis = "[This is the lair of %n.]", + output = "text", + text = [[Through clouds of sulphurous gasses, you %x a rock palisade +surrounded with a moat of bubbling lava. You remember the description +from something that %l said. This is the lair of %n.]], + }, + goal_next = { + text = "Once again, you stand in sight of %ns lair.", + }, + gotit = { + synopsis = "[You must return %o to %l.]", + output = "text", + text = [[As you pick up %o, your mind is suddenly filled with images, +and you perceive all of the possibilities of each potential choice you +could make. As you begin to control and channel your thoughts, you +realize that you must return %o to %l immediately.]], + }, + guardtalk_after = { + "\"Hail, and well met, brave %c.\"", + "\"May %d guide your steps, %p.\"", + "\"%lC told us you had succeeded!\"", + "\"You recovered %o just in time, %p.\"", + "\"Hail %d, for delivering %o back to us.\"", + }, + guardtalk_before = { + "\"Hail, and well met, brave %c.\"", + "\"May %d guide your steps, %p.\"", + "\"%lC weakens. Without %o, her foresight is dim.\"", + "\"You must hurry, %p, else Ragnarok may well come.\"", + "\"I would deal with this foul %n myself, but %d forbids it.\"", + }, + hasamulet = { + synopsis = "[Take the Amulet to %ds temple on the Astral Plane and offer it.]", + output = "text", + text = [["Excellent, %p. I see you have recovered the Amulet! + +"You must take the Amulet to the Great Temple of %d, on the Astral +Plane. There you must offer the Amulet to %d. + +"Go now, my %S. I cannot tell you your fate, as the power of the +Amulet interferes with mine. I hope for your success."]], + }, + killed_nemesis = { + synopsis = "[%nC dies.]", + output = "text", + text = [[A look of surprise and horror appears on %ns face. + + "No!!! %o has lied to me! I have been misled!" + +Suddenly, %n grasps his head and screams in agony, then dies.]], + }, + leader_first = { + synopsis = "[We need your aid. Are you ready?]", + output = "text", + text = [["Ah, %p, my %S. You have returned to %H +at last. We are in dire need of your aid, but I must determine if you +are yet ready for such an undertaking. + +"Let me read your fate..."]], + }, + leader_last = { + synopsis = "[\"Begone from my presence and never return.\"]", + output = "text", + text = [["No, %p. Your fate is sealed. I must cast about for another +champion. Begone from my presence, and never return. Know this, that +you shall never succeed in this life, and Valhalla is denied to you."]], + }, + leader_next = { + text = [["Let me read the future for you now, %p, perhaps you have managed to +change it enough..."]], + }, + leader_other = { + text = [["Again, I shall read your fate, my %S. Let us both hope that you have +made changes to become ready for this task..."]], + }, + locate_first = { + synopsis = "[This is the entrance to %i.]", + output = "text", + text = [[The ice and snow gives way to a valley floor. You %x ahead of you +a huge round hill surrounded by pools of lava. This then is the entrance +to %i. It looks like you're not going to get in without +a fight though.]], + }, + locate_next = { + text = "Once again, you stand before the entrance to %i.", + }, + nemesis_first = { + synopsis = "[\"%oC has shown me that I must kill you.\"]", + output = "text", + text = [["So! %lC has finally sent %ca to challenge me! + +"I thought that mastering %o would enable me to challenge +%d, but it has shown me that first I must kill you! So come, little +%s. Once I defeat you, I can at last begin the final battle with %d."]], + }, + nemesis_next = { + text = "\"Again you challenge me, %r. Good. I will kill you now.\"", + }, + nemesis_other = { + text = "\"Have you not learned yet? You cannot defeat %n!\"", + }, + nemesis_wantsit = { + text = "\"I will kill you, %c, and wrest %o from your mangled hands.\"", + }, + nexttime = { + text = "Once again, you are near the abode of %l.", + }, + offeredit = { + synopsis = "[Take %o. Search for the Amulet.]", + output = "text", + text = [[As you approach, %l rises and touches %o. + +"You may take %o with you, %p. I have removed from +it the power to foretell the future, for that power no mortal should +have. Its other abilities, however, you have at your disposal. + +"You must now begin in %ds name to search for the Amulet of Yendor. +May your steps be guided by %d, my %S."]], + }, + offeredit2 = { + synopsis = "[You are %os keeper now. Return through the portal and find the Amulet.]", + output = "text", + text = [["Careful, %p! %oC might break, and that would be +a tragic loss. You are its keeper now, and the time has come to +resume your search for the Amulet. %Z await your +return through the magic portal that brought you here."]], + }, + othertime = { + text = [[Again you materialize near %ls abode. You have a nagging feeling +that this may be the last time you come here.]], + }, + posthanks = { + text = [["Greetings, %p. I have not been able to pay as much attention to +your search for the Amulet as I have wished. How do you fare?"]], + }, + }, + Wiz = { + assignquest = { + synopsis = "[Travel to %i; overcome %n; return with %o.]", + output = "text", + text = [["Yes, %p, you truly are ready for this dire task. Listen, +carefully, for what I tell you now will be of vital importance. + +"Since you left us to hone your skills in the world, we unexpectedly came +under attack by the forces of %n. As you know, we thought +%n had perished at the end of the last age, but, alas, this was +not the case. + +"%nC sent an army of abominations against us. Among them was a +minion, mindless and ensorcelled, and thus, in the confusion, it was +able to penetrate our defenses. Alas, this creature has stolen +%o and I fear has delivered %oh to %n. + +"Over the years, I had woven most of my power into this amulet, and thus, +without it, I have but a shadow of my former power, and I fear that I +shall soon perish. + +"You must travel to %i, and within its dungeons, +find and overcome %n, and return %o to me. + +"Go now, with %d, and complete this quest before it is too late."]], + }, + badalign = { + synopsis = "[Go; come back when you are worthy of %d.]", + output = "text", + text = [["You amaze me, %p! How many times did I tell you that the way of a mage +is an exacting one. One must use the world with care, lest one leave it +in ruins and simplify the task of %n. + +"You must go back and show your worthiness. Do not return until you are +truly ready for this quest. May %d guide you in this task."]], + }, + badlevel = { + synopsis = "[Go; return when you are %Ra.]", + output = "text", + text = [["Alas, %p, you have not yet shown your proficiency as a worthy +spellcaster. As %ra, you would surely be overcome in the challenge +ahead. Go, now, expand your horizons, and return when you have attained +renown as %Ra."]], + }, + discourage = { + "\"Your puny powers are no match for me, fool!\"", + "\"When you are defeated, your torment will last for a thousand years.\"", + "\"After your downfall, %p, I shall devour %l for dessert!\"", + "\"Are you ready yet to beg for mercy? I could be lenient...\"", + "\"Your soul shall join the enslaved multitude I command!\"", + "\"Your lack of will is evident, and you shall die as a result.\"", + "\"Your faith in %d is for naught! Come, submit to me now!\"", + "\"A mere %r is nothing compared to my skill!\"", + "\"So, you are the best hope of %l? How droll.\"", + "\"Feel my power, %c! My victory is imminent!\"", + }, + encourage = { + "\"Beware, for %n is immune to most magical attacks.\"", + "\"To enter %i you must pass many traps.\"", + "\"%nC may be vulnerable to physical attacks.\"", + "\"%d will come to your aid when you call.\"", + "\"You must utterly destroy %n. He will pursue you otherwise.\"", + "\"%oC is a mighty artifact. With it you can destroy %n.\"", + "\"Go forth with the blessings of %d.\"", + "\"I will have my %gP watch for your return.\"", + "\"Feel free to take any items in that chest that might aid you.\"", + "\"You will know when %o is near. Proceed with care!\"", + }, + firsttime = { + synopsis = "[You have arrived at %ls tower but something is very wrong.]", + output = "menu", + text = [[You are suddenly in familiar surroundings. You notice what appears to +be a large, squat stone structure nearby. Wait! That looks like the +tower of your former teacher, %l. + +However, things are not the same as when you were last here. Mists and +areas of unexplained darkness surround the tower. There is movement in +the shadows. + +Your teacher would never allow such unaesthetic forms to surround the +tower... unless something were dreadfully wrong!]], + }, + goal_alt = { + text = "You have returned to %ns lair.", + }, + goal_first = { + text = "You feel your mentor's presence; perhaps %o is nearby.", + }, + goal_next = { + text = "The aura of %o tingles at the edge of your perception.", + }, + gotit = { + synopsis = "[You feel %os power and know you should return %oh to %l.]", + output = "text", + text = [[As you touch %o, its comforting power infuses you +with new energy. You feel as if you can detect others' thoughts flowing +through it. Although you yearn to wear %o and +attack the Wizard of Yendor, you know you must return it to its rightful +owner, %l.]], + }, + guardtalk_after = { + "\"I have some eye of newt to trade, do you have a spare blind-worm's sting?\"", + "\"The magic portal now seems like it will remain stable for quite some time.\"", + "\"Have you noticed how much stronger %l is since %o was recovered?\"", + "\"Thank %d! We weren't positive you would defeat %n.\"", + "\"I, too, will venture into the world, because %n was but one of many evils to be vanquished.\"", + }, + guardtalk_before = { + "\"Would you happen to have some eye of newt in that overstuffed pack, %s?\"", + "\"Ah, the spell to create the magic portal worked. Outstanding!\"", + "\"Hurry! %lC may not survive that casting of the portal spell!\"", + "\"The spells of %n were just too powerful for us to withstand.\"", + "\"I, too, will venture into the world, because %n is but one of many evils to be vanquished.\"", + }, + hasamulet = { + synopsis = "[Take the Amulet to %ds altar on the Astral Plane.]", + output = "text", + text = [["Congratulations, %p. I always knew that if anyone could succeed +in defeating the Wizard of Yendor and his minions, it would be you. + +"Go now, and take the Amulet to the Astral Plane. Once there, present +the Amulet on the altar of %d. Along the way you shall pass through +the four Elemental Planes. These planes are like nothing you have ever +experienced before, so be prepared! + +"For this you were born, %s! I am very proud of you."]], + }, + killed_nemesis = { + synopsis = "[%nC curses you as %nh dies.]", + output = "text", + text = [[%nC, whose body begins to shrivel up, croaks out: + + "I shall haunt your progress until the end of time. A thousand + curses on you and %l." + +Then, the body bursts into a cloud of choking dust, and blows away.]], + }, + leader_first = { + synopsis = "[You have come a long way, but are you ready for the task I require?]", + output = "text", + text = [["Come closer, %p, for my voice falters in my old age. +Yes, I see that you have come a long way since you went out into the +world, leaving the safe confines of this tower. However, I must first +determine if you have all of the skills required to take on the task +I require of you."]], + }, + leader_last = { + synopsis = "[\"Get out of here!\"]", + output = "text", + text = [["You fool, %p! Why did I waste all of those years teaching you +the esoteric arts? Get out of here! I shall find another."]], + }, + leader_next = { + text = "\"Well, %p, you have returned. Perhaps you are now ready...\"", + }, + leader_other = { + text = [["This is getting tedious, %p, but perseverance is a sign of a true mage. +I certainly hope that you are truly ready this time!"]], + }, + locate_first = { + text = "Wisps of fog swirl nearby. You feel that %ns lair is close.", + }, + locate_next = { + text = "You believe that you may once again invade %i.", + }, + nemesis_first = { + synopsis = "[\"Your destruction should make for good sport.\"]", + output = "text", + text = [["Ah, I recognize you, %p. So, %l has sent you to steal +%o from me, hmmm? Well, %lh is a fool to send such +a mental weakling against me. + +"Your destruction, however, should make for good sport. In the end, you +shall beg me to kill you!"]], + }, + nemesis_next = { + synopsis = "[\"Your soul shall soon be mine to command.\"]", + output = "text", + text = [["How nice of you to return, %p! I enjoyed our last meeting. Are you +still hungry for more pain? + +"Come! Your soul, like %o, shall soon be mine to command."]], + }, + nemesis_other = { + text = [["I'm sure that your perseverance shall be the subject of innumerable +ballads, but you shall not be around to hear them, I fear!"]], + }, + nemesis_wantsit = { + text = [["Thief! %oC belongs to me, now. I shall feed +your living flesh to my minions."]], + }, + nexttime = { + text = "Once again, you are back at %H.", + }, + offeredit = { + synopsis = "[Take %o with you in your quest for the Amulet.]", + output = "text", + text = [[%lC notices %o in your possession, +beams at you and says: + + "I knew you could defeat %n and retrieve + %o. We shall never forget this + brave service. + + "Take %oh with you in your quest for the Amulet of Yendor. + I can sense that it has attuned %oiself to you already. + + "May %d guide you in your quest, and keep you from harm."]], + }, + offeredit2 = { + synopsis = "[Keep %o, return through the portal to %Z; find the other Amulet.]", + output = "text", + text = [["You are the keeper of %o now. It is time to +recover the /other/ Amulet. %Z await your return through +the magic portal which brought you here."]], + }, + othertime = { + text = [[You are back at %H. +You have an odd feeling this may be the last time you ever come here.]], + }, + posthanks = { + text = [["Come near, my %S, and share your adventures with me. +So, have you succeeded in your quest for the Amulet of Yendor?"]], + }, + }, +} diff --git a/dat/quest.txt b/dat/quest.txt deleted file mode 100644 index 269ec76a1..000000000 --- a/dat/quest.txt +++ /dev/null @@ -1,3521 +0,0 @@ -# NetHack 3.6 quest.txt $NHDT-Date: 1505170340 2017/09/11 22:52:20 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.34 $ -# Copyright (c) 1991 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# -# The quest text file for NetHack 3.4 -# -# These are the "standard" message numbers from qtext.h. All class -# dialogue must have at least these entries. -# -# QT_FIRSTTIME 1 -# QT_NEXTTIME 2 -# QT_OTHERTIME 3 -# -# QT_GUARDTALK 5 /* 5 random things guards say before quest */ -# QT_GUARDTALK2 10 /* 5 random things guards say after quest */ -# -# QT_FIRSTLEADER 15 -# QT_NEXTLEADER 16 -# QT_OTHERLEADER 17 -# QT_LASTLEADER 18 -# QT_BADLEVEL 19 -# QT_BADALIGN 20 -# QT_ASSIGNQUEST 21 -# -# QT_ENCOURAGE 25 /* 1-10 random encouragement messages */ -# -# QT_FIRSTLOCATE 35 -# QT_NEXTLOCATE 36 -# -# QT_FIRSTGOAL 40 /* %n (nemesis) and %o (artifact) will always -# be present on first visit in normal play */ -# QT_NEXTGOAL 41 /* subsequent visits to goal level */ -# QT_ALTGOAL 42 /* alternate to NEXTGOAL if quest artifact -# is absent from the level (optional) */ -# QT_FIRSTNEMESIS 50 -# QT_NEXTNEMESIS 51 -# QT_OTHERNEMESIS 52 -# QT_NEMWANTSIT 53 /* you somehow got the artifact */ -# -# QT_DISCOURAGE 60 /* 1-10 random maledictive messages */ -# -# QT_GOTIT 70 -# -# QT_KILLEDNEM 80 -# QT_OFFEREDIT 81 -# QT_OFFEREDIT2 82 /* if you throw artifact to leader after #81 */ -# -# QT_POSTHANKS 90 -# QT_HASAMULET 91 -# -# -# Archeologist -# -%Cc Arc 00001 -You are suddenly in familiar surroundings. The buildings in the distance -seem to be those of your old alma mater, but something is wrong. It feels -as if there has been a riot recently, or %H has -been under siege. - -All of the windows are boarded up, and there are objects scattered around -the entrance. - -Strange forbidding shapes seem to be moving in the distance. -%E [You arrive at %H, but all is not well.] -%Cp Arc 00002 -Once again, you are back at %H. -%E -%Cp Arc 00003 -You are back at %H. -You have an odd feeling this may be the last time you ever come here. -%E -%Cp Arc 00005 -"Did you see Lash LaRue in 'Song of Old Wyoming' the other night?" -%E -%Cp Arc 00006 -"Hey man, got any potions of hallucination for sale?" -%E -%Cp Arc 00007 -"Did you see the artifact %l brought back from the last dig?" -%E -%Cp Arc 00008 -"So what species do *you* think we evolved from?" -%E -%Cp Arc 00009 -"So you're %ls prize pupil! I don't know what he sees in you." -%E -%Cp Arc 00010 -"Did you see Lash LaRue in 'Song of Old Wyoming' the other night?" -%E -%Cp Arc 00011 -"Hey man, got any potions of hallucination for sale?" -%E -%Cp Arc 00012 -"I guess you are guaranteed to make full professor now." -%E -%Cp Arc 00013 -"So, what was worse, %n or your entrance exams?" -%E -%Cp Arc 00014 -"%oC is impressive, but nothing like the bones I dug up!" -%E -%Cc Arc 00015 -"Finally you have returned, %p. You were always -my most promising student. Allow me to see if you are ready for the -most difficult task of your career." -%E ["You have returned, %p, to a difficult task."] -%Cp Arc 00016 -"Again, %p, you stand before me. -Let me see if you have gained experience in the interim." -%E -%Cp Arc 00017 -"Once more, %p, you have returned from the field. -Are you finally ready for the task that must be accomplished?" -%E -%Cc Arc 00018 -"%p, you have failed us. All of my careful training has been in -vain. Begone! Your tenure at this college has been revoked! - -"You are a disgrace to the profession!" -%E ["%pC, you have failed us. Begone!"] -%Cc Arc 00019 -"%p, you are yet too inexperienced to undertake such a demanding -quest. A mere %r could not possibly face the rigors demanded and -survive. Go forth, and come here again when your adventures have further -taught you." -%E [%pC, a mere %r is too inexperienced.] -%Cc Arc 00020 -"%pC! I've heard that you've been using sloppy techniques. Your -results lately can hardly be called suitable for %ra! - -"How could you have strayed from the %a path? Go from here, and come -back only when you have purified yourself." -%E ["%pC, you have strayed from the %a path. Purify yourself!"] -%Cc Arc 00021 -"Grave times have befallen the college, for %na has -stolen %o. Without it, the board of directors of -the university will soon have no choice but to revoke our research grants. - -"You must locate the entrance to %i. Within it, -you will find %n. - -"You must then defeat %n and return %o -to me. - -"Only in this way will we be able to prevent the budget cuts that could -close this college. - -"May the wisdom of %d be your guide." -%E [%nC has stolen %o. Locate %i, defeat %ni, and return %O.] -%Cp Arc 00025 -"Beware, for %n is powerful and cunning." -%E -%Cp Arc 00026 -"To locate the entrance to %i, you must pass -many traps." -%E -%Cp Arc 00027 -"A %nt may be vulnerable to attacks by magical cold." -%E -%Cp Arc 00028 -"Call upon %d when you encounter %n." -%E -%Cp Arc 00029 -"You must destroy %n. It will pursue you otherwise." -%E -%Cp Arc 00030 -"%oC is a mighty talisman. With it you -can destroy %n." -%E -%Cp Arc 00031 -"Go forth with the blessings of %d." -%E -%Cp Arc 00032 -"I will have my %gP watch for your return." -%E -%Cp Arc 00033 -"Remember not to stray from the true %a path." -%E -%Cp Arc 00034 -"You may be able to sense %o when you are near." -%E -%Cc Arc 00035 -A plain opens before you. Beyond the plain lies a foreboding edifice. - -You have the feeling that you will soon find the entrance to -%i. -%E [This foreboding edifice must hide the entrance to %i.] -%Cp Arc 00036 -Once again, you are near the entrance to %i. -%E -%Cc Arc 00040 -A strange feeling washes over you, and you think back to things you -learned during the many lectures of %l. - -You realize the feeling must be the presence of %o. -%E [This strange feeling must be the presence of %o.] -%Cp Arc 00041 -The familiar presence of %o is in the ether. -%E -# delivered instead of 00041 if %o is not on the level anymore; -# hero might already be carrying it, so don't say anything like -# "%o's presence can't be felt" -%Cp Arc 00042 -The have returned to %ns lair. -%E -%Cc Arc 00050 -"So, %p, you think that you can succeed in recovering -%o, when your teacher, %l, has already failed. - -"Come, try your best! I shall destroy you, and gnaw on your bones." -%E ["Come, %p, I shall destroy you!"] -%Cc Arc 00051 -"Again you try to best me, eh %p? Well, you shall fail again. - -"You shall never recover %o. - -"I shall bear your soul to the Plane of Origins for my master's pleasure." -%E ["Again you try to best me, %p? You shall never recover %o."] -%Cp Arc 00052 -"You persist yet %p! Good. Now, you shall die!" -%E -%Cp Arc 00053 -"I shall have %o from you, %p, then feast -upon your entrails!" -%E -%Cp Arc 00060 -"Try your best, %p. You cannot defeat me." -%E -%Cp Arc 00061 -"I shall rend the flesh from your body whilst you still breathe!" -%E -%Cp Arc 00062 -"First you, %p, then I shall destroy your mentor, %l." -%E -%Cp Arc 00063 -"Tiring yet, %p? I draw my power from my master and cannot -falter!" -%E -%Cp Arc 00064 -"I shall rend thy soul from thy body and consume it!" -%E -%Cp Arc 00065 -"You are far too %a -- it weakens you. You shall die in this place." -%E -%Cp Arc 00066 -"%d has forsaken you! You are lost now!" -%E -%Cp Arc 00067 -"A mere %r cannot hope to defeat me!" -%E -%Cp Arc 00068 -"If you are the best %l can send, I have nothing to fear." -%E -%Cp Arc 00069 -"Die %c! I shall exhibit your carcass as a trophy." -%E -%Cc Arc 00070 -The power of %o flows through your body! You feel -as if you could now take on the Wizard of Yendor himself and win, but -you know you must return %o to %l. -%E [The power of %o flows through your body! You must return it to %l.] -%Cp Arc 00080 -The body of %n dissipates in a cloud of noxious fumes. -%E -%Cc Arc 00081 -%lC touches %o briefly, gazes into it, -then smiles at you and says: - -"Well done, %p. You have defeated %n and -recovered %o. But I fear that it shall never be safe -here. - -Please take %o with you. You, %p, can -guard it now far better than I. - -May the blessings of %d follow you and guard you." -%E [%lC instructs you to guard %o from now on.] -# assumes Orb of Detection (glass object) -%Cc Arc 00082 -"Careful, %p! %oC might break, and that would be -a tragic loss. You are its keeper now, and the time has come to -resume your search for the Amulet. %Z await your -return through the magic portal that brought you here." -%E ["Resume your search for the Amulet beyond the magic portal to %Z."] -%Cc Arc 00090 -"Welcome back, %p. Have you progressed with your quest to -regain the Amulet of Yendor for %d?" -%E ["Have you progressed with your quest to regain the Amulet of Yendor for %d?"] -%Cc Arc 00091 -"Congratulations, %p. I wondered if anyone could prevail against -the Wizard and the minions of Moloch. Now, you must embark on one -final adventure. - -"Take the Amulet, and find your way onto the Astral Plane. -There you must find the altar of %d and sacrifice the -Amulet on that altar to fulfill your destiny. - -"Remember, your path now should always be upwards." -%E [Take the Amulet to the Astral Plane and sacrifice it at the altar of %d.] -# -# Barbarian -# -%Cc Bar 00001 -Warily you scan your surroundings, all of your senses alert for signs -of possible danger. Off in the distance, you can %x the familiar shapes -of %H. - -But why, you think, should %l be there? - -Suddenly, the hairs on your neck stand on end as you detect the aura of -evil magic in the air. - -Without thought, you ready your weapon, and mutter under your breath: - - "By %d, there will be blood spilt today." -%E [You reach the vicinity of %H, but sense evil magic nearby.] -%Cp Bar 00002 -Once again, you near %H. You know that %l -will be waiting. -%E -%Cp Bar 00003 -Again, and you think possibly for the last time, you approach -%H. -%E -%Cp Bar 00005 -"The battles here have been good -- our enemies' blood soaks the soil!" -%E -%Cp Bar 00006 -"Remember that glory is crushing your enemies beneath your feet!" -%E -%Cp Bar 00007 -"There has been little treasure to loot, since the horde arrived." -%E -%Cp Bar 00008 -"The horde is mighty in numbers, but they have little courage." -%E -%Cp Bar 00009 -"%lC is a strange one, but he has helped defend us." -%E -%Cp Bar 00010 -"The battles here have been good -- our enemies' blood soaks the soil!" -%E -%Cp Bar 00011 -"Remember that glory is crushing your enemies beneath your feet!" -%E -%Cp Bar 00012 -"Times will be good again, now that the horde is vanquished." -%E -%Cp Bar 00013 -"You have brought our clan much honor in defeating %n." -%E -%Cp Bar 00014 -"You will be a worthy successor to %l." -%E -%Cc Bar 00015 -"Ah, %p. You have returned at last. The world is in dire -need of your help. There is a great quest you must undertake. - -"But first, I must see if you are ready to take on such a challenge." -%E ["At last you have returned. There is a great quest you must undertake."] -%Cp Bar 00016 -"%p, you are back. Are you ready now for the challenge?" -%E -%Cp Bar 00017 -"Again, you stand before me, %p. Surely you have prepared yourself." -%E -%Cc Bar 00018 -"Pah! You have betrayed the gods, %p. You will never attain -the glory which you aspire to. Your failure to follow the true path has -closed this future to you. - -"I will protect these people as best I can, but soon %n will overcome -me and destroy all who once called you %s. Now begone!" -%E ["You have betrayed %d; soon %n will destroy us. Begone!"] -%Cc Bar 00019 -"%p, I fear that you are as yet too inexperienced to face -%n. Only %Ra with the help of %d could ever hope to -defeat %ni." -%E ["You are too inexperienced. Come back when you are %Ra."] -%Cc Bar 00020 -"%pC! You have wandered from the path of the %a! -If you attempt to overcome %n in this state, he will surely -enslave your soul. Your only hope, and ours, lies in your purification. -Go forth, and return when you feel ready." -%E ["You have wandered from the path of the %a. Come back when you have atoned."] -%Cc Bar 00021 -"The world is in great need of your assistance, %p. - -"About six months ago, I learned that a mysterious sorcerer, known -as %n, had begun to gather a large group of cutthroats and brigands -about %ni. - -"At about the same time, these people you once rode with `liberated' a -potent magical talisman, %o, from a Turanian caravan. - -"%nC and %nj Black Horde swept down upon %i and defeated -the people there, driving them out into the desert. He has taken -%o, and seeks to bend it to %nj will. I detected the -subtle changes in the currents of fate, and joined these people. -Then I sent forth a summons for you. - -"If %n can bend %o to %nj will, he will become -almost indestructible. He will then be able to enslave the minds of -men across the world. You are the only hope. The gods smile upon you, -and with %d behind you, you alone can defeat %n. - -"You must go to %i. From there, you can track down -%n, defeat %ni, and return %o to us. Only -then will the world be safe." -%E ["Find %n, defeat %ni, and return %o to us."] -%Cp Bar 00025 -"%nC is strong in the dark arts, but not immune to cold steel." -%E -%Cp Bar 00026 -"Remember that %n is a great sorcerer. He lived in the time -of Atlantis." -%E -%Cp Bar 00027 -"If you fail, %p, I will not be able to protect these people long." -%E -%Cp Bar 00028 -"To enter %i, you must be very stealthy. The horde will be on -guard." -%E -%Cp Bar 00029 -"Call upon %d in your time of need." -%E -%Cp Bar 00030 -"May %d protect you, and guide your steps." -%E -%Cp Bar 00031 -"If you can lay hands upon %o, carry it for good fortune." -%E -%Cp Bar 00032 -"I cannot stand against %ns sorcery. But %d will help you." -%E -%Cp Bar 00033 -"Do not fear %n. I know you can defeat %ni." -%E -%Cp Bar 00034 -"You have a great road to travel, %p, but only after you defeat -%n." -%E -%Cc Bar 00035 -The scent of water comes to you in the desert breeze. You know that -you have located %i. -%E [You have located %i.] -%Cp Bar 00036 -Yet again you have a chance to infiltrate %i. -%E -%Cc Bar 00040 -The hairs on the nape of your neck lift as you sense an energy in the -very air around you. You fight down a primordial panic that seeks to -make you turn and run. This is surely the lair of %n. -%E [This is surely the lair of %n.] -%Cp Bar 00041 -Yet again you feel the air around you heavy with malevolent magical energy. -%E -%Cc Bar 00050 -"So. This is what that second rate sorcerer %l sends to do %lj bidding. -I have slain many before you. You shall give me little sport. - -"Prepare to die, %c." -%E [%nC boasts that %nh has slain many. "Prepare to die, %c."] -%Cp Bar 00051 -"I have wasted too much time on you already. Now, you shall die." -%E -%Cp Bar 00052 -"You return yet again, %c! Are you prepared for death now?" -%E -%Cp Bar 00053 -"I shall have %o back, you pitiful excuse for %ca. -And your life as well." -%E -%Cp Bar 00060 -"My pets will dine on your carcass tonight!" -%E -%Cp Bar 00061 -"You are a sorry excuse for %ra." -%E -%Cp Bar 00062 -"Run while you can, %c. My next spell will be your last." -%E -%Cp Bar 00063 -"I shall use your very skin to bind my next grimoire." -%E -%Cp Bar 00064 -"%d cannot protect you now. Here, you die." -%E -%Cp Bar 00065 -"Your %a nature makes you weak. You cannot defeat me." -%E -%Cp Bar 00066 -"Come, %c. I shall kill you, then unleash the horde on your tribe." -%E -%Cp Bar 00067 -"Once you are dead, my horde shall finish off %l, and your tribe." -%E -%Cp Bar 00068 -"Fight, %c, or are you afraid of the mighty %n?" -%E -%Cp Bar 00069 -"You have failed, %c. Now, my victory is complete." -%E -%Cc Bar 00070 -As you pick up %o, you feel the power of it -flowing through your hands. It seems to be in two or more places -at once, even though you are holding it. -%E [You feel the power of %o flowing through your hands.] -%Cc Bar 00080 -%nC falls to the ground, and utters a last curse at you. Then %nj -body fades slowly, seemingly dispersing into the air around you. You -slowly become aware that the overpowering aura of magic in the air has -begun to fade. -%E [%nC curses you, but you feel the overpowering aura of magic fading.] -%Cc Bar 00081 -When %l sees %o, he smiles, and says: - - Well done, %p. You have saved the world from certain doom. - What, now, should be done with %o? - - These people, brave as they are, cannot hope to guard it from - other sorcerers who will detect it, as surely as %n did. - - Take %o with you, %p. It will guard you in - your adventures, and you can best guard it. You embark on a - quest far greater than you realize. - - Remember me, %p, and return when you have triumphed. I - will tell you then of what you must do. You will understand when the - time comes. -%E [%lC tells you to guard %o, and to return when you have triumphed.] -%Cc Bar 00082 -%l gazes reverently at %o, then back at you. - -"You are its keeper now, and the time has come to resume your search -for the Amulet. %Z await your return through the -magic portal which brought you here." -%E ["You keep %o. Return to %Z to search for the Amulet."] -%Cp Bar 00090 -"Tell us, %p, have you fared well on your great quest?" -%E -%Cc Bar 00091 -"This is wondrous, %p. I feared that you could not possibly -succeed in your quest, but here you are in possession of the Amulet -of Yendor! - -"I have studied the texts of the magi constantly since you left. In -the Book of Skelos, I found this: - - %d will cause a child to be sent into the world. This child is to - be made strong by trial of battle and magic, for %d has willed it so. - It is said that the child of %d will recover the Amulet of Yendor - that was stolen from the Creator at the beginning of time. - -"As you now possess the amulet, %p, I suspect that the Book -speaks of you. - - The child of %d will take the Amulet, and travel to the Astral - Plane, where the Great Temple of %d is to be found. The Amulet - will be sacrificed to %d, there on %dJ altar. Then the child will - stand by %d as champion of all %cP for eternity. - -"This is all I know, %p. I hope it will help you." -%E ["Take the Amulet to the altar of %d on the Astral Plane and offer it."] -# -# Cave(wo)man -# -%Cc Cav 00001 -You descend through a barely familiar stairwell that you remember -%l showing you when you embarked upon your vision quest. - -You arrive back at %H, but something seems -wrong here. The usual smoke and glowing light of the fires of the -outer caves are absent, and an uneasy quiet fills the damp air. -%E [You arrive back at %H, but something is wrong here.] -%Cp Cav 00002 -Once again, you arrive back at %H. -%E -%Cp Cav 00003 -For some reason, you think that this may be the last time you will -enter %H. -%E -%Cp Cav 00005 -"We have not been able to gather as much food since the Giants sealed -off our access to the outer world." -%E -%Cp Cav 00006 -"Since %n sent her minions, we have been constantly fighting." -%E -%Cp Cav 00007 -"I have heard your vision quest was successful. Is this so?" -%E -%Cp Cav 00008 -"So, tell me, %p, how have you fared?" -%E -%Cp Cav 00009 -"%lC grows old. We know not who will guide us after he ascends." -%E -%Cp Cav 00010 -"The rains have returned and the land grows lush again." -%E -%Cp Cav 00011 -"Peace has returned, give thanks to %d!" -%E -%Cp Cav 00012 -"Welcome back! Did you find %o?" -%E -%Cp Cav 00013 -"So, %p, tell us the story of your fight with %n." -%E -%Cp Cav 00014 -"%lC grows old. Perhaps you will guide us after he ascends." -%E -%Cc Cav 00015 -"You have returned from your vision quest, %p. Thank %d. - -"We are in dire need of your help, my %S. - -"But first, I must see if you are yet capable of the quest I would -ask you to undertake." -%E ["You have returned. We are in dire need of your help."] -%Cp Cav 00016 -"Again, you return to us, %p. Let me see if you are ready now." -%E -%Cp Cav 00017 -"Ah, %p. Are you finally ready?" -%E -%Cc Cav 00018 -"%pC! You have sealed our fate. You seem unable to reform yourself, -so I must select another to take your place. - -"Begone from %H! You have betrayed us by choosing -the path of the %C over the true path of the %L. - -"You no longer live in our eyes." -%E ["You have betrayed the %L. Begone!"] -%Cc Cav 00019 -"Alas, %p, you are as yet too inexperienced to embark upon such -a difficult quest as that I propose to give you. - -"%rA could not possibly survive the rigors demanded to find -%i, never mind to confront %n herself. - -"Adventure some more, and you will learn the skills you will require. -%d decrees it." -%E ["%rA is too inexperienced. Come back when you have progressed."] -%Cc Cav 00020 -"%pC! You have deviated from my teachings. You no longer follow -the path of the %a as you should. I banish you from these caves, to -go forth and purify yourself. Then, you might be able to accomplish this -quest." -%E ["You no longer follow the path of the %a. Go, and purify yourself."] -%Cc Cav 00021 -"You are indeed ready now, %p. I shall tell you a tale of -great suffering among your people: - -"Shortly after you left on your vision quest, the caves were invaded by -the creatures sent against us by %n. - -"She, herself, could not attack us due to her great size, but her minions -have harassed us ever since. In the first attacks, many died, and the -minions of %n managed to steal %o. -They took it to %i and there, none of our -%g warriors have been able to go. - -"You must find %i, and within it wrest -%o from %n. She guards it as -jealously as she guards all treasures she attains. But with it, -we can make our caves safe once more. - -"Please, %p, recover %o for us, and return it here." -%E [Find and defeat %n, recover %o, and return with it.] -%Cp Cav 00025 -"%nC is immune to her own breath weapons. -You should use magic upon her that she does not use herself." -%E -%Cp Cav 00026 -"When you encounter %n, call upon %d for assistance." -%E -%Cp Cav 00027 -"There will be nowhere to hide inside %ns inner sanctum." -%E -%Cp Cav 00028 -"Your best chance with %n will be to keep moving." -%E -%Cp Cav 00029 -"Do not be distracted by the great treasures in %ns lair. -Concentrate on %o." -%E -%Cp Cav 00030 -"%oC is the only object that %n truly fears." -%E -%Cp Cav 00031 -"Do not be fooled by %ns size. She is fast, and it is -rumored that she uses magic." -%E -%Cp Cav 00032 -"I would send a party of %gP with you, but we will need all -of our strength to defend ourselves." -%E -%Cp Cav 00033 -"Remember, be %a at all times. This is your strength." -%E -%Cp Cav 00034 -"If only we had an amulet of reflection, this would not have happened." -%E -%Cc Cav 00035 -You %x many large claw marks on the ground. The tunnels ahead -of you are larger than most of those in any cave complex you have -ever been in before. - -Your nose detects the smell of carrion from within, and bones litter -the sides of the tunnels. -%E [You %x many large claw marks, smell carrion, and notice bones.] -%Cp Cav 00036 -Once again, you approach %i. -%E -%Cc Cav 00040 -You find yourself in a large cavern, with neatly polished walls, that -nevertheless show signs of being scorched by fire. - -Bones litter the floor, and there are objects scattered everywhere. -The air is close with the stench of sulphurous fumes. - -%nC is clearly visible, but %nh seems to be asleep. -%E [You enter a large cavern. %nC is present.] -%Cp Cav 00041 -Once again, you find yourself in the lair of %n. -%E -%Cc Cav 00050 -"So, follower of %l, you seek to invade the lair of -%n. Only my meals are allowed down here. Prepare -to be eaten!" -%E [%nC threatens to eat you.] -%Cp Cav 00051 -"So, again you face me, %c. No one has ever before escaped me. -Now I shall kill you." -%E -%Cp Cav 00052 -"You are getting annoying, %c. Prepare to die." -%E -%Cp Cav 00053 -"I'll have %o from you, %c. You shall die." -%E -%Cp Cav 00060 -"You are weak, %c. No challenge for the Mother of all Dragons." -%E -%Cp Cav 00061 -"I grow hungry, %r. You look like a nice appetizer!" -%E -%Cp Cav 00062 -"Join me for lunch? You're the main course, %c." -%E -%Cp Cav 00063 -"With %o, I am invincible! You cannot succeed." -%E -%Cp Cav 00064 -"Your mentor, %l has failed. You are nothing to fear." -%E -%Cp Cav 00065 -"You shall die here, %c. %rA cannot hope to defeat me." -%E -%Cp Cav 00066 -"You, a mere %r challenge the might of %n? Hah!" -%E -%Cp Cav 00067 -"I am the Mother of all Dragons! You cannot hope to defeat me." -%E -%Cp Cav 00068 -"My claws are sharp now. I shall rip you to shreds!" -%E -%Cp Cav 00069 -"%d has deserted you, %c. This is my domain." -%E -%Cc Cav 00070 -As you pick up %o it seems heavy at first, but as you -hold it strength flows into your arms. - -You suddenly feel full of power, as if nothing could possibly stand -in your path. -%E [%oC fills you with a feeling of power.] -%Cp Cav 00080 -%nC sinks to the ground, her heads flailing about. -As she dies, a cloud of noxious fumes billows about her. -%E -%Cc Cav 00081 -%lC glimpses %o in your possession. -He smiles and says: - - You have done it! We are saved. But I fear that %o - will always be a target for %C forces who will want it for their - own. - - To prevent further trouble, I would like you, %p, - to take %o away with you. It will help you as you - quest for the Amulet of Yendor. -%E ["Take %o with you. It will help in your quest for the Amulet of Yendor."] -%Cc Cav 00082 -%l grasps %o proudly for a moment, then looks at you. - -"You are its keeper now, and the time has come to resume your search -for the Amulet. %Z await your return through the -magic portal which brought you here." -%E ["You are the keeper of %o now. Return to %Z to search for the Amulet.] -%Cp Cav 00090 -"%pC! Welcome back. -How goes your quest to recover the Amulet for %d?" -%E -%Cc Cav 00091 -"You have been successful, I see, %p. - -"Now that the Amulet of Yendor is yours, here is what you must do: - -"Journey upwards to the open air. The Amulet you carry will then -take you into the Astral Planes, where the Great Temple of %d -casts its influence throughout our world. - -"Sacrifice the Amulet on the altar. Thus shall %d become supreme!" -%E ["Take the Amulet to the altar of %d on the Astral Plane and offer it."] -# -# Healer -# -%Cc Hea 00001 -What sorcery has brought you back to %H? The smell -of fresh funeral pyres tells you that something is amiss with the healing -powers that used to practice here. - -No rhizotomists are tending the materia medica gardens, and where are the -common folk who used to come for the cures? - -You know that you must quickly make your way to the collegium, and -%ls iatreion, and find out what has happened in your absence. -%E [You arrive back at %H and must find %l.] -%Cp Hea 00002 -After your last experience you expected to be here, but you certainly -did not expect to see things so much worse. This time you must succeed. -%E -%Cp Hea 00003 -Again, you %x %H in the distance. - -The smell of death and disease permeates the air. You do not have -to be %Ra to know that %n is on the verge of victory. -%E -%Cp Hea 00005 -"Did you read that new treatise on the therapeutic use of leeches?" -%E -%Cp Hea 00006 -"Paint a red caduceus on your shield and monsters won't hit you." -%E -%Cp Hea 00007 -"I passed handwriting so they are demoting me a rank." -%E -%Cp Hea 00008 -"I've heard that even %l has not been able to cure Chiron." -%E -%Cp Hea 00009 -"We think %n has used %nj alchemists, and %o, -to unleash a new disease we call 'the cold' on Gehennom." -%E -%Cp Hea 00010 -"Did you read that new treatise on the therapeutic use of leeches?" -%E -%Cp Hea 00011 -"Paint a red caduceus on your shield and monsters won't hit you." -%E -%Cp Hea 00012 -"How are you feeling? Perhaps a good bleeding will improve your spirits." -%E -%Cp Hea 00013 -"Have you heard the absurd new theory that diseases are caused by -microscopic organisms, and not ill humors?" -%E -%Cp Hea 00014 -"I see that you bring %o, now you can cure this plague!" -%E -%Cc Hea 00015 -Feebly, %l raises %lj head to look at you. - -"It is good to see you again, %p. I see the concern in your -eyes, but do not worry for me. I am not ready for Hades yet. We have -exhausted much of our healing powers holding off %n. -I need your fresh strength to carry on our work. - -"Come closer and let me lay hands on you, and determine if you have -the skills necessary to accomplish this mission." -%E [%l is weak from the struggle with %n. %lH wants to examine you.] -%Cp Hea 00016 -"Again you return to me, %p. I sense that each trip back -the pleurisy and maladies of our land begin to infect you. Let us -hope and pray to %d that you become ready for your task before -you fall victim to the bad humors." -%E -%Cp Hea 00017 -"Chiron has fallen, Hermes has fallen, what else must I tell you to -impress upon you the importance of your mission! I hope that you -have come prepared this time." -%E -%Cc Hea 00018 -"You have failed us, %p. You are a quack! A charlatan! - -"Hades will be happy to hear that you are once again practicing your -arts on the unsuspecting." -%E [You are a failure as a healer.] -%Cc Hea 00019 -"Alas, %p, you are yet too inexperienced to deal with the rigors -of such a task. You must be able to draw on the knowledge of botany, -alchemy and veterinary practices before I can send you on this quest -with good conscience. - -"Return when you wear %Ra's caduceus." -%E [You are too inexperienced. Return when you are %Ra.] -%Cc Hea 00020 -"You have learned much of the remedies that benefit, but you must also -know which physic for which ail. That is why %ds teachings are a -part of your training. - -"Return to us when you have healed thyself." -%E [Return when you are more %a.] -%Cc Hea 00021 -For the first time, you sense a smile on %ls face. - - "You have indeed learned as much as we can teach you in preparation - for this task. Let me tell you what I know of the symptoms and hope - that you can provide a cure. - - "A short while ago, the dreaded %nt was fooled by the gods - into thinking that %nh could use %o to find a - cure for old age. Think of it, eternal youth! But %nj good - health is accomplished by drawing the health from those around %ni. - - "He has exhausted %nj own supply of healthy people and now %nh seeks to - extend %nj influence into our world. You must recover from %ni - %o and break the spell. - - "You must travel into the swamps to %i, and from there - follow the trail to %ns island lair. Be careful." -%E [Travel to %i on your way to recover %o from %n.] -%Cp Hea 00025 -"Remember, %p, to always wash your hands before operating." -%E -%Cp Hea 00026 -"%nC has no real magic of %nj own. To this %nh is vulnerable." -%E -%Cp Hea 00027 -"If you have been true to %d, you can draw on the power of -%o." -%E -%Cp Hea 00028 -"Bring with you antidotes for poisons." -%E -%Cp Hea 00029 -"Remember this, %n can twist the powers of %o -to hurt instead of heal." -%E -%Cp Hea 00030 -"I have sent for Chiron, but I am afraid he will come too late." -%E -%Cp Hea 00031 -"Maybe when you return the snakes will once again begin to shed." -%E -%Cp Hea 00032 -"The plague grows worse as we speak. Hurry, %p!" -%E -%Cp Hea 00033 -"Many times %n has caused trouble in these lands. It is -time that %nh was eradicated like the diseases %nh has caused." -%E -%Cp Hea 00034 -"With but one eye, %n should be easy to blind. Remember this." -%E -%Cc Hea 00035 -You stand before the entrance to %i. Strange -scratching noises come from within the building. - -The swampy ground around you seems to stink with disease. -%E [You have reached %i but all is not well.] -%Cp Hea 00036 -Once again you stand at the entrance to %i. -%E -%Cc Hea 00040 -You stand within sight of the infamous Isle of %n. Even -the words of %l had not prepared you for this. - -Steeling yourself against the wails of the ill that pierce your ears, -you hurry on your task. Maybe with %o you can -heal them on your return, but not now. -%E [You have reached the lair of %n. Take %o away from %ni.] -%Cp Hea 00041 -Once again, you %x the Isle of %n in the distance. -%E -%Cc Hea 00050 -"They have made a mistake in sending you, %p. - -"When I add your youth to mine, it will just make it easier for me -to defeat %l." -%E ["I will take your life, then defeat %l."] -%Cp Hea 00051 -"Unlike your patients, you seem to keep coming back, %p!" -%E -%Cp Hea 00052 -"Which would you like, %p? Boils, pleurisy, convulsions?" -%E -%Cp Hea 00053 -"I'll have %o back from you, %r. You are -not going to live to escape this place." -%E -%Cp Hea 00060 -"They might as well give scalpels to wizards as to let you try to -use %o!" -%E -%Cp Hea 00061 -"If I could strike %l, surrounded by %lj %gP, imagine what I -can do to you here by yourself." -%E -%Cp Hea 00062 -"I will put my %Rp to work making a physic out of your ashes." -%E -%Cp Hea 00063 -"As we speak, Hades gathers your patients to join you." -%E -%Cp Hea 00064 -"After I'm done with you, I'll destroy %l as well." -%E -%Cp Hea 00065 -"You will have to kill me if you ever hope to leave this place." -%E -%Cp Hea 00066 -"I will impale your head on my caduceus for all to see." -%E -%Cp Hea 00067 -"There is no materia medica in your sack which will cure you of me!" -%E -%Cp Hea 00068 -"Do not fight too hard, I want your soul strong, not weakened!" -%E -%Cp Hea 00069 -"You should have stopped studying at vetenary." -%E -%Cc Hea 00070 -As you pick up %o, you feel its healing begin to -warm your soul. You curse Zeus for taking it from its rightful owner, -but at least you hope that %l can put it to good use once -again. -%E [You feel the healing power of %o and should return it to %l.] -%Cc Hea 00080 -The battered body of %n slumps to the ground and gasps -out one last curse: - - "You have defeated me, %p, but I shall have my revenge. - How, I shall not say, but this curse shall be like a cancer - on you." - -With that %n dies. -%E [%nC curses you as %nh dies.] -%Cc Hea 00081 -As soon as %l sees %o %lh summons %lj -%gP. - -Gently, %l reaches out and touches %o. -He instructs each of the assembled to do the same. When everyone -has finished %lh speaks to you. - - "Now that we have been replenished we can defeat this plague. You must - take %o with you and replenish the worlds you have - been called upon to travel next. I wish you could ride Chiron to the - end of your journey, but I need him to help me spread the cure. Go - now and continue your journey." -%E [%l touches %o and tells %lj %gP to do so too, then tells you to take it with you.] -%Cc Hea 00082 -%l cautiously handles %o while watching you. - -"You are its keeper now, and the time has come to resume your search -for the Amulet. %Z await your return through the -magic portal which brought you here." -%E [%l tells you to keep %o and return to %Z to search for the Amulet.] -%Cp Hea 00090 -"You have again returned to us, %p. We have done well in your -absence, yes? How fare you upon your quest for the Amulet?" -%E -%Cc Hea 00091 -"Ah, you have recovered the Amulet, %p. Well done! - -"Now, you should know that you must travel through the Elemental Planes -to the Astral, and there return the Amulet to %d. Go forth and -may our prayers be as a wind upon your back." -%E ["You have recovered the Amulet. Travel to the Astral Plane and return it to %d."] -# -# Knight -# -%Cc Kni 00001 -You materialize in the shadows of %H. Immediately, you notice -that something is wrong. The fields around the castle are trampled and -withered, as if some great battle has been recently fought. - -Exploring further, you %x long gouges in the walls of %H. -You know of only one creature that makes those kinds of marks... -%E [Signs of battle include long gouges in the walls of %H.] -%Cp Kni 00002 -Once again you stand in the shadows of %H. -%E -%Cp Kni 00003 -Again, you stand before %H. You vaguely sense that this -may be the last time you stand before %l. -%E -%Cp Kni 00005 -"Hail, %p! Verily, thou lookest well." -%E -%Cp Kni 00006 -"There is word, %p, that %n hath been sighted in the fens -near %i." -%E -%Cp Kni 00007 -"Thou art our only hope now, %p." -%E -%Cp Kni 00008 -"Verily, %l could have no better champion, %p." -%E -%Cp Kni 00009 -"Many brave %cP died when %n attacked." -%E -%Cp Kni 00010 -"Hail, %p! Verily, thou lookest well." -%E -%Cp Kni 00011 -"So, %p, didst thou find %n in the fens near %i?" -%E -%Cp Kni 00012 -"Worthy %p, hast thou proven thy right purpose on the body of %n?" -%E -%Cp Kni 00013 -"Verily, %l could have no better champion, %p." -%E -%Cp Kni 00014 -"Hast thou indeed recovered %o?" -%E -%Cc Kni 00015 -"Ah, %p. We see thou hast received Our summons. -We are in dire need of thy prowess. But first, We must needs -decide if thou art ready for this great undertaking." -%E [%lC checks whether you are ready for a great undertaking.] -%Cp Kni 00016 -"Welcome again, %p. We hope thou art ready now." -%E -%Cp Kni 00017 -"Once again, thou standest before Us, %p. Art thou ready now?" -%E -%Cc Kni 00018 -"Thou disgracest this noble court with thine impure presence. We have been -lenient with thee, but no more. Thy name shall be spoken no more. We -hereby strip thee of thy title, thy lands, and thy standing as %ca. -Begone from Our sight!" -%E [You are a disgrace as %ca.] -%Cc Kni 00019 -"Verily, %p, thou hast done well. That thou hast survived thus -far is a credit to thy valor, but thou art yet unprepared for -the demands required as Our Champion. %rA, no matter how -pure, could never hope to defeat the foul %n. - -"Journey forth from this place, and hone thy skills. Return to -Our presence when thou hast attained the noble title of %R." -%E [You are not prepared to face %n. Return when you are %Ra.] -%Cc Kni 00020 -"Thou dishonourest Us, %p! Thou hast strayed from the path of -chivalry! Go from Our presence and do penance. Only when thou art again -pure mayst thou return hence." -%E [Go and do penance. Return when you are truly %a.] -%Cc Kni 00021 -"Ah, %p. Thou art truly ready, as no %c before thee hath -been. Hear now Our words: - -"As thou noticed as thou approached %H, a great battle hath -been fought recently in these fields. Know thou that Merlin himself -came to aid Us here as We battled the foul %n. In the midst of that -battle, %n struck Merlin a great blow, felling him. Then, as Our -forces were pressed back, %n stole %o. - -"We eventually turned the tide, but lost many %cP in doing so. -Merlin was taken off by his apprentice, but hath not recovered. We have -been told that so long as %n possesseth %o, -Merlin will not regain his health. - -"We hereby charge thee with this most important of duties: - -"Go forth from this place, to the fens, and there thou wilt find -%i. From there, thou must track down %n. Destroy the -beast, and return to Us %o. Only then can -We restore Merlin to health." -%E [Pass through %i to reach %n. Destroy %ni and return with %o.] -%Cp Kni 00025 -"Remember, %p, follow always the path of %d." -%E -%Cp Kni 00026 -"Though %n is verily a mighty foe, We have confidence in thy victory." -%E -%Cp Kni 00027 -"Beware, for %n hath surrounded %niself with hordes of foul creatures." -%E -%Cp Kni 00028 -"Great treasure, 'tis said, is hoarded in the lair of %n." -%E -%Cp Kni 00029 -"If thou possessest %o, %p, %ns magic -shall therewith be thwarted." -%E -%Cp Kni 00030 -"The gates of %i are guarded by forces unseen, %p. -Go carefully." -%E -%Cp Kni 00031 -"Return %o to Us quickly, %p." -%E -%Cp Kni 00032 -"Destroy %n, %p, else %H shall surely fall." -%E -%Cp Kni 00033 -"Call upon %d when thou art in need." -%E -%Cp Kni 00034 -"To find %i, thou must keep thy heart pure." -%E -%Cc Kni 00035 -You stand at the foot of %i. Atop, you can %x a shrine. -Strange energies seem to be focused here, and the hair on the back of -your neck stands on end. -%E [You have reached %i and can %x a shrine.] -%Cp Kni 00036 -Again, you stand at the foot of %i. -%E -%Cc Kni 00040 -As you exit the swamps, you %x before you a huge, gaping hole in the -side of a hill. From within, you smell the foul stench of carrion. - -The pools on either side of the entrance are fouled with blood, and -pieces of rusted metal and broken weapons show above the surface. -%E [You %x the entrance to a cavern inside a hill.] -%Cp Kni 00041 -Again, you stand at the entrance to %ns lair. -%E -%Cc Kni 00050 -"Hah! Another puny %c seeks death. I shall dine well tonight, -then tomorrow, %H shall fall!" -%E [%nC taunts you and issues a threat against %H.] -%Cp Kni 00051 -"Again, thou challengest me, %r? So be it. Thou wilt die here." -%E -%Cp Kni 00052 -"Thou art truly foolish, %r. I shall dispatch thee anon." -%E -%Cp Kni 00053 -"So, thou darest touch MY property! I shall have that bauble back, -puny %r. Thou wilt die in agony!" -%E -%Cp Kni 00060 -"A mere %r can never withstand me!" -%E -%Cp Kni 00061 -"I shall kill thee now, and feast!" -%E -%Cp Kni 00062 -"Puny %c. What manner of death dost thou wish?" -%E -%Cp Kni 00063 -"First thee, %p, then I shall feast upon %l." -%E -%Cp Kni 00064 -"Hah! Thou hast failed, %r. Now thou shalt die." -%E -%Cp Kni 00065 -"Die, %c. Thou art as nothing against my might." -%E -%Cp Kni 00066 -"I shall suck the marrow from thy bones, %c." -%E -%Cp Kni 00067 -"Let's see... Baked? No. Fried? Nay. Broiled? Yea verily, -that is the way I like my %c for dinner." -%E -%Cp Kni 00068 -"Thy strength waneth, %p. The time of thy death draweth near." -%E -%Cp Kni 00069 -"Call upon thy precious %d, %p. It shall not avail thee." -%E -%Cc Kni 00070 -As you pick up %o, you feel its protective fields -form around your body. You also feel a faint stirring in your mind, as -if you are in two places at once, and in the second, you are waking from -a long sleep. -%E [You feel the magic of %o.] -%Cc Kni 00080 -As %n sinks to the ground, blood gushing from %nj open mouth, %nh -defiantly curses you and %l: - - "Thou hast not won yet, %r. By the gods, I shall return - and dog thy steps to the grave!" - -%nJ tail flailing madly, %n tries to crawl towards you, but slumps -to the ground and dies in a pool of %nj own blood. -%E [%nC curses you as %nh dies.] -%Cc Kni 00081 -As you approach %l, %lh beams at you and says: - - "Well done! Thou art truly the Champion of %H. We - have received word that Merlin is recovering, and shall soon - rejoin Us. - - "He hath instructed Us that thou art now to be the guardian of - %o. He feeleth that thou mayst have need of - its powers in thine adventures. It is Our wish that thou keepest - %o with thee as thou searchest for the fabled - Amulet of Yendor." -%E [%oC is yours now. It will aid in your search for the Amulet.] -# assumes Magic Mirror of Merlin (glass object) -%Cc Kni 00082 -"Careful, %p! %oC might break, and that would -be a tragic loss. Thou art its keeper now, and the time hath come -to resume thy search for the Amulet. %Z await thy -return through the magic portal that brought thee here." -%E [You are the keeper of %o. Return to %Z and find the Amulet.] -%Cp Kni 00090 -"Well met, %p. How goeth thy search for the Amulet of Yendor?" -%E -%Cc Kni 00091 -"Thou hast succeeded, We see, %p! Now thou art commanded to take -the Amulet to be sacrificed to %d in the Plane of the Astral. - -"Merlin hath counseled Us that thou must travel always upwards through -the Planes of the Elements, to achieve this goal. - -"Go with %d, %p." -%E [Take the Amulet to the Astral Plane and deliver it to %d.] -# -# Monk -# -# The quest artifact is "The Eyes of the Overworld", hence needs -# to be treated as plural by messages which use %o. -# -%Cc Mon 00001 -You find yourself standing in sight of %H. -Something is obviously wrong here. Strange shapes lumber around -outside %H! - -You realize that the %l needs your assistance! -%E [You have reached %H but something is wrong. %lC needs your aid.] -%Cp Mon 00002 -Once again, you stand before %H. -%E -%Cp Mon 00003 -Again you face %H. Your intuition hints that this -may be the final time you come here. -%E -%Cp Mon 00005 -"Greetings, honorable %r. It is good to see you." -%E -%Cp Mon 00006 -"Ah, %p! Surely you can help us in our hour of need." -%E -%Cp Mon 00007 -"Greetings, %s. %lC has great need of your help." -%E -%Cp Mon 00008 -"Alas, it seems as if even %d has deserted us." -%E -%Cp Mon 00009 -"May %d be with you, %s." -%E -%Cp Mon 00010 -"Greetings, honorable %r. It is good to see you again." -%E -%Cp Mon 00011 -"Ah, %p! Our deepest gratitude for all of your help." -%E -%Cp Mon 00012 -"Greetings, %s. Perhaps you will take some time to meditate with us?" -%E -%Cp Mon 00013 -"With this test behind you, may %d bring you enlightenment." -%E -%Cp Mon 00014 -"May %d be with you, %s." -%E -%Cc Mon 00015 -"Ah, %p, my %S. You have returned to us at last. -A great blow has befallen our order; perhaps you can help us. -First, however, I must determine if you are prepared for this -great challenge." -%E [%lC checks whether you are ready for the great challenge.] -%Cp Mon 00016 -"Again, my %S, you stand before me. Are you ready now to help us?" -%E -%Cp Mon 00017 -"Once more, %p, you stand within the sanctum. Are you ready now?" -%E -%Cc Mon 00018 -"You are a heretic, %p! How can you, %ra, deviate so from the -teachings of %d? Begone from this temple. You are no longer -%sa to this order. We will pray to %d for other assistance, -as you have failed us utterly." -%E [You are a heretic and have failed utterly.] -%Cc Mon 00019 -"Alas, %p, it is not yet to be. A mere %r could never -withstand the might of %n. Go forth, again into the world, and -return when you have attained the post of %R." -%E [You are not ready to face %n. Come back when you are %Ra.] -%Cc Mon 00020 -"This is terrible, %p. You have deviated from the true path! -You know that %d requires the most strident devotion of this -order. The %shood must stand for utmost piety. - -"Go from here, atone for your sins against %d. Return only when -you have purified yourself." -%E [You must atone. Come back when you are worthy of %d.] -%Cc Mon 00021 -"Yes, %p. You are truly ready now. Attend to me and I shall -tell you of what has transpired: - -"During one of the Great Meditations a short time ago, %n and -a legion of elementals invaded %H. Many %gP -were killed, including the one bearing %o. - -Now, there are barely enough %gP left to keep the elementals -at bay. - -"We need you to find %i, then, from there, -travel to %ns lair. If you can manage to defeat %n and -return %o here, we can then drive off the legions -of elementals that slay our students. - -"Go with %d as your guide, %p." -%E [Find %i, then continue to %ns lair. Defeat %ni and return with %o.] -%Cp Mon 00025 -"You can prevail, if you rely on %d." -%E -%Cp Mon 00026 -"Remember that %n has great magic at his command." -%E -%Cp Mon 00027 -"Be pure, my %S." -%E -%Cp Mon 00028 -"Beware, %i is surrounded by hordes of earth elementals." -%E -%Cp Mon 00029 -"Remember your studies, and you will prevail!" -%E -%Cp Mon 00030 -"Acquire and wear %o if you can. They will aid you -against %n." -%E -%Cp Mon 00031 -"Call upon %d when your need is greatest. You will be answered." -%E -%Cp Mon 00032 -"Remember to use the elementals' strength against them!" -%E -%Cp Mon 00033 -"Do not lose faith, %p. If you do so, %n will grow stronger." -%E -%Cp Mon 00034 -"Wear %o. They will assist you in your efforts." -%E -%Cc Mon 00035 -You remember the descriptions of %i, given -to you by the %l. It is ahead that you will find -%n's trail. -%E [You have reached %i. %nC lurks further ahead.] -%Cp Mon 00036 -Again, you stand before %i. -%E -%Cc Mon 00040 -The stench of brimstone is all about you, and the elementals close in -from all sides! - -Ahead, there is a small clearing amidst the bubbling pits of lava... -%E [You are surrounded by brimstone, lava, and elementals.] -%Cp Mon 00041 -Again, you have invaded %ns domain. -%E -%Cc Mon 00050 -"Ah, so %l has sent another %g to retrieve -%o. - -"No, I see you are no %g. Perhaps I shall have some fun today -after all. Prepare to die, %r! You shall never regain -%o." -%E [You are no %g. You shall never regain %o.] -%Cp Mon 00051 -"So, %r. Again you challenge me." -%E -%Cp Mon 00052 -"Die now, %r. %d has no power here to aid you." -%E -%Cp Mon 00053 -"You shall die, %r, and I will have %o back." -%E -%Cp Mon 00060 -"Submit to my will, %c, and I shall spare you." -%E -%Cp Mon 00061 -"Your puny powers are no match for me, %c." -%E -%Cp Mon 00062 -"I shall have you turned into a zombie for my pleasure!" -%E -%Cp Mon 00063 -"Despair now, %r. %d cannot help you." -%E -%Cp Mon 00064 -"I shall feast upon your soul for many days, %c." -%E -%Cp Mon 00065 -"Your death will be slow and painful. That I promise!" -%E -%Cp Mon 00066 -"You cannot defeat %n, you fool. I shall kill you now." -%E -%Cp Mon 00067 -"Your precious %lt will be my next victim." -%E -%Cp Mon 00068 -"I feel your powers failing you, %r. You shall die now." -%E -%Cp Mon 00069 -"With %o, nothing can stand in my way." -%E -%Cc Mon 00070 -As you pick up %o, you feel the essence of -%d fill your soul. You know now why %n stole %oi from -%H, for with %oi, %ca of %d could -easily defeat his plans. - -You sense a message from %d. Though not verbal, you -get the impression that you must return to %l as soon -as possible. -%E [You feel the essence of %d and realize that you should take %o to %l.] -%Cc Mon 00080 -%nC gasps: - - "You have only defeated this mortal body. Know this: my spirit - is strong. I shall return and reclaim what is mine!" - -With that, %n expires. -%E [As %n dies, %nh threatens to return.] -%Cc Mon 00081 -"You have returned, %p. And with %o, I see. -Congratulations. - -"I have been in meditation, and have received direction from -a minion of %d. %d commands that you retain -%o. With %oi, you must recover the Amulet -of Yendor. - -"Go forth, and let %d guide your steps." -%E [Keep %o. %oH will help you recover the Amulet of Yendor.] -%Cc Mon 00082 -%lC studies %o for a moment, -then returns his gaze to you. - -"%oC must remain with you. Use %oi -as you resume your search for the Amulet. -%Z await your return through the magic portal -that brought you here." -%E [Keep %o and return to %Z to search for the Amulet.] -%Cp Mon 00090 -"Welcome back, %p. How is your quest for the Amulet going?" -%E -%Cc Mon 00091 -"You have prevailed, %p! %d is surely with you. Now, -you must take the Amulet, and sacrifice it on %ds altar on -the Astral Plane. I suspect that I shall never see you again in this -life, but I hope to at %ds feet." -%E [Take the Amulet to the Astral Plane and deliver it to %d.] -# -# Priest -# -%Cc Pri 00001 -You find yourself standing in sight of %H. Something -is obviously wrong here. The doors to %H, which usually -stand open, are closed. Strange human shapes shamble around -outside. - -You realize that %l needs your assistance! -%E [You are at %H; the doors are closed. %lC needs your help!] -%Cp Pri 00002 -Once again, you stand before %H. -%E -%Cp Pri 00003 -Again you face %H. Your intuition hints that this may be -the final time you come here. -%E -%Cp Pri 00005 -"Greetings, honored %r. It is good to see you." -%E -%Cp Pri 00006 -"Ah, %p! Surely you can help us in our hour of need." -%E -%Cp Pri 00007 -"Greetings, %s. %lC has great need of your help." -%E -%Cp Pri 00008 -"Alas, it seems as if even %d has deserted us." -%E -%Cp Pri 00009 -"May %d be with you, %s." -%E -%Cp Pri 00010 -"Greetings, %r. It is good to see you again." -%E -%Cp Pri 00011 -"Ah, %p! Our deepest gratitude for all of your help." -%E -%Cp Pri 00012 -"Welcome back, %s! With %o, no undead can stand against us." -%E -%Cp Pri 00013 -"Praise be to %d, for delivering us from %n." -%E -%Cp Pri 00014 -"May %d be with you, %s." -%E -%Cc Pri 00015 -"Ah, %p, my %S. You have returned to us at last. -A great blow has befallen our order; perhaps you can help us. -First, however, I must determine if you are prepared for this -great challenge." -%E [You have returned and we need your help. Are you ready?] -%Cp Pri 00016 -"Again, my %S, you stand before me. Are you ready now to help us?" -%E -%Cp Pri 00017 -"Once more, %p, you stand within the sanctum. Are you ready now?" -%E -%Cc Pri 00018 -"You are a heretic, %p! How can you, %ra, deviate so from the -teachings of %d? Begone from this temple. You are no longer -%sa to this order. We will pray to %d for other assistance, -as you have failed us utterly." -%E [You are a heretic who has deviated from the teachings of %d.] -%Cc Pri 00019 -"Alas, %p, it is not yet to be. A mere %r could never -withstand the might of %n. Go forth, again into the world, and return -when you have attained the post of %R." -%E [%rA cannot withstand %n. Come back when you are %Ra.] -%Cc Pri 00020 -"This is terrible, %p. You have deviated from the true path! -You know that %d requires the most strident devotion of this -order. The %shood must stand for utmost piety. - -"Go from here, atone for your sins against %d. Return only when -you have purified yourself." -%E [You have deviated from the path. Return when you have purified yourself.] -%Cc Pri 00021 -"Yes, %p. You are truly ready now. Attend to me and I shall -tell you of what has transpired: - -"At one of the Great Festivals a short time ago, %n and a legion -of undead invaded %H. Many %gP were killed, including -the one carrying %o. - -"As a final act of vengefulness, %n desecrated the altar here. -Without it, we could not mount a counter-attack. Now, there are -barely enough %gP left to keep the undead at bay. - -"We need you to find %i, then, from there, travel -to %ns lair. If you can manage to defeat %n and return -%o here, we can then drive off the legions of -undead that befoul the land. - -"Go with %d as your guide, %p." -%E [%nC invaded %H and captured %o. Defeat %ni and retrieve %oh.] -%Cp Pri 00025 -"You can prevail, if you rely on %d." -%E -%Cp Pri 00026 -"Remember that %n has great magic at his command." -%E -%Cp Pri 00027 -"Be pure, my %S." -%E -%Cp Pri 00028 -"Beware, %i is surrounded by a great graveyard." -%E -%Cp Pri 00029 -"You may be able to affect %n with magical cold." -%E -%Cp Pri 00030 -"Acquire and wear %o if you can. It will aid you -against %n." -%E -%Cp Pri 00031 -"Call upon %d when your need is greatest. You will be answered." -%E -%Cp Pri 00032 -"The undead legions are weakest during the daylight hours." -%E -%Cp Pri 00033 -"Do not lose faith, %p. If you do so, %n will grow stronger." -%E -%Cp Pri 00034 -"Wear %o. It will assist you against the undead." -%E -%Cc Pri 00035 -You stand facing a large graveyard. The sky above is filled with clouds -that seem to get thicker closer to the center. You sense the presence of -undead in larger numbers than you have ever encountered before. - -You remember the descriptions of %i, given to you by -%l. It is ahead that you will find %ns trail. -%E [You have found %i. The trail to %n lies ahead.] -%Cp Pri 00036 -Again, you stand before %i. -%E -%Cc Pri 00040 -The stench of brimstone is all about you, and the shrieks and moans -of tortured souls assault your psyche. - -Ahead, there is a small clearing amidst the bubbling pits of lava... -%E [The stench of brimstone surrounds you, the shrieks and moans are endless.] -%Cp Pri 00041 -Again, you have invaded %ns domain. -%E -%Cc Pri 00050 -"Ah, so %l has sent another %gC to retrieve -%o. - -"No, I see you are no %gC. Perhaps I shall have some fun today -after all. Prepare to die, %r! You shall never regain -%o." -%E [%lC has sent you, but you are no %gC. I shall destroy you.] -%Cp Pri 00051 -"So, %r. Again you challenge me." -%E -%Cp Pri 00052 -"Die now, %r. %d has no power here to aid you." -%E -%Cp Pri 00053 -"You shall die, %r, and I will have %o back." -%E -%Cp Pri 00060 -"Submit to my will, %c, and I shall spare you." -%E -%Cp Pri 00061 -"Your puny powers are no match for me, %c." -%E -%Cp Pri 00062 -"I shall have you turned into a zombie for my pleasure!" -%E -%Cp Pri 00063 -"Despair now, %r. %d cannot help you." -%E -%Cp Pri 00064 -"I shall feast upon your soul for many days, %c." -%E -%Cp Pri 00065 -"Your death will be slow and painful. That I promise!" -%E -%Cp Pri 00066 -"You cannot defeat %n, you fool. I shall kill you now." -%E -%Cp Pri 00067 -"Your precious %lt will be my next victim." -%E -%Cp Pri 00068 -"I feel your powers failing you, %r. You shall die now." -%E -%Cp Pri 00069 -"With %o, nothing can stand in my way." -%E -%Cc Pri 00070 -As you pick up %o, you feel the essence of -%d fill your soul. You know now why %n stole it from -%H, for with it, %ca of %d could -easily defeat his plans. - -You sense a message from %d. Though not verbal, you -get the impression that you must return to %l as soon -as possible. -%E [You feel %d as you pick up %o; return %oh to %l.] -%Cc Pri 00080 -You feel a wrenching shift in the ether as %ns body dissolves -into a cloud of noxious gas. - -Suddenly, a voice booms out: - - "Thou hast defeated the least of my minions, %r. - Know now that Moloch is aware of thy presence. - As for thee, %n, I shall deal with thy failure - at my leisure." - -You then hear the voice of %n, screaming in terror... -%E [%nC dies. Moloch is aware of you and angry at %n.] -%Cc Pri 00081 -"You have returned, %p. And with %o, I see. -Congratulations. - -"I have been in meditation, and have received direction from -a minion of %d. %d commands that you retain -%o. With it, you must recover the Amulet -of Yendor. - -"Go forth, and let %d guide your steps." -%E [Congratulations, %p. Keep %o; go and recover the Amulet.] -%Cc Pri 00082 -%lC reiterates that %o is yours now. - -"The time has come to resume your search for the Amulet. -%Z await your return through the magic portal -that brought you here." -%E [%oC is yours now. Return to %Z and find the Amulet.] -%Cp Pri 00090 -"Welcome back, %p. How is your quest for the Amulet going?" -%E -%Cc Pri 00091 -"You have prevailed, %p! %d is surely with you. Now, -you must take the amulet, and sacrifice it on %ds altar on -the Astral Plane. I suspect that I shall never see you again in this -life, but I hope to at %ds feet." -%E [Take the Amulet to the Astral Plane and offer it on %ds altar.] -# -# Ranger -# -# [Ran 00001: what if centaurs have been genocided?] -%Cc Ran 00001 -You arrive in familiar surroundings. In the distance, you %x the -ancient forest grove, the place of worship to %d. - -Something is wrong, though. Surrounding the grove are centaurs! -And they've noticed you! -%E [The ancient forest grove is surrounded by centaurs.] -%Cp Ran 00002 -Once again, you stand before %H. -%E -%Cp Ran 00003 -You have the oddest feeling that this may be the last time you -are to enter %H. -%E -%Cp Ran 00005 -"%pC! I have not seen you in many moons. How do you fare?" -%E -%Cp Ran 00006 -"%nC continues to threaten the grove. But we hold fast." -%E -%Cp Ran 00007 -"%lC is growing weak. The magic required to defend the grove drains us." -%E -%Cp Ran 00008 -"Remember %i is hard to enter. Beware the -distraction of leatherwings." -%E -%Cp Ran 00009 -"We must regain %o. Without it we will be overrun." -%E -%Cp Ran 00010 -"%pC! I have not seen you in many moons. How do you fare?" -%E -%Cp Ran 00011 -"Birdsong has returned to the grove, surely this means you have defeated %n." -%E -%Cp Ran 00012 -"%lC seems to have regained some of his strength." -%E -%Cp Ran 00013 -"So, tell us how you entered %i, in case some new evil arises there." -%E -%Cp Ran 00014 -"Is that truly %o that I see you carrying?" -%E -%Cc Ran 00015 -"%pC! You have returned! Thank %d. - -"We have great need of you. But first, I must see if you have the -required abilities to take on this responsibility." -%E [You have returned, %p. We need your help. Are you ready?] -%Cp Ran 00016 -"Once again, %p, you stand in our midst. Are you ready now?" -%E -%Cp Ran 00017 -"Ah, you are here again, %p. Allow me to determine your readiness..." -%E -%Cc Ran 00018 -"%pC! You have doomed us all. You fairly radiate %L influences -and weaken the power we have raised in this grove as a result! - -"Begone! We renounce your %shood with us! You are an outcast now!" -%E [You are not sufficiently %a. We renounce your %shood.] -%Cc Ran 00019 -"%p, you are yet too inexperienced to withstand the demands of that -which we need you to do. %RA might just be able to do this thing. - -"Return to us when you have learned more, my %S." -%E [You are too inexperienced. Come back when you are %Ra.] -%Cc Ran 00020 -"You have strayed, %p! You know that %d requires that -we maintain a pure devotion to things %a! - -"You must go from us. Return when you have purified yourself." -%E [You are not sufficiently %a. Come back when you have purified yourself.] -%Cc Ran 00021 -"You are indeed ready, %p. I shall tell you what has transpired, -and why we so desperately need your help: - -"A short time ago, the mountain centaurs to the east invaded -and enslaved the plains centaurs in this area. The local -leader is now only a figurehead, and serves %n. - -"During our last gathering of worship here, we were beset by hordes of -hostile centaurs, as you witnessed. In the first onslaught a group, -headed by %n %niself, managed to breach the grove and steal -%o. - -"Since then, we have been besieged. We do not know how much longer -we will be able to maintain our magical barriers. - -"If we are to survive, you, %p, must infiltrate -%i. There, you will find a pathway down, to the -underground cavern of %n. He has always coveted -%o, and will surely keep it. - -"Recover %o for us, %p! Only then will %d be safe." -%E [%nC has stolen %o. Infiltrate %i and retrieve %oh for us.] -%Cp Ran 00025 -"It is rumored that the Forest and Mountain Centaurs have resolved -their ancient feud and now band together against us." -%E -%Cp Ran 00026 -"%nC is strong, and very smart." -%E -%Cp Ran 00027 -"Use %o, when you find it. It will help you survive -to reach us." -%E -%Cp Ran 00028 -"Remember, let %d be your guide." -%E -%Cp Ran 00029 -"Call upon %d when you face %n. -The very act of doing so will infuriate him, and give you advantage." -%E -%Cp Ran 00030 -"%n and his kind have always hated us." -%E -%Cp Ran 00031 -"We cannot hold the grove much longer, %p. Hurry!" -%E -%Cp Ran 00032 -"To infiltrate %i, you must be very stealthy." -%E -%Cp Ran 00033 -"Remember that %n is a braggart. Trust not what he says." -%E -%Cp Ran 00034 -"You can triumph, %p, if you trust in %d." -%E -%Cc Ran 00035 -This must be %i. - -You are in a cave built of many different rooms, all interconnected -by tunnels. Your quest is to find and shoot the evil wumpus that -resides elsewhere in the cave without running into any bottomless -pits or using up your limited supply of arrows. Good luck. - -You are in room 9 of the cave. There are tunnels to rooms -5, 8, and 10. -*rustle* *rustle* (must be bats nearby.) -*sniff* (I can smell the evil wumpus nearby!) -%E [This is %i. There are bats nearby. Beware the wumpus!] -%Cc Ran 00036 -Once again, you descend into %i. - -*whoosh* (I feel a draft from some pits.) -*rustle* *rustle* (must be bats nearby.) -%E [You are in %i. There are pits. There are bats nearby.] -# [Ran 00040: 'hear a sound' but hero might be deaf.] -%Cc Ran 00040 -You descend into a weird place, in which roughly cut cave-like walls -join with smooth, finished ones, as if someone was in the midst of -finishing off the construction of a subterranean complex. - -Off in the distance, you hear a sound like the clattering of many -hooves on rock. -%E [You descend into a subterranean complex. Hooves clatter in the distance.] -%Cp Ran 00041 -Once again, you enter the distorted castle of %n. -%E -%Cc Ran 00050 -"So, %c. %lC has sent you to recover %o. - -"Well, I shall keep that bauble. It pleases me. You, %c, shall die." -%E [You have come to recover %o, but I shall keep %oh and you shall die.] -%Cp Ran 00051 -"Back again, eh? Well, a mere %r is no threat to me! Die, %c!" -%E -%Cp Ran 00052 -"You haven't learned your lesson, %c. You can't kill me! You shall die now." -%E -%Cp Ran 00053 -"I shall have %o from you, %r. Then I shall -kill you." -%E -%Cp Ran 00060 -"Your %d is nothing, %c. You are mine now!" -%E -%Cp Ran 00061 -"Run away little %c! You can never hope to defeat %n!" -%E -%Cp Ran 00062 -"My servants will rip you to shreds!" -%E -%Cp Ran 00063 -"I shall display your head as a trophy. What do you think about that wall?" -%E -%Cp Ran 00064 -"I shall break your %ls grove, and destroy all the %gP!" -%E -%Cp Ran 00065 -"%d has abandoned you, %c. You are doomed." -%E -%Cp Ran 00066 -"%rA? %lC sends a mere %r against me? Hah!" -%E -%Cp Ran 00067 -"%lC has failed, %c. %oC will never leave here." -%E -%Cp Ran 00068 -"You really think you can defeat me, eh %c? You are wrong!" -%E -%Cp Ran 00069 -"You weaken, %c. I shall kill you now." -%E -%Cc Ran 00070 -As you pick up %o, it seems to glow, and a warmth -fills you completely. You realize that its power is what has protected -your %sp against their enemies for so long. - -You must now return it to %l without delay -- their lives depend -on your speed. -%E [You pick up %o and feel power. It's time to return %oh to %l.] -%Cc Ran 00080 -%nC collapses to the ground, cursing you and %l, then says: - - "You have defeated me, %r! But I curse you one final time, with - my dying breath! You shall die before you leave my castle!" -%E [%nC curses you as %nh dies.] -%Cc Ran 00081 -"%pC! You have succeeded! I feared it was not possible! - -"You have returned with %o! - -"I fear, now, that the Centaurs will regroup and plot yet another raid. -This will take some time, but if you can recover the Amulet of Yendor -for %d before that happens, we will be eternally safe. - -"Take %o with you. It will aid in your quest for -the Amulet." -%E [You have succeeded. Take %o with you as you go to find the Amulet.] -# assumes The Longbow of Diana -%Cc Ran 00082 -%l flexes %o reverently. - -"With this wondrous bow, one need never run out of arrows. -You are its keeper now, and the time has come to resume your -search for the Amulet. %Z await your return -through the magic portal that brought you here." -%E [You are the keeper of %o now. Go and find the Amulet.] -%Cp Ran 00090 -"Welcome, %p. How have you fared on your quest for the Amulet -of Yendor?" -%E -%Cc Ran 00091 -"You have it! You have recovered the Amulet of Yendor! -Now attend to me, %p, and I will tell you what must be done: - -"The Amulet has within it magic, the capability to transport you to -the Astral Plane, where the primary circle of %d resides. - -"To activate this magic, you must travel upwards as far as you can. -When you reach the temple, sacrifice the Amulet to %d. - -"Thus will you fulfill your destiny." -%E [You have the Amulet! Take it to the Astral Plane and offer it to %d.] -# -# Rogue (with apologies to all Norsk speakers -dean) -# -%Cc Rog 00001 -Unexpectedly, you find yourself back in Ransmannsby, where you trained to -be a thief. Quickly you make the guild sign, hoping that you AND word -of your arrival reach %ls den. -%E [You are in Ransmannsby, where you trained. Find %l.] -%Cp Rog 00002 -Once again, you find yourself back in Ransmannsby. Fond memories are -replaced by fear, knowing that %l is waiting for you. -%E -%Cp Rog 00003 -You rub your hands through your hair, hoping that the little ones on -the back of your neck stay down, and prepare yourself for your meeting -with %l. -%E -%Cp Rog 00005 -"I hear that Lady Tyvefelle's household is lightly guarded." -%E -%Cp Rog 00006 -"You're back? Even the Twain don't come back anymore." -%E -%Cp Rog 00007 -"Can you spare an old cutpurse a zorkmid for some grog?" -%E -%Cp Rog 00008 -"Fritz tried to join the other side, and now he's hell-hound chow." -%E -%Cp Rog 00009 -"Be careful what you steal, I hear the boss has perfected turning -rocks into worthless pieces of glass." -%E -%Cp Rog 00010 -"I was sure wrong about Lady Tyvefelle's house; I barely got away with my -life and lost my lock pick in the process." -%E -%Cp Rog 00011 -"You're back? Even the Twain don't come back anymore." -%E -%Cp Rog 00012 -"Can you spare an old cutpurse a zorkmid for some grog?" -%E -%Cp Rog 00013 -"Fritz tried to join the other side, and now he's hell-hound chow." -%E -%Cp Rog 00014 -"Be careful what you steal, I hear the boss has perfected turning -rocks into worthless pieces of glass." -%E -%Cc Rog 00015 -"Well, look who it is boys -- %p has come home. You seem to have -fallen behind in your dues. I should kill you as an example to these -other worthless cutpurses, but I have a better plan. If you are ready -maybe you could work off your back dues by performing a little job for -me. Let us just see if you are ready..." -%E [You owe back dues to your guild. You can pay them off if you're up to the job.] -%Cc Rog 00016 -"Well, I didn't expect to see you back. It shows that you are either stupid, -or you are finally ready to accept my offer. Let us hope for your sake it -isn't stupidity that brings you back." -%E [Are you stupid or are you ready?] -%Cp Rog 00017 -"Did you perhaps mistake me for some other %lt? You must -think me as stupid as your behavior. I warn you not to try my patience." -%E -%Cc Rog 00018 -"Well %gp, it looks like our friend has forgotten who is the boss -around here. Our friend seems to think that %rp have been put in -charge. Wrong. DEAD WRONG!" - -Your sudden shift in surroundings prevents you from hearing the end -of %ls curse. -%E [You must go.] -%Cc Rog 00019 -"In the time that you've been gone you've only been able to master the -arts of %ra? I've trained ten times again as many %Rp -in that time. Maybe I should send one of them, no? Where would that -leave you, %p? Oh yeah, I remember, I was going to kill you!" -%E [%rA is not adequately trained to handle this job.] -%Cc Rog 00020 -"Maybe I should chain you to my perch here for a while. Perhaps watching -real %a men at work will bring some sense back to you. I don't -think I could stand the sight of you for that long though. Come back -when you can be trusted to act properly." -%E [Come back when you are really %a.] -%Cc Rog 00021 -"Will everyone not going to retrieve %o from that -jerk, %n, take one step backwards. Good choice, -%p, because I was going to send you anyway. My other %gp -are too valuable to me. - -"Here's the deal. I want %o, %n -has %o. You are going to get %o -and bring it back to me. So simple an assignment even you can understand -it." -%E [Get %o from %n and bring it to %l.] -%Cp Rog 00025 -"You don't seem to understand, -%o isn't here so neither should you be!" -%E -%Cp Rog 00026 -"May %d curse you with lead fingers. Get going!" -%E -%Cp Rog 00027 -"We don't have all year. GET GOING!" -%E -%Cp Rog 00028 -"How would you like a scar necklace? I'm just the jeweler to do it!" -%E -%Cp Rog 00029 -"Lazy S.O.B. Maybe I should call up someone else..." -%E -%Cp Rog 00030 -"Maybe I should open your skull and see if my instructions are inside?" -%E -%Cp Rog 00031 -"This is not a task you can complete in the afterlife, you know." -%E -%Cp Rog 00032 -"Inside every living person is a dead person trying to get out, -and I have your key!" -%E -%Cp Rog 00033 -"We're almost out of hell-hound chow, so why don't you just get moving!" -%E -%Cp Rog 00034 -"You know, %o isn't going to come when you whistle. You must get it yourself." -%E -%Cp Rog 00035 -Those damn little hairs tell you that you are nearer to %o. -%E -%Cp Rog 00036 -Not wanting to face %l without having stolen %o, you continue. -%E -%Cc Rog 00040 -You feel a great swelling up of courage, sensing the presence of -%o. Or is it fear? -%E [You sense %o.] -%Cp Rog 00041 -The hairs on the back of your neck whisper -- it's fear. -%E -%Cp Rog 00050 -"Ah! You must be %ls ... er, `hero'. A pleasure to meet you." -%E -%Cp Rog 00051 -"We meet again. Please reconsider your actions." -%E -%Cc Rog 00052 -"Surely, %p, you have learned that you cannot trust any bargains -that %l has made. I can show you how to continue on -your quest without having to run into him again." -%E [You cannot trust %l.] -%Cc Rog 00053 -"Please, think for a moment about what you are doing. Do you truly -believe that %d would want %l to have -%o?" -%E [%lC should not have %o.] -%Cp Rog 00060 -"May I suggest a compromise. Are you interested in gold or gems?" -%E -%Cp Rog 00061 -"Please don't force me to kill you." -%E -%Cp Rog 00062 -"Grim times are upon us all. Will you not see reason?" -%E -%Cp Rog 00063 -"I knew %l, and you're no %lt, thankfully." -%E -%Cp Rog 00064 -"It is a shame that we are not meeting under more pleasant circumstances." -%E -%Cp Rog 00065 -"I was once like you are now, %p. Believe in me -- our way is better." -%E -%Cp Rog 00066 -"Stay with me, and I will make you %os guardian." -%E -%Cp Rog 00067 -"When you return, with or without %o, -%l will have you killed." -%E -%Cp Rog 00068 -"Do not be fooled; I am prepared to kill to defend %o." -%E -%Cp Rog 00069 -"I can reunite you with the Twain. Oh, the stories you can swap." -%E -%Cc Rog 00070 -As you pick up %o, the hairs on the back of your -neck fall out. At once you realize why %n was -willing to die to keep it out of %ls hands. Somehow -you know that you must do likewise. -%E [You pick up %o and know that %l should not have it.] -%Cc Rog 00080 -"I know what you are thinking, %p. It is not too late for you -to use %o wisely. For the sake of your guild -%sp, do what is right." - -You sit and wait for death to come for %n, and then you -brace yourself for your next meeting with %l! -%E [Before dying, %n tells you to use the %o wisely.] -%Cc Rog 00081 -"Well, I'll be damned. You got it. I am proud of you, a fine %r -you've turned out to be. - -"While you were gone I got to thinking, you and %o -together could bring me more treasure than either of you apart, so why don't -you take it with you. All I ask is a cut of whatever loot you come by. -That is a better deal than I offered %n. - -"But, you see what happened to %n when he refused. -Don't make me find another to send after you this time." -%E [Take %o with you and go.] -# assumes Master Key of Thievery (small object) -%Cc Rog 00082 -%lC seems tempted to swap %o for -the mundane one you detect in his pocket, but noticing your alertness, -evidently chickens out. - -"Go filch the Amulet before someone else beats you to it. -%Z are back the way you came, through the magic portal." -%E [Take %o and acquire the Amulet.] -%Cc Rog 00090 -"Quite the little thief, aren't we, %p. Can I interest you in a -swap for %o? Look around, anything in the keep -is yours for the asking." -%E [How about trading %o for something?] -%Cc Rog 00091 -"I see that with your abilities, and my brains, we could rule this world. - -"All that we would need to be all-powerful is for you to take that little -trinket you've got there up to the Astral Plane. From there, %d will -show you what to do with it. Once that's done, we will be invincible!" -%E [Take the Amulet to the Astral Plane and find %ds temple.] -# -# Samurai -# -%Cc Sam 00001 -Even before your senses adjust, you recognize the kami of -%H. - -You %x the standard of your teki, %n, flying above -the town. How could such a thing have happened? Why are ninja -wandering freely; where are the samurai of your daimyo, %l? - -You quickly say a prayer to Izanagi and Izanami and walk towards -town. -%E [The banner of %n flies above town. What has happened to %l?] -%Cp Sam 00002 -Once again, you are back at %H. -%E -%Cc Sam 00003 -You are back at %H. - -Instantly you sense a subtle change in your karma. You seem to know that -if you do not succeed in your quest, %n will have destroyed -the kami of %H before you return again. -%E [%HC is threatened by %n.] -%Cp Sam 00005 -"To succeed, you must walk like a butterfly on the wind." -%E -%Cp Sam 00006 -"Ikaga desu ka?" -%E -%Cp Sam 00007 -"I fear for The Land of The Gods." -%E -%Cp Sam 00008 -"%nC has hired the Ninja -- be careful." -%E -%Cp Sam 00009 -"If %o is not returned, we will all be ronin." -%E -%Cp Sam 00010 -"Come, join us in celebrating with some sake." -%E -%Cp Sam 00011 -"Ikaga desu ka?" -%E -%Cp Sam 00012 -"You have brought our clan and %l much honor." -%E -%Cp Sam 00013 -"Please %r, sit for a while and tell us how you overcame the Ninja." -%E -%Cp Sam 00014 -"%lC still lives! You have saved us from becoming ronin." -%E -%Cc Sam 00015 -"Ah, %p-san, it is good to see you again. I need someone who can -lead my samurai against %n. If you are ready, you will be -that person." -%E [%lC needs someone to lead %lj samurai against %n. Are you ready?] -%Cp Sam 00016 -"Once again, %p-san, you kneel before me. Are you yet capable of -being my vassal?" -%E -# [Sam 00017: This summary is definitely a poor one.] -%Cc Sam 00017 -"You begin to test my matsu, %p-san. -If you cannot determine what I want in a samurai, how can I rely on you -to figure out what I need from a samurai?" -%E [Are you truely a samurai?] -%Cc Sam 00018 -"You are no longer my samurai, %p. - -"Hara-kiri is denied. You are ordered to shave your head and then to -become a monk. Your fief and family are forfeit. Wakarimasu ka?" -%E [Leave and do not come back.] -%Cc Sam 00019 -"%p-san, you have learned well and honored your family. -I require the skills of %Ra in order to defeat %n. -Go and seek out teachers. Learn what they have learned. When you -are ready, return to me." -%E ["I require %Ra to defeat %n. Return when you are ready."] -%Cc Sam 00020 -"%p-san, you would do better to join the kyokaku. - -"You have skills, but until you can call upon the bushido to know when and -how to use them you are not samurai. When you can think %a and -act %a then return." -%E [When you can think %a and act %a then return.] -%Cc Sam 00021 -"Domo %p-san, indeed you are ready. I can now tell you what -it is that I require of you. - -"The daimyo, %n, has betrayed us. He has stolen from us -%o and taken it to his donjon deep within -%i. - -"If I cannot show the emperor %o when he comes -for the festival he will know that I have failed in my duty, and -request that I commit seppuku. - -"You must gain entrance to %i and retrieve the -emperor's property. Be quick! The emperor will be here for the -cha-no-you in 5 sticks. - -"Wakarimasu ka?" -%E [You must enter %i, then regain %o from %n.] -%Cp Sam 00025 -"To defeat %n you must overcome the seven emotions: -hate, adoration, joy, anxiety, anger, grief, and fear." -%E -%Cp Sam 00026 -"Remember your honor is my honor, you perform in my name." -%E -%Cp Sam 00027 -"I will go to the temple and burn incense for your safe return." -%E -%Cp Sam 00028 -"Sayonara." -%E -%Cp Sam 00029 -"There can be honor in defeat, but no gain." -%E -%Cp Sam 00030 -"Your kami must be strong in order to succeed." -%E -%Cp Sam 00031 -"You are indeed a worthy %R, but now you must be a worthy samurai." -%E -%Cp Sam 00032 -"If you fail, %n will be like a tai-fun on the land." -%E -%Cp Sam 00033 -"If you are truly %a, %d will listen." -%E -%Cp Sam 00034 -"Sharpen your swords and your wits for the task before you." -%E -%Cp Sam 00035 -You instinctively reach for your swords. You do not recognize the -lay of this land, but you know that your teki are everywhere. -%E -%Cp Sam 00036 -Thankful that your %sp at %H cannot see -your fear, you prepare again to advance. -%E -%Cc Sam 00040 -In your mind, you hear the taunts of %n. - -You become like the rice plant and bend to the ground, offering a -prayer to %d. But when the wind has passed, you stand -proudly again. Putting your kami in the hands of fate, you advance. -%E [You feel the taunts %n, but after offering a prayer to %d, you proceed.] -%Cp Sam 00041 -As you arrive once again at the home of %n, your thoughts -turn only to %o. -%E -%Cp Sam 00042 -As you arrive once again at the home of %n. -%E -%Cp Sam 00050 -"Ah, so it is to be you, %p-san. I offer you seppuku. -I will be your second if you wish." -%E -%Cp Sam 00051 -"I have offered you the honorable exit. Now I will have your -head to send unwashed to %l." -%E -%Cp Sam 00052 -"After I have dispatched you, I will curse your kami." -%E -%Cp Sam 00053 -"You have fought my samurai; surely you must know that you -will not be able to take %o back to -%H." -%E -%Cp Sam 00060 -"Ahh, I finally meet the daimyo of the kyokaku!" -%E -%Cp Sam 00061 -"There is no honor for me in your death." -%E -%Cp Sam 00062 -"You know that I cannot resash my swords until they have killed." -%E -%Cp Sam 00063 -"Your presence only compounds the dishonor of %l in not coming %liself." -%E -%Cp Sam 00064 -"I will make tea with your hair and serve it to %l." -%E -%Cp Sam 00065 -"Your fear shows in your eyes, coward!" -%E -%Cp Sam 00066 -"I have not heard of you, %p-san; has your life been that unworthy?" -%E -%Cp Sam 00067 -"If you will not obey me, you will die." -%E -%Cp Sam 00068 -"Kneel now and make the two cuts of honor. I will tell your %sp -of your honorable death." -%E -%Cp Sam 00069 -"Your master was a poor teacher. You will pay for his mistakes in -your teaching." -%E -%Cc Sam 00070 -As you pick up %o, you feel the strength of its karma. -You realize at once why so many good samurai had to die to defend it. -You are humbled knowing that you hold one of the artifacts of the -sun goddess. -%E [You feel the power of %o and are humbled.] -%Cc Sam 00080 -Your healing skills tell you that %ns wounds are mortal. - -You know that the bushido tells you to finish him and let his kami -die with honor, but the thought of so many samurai dead due to this -man's dishonor prevents you from giving the final blow. - -You order that his unwashed head be given to the crows and his body -thrown into the sea. -%E [%nC dies without honor.] -%Cc Sam 00081 -As you bow before %l, he welcomes you: - - "You have brought your family great honor, %p-sama. - - "While you have been gone the emperor's advisors have discovered in - the ancient texts that the karma of the samurai who seeks to recover - the Amulet and the karma of %o are joined - as the seasons join to make a year. - - "Because you have shown such fidelity, the emperor requests - that you take leave of other obligations and continue on the - road that fate has set your feet upon. I would consider it - an honor if you would allow me to watch your household until - you return with the Amulet." - -With that, %l bows, and places his sword atop -%o. -%E [The emperor wants you to take %o and recover the Amulet.] -%Cc Sam 00082 -%l holds %o tightly for a moment, then returns -his gaze to you. - -"The time is ripe to recover the Amulet. Return to %Z -through the magic portal that transported you here so that you may -achieve the destiny which awaits you." -%E [Take %o, return to %Z, and recover the Amulet.] -%Cp Sam 00090 -%lC bows. "%p-sama, tell us of your search for the Amulet." -%E -# [Sam 00091: most other roles give more explicit directions for the -# feedback here, so this summary does that too.] -%Cc Sam 00091 -"Ah, %p-sama. You have wasted your efforts returning home. -Now that you are in possession of the Amulet, you are honor-bound to -finish the quest you have undertaken. There will be plenty of time -for saki and stories when you have finished. - -"Go now, and may our prayers be a wind at your back." -%E [Take the Amulet to the Astral Plane to finish your task.] -# -# Tourist -# -%Cc Tou 00001 -You breathe a sigh of relief as you find yourself back in the familiar -surroundings of %H. - -You quickly notice that things do not appear the way they did when you -left. The town is dark and quiet. There are no sounds coming from -behind the town walls, and no campfires burning in the fields. As a -matter of fact, you do not %x any movement in the fields at all, and -the crops seem as though they have been untended for many weeks. -%E [You find yourself back at %H, but the quiet is ominous.] -%Cp Tou 00002 -Once again, you are back at %H. -%E -%Cp Tou 00003 -You are back at %H. -Things appear to have become so bad that you fear that soon -%H will not be here to return to. -%E -%Cp Tou 00005 -"Gehennom on 5 zorkmids a day -- more like 500 a day if you ask me." -%E -%Cp Tou 00006 -"Do you know where I could find some nice postcards of The Gnomish Mines?" -%E -%Cp Tou 00007 -"Have you tried the weird toilets?" -%E -%Cp Tou 00008 -"Don't stay at the Inn, I hear the food is terrible and it has rats." -%E -%Cp Tou 00009 -"They told me that this was the off season!" -%E -%Cp Tou 00010 -"Gehennom on 5 zorkmids a day -- more like 500 a day if you ask me." -%E -%Cp Tou 00011 -"Do you know where I could find some nice postcards of The Gnomish Mines?" -%E -%Cp Tou 00012 -"Have you tried the weird toilets?" -%E -%Cp Tou 00013 -"If you stick around, I'll show you the pictures from my latest trip." -%E -%Cp Tou 00014 -"Did you bring me back any souvenirs?" -%E -%Cc Tou 00015 -"Is it really you, %p! I had given up hope for your return. -As you can %x, we are desperately in need of your talents. Someone must -defeat %n if our town is to become what it once was. - -"Let me see if you are ready to be that someone." -%E [Someone must defeat %n. Are your ready?] -%Cp Tou 00016 -"Things are getting worse, %p. I hope that this time you are ready." -%E -%Cp Tou 00017 -"I hope that for the sake of %H you have prepared yourself this time." -%E -%Cc Tou 00018 -"It is too late, %p. You are not even worthy to die amongst us. -Leave %H and never return." -%E [Leave %H and never return.] -%Cc Tou 00019 -"There is still too much that you have to learn before you can undertake -the next step. Return to us as a proven %R, and perhaps then -you will be ready. - -"Go back now, and may the teachings of %d serve you well." -%E [Return when you are %Ra.] -%Cc Tou 00020 -"It would be an affront to %d to have one not true to the -%a path undertake her bidding. - -"You must not return to us until you have purified yourself of these -bad influences on your actions. Remember, only by following the %a -path can you hope to overcome the obstacles you will face." -%E [You are not sufficiently %a. Return when you are.] -%Cc Tou 00021 -"You have indeed proven yourself a worthy %c, %p. - -"But now your kinfolk and I must ask you to put aside your travels and -help us in our time of need. After you left us we elected a new mayor, -%n. He proved to be a most heinous and vile creature. - -"Soon after taking office he absconded with %o -and fled town, leaving behind his henchmen to rule over us. In order -for us to regain control of our town, you must enter %i -and recover %o. - -"Do not be distracted on your quest. If you do not return quickly I fear -that all will be lost. Let us both pray now that %d will guide you -and keep you safe." -%E [Enter %i and recover %o from %n.] -%Cp Tou 00025 -"Do not be fooled by the false promises of %n." -%E -%Cp Tou 00026 -"To enter %i you must pass many traps." -%E -%Cp Tou 00027 -"If you do not return with %o, your quest -will be in vain." -%E -%Cp Tou 00028 -"Do not be afraid to call upon %d if you truly need help." -%E -%Cp Tou 00029 -"If you do not destroy %n, he will follow you back here!" -%E -%Cp Tou 00030 -"Take %o from %n -and you may be able to defeat him." -%E -%Cp Tou 00031 -"You must hurry, %p!" -%E -%Cp Tou 00032 -"You are like %Sa to me, %p. Do not let me down." -%E -%Cp Tou 00033 -"If you are %a at all times you may succeed, %p." -%E -%Cp Tou 00034 -"Let all who meet you on your journey know that you are on a quest for -%l and grant safe passage." -%E -%Cc Tou 00035 -Only your faith in %d keeps you from trembling. You %x -the handiwork of %ns henchlings everywhere. -%E [You %x the handiwork of %ns henchlings.] -%Cp Tou 00036 -You know that this time you must find and destroy %n. -%E -%Cp Tou 00040 -You sense the presence of %o. -%E -%Cp Tou 00041 -You gain confidence, knowing that you may soon be united with -%o. -%E -%Cp Tou 00042 -You have returned to %ns lair. -%E -%Cc Tou 00050 -"So, %p, %l thinks that you can wrest -%o from me! - -"It only proves how desperate he has become that he sends %ra to -try and defeat me. When this day is over, I will have you enslaved -in the mines where you will rue the day that you ever entered -%i." -%E [%rA will not defeat me.] -%Cp Tou 00051 -"I let you live the last time because it gave me pleasure. -This time I will destroy you, %p." -%E -%Cc Tou 00052 -"These meetings come to bore me. You disturb my workings with -%o. - -"If you do not run away now, I will inflict so much suffering on you that -%l will feel guilty for ever having sent his %S to me!" -%E [Run away or you will suffer severely.] -%Cc Tou 00053 -"You fool. You do not know how to call upon the powers of -%o. - -"Return it to me and I will teach you how to use it, and together we -will rule %H. But do so now, as my patience grows thin." -%E ["Return %o to me and we will rule %H."] -%Cp Tou 00060 -"I defeated %l and I will defeat you, %p." -%E -%Cp Tou 00061 -"Where is %d now! You must realize no one can help you here." -%E -%Cp Tou 00062 -"Beg for mercy now and I may be lenient on you." -%E -%Cp Tou 00063 -"If you were not so %a, you might have stood a chance." -%E -%Cp Tou 00064 -"Vengeance is mine at last, %p." -%E -%Cp Tou 00065 -"I only wish that %l had a more worthy %r to send against me." -%E -%Cp Tou 00066 -"With %o in my possession you cannot -hope to defeat me." -%E -%Cp Tou 00067 -"%nC has never been defeated, NEVER!" -%E -%Cp Tou 00068 -"Are you truly the best %H has to send against me? I pity %l." -%E -%Cp Tou 00069 -"How do you spell %p? I want to ensure the marker on your grave is -correct as a warning to your %sp." -%E -%Cc Tou 00070 -As you pick up %o, you feel a great -weight has been lifted from your shoulders. Your only thoughts are -to quickly return to %H and find %l. -%E [You pick up %o and feel relief. Return it to %l.] -%Cc Tou 00080 -You turn in the direction of %n. As his earthly body begins -to vanish before your eyes, you hear him curse: - - "You shall never be rid of me, %p! - I will find you where ever you go and regain what is rightly mine." -%E [%nC curses at you as %nh dies.] -%Cc Tou 00081 -As %l detects the presence of %o, -he almost smiles for the first time in many a full moon. - -As he looks up from %o he says: - - "You have recovered %o. You are its - owner now, but not its master. Let it work with you as you continue - your journey. With its help, and %d to guide you on the - %a path, you may yet recover the Amulet of Yendor." -%E [Take %o and with %ds guidance, recover the Amulet.] -%Cc Tou 00082 -"%oC is yours now. %Z -await your return through the magic portal that brought you here." -%E [Keep %o and return to %Z through the portal.] -%Cp Tou 00090 -"I could not be more proud than if you were my own %S, %p! -Tell me of your adventures in quest of the Amulet of Yendor." -%E -# [Tou 00091: like Sam 00091, the directions about what to do next are -# missing, so make the summary be a little bit more explicit.] -%Cc Tou 00091 -"Stand back and let me look at you, %p. -Now that you have recovered the Amulet of Yendor, I'm afraid living -out your days in %H would seem pretty tame. - -"You have come too far to stop now, for there are still more tasks that -our oral history foretells for you. Forever more, though, your name shall -be spoken by the %gP with awe. You are truly an inspiration to your -%sp!" -%E [You have the Amulet. Take it to the Astral Plane to finish your task.] -# -# Valkyrie -# -%Cc Val 00001 -You materialize at the base of a snowy hill. Atop the hill sits -a place you know well, %H. You immediately realize -that something here is very wrong! - -In places, the snow and ice have been melted into steaming pools of -water. Fumaroles and pools of bubbling lava surround the hill. -The stench of sulphur is carried through the air, and you %x creatures -that should not be able to live in this environment moving towards you. -%E [You arrive below %H. Something is wrong; there is lava present.] -%Cp Val 00002 -Once again, you are near the abode of %l. -%E -%Cp Val 00003 -Again you materialize near %ls abode. You have a nagging feeling -that this may be the last time you come here. -%E -%Cp Val 00005 -"Hail, and well met, brave %c." -%E -%Cp Val 00006 -"May %d guide your steps, %p." -%E -%Cp Val 00007 -"%lC weakens. Without %o, her foresight is dim." -%E -%Cp Val 00008 -"You must hurry, %p, else Ragnarok may well come." -%E -%Cp Val 00009 -"I would deal with this foul %n myself, but %d forbids it." -%E -%Cp Val 00010 -"Hail, and well met, brave %c." -%E -%Cp Val 00011 -"May %d guide your steps, %p." -%E -%Cp Val 00012 -"%lC told us you had succeeded!" -%E -%Cp Val 00013 -"You recovered %o just in time, %p." -%E -%Cp Val 00014 -"Hail %d, for delivering %o back to us." -%E -%Cc Val 00015 -"Ah, %p, my %S. You have returned to %H -at last. We are in dire need of your aid, but I must determine if you -are yet ready for such an undertaking. - -"Let me read your fate..." -%E [We need your aid. Are you ready?] -%Cp Val 00016 -"Let me read the future for you now, %p, perhaps you have managed to -change it enough..." -%E -%Cp Val 00017 -"Again, I shall read your fate, my %S. Let us both hope that you have -made changes to become ready for this task..." -%E -%Cc Val 00018 -"No, %p. Your fate is sealed. I must cast about for another -champion. Begone from my presence, and never return. Know this, that -you shall never succeed in this life, and Valhalla is denied to you." -%E ["Begone from my presence and never return."] -%Cc Val 00019 -"I see you and %n fighting, %p. But you are not prepared and -shall die at %ns hand if you proceed. No. This will not do. -Go back out into the world, and grow more experienced at the ways of war. -Only when you have returned %Ra will you be able to defeat %n." -%E [Come back when you are %Ra.] -%Cc Val 00020 -"NO! This is terrible. I see you becoming an ally of %n, and -leading his armies in the final great battles. This must not come to -pass! You have strayed from the %a path. You must purge yourself, -and return here only when you have regained a state of purity." -%E [You have strayed from the %a path. Return after you purify yourself.] -%Cc Val 00021 -"It is not clear, %p, for my sight is limited without our relic. -But it is now likely that you can defeat %n, and recover -%o. - -"A short time ago, %n and his minions attacked this place. They -opened the huge volcanic vents you %x about the hill, and attacked. I knew -that this was to come to pass, and had asked %d for a group of %gP -to help defend this place. The few you %x here are the mightiest of -Valhalla's own, and are all that are left of one hundred %d sent. - -"Despite the great and glorious battle we fought, %n managed at -last to steal %o. This has upset the balance of the universe, -and unless %oh is returned into my care, %n may start Ragnarok. - -"You must find the entrance to %i. Travel downward -from there and you will find %ns lair. Defeat him and -return %o to me." -%E [Find %i; defeat %n; return with %o.] -%Cp Val 00025 -"Go with the blessings of %d." -%E -%Cp Val 00026 -"Call upon %d when you are in need." -%E -%Cp Val 00027 -"Use %o if you can. It will protect you." -%E -%Cp Val 00028 -"Magical cold is very effective against %n." -%E -%Cp Val 00029 -"To face %n, you will need to be immune to fire." -%E -%Cp Val 00030 -"May %d strengthen your sword-arm." -%E -%Cp Val 00031 -"Trust in %d. He will not desert you." -%E -%Cp Val 00032 -"It becomes more likely that Ragnarok will come with every passing moment. -You must hurry, %p." -%E -%Cp Val 00033 -"If %n can master %o, he will be powerful enough to -face %d far earlier than is fated. This must not be!" -%E -%Cp Val 00034 -"Remember your training, %p. You can succeed." -%E -%Cc Val 00035 -The ice and snow gives way to a valley floor. You %x ahead of you -a huge round hill surrounded by pools of lava. This then is the entrance -to %i. It looks like you're not going to get in without -a fight though. -%E [This is the entrance to %i.] -%Cp Val 00036 -Once again, you stand before the entrance to %i. -%E -%Cc Val 00040 -Through clouds of sulphurous gasses, you %x a rock palisade -surrounded with a moat of bubbling lava. You remember the description -from something that %l said. This is the lair of %n. -%E [This is the lair of %n.] -%Cp Val 00041 -Once again, you stand in sight of %ns lair. -%E -%Cc Val 00050 -"So! %lC has finally sent %ca to challenge me! - -"I thought that mastering %o would enable me to challenge -%d, but it has shown me that first I must kill you! So come, little -%s. Once I defeat you, I can at last begin the final battle with %d." -%E ["%oC has shown me that I must kill you."] -%Cp Val 00051 -"Again you challenge me, %r. Good. I will kill you now." -%E -%Cp Val 00052 -"Have you not learned yet? You cannot defeat %n!" -%E -%Cp Val 00053 -"I will kill you, %c, and wrest %o from your mangled hands." -%E -%Cp Val 00060 -"I am your death, %c." -%E -%Cp Val 00061 -"You cannot prevail, %r. I have foreseen your every move." -%E -%Cp Val 00062 -"With you out of the way, Valhalla will be mine for the taking." -%E -%Cp Val 00063 -"I killed scores of %ds best when I took %o. -Do you really think that one %c can stand against me?" -%E -%Cp Val 00064 -"Who bears the souls of %cP to Valhalla, %r?" -%E -%Cp Val 00065 -"No, %d cannot help you here." -%E -%Cp Val 00066 -"Some instrument of %d you are, %p. You are a weakling!" -%E -%Cp Val 00067 -"Never have I seen %ca so clumsy in battle." -%E -%Cp Val 00068 -"You die now, little %s." -%E -%Cp Val 00069 -"Your body I destroy now, your soul when my hordes overrun Valhalla!" -%E -%Cc Val 00070 -As you pick up %o, your mind is suddenly filled with images, -and you perceive all of the possibilities of each potential choice you -could make. As you begin to control and channel your thoughts, you -realize that you must return %o to %l immediately. -%E [You must return %o to %l.] -%Cc Val 00080 -A look of surprise and horror appears on %ns face. - - "No!!! %o has lied to me! I have been misled!" - -Suddenly, %n grasps his head and screams in agony, then dies. -%E [%nC dies.] -%Cc Val 00081 -As you approach, %l rises and touches %o. - -"You may take %o with you, %p. I have removed from -it the power to foretell the future, for that power no mortal should -have. Its other abilities, however, you have at your disposal. - -"You must now begin in %ds name to search for the Amulet of Yendor. -May your steps be guided by %d, my %S." -%E [Take %o. Search for the Amulet.] -# assumes Orb of Fate (glass object) -%Cc Val 00082 -"Careful, %p! %oC might break, and that would be -a tragic loss. You are its keeper now, and the time has come to -resume your search for the Amulet. %Z await your -return through the magic portal that brought you here." -%E [You are %os keeper now. Return through the portal and find the Amulet.] -%Cp Val 00090 -"Greetings, %p. I have not been able to pay as much attention to -your search for the Amulet as I have wished. How do you fare?" -%E -%Cc Val 00091 -"Excellent, %p. I see you have recovered the Amulet! - -"You must take the Amulet to the Great Temple of %d, on the Astral -Plane. There you must offer the Amulet to %d. - -"Go now, my %S. I cannot tell you your fate, as the power of the -Amulet interferes with mine. I hope for your success." -%E [Take the Amulet to %ds temple on the Astral Plane and offer it.] -# -# Wizard -# -%Cc Wiz 00001 -You are suddenly in familiar surroundings. You notice what appears to -be a large, squat stone structure nearby. Wait! That looks like the -tower of your former teacher, %l. - -However, things are not the same as when you were last here. Mists and -areas of unexplained darkness surround the tower. There is movement in -the shadows. - -Your teacher would never allow such unaesthetic forms to surround the -tower... unless something were dreadfully wrong! -%E [You have arrived at %ls tower but something is very wrong.] -%Cp Wiz 00002 -Once again, you are back at %H. -%E -%Cp Wiz 00003 -You are back at %H. -You have an odd feeling this may be the last time you ever come here. -%E -%Cp Wiz 00005 -"Would you happen to have some eye of newt in that overstuffed pack, %s?" -%E -%Cp Wiz 00006 -"Ah, the spell to create the magic portal worked. Outstanding!" -%E -%Cp Wiz 00007 -"Hurry! %lC may not survive that casting of the portal spell!" -%E -%Cp Wiz 00008 -"The spells of %n were just too powerful for us to withstand." -%E -%Cp Wiz 00009 -"I, too, will venture into the world, because %n is but one of -many evils to be vanquished." -%E -%Cp Wiz 00010 -"I have some eye of newt to trade, do you have a spare blind-worm's sting?" -%E -%Cp Wiz 00011 -"The magic portal now seems like it will remain stable for quite some time." -%E -%Cp Wiz 00012 -"Have you noticed how much stronger %l is since %o was recovered?" -%E -%Cp Wiz 00013 -"Thank %d! We weren't positive you would defeat %n." -%E -%Cp Wiz 00014 -"I, too, will venture into the world, because %n was but one of -many evils to be vanquished." -%E -%Cc Wiz 00015 -"Come closer, %p, for my voice falters in my old age. -Yes, I see that you have come a long way since you went out into the -world, leaving the safe confines of this tower. However, I must first -determine if you have all of the skills required to take on the task -I require of you." -%E [You have come a long way, but are you ready for the task I require?] -%Cp Wiz 00016 -"Well, %p, you have returned. Perhaps you are now ready..." -%E -%Cp Wiz 00017 -"This is getting tedious, %p, but perseverance is a sign of a true mage. -I certainly hope that you are truly ready this time!" -%E -%Cc Wiz 00018 -"You fool, %p! Why did I waste all of those years teaching you -the esoteric arts? Get out of here! I shall find another." -%E ["Get out of here!"] -%Cc Wiz 00019 -"Alas, %p, you have not yet shown your proficiency as a worthy -spellcaster. As %ra, you would surely be overcome in the challenge -ahead. Go, now, expand your horizons, and return when you have attained -renown as %Ra." -%E [Go; return when you are %Ra.] -%Cc Wiz 00020 -"You amaze me, %p! How many times did I tell you that the way of a mage -is an exacting one. One must use the world with care, lest one leave it -in ruins and simplify the task of %n. - -"You must go back and show your worthiness. Do not return until you are -truly ready for this quest. May %d guide you in this task." -%E [Go; come back when you are worthy of %d.] -%Cc Wiz 00021 -"Yes, %p, you truly are ready for this dire task. Listen, -carefully, for what I tell you now will be of vital importance. - -"Since you left us to hone your skills in the world, we unexpectedly came -under attack by the forces of %n. As you know, we thought -%n had perished at the end of the last age, but, alas, this was -not the case. - -"%nC sent an army of abominations against us. Among them was a -minion, mindless and ensorcelled, and thus, in the confusion, it was -able to penetrate our defenses. Alas, this creature has stolen -%o and I fear has delivered %oh to %n. - -"Over the years, I had woven most of my power into this amulet, and thus, -without it, I have but a shadow of my former power, and I fear that I -shall soon perish. - -"You must travel to %i, and within its dungeons, -find and overcome %n, and return %o to me. - -"Go now, with %d, and complete this quest before it is too late." -%E [Travel to %i; overcome %n; return with %o.] -%Cp Wiz 00025 -"Beware, for %n is immune to most magical attacks." -%E -%Cp Wiz 00026 -"To enter %i you must pass many traps." -%E -%Cp Wiz 00027 -"%nC may be vulnerable to physical attacks." -%E -%Cp Wiz 00028 -"%d will come to your aid when you call." -%E -%Cp Wiz 00029 -"You must utterly destroy %n. He will pursue you otherwise." -%E -%Cp Wiz 00030 -"%oC is a mighty artifact. With it you can -destroy %n." -%E -%Cp Wiz 00031 -"Go forth with the blessings of %d." -%E -%Cp Wiz 00032 -"I will have my %gP watch for your return." -%E -%Cp Wiz 00033 -"Feel free to take any items in that chest that might aid you." -%E -%Cp Wiz 00034 -"You will know when %o is near. Proceed with care!" -%E -%Cp Wiz 00035 -Wisps of fog swirl nearby. You feel that %ns lair is close. -%E -%Cp Wiz 00036 -You believe that you may once again invade %i. -%E -%Cp Wiz 00040 -You feel your mentor's presence; perhaps %o is nearby. -%E -%Cp Wiz 00041 -The aura of %o tingles at the edge of your perception. -%E -%Cp Wiz 00042 -You have returned to %ns lair. -%E -%Cc Wiz 00050 -"Ah, I recognize you, %p. So, %l has sent you to steal -%o from me, hmmm? Well, %lh is a fool to send such -a mental weakling against me. - -"Your destruction, however, should make for good sport. In the end, you -shall beg me to kill you!" -%E ["Your destruction should make for good sport."] -%Cc Wiz 00051 -"How nice of you to return, %p! I enjoyed our last meeting. Are you -still hungry for more pain? - -"Come! Your soul, like %o, shall soon be mine to command." -%E ["Your soul shall soon be mine to command."] -%Cp Wiz 00052 -"I'm sure that your perseverance shall be the subject of innumerable -ballads, but you shall not be around to hear them, I fear!" -%E -%Cp Wiz 00053 -"Thief! %oC belongs to me, now. I shall feed -your living flesh to my minions." -%E -%Cp Wiz 00060 -"Your puny powers are no match for me, fool!" -%E -%Cp Wiz 00061 -"When you are defeated, your torment will last for a thousand years." -%E -%Cp Wiz 00062 -"After your downfall, %p, I shall devour %l for dessert!" -%E -%Cp Wiz 00063 -"Are you ready yet to beg for mercy? I could be lenient..." -%E -%Cp Wiz 00064 -"Your soul shall join the enslaved multitude I command!" -%E -%Cp Wiz 00065 -"Your lack of will is evident, and you shall die as a result." -%E -%Cp Wiz 00066 -"Your faith in %d is for naught! Come, submit to me now!" -%E -%Cp Wiz 00067 -"A mere %r is nothing compared to my skill!" -%E -%Cp Wiz 00068 -"So, you are the best hope of %l? How droll." -%E -%Cp Wiz 00069 -"Feel my power, %c! My victory is imminent!" -%E -%Cc Wiz 00070 -As you touch %o, its comforting power infuses you -with new energy. You feel as if you can detect others' thoughts flowing -through it. Although you yearn to wear %o and -attack the Wizard of Yendor, you know you must return it to its rightful -owner, %l. -%E [You feel %os power and know you should return %oh to %l.] -%Cc Wiz 00080 -%nC, whose body begins to shrivel up, croaks out: - - "I shall haunt your progress until the end of time. A thousand - curses on you and %l." - -Then, the body bursts into a cloud of choking dust, and blows away. -%E [%nC curses you as %nh dies.] -%Cc Wiz 00081 -%lC notices %o in your possession, -beams at you and says: - - "I knew you could defeat %n and retrieve - %o. We shall never forget this - brave service. - - "Take %oh with you in your quest for the Amulet of Yendor. - I can sense that it has attuned %oiself to you already. - - "May %d guide you in your quest, and keep you from harm." -%E [Take %o with you in your quest for the Amulet.] -%Cc Wiz 00082 -"You are the keeper of %o now. It is time to -recover the /other/ Amulet. %Z await your return through -the magic portal which brought you here." -%E [Keep %o, return through the portal to %Z; find the other Amulet.] -%Cp Wiz 00090 -"Come near, my %S, and share your adventures with me. -So, have you succeeded in your quest for the Amulet of Yendor?" -%E -%Cc Wiz 00091 -"Congratulations, %p. I always knew that if anyone could succeed -in defeating the Wizard of Yendor and his minions, it would be you. - -"Go now, and take the Amulet to the Astral Plane. Once there, present -the Amulet on the altar of %d. Along the way you shall pass through -the four Elemental Planes. These planes are like nothing you have ever -experienced before, so be prepared! - -"For this you were born, %s! I am very proud of you." -%E [Take the Amulet to %ds altar on the Astral Plane.] -# -# General -# -%Cc - 00001 -It is written in the Book of %d: - - After the Creation, the cruel god Moloch rebelled - against the authority of Marduk the Creator. - Moloch stole from Marduk the most powerful of all - the artifacts of the gods, the Amulet of Yendor, - and he hid it in the dark cavities of Gehennom, the - Under World, where he now lurks, and bides his time. - -Your %G %d seeks to possess the Amulet, and with it -to gain deserved ascendance over the other gods. - -You, a newly trained %r, have been heralded -from birth as the instrument of %d. You are destined -to recover the Amulet for your deity, or die in the -attempt. Your hour of destiny has come. For the sake -of us all: Go bravely with %d! -%E [%dC has chosen you to recover the Amulet of Yendor for %dI.] -%Cp - 00002 -You receive a faint telepathic message from %l: -Your help is urgently needed at %H! -Look for a ...ic transporter. -You couldn't quite make out that last message. -%E -%Cp - 00003 -You again sense %l pleading for help. -%E -%Cp - 00004 -You again sense %l demanding your attendance. -%E -# Completed the quest by returning with artifact, but not carrying -# the Bell of Opening; quest leader lets you know that it is needed. -#[ Should this be role-specific so that each leader has variant text? ] -%Cp - 00005 -"The silver bell which was hoarded by %n will be -essential in locating the Amulet of Yendor." -%E -# -# Angelic maledictions. -# -%Cp - 00010 -"Repent, and thou shalt be saved!" -%E -%Cp - 00011 -"Thou shalt pay for thine insolence!" -%E -%Cp - 00012 -"Very soon, my child, thou shalt meet thy maker." -%E -%Cp - 00013 -"The great %D has sent me to make you pay for your sins!" -%E -%Cp - 00014 -"The wrath of %D is now upon you!" -%E -%Cp - 00015 -"Thy life belongs to %D now!" -%E -%Cp - 00016 -"Dost thou wish to receive thy final blessing?" -%E -%Cp - 00017 -"Thou art but a godless void." -%E -%Cp - 00018 -"Thou art not worthy to seek the Amulet." -%E -%Cp - 00019 -"No one expects the Spanish Inquisition!" -%E -# -# Demonic maledictions. -# -%Cp - 00030 -"I first mistook thee for a statue, when I regarded thy head of stone." -%E -%Cp - 00031 -"Come here often?" -%E -%Cp - 00032 -"Doth pain excite thee? Wouldst thou prefer the whip?" -%E -%Cp - 00033 -"Thinkest thou it shall tickle as I rip out thy lungs?" -%E -%Cp - 00034 -"Eat slime and die!" -%E -%Cp - 00035 -"Go ahead, fetch thy mama! I shall wait." -%E -%Cp - 00036 -"Go play leapfrog with a herd of unicorns!" -%E -%Cp - 00037 -"Hast thou been drinking, or art thou always so clumsy?" -%E -%Cp - 00038 -"This time I shall let thee off with a spanking, but let it not happen again." -%E -%Cp - 00039 -"I've met smarter (and prettier) acid blobs." -%E -%Cp - 00040 -"Look! Thy bootlace is undone!" -%E -%Cp - 00041 -"Mercy! Dost thou wish me to die of laughter?" -%E -%Cp - 00042 -"Run away! Live to flee another day!" -%E -%Cp - 00043 -"Thou hadst best fight better than thou canst dress!" -%E -%Cp - 00044 -"Twixt thy cousin and thee, Medusa is the prettier." -%E -%Cp - 00045 -"Methinks thou wert unnaturally stirred by yon corpse back there, eh, varlet?" -%E -%Cp - 00046 -"Up thy nose with a rubber hose!" -%E -%Cp - 00047 -"Verily, thy corpse could not smell worse!" -%E -%Cp - 00048 -"Wait! I shall polymorph into a grid bug to give thee a fighting chance!" -%E -%Cp - 00049 -"Why search for the Amulet? Thou wouldst but lose it, cretin." -%E -# -# Banishment message (for converted hero) -# -%Cc - 00060 -"You have betrayed all those who hold allegiance to %d, as you once did. -My allegiance to %d holds fast and I cannot condone or accept what you -have done. - -Leave this place. You shall never set foot at %H again. -That which you seek is now lost forever, for without the Bell of Opening, -you will never be able to enter the place where he who has the Amulet -resides. - -Go now! You are banished from this place. -%E [You are banished from %H for betraying your allegiance to %d.] -# -# TEST PATTERN -# -%Cc - 00099 - %p: return(plname); - %c: return(pl_character); - %r: return((char *)rank_of(u.ulevel)); - %R: return((char *)rank_of(MIN_QUEST_LEVEL)); - %s: return((flags.female) ? "sister" : "brother" ); - %S: return((flags.female) ? "daughter" : "son" ); - %l: return((char *)ldrname()); - %i: return(intermed()); - %o: return(artiname()); - %O: return(shortened(artiname())); - %n: return((char *)neminame()); - %g: return((char *)guardname()); - %G: return((char *)align_gtitle(u.ualignbase[1])); - %H: return((char *)homebase()); - %a: return(Alignnam(u.ualignbase[1])); - %A: return(Alignnam(u.ualign.type)); - %d: return((char *)align_gname(u.ualignbase[1])); - %D: return((char *)align_gname(A_LAWFUL)); - %C: return("chaotic"); - %N: return("neutral"); - %L: return("lawful"); - %x: return((Blind) ? "sense" : "see"); - %Z: return("The Dungeons of Doom"); - %%: return(percent_sign); - a suffix: return an(root); - A suffix: return An(root); - C suffix: return capitalized(root); - h suffix: return pronoun(he_or_she, mon_of(root)); /* for %l,%n,%d,%o */ - H suffix: return capitalized(pronoun(he_or_she, mon_of(root))); - i suffix: return pronoun(him_or_her, mon_of(root)); - I suffix: return capitalized(pronoun(him_or_her, mon_of(root))); - j suffix: return pronoun(his_or_her, mon_of(root)); - J suffix: return capitalized(pronoun(his_or_her, mon_of(root))); - p suffix: return makeplural(root); - P suffix: return makeplural(capitalized(root)); - s suffix: return s_suffix(root); - S suffix: return s_suffix(capitalized(root)); - t suffix: return strip_the_prefix(root); -%E diff --git a/include/extern.h b/include/extern.h index 08ca0b29a..a0ffd7d65 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2094,8 +2094,8 @@ E short FDECL(quest_info, (int)); E const char *NDECL(ldrname); E boolean FDECL(is_quest_artifact, (struct obj *)); E struct obj *FDECL(find_quest_artifact, (unsigned)); -E void FDECL(com_pager, (int)); -E void FDECL(qt_pager, (int)); +E void FDECL(com_pager, (const char *)); +E void FDECL(qt_pager, (const char *)); E struct permonst *NDECL(qt_montype); E void NDECL(deliver_splev_message); diff --git a/src/allmain.c b/src/allmain.c index 96bd35c35..5808503e8 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -622,7 +622,6 @@ newgame() if (iflags.news) display_file(NEWS, FALSE); #endif - load_qtlist(); /* load up the quest text info */ /* quest_init(); -- Now part of role_init() */ mklev(); @@ -639,7 +638,7 @@ newgame() if (flags.legacy) { flush_screen(1); - com_pager(1); + com_pager("legacy"); } urealtime.realtime = 0L; diff --git a/src/do.c b/src/do.c index f1a515c61..54162e0b9 100644 --- a/src/do.c +++ b/src/do.c @@ -1663,9 +1663,9 @@ boolean at_stairs, falling, portal; || g.quest_status.leader_is_dead)) { if (!u.uevent.qcalled) { u.uevent.qcalled = 1; - com_pager(2); /* main "leader needs help" message */ + com_pager("quest_portal"); /* main "leader needs help" message */ } else { /* reminder message */ - com_pager(Role_if(PM_ROGUE) ? 4 : 3); + com_pager(Role_if(PM_ROGUE) ? "quest_portal_demand" : "quest_portal_again"); } } } diff --git a/src/quest.c b/src/quest.c index 42f2db639..9813a9ddb 100644 --- a/src/quest.c +++ b/src/quest.c @@ -27,13 +27,13 @@ static void on_start() { if (!Qstat(first_start)) { - qt_pager(QT_FIRSTTIME); + qt_pager("firsttime"); Qstat(first_start) = TRUE; } else if ((u.uz0.dnum != u.uz.dnum) || (u.uz0.dlevel < u.uz.dlevel)) { if (Qstat(not_ready) <= 2) - qt_pager(QT_NEXTTIME); + qt_pager("nexttime"); else - qt_pager(QT_OTHERTIME); + qt_pager("othertime"); } } @@ -48,14 +48,14 @@ on_locate() return; } else if (!Qstat(first_locate)) { if (from_above) - qt_pager(QT_FIRSTLOCATE); + qt_pager("locate_first"); /* if we've arrived from below this will be a lie, but there won't be any point in delivering the message upon a return visit from above later since the level has now been seen */ Qstat(first_locate) = TRUE; } else { if (from_above) - qt_pager(QT_NEXTLOCATE); + qt_pager("locate_next"); } } @@ -65,7 +65,7 @@ on_goal() if (Qstat(killed_nemesis)) { return; } else if (!Qstat(made_goal)) { - qt_pager(QT_FIRSTGOAL); + qt_pager("goal_first"); Qstat(made_goal) = 1; } else { /* @@ -81,7 +81,7 @@ on_goal() | (1 << OBJ_BURIED)); struct obj *qarti = find_quest_artifact(whichobjchains); - qt_pager(qarti ? QT_NEXTGOAL : QT_ALTGOAL); + qt_pager(qarti ? "goal_next" : "goal_alt"); if (Qstat(made_goal) < 7) Qstat(made_goal)++; } @@ -109,7 +109,7 @@ nemdead() { if (!Qstat(killed_nemesis)) { Qstat(killed_nemesis) = TRUE; - qt_pager(QT_KILLEDNEM); + qt_pager("killed_nemesis"); } } @@ -123,7 +123,7 @@ struct obj *obj; obj->dknown = 1; /* only give this message once */ Qstat(touched_artifact) = TRUE; - qt_pager(QT_GOTIT); + qt_pager("gotit"); exercise(A_WIS, TRUE); } } @@ -221,16 +221,16 @@ struct obj *obj; /* quest artifact; possibly null if carrying Amulet */ struct obj *otmp; if (u.uhave.amulet) { /* unlikely but not impossible */ - qt_pager(QT_HASAMULET); + qt_pager("hasamulet"); /* leader IDs the real amulet but ignores any fakes */ if ((otmp = carrying(AMULET_OF_YENDOR)) != 0) fully_identify_obj(otmp); } else { - qt_pager(!Qstat(got_thanks) ? QT_OFFEREDIT : QT_OFFEREDIT2); + qt_pager(!Qstat(got_thanks) ? "offeredit" : "offeredit2"); /* should have obtained bell during quest; if not, suggest returning for it now */ if ((otmp = carrying(BELL_OF_OPENING)) == 0) - com_pager(5); + com_pager("quest_complete_no_bell"); } Qstat(got_thanks) = TRUE; @@ -260,7 +260,7 @@ chat_with_leader() /* Rule 2: You've gone back before going for the amulet. */ else - qt_pager(QT_POSTHANKS); + qt_pager("posthanks"); /* Rule 3: You've got the artifact and are back to return it. */ } else if (u.uhave.questart) { @@ -274,16 +274,16 @@ chat_with_leader() /* Rule 4: You haven't got the artifact yet. */ } else if (Qstat(got_quest)) { - qt_pager(rn1(10, QT_ENCOURAGE)); + qt_pager("encourage"); /* Rule 5: You aren't yet acceptable - or are you? */ } else { if (!Qstat(met_leader)) { - qt_pager(QT_FIRSTLEADER); + qt_pager("leader_first"); Qstat(met_leader) = TRUE; Qstat(not_ready) = 0; } else - qt_pager(QT_NEXTLEADER); + qt_pager("leader_next"); /* the quest leader might have passed through the portal into the regular dungeon; none of the remaining make sense there */ @@ -291,16 +291,16 @@ chat_with_leader() return; if (not_capable()) { - qt_pager(QT_BADLEVEL); + qt_pager("badlevel"); exercise(A_WIS, TRUE); expulsion(FALSE); } else if (is_pure(TRUE) < 0) { - com_pager(QT_BANISHED); + com_pager("banished"); expulsion(TRUE); } else if (is_pure(TRUE) == 0) { - qt_pager(QT_BADALIGN); + qt_pager("badalign"); if (Qstat(not_ready) == MAX_QUEST_TRIES) { - qt_pager(QT_LASTLEADER); + qt_pager("leader_last"); expulsion(TRUE); } else { Qstat(not_ready)++; @@ -308,7 +308,7 @@ chat_with_leader() expulsion(FALSE); } } else { /* You are worthy! */ - qt_pager(QT_ASSIGNQUEST); + qt_pager("assignquest"); exercise(A_WIS, TRUE); Qstat(got_quest) = TRUE; } @@ -330,7 +330,7 @@ struct monst *mtmp; return; if (Qstat(pissed_off)) { - qt_pager(QT_LASTLEADER); + qt_pager("leader_last"); expulsion(TRUE); } else chat_with_leader(); @@ -340,7 +340,7 @@ static void chat_with_nemesis() { /* The nemesis will do most of the talking, but... */ - qt_pager(rn1(10, QT_DISCOURAGE)); + qt_pager("discourage"); if (!Qstat(met_nemesis)) Qstat(met_nemesis++); } @@ -350,21 +350,21 @@ nemesis_speaks() { if (!Qstat(in_battle)) { if (u.uhave.questart) - qt_pager(QT_NEMWANTSIT); + qt_pager("nemesis_wantsit"); else if (Qstat(made_goal) == 1 || !Qstat(met_nemesis)) - qt_pager(QT_FIRSTNEMESIS); + qt_pager("nemesis_first"); else if (Qstat(made_goal) < 4) - qt_pager(QT_NEXTNEMESIS); + qt_pager("nemesis_next"); else if (Qstat(made_goal) < 7) - qt_pager(QT_OTHERNEMESIS); + qt_pager("nemesis_other"); else if (!rn2(5)) - qt_pager(rn1(10, QT_DISCOURAGE)); + qt_pager("discourage"); if (Qstat(made_goal) < 7) Qstat(made_goal)++; Qstat(met_nemesis) = TRUE; } else /* he will spit out random maledictions */ if (!rn2(5)) - qt_pager(rn1(10, QT_DISCOURAGE)); + qt_pager("discourage"); } static void @@ -372,9 +372,9 @@ chat_with_guardian() { /* These guys/gals really don't have much to say... */ if (u.uhave.questart && Qstat(killed_nemesis)) - qt_pager(rn1(5, QT_GUARDTALK2)); + qt_pager("guardtalk_after"); else - qt_pager(rn1(5, QT_GUARDTALK)); + qt_pager("guardtalk_before"); } static void diff --git a/src/questpgr.c b/src/questpgr.c index f0cf6283f..ca131bd17 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -9,15 +9,12 @@ #include "qtext.h" -#define QTEXT_FILE "quest.dat" +#define QTEXT_FILE "quest.lua" #ifdef TTY_GRAPHICS #include "wintty.h" #endif -static void NDECL(dump_qtlist); -static void FDECL(Fread, (genericptr_t, int, int, dlb *)); -static struct qtmsg *FDECL(construct_qtlist, (long)); static const char *NDECL(intermed); static struct obj *FDECL(find_qarti, (struct obj *)); static const char *NDECL(neminame); @@ -27,123 +24,10 @@ static void FDECL(qtext_pronoun, (CHAR_P, CHAR_P)); static struct qtmsg *FDECL(msg_in, (struct qtmsg *, int)); static void FDECL(convert_arg, (CHAR_P)); static void FDECL(convert_line, (char *,char *)); -static void FDECL(deliver_by_pline, (struct qtmsg *)); -static void FDECL(deliver_by_window, (struct qtmsg *, int)); +static void FDECL(deliver_by_pline, (const char *)); +static void FDECL(deliver_by_window, (const char *, int)); static boolean FDECL(skip_pager, (BOOLEAN_P)); -/* dump the character msg list to check appearance; - build with DEBUG enabled and use DEBUGFILES=questpgr.c - in sysconf file or environment */ -static void -dump_qtlist() -{ -#ifdef DEBUG - struct qtmsg *msg; - - if (!explicitdebug(__FILE__)) - return; - - for (msg = g.qt_list.chrole; msg->msgnum > 0; msg++) { - (void) dlb_fseek(g.msg_file, msg->offset, SEEK_SET); - deliver_by_window(msg, NHW_MAP); - } -#endif /* DEBUG */ - return; -} - -static void -Fread(ptr, size, nitems, stream) -genericptr_t ptr; -int size, nitems; -dlb *stream; -{ - int cnt; - - if ((cnt = dlb_fread(ptr, size, nitems, stream)) != nitems) { - panic("PREMATURE EOF ON QUEST TEXT FILE! Expected %d bytes, got %d", - (size * nitems), (size * cnt)); - } -} - -static struct qtmsg * -construct_qtlist(hdr_offset) -long hdr_offset; -{ - struct qtmsg *msg_list; - int n_msgs; - - (void) dlb_fseek(g.msg_file, hdr_offset, SEEK_SET); - Fread(&n_msgs, sizeof(int), 1, g.msg_file); - msg_list = (struct qtmsg *) alloc((unsigned) (n_msgs + 1) - * sizeof (struct qtmsg)); - - /* - * Load up the list. - */ - Fread((genericptr_t) msg_list, n_msgs * sizeof (struct qtmsg), 1, - g.msg_file); - - msg_list[n_msgs].msgnum = -1; - return msg_list; -} - -void -load_qtlist() -{ - int n_classes, i; - char qt_classes[N_HDR][LEN_HDR]; - long qt_offsets[N_HDR]; - - g.msg_file = dlb_fopen(QTEXT_FILE, RDBMODE); - if (!g.msg_file) - panic("CANNOT OPEN QUEST TEXT FILE %s.", QTEXT_FILE); - - /* - * Read in the number of classes, then the ID's & offsets for - * each header. - */ - - Fread(&n_classes, sizeof (int), 1, g.msg_file); - Fread(&qt_classes[0][0], sizeof (char) * LEN_HDR, n_classes, g.msg_file); - Fread(qt_offsets, sizeof (long), n_classes, g.msg_file); - - /* - * Now construct the message lists for quick reference later - * on when we are actually paging the messages out. - */ - - g.qt_list.common = g.qt_list.chrole = (struct qtmsg *) 0; - - for (i = 0; i < n_classes; i++) { - if (!strncmp(COMMON_ID, qt_classes[i], LEN_HDR)) - g.qt_list.common = construct_qtlist(qt_offsets[i]); - else if (!strncmp(g.urole.filecode, qt_classes[i], LEN_HDR)) - g.qt_list.chrole = construct_qtlist(qt_offsets[i]); -#if 0 /* UNUSED but available */ - else if (!strncmp(g.urace.filecode, qt_classes[i], LEN_HDR)) - g.qt_list.chrace = construct_qtlist(qt_offsets[i]); -#endif - } - - if (!g.qt_list.common || !g.qt_list.chrole) - impossible("load_qtlist: cannot load quest text."); - dump_qtlist(); - return; /* no ***DON'T*** close the msg_file */ -} - -/* called at program exit */ -void -unload_qtlist() -{ - if (g.msg_file) - (void) dlb_fclose(g.msg_file), g.msg_file = 0; - if (g.qt_list.common) - free((genericptr_t) g.qt_list.common), g.qt_list.common = 0; - if (g.qt_list.chrole) - free((genericptr_t) g.qt_list.chrole), g.qt_list.chrole = 0; - return; -} - short quest_info(typ) int typ; @@ -418,7 +302,7 @@ char *in_line, *out_line; char xbuf[BUFSZ]; cc = out_line; - for (c = xcrypt(in_line, xbuf); *c; c++) { + for (c = in_line; *c; c++) { *cc = 0; switch (*c) { case '\r': @@ -505,68 +389,42 @@ char *in_line, *out_line; } static void -deliver_by_pline(qt_msg) -struct qtmsg *qt_msg; +deliver_by_pline(str) +const char *str; { - long size; char in_line[BUFSZ], out_line[BUFSZ]; - *in_line = '\0'; - for (size = 0; size < qt_msg->size; size += (long) strlen(in_line)) { - (void) dlb_fgets(in_line, sizeof in_line, g.msg_file); - convert_line(in_line, out_line); - pline("%s", out_line); - } + Strcpy(in_line, str); + convert_line(in_line, out_line); + pline("%s", out_line); } static void -deliver_by_window(qt_msg, how) -struct qtmsg *qt_msg; +deliver_by_window(msg, how) +const char *msg; int how; { - long size; + const char *msgp = msg; + const char *msgend = eos((char *)msg); char in_line[BUFSZ], out_line[BUFSZ]; - boolean qtdump = (how == NHW_MAP); - winid datawin = create_nhwindow(qtdump ? NHW_TEXT : how); + winid datawin = create_nhwindow(how); -#ifdef DEBUG - if (qtdump) { - char buf[BUFSZ]; - - /* when dumping quest messages at startup, all of them are passed to - * deliver_by_window(), even if normally given to deliver_by_pline() - */ - Sprintf(buf, "msgnum: %d, delivery: %c", - qt_msg->msgnum, qt_msg->delivery); - putstr(datawin, 0, buf); - putstr(datawin, 0, ""); - } -#endif - for (size = 0; size < qt_msg->size; size += (long) strlen(in_line)) { - (void) dlb_fgets(in_line, sizeof in_line, g.msg_file); + while (msgp && msgp != msgend) { + int i = 0; + while (*msgp != '\0' && *msgp != '\n' && (i < BUFSZ-2)) { + in_line[i] = *msgp; + i++; + msgp++; + } + if (*msgp == '\n') + msgp++; + in_line[i] = '\0'; convert_line(in_line, out_line); putstr(datawin, 0, out_line); } + display_nhwindow(datawin, TRUE); destroy_nhwindow(datawin); - - /* block messages delivered by window aren't kept in message history - but have a one-line summary which is put there for ^P recall */ - *out_line = '\0'; - if (qt_msg->summary_size) { - (void) dlb_fgets(in_line, sizeof in_line, g.msg_file); - convert_line(in_line, out_line); -#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) - } else if (qt_msg->delivery == 'c') { /* skip for 'qtdump' of 'p' */ - /* delivery 'c' and !summary_size, summary expected but not present; - this doesn't prefix the number with role code vs 'general' - but should be good enough for summary verification purposes */ - Sprintf(out_line, "[missing block message summary for #%05d]", - qt_msg->msgnum); -#endif - } - if (*out_line) - putmsghistory(out_line, FALSE); } static boolean @@ -576,71 +434,110 @@ boolean common; /* WIZKIT: suppress plot feedback if starting with quest artifact */ if (g.program_state.wizkit_wishing) return TRUE; - if (!(common ? g.qt_list.common : g.qt_list.chrole)) { - panic("%s: no %s quest text data available", - common ? "com_pager" : "qt_pager", - common ? "common" : "role-specific"); - /*NOTREACHED*/ - return TRUE; - } return FALSE; } -void -com_pager(msgnum) -int msgnum; +boolean +com_pager_core(section, msgid) +const char *section; +const char *msgid; { - struct qtmsg *qt_msg; + const char *const howtoput[] = { "pline", "window", "menu", NULL }; + const int howtoput2i[] = { 1, 2, 3, 0 }; + int output; + lua_State *L; + char *synopsis; + char *text; if (skip_pager(TRUE)) - return; + return FALSE; - if (!(qt_msg = msg_in(g.qt_list.common, msgnum))) { - impossible("com_pager: message %d not found.", msgnum); - return; + L = nhl_init(); + + if (!nhl_loadlua(L, QTEXT_FILE)) { + impossible("com_pager: %s not found.", QTEXT_FILE); + lua_close(L); + return FALSE; } - (void) dlb_fseek(g.msg_file, qt_msg->offset, SEEK_SET); - if (qt_msg->delivery == 'p') - deliver_by_pline(qt_msg); - else if (msgnum == 1) - deliver_by_window(qt_msg, NHW_MENU); + lua_settop(L, 0); + lua_getglobal(L, "questtext"); + if (!lua_istable(L, -1)) { + impossible("com_pager: questtext in %s is not a lua table", QTEXT_FILE); + lua_close(L); + return FALSE; + } + + lua_getfield(L, -1, section); + if (!lua_istable(L, -1)) { + impossible("com_pager: questtext[%s] in %s is not a lua table", section, QTEXT_FILE); + lua_close(L); + return FALSE; + } + + lua_getfield(L, -1, msgid); + if (!lua_istable(L, -1)) { + impossible("com_pager: questtext[%s][%s] in %s is not a lua table", section, msgid, QTEXT_FILE); + lua_close(L); + return FALSE; + } + + synopsis = get_table_str_opt(L, "synopsis", NULL); + text = get_table_str_opt(L, "text", NULL); + output = howtoput2i[get_table_option(L, "output", "pline", howtoput)]; + + if (!synopsis && !text) { + int nelems; + lua_len(L, -1); + nelems = LUA_INTCAST(lua_tointeger(L, -1)); + lua_pop(L, 1); + if (nelems < 2) { + impossible("com_pager: questtext[%s][%s] in %s in not an array of strings", section, msgid, QTEXT_FILE); + lua_close(L); + return FALSE; + } + nelems = rn2(nelems) + 1; + lua_pushinteger(L, nelems); + lua_gettable(L, -2); + text = dupstr(luaL_checkstring(L, -1)); + } + + if ((index(text, '\n') || (strlen(text) >= (BUFSZ - 1))) && output == 1) + output = 2; + + if (output == 1) + deliver_by_pline(text); + else if (output == 3) + deliver_by_window(text, NHW_MENU); else - deliver_by_window(qt_msg, NHW_TEXT); - return; + deliver_by_window(text, NHW_TEXT); + + if (synopsis) { + char in_line[BUFSZ], out_line[BUFSZ]; + Strcpy(in_line, synopsis); + convert_line(in_line, out_line); + putmsghistory(out_line, FALSE); + } + + free(synopsis); + free(text); + lua_close(L); + return TRUE; } void -qt_pager(msgnum) -int msgnum; +com_pager(msgid) +const char *msgid; { - struct qtmsg *qt_msg; + com_pager_core("common", msgid); +} - if (skip_pager(FALSE)) - return; - - qt_msg = msg_in(g.qt_list.chrole, msgnum); - if (!qt_msg) { - /* some roles have an alternate message for return to the goal - level when the quest artifact is absent (handled by caller) - but some don't; for the latter, use the normal goal message; - note: for first visit, artifact is assumed to always be - present which might not be true for wizard mode but we don't - worry about quest message references in that situation */ - if (msgnum == QT_ALTGOAL) - qt_msg = msg_in(g.qt_list.chrole, QT_NEXTGOAL); - } - if (!qt_msg) { - impossible("qt_pager: message %d not found.", msgnum); - return; - } - - (void) dlb_fseek(g.msg_file, qt_msg->offset, SEEK_SET); - if (qt_msg->delivery == 'p' && strcmp(windowprocs.name, "X11")) - deliver_by_pline(qt_msg); - else - deliver_by_window(qt_msg, NHW_TEXT); - return; +void +qt_pager(msgid) +const char *msgid; +{ + if (!com_pager_core(g.urole.filecode, msgid)) + com_pager_core("common", msgid); } struct permonst * @@ -674,8 +571,6 @@ deliver_splev_message() /* copying will stop at newline if one is present */ copynchars(in_line, str, (int) (sizeof in_line) - 1); - /* convert_line() expects encrypted input */ - (void) xcrypt(in_line, in_line); convert_line(in_line, out_line); pline("%s", out_line); diff --git a/src/restore.c b/src/restore.c index fd44f2ea1..c4c725b2c 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1104,7 +1104,6 @@ NHFILE *nhfp; */ inven_inuse(FALSE); - load_qtlist(); /* re-load the quest text info */ /* Set up the vision internals, after levl[] data is loaded but before docrt(). */ reglyph_darkroom(); diff --git a/src/save.c b/src/save.c index 18b7a8bce..6f6c8c1fc 100644 --- a/src/save.c +++ b/src/save.c @@ -1285,7 +1285,6 @@ freedynamicdata() #endif zero_nhfile(&tnhfp); /* also sets fd to -1 */ tnhfp.mode = FREEING; - unload_qtlist(); free_menu_coloring(); free_invbuf(); /* let_to_name (invent.c) */ free_youbuf(); /* You_buf,&c (pline.c) */ diff --git a/src/wizard.c b/src/wizard.c index dbc61241e..4201b3812 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -762,13 +762,14 @@ register struct monst *mtmp; random_insult[rn2(SIZE(random_insult))]); } else if (is_lminion(mtmp) && !(mtmp->isminion && EMIN(mtmp)->renegade)) { - com_pager(rn2(QTN_ANGELIC - 1 + (Hallucination ? 1 : 0)) - + QT_ANGELIC); + com_pager("angel_cuss"); /* TODO: the Hallucination msg */ + /*com_pager(rn2(QTN_ANGELIC - 1 + (Hallucination ? 1 : 0)) + + QT_ANGELIC);*/ } else { if (!rn2(is_minion(mtmp->data) ? 100 : 5)) pline("%s casts aspersions on your ancestry.", Monnam(mtmp)); else - com_pager(rn2(QTN_DEMONIC) + QT_DEMONIC); + com_pager("demon_cuss"); } } diff --git a/sys/unix/Makefile.dat b/sys/unix/Makefile.dat index 153e4b74d..bbc093ac4 100644 --- a/sys/unix/Makefile.dat +++ b/sys/unix/Makefile.dat @@ -9,7 +9,7 @@ NHSROOT=.. # SHELL=E:/GEMINI2/MUPFEL.TTP # UUDECODE=uudecode -VARDAT = bogusmon data engrave epitaph rumors quest.dat oracles options +VARDAT = bogusmon data engrave epitaph rumors quest.lua oracles options all: $(VARDAT) spec_levs quest_levs @@ -100,9 +100,6 @@ data: data.base ../util/makedefs rumors: rumors.tru rumors.fal ../util/makedefs ../util/makedefs -r -quest.dat: quest.txt ../util/makedefs - ../util/makedefs -q - oracles: oracles.txt ../util/makedefs ../util/makedefs -h diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 9d3cceeb8..e55f34fc5 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -57,7 +57,7 @@ DIRPERM = 0755 # for Gnome # VARDATND = x11tiles pet_mark.xbm pilemark.xbm rip.xpm mapbg.xpm -VARDATD = bogusmon data engrave epitaph oracles options quest.dat rumors +VARDATD = bogusmon data engrave epitaph oracles options quest.lua rumors VARDAT = $(VARDATD) $(VARDATND) # Some versions of make use the SHELL environment variable as the shell @@ -133,8 +133,7 @@ oracles: $(GAME) options: $(GAME) ( cd dat ; $(MAKE) options ) -quest.dat: $(GAME) - ( cd dat ; $(MAKE) quest.dat ) +quest.lua: $(GAME) spec_levs: ( cd dat ; $(MAKE) spec_levs ) @@ -247,9 +246,6 @@ fetch-Lua: update: $(GAME) recover $(VARDAT) spec_levs # (don't yank the old version out from under people who're playing it) -mv $(INSTDIR)/$(GAME) $(INSTDIR)/$(GAME).old -# quest.dat is also kept open and has the same problems over NFS -# (quest.dat may be inside nhdat if dlb is in use) - -mv $(INSTDIR)/quest.dat $(INSTDIR)/quest.dat.old -mv $(INSTDIR)/nhdat $(INSTDIR)/nhdat.old # set up new versions of the game files ( $(MAKE) dofiles ) From c6fab3aad8c9b97d97a2602f0b25a477c11ee8a7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 12:01:33 -0500 Subject: [PATCH 298/529] windows and msdos Makefile support of the changes in this branch --- sys/msdos/Makefile.GCC | 20 +++++++++++++++++--- sys/msdos/Makefile1.cross | 18 ++++++++++++++---- sys/msdos/Makefile2.cross | 3 +++ sys/winnt/Makefile.gcc | 23 ++++++++++++++++++----- sys/winnt/Makefile.msc | 19 +++++++++++++++++-- 5 files changed, 69 insertions(+), 14 deletions(-) diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index fee192932..a265b791e 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -318,6 +318,7 @@ VVOBJ = $(O)version.o ifeq "$(ADD_LUA)" "Y" LUAOBJ = $(O)nhlua.o $(O)nhlsel.o +LUA_QTEXT_FILE = "quest.lua" endif ifeq "$(ADD_CURSES)" "Y" @@ -1004,8 +1005,10 @@ $(DAT)/data: $(O)utility.tag $(DATABASE) $(DAT)/rumors: $(O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal @$(subst /,\,$(U)makedefs.exe -r) +ifndef LUA_QTEXT_FILE $(DAT)/quest.dat: $(O)utility.tag $(DAT)/quest.txt @$(subst /,\,$(U)makedefs.exe -q) +endif $(DAT)/oracles: $(O)utility.tag $(DAT)/oracles.txt @$(subst /,\,$(U)makedefs.exe -h) @@ -1029,12 +1032,19 @@ $(O)sp_lev.tag: $(O)utility.tag #note that dir below assumes bin/dir.exe from djgpp distribution # $(DAT)/nhdat: $(U)dlb_main.exe $(DAT)/data $(DAT)/rumors \ - $(DAT)/oracles $(DAT)/quest.dat $(O)sp_lev.tag \ - $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute + $(DAT)/oracles \ +ifndef LUA_QTEXT_FILE + $(DAT)/quest.dat \ +endif + $(O)sp_lev.tag \ + $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute @$(subst /,\,echo dat done >$(O)dat.tag) @$(subst /,\,cd $(DAT)) @$(subst /,\,copy $(MSYS)/msdoshlp.txt .) - @$(LS) data oracles options quest.dat rumors help hh >dlb.lst + @$(LS) data oracles options rumors help hh >dlb.lst +ifndef LUA_QTEXT_FILE + @$(LS) quest.dat >>dlb.lst +endif @$(LS) cmdhelp history opthelp wizhelp license msdoshlp.txt >>dlb.lst @$(LS) bogusmon engrave epitaph tribute >>dlb.lst $(LS) $(subst /,\,*.lua) >>dlb.lst @@ -1083,7 +1093,9 @@ spotless: clean $(subst /,\,if exist $(DAT)/data del $(DAT)/data) $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors) $(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles) +ifndef LUA_QTEXT_FILE $(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat) +endif $(subst /,\,if exist $(DAT)/bogusmon del $(DAT)/bogusmon) $(subst /,\,if exist $(DAT)/engrave del $(DAT)/engrave) $(subst /,\,if exist $(DAT)/epitaph del $(DAT)/epitaph) @@ -1165,7 +1177,9 @@ spotless: clean $(subst /,\,if exist $(DAT)/data del $(DAT)/data) $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors) $(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles) +ifndef LUA_QTEXT_FILE $(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat) +endif $(subst /,\,if exist $(DAT)/bogusmon del $(DAT)/bogusmon) $(subst /,\,if exist $(DAT)/engrave del $(DAT)/engrave) $(subst /,\,if exist $(DAT)/epitaph del $(DAT)/epitaph) diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index dde1ad256..d6db569a7 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -121,6 +121,8 @@ MAKESRC = makedefs.c MAKEDEFSOBJS = $(HOST_O)makedefs.o $(HOST_O)monst.o $(HOST_O)objects.o +LUA_QTEXT_FILE = "quest.lua" + #SPLEVSRC = lev_yacc.c lev_$(LEX).c lev_main.c panic.c #DGNCOMPSRC = dgn_yacc.c dgn_$(LEX).c dgn_main.c #SPLEVOBJS = $(HOST_O)lev_yacc.o $(HOST_O)lev_$(LEX).o $(HOST_O)lev_main.o $(HOST_O)alloc.o \ @@ -312,16 +314,22 @@ $(HOST_O)prereq.tag: hobj.tag $(U)makedefs $(HOST_O)utility.tag \ #note that dir below assumes bin/dir from djgpp distribution # $(DAT)/nhdat: $(U)dlb_main $(DAT)/data $(DAT)/rumors \ - $(DAT)/oracles $(DAT)/quest.dat \ - $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute + $(DAT)/oracles \ +ifndef LUA_QTEXT_FILE + $(DAT)/quest.dat \ +endif + $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute cd $(DAT); \ pwd; \ cp $(MSYS)/msdoshlp.txt .; \ ls -1 data oracles options quest.dat rumors help hh >dlb.lst; \ ls -1 cmdhelp history opthelp wizhelp license >>dlb.lst; \ ls -1 bogusmon engrave epitaph tribute msdoshlp.txt >>dlb.lst; \ +ifndef LUA_QTEXT_FILE + ls -1 quest.dat >>dlb.lst; \ +endif ls -1 *.lua >>dlb.lst; \ - $(U)dlb_main cvIf dlb.lst nhdat + $(U)dlb_main cvIf dlb.lst nhdat; \ cd $(SRC) $(U)dlb_main: $(DLBOBJS) @@ -361,8 +369,10 @@ $(DAT)/rumors: $(HOST_O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal $(DAT)/oracles: $(HOST_O)utility.tag $(DAT)/oracles.txt $(U)makedefs -h +ifndef LUA_QTEXT_FILE $(DAT)/quest.dat: $(HOST_O)utility.tag $(DAT)/quest.txt $(U)makedefs -q +endif $(DAT)/bogusmon: $(HOST_O)utility.tag $(DAT)/bogusmon.txt $(U)makedefs -s @@ -581,7 +591,7 @@ spotless: clean # if [ -f $(DAT)/dungeon.pdf ]; then rm $(DAT)/dungeon.pdf; fi; # if [ -f $(DAT)/dungeon ]; then rm $(DAT)/dungeon; fi; # if [ -f $(DAT)/oracles ]; then rm $(DAT)/oracles; fi; -# if [ -f $(DAT)/quest.dat ]; then rm $(DAT)/quest.dat; fi; +## if [ -f $(DAT)/quest.dat ]; then rm $(DAT)/quest.dat; fi; # if [ -f $(DAT)/bogusmon ]; then rm $(DAT)/bogusmon; fi; # if [ -f $(DAT)/engrave ]; then rm $(DAT)/engrave; fi; # if [ -f $(DAT)/epitaph ]; then rm $(DAT)/epitaph; fi; diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 75b648541..1904b7f95 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -321,6 +321,7 @@ MDLIB = $(O)mdlib.o ifeq "$(ADD_LUA)" "Y" LUAOBJ = $(O)nhlua.o $(O)nhlsel.o +LUA_QTEXT_FILE = "quest.lua" endif ifeq "$(ADD_CURSES)" "Y" @@ -834,7 +835,9 @@ spotless: clean if [ -f $(DAT)/data ]; then rm $(DAT)/data; fi; if [ -f $(DAT)/rumors ]; then rm $(DAT)/rumors; fi; if [ -f $(DAT)/oracles ]; then rm $(DAT)/oracles; fi; +ifndef LUA_QTEXT_FILE if [ -f $(DAT)/quest.dat ]; then rm $(DAT)/quest.dat; fi; +endif if [ -f $(DAT)/bogusmon ]; then rm $(DAT)/bogusmon; fi; if [ -f $(DAT)/engrave ]; then rm $(DAT)/engrave; fi; if [ -f $(DAT)/epitaph ]; then rm $(DAT)/epitaph; fi; diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index ff2ec3bee..1b10a0395 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -329,6 +329,7 @@ VOBJ29 = $(O)sfstruct.o $(O)sfascii.o $(O)sflendian.o ifeq "$(ADD_LUA)" "Y" LUAOBJ = $(O)nhlua.o $(O)nhlsel.o +LUA_QTEXT_FILE = "quest.lua" endif DLBOBJ = $(O)dlb.o @@ -751,7 +752,10 @@ install: initialchk $(O)utility.tag $(GAMEDIR)/NetHack.exe $(NETHACKW_EXE) \ @echo Done. $(O)install.tag: $(DAT)/data $(DAT)/rumors $(DAT)/oracles \ - $(DAT)/quest.dat $(O)sp_lev.tag $(DLB) +ifndef LUA_QTEXT_FILE + $(DAT)/quest.dat \ +endif + $(O)sp_lev.tag $(DLB) ifdef TRAVIS_COMPILER ls -l $(SRC) ls -l $(DAT) @@ -921,8 +925,10 @@ $(DAT)/data: $(O)utility.tag $(DATABASE) $(DAT)/rumors: $(O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal $(subst /,\,$(U)makedefs -r) +ifndef LUA_QTEXT_FILE $(DAT)/quest.dat: $(O)utility.tag $(DAT)/quest.txt $(subst /,\,$(U)makedefs -q) +endif $(DAT)/oracles: $(O)utility.tag $(DAT)/oracles.txt $(subst /,\,$(U)makedefs -h) @@ -1029,17 +1035,22 @@ $(DAT)/porthelp: $(MSWSYS)/porthelp $(subst /,\,@copy $(MSWSYS)/porthelp $@ >nul) nhdat$(NHV): $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \ - $(DAT)/quest.dat $(DAT)/rumors $(DAT)/help $(DAT)/hh $(DAT)/cmdhelp $(DAT)/keyhelp \ - $(DAT)/history $(DAT)/opthelp $(DAT)/wizhelp \ - $(DAT)/porthelp $(DAT)/license $(DAT)/engrave \ - $(DAT)/epitaph $(DAT)/bogusmon $(DAT)/tribute $(O)sp_lev.tag +ifndef LUA_QTEXT_FILE + $(DAT)/quest.dat \ +endif + $(DAT)/rumors $(DAT)/help $(DAT)/hh $(DAT)/cmdhelp $(DAT)/keyhelp \ + $(DAT)/history $(DAT)/opthelp $(DAT)/wizhelp \ + $(DAT)/porthelp $(DAT)/license $(DAT)/engrave \ + $(DAT)/epitaph $(DAT)/bogusmon $(DAT)/tribute $(O)sp_lev.tag $(subst /,\,echo data >$(DAT)/dlb.lst) $(subst /,\,echo oracles >>$(DAT)/dlb.lst) $(subst /,\,if exist $(DAT)/options echo options >>$(DAT)/dlb.lst) $(subst /,\,if exist $(DAT)/ttyoptions echo ttyoptions >>$(DAT)/dlb.lst) $(subst /,\,if exist $(DAT)/guioptions echo guioptions >>$(DAT)/dlb.lst) $(subst /,\,if exist $(DAT)/porthelp echo porthelp >>$(DAT)/dlb.lst) +ifndef LUA_QTEXT_FILE $(subst /,\,echo quest.dat >>$(DAT)/dlb.lst) +endif $(subst /,\,echo rumors >>$(DAT)/dlb.lst) $(subst /,\,echo help >>$(DAT)/dlb.lst) $(subst /,\,echo hh >>$(DAT)/dlb.lst) @@ -1201,7 +1212,9 @@ ifneq "$(W_DAT)" "" if exist $(W_DAT)\bogusmon del $(W_DAT)\bogusmon if exist $(W_DAT)\oracles del $(W_DAT)\oracles if exist $(W_DAT)\rumors del $(W_DAT)\rumors +ifndef LUA_QTEXT_FILE if exist $(W_DAT)\quest.dat del $(W_DAT)\quest.dat +endif ifdef OBSOLETE_DGN_COMPILER if exist $(W_DAT)\dungeon del $(W_DAT)\dungeon if exist $(W_DAT)\dungeon.pdf del $(W_DAT)\dungeon.pdf diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 8455cd075..33ae60bac 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -313,6 +313,7 @@ VOBJ28 = $(O)sfbase.o $(O)sfdata.o VOBJ29 = $(O)sfstruct.o $(O)sfascii.o $(O)sflendian.o LUAOBJ = $(O)nhlua.o $(O)nhlsel.o +LUA_QTEXT_FILE = "quest.lua" DLBOBJ = $(O)dlb.o @@ -995,7 +996,10 @@ $(GAMEDIR)\nhraykey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def /IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\oracles \ - $(DAT)\quest.dat $(O)sp_lev.tag $(DLB) +! IFNDEF LUA_QTEXT_FILE + $(DAT)\quest.dat \ +! ENDIF + $(O)sp_lev.tag $(DLB) ! IF ("$(USE_DLB)"=="Y") copy nhdat$(NHV) $(GAMEDIR) copy $(DAT)\license $(GAMEDIR) @@ -1309,7 +1313,12 @@ $(DAT)\porthelp: $(MSWSYS)\porthelp @copy $(MSWSYS)\porthelp $@ >nul nhdat$(NHV): $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ - $(DAT)\quest.dat $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp $(DAT)\keyhelp \ +!IFNDEF LUA_QTEXT_FILE + $(DAT)\quest.dat \ +!ELSE + $(DAT)\quest.lua \ +!ENDIF + $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp $(DAT)\keyhelp \ $(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\porthelp \ $(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon $(DAT)\tribute $(O)sp_lev.tag cd $(DAT) @@ -1319,7 +1328,9 @@ nhdat$(NHV): $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ if exist ttyoptions echo ttyoptions >>dlb.lst if exist guioptions echo guioptions >>dlb.lst if exist porthelp echo porthelp >>dlb.lst +!IFNDEF LUA_QTEXT_FILE echo quest.dat >>dlb.lst +!ENDIF echo rumors >>dlb.lst echo help >>dlb.lst echo hh >>dlb.lst @@ -1552,7 +1563,9 @@ spotless: clean !ENDIF if exist $(DAT)\oracles del $(DAT)\oracles if exist $(DAT)\rumors del $(DAT)\rumors +!IFNDEF LUA_QTEXT_FILE if exist $(DAT)\quest.dat del $(DAT)\quest.dat +!ENDIF if exist $(DAT)\options del $(DAT)\options if exist $(DAT)\ttyoptions del $(DAT)\ttyoptions if exist $(DAT)\guioptions del $(DAT)\guioptions @@ -1661,8 +1674,10 @@ $(DAT)\data: $(O)utility.tag $(DATABASE) $(DAT)\rumors: $(O)utility.tag $(DAT)\rumors.tru $(DAT)\rumors.fal $(U)makedefs -r +!IFNDEF LUA_QTEXT_FILE $(DAT)\quest.dat: $(O)utility.tag $(DAT)\quest.txt $(U)makedefs -q +!ENDIF $(DAT)\oracles: $(O)utility.tag $(DAT)\oracles.txt $(U)makedefs -h From 0e7d62bcf5491ff53f8d2cf403e7bfa9c97f087c Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 12:03:11 -0500 Subject: [PATCH 299/529] remove warning for unused variable --- src/questpgr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/questpgr.c b/src/questpgr.c index ca131bd17..770ec8cb0 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -299,7 +299,6 @@ convert_line(in_line, out_line) char *in_line, *out_line; { char *c, *cc; - char xbuf[BUFSZ]; cc = out_line; for (c = in_line; *c; c++) { From a9f33df64ad5c6f982cf3a5b399ef95e78b5a555 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 12:23:00 -0500 Subject: [PATCH 300/529] more support in cross-compile for the changes in this branch --- .gitignore | 13 +++++++++++++ sys/msdos/Makefile1.cross | 6 ------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index a8990a153..a46e65d17 100644 --- a/.gitignore +++ b/.gitignore @@ -67,4 +67,17 @@ doc/guidebk.txt djgpp/ src/msdos_o/ msdos-binary/ +dat/NHTILES.BMP +dat/msdoshlp.txt +src/host_o/ +util/djgpp-linux64-gcc550.tar.bz2 +util/djgpp-linux64-gcc550.tar.bz2 +util/djgpp-mingw-gcc550-standalone.zip +util/dlb_main +util/thintile +util/til2bin2 +util/tile2bin +win/share/monthin.txt +win/share/objthin.txt +win/share/oththin.txt # end of ms-dos diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index d6db569a7..06053ab71 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -315,9 +315,6 @@ $(HOST_O)prereq.tag: hobj.tag $(U)makedefs $(HOST_O)utility.tag \ # $(DAT)/nhdat: $(U)dlb_main $(DAT)/data $(DAT)/rumors \ $(DAT)/oracles \ -ifndef LUA_QTEXT_FILE - $(DAT)/quest.dat \ -endif $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute cd $(DAT); \ pwd; \ @@ -325,9 +322,6 @@ endif ls -1 data oracles options quest.dat rumors help hh >dlb.lst; \ ls -1 cmdhelp history opthelp wizhelp license >>dlb.lst; \ ls -1 bogusmon engrave epitaph tribute msdoshlp.txt >>dlb.lst; \ -ifndef LUA_QTEXT_FILE - ls -1 quest.dat >>dlb.lst; \ -endif ls -1 *.lua >>dlb.lst; \ $(U)dlb_main cvIf dlb.lst nhdat; \ cd $(SRC) From e6f5899200c007e8c4babed2add95c3727eae090 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 12:39:00 -0500 Subject: [PATCH 301/529] added protection in Makefile for cross-compile (although should not happen): --- src/version.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/version.c b/src/version.c index 0ab1d8249..099cecb6d 100644 --- a/src/version.c +++ b/src/version.c @@ -44,7 +44,9 @@ const char *NetHack_git_sha #if !defined(CROSSCOMPILE) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST)) = NETHACK_GIT_SHA #else - = NETHACK_HOST_GIT_SHA +#ifdef NETHACK_HOST_GIT_SHA + = NETHACK_HOST_GIT_SHA +#endif #endif ; #endif @@ -54,8 +56,10 @@ const char *NetHack_git_branch #if !defined(CROSSCOMPILE) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST)) = NETHACK_GIT_BRANCH #else +#ifdef NETHACK_HOST_GIT_BRANCH = NETHACK_HOST_GIT_BRANCH #endif +#endif ; #endif From 350371e0304f33ea777a283c6581b831e8a34a2d Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 24 Nov 2019 19:39:31 +0200 Subject: [PATCH 302/529] Don't remove dungeon.lua with make spotless --- sys/unix/Makefile.dat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/unix/Makefile.dat b/sys/unix/Makefile.dat index bbc093ac4..48d50b77c 100644 --- a/sys/unix/Makefile.dat +++ b/sys/unix/Makefile.dat @@ -9,7 +9,7 @@ NHSROOT=.. # SHELL=E:/GEMINI2/MUPFEL.TTP # UUDECODE=uudecode -VARDAT = bogusmon data engrave epitaph rumors quest.lua oracles options +VARDAT = bogusmon data engrave epitaph rumors oracles options all: $(VARDAT) spec_levs quest_levs From c1dd898df6986ff37a786d018bf5898ab3743a32 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 13:37:22 -0500 Subject: [PATCH 303/529] use curl which is always available on osx rather than wget --- .gitignore | 2 +- sys/msdos/msdos-cross-compile.sh | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index a46e65d17..5c64716a3 100644 --- a/.gitignore +++ b/.gitignore @@ -71,7 +71,7 @@ dat/NHTILES.BMP dat/msdoshlp.txt src/host_o/ util/djgpp-linux64-gcc550.tar.bz2 -util/djgpp-linux64-gcc550.tar.bz2 +util/djgpp-osx-gcc550.tar.bz2 util/djgpp-mingw-gcc550-standalone.zip util/dlb_main util/thintile diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh index ec4bcae01..a58cc9f17 100644 --- a/sys/msdos/msdos-cross-compile.sh +++ b/sys/msdos/msdos-cross-compile.sh @@ -1,5 +1,5 @@ #!/bin/sh - +set -x if [ -z "$TRAVIS_BUILD_DIR" ]; then export DJGPP_TOP=$(pwd)/djgpp else @@ -27,7 +27,12 @@ DJGPP_URL="$DJGPP_URL$DJGPP_FILE" cd util if [ ! -f "$DJGPP_FILE" ]; then - wget --no-hsts "$DJGPP_URL" + if [ "$(uname)" = "Darwin" ]; then + #Mac + curl -L $DJGPP_URL -o $DJGPP_FILE + else + wget --no-hsts "$DJGPP_URL" + fi fi cd ../ @@ -50,12 +55,17 @@ fi # DOS-extender for use with djgpp cd djgpp if [ ! -d cwsdpmi ]; then + if [ "$(uname)" = "Darwin" ]; then + #Mac + curl http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip -o csdpmi7b.zip + else wget --no-hsts http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip - mkdir -p cwsdpmi - cd cwsdpmi - unzip ../csdpmi7b.zip - cd ../ - rm csdpmi7b.zip + fi + mkdir -p cwsdpmi + cd cwsdpmi + unzip ../csdpmi7b.zip + cd ../ + rm csdpmi7b.zip fi cd ../ From 2bf7731e12be254de84df36f262dfb486adc5050 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 13:44:53 -0500 Subject: [PATCH 304/529] remove a debugging line from msdos-cross-compile.sh --- sys/msdos/msdos-cross-compile.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh index a58cc9f17..1edf7b147 100644 --- a/sys/msdos/msdos-cross-compile.sh +++ b/sys/msdos/msdos-cross-compile.sh @@ -1,5 +1,5 @@ #!/bin/sh -set -x +#set -x if [ -z "$TRAVIS_BUILD_DIR" ]; then export DJGPP_TOP=$(pwd)/djgpp else From 95b6e27a0958ccb33d3079dc3508bc9debb91451 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 14:26:46 -0500 Subject: [PATCH 305/529] add notice --- util/makedefs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util/makedefs.c b/util/makedefs.c index c6a7a8cb4..c4599bf96 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -2160,6 +2160,12 @@ do_questtxt() { char *line; + /* Make sure they know */ + printf("DEPRECATION WARNINGS:\n"); + printf("'makedefs -q' is no longer required. Remove all references\n"); + printf(" to it from the build process.\n"); + printf("'dat/quest.txt' is no longer part of the source tree.\n"); + Sprintf(filename, DATA_IN_TEMPLATE, QTXT_I_FILE); if (!(ifp = fopen(filename, RDTMODE))) { perror(filename); From 5d778f7418229b7fd7722a83976841600bfc540e Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 17:26:35 -0500 Subject: [PATCH 306/529] clean up some macosx build warnings --- src/mdlib.c | 29 ++++++++++++++++------------- src/questpgr.c | 10 +++++++--- util/makedefs.c | 12 +----------- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/src/mdlib.c b/src/mdlib.c index 6d3dcdd5d..40650add2 100644 --- a/src/mdlib.c +++ b/src/mdlib.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 mdlib.c $NHDT-Date: 1562180226 2019/07/03 18:57:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.149 $ */ +/* NetHack 3.7 mdlib.c $NHDT-Date: 1574634382 2019/11/24 22:26:22 $ $NHDT-Branch: paxed-quest-lua $:$NHDT-Revision: 1.0 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -41,7 +41,10 @@ #if !defined(AMIGA) || defined(AZTEC_C) #define rewind(fp) fseek((fp), 0L, SEEK_SET) /* guarantee a return value */ #endif /* AMIGA || AZTEC_C */ - +#else +#ifndef GLOBAL_H +#include "global.h" +#endif #endif /* !MAKEDEFS_C */ void NDECL(build_options); @@ -555,15 +558,7 @@ build_options() { char buf[BUFSZ]; int i, length, winsyscnt; - - build_savebones_compat_string(); - opttext[idxopttext] = strdup(optbuf); - if (idxopttext < (MAXOPT - 1)) - idxopttext++; - Sprintf(optbuf, - "%sNetHack version %d.%d.%d%s\n", - opt_indent, - VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, + const char *bosuffix = { #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) #if (NH_DEVEL_STATUS == NH_STATUS_BETA) " [beta]" @@ -572,8 +567,16 @@ build_options() #endif #else "" -#endif /* NH_DEVEL_STATUS == NH_STATUS_RELEASED */ - ); +#endif + }; + + build_savebones_compat_string(); + opttext[idxopttext] = strdup(optbuf); + if (idxopttext < (MAXOPT - 1)) + idxopttext++; + (void) sprintf(optbuf, + "%sNetHack version %d.%d.%d%s\n",opt_indent, + VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, bosuffix); opttext[idxopttext] = strdup(optbuf); if (idxopttext < (MAXOPT - 1)) idxopttext++; diff --git a/src/questpgr.c b/src/questpgr.c index 770ec8cb0..3d7fa3919 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 questpgr.c $NHDT-Date: 1505172128 2017/09/11 23:22:08 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.38 $ */ +/* NetHack 3.6 questpgr.c $NHDT-Date: 1574634383 2019/11/24 22:26:23 $ $NHDT-Branch: paxed-quest-lua $:$NHDT-Revision: 1.63 $ */ /* Copyright 1991, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ @@ -21,12 +21,14 @@ static const char *NDECL(neminame); static const char *NDECL(guardname); static const char *NDECL(homebase); static void FDECL(qtext_pronoun, (CHAR_P, CHAR_P)); -static struct qtmsg *FDECL(msg_in, (struct qtmsg *, int)); static void FDECL(convert_arg, (CHAR_P)); static void FDECL(convert_line, (char *,char *)); static void FDECL(deliver_by_pline, (const char *)); static void FDECL(deliver_by_window, (const char *, int)); static boolean FDECL(skip_pager, (BOOLEAN_P)); +#if 0 +static struct qtmsg *FDECL(msg_in, (struct qtmsg *, int)); +#endif short quest_info(typ) @@ -188,6 +190,7 @@ char who, /* 'd' => deity, 'l' => leader, 'n' => nemesis, 'o' => artifact */ return; } +#if 0 static struct qtmsg * msg_in(qtm_list, msgnum) struct qtmsg *qtm_list; @@ -201,6 +204,7 @@ int msgnum; return (struct qtmsg *) 0; } +#endif static void convert_arg(c) @@ -428,7 +432,7 @@ int how; static boolean skip_pager(common) -boolean common; +boolean common UNUSED; { /* WIZKIT: suppress plot feedback if starting with quest artifact */ if (g.program_state.wizkit_wishing) diff --git a/util/makedefs.c b/util/makedefs.c index c4599bf96..bb4b1fca3 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 makedefs.c $NHDT-Date: 1562180226 2019/07/03 18:57:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.149 $ */ +/* NetHack 3.6 makedefs.c $NHDT-Date: 1574634383 2019/11/24 22:26:23 $ $NHDT-Branch: paxed-quest-lua $:$NHDT-Revision: 1.163 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -1196,16 +1196,6 @@ do_date() #if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST) Fprintf(ofp, "\n#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST)\n"); -#if 0 - Fprintf(ofp, "/* On a CROSSCOMPILE build, NetHack is built in two steps:\n"); - Fprintf(ofp, " *%s%d. %s\n", - ind, ++steps, "Build makedefs and its prerequisites, and"); - Fprintf(ofp, " *%s %s\n", - ind, "execute makedefs to generate date.h, onames.h, and pm.h."); - Fprintf(ofp, " *%s%d. %s\n *%s %s\n */\n\n", ind, ++steps, - "Build the rest of NetHack using the cross-compiler", - ind, "to generate the game code for target platform."); -#endif #endif /* CROSSCOMPILE || CROSSCOMPILE_HOST */ if (date_via_env) Fprintf(ofp, "#define SOURCE_DATE_EPOCH (%lu%s) /* via getenv() */\n", From 2a187c47c7b05a36b169e6acda113d7d31248e0e Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 18:01:48 -0500 Subject: [PATCH 307/529] more warnings --- include/extern.h | 3 ++- src/hacklib.c | 18 +++++++++++++++++- src/sp_lev.c | 9 +++++---- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/include/extern.h b/include/extern.h index a0ffd7d65..58d71e472 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1573940539 2019/11/16 21:42:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.741 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1574636502 2019/11/24 23:01:42 $ $NHDT-Branch: paxed-quest-lua $:$NHDT-Revision: 1.760 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -980,6 +980,7 @@ E void FDECL(strbuf_append, (strbuf_t *, const char *)); E void FDECL(strbuf_reserve, (strbuf_t *, int)); E void FDECL(strbuf_empty, (strbuf_t *)); E void FDECL(strbuf_nl_to_crlf, (strbuf_t *)); +E char *FDECL(nonconst, (const char *, char *)); /* ### invent.c ### */ diff --git a/src/hacklib.c b/src/hacklib.c index 59f63e624..d823351f9 100644 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 hacklib.c $NHDT-Date: 1552639487 2019/03/15 08:44:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.67 $ */ +/* NetHack 3.6 hacklib.c $NHDT-Date: 1574636502 2019/11/24 23:01:42 $ $NHDT-Branch: paxed-quest-lua $:$NHDT-Revision: 1.79 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2007. */ /* Copyright (c) Robert Patrick Rankin, 1991 */ @@ -71,6 +71,7 @@ void strbuf_reserve (strbuf *, int) void strbuf_empty (strbuf *) void strbuf_nl_to_crlf (strbuf_t *) + char * nonconst (const char *, char *) =*/ #ifdef LINT #define Static /* pacify lint */ @@ -1261,4 +1262,19 @@ strbuf_t *strbuf; } } +char * +nonconst(str, buf) +const char *str; +char *buf; +{ + char *retval = emptystr; + + if (str && buf) + if ((int) strlen(str) < BUFSZ - 1) { + Strcpy(buf, str); + retval = buf; + } + return retval; +} + /*hacklib.c*/ diff --git a/src/sp_lev.c b/src/sp_lev.c index cb35286ed..3f3fe8f54 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 sp_lev.c $NHDT-Date: 1567805254 2019/09/06 21:27:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.117 $ */ +/* NetHack 3.6 sp_lev.c $NHDT-Date: 1574636502 2019/11/24 23:01:42 $ $NHDT-Branch: paxed-quest-lua $:$NHDT-Revision: 1.141 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -3373,24 +3373,25 @@ lua_State *L; spltrap tmptrap; int x, y; int argc = lua_gettop(L); + char ncbuf[BUFSZ]; create_des_coder(); if (argc == 1 && lua_type(L, 1) == LUA_TSTRING) { const char *trapstr = luaL_checkstring(L, 1); - tmptrap.type = get_traptype_byname(trapstr); + tmptrap.type = get_traptype_byname(nonconst(trapstr, ncbuf)); x = y = -1; } else if (argc == 2 && lua_type(L, 1) == LUA_TSTRING && lua_type(L, 2) == LUA_TTABLE) { const char *trapstr = luaL_checkstring(L, 1); - tmptrap.type = get_traptype_byname(trapstr); + tmptrap.type = get_traptype_byname(nonconst(trapstr, ncbuf)); get_coord(L, 2, &x, &y); } else if (argc == 3) { const char *trapstr = luaL_checkstring(L, 1); - tmptrap.type = get_traptype_byname(trapstr); + tmptrap.type = get_traptype_byname(nonconst(trapstr, ncbuf)); x = luaL_checkinteger(L, 2); y = luaL_checkinteger(L, 3); } else { From 2288b94ae40f11375df3f6012b63e4578410e552 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 24 Nov 2019 15:33:16 -0800 Subject: [PATCH 308/529] fix #H9462 - segfault with levitation boots This is similar to the helm of opposite alignment case fixed some time ago. Deferring the setting of foo->known until an item is fully worn (because it used to get set earlier but gave away information if the wear operation was interrupted) didn't take into account that foo might end up Null in various circumstances. So Boots_on() needs to validate uarmf before setting uarmf->known in case putting on boots of levitation while on a sink caused them to come right back off. I put similar validation into all foo_on() just in case (as far as I'm aware, only Boots_on() and Helmet_on() actually need that). --- doc/fixes36.3 | 4 +++- src/do_wear.c | 47 +++++++++++++++++++++++++++++------------------ 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index e50f1b296..f522e20b5 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.189 $ $NHDT-Date: 1574475416 2019/11/23 02:16:56 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.190 $ $NHDT-Date: 1574638389 2019/11/24 23:33:09 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -300,6 +300,8 @@ when Riders use their bargethrough capability, don't let them swap places with door opening ability was letting them exchange places with something co-located with a closed door without opening it; if killed there, there'd be no corpse so no auto-revive) +putting on levitation boots while on sink would crash when attempting to set + the enchantment known flag on Null 'uarmf' pointer unix: Fix double DLB definition in linux hints file windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix diff --git a/src/do_wear.c b/src/do_wear.c index 94e578175..15959738d 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_wear.c $NHDT-Date: 1573346188 2019/11/10 00:36:28 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.113 $ */ +/* NetHack 3.6 do_wear.c $NHDT-Date: 1574638390 2019/11/24 23:33:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.114 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -196,18 +196,24 @@ Boots_on(VOID_ARGS) break; case LEVITATION_BOOTS: if (!oldprop && !HLevitation && !(BLevitation & FROMOUTSIDE)) { + uarmf->known = 1; /* might come off if putting on over a sink, + * so uarmf could be Null below; status line + * gets updated during brief interval they're + * worn so hero and player learn enchantment */ + context.botl = 1; /* status hilites might mark AC changed */ makeknown(uarmf->otyp); float_up(); if (Levitation) spoteffects(FALSE); /* for sink effect */ } else { - float_vs_flight(); /* maybe toggle (BFlying & I_SPECIAL) */ + float_vs_flight(); /* maybe toggle BFlying's I_SPECIAL */ } break; default: impossible(unknown_type, c_boots, uarmf->otyp); } - uarmf->known = 1; /* boots' +/- evident because of status line AC */ + if (uarmf) /* could be Null here (levitation boots put on over a sink) */ + uarmf->known = 1; /* boots' +/- evident because of status line AC */ return 0; } @@ -321,7 +327,8 @@ Cloak_on(VOID_ARGS) default: impossible(unknown_type, c_cloak, uarmc->otyp); } - uarmc->known = 1; /* cloak's +/- evident because of status line AC */ + if (uarmc) /* no known instance of !uarmc here but play it safe */ + uarmc->known = 1; /* cloak's +/- evident because of status line AC */ return 0; } @@ -393,24 +400,24 @@ Helmet_on(VOID_ARGS) adj_abon(uarmh, uarmh->spe); break; case CORNUTHAUM: - /* people think marked wizards know what they're talking - * about, but it takes trained arrogance to pull it off, - * and the actual enchantment of the hat is irrelevant. - */ + /* people think marked wizards know what they're talking about, + but it takes trained arrogance to pull it off, and the actual + enchantment of the hat is irrelevant */ ABON(A_CHA) += (Role_if(PM_WIZARD) ? 1 : -1); context.botl = 1; makeknown(uarmh->otyp); break; case HELM_OF_OPPOSITE_ALIGNMENT: uarmh->known = 1; /* do this here because uarmh could get cleared */ - /* changing alignment can toggle off active artifact - properties, including levitation; uarmh could get - dropped or destroyed here */ + /* changing alignment can toggle off active artifact properties, + including levitation; uarmh could get dropped or destroyed here + by hero falling onto a polymorph trap or into water (emergency + disrobe) or maybe lava (probably not, helm isn't 'organic') */ uchangealign((u.ualign.type != A_NEUTRAL) ? -u.ualign.type : (uarmh->o_id % 2) ? A_CHAOTIC : A_LAWFUL, 1); - /* makeknown(uarmh->otyp); -- moved below, after xname() */ + /* makeknown(HELM_OF_OPPOSITE_ALIGNMENT); -- below, after Tobjnam() */ /*FALLTHRU*/ case DUNCE_CAP: if (uarmh && !uarmh->cursed) { @@ -431,14 +438,14 @@ Helmet_on(VOID_ARGS) ? "like sitting in a corner" : "giddy"); } else { - /* [message moved to uchangealign()] */ + /* [message formerly given here moved to uchangealign()] */ makeknown(HELM_OF_OPPOSITE_ALIGNMENT); } break; default: impossible(unknown_type, c_helmet, uarmh->otyp); } - /* uarmh could be zero due to uchangealign() */ + /* uarmh could be Null due to uchangealign() */ if (uarmh) uarmh->known = 1; /* helmet's +/- evident because of status line AC */ return 0; @@ -513,7 +520,8 @@ Gloves_on(VOID_ARGS) default: impossible(unknown_type, c_gloves, uarmg->otyp); } - uarmg->known = 1; /* gloves' +/- evident because of status line AC */ + if (uarmg) /* no known instance of !uarmg here but play it safe */ + uarmg->known = 1; /* gloves' +/- evident because of status line AC */ return 0; } @@ -612,7 +620,8 @@ Shield_on(VOID_ARGS) default: impossible(unknown_type, c_shield, uarms->otyp); } - uarms->known = 1; /* shield's +/- evident because of status line AC */ + if (uarms) /* no known instance of !uarmgs here but play it safe */ + uarms->known = 1; /* shield's +/- evident because of status line AC */ return 0; } @@ -652,7 +661,8 @@ Shirt_on(VOID_ARGS) default: impossible(unknown_type, c_shirt, uarmu->otyp); } - uarmu->known = 1; /* shirt's +/- evident because of status line AC */ + if (uarmu) /* no known instances of !uarmu here but play it safe */ + uarmu->known = 1; /* shirt's +/- evident because of status line AC */ return 0; } @@ -684,7 +694,8 @@ Armor_on(VOID_ARGS) * suits are set up as intrinsics (actually 'extrinsics') by setworn() * which is called by armor_or_accessory_on() before Armor_on(). */ - uarm->known = 1; /* suit's +/- evident because of status line AC */ + if (uarm) /* no known instances of !uarm here but play it safe */ + uarm->known = 1; /* suit's +/- evident because of status line AC */ return 0; } From 47a24d507ee2f005502698e0aa83bb1cdfc10919 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 18:55:18 -0500 Subject: [PATCH 309/529] Merge branch 'NetHack-3.6' --- src/do_wear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/do_wear.c b/src/do_wear.c index 67a9d6b75..23c6c4e36 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -196,7 +196,7 @@ Boots_on(VOID_ARGS) * so uarmf could be Null below; status line * gets updated during brief interval they're * worn so hero and player learn enchantment */ - context.botl = 1; /* status hilites might mark AC changed */ + g.context.botl = 1; /* status hilites might mark AC changed */ makeknown(uarmf->otyp); float_up(); if (Levitation) From 8f5cca8e3d9c2fdf9cece17103eaed2d38457fa8 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 24 Nov 2019 17:56:01 -0800 Subject: [PATCH 310/529] 3.7 build cleanup Unix Makefile.utl wasn't aware of the dependency of makedefs.o on src/mdlib.c so didn't rebuild makedefs when it should have. Eliminate several warnings: mdlib.c - #if inside the arguments to macro Sprintf(); nhlua.c - nhl_error() ends with a call to lua_error() which doesn't return, but neither of them were declared that way; nhlsel.c - because of the previous, the 'else error' case of l_selection_ellipse() led to complaints about uninitialized variables; sp_lev.c - missing 'const'. I did minimal testing which went ok, but revisiting a couple of levels gave me un-freed memory allocated by restore.c line 1337. (I haven't looked at that at all.) --- include/extern.h | 4 +- src/mdlib.c | 18 +++--- src/nhlsel.c | 141 +++++++++++++++++++----------------------- src/nhlua.c | 7 ++- src/sp_lev.c | 6 +- sys/unix/Makefile.utl | 6 +- 6 files changed, 84 insertions(+), 98 deletions(-) diff --git a/include/extern.h b/include/extern.h index 08ca0b29a..a191b9acf 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1573940539 2019/11/16 21:42:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.741 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1574646942 2019/11/25 01:55:42 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.759 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1674,7 +1674,7 @@ E int FDECL(l_selection_register, (lua_State *)); E lua_State * NDECL(nhl_init); E boolean FDECL(nhl_loadlua, (lua_State *, const char *)); E boolean FDECL(load_lua, (const char *)); -E void FDECL(nhl_error, (lua_State *, const char *)); +E void FDECL(nhl_error, (lua_State *, const char *)) NORETURN; E void FDECL(lcheck_param_table, (lua_State *)); E schar FDECL(get_table_mapchr, (lua_State *, const char *)); E schar FDECL(get_table_mapchr_opt, (lua_State *, const char *, SCHAR_P)); diff --git a/src/mdlib.c b/src/mdlib.c index 6d3dcdd5d..ea134e67f 100644 --- a/src/mdlib.c +++ b/src/mdlib.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 mdlib.c $NHDT-Date: 1562180226 2019/07/03 18:57:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.149 $ */ +/* NetHack 3.7 mdlib.c $NHDT-Date: 1574646946 2019/11/25 01:55:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -560,25 +560,21 @@ build_options() opttext[idxopttext] = strdup(optbuf); if (idxopttext < (MAXOPT - 1)) idxopttext++; - Sprintf(optbuf, - "%sNetHack version %d.%d.%d%s\n", - opt_indent, - VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) #if (NH_DEVEL_STATUS == NH_STATUS_BETA) - " [beta]" +#define STATUS_ARG " [beta]" #else - " [work-in-progress]" +#define STATUS_ARG " [work-in-progress]" #endif #else - "" +#define STATUS_ARG "" #endif /* NH_DEVEL_STATUS == NH_STATUS_RELEASED */ - ); + Sprintf(optbuf, "%sNetHack version %d.%d.%d%s\n", + opt_indent, VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, STATUS_ARG); opttext[idxopttext] = strdup(optbuf); if (idxopttext < (MAXOPT - 1)) idxopttext++; - Sprintf(optbuf, - "Options compiled into this edition:"); + Sprintf(optbuf, "Options compiled into this edition:"); opttext[idxopttext] = strdup(optbuf); if (idxopttext < (MAXOPT - 1)) idxopttext++; diff --git a/src/nhlsel.c b/src/nhlsel.c index 9fe66047c..50e328e8a 100644 --- a/src/nhlsel.c +++ b/src/nhlsel.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 nhlua.c $NHDT-Date: 1524287226 2018/04/21 05:07:06 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.98 $ */ +/* NetHack 3.6 nhlua.c $NHDT-Date: 1574646948 2019/11/25 01:55:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $ */ /* Copyright (c) 2018 by Pasi Kallinen */ /* NetHack may be freely redistributed. See license for details. */ @@ -41,7 +41,6 @@ static int FDECL(l_selection_iterate, (lua_State *)); static int FDECL(l_selection_add, (lua_State *)); static int FDECL(l_selection_sub, (lua_State *)); static int FDECL(l_selection_ipairs, (lua_State *)); -/* this prototype was missing but function body was below */ static struct selectionvar *FDECL(l_selection_to, (lua_State *, int)); #endif @@ -69,16 +68,19 @@ lua_State *L; return 0; } +#if 0 static struct selectionvar * l_selection_to(L, index) lua_State *L; int index; { struct selectionvar *sel = (struct selectionvar *)lua_touserdata(L, index); + if (!sel) nhl_error(L, "Selection error"); return sel; } +#endif static struct selectionvar * l_selection_push(L) @@ -137,11 +139,10 @@ l_selection_setpoint(L) lua_State *L; { struct selectionvar *sel = (struct selectionvar *) 0; - /* REVIEW: initializer added */ schar x = -1, y = -1; int val = 1; int argc = lua_gettop(L); - long coord; + long coord = 0L; if (argc == 0) { (void) l_selection_new(L); @@ -162,6 +163,7 @@ lua_State *L; if (!sel || !sel->map) { nhl_error(L, "Selection setpoint error"); + /*NOTREACHED*/ return 0; } @@ -169,7 +171,8 @@ lua_State *L; coord = SP_COORD_PACK_RANDOM(0); else coord = SP_COORD_PACK(x,y); - get_location_coord(&x, &y, ANY_LOC, g.coder ? g.coder->croom : NULL, coord); + get_location_coord(&x, &y, ANY_LOC, + g.coder ? g.coder->croom : NULL, coord); selection_setpoint(x, y, sel, val); lua_settop(L, 1); return 1; @@ -451,7 +454,6 @@ lua_State *L; { int argc = lua_gettop(L); struct selectionvar *sel = (struct selectionvar *) 0; - /* REVIEW: initializer added */ schar x1, y1, x2, y2; int roughness = 7; @@ -473,10 +475,12 @@ lua_State *L; sel = l_selection_check(L, 1); } - get_location_coord(&x1, &y1, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x1,y1)); - get_location_coord(&x2, &y2, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x2,y2)); + get_location_coord(&x1, &y1, ANY_LOC, + g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x1, y1)); + get_location_coord(&x2, &y2, ANY_LOC, + g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x2, y2)); - selection_do_randline(x1,y1, x2,y2, roughness, 12, sel); + selection_do_randline(x1, y1, x2, y2, roughness, 12, sel); lua_settop(L, 1); return 1; } @@ -533,7 +537,6 @@ lua_State *L; { int argc = lua_gettop(L); struct selectionvar *sel = (struct selectionvar *) 0; - /* REVIEW: initializer added */ schar x, y; if (argc == 3) { @@ -548,11 +551,13 @@ lua_State *L; sel = l_selection_check(L, 1); } else { nhl_error(L, "wrong parameters"); + /*NOTREACHED*/ } - get_location_coord(&x, &y, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x,y)); + get_location_coord(&x, &y, ANY_LOC, + g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x, y)); - if (isok(x,y)) { + if (isok(x, y)) { set_floodfillchk_match_under(levl[x][y].typ); selection_floodfill(sel, x, y, FALSE); } @@ -571,9 +576,8 @@ lua_State *L; { int argc = lua_gettop(L); struct selectionvar *sel = (struct selectionvar *) 0; - /* REVIEW: initializer added */ - schar x, y; - int r, filled = 0; + schar x = 0, y = 0; + int r = 0, filled = 0; if (argc == 3) { x = (schar) luaL_checkinteger(L, 1); @@ -599,22 +603,13 @@ lua_State *L; filled = (int) luaL_optinteger(L, 5, 0); /* TODO: boolean */ } else { nhl_error(L, "wrong parameters"); - /* - * FIXME: OSX compiler is issuing a complaint - * about r being passed to selection_do_ellipse() - * below without ever having been initialized - * to something when this else clause is encountered. - * I could have added an initializer to r at the - * top, but I didn't know what it should be initialized - * to in order for selection_do_ellipse() to not - * misbehave. The parameters passed in previous versions - * were related to xaxis and yaxis. - */ + /*NOTREACHED*/ } - get_location_coord(&x, &y, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x,y)); + get_location_coord(&x, &y, ANY_LOC, + g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x, y)); - selection_do_ellipse(sel, x,y, r,r, !filled); + selection_do_ellipse(sel, x, y, r, r, !filled); lua_settop(L, 1); return 1; @@ -630,9 +625,8 @@ lua_State *L; { int argc = lua_gettop(L); struct selectionvar *sel = (struct selectionvar *) 0; - /* REVIEW: initializer added */ - schar x, y; - int r1, r2, filled = 0; + schar x = 0, y = 0; + int r1 = 0, r2 = 0, filled = 0; if (argc == 4) { x = (schar) luaL_checkinteger(L, 1); @@ -661,22 +655,13 @@ lua_State *L; filled = (int) luaL_optinteger(L, 6, 0); /* TODO: boolean */ } else { nhl_error(L, "wrong parameters"); - /* - * FIXME: OSX compiler is issuing a complaint - * about r1 and r2 being passed to selection_do_ellipse() - * below without ever having been initialized - * to something when this else clause is encountered. - * I could have added an initializer to r1,r2 at the - * top, but I didn't know what they should be initialized - * to in order for selection_do_ellipse() to not - * misbehave. The parameters passed in previous versions - * were related to xaxis and yaxis. - */ + /*NOTREACHED*/ } - get_location_coord(&x, &y, ANY_LOC, g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x,y)); + get_location_coord(&x, &y, ANY_LOC, + g.coder ? g.coder->croom : NULL, SP_COORD_PACK(x, y)); - selection_do_ellipse(sel, x,y, r1,r2, !filled); + selection_do_ellipse(sel, x, y, r1, r2, !filled); lua_settop(L, 1); return 1; @@ -684,43 +669,43 @@ lua_State *L; static const struct luaL_Reg l_selection_methods[] = { - { "new", l_selection_new }, - { "clone", l_selection_clone }, - { "get", l_selection_getpoint }, - { "set", l_selection_setpoint }, - { "negate", l_selection_not }, - { "percentage", l_selection_filter_percent }, - { "rndcoord", l_selection_rndcoord }, - { "line", l_selection_line }, - { "randline", l_selection_randline }, - { "rect", l_selection_rect }, - { "fillrect", l_selection_fillrect }, - { "area", l_selection_fillrect }, - { "grow", l_selection_grow }, - { "filter_mapchar", l_selection_filter_mapchar }, - { "floodfill", l_selection_flood }, - { "circle", l_selection_circle }, - { "ellipse", l_selection_ellipse }, - /* TODO: - { "gradient", l_selection_gradient }, - { "iterate", l_selection_iterate }, - */ - { NULL, NULL } + { "new", l_selection_new }, + { "clone", l_selection_clone }, + { "get", l_selection_getpoint }, + { "set", l_selection_setpoint }, + { "negate", l_selection_not }, + { "percentage", l_selection_filter_percent }, + { "rndcoord", l_selection_rndcoord }, + { "line", l_selection_line }, + { "randline", l_selection_randline }, + { "rect", l_selection_rect }, + { "fillrect", l_selection_fillrect }, + { "area", l_selection_fillrect }, + { "grow", l_selection_grow }, + { "filter_mapchar", l_selection_filter_mapchar }, + { "floodfill", l_selection_flood }, + { "circle", l_selection_circle }, + { "ellipse", l_selection_ellipse }, + /* TODO: + { "gradient", l_selection_gradient }, + { "iterate", l_selection_iterate }, + */ + { NULL, NULL } }; static const luaL_Reg l_selection_meta[] = { - { "__gc", l_selection_gc }, - { "__unm", l_selection_not }, - { "__band", l_selection_and }, - { "__bor", l_selection_or }, - { "__bxor", l_selection_xor }, - { "__bnot", l_selection_not }, - /* TODO: http://lua-users.org/wiki/MetatableEvents - { "__add", l_selection_add }, - { "__sub", l_selection_sub }, - { "__ipairs", l_selection_ipairs }, - */ - { NULL, NULL } + { "__gc", l_selection_gc }, + { "__unm", l_selection_not }, + { "__band", l_selection_and }, + { "__bor", l_selection_or }, + { "__bxor", l_selection_xor }, + { "__bnot", l_selection_not }, + /* TODO: http://lua-users.org/wiki/MetatableEvents + { "__add", l_selection_add }, + { "__sub", l_selection_sub }, + { "__ipairs", l_selection_ipairs }, + */ + { NULL, NULL } }; int diff --git a/src/nhlua.c b/src/nhlua.c index 494b1d265..73431fc7f 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 nhlua.c $NHDT-Date: 1524287226 2018/04/21 05:07:06 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.98 $ */ +/* NetHack 3.6 nhlua.c $NHDT-Date: 1574646949 2019/11/25 01:55:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.8 $ */ /* Copyright (c) 2018 by Pasi Kallinen */ /* NetHack may be freely redistributed. See license for details. */ @@ -37,13 +37,16 @@ nhl_error(L, msg) lua_State *L; const char *msg; { + extern int FDECL(lua_error, (lua_State *)) NORETURN; lua_Debug ar; char buf[BUFSZ]; + lua_getstack(L, 1, &ar); lua_getinfo(L, "lS", &ar); Sprintf(buf, "%s (line %i%s)", msg, ar.currentline, ar.source); lua_pushstring(L, buf); - lua_error(L); + (void) lua_error(L); + /*NOTREACHED*/ } /* Check that parameters are nothing but single table, diff --git a/src/sp_lev.c b/src/sp_lev.c index cb35286ed..c759dd318 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 sp_lev.c $NHDT-Date: 1567805254 2019/09/06 21:27:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.117 $ */ +/* NetHack 3.6 sp_lev.c $NHDT-Date: 1574646949 2019/11/25 01:55:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.141 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -3336,8 +3336,10 @@ const char *name; int defval; { char *trapstr = get_table_str_opt(L, name, emptystr); + if (trapstr && *trapstr) { int i; + for (i = 0; trap_types[i].name; i++) if (!strcmpi(trapstr, trap_types[i].name)) { Free(trapstr); @@ -3350,7 +3352,7 @@ int defval; int get_traptype_byname(trapname) -char *trapname; +const char *trapname; { int i; diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl index 64dccf570..30676b7e7 100644 --- a/sys/unix/Makefile.utl +++ b/sys/unix/Makefile.utl @@ -1,5 +1,5 @@ # Makefile for NetHack's utility programs. -# NetHack 3.6 Makefile.utl $NHDT-Date: 1539968067 2018/10/19 16:54:27 $ $NHDT-Branch: keni-makedefsm $:$NHDT-Revision: 1.38 $ +# NetHack 3.6 Makefile.utl $NHDT-Date: 1574646950 2019/11/25 01:55:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.44 $ # Copyright (c) 2018 by Robert Patrick Rankin # NetHack may be freely redistributed. See license for details. @@ -185,7 +185,7 @@ CONFIG_H = ../src/config.h-t HACK_H = ../src/hack.h-t # utility .c files -MAKESRC = makedefs.c +MAKESRC = makedefs.c ../src/mdlib.c RECOVSRC = recover.c DLBSRC = dlb_main.c UTILSRCS = $(MAKESRC) panic.c $(DGNCOMPSRC) $(RECOVSRC) $(DLBSRC) @@ -231,7 +231,7 @@ YACCDIST = makedefs: $(MAKEOBJS) mdgrep.h $(CC) $(LFLAGS) -o makedefs $(MAKEOBJS) -makedefs.o: makedefs.c $(CONFIG_H) ../include/permonst.h \ +makedefs.o: makedefs.c ../src/mdlib.c $(CONFIG_H) ../include/permonst.h \ ../include/objclass.h ../include/monsym.h \ ../include/artilist.h ../include/dungeon.h ../include/obj.h \ ../include/monst.h ../include/you.h ../include/flag.h \ From 9adeff5e27f0a56af84429c39b5b739fc3ffd9b2 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 24 Nov 2019 18:29:14 -0800 Subject: [PATCH 311/529] 3.7: fix #9397 - pronouns when hallucinating Developed for 3.6 but deferred to 3.7. Most of the testing was with the earlier incarnation. Report was that pronouns were accurate for the underlying monsters when hallucination was describing something random, and also that the gender prefix flag from bogusmon.txt wasn't being used. The latter is still the case, but pronouns are now chosen at random while under the influence of hallucination. One of the choices is plural and an attempt is made to make the monster name and verb fit that usage. |The homunculus picks up a wand of speed monster. |The large cats zap themselves with a wand of speed monster! |The blue dragon is suddenly moving faster. There is no attempt to match gender for the singular cases; you might get |The succubus zaps himself [...] or |The incubus zaps herself [...] --- include/extern.h | 6 ++++-- include/you.h | 21 ++++++++++++++------- src/apply.c | 12 +++++++----- src/do_name.c | 40 ++++++++++++++++++++++++++++++++++++++-- src/mondata.c | 17 ++++++++++++----- src/muse.c | 17 ++++++++++++----- src/objnam.c | 38 ++++++++++++++++++++++++++++++++++++-- src/role.c | 6 ++++-- src/steed.c | 8 +++++--- 9 files changed, 132 insertions(+), 33 deletions(-) diff --git a/include/extern.h b/include/extern.h index a191b9acf..48c5db522 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1574646942 2019/11/25 01:55:42 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.759 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1574648937 2019/11/25 02:28:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.760 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -452,6 +452,8 @@ E char *FDECL(Amonnam, (struct monst *)); E char *FDECL(a_monnam, (struct monst *)); E char *FDECL(distant_monnam, (struct monst *, int, char *)); E char *FDECL(mon_nam_too, (struct monst *, struct monst *)); +E char *FDECL(monverbself, (struct monst *, char *, + const char *, const char *)); E char *FDECL(minimal_monnam, (struct monst *, BOOLEAN_P)); E char *FDECL(rndmonnam, (char *)); E const char *FDECL(hcolor, (const char *)); @@ -1511,7 +1513,7 @@ E int FDECL(monsndx, (struct permonst *)); E int FDECL(name_to_mon, (const char *)); E int FDECL(name_to_monclass, (const char *, int *)); E int FDECL(gender, (struct monst *)); -E int FDECL(pronoun_gender, (struct monst *, BOOLEAN_P)); +E int FDECL(pronoun_gender, (struct monst *, unsigned)); E boolean FDECL(levl_follower, (struct monst *)); E int FDECL(little_to_big, (int)); E int FDECL(big_to_little, (int)); diff --git a/include/you.h b/include/you.h index 657b9c3e7..611fcf3b1 100644 --- a/include/you.h +++ b/include/you.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 you.h $NHDT-Date: 1547514642 2019/01/15 01:10:42 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.35 $ */ +/* NetHack 3.6 you.h $NHDT-Date: 1574648937 2019/11/25 02:28:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.41 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2016. */ /* NetHack may be freely redistributed. See license for details. */ @@ -237,14 +237,21 @@ extern const struct Gender genders[]; /* table of available genders */ #define uhe() (genders[flags.female ? 1 : 0].he) #define uhim() (genders[flags.female ? 1 : 0].him) #define uhis() (genders[flags.female ? 1 : 0].his) +/* pronoun_gender() flag masks */ +#define PRONOUN_NORMAL 0 /* none of the below */ +#define PRONOUN_NO_IT 1 +#define PRONOUN_HALLU 2 /* corresponding pronouns for monsters; yields "it" when mtmp can't be seen */ -#define mhe(mtmp) (genders[pronoun_gender(mtmp, FALSE)].he) -#define mhim(mtmp) (genders[pronoun_gender(mtmp, FALSE)].him) -#define mhis(mtmp) (genders[pronoun_gender(mtmp, FALSE)].his) +#define mhe(mtmp) (genders[pronoun_gender(mtmp, PRONOUN_HALLU)].he) +#define mhim(mtmp) (genders[pronoun_gender(mtmp, PRONOUN_HALLU)].him) +#define mhis(mtmp) (genders[pronoun_gender(mtmp, PRONOUN_HALLU)].his) /* override "it" if reason is lack of visibility rather than neuter species */ -#define noit_mhe(mtmp) (genders[pronoun_gender(mtmp, TRUE)].he) -#define noit_mhim(mtmp) (genders[pronoun_gender(mtmp, TRUE)].him) -#define noit_mhis(mtmp) (genders[pronoun_gender(mtmp, TRUE)].his) +#define noit_mhe(mtmp) \ + (genders[pronoun_gender(mtmp, (PRONOUN_NO_IT | PRONOUN_HALLU))].he) +#define noit_mhim(mtmp) \ + (genders[pronoun_gender(mtmp, (PRONOUN_NO_IT | PRONOUN_HALLU))].him) +#define noit_mhis(mtmp) \ + (genders[pronoun_gender(mtmp, (PRONOUN_NO_IT | PRONOUN_HALLU))].his) /*** Unified structure specifying alignment information ***/ struct Align { diff --git a/src/apply.c b/src/apply.c index ecaccb741..6451187e9 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 apply.c $NHDT-Date: 1573778560 2019/11/15 00:42:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.284 $ */ +/* NetHack 3.6 apply.c $NHDT-Date: 1574648938 2019/11/25 02:28:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.301 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -212,7 +212,7 @@ int rx, ry, *resp; if (mtmp) { mptr = mtmp->data = &mons[mtmp->mnum]; /* TRUE: override visibility check--it's not on the map */ - gndr = pronoun_gender(mtmp, TRUE); + gndr = pronoun_gender(mtmp, PRONOUN_NO_IT); } else { mptr = &mons[corpse->corpsenm]; if (is_female(mptr)) @@ -934,8 +934,9 @@ struct obj *obj; /* infravision doesn't produce an image in the mirror */ } else if ((how_seen & SEENMON) == MONSEEN_INFRAVIS) { if (vis) /* (redundant) */ - pline("%s is too far away to see %sself in the dark.", - Monnam(mtmp), mhim(mtmp)); + pline("%s in the dark.", + monverbself(mtmp, Monnam(mtmp), "are", + "too far away to see")); /* some monsters do special things */ } else if (mlet == S_VAMPIRE || mlet == S_GHOST || is_vampshifter(mtmp)) { if (vis) @@ -965,7 +966,8 @@ struct obj *obj; if (vis) { char buf[BUFSZ]; /* "She" or "He" */ - pline("%s admires %sself in your %s.", Monnam(mtmp), mhim(mtmp), + pline("%s in your %s.", /* " admires self in your mirror " */ + monverbself(mtmp, Monnam(mtmp), "admire", (char *) 0), mirror); pline("%s takes it!", upstart(strcpy(buf, mhe(mtmp)))); } else diff --git a/src/do_name.c b/src/do_name.c index 02ea4230b..cf812daa3 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_name.c $NHDT-Date: 1574419578 2019/11/22 10:46:18 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.152 $ */ +/* NetHack 3.6 do_name.c $NHDT-Date: 1574648939 2019/11/25 02:28:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.167 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1959,7 +1959,7 @@ struct monst *mon, *other_mon; outbuf = mon_nam(mon); } else { outbuf = nextmbuf(); - switch (pronoun_gender(mon, FALSE)) { + switch (pronoun_gender(mon, PRONOUN_HALLU)) { case 0: Strcpy(outbuf, "himself"); break; @@ -1967,13 +1967,49 @@ struct monst *mon, *other_mon; Strcpy(outbuf, "herself"); break; default: + case 2: Strcpy(outbuf, "itself"); break; + case 3: /* could happen when hallucinating */ + Strcpy(outbuf, "themselves"); + break; } } return outbuf; } +/* construct " {him|her|it}self" which might + be distorted by Hallu; if that's plural, adjust monnamtext and verb */ +char * +monverbself(mon, monnamtext, verb, othertext) +struct monst *mon; +char *monnamtext; /* modifiable 'mbuf' with adequare room at end */ +const char *verb, *othertext; +{ + char *verbs, selfbuf[40]; /* sizeof "themselves" suffices */ + + /* "himself"/"herself"/"itself", maybe "themselves" if hallucinating */ + Strcpy(selfbuf, mon_nam_too(mon, mon)); + /* verb starts plural; this will yield singular except for "themselves" */ + verbs = vtense(selfbuf, verb); + if (!strcmp(verb, verbs)) { /* a match indicates that it stayed plural */ + monnamtext = makeplural(monnamtext); + /* for "it", makeplural() produces "them" but we want "they" */ + if (!strcmpi(monnamtext, genders[3].he)) { + boolean capitaliz = (monnamtext[0] == highc(monnamtext[0])); + + Strcpy(monnamtext, genders[3].him); + if (capitaliz) + monnamtext[0] = highc(monnamtext[0]); + } + } + Strcat(strcat(monnamtext, " "), verbs); + if (othertext && *othertext) + Strcat(strcat(monnamtext, " "), othertext); + Strcat(strcat(monnamtext, " "), selfbuf); + return monnamtext; +} + /* for debugging messages, where data might be suspect and we aren't taking what the hero does or doesn't know into consideration */ char * diff --git a/src/mondata.c b/src/mondata.c index f510afcfd..ba5b27d0a 100644 --- a/src/mondata.c +++ b/src/mondata.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mondata.c $NHDT-Date: 1550525093 2019/02/18 21:24:53 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.72 $ */ +/* NetHack 3.6 mondata.c $NHDT-Date: 1574648940 2019/11/25 02:29:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.76 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -910,13 +910,20 @@ register struct monst *mtmp; return mtmp->female; } -/* Like gender(), but lower animals and such are still "it". - This is the one we want to use when printing messages. */ +/* Like gender(), but unseen humanoids are "it" rather than "he" or "she" + and lower animals and such are "it" even when seen; hallucination might + yield "they". This is the one we want to use when printing messages. */ int -pronoun_gender(mtmp, override_vis) +pronoun_gender(mtmp, pg_flags) register struct monst *mtmp; -boolean override_vis; /* if True then 'no it' unless neuter */ +unsigned pg_flags; /* flags&1: 'no it' unless neuter, + * flags&2: random if hallucinating */ { + boolean override_vis = (pg_flags & PRONOUN_NO_IT) ? TRUE : FALSE, + hallu_rand = (pg_flags & PRONOUN_HALLU) ? TRUE : FALSE; + + if (hallu_rand && Hallucination) + return rn2(4); /* 0..3 */ if (!override_vis && !canspotmon(mtmp)) return 2; if (is_neuter(mtmp->data)) diff --git a/src/muse.c b/src/muse.c index 770e6b60d..25e29ed91 100644 --- a/src/muse.c +++ b/src/muse.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 muse.c $NHDT-Date: 1560161807 2019/06/10 10:16:47 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.96 $ */ +/* NetHack 3.6 muse.c $NHDT-Date: 1574648940 2019/11/25 02:29:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.115 $ */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ @@ -161,7 +161,8 @@ boolean self; ? "nearby" : "distant"); otmp->known = 0; } else if (self) { - pline("%s zaps %sself with %s!", Monnam(mtmp), mhim(mtmp), + pline("%s with %s!", + monverbself(mtmp, Monnam(mtmp), "zap", (char *) 0), doname(otmp)); } else { pline("%s zaps %s!", Monnam(mtmp), an(xname(otmp))); @@ -186,9 +187,15 @@ boolean self; ? "nearby" : "in the distance"); otmp->known = 0; /* hero doesn't know how many charges are left */ } else { + char *objnamp, objbuf[BUFSZ]; + otmp->dknown = 1; - pline("%s plays a %s directed at %s!", Monnam(mtmp), xname(otmp), - self ? mon_nam_too(mtmp, mtmp) : (char *) "you"); + objnamp = xname(otmp); + if (strlen(objnamp) >= QBUFSZ) + objnamp = simpleonames(otmp); + Sprintf(objbuf, "a %s directed at", objnamp); + /* " plays a directed at himself!" */ + pline("%s!", monverbself(mtmp, Monnam(mtmp), "play", objbuf)); makeknown(otmp->otyp); /* (wands handle this slightly differently) */ if (!self) stop_occupation(); @@ -2461,7 +2468,7 @@ boolean by_you; /* true: if mon kills itself, hero gets credit/blame */ } else if (otyp == STRANGE_OBJECT) { /* monster is using fire breath on self */ if (vis) - pline("%s breathes fire on %sself.", Monnam(mon), mhim(mon)); + pline("%s.", monverbself(mon, Monnam(mon), "breath", "fire on")); if (!rn2(3)) mon->mspec_used = rn1(10, 5); /* -21 => monster's fire breath; 1 => # of damage dice */ diff --git a/src/objnam.c b/src/objnam.c index 7aba0526c..64f8b473f 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 objnam.c $NHDT-Date: 1573290418 2019/11/09 09:06:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.248 $ */ +/* NetHack 3.6 objnam.c $NHDT-Date: 1574648942 2019/11/25 02:29:02 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.271 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2310,7 +2310,7 @@ const char *oldstr; register char *spot; char lo_c, *str = nextobuf(); const char *excess = (char *) 0; - int len; + int len, i; if (oldstr) while (*oldstr == ' ') @@ -2320,6 +2320,26 @@ const char *oldstr; Strcpy(str, "s"); return str; } + /* makeplural() is sometimes used on monsters rather than objects + and sometimes pronouns are used for monsters, so check those; + unfortunately, "her" (which matches genders[1].him and [1].his) + and "it" (which matches genders[2].he and [2].him) are ambiguous; + we'll live with that; caller can fix things up if necessary */ + *str = '\0'; + for (i = 0; i <= 2; ++i) { + if (!strcmpi(genders[i].he, oldstr)) + Strcpy(str, genders[3].he); /* "they" */ + else if (!strcmpi(genders[i].him, oldstr)) + Strcpy(str, genders[3].him); /* "them" */ + else if (!strcmpi(genders[i].his, oldstr)) + Strcpy(str, genders[3].his); /* "their" */ + if (*str) { + if (oldstr[0] == highc(oldstr[0])) + str[0] = highc(str[0]); + return str; + } + } + Strcpy(str, oldstr); /* @@ -2498,6 +2518,20 @@ const char *oldstr; str[0] = '\0'; return str; } + /* makeplural() of pronouns isn't reversible but at least we can + force a singular value */ + *str = '\0'; + if (!strcmpi(genders[3].he, oldstr)) /* "they" */ + Strcpy(str, genders[2].he); /* "it" */ + else if (!strcmpi(genders[3].him, oldstr)) /* "them" */ + Strcpy(str, genders[2].him); /* also "it" */ + else if (!strcmpi(genders[3].his, oldstr)) /* "their" */ + Strcpy(str, genders[2].his); /* "its" */ + if (*str) { + if (oldstr[0] == highc(oldstr[0])) + str[0] = highc(str[0]); + return str; + } bp = strcpy(str, oldstr); diff --git a/src/role.c b/src/role.c index 349c736b8..a62d042a7 100644 --- a/src/role.c +++ b/src/role.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 role.c $NHDT-Date: 1547086250 2019/01/10 02:10:50 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.56 $ */ +/* NetHack 3.6 role.c $NHDT-Date: 1574648943 2019/11/25 02:29:03 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.65 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -701,7 +701,9 @@ const struct Race races[] = { const struct Gender genders[] = { { "male", "he", "him", "his", "Mal", ROLE_MALE }, { "female", "she", "her", "her", "Fem", ROLE_FEMALE }, - { "neuter", "it", "it", "its", "Ntr", ROLE_NEUTER } + { "neuter", "it", "it", "its", "Ntr", ROLE_NEUTER }, + /* used by pronoun_gender() when hallucinating */ + { "group", "they", "them", "their", "Grp", 0 }, }; /* Table of all alignments */ diff --git a/src/steed.c b/src/steed.c index cc0c165cd..c145b09a1 100644 --- a/src/steed.c +++ b/src/steed.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 steed.c $NHDT-Date: 1573940541 2019/11/16 21:42:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.67 $ */ +/* NetHack 3.6 steed.c $NHDT-Date: 1574648944 2019/11/25 02:29:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.74 $ */ /* Copyright (c) Kevin Hugo, 1998-1999. */ /* NetHack may be freely redistributed. See license for details. */ @@ -377,7 +377,7 @@ exercise_steed() void kick_steed() { - char He[4]; + char He[BUFSZ]; /* monverbself() appends to the "He"/"She"/"It" value */ if (!u.usteed) return; @@ -400,7 +400,9 @@ kick_steed() if (u.usteed->msleeping || !u.usteed->mcanmove) pline("%s stirs.", He); else - pline("%s rouses %sself!", He, mhim(u.usteed)); + /* if hallucinating, might yield "He rouses herself" or + "She rouses himself" */ + pline("%s!", monverbself(u.usteed, He, "rouse", (char *) 0)); } else pline("%s does not respond.", He); return; From abf7a7832d4ed49206bc18cbcdc12be76551f4d6 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Sun, 24 Nov 2019 14:28:34 -0500 Subject: [PATCH 312/529] This is cron-daily v1-Nov-24-2019. files updated: Files --- Files | 56 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/Files b/Files index b06422f27..3ed296ec1 100644 --- a/Files +++ b/Files @@ -113,26 +113,26 @@ mactty.h macwin.h mttypriv.h src: (files for all versions) -allmain.c alloc.c apply.c artifact.c attrib.c ball.c -bones.c botl.c cmd.c dbridge.c decl.c detect.c -dig.c display.c dlb.c do.c do_name.c do_wear.c -dog.c dogmove.c dokick.c dothrow.c drawing.c dungeon.c -eat.c end.c engrave.c exper.c explode.c extralev.c -files.c fountain.c hack.c hacklib.c invent.c isaac64.c -light.c lock.c mail.c makemon.c mapglyph.c mcastu.c -mhitm.c mhitu.c minion.c mklev.c mkmap.c mkmaze.c -mkobj.c mkroom.c mon.c mondata.c monmove.c monst.c -mplayer.c mthrowu.c muse.c music.c nhlsel.c nhlua.c -o_init.c objects.c objnam.c options.c pager.c pickup.c -pline.c polyself.c potion.c pray.c priest.c quest.c -questpgr.c read.c rect.c region.c restore.c rip.c -rnd.c role.c rumors.c save.c sfascii.c sfbase.c -sfdata.c sflendian.c sfstruct.c shk.c shknam.c sit.c -sounds.c sp_lev.c spell.c steal.c steed.c sys.c -teleport.c timeout.c topten.c track.c trap.c u_init.c -uhitm.c vault.c version.c vision.c weapon.c were.c -wield.c windows.c wizard.c worm.c worn.c write.c -zap.c +allmain.c alloc.c apply.c artifact.c attrib.c ball.c +bones.c botl.c cmd.c dbridge.c decl.c detect.c +dig.c display.c dlb.c do.c do_name.c do_wear.c +dog.c dogmove.c dokick.c dothrow.c drawing.c dungeon.c +eat.c end.c engrave.c exper.c explode.c extralev.c +files.c fountain.c hack.c hacklib.c invent.c isaac64.c +light.c lock.c mail.c makemon.c mapglyph.c mcastu.c +mdlib.c mhitm.c mhitu.c minion.c mklev.c mkmap.c +mkmaze.c mkobj.c mkroom.c mon.c mondata.c monmove.c +monst.c mplayer.c mthrowu.c muse.c music.c nhlsel.c +nhlua.c o_init.c objects.c objnam.c options.c pager.c +pickup.c pline.c polyself.c potion.c pray.c priest.c +quest.c questpgr.c read.c rect.c region.c restore.c +rip.c rnd.c role.c rumors.c save.c sfascii.c +sfbase.c sfdata.c sflendian.c sfstruct.c shk.c shknam.c +sit.c sounds.c sp_lev.c spell.c steal.c steed.c +sys.c teleport.c timeout.c topten.c track.c trap.c +u_init.c uhitm.c vault.c version.c vision.c weapon.c +were.c wield.c windows.c wizard.c worm.c worn.c +write.c zap.c sys/amiga: (files for Amiga versions - untested for 3.6.2) @@ -165,13 +165,15 @@ mttymain.c sys/msdos: (files for MSDOS version - untested for 3.6.2) -Install.dos Makefile.BC Makefile.GCC Makefile.MSC -Makefile1.cross Makefile2.cross SCHEMA35.MSC moveinit.pat -msdos.c msdoshlp.txt ovlinit.c pckeys.c -pctiles.c pctiles.h pcvideo.h portio.h -schema1.BC schema2.BC schema3.MSC setup.bat -tile2bin.c vesa.h video.c vidtxt.c -vidvesa.c vidvga.c +Install.dos Makefile.BC Makefile.GCC +Makefile.MSC Makefile1.cross Makefile2.cross +SCHEMA35.MSC moveinit.pat msdos-cross-compile.sh +msdos.c msdoshlp.txt ovlinit.c +pckeys.c pctiles.c pctiles.h +pcvideo.h portio.h schema1.BC +schema2.BC schema3.MSC setup.bat +tile2bin.c vesa.h video.c +vidtxt.c vidvesa.c vidvga.c (files for running MSDOS binary under Windows) nhico.uu nhpif.uu From a9425159eb7892d8966669ed62e89c0e670c9eac Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 24 Nov 2019 23:42:27 -0500 Subject: [PATCH 313/529] fix a transcription error --- src/mdlib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mdlib.c b/src/mdlib.c index bccacd794..ff776ad93 100644 --- a/src/mdlib.c +++ b/src/mdlib.c @@ -728,11 +728,11 @@ runtime_info_init() VERSION_STRING = strdup(version_string(tmpbuf, ".")); VERSION_ID = strdup(version_id_string(tmpbuf, BUILD_DATE)); COPYRIGHT_BANNER_C = strdup(bannerc_string(tmpbuf, BUILD_DATE)); -#ifdef HOST_NETHACK_GIT_SHA - NETHACK_GIT_SHA = strdup(HOST_NETHACK_GIT_SHA); +#ifdef NETHACK_HOST_GIT_SHA + NETHACK_GIT_SHA = strdup(NETHACK_HOST_GIT_SHA); #endif -#ifdef HOST_NETHACK_GIT_BRANCH - NETHACK_GIT_BRANCH = strdup(HOST_NETHACK_GIT_BRANCH); +#ifdef NETHACK_HOST_GIT_BRANCH + NETHACK_GIT_BRANCH = strdup(NETHACK_HOST_GIT_BRANCH); #endif #endif /* CROSSCOMPILE_TARGET && !MAKEDEFS_C */ } From f10e4218c657d78723acc69dca75454e1d4641d1 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 25 Nov 2019 00:17:16 -0500 Subject: [PATCH 314/529] msdos now has its own sysconf as the sys/winnt/sysconf.template had incompatible entries --- sys/msdos/Makefile2.cross | 4 +- sys/msdos/sysconf | 103 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 3 deletions(-) create mode 100644 sys/msdos/sysconf diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 1904b7f95..dcb148a6e 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -623,10 +623,8 @@ endif if [ -f $(DAT)/symbols ]; then cp $(DAT)/symbols $(GAMEDIR)/SYMBOLS; fi; if [ -f $(SSHR)/NetHack.cnf ]; then cp $(SSHR)/NetHack.cnf $(GAMEDIR)/NETHACK.CNF; fi; -touch $(GAMEDIR)/RECORD - if [ -f ../sys/winnt/sysconf.template ]; then cp ../sys/winnt/sysconf.template $(GAMEDIR)/SYSCONF; fi; + if [ -f ../sys/msdos/sysconf ]; then cp ../sys/msdos/sysconf $(GAMEDIR)/SYSCONF; fi; if [ -f $(DOC)/nethack.txt ]; then cp $(DOC)/nethack.txt $(GAMEDIR)/NETHACK.TXT; fi; -# if [ -f $(PLANAR_TIB) ]; then cp $(PLANAR_TIB) $(GAMEDIR)/$(PLANAR_TIB^^); fi; -# if [ -f $(OVERVIEW_TIB ]; then cp $(OVERVIEW_TIB) $(GAMEDIR)/$(OVERVIEW_TIB^^); fi; @echo install done > $@ #========================================== diff --git a/sys/msdos/sysconf b/sys/msdos/sysconf new file mode 100644 index 000000000..505d589ba --- /dev/null +++ b/sys/msdos/sysconf @@ -0,0 +1,103 @@ +# +# NetHack 3.7 sysconf $NHDT-Date: 1524689357 2018/04/25 20:49:17 $ $NHDT-Branch: NetHack-3.7.0 $:$NHDT-Revision: 1.22 $ +# Copyright (c) 2015 by Michael Allison +# NetHack may be freely redistributed. See license for details. +# +# Sample sysconf file. +# The sysconf file is only used if NetHack is compiled with SYSCF defined. +# This file uses the same syntax as nethack.cnf. + +# Which users can use WIZARD (debugging) mode (the -D flag). +# A value of * allows anyone to enter debugging mode. +WIZARDS=* + +# Users allowed to use the ! (shell escape) command or to suspend the game. +# Uses the same syntax as the WIZARDS option above. +#SHELLERS= + +# Show debugging information originating from these source files. +# Use '*' for all, or list source files separated by spaces. +# Only available if game has been compiled with DEBUG. +#DEBUGFILES=* + +# Save end of game dump log to this file. +# Only available if NetHack was compiled with DUMPLOG +# Allows following placeholders: +# %% literal '%' +# %v version (eg. "3.7.0-0") +# %u game UID +# %t game start time, UNIX timestamp format +# %T current time, UNIX timestamp format +# %d game start time, YYYYMMDDhhmmss format +# %D current time, YYYYMMDDhhmmss format +# %n player name +# %N first character of player name +#DUMPLOGFILE=nethack-%n-%d.log + +# Number of bones file pools. +# The pool you belong to is determined at game start. You will +# load and save bones only from that pool. Generally useful +# for public servers only. +# Changing this might make existing bones inaccessible. +# Disabled by setting to 0, or commenting out. +#BONES_POOLS=10 + +# Limit the number of simultaneous games (see also nethack.sh). +#MAXPLAYERS=10 + +# If not null, added to string "To get local support, " in the support +# information help. +#SUPPORT=call Izchak at extension 42. + +# Uncomment the next line to disable the SEDUCE option. +#SEDUCE=0 + +# Uncomment the next line to enable some accessibility features such +# as S_hero_override and S_pet_override symbols for screen readers +# in the user config file. +#ACCESSIBILITY=1 + +# Record (high score) file options. +# CAUTION: changing these after people have started playing games can +# lead to lost high scores! +# Maximum entries for one person. +#PERSMAX=10 +# Maximum entries in the record file. +#ENTRYMAX=100 +# Minimum points to get an entry. +#POINTSMIN=1 +# Determine identity of "person" in the score file with name (0) or +# numeric (1) user id. +#PERS_IS_UID=1 + +# Maximum number of score file entries to use for random statue names +#MAX_STATUENAME_RANK=10 + +# *** LOCATIONS *** +# IMPORTANT: If you change any of these locations, the directories they +# point at must exist. NetHack will not create them for you. +# +# The location that users can adjust their config file startup options +#CONFIGDIR=C:\NETHACK +# +# The location that a record of game aborts and self-diagnosed game problems +# is kept (default=HACKDIR, writeable) +#TROUBLEDIR=C:\NETHACK +# +# The location that documentation and helps files are placed +#HACKDIR=C:\NETHACK +# +# The location that level files in progress are stored (writeable) +#LEVELDIR=C:\NETHACK\LEVELS +# +# The location where saved games are kept (writeable) +#SAVEDIR=C:\NETHACK\SAVES +# +# The location that bones files are kept (writeable) +#BONESDIR=C:\NETHACK\BONES +# +# The location that score files are kept (writeable) +#SCOREDIR=C:\NETHACK +# +# The location that file synchronization locks are stored (writeable) +#LOCKDIR=C:\NETHACK From cab3eabfc4226e458189c4bc8e3b6fe0df2c5212 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 25 Nov 2019 00:50:16 -0500 Subject: [PATCH 315/529] lua quest texts --- doc/fixes37.0 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index f35050e1a..0f0b1e9a2 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -34,6 +34,8 @@ replace build-time level compiler and dungeon compiler with run-time loading of split off some of the functionality that was in makedefs (compiled-in options build date/time, etc) so that it can be built by a cross-compiler and accessed on the target platform +replace quest.txt and associated conversion to quest.dat via makedefs with + lua quest texts loaded at runtime Platform- and/or Interface-Specific New Features @@ -50,4 +52,3 @@ move majority of global variables into instance_globals struct g move zeroobj, zeromonst, zeroany into const_globals struct cg remove STATIC_DCL, STATIC_OVL, STATIC_VAR, STATIC_PTR - From b66bcc2f5ae421a8d3117b6435ae0c4ea1f647bc Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 25 Nov 2019 09:21:34 +0200 Subject: [PATCH 316/529] Fix lua quest data output types ...so the texts are given exactly the same way as they were given previously. --- dat/quest.lua | 27 ++++++++++++++------------- src/questpgr.c | 28 ++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/dat/quest.lua b/dat/quest.lua index a31d3f326..891556987 100644 --- a/dat/quest.lua +++ b/dat/quest.lua @@ -141,6 +141,7 @@ of us all: Go bravely with %d!]], essential in locating the Amulet of Yendor."]], }, quest_portal = { + output = "pline", text = [[You receive a faint telepathic message from %l: Your help is urgently needed at %H! Look for a ...ic transporter. @@ -215,7 +216,7 @@ taught you."]], }, firsttime = { synopsis = "[You arrive at %H, but all is not well.]", - output = "menu", + output = "text", text = [[You are suddenly in familiar surroundings. The buildings in the distance seem to be those of your old alma mater, but something is wrong. It feels as if there has been a riot recently, or %H has @@ -441,7 +442,7 @@ defeat %ni."]], }, firsttime = { synopsis = "[You reach the vicinity of %H, but sense evil magic nearby.]", - output = "menu", + output = "text", text = [[Warily you scan your surroundings, all of your senses alert for signs of possible danger. Off in the distance, you can %x the familiar shapes of %H. @@ -679,7 +680,7 @@ a difficult quest as that I propose to give you. }, firsttime = { synopsis = "[You arrive back at %H, but something is wrong here.]", - output = "menu", + output = "text", text = [[You descend through a barely familiar stairwell that you remember %l showing you when you embarked upon your vision quest. @@ -900,7 +901,7 @@ with good conscience. }, firsttime = { synopsis = "[You arrive back at %H and must find %l.]", - output = "menu", + output = "text", text = [[What sorcery has brought you back to %H? The smell of fresh funeral pyres tells you that something is amiss with the healing powers that used to practice here. @@ -1137,7 +1138,7 @@ Our presence when thou hast attained the noble title of %R."]], }, firsttime = { synopsis = "[Signs of battle include long gouges in the walls of %H.]", - output = "menu", + output = "text", text = [[You materialize in the shadows of %H. Immediately, you notice that something is wrong. The fields around the castle are trampled and withered, as if some great battle has been recently fought. @@ -1347,7 +1348,7 @@ return when you have attained the post of %R."]], }, firsttime = { synopsis = "[You have reached %H but something is wrong. %lC needs your aid.]", - output = "menu", + output = "text", text = [[You find yourself standing in sight of %H. Something is obviously wrong here. Strange shapes lumber around outside %H! @@ -1560,7 +1561,7 @@ when you have attained the post of %R."]], }, firsttime = { synopsis = "[You are at %H; the doors are closed. %lC needs your help!]", - output = "menu", + output = "text", text = [[You find yourself standing in sight of %H. Something is obviously wrong here. The doors to %H, which usually stand open, are closed. Strange human shapes shamble around @@ -1783,7 +1784,7 @@ which we need you to do. %RA might just be able to do this thing. }, firsttime = { synopsis = "[The ancient forest grove is surrounded by centaurs.]", - output = "menu", + output = "text", text = [[You arrive in familiar surroundings. In the distance, you %x the ancient forest grove, the place of worship to %d. @@ -2003,7 +2004,7 @@ leave you, %p? Oh yeah, I remember, I was going to kill you!"]], }, firsttime = { synopsis = "[You are in Ransmannsby, where you trained. Find %l.]", - output = "menu", + output = "text", text = [[Unexpectedly, you find yourself back in Ransmannsby, where you trained to be a thief. Quickly you make the guild sign, hoping that you AND word of your arrival reach %ls den.]], @@ -2219,7 +2220,7 @@ are ready, return to me."]], }, firsttime = { synopsis = "[The banner of %n flies above town. What has happened to %l?]", - output = "menu", + output = "text", text = [[Even before your senses adjust, you recognize the kami of %H. @@ -2451,7 +2452,7 @@ you will be ready. }, firsttime = { synopsis = "[You find yourself back at %H, but the quiet is ominous.]", - output = "menu", + output = "text", text = [[You breathe a sigh of relief as you find yourself back in the familiar surroundings of %H. @@ -2672,7 +2673,7 @@ Only when you have returned %Ra will you be able to defeat %n."]], }, firsttime = { synopsis = "[You arrive below %H. Something is wrong; there is lava present.]", - output = "menu", + output = "text", text = [[You materialize at the base of a snowy hill. Atop the hill sits a place you know well, %H. You immediately realize that something here is very wrong! @@ -2889,7 +2890,7 @@ renown as %Ra."]], }, firsttime = { synopsis = "[You have arrived at %ls tower but something is very wrong.]", - output = "menu", + output = "text", text = [[You are suddenly in familiar surroundings. You notice what appears to be a large, squat stone structure nearby. Wait! That looks like the tower of your former teacher, %l. diff --git a/src/questpgr.c b/src/questpgr.c index 3d7fa3919..edbcb1df2 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -395,11 +395,23 @@ static void deliver_by_pline(str) const char *str; { + const char *msgp = str; + const char *msgend = eos((char *)str); char in_line[BUFSZ], out_line[BUFSZ]; - Strcpy(in_line, str); - convert_line(in_line, out_line); - pline("%s", out_line); + while (msgp && msgp != msgend) { + int i = 0; + while (*msgp != '\0' && *msgp != '\n' && (i < BUFSZ-2)) { + in_line[i] = *msgp; + i++; + msgp++; + } + if (*msgp == '\n') + msgp++; + in_line[i] = '\0'; + convert_line(in_line, out_line); + pline("%s", out_line); + } } static void @@ -445,8 +457,8 @@ com_pager_core(section, msgid) const char *section; const char *msgid; { - const char *const howtoput[] = { "pline", "window", "menu", NULL }; - const int howtoput2i[] = { 1, 2, 3, 0 }; + const char *const howtoput[] = { "pline", "window", "text", "menu", "default", NULL }; + const int howtoput2i[] = { 1, 2, 2, 3, 0, 0 }; int output; lua_State *L; char *synopsis; @@ -487,7 +499,7 @@ const char *msgid; synopsis = get_table_str_opt(L, "synopsis", NULL); text = get_table_str_opt(L, "text", NULL); - output = howtoput2i[get_table_option(L, "output", "pline", howtoput)]; + output = howtoput2i[get_table_option(L, "output", "default", howtoput)]; if (!synopsis && !text) { int nelems; @@ -505,10 +517,10 @@ const char *msgid; text = dupstr(luaL_checkstring(L, -1)); } - if ((index(text, '\n') || (strlen(text) >= (BUFSZ - 1))) && output == 1) + if (output == 0 && (index(text, '\n') || (strlen(text) >= (BUFSZ - 1)))) output = 2; - if (output == 1) + if (output == 0 || output == 1) deliver_by_pline(text); else if (output == 3) deliver_by_window(text, NHW_MENU); From ddd8b7d9a55d5d49f4ee7401f0d235345e8f14cc Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 25 Nov 2019 16:30:54 +0200 Subject: [PATCH 317/529] Remove vestiges of quest text data file --- include/decl.h | 6 - include/qtext.h | 110 -------------- src/decl.c | 2 - src/questpgr.c | 19 --- sys/unix/hints/linux | 4 + util/makedefs.c | 338 ------------------------------------------- 6 files changed, 4 insertions(+), 475 deletions(-) diff --git a/include/decl.h b/include/decl.h index 4cd23a7bc..87ed80edd 100644 --- a/include/decl.h +++ b/include/decl.h @@ -1119,12 +1119,6 @@ struct instance_globals { /* questpgr.c */ char cvt_buf[CVT_BUF_SIZE]; - struct qtlists qt_list; -#ifdef DLB - struct dlb_handle *msg_file; -#else - FILE *msg_file; -#endif /* used by ldrname() and neminame(), then copied into cvt_buf */ char nambuf[CVT_BUF_SIZE]; diff --git a/include/qtext.h b/include/qtext.h index 29993d29a..38c535f1f 100644 --- a/include/qtext.h +++ b/include/qtext.h @@ -5,114 +5,4 @@ #ifndef QTEXT_H #define QTEXT_H -#define N_HDR 16 /* Maximum number of categories */ -/* (i.e., num roles + 1) */ -#define LEN_HDR 3 /* Maximum length of a category name */ - -struct qtmsg { - int msgnum; - char delivery; - long offset, size, summary_size; -}; - -#if defined(MAKEDEFS_C) || defined(MDLIB_C) /***** MAKEDEFS *****/ - -#define N_MSG 100 /* arbitrary */ - -struct msghdr { - int n_msg; - struct qtmsg qt_msg[N_MSG]; -}; - -struct qthdr { - int n_hdr; - char id[N_HDR][LEN_HDR]; - long offset[N_HDR]; -}; - -/* Error message macros */ -#define CREC_IN_MSG "Control record encountered during message - line %d\n" -#define DUP_MSG "Duplicate message number at line %d\n" -#define END_NOT_IN_MSG "End record encountered before message - line %d\n" -#define TEXT_NOT_IN_MSG "Text encountered outside message - line %d\n" -#define UNREC_CREC "Unrecognized Control record at line %d\n" -#define MAL_SUM "Malformed summary in End record - line %d\n" -#define DUMB_SUM "Summary for single line message is useless - line %d\n" -#define CTRL_TRUNC "Control record truncated at line %d\n" -#define TEXT_TRUNC "Text record truncated at line %d\n" -#define OUT_OF_HEADERS \ - "Too many message types (line %d)\nAdjust N_HDR in qtext.h and " \ - "recompile.\n" -#define OUT_OF_MESSAGES \ - "Too many messages in class (line %d)\nAdjust N_MSG in qtext.h and " \ - "recompile.\n" - -#else /***** !MAKEDEFS && !MDLIB_C *****/ - -struct qtlists { - struct qtmsg *common, -#if 0 /* UNUSED but available */ - *chrace, -#endif - *chrole; -}; - -/* - * Quest message defines. Used in quest.c to trigger off "realistic" - * dialogue to the player. - */ -#define QT_FIRSTTIME 1 -#define QT_NEXTTIME 2 -#define QT_OTHERTIME 3 - -#define QT_GUARDTALK 5 /* 5 random things guards say before quest */ -#define QT_GUARDTALK2 10 /* 5 random things guards say after quest */ - -#define QT_FIRSTLEADER 15 -#define QT_NEXTLEADER 16 -#define QT_OTHERLEADER 17 -#define QT_LASTLEADER 18 -#define QT_BADLEVEL 19 -#define QT_BADALIGN 20 -#define QT_ASSIGNQUEST 21 - -#define QT_ENCOURAGE 25 /* 1-10 random encouragement messages */ - -#define QT_FIRSTLOCATE 35 -#define QT_NEXTLOCATE 36 - -#define QT_FIRSTGOAL 40 -#define QT_NEXTGOAL 41 -#define QT_ALTGOAL 42 /* alternate to QT_NEXTGOAL if artifact is absent */ - -#define QT_FIRSTNEMESIS 50 -#define QT_NEXTNEMESIS 51 -#define QT_OTHERNEMESIS 52 -#define QT_NEMWANTSIT 53 /* you somehow got the artifact */ - -#define QT_DISCOURAGE 60 /* 1-10 random maledictive messages */ - -#define QT_GOTIT 70 - -#define QT_KILLEDNEM 80 -#define QT_OFFEREDIT 81 -#define QT_OFFEREDIT2 82 - -#define QT_POSTHANKS 90 -#define QT_HASAMULET 91 - -/* - * Message defines for common text used in maledictions. - */ -#define COMMON_ID "-" /* Common message id value */ - -#define QT_ANGELIC 10 -#define QTN_ANGELIC 10 - -#define QT_DEMONIC 30 -#define QTN_DEMONIC 20 - -#define QT_BANISHED 60 -#endif /***** !MAKEDEFS && !MDLIB_C *****/ - #endif /* QTEXT_H */ diff --git a/src/decl.c b/src/decl.c index 2d79af408..d5ba98d92 100644 --- a/src/decl.c +++ b/src/decl.c @@ -576,8 +576,6 @@ const struct instance_globals g_init = { /* questpgr.c */ UNDEFINED_VALUES, /* cvt_buf */ - UNDEFINED_VALUES, /* qt_list */ - UNDEFINED_PTR, /* msg_file */ UNDEFINED_VALUES, /* nambuf */ /* read.c */ diff --git a/src/questpgr.c b/src/questpgr.c index edbcb1df2..64eea0c4d 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -26,9 +26,6 @@ static void FDECL(convert_line, (char *,char *)); static void FDECL(deliver_by_pline, (const char *)); static void FDECL(deliver_by_window, (const char *, int)); static boolean FDECL(skip_pager, (BOOLEAN_P)); -#if 0 -static struct qtmsg *FDECL(msg_in, (struct qtmsg *, int)); -#endif short quest_info(typ) @@ -190,22 +187,6 @@ char who, /* 'd' => deity, 'l' => leader, 'n' => nemesis, 'o' => artifact */ return; } -#if 0 -static struct qtmsg * -msg_in(qtm_list, msgnum) -struct qtmsg *qtm_list; -int msgnum; -{ - struct qtmsg *qt_msg; - - for (qt_msg = qtm_list; qt_msg->msgnum > 0; qt_msg++) - if (qt_msg->msgnum == msgnum) - return qt_msg; - - return (struct qtmsg *) 0; -} -#endif - static void convert_arg(c) char c; diff --git a/sys/unix/hints/linux b/sys/unix/hints/linux index dcdee332d..bcafe1cf1 100644 --- a/sys/unix/hints/linux +++ b/sys/unix/hints/linux @@ -55,3 +55,7 @@ CHGRP=true VARDIRPERM = 0755 VARFILEPERM = 0600 GAMEPERM = 0755 + +CC=clang +CFLAGS+=-fsanitize=address -fno-omit-frame-pointer +LFLAGS+=-fsanitize=address -fno-omit-frame-pointer diff --git a/util/makedefs.c b/util/makedefs.c index bb4b1fca3..bedacf153 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1873,353 +1873,15 @@ do_permonst() } /* Start of Quest text file processing. */ -#include "qtext.h" - -static struct qthdr qt_hdr; -static struct msghdr msg_hdr[N_HDR]; -static struct qtmsg *curr_msg; - -static int qt_line; - -static boolean in_msg; -#define NO_MSG 1 /* strlen of a null line returned by fgets() */ - -static boolean -qt_comment(s) -char *s; -{ - if (s[0] == '#') - return TRUE; - return (boolean) (!in_msg && strlen(s) == NO_MSG); -} - -static boolean -qt_control(s) -char *s; -{ - return (boolean) (s[0] == '%' && (s[1] == 'C' || s[1] == 'E')); -} - -static int -get_hdr(code) -char *code; -{ - int i; - - for (i = 0; i < qt_hdr.n_hdr; i++) - if (!strncmp(code, qt_hdr.id[i], LEN_HDR)) - return ++i; - - return 0; -} - -static boolean -new_id(code) -char *code; -{ - if (qt_hdr.n_hdr >= N_HDR) { - Fprintf(stderr, OUT_OF_HEADERS, qt_line); - return FALSE; - } - - strncpy(&qt_hdr.id[qt_hdr.n_hdr][0], code, LEN_HDR); - msg_hdr[qt_hdr.n_hdr].n_msg = 0; - qt_hdr.offset[qt_hdr.n_hdr++] = 0L; - return TRUE; -} - -static boolean -known_msg(num, id) -int num, id; -{ - int i; - - for (i = 0; i < msg_hdr[num].n_msg; i++) - if (msg_hdr[num].qt_msg[i].msgnum == id) - return TRUE; - - return FALSE; -} - -static void -new_msg(s, num, id) -char *s; -int num, id; -{ - struct qtmsg *qt_msg; - - if (msg_hdr[num].n_msg >= N_MSG) { - Fprintf(stderr, OUT_OF_MESSAGES, qt_line); - } else { - qt_msg = &(msg_hdr[num].qt_msg[msg_hdr[num].n_msg++]); - qt_msg->msgnum = id; - qt_msg->delivery = s[2]; - qt_msg->offset = qt_msg->size = qt_msg->summary_size = 0L; - - curr_msg = qt_msg; - } -} - -/* check %E record for "[summary text]" that nethack can stuff into the - message history buffer when delivering text via window instead of pline */ -static char * -valid_qt_summary(s, parsing) -char *s; /* end record: "%E" optionally followed by " [summary]" */ -boolean parsing; /* curr_msg is valid iff this is True */ -{ - static char summary[BUFSZ]; - char *p; - - if (*s != '%' || *(s + 1) != 'E') - return (char *) 0; - if ((p = index(s, '[')) == 0) - return (char *) 0; - /* note: opening '[' and closing ']' will be retained in the output; - anything after ']' will be discarded by putting a newline there */ - Strcpy(summary, p); - - /* have an opening bracket; summary[] holds it and all text that follows - */ - p = eos(summary); - /* find closing bracket */ - while (p > summary && *(p - 1) != ']') - --p; - - if (p == summary) { - /* we backed up all the way to the start without finding a bracket */ - if (parsing) /* malformed summary */ - Fprintf(stderr, MAL_SUM, qt_line); - } else if (p == summary + 1) { - ; /* ignore empty [] */ - } else { /* got something */ - /* p points one spot past ']', usually to '\n'; - we need to include the \n as part of the size */ - if (parsing) { - /* during the writing pass we won't be able to recheck - delivery, so any useless summary for a pline mode - message has to be carried along to the output file */ - if (curr_msg->delivery == 'p') - Fprintf(stderr, DUMB_SUM, qt_line); - /* +1 is for terminating newline */ - curr_msg->summary_size = (long) (p - summary) + 1L; - } else { - /* caller is writing rather than just parsing; - force newline after the closing bracket */ - Strcpy(p, "\n"); - } - return summary; - } - return (char *) 0; -} - -static void -do_qt_control(s) -char *s; -{ - char code[BUFSZ]; - int num, id = 0; - - if (!index(s, '\n')) - Fprintf(stderr, CTRL_TRUNC, qt_line); - - switch (s[1]) { - case 'C': - if (in_msg) { - Fprintf(stderr, CREC_IN_MSG, qt_line); - break; - } else { - in_msg = TRUE; - if (sscanf(&s[4], "%s %5d", code, &id) != 2) { - Fprintf(stderr, UNREC_CREC, qt_line); - break; - } - num = get_hdr(code); - if (!num && !new_id(code)) - break; - num = get_hdr(code) - 1; - if (known_msg(num, id)) - Fprintf(stderr, DUP_MSG, qt_line); - else - new_msg(s, num, id); - } - break; - - case 'E': - if (!in_msg) { - Fprintf(stderr, END_NOT_IN_MSG, qt_line); - } else { - /* sets curr_msg->summary_size if applicable */ - (void) valid_qt_summary(s, TRUE); - in_msg = FALSE; - } - break; - - default: - Fprintf(stderr, UNREC_CREC, qt_line); - break; - } -} - -static void -do_qt_text(s) -char *s; -{ - if (!in_msg) { - Fprintf(stderr, TEXT_NOT_IN_MSG, qt_line); - } else if (!index(s, '\n')) { - Fprintf(stderr, TEXT_TRUNC, qt_line); - } - - curr_msg->size += strlen(s); - return; -} - -static void -adjust_qt_hdrs() -{ - int i, j; - long count = 0L, hdr_offset = sizeof(int) - + (sizeof(char) * LEN_HDR + sizeof(long)) - * qt_hdr.n_hdr; - - for (i = 0; i < qt_hdr.n_hdr; i++) { - qt_hdr.offset[i] = hdr_offset; - hdr_offset += sizeof(int) + sizeof(struct qtmsg) * msg_hdr[i].n_msg; - } - - for (i = 0; i < qt_hdr.n_hdr; i++) - for (j = 0; j < msg_hdr[i].n_msg; j++) { - msg_hdr[i].qt_msg[j].offset = hdr_offset + count; - count += - msg_hdr[i].qt_msg[j].size + msg_hdr[i].qt_msg[j].summary_size; - } - return; -} - -static void -put_qt_hdrs() -{ - int i; - - /* - * The main header record. - */ - if (debug) - Fprintf(stderr, "%ld: header info.\n", ftell(ofp)); - (void) fwrite((genericptr_t) & (qt_hdr.n_hdr), sizeof(int), 1, ofp); - (void) fwrite((genericptr_t) & (qt_hdr.id[0][0]), sizeof(char) * LEN_HDR, - qt_hdr.n_hdr, ofp); - (void) fwrite((genericptr_t) & (qt_hdr.offset[0]), sizeof(long), - qt_hdr.n_hdr, ofp); - if (debug) { - for (i = 0; i < qt_hdr.n_hdr; i++) - Fprintf(stderr, "%s @ %ld, ", qt_hdr.id[i], qt_hdr.offset[i]); - Fprintf(stderr, "\n"); - } - - /* - * The individual class headers. - */ - for (i = 0; i < qt_hdr.n_hdr; i++) { - if (debug) - Fprintf(stderr, "%ld: %s header info.\n", ftell(ofp), - qt_hdr.id[i]); - (void) fwrite((genericptr_t) & (msg_hdr[i].n_msg), sizeof(int), 1, - ofp); - (void) fwrite((genericptr_t) & (msg_hdr[i].qt_msg[0]), - sizeof(struct qtmsg), msg_hdr[i].n_msg, ofp); - if (debug) { - int j; - - for (j = 0; j < msg_hdr[i].n_msg; j++) { - Fprintf(stderr, "msg %d @ %ld (%ld)", - msg_hdr[i].qt_msg[j].msgnum, - msg_hdr[i].qt_msg[j].offset, - msg_hdr[i].qt_msg[j].size); - if (msg_hdr[i].qt_msg[j].summary_size) - Fprintf(stderr, " [%ld]", - msg_hdr[i].qt_msg[j].summary_size); - Fprintf(stderr, "\n"); - } - } - } -} void do_questtxt() { - char *line; - - /* Make sure they know */ printf("DEPRECATION WARNINGS:\n"); printf("'makedefs -q' is no longer required. Remove all references\n"); printf(" to it from the build process.\n"); printf("'dat/quest.txt' is no longer part of the source tree.\n"); - Sprintf(filename, DATA_IN_TEMPLATE, QTXT_I_FILE); - if (!(ifp = fopen(filename, RDTMODE))) { - perror(filename); - exit(EXIT_FAILURE); - } - - filename[0] = '\0'; -#ifdef FILE_PREFIX - Strcat(filename, file_prefix); -#endif - Sprintf(eos(filename), DATA_TEMPLATE, QTXT_O_FILE); - if (!(ofp = fopen(filename, WRBMODE))) { - perror(filename); - Fclose(ifp); - exit(EXIT_FAILURE); - } - - qt_hdr.n_hdr = 0; - qt_line = 0; - in_msg = FALSE; - - while ((line = fgetline(ifp)) != 0) { - SpinCursor(3); - - qt_line++; - if (qt_control(line)) - do_qt_control(line); - else if (qt_comment(line)) { - free(line); - continue; - } else - do_qt_text(line); - free(line); - } - - (void) rewind(ifp); - in_msg = FALSE; - adjust_qt_hdrs(); - put_qt_hdrs(); - while ((line = fgetline(ifp)) != 0) { - if (qt_control(line)) { - char *summary_p = 0; - - in_msg = (line[1] == 'C'); - if (!in_msg) - summary_p = valid_qt_summary(line, FALSE); - /* don't write anything unless we've got a summary */ - if (!summary_p) { - free(line); - continue; - } - /* we have summary text; replace raw %E record with it */ - Strcpy(line, summary_p); /* (guaranteed to fit) */ - } else if (qt_comment(line)) { - free(line); - continue; - } - if (debug) - Fprintf(stderr, "%ld: %s", ftell(stdout), line); - (void) fputs(xcrypt(line), ofp); - free(line); - } - Fclose(ifp); - Fclose(ofp); return; } From a1276d3c8c6ac50937368bcbd7188f3cbbc4af85 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 25 Nov 2019 11:12:27 -0500 Subject: [PATCH 318/529] README update --- README | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/README b/README index ea0c6f10a..d81a5bb9b 100644 --- a/README +++ b/README @@ -6,21 +6,39 @@ NetHack 3.6. NetHack 3.7.0 work-in-progress is not an official release of NetHack. It currently contains a number of enhancements to NetHack 3.6.3. The file -doc/fixes37.0 in the source distribution has a full list of them. -The text in there was written for the development team's own use and is -provided "as is", so please do not ask us to further explain the entries -in that file. Some entries might be considered "spoilers", particularly in -the "new features" section. +doc/fixes37.0 in the source distribution has a full list of them. The text in +there was written for the development team's own use and is provided "as is", +so please do not ask us to further explain the entries in that file. Some +entries might be considered "spoilers", particularly in the "new features" +section. -Below you will find some other general notes that were not considered -spoilers: +Along with the game improvements and bug fixes, NetHack 3.7 strives to make +some general architectural improvements to the game or to its building +process. Among them: - * automatic annotation "gateway to Moloch's Sanctum" for vibrating square level + * Remove barriers to building NetHack on one platform and operating system, + for later execution on another (possibly quite different) platform and/or + operating system. That capability is generally known as "cross-compiling." + See the file "Cross-compiling" in the top-level folder for more information + on that. + + * Replace the build-time "yacc and lex"-based level compiler, the "yacc and + lex"-based dungeon compiler, and the quest text file processing done + by NetHack's "makedefs" utility, with lua text alternatives that are + loaded and processed by the game during play. + + * Write game savefiles and bonesfiles in a more portable and consistent way + to open up the possibility of utilizing them between different platforms, + such as between your desktop computer and your hand-held device. + +Below you will find some other general notes on the changes in NetHack 3.7 that +were not considered spoilers: + - automatic annotation "gateway to Moloch's Sanctum" for vibrating square level once that square's location becomes known (found or magic mapped); goes away once sanctum temple is found (entered or high altar mapped) - * savefile: add support to deconstruct internal data structures down into their + - savefile: add support to deconstruct internal data structures down into their individual fields and save those fields instead of the entire struct - * savefile: use little-endian format for fields where that makes a difference + - savefile: use little-endian format for fields where that makes a difference - - - - - - - - - - - @@ -48,7 +66,11 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. "license" in the 'dat' subdirectory. It is expected that you comply with the terms of that license, and we are very serious about it. -4. If everything is in order, you can now turn to trying to get the program +4. If you are attempting to build NetHack on one platform/processor, to + produce a game on a different platform/processor it may behoove you to + read the file "Cross-compiling" in your Top directory. + +5. If everything is in order, you can now turn to trying to get the program to compile and run on your particular system. It is worth mentioning that the default configuration is SysV/Sun/Solaris2.x (simply because the code was housed on such a system). @@ -59,6 +81,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. for particular windowing environments. Reading them, and the man pages, should answer most of your questions. + At the time of this release, NetHack 3.6 has been tested to run/compile on: From 05fdccd8a658b071db24d7d11fdf605fdc505763 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 25 Nov 2019 11:16:58 -0500 Subject: [PATCH 319/529] add placeholder Cross-compiling file to Top --- Cross-compiling | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Cross-compiling diff --git a/Cross-compiling b/Cross-compiling new file mode 100644 index 000000000..757e8df14 --- /dev/null +++ b/Cross-compiling @@ -0,0 +1,7 @@ +Cross-compiling + +Placeholder for keeping cross-compiling notes for NetHack + +This file will be updated with more information prior +to release. + From 94f251cf2a6f282bed009ed2c04e82de4faab37f Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 25 Nov 2019 11:30:21 -0500 Subject: [PATCH 320/529] fixes catch-up bit --- doc/fixes37.0 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 0f0b1e9a2..003e9342d 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -9,6 +9,7 @@ hero polymorphed into a vampire can use #monster to shape-shift rather than among the shiftable shapes and true vampire form) adjust bones filename buffer sizes to accommodate suffix fix internal self-recover to work with recent fields added to checkpoint file +improvements to pronoun usage when hallucinating Fixes to Pre-3.7.0 Problems that Were Exposed Via git Repository From 4ece8ef31dfbe46f45cf0b28c275cf78aa375bb9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 25 Nov 2019 11:42:24 -0500 Subject: [PATCH 321/529] spelling bit --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index d81a5bb9b..cdc0dfcb6 100644 --- a/README +++ b/README @@ -24,7 +24,7 @@ process. Among them: * Replace the build-time "yacc and lex"-based level compiler, the "yacc and lex"-based dungeon compiler, and the quest text file processing done - by NetHack's "makedefs" utility, with lua text alternatives that are + by NetHack's "makedefs" utility, with Lua text alternatives that are loaded and processed by the game during play. * Write game savefiles and bonesfiles in a more portable and consistent way From 05e64d24294c9f52e9468e3de1ebf77697f83c71 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 25 Nov 2019 10:07:11 -0800 Subject: [PATCH 322/529] more questpgr removal from makedefs --- util/makedefs.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/util/makedefs.c b/util/makedefs.c index bedacf153..c9db1eb42 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 makedefs.c $NHDT-Date: 1574634383 2019/11/24 22:26:23 $ $NHDT-Branch: paxed-quest-lua $:$NHDT-Revision: 1.163 $ */ +/* NetHack 3.6 makedefs.c $NHDT-Date: 1574705221 2019/11/25 18:07:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.165 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -69,8 +69,10 @@ static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.7\t2019/11/19"; #define DGN_I_FILE "dungeon.def" #define DGN_O_FILE "dungeon.pdf" #define MON_STR_C "monstr.c" +#if 0 #define QTXT_I_FILE "quest.txt" #define QTXT_O_FILE "quest.dat" +#endif #define VIS_TAB_H "vis_tab.h" #define VIS_TAB_C "vis_tab.c" #define GITINFO_FILE "gitinfo.txt" @@ -179,17 +181,6 @@ static void FDECL(do_rnd_access_file, (const char *)); static boolean FDECL(d_filter, (char *)); static boolean FDECL(h_filter, (char *)); static void FDECL(opt_out_words, (char *, int *)); -static boolean FDECL(qt_comment, (char *)); -static boolean FDECL(qt_control, (char *)); -static int FDECL(get_hdr, (char *)); -static boolean FDECL(new_id, (char *)); -static boolean FDECL(known_msg, (int, int)); -static void FDECL(new_msg, (char *, int, int)); -static char *FDECL(valid_qt_summary, (char *, BOOLEAN_P)); -static void FDECL(do_qt_control, (char *)); -static void FDECL(do_qt_text, (char *)); -static void NDECL(adjust_qt_hdrs); -static void NDECL(put_qt_hdrs); #ifdef VISION_TABLES static void NDECL(H_close_gen); From 1b2b330e9f9a598e67d1ed86cf7f7ee98c79388b Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 25 Nov 2019 12:20:42 -0800 Subject: [PATCH 323/529] lua reorganization Reduce the implied reliance of a specific version of lua. Instead of copying liblua.a to src/, copy it to lib/. Instead of telling the compiler to look for headers in lib/lua-5.3.5/src/ as well as in include/, copy the relevant ones to lib/ and tell the compiler to look for them there. 'make spotless' in src/ will remove both the object library and the header files from lib/ but there really should be a new Makefile.lib to take care of that directory. Update Makefile.src to be able to build lua in case someone starts with 'make all' there instead of in the top Makefile. It doesn't duplicate the option to fetch the lua source package though. NHinternal/../genFiles.c has been updated to mention lib/liblua.a and lib/lua*.h as 'generated at compile time' in Files and to skip lib/lua-* entirely if it comes across that (so not operating on a completely clean tree). But it won't be accurate unless/until other ports stage their lua files there instead of in src/ and lib/lua-$(VERSION)/src/. I haven't tried 'make depend' to see what it makes of the numerous changes.... --- sys/unix/Makefile.src | 30 ++++++++++++++++++------------ sys/unix/Makefile.top | 29 +++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 4c22ff244..4e580ba2c 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -1,5 +1,5 @@ # NetHack Makefile. -# NetHack 3.6 Makefile.src $NHDT-Date: 1550876124 2019/02/22 22:55:24 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.70 $ +# NetHack 3.6 Makefile.src $NHDT-Date: 1574713234 2019/11/25 20:20:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.76 $ # Copyright (c) 2018 by Pasi Kallinen # NetHack may be freely redistributed. See license for details. @@ -49,7 +49,7 @@ SHELL=/bin/sh # for UNIX systems SYSSRC = ../sys/share/ioctl.c ../sys/share/unixtty.c ../sys/unix/unixmain.c \ ../sys/unix/unixunix.c ../sys/unix/unixres.c -SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o unixres.o liblua.a +SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o unixres.o ../lib/liblua.a # # for Systos # SYSSRC = ../sys/atari/tos.c ../sys/share/pcmain.c ../sys/share/pcsys.c \ @@ -173,7 +173,7 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome #CFLAGS = -O -I../include #LFLAGS = -CFLAGS += -I../lib/lua-5.3.5/src +CFLAGS += -I../lib # -lm required by lua LIBS += -lm @@ -447,9 +447,9 @@ HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c ball.c bones.c \ dungeon.c eat.c end.c engrave.c exper.c explode.c extralev.c \ files.c fountain.c hack.c hacklib.c invent.c isaac64.c light.c \ lock.c mail.c makemon.c mapglyph.c mcastu.c mhitm.c mhitu.c \ - minion.c mklev.c mkmap.c nhlua.c nhlsel.c \ - mkmaze.c mkobj.c mkroom.c mon.c mondata.c monmove.c monst.c \ - mplayer.c mthrowu.c muse.c music.c o_init.c objects.c objnam.c \ + minion.c mklev.c mkmap.c mkmaze.c mkobj.c mkroom.c mon.c \ + mondata.c monmove.c monst.c mplayer.c mthrowu.c muse.c music.c \ + nhlua.c nhlsel.c o_init.c objects.c objnam.c \ options.c pager.c pickup.c pline.c polyself.c potion.c pray.c \ priest.c quest.c questpgr.c read.c rect.c region.c restore.c \ rip.c rnd.c role.c rumors.c save.c sfstruct.c \ @@ -504,8 +504,10 @@ HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h botl.h \ tradstdc.h trampoli.h trap.h unixconf.h vision.h vmsconf.h wintty.h \ wincurs.h winX.h winprocs.h wintype.h you.h youprop.h -HSOURCES = $(HACKINCL) date.h onames.h pm.h vis_tab.h \ - dgn_file.h +HSOURCES = $(HACKINCL) date.h onames.h pm.h vis_tab.h dgn_file.h + +# relative to src +LUA_HEADERS = ../lib/lua.h ../lib/luaconf.h ../lib/lualib.h ../lib/lauxlib.h # the following .o's _must_ be made before any others (for makedefs) FIRSTOBJ = monst.o objects.o @@ -516,9 +518,9 @@ HOBJ = $(FIRSTOBJ) allmain.o alloc.o apply.o artifact.o attrib.o ball.o \ drawing.o dungeon.o eat.o end.o engrave.o exper.o explode.o \ extralev.o files.o fountain.o hack.o hacklib.o invent.o isaac64.o \ light.o lock.o mail.o makemon.o mapglyph.o mcastu.o mhitm.o mhitu.o \ - minion.o mklev.o mkmap.o nhlua.o nhlsel.o \ - mkmaze.o mkobj.o mkroom.o mon.o mondata.o monmove.o \ - mplayer.o mthrowu.o muse.o music.o o_init.o objnam.o options.o \ + minion.o mklev.o mkmap.o mkmaze.o mkobj.o mkroom.o mon.o \ + mondata.o monmove.o mplayer.o mthrowu.o muse.o music.o \ + nhlua.o nhlsel.o o_init.o objnam.o options.o \ pager.o pickup.o pline.o polyself.o potion.o pray.o priest.o \ quest.o questpgr.o read.o rect.o region.o restore.o rip.o rnd.o \ role.o rumors.o save.o sfstruct.o \ @@ -587,6 +589,8 @@ DUMB.Setup: ../include/extern.h all: $(GAME) +lib/liblua.a $(LUA_HEADERS): + @( cd .. ; $(MAKE) lua_support ) # dependencies for makedefs and its outputs, which the util # Makefile is responsible for keeping up to date @@ -720,6 +724,7 @@ clean: spotless: clean -rm -f a.out core $(GAME) Sys* + -rm -f ../lib/liblua.a $(LUA_HEADERS) -rm -f ../include/date.h ../include/onames.h ../include/pm.h -rm -f ../include/vis_tab.h vis_tab.c tile.c *.moc -rm -f ../win/gnome/gn_rip.h @@ -751,7 +756,8 @@ $(CONFIG_H): ../include/config.h ../include/config1.h ../include/tradstdc.h \ ../include/system.h ../include/unixconf.h ../include/os2conf.h \ ../include/micro.h ../include/pcconf.h ../include/tosconf.h \ ../include/amiconf.h ../include/macconf.h ../include/beconf.h \ - ../include/wceconf.h ../include/ntconf.h + ../include/wceconf.h ../include/ntconf.h \ + ../lib/lua.h ../lib/luaconf.h ../lib/lualib.h ../lib/lauxlib.h touch $(CONFIG_H) # hack.h timestamp $(HACK_H): ../include/hack.h $(CONFIG_H) ../include/lint.h ../include/align.h \ diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index e55f34fc5..da01f1a95 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -1,5 +1,5 @@ # NetHack Top-level Makefile. -# NetHack 3.6 Makefile.top $NHDT-Date: 1524689449 2018/04/25 20:50:49 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.36 $ +# NetHack 3.6 Makefile.top $NHDT-Date: 1574713236 2019/11/25 20:20:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.42 $ # Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland # NetHack may be freely redistributed. See license for details. @@ -94,8 +94,23 @@ DATNODLB = $(VARDATND) license symbols DATDLB = $(DATHELP) dungeon.lua tribute $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) DAT = $(DATNODLB) $(DATDLB) -$(GAME): - ( cd lib/lua-5.3.5/src && make a && cp liblua.a ../../../src/ ) +LUA_HEADERS = lib/lua.h lib/luaconf.h lib/lualib.h lib/lauxlib.h +lua_support: lib/liblua.a $(LUA_HEADERS) + @true +lib/liblua.a: lib/lua-$(LUA_VERSION)/src/liblua.a + @( cd lib/lua-$(LUA_VERSION)/src ; make a ; cd ../../.. ) + cp lib/lua-$(LUA_VERSION)/src/liblua.a $@ +lib/lua.h: lib/lua-$(LUA_VERSION)/src/lua.h + sed -e '/(lua_error)/s/;/ NORETURN;/' \ + < lib/lua-$(LUA_VERSION)/src/lua.h > $@ +lib/luaconf.h: lib/lua-$(LUA_VERSION)/src/luaconf.h + cp lib/lua-$(LUA_VERSION)/src/luaconf.h $@ +lib/lualib.h: lib/lua-$(LUA_VERSION)/src/lualib.h + cp lib/lua-$(LUA_VERSION)/src/lualib.h $@ +lib/lauxlib.h: lib/lua-$(LUA_VERSION)/src/lauxlib.h + cp lib/lua-$(LUA_VERSION)/src/lauxlib.h $@ + +$(GAME): lua_support ( cd src ; $(MAKE) ) all: $(GAME) recover Guidebook $(VARDAT) spec_levs check-dlb @@ -238,11 +253,13 @@ dofiles-nodlb: # This is not part of the dependency build hierarchy. # It requires an explicit "make fetch-Lua". fetch-lua: fetch-Lua + @true fetch-Lua: ( mkdir -p lib ; cd lib ; \ - curl -R -O http://www.lua.org/ftp/lua-$(LUA_VERSION).tar.gz ; \ - tar zxf lua-$(LUA_VERSION).tar.gz ; rm -f lua-$(LUA_VERSION).tar.gz ) + curl -R -O http://www.lua.org/ftp/lua-$(LUA_VERSION).tar.gz ; \ + tar zxf lua-$(LUA_VERSION).tar.gz ; rm -f lua-$(LUA_VERSION).tar.gz ) + update: $(GAME) recover $(VARDAT) spec_levs # (don't yank the old version out from under people who're playing it) -mv $(INSTDIR)/$(GAME) $(INSTDIR)/$(GAME).old @@ -291,7 +308,7 @@ clean: ( cd src ; $(MAKE) clean ) ( cd util ; $(MAKE) clean ) ( cd doc ; $(MAKE) clean ) - ( cd lib/lua-5.3.5/src && $(MAKE) clean ) + ( cd lib/lua-$(LUA_VERSION)/src && $(MAKE) clean ) # 'make spotless' returns the source tree to near-distribution condition. # it removes .o files, executables, and compiled data files From 31306760773b5200209869d62d73682ac53e67ec Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 25 Nov 2019 15:01:40 -0800 Subject: [PATCH 324/529] alignment of mimicked or polymorphed altars A reddit thread about an unaligned altar in an aligned temple was a tipoff that mimics posing as altars didn't have any particular alignment. The look-at code was misusing an operloaded field of the underlying terrain. Pick an alignment at random when taking on the appearance of an altar, store it in the mimic's mon->mextra->mcorpsenm field, and have look-at use that. Also, dropping a ring of polymorph into a sink can transform it, and one possible outcome is an altar. In this case, the alignment is part of the location's topology, but code setting that up was using Align2amask(rn2(foo)). That's a macro which evaluates its argument more than once. The first evaluation was effectively a no-op. If the second evaluation picked lawful then the result was lawful as intended. But if the second picked non-lawful and the third picked lawful, the result would end up as none-of-the-above (a value of 3 when it needs to be a single-bit mask of 1, 2, or 4). --- doc/fixes36.3 | 8 ++++++-- include/mextra.h | 7 ++++--- src/do.c | 9 +++++++-- src/makemon.c | 17 ++++++++++++----- src/pager.c | 19 +++++++++++++------ 5 files changed, 42 insertions(+), 18 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index f522e20b5..238f156ca 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.190 $ $NHDT-Date: 1574638389 2019/11/24 23:33:09 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.191 $ $NHDT-Date: 1574722861 2019/11/25 23:01:01 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -302,7 +302,11 @@ when Riders use their bargethrough capability, don't let them swap places with there'd be no corpse so no auto-revive) putting on levitation boots while on sink would crash when attempting to set the enchantment known flag on Null 'uarmf' pointer -unix: Fix double DLB definition in linux hints file +look-at of mimics mimicking altars got an arbitary alignment from misuse of + underlying terrain +polymorph_sink creating an altar passed a call to rn2() as an argument to a + macro which evaluates its parameter more than once +unix: fix double DLB definition in linux hints file windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix diff --git a/include/mextra.h b/include/mextra.h index 6879a16ac..2fd27472a 100644 --- a/include/mextra.h +++ b/include/mextra.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 mextra.h $NHDT-Date: 1571531885 2019/10/20 00:38:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.23 $ */ +/* NetHack 3.6 mextra.h $NHDT-Date: 1574722861 2019/11/25 23:01:01 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.24 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -179,8 +179,9 @@ struct mextra { struct eshk *eshk; struct emin *emin; struct edog *edog; - int mcorpsenm; /* obj->corpsenm for mimic posing as statue or corpse, or - * obj->spe (fruit index) for one posing as a slime mold */ + int mcorpsenm; /* obj->corpsenm for mimic posing as statue or corpse, + * obj->spe (fruit index) for one posing as a slime mold, + * or an alignment mask for one posing as an altar */ }; #define MNAME(mon) ((mon)->mextra->mname) diff --git a/src/do.c b/src/do.c index 035fd3a8e..72b315640 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do.c $NHDT-Date: 1559670603 2019/06/04 17:50:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.192 $ */ +/* NetHack 3.6 do.c $NHDT-Date: 1574722862 2019/11/25 23:01:02 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.193 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -309,6 +309,7 @@ polymorph_sink() { uchar sym = S_sink; boolean sinklooted; + int algn; if (levl[u.ux][u.uy].typ != SINK) return; @@ -335,7 +336,11 @@ polymorph_sink() case 2: sym = S_altar; levl[u.ux][u.uy].typ = ALTAR; - levl[u.ux][u.uy].altarmask = Align2amask(rn2((int) A_LAWFUL + 2) - 1); + /* 3.6.3: this used to pass 'rn2(A_LAWFUL + 2) - 1' to + Align2mask() but it evaluates its argument more than once */ + algn = rn2(3) - 1; /* -1 (A_Cha) or 0 (A_Neu) or +1 (A_Law) */ + levl[u.ux][u.uy].altarmask = ((Inhell && rn2(3)) ? AM_NONE + : Align2amask(algn)); break; case 3: sym = S_room; diff --git a/src/makemon.c b/src/makemon.c index 2ec04698c..3145ad6de 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 makemon.c $NHDT-Date: 1571531888 2019/10/20 00:38:08 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.141 $ */ +/* NetHack 3.6 makemon.c $NHDT-Date: 1574722863 2019/11/25 23:01:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.142 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2194,10 +2194,12 @@ register struct monst *mtmp; } else if (rt == TEMPLE) { ap_type = M_AP_FURNITURE; appear = S_altar; - /* - * We won't bother with beehives, morgues, barracks, throne rooms - * since they shouldn't contain too many mimics anyway... - */ + + /* + * We won't bother with beehives, morgues, barracks, throne rooms + * since they shouldn't contain too many mimics anyway... + */ + } else if (rt >= SHOPBASE) { s_sym = get_shop_item(rt - SHOPBASE); if (s_sym < 0) { @@ -2254,6 +2256,11 @@ register struct monst *mtmp; current_fruit is equivalent to creating an instance of that fruit (no-op if a fruit of this type has actually been made) */ flags.made_fruit = TRUE; + } else if (ap_type == M_AP_FURNITURE && appear == S_altar) { + int algn = rn2(3) - 1; /* -1 (A_Cha) or 0 (A_Neu) or +1 (A_Law) */ + + newmcorpsenm(mtmp); + MCORPSENM(mtmp) = (Inhell && rn2(3)) ? AM_NONE : Align2amask(algn); } else if (has_mcorpsenm(mtmp)) { /* don't retain stale value from a previously mimicked shape */ MCORPSENM(mtmp) = NON_PM; diff --git a/src/pager.c b/src/pager.c index 77cff068b..7f14b0ffb 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pager.c $NHDT-Date: 1574011494 2019/11/17 17:24:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.161 $ */ +/* NetHack 3.6 pager.c $NHDT-Date: 1574722864 2019/11/25 23:01:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.162 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -477,17 +477,24 @@ char *buf, *monbuf; Strcpy(buf, def_warnsyms[warnindx].explanation); } else if (!glyph_is_cmap(glyph)) { Strcpy(buf, "unexplored area"); - } else + } else { + int amsk; + aligntyp algn; + switch (glyph_to_cmap(glyph)) { case S_altar: + amsk = ((mtmp = m_at(x, y)) != 0 && has_mcorpsenm(mtmp) + && M_AP_TYPE(mtmp) == M_AP_FURNITURE + && mtmp->mappearance == S_altar) ? MCORPSENM(mtmp) + : levl[x][y].altarmask; + algn = Amask2align(amsk & ~AM_SHRINE); Sprintf(buf, "%s %saltar", /* like endgame high priests, endgame high altars are only recognizable when immediately adjacent */ (Is_astralevel(&u.uz) && distu(x, y) > 2) ? "aligned" - : align_str( - Amask2align(levl[x][y].altarmask & ~AM_SHRINE)), - ((levl[x][y].altarmask & AM_SHRINE) + : align_str(algn), + ((amsk & AM_SHRINE) != 0 && (Is_astralevel(&u.uz) || Is_sanctum(&u.uz))) ? "high " : ""); @@ -522,7 +529,7 @@ char *buf, *monbuf; Strcpy(buf, defsyms[glyph_to_cmap(glyph)].explanation); break; } - + } return (pm && !Hallucination) ? pm : (struct permonst *) 0; } From 7fcccdf5c6ebba566d9a60f29604cf6fe13b8c7d Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 25 Nov 2019 22:47:54 -0500 Subject: [PATCH 325/529] linux-hosted msdos cross-compiler updates --- sys/msdos/Makefile1.cross | 27 ++++++-------- sys/msdos/Makefile2.cross | 8 ++--- sys/msdos/msdos-cross-compile.sh | 60 ++++++++++++++++---------------- sys/unix/hints/linux | 4 --- 4 files changed, 45 insertions(+), 54 deletions(-) diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index 06053ab71..d00d19852 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -319,7 +319,7 @@ $(DAT)/nhdat: $(U)dlb_main $(DAT)/data $(DAT)/rumors \ cd $(DAT); \ pwd; \ cp $(MSYS)/msdoshlp.txt .; \ - ls -1 data oracles options quest.dat rumors help hh >dlb.lst; \ + ls -1 data oracles options rumors help hh >dlb.lst; \ ls -1 cmdhelp history opthelp wizhelp license >>dlb.lst; \ ls -1 bogusmon engrave epitaph tribute msdoshlp.txt >>dlb.lst; \ ls -1 *.lua >>dlb.lst; \ @@ -363,11 +363,6 @@ $(DAT)/rumors: $(HOST_O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal $(DAT)/oracles: $(HOST_O)utility.tag $(DAT)/oracles.txt $(U)makedefs -h -ifndef LUA_QTEXT_FILE -$(DAT)/quest.dat: $(HOST_O)utility.tag $(DAT)/quest.txt - $(U)makedefs -q -endif - $(DAT)/bogusmon: $(HOST_O)utility.tag $(DAT)/bogusmon.txt $(U)makedefs -s @@ -560,30 +555,30 @@ clean: spotless: clean if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi; -# if [ -f $(U)dgn_flex.c ]; then rm $(U)dgn_flex.c; fi; -# if [ -f $(U)dgn_lex.c ]; then rm $(U)dgn_lex.c; fi; +## if [ -f $(U)dgn_flex.c ]; then rm $(U)dgn_flex.c; fi; +## if [ -f $(U)dgn_lex.c ]; then rm $(U)dgn_lex.c; fi; # if [ -f $(U)makedefs ]; then rm $(U)makedefs; fi; -# if [ -f $(U)dgn_comp ]; then rm $(U)dgn_comp; fi; +## if [ -f $(U)dgn_comp ]; then rm $(U)dgn_comp; fi; # if [ -f $(U)recover.exe ]; then rm $(U)recover.exe; fi; # if [ -f $(U)tilemap ]; then rm $(U)tilemap; fi; # if [ -f $(U)tile2bmp ]; then rm $(U)tile2bmp; fi; -# if [ -f $(U)tile2bin ]; then rm $(U)tile2bin; fi; -# if [ -f $(U)til2bin2 ]; then rm $(U)til2bin2; fi; -# if [ -f $(U)thintile ]; then rm $(U)thintile; fi; +## if [ -f $(U)tile2bin ]; then rm $(U)tile2bin; fi; +## if [ -f $(U)til2bin2 ]; then rm $(U)til2bin2; fi; +## if [ -f $(U)thintile ]; then rm $(U)thintile; fi; # if [ -f $(U)dlb_main ]; then rm $(U)dlb_main; fi; # if [ -f $(INCL)/vis_tab.h ]; then rm $(INCL)/vis_tab.h; fi; # if [ -f $(INCL)/onames.h ]; then rm $(INCL)/onames.h; fi; # if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi; # if [ -f $(INCL)/date.h ]; then rm $(INCL)/date.h; fi; -# if [ -f $(INCL)/dgn_comp.h ]; then rm $(INCL)/dgn_comp.h; fi; -# if [ -f $(INCL)/lev_comp.h ]; then rm $(INCL)/lev_comp.h; fi; +## if [ -f $(INCL)/dgn_comp.h ]; then rm $(INCL)/dgn_comp.h; fi; +## if [ -f $(INCL)/lev_comp.h ]; then rm $(INCL)/lev_comp.h; fi; # if [ -f $(SRC)/vis_tab.c ]; then rm $(SRC)/vis_tab.c; fi; # if [ -f $(SRC)/tile.c ]; then rm $(SRC)/tile.c; fi; # if [ -f $(DAT)/options ]; then rm $(DAT)/options; fi; # if [ -f $(DAT)/data ]; then rm $(DAT)/data; fi; # if [ -f $(DAT)/rumors ]; then rm $(DAT)/rumors; fi; -# if [ -f $(DAT)/dungeon.pdf ]; then rm $(DAT)/dungeon.pdf; fi; -# if [ -f $(DAT)/dungeon ]; then rm $(DAT)/dungeon; fi; +## if [ -f $(DAT)/dungeon.pdf ]; then rm $(DAT)/dungeon.pdf; fi; +## if [ -f $(DAT)/dungeon ]; then rm $(DAT)/dungeon; fi; # if [ -f $(DAT)/oracles ]; then rm $(DAT)/oracles; fi; ## if [ -f $(DAT)/quest.dat ]; then rm $(DAT)/quest.dat; fi; # if [ -f $(DAT)/bogusmon ]; then rm $(DAT)/bogusmon; fi; diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index dcb148a6e..f9a848e13 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -38,10 +38,10 @@ GAMEDIR =../msdos-binary # your machine. # ADD_CURSES=Y -PDCURSES_TOP=../../pdcurses +PDCURSES_TOP=../lib/pdcurses # Set top of djgpp if not specified through ENV variables prior to make: -#DJGPP_TOP = $(HOME)/djgpp +#DJGPP_TOP = $(HOME)/lib/djgpp #--------------------------------------------------------------- # Location of LUA @@ -83,9 +83,9 @@ WSHR = ../win/share # Executables. ifndef DJGPP_TOP ifdef TRAVIS_BUILD_DIR -DJGPP_TOP = TRAVIS_BUILD_DIR/djgpp +DJGPP_TOP = TRAVIS_BUILD_DIR/lib/djgpp else -DJGPP_TOP = $(HOME)/djgpp +DJGPP_TOP = $(HOME)/lib/djgpp endif endif diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh index 1edf7b147..7516d1937 100644 --- a/sys/msdos/msdos-cross-compile.sh +++ b/sys/msdos/msdos-cross-compile.sh @@ -1,9 +1,15 @@ #!/bin/sh #set -x + if [ -z "$TRAVIS_BUILD_DIR" ]; then - export DJGPP_TOP=$(pwd)/djgpp + export DJGPP_TOP=$(pwd)/lib/djgpp else - export DJGPP_TOP="$TRAVIS_BUILD_DIR/djgpp" + export DJGPP_TOP="$TRAVIS_BUILD_DIR/lib/djgpp" +fi + +if [ ! -d "$(pwd)/lib" ]; then + echo "Set up for Unix build and 'make fetch-lua' first." + exit 1 fi DJGPP_URL="https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/" @@ -25,7 +31,11 @@ DJGPP_URL="$DJGPP_URL$DJGPP_FILE" # export -cd util +if [ ! -d lib]; then +mkdir -p lib +fi + +cd lib if [ ! -f "$DJGPP_FILE" ]; then if [ "$(uname)" = "Darwin" ]; then #Mac @@ -34,45 +44,38 @@ if [ ! -f "$DJGPP_FILE" ]; then wget --no-hsts "$DJGPP_URL" fi fi -cd ../ - -if [ ! -d ../djgpp/i586-pc-msdosdjgpp ]; then - tar xjf "util/$DJGPP_FILE" -fi - -#echo after tar -# cd ../ - -#pwd - -# PDCurses -if [ ! -d "../pdcurses" ]; then - echo "Getting ../pdcurses from https://github.com/wmcbrine/PDCurses.git" - git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses +if [ ! -d djgpp/i586-pc-msdosdjgpp ]; then + tar xjf "$DJGPP_FILE" + rm $DJGPP_FILE fi # DOS-extender for use with djgpp -cd djgpp -if [ ! -d cwsdpmi ]; then +if [ ! -d djgpp/cwsdpmi ]; then if [ "$(uname)" = "Darwin" ]; then #Mac curl http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip -o csdpmi7b.zip else wget --no-hsts http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip fi + cd djgpp mkdir -p cwsdpmi cd cwsdpmi unzip ../csdpmi7b.zip - cd ../ + cd ../../ rm csdpmi7b.zip fi + +# PDCurses +if [ ! -d "pdcurses" ]; then + echo "Getting ../pdcurses from https://github.com/wmcbrine/PDCurses.git" ; \ + git clone --depth 1 https://github.com/wmcbrine/PDCurses.git pdcurses +fi + cd ../ - #echo after dos extender - cd src mkdir -p ../msdos-binary @@ -93,16 +96,13 @@ make -f ../sys/msdos/Makefile2.cross unset GCC_EXEC_PREFIX #pwd -#ls ../djgpp/cwsdpmi/bin -#ls . - -if [ -f ../djgpp/cwsdpmi/bin/CWSDPMI.EXE ]; then - cp ../djgpp/cwsdpmi/bin/CWSDPMI.EXE ../msdos-binary/CWSDPMI.EXE; +if [ -f ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE ]; then + cp ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE ../msdos-binary/CWSDPMI.EXE; fi # ls -l ../msdos-binary cd ../msdos-binary -zip -9 ../NH370DOS.ZIP * +zip -9 ../lib/NH370DOS.ZIP * cd ../ -# ls -l NH370DOS.ZIP +ls -l lib/NH370DOS.ZIP diff --git a/sys/unix/hints/linux b/sys/unix/hints/linux index bcafe1cf1..dcdee332d 100644 --- a/sys/unix/hints/linux +++ b/sys/unix/hints/linux @@ -55,7 +55,3 @@ CHGRP=true VARDIRPERM = 0755 VARFILEPERM = 0600 GAMEPERM = 0755 - -CC=clang -CFLAGS+=-fsanitize=address -fno-omit-frame-pointer -LFLAGS+=-fsanitize=address -fno-omit-frame-pointer From 36983e6889da4282bc64db419fc68a02ad1079aa Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 26 Nov 2019 00:02:38 -0500 Subject: [PATCH 326/529] more msdos cross-compile fixes undefined reference to g.variables if certain parts of drawing.c are included in host-side utilities, so surround the offending code in -> #if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET) --- src/drawing.c | 2 + sys/msdos/Makefile1.cross | 67 +++++++++++++++----------------- sys/msdos/msdos-cross-compile.sh | 2 +- 3 files changed, 35 insertions(+), 36 deletions(-) diff --git a/src/drawing.c b/src/drawing.c index 1bf81102e..8a97c4496 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -291,6 +291,7 @@ char ch; return i; } +#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET) /* * Explanations of the functions found below: * @@ -810,5 +811,6 @@ const struct symparse loadsyms[] = { { SYM_OTH, SYM_HERO_OVERRIDE + SYM_OFF_X, "S_hero_override" }, { 0, 0, (const char *) 0 } /* fence post */ }; +#endif /* !CROSSCOMPILE || CROSSCOMPILE_TARGET */ /*drawing.c*/ diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index d00d19852..8c9324076 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -145,11 +145,9 @@ TEXTIO = $(HOST_O)tiletext.o $(HOST_O)tiletxt.o $(HOST_O)drawing.o $(HOST_O TEXTIO2 = $(HOST_O)tiletex2.o $(HOST_O)tiletxt2.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \ $(HOST_O)objects.o -#PLANAR_TIB = $(DAT)/NETHACK1.TIB -#OVERVIEW_TIB = $(DAT)/NETHACKO.TIB TILE_BMP = $(DAT)/NHTILES.BMP -TILEUTIL = $(TILOBJ) $(U)tile2bin $(U)til2bin2 $(TILE_BMP) $(PLANAR_TIB) $(OVERVIEW_TIB) +TILEUTIL = $(TILOBJ) $(TILE_BMP) TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt @@ -255,7 +253,7 @@ LFLAGS = #========================================== $(HOST_O)%.o : $(SRC)/%.c - $(HOST_CC) $(cflags) -o$@ $< + $(HOST_CC) $(cflags) -o$@ $< #========================================== # Rules for host files in sys/msdos @@ -303,8 +301,7 @@ $(HOST_O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \ tileutil: $(U)gif2txt $(U)txt2ppm @echo Optional tile development utilities are up to date. -$(HOST_O)prereq.tag: hobj.tag $(U)makedefs $(HOST_O)utility.tag \ - $(HOST_O)thintile.tag $(DAT)/nhdat +$(HOST_O)prereq.tag: hobj.tag $(U)makedefs $(HOST_O)utility.tag $(DAT)/nhdat echo prereq done >$@ #========================================== @@ -418,17 +415,17 @@ $(HOST_O)tilemap.o: $(WSHR)/tilemap.c $(HACK_H) $(TILE_H) # Required for tile support #========================================== -$(DAT)/NetHack1.tib: $(TILEFILES) $(U)tile2bin - @echo Creating binary tile files - cd $(DAT) - $(U)tile2bin - cd $(SRC) +#$(DAT)/NetHack1.tib: $(TILEFILES) $(U)tile2bin +# @echo Creating binary tile files +# cd $(DAT) +# $(U)tile2bin +# cd $(SRC) -$(DAT)/NetHacko.tib: $(HOST_O)thintile.tag $(TILEFILES2) $(U)til2bin2 - @echo Creating overview binary tile files - cd $(DAT) - $(U)til2bin2 - cd $(SRC) +#$(DAT)/NetHacko.tib: $(HOST_O)thintile.tag $(TILEFILES2) $(U)til2bin2 +# @echo Creating overview binary tile files +# cd $(DAT) +# $(U)til2bin2 +# cd $(SRC) $(DAT)/NHTILES.BMP: $(TILEFILES) $(U)tile2bmp @echo Creating binary tile files which may take some time @@ -441,39 +438,39 @@ $(U)tile2bmp: $(HOST_O)tile2bmp.o $(TEXTIO) ar r temp.a $(TEXTIO) $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bmp.o temp.a -$(U)tile2bin: $(HOST_O)tile2bin.o $(TEXTIO) - -rm -f temp.a - ar r temp.a $(TEXTIO) - $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bin.o temp.a +#$(U)tile2bin: $(HOST_O)tile2bin.o $(TEXTIO) +# -rm -f temp.a +# ar r temp.a $(TEXTIO) +# $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bin.o temp.a -$(U)til2bin2: $(HOST_O)til2bin2.o $(TEXTIO2) - -rm -f temp.a - ar r temp.a $(TEXTIO2) - $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)til2bin2.o temp.a +#$(U)til2bin2: $(HOST_O)til2bin2.o $(TEXTIO2) +# -rm -f temp.a +# ar r temp.a $(TEXTIO2) +# $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)til2bin2.o temp.a -$(U)thintile: $(HOST_O)thintile.o - $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)thintile.o +#$(U)thintile: $(HOST_O)thintile.o +# $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)thintile.o #$(HOST_O)thintile.o: $(HACK_H) $(WSHR)/tile.h $(WSHR)/thintile.c # -rm -f temp.a # ar r temp.a $(TEXTIO) # $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bmp.o temp.a -$(HOST_O)thintile.o: $(HACK_H) $(WSHR)/tile.h $(WSHR)/thintile.c - $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE -DOVERVIEW_FILE -o$@ $(WSHR)/thintile.c +#$(HOST_O)thintile.o: $(HACK_H) $(WSHR)/tile.h $(WSHR)/thintile.c +# $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE -DOVERVIEW_FILE -o$@ $(WSHR)/thintile.c -$(HOST_O)thintile.tag: $(U)thintile $(TILEFILES) - $(U)thintile - echo thintiles created >$@ +#$(HOST_O)thintile.tag: $(U)thintile $(TILEFILES) +# $(U)thintile +# echo thintiles created >$@ $(HOST_O)tile2bmp.o: $(HACK_H) $(TILE_H) $(WSHR)/tile2bmp.c $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(WSHR)/tile2bmp.c -$(HOST_O)tile2bin.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c - $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/tile2bin.c +#$(HOST_O)tile2bin.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c +# $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/tile2bin.c -$(HOST_O)til2bin2.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c - $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE_X=8 -DOVERVIEW_FILE -o$@ $(MSYS)/tile2bin.c +#$(HOST_O)til2bin2.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c +# $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE_X=8 -DOVERVIEW_FILE -o$@ $(MSYS)/tile2bin.c $(HOST_O)tiletext.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tiletext.c $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(WSHR)/tiletext.c diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh index 7516d1937..4df9fc3cf 100644 --- a/sys/msdos/msdos-cross-compile.sh +++ b/sys/msdos/msdos-cross-compile.sh @@ -31,7 +31,7 @@ DJGPP_URL="$DJGPP_URL$DJGPP_FILE" # export -if [ ! -d lib]; then +if [ ! -d lib ]; then mkdir -p lib fi From 5f75048386c66a21b87652ab93963fb4741d559a Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 26 Nov 2019 00:34:57 -0500 Subject: [PATCH 327/529] another msdos cross-compile bit --- sys/msdos/msdos-cross-compile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh index 4df9fc3cf..4dd7ee617 100644 --- a/sys/msdos/msdos-cross-compile.sh +++ b/sys/msdos/msdos-cross-compile.sh @@ -47,7 +47,7 @@ fi if [ ! -d djgpp/i586-pc-msdosdjgpp ]; then tar xjf "$DJGPP_FILE" - rm $DJGPP_FILE + rm -f $DJGPP_FILE fi # DOS-extender for use with djgpp @@ -61,7 +61,7 @@ if [ ! -d djgpp/cwsdpmi ]; then cd djgpp mkdir -p cwsdpmi cd cwsdpmi - unzip ../csdpmi7b.zip + unzip ../../csdpmi7b.zip cd ../../ rm csdpmi7b.zip fi From 1e22743b5641072b5094d009b5d4e1b9aeb7dd64 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 26 Nov 2019 19:06:45 -0500 Subject: [PATCH 328/529] msdos cross-compile bits --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index e2522cfa9..5c7ef79b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,6 +84,15 @@ matrix: - cd src - cp ../sys/winnt/Makefile.gcc ./Makefile - mingw32-make install + - os: linux + env: DESCR=msdos-cross-on-linux HINTS=linux LUA_VERSION=5.3.5 + compiler: gcc + script: +# - export + - cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ + - make fetch-lua + - cd lib/lua-$LUA_VERSION/src && make a && cd ../../.. + - sh sys/msdos/msdos-cross-compile.sh exclude: # - os: osx # osx_image: xcode10.3 From 45290941385e4f28b06d8fb86ab9db5b88bef7fc Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 26 Nov 2019 19:26:49 -0500 Subject: [PATCH 329/529] prepare branch for travis-ci --- .travis.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5c7ef79b8..a8aa59d41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,11 +4,11 @@ matrix: - os: linux env: DESCR=linux-xenial-gcc HINTS=linux compiler: gcc - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make install" + script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make fetch-lua && make install" - os: linux env: DESCR=linux-xenial-clang HINTS=linux compiler: clang - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make install" + script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make fetch-lua && make install" - os: linux env: DESCR=linux-xenial-gcc-x11 HINTS=linux-x11 compiler: gcc @@ -18,7 +18,7 @@ matrix: - libx11-dev - libxaw7-dev - xfonts-utils - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make install" + script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make fetch-lua && make install" - os: linux env: DESCR=linux-xenial-gcc-qt5 HINTS=linux-qt5 compiler: gcc @@ -31,7 +31,7 @@ matrix: - qtbase5-dev - qtmultimedia5-dev - qtbase5-dev-tools - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && QT_SELECT=5 make MOC=moc install" + script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && QT_SELECT=5 && make fetch-lua && make MOC=moc install" - os: linux env: DESCR=linux-bionic-gcc-x11 HINTS=linux-x11 dist: bionic @@ -42,7 +42,7 @@ matrix: - libx11-dev - libxaw7-dev - xfonts-utils - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make install" + script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make fetch-lua && make install" - os: linux env: DESCR=linux-xenial-gcc-minimal HINTS=linux-minimal compiler: gcc @@ -67,8 +67,18 @@ matrix: sed -i '/^#define SHELL/d' include/unixconf.h sed -i '/^#define SUSPEND/d' include/unixconf.h sed -i 's/^#define TEXTCOLOR//' include/unixconf.h - make install + make fetch-lua && make install cat dat/options + - os: linux + env: DESCR=msdos-cross-on-linux HINTS=linux LUA_VERSION=5.3.5 + compiler: gcc + script: +# - export + - cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ + - make fetch-lua + - cd lib/lua-$LUA_VERSION/src && make a && cd ../../.. + - sh sys/msdos/msdos-cross-compile.sh + exclude: - os: windows env: DESCR=windows-visualstudio language: shell @@ -84,16 +94,6 @@ matrix: - cd src - cp ../sys/winnt/Makefile.gcc ./Makefile - mingw32-make install - - os: linux - env: DESCR=msdos-cross-on-linux HINTS=linux LUA_VERSION=5.3.5 - compiler: gcc - script: -# - export - - cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ - - make fetch-lua - - cd lib/lua-$LUA_VERSION/src && make a && cd ../../.. - - sh sys/msdos/msdos-cross-compile.sh - exclude: # - os: osx # osx_image: xcode10.3 # env: DESCR=osx-xcode10.3-x11 HINTS=macosx10.14 WANT_WIN_CURSES=1 WANT_WIN_X11=1 USE_XPM=1 From 2a78011030b5037d016a7390064f5147f57858b9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 26 Nov 2019 19:35:46 -0500 Subject: [PATCH 330/529] instructional doc bit --- sys/unix/NewInstall.unx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/unix/NewInstall.unx b/sys/unix/NewInstall.unx index b9daf361d..163df601c 100644 --- a/sys/unix/NewInstall.unx +++ b/sys/unix/NewInstall.unx @@ -23,11 +23,16 @@ If you are using the traditional configuration system, see Install.unx. cd $Top/sys/unix sh setup.sh hints/NAME_OF_HINTS_FILE cd ../.. + make fetch-Lua make all If the build fails, remove all the generated files before retrying the build with: cd $Top; make spotless + The 'make fetch-Lua' step really only needs to be done one time unless + your sources get refreshed, or the lib folder and its contents get + removed. + 4. Install: Depending on your configuration, this step may or may not need to be done as root; check the hints file. From 865607a39271b8138e8e769ed9e812f6c1b1e65c Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 26 Nov 2019 19:27:00 -0800 Subject: [PATCH 331/529] 3.7 Unix Makefiles Copy lib/lua-$(VERSION)/src/liblua.h to lib/lua/ rather than lib/. Instead of copying any of the header files or telling the compiler where to find the lua ones, generate include/nhlua.h on the fly and restrict the knowledge of where they are to it (paths are relative to include/). |/* nhlua.h - generated by top Makefile */ |#include "../lib/lua-5.3.5/src/lua.h" |LUA_API int (lua_error) (lua_State *L) NORETURN; |#include "../lib/lua-5.3.5/src/lualib.h" |#include "../lib/lua-5.3.5/src/lauxlib.h" |/*nhlua.h*/ This might need to be redone (or augmented by having CFLAGS add back '-I path-to-lua') if some compiler can't find '#include "luaconf.h"' issued by lua.h. --- include/system.h | 7 +++---- src/nhlua.c | 3 +-- sys/unix/Makefile.src | 14 +++++--------- sys/unix/Makefile.top | 28 ++++++++++++++-------------- 4 files changed, 23 insertions(+), 29 deletions(-) diff --git a/include/system.h b/include/system.h index 265f46f98..60437f0bc 100644 --- a/include/system.h +++ b/include/system.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 system.h $NHDT-Date: 1550268586 2019/02/15 22:09:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.17 $ */ +/* NetHack 3.6 system.h $NHDT-Date: 1574825213 2019/11/27 03:26:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2017. */ /* NetHack may be freely redistributed. See license for details. */ @@ -570,9 +570,7 @@ E int FDECL(atoi, (const char *)); #endif /* WIN32 */ #if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET) -#include "lua.h" -#include "lualib.h" -#include "lauxlib.h" +#include "nhlua.h" #if defined(WIN32) #define LUA_INTCAST(i) ((int) i) @@ -580,4 +578,5 @@ E int FDECL(atoi, (const char *)); #define LUA_INTCAST(i) (i) #endif #endif /* !CROSSCOMPILE || CROSSCOMPILE_TARGET */ + #endif /* SYSTEM_H */ diff --git a/src/nhlua.c b/src/nhlua.c index 73431fc7f..a8f33ca8e 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 nhlua.c $NHDT-Date: 1574646949 2019/11/25 01:55:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.8 $ */ +/* NetHack 3.6 nhlua.c $NHDT-Date: 1574825214 2019/11/27 03:26:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */ /* Copyright (c) 2018 by Pasi Kallinen */ /* NetHack may be freely redistributed. See license for details. */ @@ -37,7 +37,6 @@ nhl_error(L, msg) lua_State *L; const char *msg; { - extern int FDECL(lua_error, (lua_State *)) NORETURN; lua_Debug ar; char buf[BUFSZ]; diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 4e580ba2c..18323ccb2 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -1,5 +1,5 @@ # NetHack Makefile. -# NetHack 3.6 Makefile.src $NHDT-Date: 1574713234 2019/11/25 20:20:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.76 $ +# NetHack 3.6 Makefile.src $NHDT-Date: 1574825214 2019/11/27 03:26:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.77 $ # Copyright (c) 2018 by Pasi Kallinen # NetHack may be freely redistributed. See license for details. @@ -49,7 +49,7 @@ SHELL=/bin/sh # for UNIX systems SYSSRC = ../sys/share/ioctl.c ../sys/share/unixtty.c ../sys/unix/unixmain.c \ ../sys/unix/unixunix.c ../sys/unix/unixres.c -SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o unixres.o ../lib/liblua.a +SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o unixres.o ../lib/lua/liblua.a # # for Systos # SYSSRC = ../sys/atari/tos.c ../sys/share/pcmain.c ../sys/share/pcsys.c \ @@ -173,7 +173,6 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome #CFLAGS = -O -I../include #LFLAGS = -CFLAGS += -I../lib # -lm required by lua LIBS += -lm @@ -506,9 +505,6 @@ HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h botl.h \ HSOURCES = $(HACKINCL) date.h onames.h pm.h vis_tab.h dgn_file.h -# relative to src -LUA_HEADERS = ../lib/lua.h ../lib/luaconf.h ../lib/lualib.h ../lib/lauxlib.h - # the following .o's _must_ be made before any others (for makedefs) FIRSTOBJ = monst.o objects.o @@ -589,7 +585,7 @@ DUMB.Setup: ../include/extern.h all: $(GAME) -lib/liblua.a $(LUA_HEADERS): +../lib/lua/liblua.a ../include/nhlua.h: @( cd .. ; $(MAKE) lua_support ) # dependencies for makedefs and its outputs, which the util @@ -724,7 +720,7 @@ clean: spotless: clean -rm -f a.out core $(GAME) Sys* - -rm -f ../lib/liblua.a $(LUA_HEADERS) + -rm -f ../lib/lua/liblua.a ../include/nhlua.h -rm -f ../include/date.h ../include/onames.h ../include/pm.h -rm -f ../include/vis_tab.h vis_tab.c tile.c *.moc -rm -f ../win/gnome/gn_rip.h @@ -757,7 +753,7 @@ $(CONFIG_H): ../include/config.h ../include/config1.h ../include/tradstdc.h \ ../include/micro.h ../include/pcconf.h ../include/tosconf.h \ ../include/amiconf.h ../include/macconf.h ../include/beconf.h \ ../include/wceconf.h ../include/ntconf.h \ - ../lib/lua.h ../lib/luaconf.h ../lib/lualib.h ../lib/lauxlib.h + ../include/nhlua.h touch $(CONFIG_H) # hack.h timestamp $(HACK_H): ../include/hack.h $(CONFIG_H) ../include/lint.h ../include/align.h \ diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index da01f1a95..9d930aaa1 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -1,5 +1,5 @@ # NetHack Top-level Makefile. -# NetHack 3.6 Makefile.top $NHDT-Date: 1574713236 2019/11/25 20:20:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.42 $ +# NetHack 3.6 Makefile.top $NHDT-Date: 1574825215 2019/11/27 03:26:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.43 $ # Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland # NetHack may be freely redistributed. See license for details. @@ -94,21 +94,21 @@ DATNODLB = $(VARDATND) license symbols DATDLB = $(DATHELP) dungeon.lua tribute $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) DAT = $(DATNODLB) $(DATDLB) -LUA_HEADERS = lib/lua.h lib/luaconf.h lib/lualib.h lib/lauxlib.h -lua_support: lib/liblua.a $(LUA_HEADERS) +lua_support: lib/lua/liblua.a include/nhlua.h @true -lib/liblua.a: lib/lua-$(LUA_VERSION)/src/liblua.a - @( cd lib/lua-$(LUA_VERSION)/src ; make a ; cd ../../.. ) +lib/lua-$(LUA_VERSION)/src/liblua.a: lib/lua-$(LUA_VERSION)/src/lua.h + ( cd lib/lua-$(LUA_VERSION)/src ; make a ; cd ../../.. ) +lib/lua/liblua.a: lib/lua-$(LUA_VERSION)/src/liblua.a + @( if [ ! -d lib/lua ] ; then mkdir -p lib/lua ; fi ) cp lib/lua-$(LUA_VERSION)/src/liblua.a $@ -lib/lua.h: lib/lua-$(LUA_VERSION)/src/lua.h - sed -e '/(lua_error)/s/;/ NORETURN;/' \ - < lib/lua-$(LUA_VERSION)/src/lua.h > $@ -lib/luaconf.h: lib/lua-$(LUA_VERSION)/src/luaconf.h - cp lib/lua-$(LUA_VERSION)/src/luaconf.h $@ -lib/lualib.h: lib/lua-$(LUA_VERSION)/src/lualib.h - cp lib/lua-$(LUA_VERSION)/src/lualib.h $@ -lib/lauxlib.h: lib/lua-$(LUA_VERSION)/src/lauxlib.h - cp lib/lua-$(LUA_VERSION)/src/lauxlib.h $@ +include/nhlua.h: lib/lua/liblua.a + echo '/* nhlua.h - generated by top Makefile */' > $@ + @echo '#include "../lib/lua-$(LUA_VERSION)/src/lua.h"' >> $@ + @sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' \ + < lib/lua-$(LUA_VERSION)/src/lua.h >> $@ + @echo '#include "../lib/lua-$(LUA_VERSION)/src/lualib.h"' >> $@ + @echo '#include "../lib/lua-$(LUA_VERSION)/src/lauxlib.h"' >> $@ + @echo '/*nhlua.h*/' >> $@ $(GAME): lua_support ( cd src ; $(MAKE) ) From 503b97960b37eabfbc54cc235a4d4462dbd8b255 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 01:25:17 -0500 Subject: [PATCH 332/529] windows Makefile updates --- sys/winnt/Makefile.gcc | 15 +++- sys/winnt/Makefile.msc | 191 +++-------------------------------------- 2 files changed, 26 insertions(+), 180 deletions(-) diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 1b10a0395..ef7f9ca0b 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -100,7 +100,7 @@ TARGET_CPU=x86 # your machine. # # ADD_CURSES=Y -# PDCURSES_TOP=../../pdcurses +# PDCURSES_TOP=../lib/pdcurses #4b Qt # @@ -137,7 +137,7 @@ TARGET_CPU=x86 # successfully build NetHack-3.7. # ADD_LUA=Y -LUATOP=../../lua-5.3.5 +LUATOP=../lib/lua-5.3.5 # #============================================================================== # This marks the end of the BUILD DECISIONS section. @@ -746,7 +746,7 @@ default : install all : install -install: initialchk $(O)utility.tag $(GAMEDIR)/NetHack.exe $(NETHACKW_EXE) \ +install: $(INCL)/nhlua.h initialchk $(O)utility.tag $(GAMEDIR)/NetHack.exe $(NETHACKW_EXE) \ $(O)install.tag $(EXTRA_FILES) @echo NetHack is up to date. @echo Done. @@ -795,6 +795,15 @@ $(O)utility.tag: $(INCL)/date.h $(INCL)/onames.h $(INCL)/pm.h \ $(subst /,\,@echo utilities made >$@) @echo utilities made. +$(INCL)/nhlua.h: + echo '/* nhlua.h - generated by top Makefile */' > $@ + @echo '#include "../lib/lua-$(LUA_VERSION)/src/lua.h"' >> $@ + @sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' \ + < lib/lua-$(LUA_VERSION)/src/lua.h >> $@ + @echo '#include "../lib/lua-$(LUA_VERSION)/src/lualib.h"' >> $@ + @echo '#include "../lib/lua-$(LUA_VERSION)/src/lauxlib.h"' >> $@ + @echo '/*nhlua.h*/' >> $@ + tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe @echo Optional tile development utilities are up to date. diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 33ae60bac..04459b5ca 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -99,7 +99,7 @@ GAMEDIR = ..\binary # Default game build directory # of your PDCurses C files. # #ADD_CURSES=Y -#PDCURSES_TOP=..\..\pdcurses +#PDCURSES_TOP=..\lib\pdcurses # #------------------------------------------------------------------------------ # OPTIONAL - zlib support (to allow compressed savefile exchange across platforms @@ -108,7 +108,7 @@ GAMEDIR = ..\binary # Default game build directory # # #ADD_ZLIB=Y -#ZLIBTOP=..\..\zlib +#ZLIBTOP=..\lib\zlib # #------------------------------------------------------------------------------ # 4. Do you want debug information available to the executable? @@ -143,7 +143,7 @@ DEBUGINFO = Y # successfully build NetHack-3.7. You cannot build a functional # version of NetHack-3.7 Work-in-progress without including Lua. # -LUATOP=..\..\lua-5.3.5 +LUATOP=..\lib\lua-5.3.5 # # #============================================================================== @@ -252,14 +252,6 @@ MAKESRC = $(U)makedefs.c MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o -!IFDEF OBSOLETE_LEVEL_COMPILER -LEVCOMPOBJS = $(O)lev_yacc.o $(O)lev_lex.o $(O)lev_main.o \ - $(O)alloc.o $(O)decl.o $(O)drawing.o $(O)monst.o $(O)objects.o $(O)panic.o -!ENDIF - -DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_lex.o $(O)dgn_main.o \ - $(O)alloc.o $(O)panic.o - RECOVOBJS = $(O)recover.o TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt @@ -503,9 +495,6 @@ HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\align.h $(INCL)\context.h \ LEV_H = $(INCL)\lev.h DGN_FILE_H = $(INCL)\dgn_file.h -!IFDEF OBSOLETE_LEVEL_COMPILER -LEV_COMP_H = $(INCL)\lev_comp.h -!ENDIF SP_LEV_H = $(INCL)\sp_lev.h TILE_H = ..\win\share\tile.h @@ -1025,52 +1014,22 @@ recover: $(U)recover.exe if exist $(U)recover.exe copy $(U)recover.exe $(GAMEDIR) if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR)\recover.txt -!IFDEF OBSOLETE_LEVEL_COMPILER -$(O)sp_lev.tag: $(O)utility.tag $(DAT)\bigroom.des $(DAT)\castle.des \ - $(DAT)\endgame.des $(DAT)\gehennom.des $(DAT)\knox.des \ - $(DAT)\medusa.des $(DAT)\oracle.des $(DAT)\tower.des \ - $(DAT)\yendor.des $(DAT)\arch.des $(DAT)\barb.des \ - $(DAT)\caveman.des $(DAT)\healer.des $(DAT)\knight.des \ - $(DAT)\monk.des $(DAT)\priest.des $(DAT)\ranger.des \ - $(DAT)\rogue.des $(DAT)\samurai.des $(DAT)\sokoban.des \ - $(DAT)\tourist.des $(DAT)\valkyrie.des $(DAT)\wizard.des - cd $(DAT) - $(U)levcomp bigroom.des - $(U)levcomp castle.des - $(U)levcomp endgame.des - $(U)levcomp gehennom.des - $(U)levcomp knox.des - $(U)levcomp mines.des - $(U)levcomp medusa.des - $(U)levcomp oracle.des - $(U)levcomp sokoban.des - $(U)levcomp tower.des - $(U)levcomp yendor.des - $(U)levcomp arch.des - $(U)levcomp barb.des - $(U)levcomp caveman.des - $(U)levcomp healer.des - $(U)levcomp knight.des - $(U)levcomp monk.des - $(U)levcomp priest.des - $(U)levcomp ranger.des - $(U)levcomp rogue.des - $(U)levcomp samurai.des - $(U)levcomp tourist.des - $(U)levcomp valkyrie.des - $(U)levcomp wizard.des - cd $(SRC) - echo sp_levs done > $(O)sp_lev.tag -!ELSE $(O)sp_lev.tag: echo sp_levs done > $(O)sp_lev.tag -!ENDIF -$(O)utility.tag: $(INCL)\date.h $(INCL)\onames.h $(INCL)\pm.h \ +$(O)utility.tag: $(INCL)\nhlua.h $(INCL)\date.h $(INCL)\onames.h $(INCL)\pm.h \ $(SRC)\vis_tab.c $(INCL)\vis_tab.h $(TILEUTIL16) @echo utilities made >$@ @echo utilities made. +$(INCL)\nhlua.h: + @echo /* nhlua.h - generated by Makefile */ > $@ + @echo #include "../lib/lua-$(LUAVER)/src/lua.h" >> $@ + @echo LUA_API int (lua_error) (lua_State *L) NORETURN; >> $@ + @echo #include "../lib/lua-$(LUAVER)/src/lualib.h" >> $@ + @echo #include "../lib/lua-$(LUAVER)/src/lauxlib.h" >> $@ + @echo /*nhlua.h*/ >> $@ + tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe @echo Optional tile development utilities are up to date. @@ -1185,74 +1144,6 @@ $(MSWIN)\splash.bmp: $(U)uudecode.exe $(MSWIN)\splash.uu ..\..\util\uudecode.exe splash.uu chdir ..\..\src -#================================================= -# Level Compiler Stuff -#================================================= -# -# defer to the steps in ..\win\win32\levstuff.mak -# - -!IFDEF OBSOLETE_LEVEL_COMPILER -$(U)lev_yacc.c: $(U)lev_comp.y - nmake -nologo -f ..\win\win32\levstuff.mak $(U)lev_yacc.c - -$(U)lev_lex.c: $(U)lev_comp.l - nmake -nologo -f ..\win\win32\levstuff.mak $(U)lev_lex.c - -$(INCL)\lev_comp.h: - nmake -nologo -f ..\win\win32\levstuff.mak $(INCL)\lev_comp.h - -$(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h $(U)lev_yacc.c - @$(cc) $(cflagsBuild) -Fo$@ $(U)lev_yacc.c - -$(O)lev_lex.o: $(HACK_H) $(INCL)\lev_comp.h $(SP_LEV_H) $(U)lev_lex.c - @$(cc) $(cflagsBuild) -Fo$@ $(U)lev_lex.c - -$(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H) - @$(cc) $(cflagsBuild) -Fo$@ $(U)lev_main.c - -$(U)levcomp.exe: $(LEVCOMPOBJS) - @echo Linking $(@:\=/) - @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk - $(LEVCOMPOBJS:^ =^ - ) -<< -!ENDIF - -#================================================= -# Dungeon Compiler Stuff -#================================================= -# -!IFDEF OBSOLETE_DGN_COMPILER -# defer to the steps in ..\win\win32\dgnstuff.mak -# -$(U)dgn_yacc.c: $(U)dgn_comp.y - nmake -nologo -f ..\win\win32\dgnstuff.mak $(U)dgn_yacc.c - -$(INCL)\dgn_comp.h: - nmake -nologo -f ..\win\win32\dgnstuff.mak $(INCL)\dgn_comp.h - -$(U)dgn_lex.c: $(U)dgn_comp.l - nmake -nologo -f ..\win\win32\dgnstuff.mak $(U)dgn_lex.c - -$(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h $(U)dgn_yacc.c - @$(cc) $(cflagsBuild) -Fo$@ $(U)dgn_yacc.c - -$(O)dgn_lex.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h \ - $(U)dgn_lex.c - @$(cc) $(cflagsBuild) -Fo$@ $(U)dgn_lex.c - -$(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c - @$(cc) $(cflagsBuild) -Fo$@ $(U)dgn_main.c - -$(U)dgncomp.exe: $(DGNCOMPOBJS) - @echo Linking $(@:\=/) - @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk - $(DGNCOMPOBJS:^ =^ - ) -<< -!ENDIF - #================================================= # Create directory for holding object files #================================================= @@ -1339,9 +1230,6 @@ nhdat$(NHV): $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ echo history >>dlb.lst echo opthelp >>dlb.lst echo wizhelp >>dlb.lst -!IFDEF OBSOLETE_DGN_COMPILER - echo dungeon >>dlb.lst -!ENDIF echo license >>dlb.lst echo engrave >>dlb.lst echo epitaph >>dlb.lst @@ -1570,51 +1458,12 @@ spotless: clean if exist $(DAT)\ttyoptions del $(DAT)\ttyoptions if exist $(DAT)\guioptions del $(DAT)\guioptions if exist $(DAT)\data del $(DAT)\data -!IFDEF OBSOLETE_DGN_COMPILER - if exist $(DAT)\dungeon del $(DAT)\dungeon - if exist $(DAT)\dungeon.pdf del $(DAT)\dungeon.pdf -!ENDIF -!IFDEF OBSOLETE_LEVEL_COMPILER - if exist $(DAT)\???-fil?.lev del $(DAT)\???-fil?.lev - if exist $(DAT)\???-goal.lev del $(DAT)\???-goal.lev - if exist $(DAT)\???-loca.lev del $(DAT)\???-loca.lev - if exist $(DAT)\???-strt.lev del $(DAT)\???-strt.lev - if exist $(DAT)\air.lev del $(DAT)\air.lev - if exist $(DAT)\asmodeus.lev del $(DAT)\asmodeus.lev - if exist $(DAT)\astral.lev del $(DAT)\astral.lev - if exist $(DAT)\baalz.lev del $(DAT)\baalz.lev - if exist $(DAT)\bigrm-*.lev del $(DAT)\bigrm-*.lev - if exist $(DAT)\castle.lev del $(DAT)\castle.lev - if exist $(DAT)\earth.lev del $(DAT)\earth.lev - if exist $(DAT)\fakewiz?.lev del $(DAT)\fakewiz?.lev - if exist $(DAT)\fire.lev del $(DAT)\fire.lev - if exist $(DAT)\juiblex.lev del $(DAT)\juiblex.lev - if exist $(DAT)\knox.lev del $(DAT)\knox.lev - if exist $(DAT)\medusa-?.lev del $(DAT)\medusa-?.lev - if exist $(DAT)\mine*.lev del $(DAT)\mine*.lev - if exist $(DAT)\oracle.lev del $(DAT)\oracle.lev - if exist $(DAT)\orcus.lev del $(DAT)\orcus.lev - if exist $(DAT)\sanctum.lev del $(DAT)\sanctum.lev - if exist $(DAT)\soko?-?.lev del $(DAT)\soko?-?.lev - if exist $(DAT)\tower?.lev del $(DAT)\tower?.lev - if exist $(DAT)\valley.lev del $(DAT)\valley.lev - if exist $(DAT)\water.lev del $(DAT)\water.lev - if exist $(DAT)\wizard?.lev del $(DAT)\wizard?.lev -!ENDIF + clean: if exist $(O)*.o del $(O)*.o + if exist $(INCL)\nhlua.h del $(INCL)\nhlua.h if exist $(O)utility.tag del $(O)utility.tag if exist $(U)makedefs.exe del $(U)makedefs.exe -!IFDEF OBSOLETE_LEVEL_COMPILER - if exist $(U)levcomp.exe del $(U)levcomp.exe - if exist $(O)levcomp.MAP del $(O)levcomp.MAP - if exist $(O)levcomp.PDB del $(O)levcomp.PDB -!ENDIF -!IFDEF OBSOLETE_DGN_COMPILER - if exist $(U)dgncomp.exe del $(U)dgncomp.exe - if exist $(O)dgncomp.MAP del $(O)dgncomp.MAP - if exist $(O)dgncomp.PDB del $(O)dgncomp.PDB -!ENDIF if exist $(SRC)\*.lnk del $(SRC)\*.lnk if exist $(SRC)\*.map del $(SRC)\*.map if exist $(O)install.tag del $(O)install.tag @@ -1645,18 +1494,6 @@ clean: if exist $(O)sp_lev.tag del $(O)sp_lev.tag if exist $(O)uudecode.MAP del $(O)uudecode.MAP if exist $(O)uudecode.PDB del $(O)uudecode.PDB -!IFDEF OBSOLETE_LEVEL_COMPILER - rem - rem defer to the steps in ..\win\win32\levstuff.mak - rem - nmake -nologo -f ..\win\win32\levstuff.mak clean -!ENDIF -!IFDEF OBSOLETE_DGN_COMPILER - rem - rem defer to the steps in ..\win\win32\dgnstuff.mak - rem - nmake -nologo -f ..\win\win32\dgnstuff.mak clean -!ENDIF if exist $(TILEBMP16) del $(TILEBMP16) if exist $(TILEBMP32) del $(TILEBMP32) From c9d298ee6ccd5478aad591a99fb654e909c89cd2 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 01:34:53 -0500 Subject: [PATCH 333/529] Windows mingw Makefile updates --- sys/winnt/Makefile.gcc | 52 ++---------------------------------------- 1 file changed, 2 insertions(+), 50 deletions(-) diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index ef7f9ca0b..58cf34eb6 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -752,9 +752,6 @@ install: $(INCL)/nhlua.h initialchk $(O)utility.tag $(GAMEDIR)/NetHack.exe $(NET @echo Done. $(O)install.tag: $(DAT)/data $(DAT)/rumors $(DAT)/oracles \ -ifndef LUA_QTEXT_FILE - $(DAT)/quest.dat \ -endif $(O)sp_lev.tag $(DLB) ifdef TRAVIS_COMPILER ls -l $(SRC) @@ -798,8 +795,7 @@ $(O)utility.tag: $(INCL)/date.h $(INCL)/onames.h $(INCL)/pm.h \ $(INCL)/nhlua.h: echo '/* nhlua.h - generated by top Makefile */' > $@ @echo '#include "../lib/lua-$(LUA_VERSION)/src/lua.h"' >> $@ - @sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' \ - < lib/lua-$(LUA_VERSION)/src/lua.h >> $@ + @echo 'LUA_API int (lua_error) (lua_State *L) NORETURN;' >>$@ @echo '#include "../lib/lua-$(LUA_VERSION)/src/lualib.h"' >> $@ @echo '#include "../lib/lua-$(LUA_VERSION)/src/lauxlib.h"' >> $@ @echo '/*nhlua.h*/' >> $@ @@ -934,11 +930,6 @@ $(DAT)/data: $(O)utility.tag $(DATABASE) $(DAT)/rumors: $(O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal $(subst /,\,$(U)makedefs -r) -ifndef LUA_QTEXT_FILE -$(DAT)/quest.dat: $(O)utility.tag $(DAT)/quest.txt - $(subst /,\,$(U)makedefs -q) -endif - $(DAT)/oracles: $(O)utility.tag $(DAT)/oracles.txt $(subst /,\,$(U)makedefs -h) @@ -1044,9 +1035,6 @@ $(DAT)/porthelp: $(MSWSYS)/porthelp $(subst /,\,@copy $(MSWSYS)/porthelp $@ >nul) nhdat$(NHV): $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \ -ifndef LUA_QTEXT_FILE - $(DAT)/quest.dat \ -endif $(DAT)/rumors $(DAT)/help $(DAT)/hh $(DAT)/cmdhelp $(DAT)/keyhelp \ $(DAT)/history $(DAT)/opthelp $(DAT)/wizhelp \ $(DAT)/porthelp $(DAT)/license $(DAT)/engrave \ @@ -1057,9 +1045,6 @@ endif $(subst /,\,if exist $(DAT)/ttyoptions echo ttyoptions >>$(DAT)/dlb.lst) $(subst /,\,if exist $(DAT)/guioptions echo guioptions >>$(DAT)/dlb.lst) $(subst /,\,if exist $(DAT)/porthelp echo porthelp >>$(DAT)/dlb.lst) -ifndef LUA_QTEXT_FILE - $(subst /,\,echo quest.dat >>$(DAT)/dlb.lst) -endif $(subst /,\,echo rumors >>$(DAT)/dlb.lst) $(subst /,\,echo help >>$(DAT)/dlb.lst) $(subst /,\,echo hh >>$(DAT)/dlb.lst) @@ -1221,46 +1206,12 @@ ifneq "$(W_DAT)" "" if exist $(W_DAT)\bogusmon del $(W_DAT)\bogusmon if exist $(W_DAT)\oracles del $(W_DAT)\oracles if exist $(W_DAT)\rumors del $(W_DAT)\rumors -ifndef LUA_QTEXT_FILE - if exist $(W_DAT)\quest.dat del $(W_DAT)\quest.dat -endif -ifdef OBSOLETE_DGN_COMPILER - if exist $(W_DAT)\dungeon del $(W_DAT)\dungeon - if exist $(W_DAT)\dungeon.pdf del $(W_DAT)\dungeon.pdf -endif if exist $(W_DAT)\data del $(W_DAT)\data if exist $(W_DAT)\options del $(W_DAT)\options if exist $(W_DAT)\ttyoptions del $(W_DAT)\ttyoptions if exist $(W_DAT)\guioptions del $(W_DAT)\guioptions if exist $(W_DAT)\dlb.lst del $(W_DAT)\dlb.lst if exist $(W_DAT)\porthelp del $(W_DAT)\porthelp -ifdef OBSOLETE_LEVEL_COMPILER - if exist $(W_DAT)\???-fil?.des del $(W_DAT)\???-fil?.des - if exist $(W_DAT)\???-goal.des del $(W_DAT)\???-goal.des - if exist $(W_DAT)\???-loca.des del $(W_DAT)\???-loca.des - if exist $(W_DAT)\???-strt.des del $(W_DAT)\???-strt.des - if exist $(W_DAT)\air.des del $(W_DAT)\air.des - if exist $(W_DAT)\asmodeus.des del $(W_DAT)\asmodeus.des - if exist $(W_DAT)\astral.des del $(W_DAT)\astral.des - if exist $(W_DAT)\baalz.des del $(W_DAT)\baalz.des - if exist $(W_DAT)\bigrm-*.des del $(W_DAT)\bigrm-*.des - if exist $(W_DAT)\castle.des del $(W_DAT)\castle.des - if exist $(W_DAT)\earth.des del $(W_DAT)\earth.des - if exist $(W_DAT)\fakewiz?.des del $(W_DAT)\fakewiz?.des - if exist $(W_DAT)\fire.des del $(W_DAT)\fire.des - if exist $(W_DAT)\juiblex.des del $(W_DAT)\juiblex.des - if exist $(W_DAT)\knox.des del $(W_DAT)\knox.des - if exist $(W_DAT)\medusa-?.des del $(W_DAT)\medusa-?.des - if exist $(W_DAT)\mine*.des del $(W_DAT)\mine*.des - if exist $(W_DAT)\oracle.des del $(W_DAT)\oracle.des - if exist $(W_DAT)\orcus.des del $(W_DAT)\orcus.des - if exist $(W_DAT)\sanctum.des del $(W_DAT)\sanctum.des - if exist $(W_DAT)\soko?-?.des del $(W_DAT)\soko?-?.des - if exist $(W_DAT)\tower?.des del $(W_DAT)\tower?.des - if exist $(W_DAT)\valley.des del $(W_DAT)\valley.des - if exist $(W_DAT)\water.des del $(W_DAT)\water.des - if exist $(W_DAT)\wizard?.des del $(W_DAT)\wizard?.des -endif endif ifneq "$(W_OBJ)" "" if exist $(W_OBJ)\sp_lev.tag del $(W_OBJ)\sp_lev.tag @@ -1310,6 +1261,7 @@ endif clean: if exist initialchk del initialchk + if exist $(W_INCL)\nhlua.h del $(W_INCL)\nhlua.h if exist $(O)install.tag del $(O)install.tag if exist $(O)utility.tag del $(O)utility.tag ifneq "$(W_UTIL)" "" From 8af0c59bdb963a1b7d054eef96ccca0fe486561c Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 07:59:36 -0500 Subject: [PATCH 334/529] another windows Makefile bit --- sys/winnt/Makefile.msc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 04459b5ca..064398ce6 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -834,7 +834,7 @@ default : install all : install -install: $(O)envchk.tag $(O)obj.tag $(O)utility.tag $(GAMEDIR)\NetHack.exe $(GAMEDIR)\NetHackW.exe $(O)install.tag +install: $(INCL)\nhlua.h $(O)envchk.tag $(O)obj.tag $(O)utility.tag $(GAMEDIR)\NetHack.exe $(GAMEDIR)\NetHackW.exe $(O)install.tag @echo Done. #========================================== From 5ae52803a70442949e2022eff3ac9662a3b270f6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 11:07:41 -0500 Subject: [PATCH 335/529] visual studio project updates --- win/win32/vs2017/NetHack.vcxproj | 1 + win/win32/vs2017/aftermakedefs.proj | 1 - win/win32/vs2017/dirs.props | 6 +- win/win32/vs2017/files.props | 246 ++++++++++++++-------------- win/win32/vs2017/makedefs.vcxproj | 14 +- 5 files changed, 138 insertions(+), 130 deletions(-) diff --git a/win/win32/vs2017/NetHack.vcxproj b/win/win32/vs2017/NetHack.vcxproj index e12110c19..565e21794 100644 --- a/win/win32/vs2017/NetHack.vcxproj +++ b/win/win32/vs2017/NetHack.vcxproj @@ -257,6 +257,7 @@ + diff --git a/win/win32/vs2017/aftermakedefs.proj b/win/win32/vs2017/aftermakedefs.proj index 31a965de3..52af2a8be 100644 --- a/win/win32/vs2017/aftermakedefs.proj +++ b/win/win32/vs2017/aftermakedefs.proj @@ -11,7 +11,6 @@ - diff --git a/win/win32/vs2017/dirs.props b/win/win32/vs2017/dirs.props index bd1c09da8..bc951911e 100644 --- a/win/win32/vs2017/dirs.props +++ b/win/win32/vs2017/dirs.props @@ -10,7 +10,7 @@ $(RootDir)dat\ $(RootDir)doc\ $(RootDir)include\ - $(RootDir)..\LUA-5.3.5\src\ + $(RootDir)lib\lua-5.3.5\src\ $(RootDir)src\ $(RootDir)sys\ $(RootDir)util\ @@ -23,7 +23,7 @@ $(ObjDir) $(RootDir)win\curses\ - - $(RootDir)..\PDCurses\ + + $(RootDir)bin\PDCurses\ diff --git a/win/win32/vs2017/files.props b/win/win32/vs2017/files.props index a88fc5bfa..c388b6898 100644 --- a/win/win32/vs2017/files.props +++ b/win/win32/vs2017/files.props @@ -11,140 +11,137 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -178,7 +175,6 @@ - diff --git a/win/win32/vs2017/makedefs.vcxproj b/win/win32/vs2017/makedefs.vcxproj index 20b9ea338..accc0f964 100644 --- a/win/win32/vs2017/makedefs.vcxproj +++ b/win/win32/vs2017/makedefs.vcxproj @@ -50,6 +50,18 @@ + + + + + + + + + @@ -59,4 +71,4 @@ - \ No newline at end of file + From 9b42e32c3b208aa4220f54642953d4d7dc58e469 Mon Sep 17 00:00:00 2001 From: Fredrik Ljungdahl Date: Wed, 27 Nov 2019 16:44:17 +0100 Subject: [PATCH 336/529] Fix alternate number pad interpretation only working for diagonals This fixes the issue brought up at https://www.reddit.com/r/nethack/comments/dv3pae/curses_and_the_numberpad/?st=k3hgply6&sh=dbc2bf7d . I don't know why the "regular" (tty) method doesn't seem to work for him, but I'm going to chalk it up to a PDCurses oddity. What I do know, however, is that the alternate method I added a year ago or maybe longer, that allows numpad usage even with number_pad:0 (to retain the default keybindings in case an user is used to them, while keeping number pad behaviour making sense, similar to NetHack4+friends) was only partially implemented, for some reason. This adds the rest of the keys, meaning that this means of key interpretation should be more realible. KEY_A2/B1/B3/C2 are not standard keys in the Curses documentation, and is thus behind an ifdef -- but PDCurses, amongst other implementations, makes use of them. As a side effect, Home/End/PgUp/PgDn are now interpreted as diagonal movement, since some terminals interpret number_pad keys that way. I do not consider this a problem since they went unused in normal gameplay anyway (This does not interfere with menus or similar). --- win/curses/cursmisc.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/win/curses/cursmisc.c b/win/curses/cursmisc.c index a158b221c..d0655efa1 100644 --- a/win/curses/cursmisc.c +++ b/win/curses/cursmisc.c @@ -873,6 +873,9 @@ curses_convert_keys(int key) readchar() and stripping the value down to 0..255 yields ^G! */ ret = C('H'); break; +#ifdef KEY_B1 + case KEY_B1: +#endif case KEY_LEFT: if (iflags.num_pad) { ret = '4'; @@ -880,6 +883,9 @@ curses_convert_keys(int key) ret = 'h'; } break; +#ifdef KEY_B3 + case KEY_B3: +#endif case KEY_RIGHT: if (iflags.num_pad) { ret = '6'; @@ -887,6 +893,9 @@ curses_convert_keys(int key) ret = 'l'; } break; +#ifdef KEY_A2 + case KEY_A2: +#endif case KEY_UP: if (iflags.num_pad) { ret = '8'; @@ -894,6 +903,9 @@ curses_convert_keys(int key) ret = 'k'; } break; +#ifdef KEY_C2 + case KEY_C2: +#endif case KEY_DOWN: if (iflags.num_pad) { ret = '2'; @@ -903,40 +915,44 @@ curses_convert_keys(int key) break; #ifdef KEY_A1 case KEY_A1: +#endif + case KEY_HOME: if (iflags.num_pad) { ret = '7'; } else { ret = 'y'; } break; -#endif /* KEY_A1 */ #ifdef KEY_A3 case KEY_A3: +#endif + case KEY_PPAGE: if (iflags.num_pad) { ret = '9'; } else { ret = 'u'; } break; -#endif /* KEY_A3 */ #ifdef KEY_C1 case KEY_C1: +#endif + case KEY_END: if (iflags.num_pad) { ret = '1'; } else { ret = 'b'; } break; -#endif /* KEY_C1 */ #ifdef KEY_C3 case KEY_C3: +#endif + case KEY_NPAGE: if (iflags.num_pad) { ret = '3'; } else { ret = 'n'; } break; -#endif /* KEY_C3 */ #ifdef KEY_B2 case KEY_B2: if (iflags.num_pad) { From 8e1891f3bb9013b28b209e0b0a0fd167ca6fd69e Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 11:22:11 -0500 Subject: [PATCH 337/529] another visual studio update - dirs.props --- win/win32/vs2017/dirs.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win/win32/vs2017/dirs.props b/win/win32/vs2017/dirs.props index bc951911e..8e884b1d0 100644 --- a/win/win32/vs2017/dirs.props +++ b/win/win32/vs2017/dirs.props @@ -2,7 +2,7 @@ $(MSBuildProjectDirectory)\..\..\..\ - $(RootDir)bin\$(Configuration)\$(Platform)\ + $(RootDir)binary\$(Configuration)\$(Platform)\ $(ProjectDir)obj\$(Configuration)\$(Platform)\$(TargetName)\ $(ProjectDir)symbols\$(Configuration)\$(Platform)\$(TargetName)\ $(RootDir)tools\$(Configuration)\$(Platform)\ @@ -23,7 +23,7 @@ $(ObjDir) $(RootDir)win\curses\ - - $(RootDir)bin\PDCurses\ + + $(RootDir)lib\PDCurses\ From cc3152dc9a183a58dc543ecade66942e99701ec4 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 27 Nov 2019 09:53:40 -0800 Subject: [PATCH 338/529] ignore 3.7 file if present --- include/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/include/.gitignore b/include/.gitignore index 4906e6ce8..a08c9d752 100644 --- a/include/.gitignore +++ b/include/.gitignore @@ -7,3 +7,4 @@ dgn_comp.h lev_comp.h tile.h win32api.h +nhlua.h From c1dad9bb251ff75ff36ab21c9c1387f504dc39c4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 13:19:45 -0500 Subject: [PATCH 339/529] more lib subfolder updates --- sys/vms/Install.vms | 53 ++++++++++++++++++++++---------------------- sys/vms/vmsbuild.com | 18 +++++++++++++-- 2 files changed, 43 insertions(+), 28 deletions(-) diff --git a/sys/vms/Install.vms b/sys/vms/Install.vms index 057f73f9f..91fb0eeed 100644 --- a/sys/vms/Install.vms +++ b/sys/vms/Install.vms @@ -16,39 +16,40 @@ structure. You should set up a directory--referred to as "top" below and in some of the assorted files, but which may be a subdirectory-- that has these subdirectories - [.dat] -- data files - [.doc] -- documentation files - [.include] -- C header files - [.src] -- primary source files - [.sys] -- parent for [.sys.*] - [.sys .share] -- files shared by several ports, including VMS - [.sys .vms] -- VMS-specific source and support files - [.util] -- sources for essential utility programs - [.win] -- parent for [.win.*] - [.win .tty] -- "window" routines for ordinary terminals + [.dat] -- data files + [.doc] -- documentation files + [.include] -- C header files + [.lib .lua535] -- Lua distribution from https://www.lua.org/ + [.src] -- primary source files + [.sys] -- parent for [.sys.*] + [.sys .share] -- files shared by several ports, including VMS + [.sys .vms] -- VMS-specific source and support files + [.util] -- sources for essential utility programs + [.win] -- parent for [.win.*] + [.win .tty] -- "window" routines for ordinary terminals (including terminal windows on workstations) The following subdirectories may be present, but are not useful for building NetHack on VMS and are not required: - [.sys .amiga] -- AmigaDOS - [.sys .atari] -- Atari TOS - [.sys .be] -- BeBox BeOS - [.sys .mac] -- Macintosh - [.sys .msdos] -- MSDOS for IBM PCs and compatibles - [.sys .os2] -- OS/2 + [.sys .amiga] -- AmigaDOS + [.sys .atari] -- Atari TOS + [.sys .be] -- BeBox BeOS + [.sys .mac] -- Macintosh + [.sys .msdos] -- MSDOS for IBM PCs and compatibles + [.sys .os2] -- OS/2 [.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 .sys] -- ditto - [.sys .winnt] -- Windows NT - [.win .gem] -- window routines for Atari/GEM - [.win .gnome] -- window routines for Unix/GNOME - [.win .Qt] -- window routines for Qt - [.win .share] -- "tile" graphic support - [.win .win32] -- Windows NT and Windows CE - [.win .X11] -- window routines for X-Windows; requires X11R4 - or later and MIT's Athena Widget set + [.sys .winnt] -- Windows NT + [.win .gem] -- window routines for Atari/GEM + [.win .gnome] -- window routines for Unix/GNOME + [.win .Qt] -- window routines for Qt + [.win .share] -- "tile" graphic support + [.win .win32] -- Windows NT and Windows CE + [.win .X11] -- window routines for X-Windows; requires X11R4 + or later and MIT's Athena Widget set You must arrange things in this structure or the supplied procedures and instructions in this file will not work properly. Several DCL command files are present in the [.sys.vms] subdirectory and will not diff --git a/sys/vms/vmsbuild.com b/sys/vms/vmsbuild.com index 5ff0385b9..d2cc5033f 100755 --- a/sys/vms/vmsbuild.com +++ b/sys/vms/vmsbuild.com @@ -34,8 +34,8 @@ $ gnuc_ = "GCC" $ if f$type(gcc).eqs."STRING" then gnuc_ = gcc $ gnulib = "gnu_cc:[000000]gcclib/Library" !(not used w/ vaxc) $ ! common CC options (/obj=file doesn't work for GCC 1.36, use rename instead) -$ ! c_c_ = "/INCLUDE=([-.INCLUDE],[-.-.LUA535.SRC])/DEFINE=(""LUA_USE_C89"",""LUA_32BITS"")" -$ c_c_ = "/INCLUDE=([-.INCLUDE],[-.-.LUA535.SRC])/DEFINE=(""LUA_USE_C89"")" +$ ! c_c_ = "/INCLUDE=([-.INCLUDE],[-.LIB.LUA535.SRC])/DEFINE=(""LUA_USE_C89"",""LUA_32BITS"")" +$ c_c_ = "/INCLUDE=([-.INCLUDE],[-.LIB.LUA535.SRC])/DEFINE=(""LUA_USE_C89"")" $ veryold_vms = f$extract(1,1,f$getsyi("VERSION")).eqs."4" - .and. f$extract(3,3,f$getsyi("VERSION")).lts."6" $ if veryold_vms then c_c_ = c_c_ + "/DEFINE=(""VERYOLD_VMS"")" @@ -251,6 +251,20 @@ $ interface = ttysrc !default $ if p5.eqs."CURSES" then interface = cursessrc $ if p5.eqs."TTY+CURSES" then interface = ttysrc + "," + cursessrc $ if p5.eqs."CURSES+TTY" then interface = cursessrc + "," + ttysrc + +$ if f$search("[-.include]nhlua.h").eqs."" +$ then +$ create [-.include]nhlua.h !empty +$ set file/att=(RFM:STM) [-.include]nhlua.h +$ open/Append f [-.include]nhlua.h +$ write f "/* nhlua.h - generated by vmsbuild.com */" +$ write f "#include ""[-.lib.lua535.src]lua.h""" +$ write f "LUA_API int (lua_error) (lua_State *L) NORETURN;" +$ write f "#include ""[-.lib.lua535.src]lualib.h""" +$ write f "#include ""[-.lib.lua535.src]lauxlib.h""" +$ write f "/*nhlua.h*/" +$ close f +$ endif $! $! create object library $! From 48852b085713e98da736eb6629f7286be3ae1f10 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 13:48:25 -0500 Subject: [PATCH 340/529] missed a part of vmsbuild.com --- sys/vms/vmsbuild.com | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/vms/vmsbuild.com b/sys/vms/vmsbuild.com index d2cc5033f..cacf60126 100755 --- a/sys/vms/vmsbuild.com +++ b/sys/vms/vmsbuild.com @@ -325,19 +325,19 @@ $ gosub compile_list $! $! 3.7 runtime LUA level parser/loader $! -$ c_list = "[-.-.LUA535.SRC]lapi,[-.-.LUA535.SRC]lauxlib,[-.-.LUA535.SRC]lbaselib" - - + ",[-.-.LUA535.SRC]lbitlib,[-.-.LUA535.SRC]lcode,[-.-.LUA535.SRC]lcorolib" - - + ",[-.-.LUA535.SRC]lctype,[-.-.LUA535.SRC]ldblib,[-.-.LUA535.SRC]ldebug" - - + ",[-.-.LUA535.SRC]ldo,[-.-.LUA535.SRC]ldump,[-.-.LUA535.SRC]lfunc" - - + ",[-.-.LUA535.SRC]lgc,[-.-.LUA535.SRC]linit,[-.-.LUA535.SRC]liolib" - - + ",[-.-.LUA535.SRC]llex" +$ c_list = "[-.lib.lua535.src]lapi,[-.lib.lua535.src]lauxlib,[-.lib.lua535.src]lbaselib" - + + ",[-.lib.lua535.src]lbitlib,[-.lib.lua535.src]lcode,[-.lib.lua535.src]lcorolib" - + + ",[-.lib.lua535.src]lctype,[-.lib.lua535.src]ldblib,[-.lib.lua535.src]ldebug" - + + ",[-.lib.lua535.src]ldo,[-.lib.lua535.src]ldump,[-.lib.lua535.src]lfunc" - + + ",[-.lib.lua535.src]lgc,[-.lib.lua535.src]linit,[-.lib.lua535.src]liolib" - + + ",[-.lib.lua535.src]llex" $ gosub compile_list -$ c_list = "[-.-.LUA535.SRC]lmathlib,[-.-.LUA535.SRC]lmem,[-.-.LUA535.SRC]loadlib" - - + ",[-.-.LUA535.SRC]lobject,[-.-.LUA535.SRC]lopcodes,[-.-.LUA535.SRC]loslib" - - + ",[-.-.LUA535.SRC]lparser,[-.-.LUA535.SRC]lstate,[-.-.LUA535.SRC]lstring" - - + ",[-.-.LUA535.SRC]lstrlib,[-.-.LUA535.SRC]ltable,[-.-.LUA535.SRC]ltablib" - - + ",[-.-.LUA535.SRC]ltm,[-.-.LUA535.SRC]lundump,[-.-.LUA535.SRC]lutf8lib" - - + ",[-.-.LUA535.SRC]lvm,[-.-.LUA535.SRC]lzio" +$ c_list = "[-.lib.lua535.src]lmathlib,[-.lib.lua535.src]lmem,[-.lib.lua535.src]loadlib" - + + ",[-.lib.lua535.src]lobject,[-.lib.lua535.src]lopcodes,[-.lib.lua535.src]loslib" - + + ",[-.lib.lua535.src]lparser,[-.lib.lua535.src]lstate,[-.lib.lua535.src]lstring" - + + ",[-.lib.lua535.src]lstrlib,[-.lib.lua535.src]ltable,[-.lib.lua535.src]ltablib" - + + ",[-.lib.lua535.src]ltm,[-.lib.lua535.src]lundump,[-.lib.lua535.src]lutf8lib" - + + ",[-.lib.lua535.src]lvm,[-.lib.lua535.src]lzio" $ gosub compile_list $! $link: From 2492cde10ffb0496907572371446a2eec7a7c120 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 13:53:57 -0500 Subject: [PATCH 341/529] another lib bit --- sys/msdos/Makefile.GCC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index a265b791e..3d0a4a729 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -50,7 +50,7 @@ PDCURSES_TOP=../../pdcurses # successfully build NetHack-3.7. # ADD_LUA=Y -LUATOP=../../lua-535 +LUATOP=../lib/lua535 # #============================================================================== From e94b6996b464b2495f31a3192bcd1fbf9cb020e6 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Tue, 26 Nov 2019 18:42:19 -0500 Subject: [PATCH 342/529] This is cron-daily v1-Nov-24-2019. files updated: Files --- Files | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Files b/Files index 3ed296ec1..c69bcbc8a 100644 --- a/Files +++ b/Files @@ -7,7 +7,8 @@ from or not transferred to your system if you wish. .: (files in top directory) -.clang-format .travis.yml Files Porting README +.clang-format .travis.yml Cross-compiling Files +Porting README DEVEL: (files for people developing changes to NetHack) @@ -53,7 +54,7 @@ keyhelp knox.lua license medusa-1.lua medusa-2.lua medusa-3.lua medusa-4.lua minefill.lua minend-1.lua minend-2.lua minend-3.lua mines.des minetn-1.lua minetn-2.lua minetn-3.lua minetn-4.lua minetn-5.lua minetn-6.lua minetn-7.lua nhlib.lua -opthelp oracle.lua oracles.txt orcus.lua quest.txt +opthelp oracle.lua oracles.txt orcus.lua quest.lua rumors.fal rumors.tru sanctum.lua soko1-1.lua soko1-2.lua soko2-1.lua soko2-2.lua soko3-1.lua soko3-2.lua soko4-1.lua soko4-2.lua symbols tower1.lua tower2.lua tower3.lua @@ -172,8 +173,9 @@ msdos.c msdoshlp.txt ovlinit.c pckeys.c pctiles.c pctiles.h pcvideo.h portio.h schema1.BC schema2.BC schema3.MSC setup.bat -tile2bin.c vesa.h video.c -vidtxt.c vidvesa.c vidvga.c +sysconf tile2bin.c vesa.h +video.c vidtxt.c vidvesa.c +vidvga.c (files for running MSDOS binary under Windows) nhico.uu nhpif.uu From 0c98a30b8d81fb46e799fe30d46bd876168ad4f6 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 27 Nov 2019 11:24:23 -0800 Subject: [PATCH 343/529] fix part of #H9467 - clairvoyance vs sensed mons When a monster is drawn on the map, remove any "remembered, unseen monster" glyph being shown at the same spot. Clairvoyance shows all monsters in vicinty, then ones which can't be seen are replaced with the 'I' glyph (which is on the object layer or the display, not the monster layer show is subject to different update behavior). But subsequent monster refresh didn't get rid of it when a sensed monster was displayed over it. (3.6.1 included a similar fix for warned-of monsters.) Also during clairvoyance, don't draw an 'I' at a spot that will immediately be refreshed with a monster because 'I' clobbers any remembered object at the same location. --- doc/fixes36.3 | 10 +++++++++- src/detect.c | 11 ++++++++--- src/display.c | 33 +++++++++++++++++++++++---------- 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 238f156ca..4dd283b4d 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.191 $ $NHDT-Date: 1574722861 2019/11/25 23:01:01 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.192 $ $NHDT-Date: 1574882658 2019/11/27 19:24:18 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -306,6 +306,14 @@ look-at of mimics mimicking altars got an arbitary alignment from misuse of underlying terrain polymorph_sink creating an altar passed a call to rn2() as an argument to a macro which evaluates its parameter more than once +if a monster (presumably sensed but not seen) was displayed at a location + showing "remembered, unseen monster", remove that since hero now knows + something else is there (3.6.1 had similar fix for warned-of monsters) +clairvoyance showed all monsters in range, then after player viewed the map, + replaced them with "remembered, unseen monster" glyph and finally + did a normal monster refresh; the 'I' glyph step clobbers remembered + object at same spot, so skip it for locations where monster refresh + is going to immediately redisplay a monster unix: fix double DLB definition in linux hints file windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix diff --git a/src/detect.c b/src/detect.c index 8ddf0a061..574a85b7b 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 detect.c $NHDT-Date: 1562630266 2019/07/08 23:57:46 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.96 $ */ +/* NetHack 3.6 detect.c $NHDT-Date: 1574882659 2019/11/27 19:24:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.99 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1416,8 +1416,13 @@ struct obj *sobj; /* scroll--actually fake spellbook--object */ continue; newglyph = glyph_at(zx, zy); if (glyph_is_monster(newglyph) - && glyph_to_mon(newglyph) != PM_LONG_WORM_TAIL) - map_invisible(zx, zy); + && glyph_to_mon(newglyph) != PM_LONG_WORM_TAIL) { + /* map_invisible() was unconditional here but that made + remembered objects be forgotten for the case where a + monster is immediately redrawn by see_monsters() */ + if ((mtmp = m_at(zx, zy)) == 0 || !canspotmon(mtmp)) + map_invisible(zx, zy); + } } see_monsters(); diff --git a/src/display.c b/src/display.c index e09e9ff45..722c25818 100644 --- a/src/display.c +++ b/src/display.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 display.c $NHDT-Date: 1573934698 2019/11/16 20:04:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.107 $ */ +/* NetHack 3.6 display.c $NHDT-Date: 1574882660 2019/11/27 19:24:20 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.108 $ */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ @@ -123,6 +123,7 @@ */ #include "hack.h" +STATIC_DCL void FDECL(show_mon_or_warn, (int, int, int)); STATIC_DCL void FDECL(display_monster, (XCHAR_P, XCHAR_P, struct monst *, int, XCHAR_P)); STATIC_DCL int FDECL(swallow_to_glyph, (int, int)); @@ -361,6 +362,25 @@ int x, y, show; _map_location(x, y, show); } +/* display something on monster layer; may need to fixup object layer */ +STATIC_OVL void +show_mon_or_warn(x, y, monglyph) +int x, y, monglyph; +{ + struct obj *o; + + /* "remembered, unseen monster" is tracked by object layer so if we're + putting something on monster layer at same spot, stop remembering + that; if an object is in view there, start remembering it instead */ + if (glyph_is_invisible(levl[x][y].glyph)) { + unmap_object(x, y); + if (cansee(x, y) && (o = vobj_at(x, y)) != 0) + map_object(o, FALSE); + } + + show_glyph(x, y, monglyph); +} + #define DETECTED 2 #define PHYSICALLY_SEEN 1 #define is_worm_tail(mon) ((mon) && ((x != (mon)->mx) || (y != (mon)->my))) @@ -477,7 +497,7 @@ xchar worm_tail; /* mon is actually a worm tail */ else num = mon_to_glyph(mon, rn2_on_display_rng); } - show_glyph(x, y, num); + show_mon_or_warn(x, y, num); } } @@ -507,14 +527,7 @@ register struct monst *mon; impossible("display_warning did not match warning type?"); return; } - /* warning glyph is drawn on the monster layer; unseen - monster glyph is drawn on the object/trap/floor layer; - if we see a 'warning' move onto 'remembered, unseen' we - need to explicitly remove that in order for it to not - reappear when the warned-of monster moves off that spot */ - if (glyph_is_invisible(levl[x][y].glyph)) - unmap_object(x, y); - show_glyph(x, y, glyph); + show_mon_or_warn(x, y, glyph); } int From 7406826824a6074235ce5a8c0749906daa3b8ff5 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 15:19:57 -0500 Subject: [PATCH 344/529] warning bit in a file that is only a proof-of-concept --- src/sfascii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sfascii.c b/src/sfascii.c index 22508db4a..4dcc990d4 100644 --- a/src/sfascii.c +++ b/src/sfascii.c @@ -6,7 +6,7 @@ #include "integer.h" #include "sfprocs.h" -#ifdef MACOSX +#if defined(MACOSX) || defined(VMS) extern long long FDECL(atoll, (const char *)); #endif From a351f904761812f1db80c0fb549b6bbd219841cd Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 17:19:55 -0500 Subject: [PATCH 345/529] number pad changes from pull request #247 Below is the accompanying text from the pull request on GitHub https://github.com/NetHack/NetHack/pull/247: > This fixes the issue brought up in https://www.reddit.com/r/nethack/comments/dv3pae/curses_and_the_numberpad/?st=k3hgply6&sh=dbc2bf7d . > > I don't know why the "regular" (tty) method doesn't seem to work for him, > but I'm going to chalk it up to a PDCurses oddity. What I do know, however, > is that the alternate method I added a year ago or maybe longer, that allows > numpad usage even with number_pad:0 (to retain the default keybindings in case > an user is used to them, while keeping number pad behaviour making sense, > similar to NetHack4+friends) was only partially implemented, for some reason. > This adds the rest of the keys, meaning that this means of key interpretation > should be more realible. KEY_A2/B1/B3/C2 are not standard keys in the Curses > documentation, and is thus behind an ifdef -- but PDCurses, amongst other > implementations, makes use of them. > > As a side effect, Home/End/PgUp/PgDn are now interpreted as diagonal movement, > since some terminals interpret number_pad keys that way. I do not consider this > a problem since they went unused in normal gameplay anyway (This does not > interfere with menus or similar). Closes #247 --- doc/fixes36.3 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 4dd283b4d..2573be3bc 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -479,6 +479,7 @@ add a couple of engraving suggestions in pull request #79 chasonr's faster method to write characters to msdos VGA in pull request #220 chasonr's msdos Makefile.gcc pdcurses build changes in pull request #243 autopickup exception priority change in pull request #226 +FIQ's curses (PDCurses) number pad changes in pull request #247 Code Cleanup and Reorganization From 919f0e82d87dd980b7483bf9810b1caa0f3c3243 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 27 Nov 2019 15:19:52 -0800 Subject: [PATCH 346/529] untested curses number pad fix This compiles ok but I don't have a number pad to test it with. --- win/curses/cursmisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/curses/cursmisc.c b/win/curses/cursmisc.c index d0655efa1..0d813cfcf 100644 --- a/win/curses/cursmisc.c +++ b/win/curses/cursmisc.c @@ -920,7 +920,7 @@ curses_convert_keys(int key) if (iflags.num_pad) { ret = '7'; } else { - ret = 'y'; + ret = !Cmd.swap_yz ? 'y' : 'z'; } break; #ifdef KEY_A3 From 7ca572eb60c2bfc61eada2acbc5a9855b38c3d97 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 27 Nov 2019 16:27:13 -0800 Subject: [PATCH 347/529] paranoid_confirmation:eating Add 'eating' (synonym 'continue') to the list of things that can be set via paranoid_confirmation to require "yes" instead of "y" when the user is prompted about something, in this case "Continue eating?". dat/opthelp was missing a few of the paranoid_confirmation choices. --- dat/opthelp | 8 ++++++-- doc/Guidebook.mn | 14 ++++++++++++-- doc/Guidebook.tex | 16 +++++++++++++--- include/flag.h | 6 +++++- src/eat.c | 33 +++++++++++++++------------------ src/options.c | 9 ++++++--- 6 files changed, 57 insertions(+), 29 deletions(-) diff --git a/dat/opthelp b/dat/opthelp index ee9092ede..0bcc8547e 100644 --- a/dat/opthelp +++ b/dat/opthelp @@ -99,7 +99,7 @@ altmeta For unix and VMS, treat two character sequence "ESC c" as M-c (Meta+c, 8th bit set) when nethack [FALSE] obtains a command from player's keyboard. -Boolean option if USE_TILES was set at compile time (MSDOS protected mode only): +Boolean option if USE_TILES was set at compile time (MSDOS protected mode): preload_tiles control whether tiles get pre-loaded into RAM at [TRUE] the start of the game. Doing so enhances performance of the tile graphics, but uses more memory. @@ -157,9 +157,13 @@ paranoid_confirmation space separated list [paranoid_confirmation:pray] die -- yes vs y to confirm dying (for explore or debug mode) bones -- yes vs y to confirm saving bones data in debug mode attack -- yes vs y to confirm attacking a peaceful monster + wand-break -- yes vs y to confirm breaking a wand + eating -- yes vs y to confirm whether to continue eating + Were-change -- yes vs y to confirm changing form due to + lycanthropy when hero has polymorph control; pray -- y to confirm an attempt to pray; on by default Remove -- always pick from inventory for 'R' and 'T' even when - wearing just one applicable item to remove or take off + wearing just one applicable item to remove or take off pickup_burden when you pick up an item that exceeds this encumbrance [S] level (Unencumbered, Burdened, streSsed, straiNed, overTaxed, or overLoaded), you will be asked if you want to continue. diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index c039e3bba..5bf417b7a 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.331 $ $NHDT-Date: 1573943499 2019/11/16 22:31:39 $ +.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.333 $ $NHDT-Date: 1574900824 2019/11/28 00:27:04 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "November 17, 2019 +.ds f2 "November 27, 2019 . .\" A note on some special characters: .\" \(lq = left double quote @@ -693,6 +693,14 @@ Normally checks for edible item(s) on the floor, then if none are found or none are chosen, checks for edible item(s) in inventory. Precede \(oqe\(cq with the \(oqm\(cq prefix to bypass attempting to eat anything off the floor. +.lp "" +If you attempt to eat while already satiated, you might choke to death. +If you risk it, you will be asked whether +to \(lqcontinue eating?\(rq \fIif you survive the first bite\fP. +You can set the +.op paranoid_confirmation:eating +option to require a response of \f(CRyes\fP instead of just \f(CRy\fP. +. .\" Make sure Elbereth is not hyphenated below, the exact spelling matters .hw Elbereth .lp E @@ -3307,6 +3315,8 @@ bones data when dying in debug mode; require \(lqyes\(rq rather than \(oqy\(cq to confirm attacking a peaceful monster; .PL wand-break require \(lqyes\(rq rather than \(oqy\(cq to confirm breaking a wand; +.PL eating +require \(lqyes\(rq rather than \(oqy\(cq to confirm whether to continue eating; .PL Were-change require \(lqyes\(rq rather than \(oqy\(cq to confirm changing form due to lycanthropy when hero has polymorph control; diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 4c0edfabc..8a37b106f 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{November 17, 2019} +\date{November 27, 2019} \maketitle @@ -796,7 +796,14 @@ Eat food.\\ Normally checks for edible item(s) on the floor, then if none are found or none are chosen, checks for edible item(s) in inventory. Precede `{\tt e}' with the `{\tt m}' prefix to bypass attempting to eat -anything off the floor. +anything off the floor.\\ +%.lp "" +If you attempt to eat while already satiated, you might choke to death. +If you risk it, you will be asked whether +to ``continue eating?'' {\it if you survive the first bite\/}. +You can set the +{\it paranoid\verb+_+confirmation:eating\/} +option to require a response of ``{\tt yes}'' instead of just `{\tt y}'. %.lp % Make sure Elbereth is not hyphenated below, the exact spelling matters. % (Only specified here to parallel Guidebook.mn; use of \tt font implicity @@ -1333,7 +1340,7 @@ Autocompletes. Debug mode only.\\ %.lp "" Asks for confirmation; default is `{\tt n}' (no); continue playing. -To really panic, respond with `{\tt y}''. +To really panic, respond with `{\tt y}'. You can set the {\it paranoid\verb+_+confirmation:quit\/} option to require a response of ``{\tt yes}'' instead. @@ -3640,6 +3647,9 @@ a peaceful monster; \item[{\tt wand-break}] require ``{\tt yes}'' rather than `{\tt y}' to confirm breaking a wand; +\item[{\tt eating}] +require ``{\tt yes}'' rather than `{\tt y}' to confirm whether to +continue eating; \item[{\tt Were-change}] require ``{\tt yes}'' rather than `{\tt y}' to confirm changing form due to lycanthropy diff --git a/include/flag.h b/include/flag.h index 5370faab7..3b429e01f 100644 --- a/include/flag.h +++ b/include/flag.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 flag.h $NHDT-Date: 1569276988 2019/09/23 22:16:28 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.155 $ */ +/* NetHack 3.6 flag.h $NHDT-Date: 1574900824 2019/11/28 00:27:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.160 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -106,6 +106,7 @@ struct flag { #define PARANOID_REMOVE 0x0040 #define PARANOID_BREAKWAND 0x0080 #define PARANOID_WERECHANGE 0x0100 +#define PARANOID_EATING 0x0200 int pickup_burden; /* maximum burden before prompt */ int pile_limit; /* controls feedback when walking over objects */ char inv_order[MAXOCLASSES]; @@ -520,6 +521,9 @@ enum runmode_types { /* werechange: accepting randomly timed werecreature change to transform from human to creature or vice versa while having polymorph control */ #define ParanoidWerechange ((flags.paranoia_bits & PARANOID_WERECHANGE) != 0) +/* continue eating: prompt given _after_first_bite_ when eating something + while satiated */ +#define ParanoidEating ((flags.paranoia_bits & PARANOID_EATING) != 0) /* command parsing, mainly dealing with number_pad handling; not saved and restored */ diff --git a/src/eat.c b/src/eat.c index 9620c372f..5e2aa1a09 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 eat.c $NHDT-Date: 1573346189 2019/11/10 00:36:29 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.205 $ */ +/* NetHack 3.6 eat.c $NHDT-Date: 1574900825 2019/11/28 00:27:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.206 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2875,23 +2875,20 @@ int num; /* Have lesshungry() report when you're nearly full so all eating * warns when you're about to choke. */ - if (u.uhunger >= 1500) { - if (!context.victual.eating - || (context.victual.eating && !context.victual.fullwarn)) { - pline("You're having a hard time getting all of it down."); - nomovemsg = "You're finally finished."; - if (!context.victual.eating) { - multi = -2; - } else { - context.victual.fullwarn = TRUE; - if (context.victual.canchoke - && context.victual.reqtime > 1) { - /* a one-gulp food will not survive a stop */ - if (yn_function("Continue eating?", ynchars, 'n') - != 'y') { - reset_eat(); - nomovemsg = (char *) 0; - } + if (u.uhunger >= 1500 + && (!context.victual.eating + || (context.victual.eating && !context.victual.fullwarn))) { + pline("You're having a hard time getting all of it down."); + nomovemsg = "You're finally finished."; + if (!context.victual.eating) { + multi = -2; + } else { + context.victual.fullwarn = TRUE; + if (context.victual.canchoke && context.victual.reqtime > 1) { + /* a one-gulp food will not survive a stop */ + if (!paranoid_query(ParanoidEating, "Continue eating?")) { + reset_eat(); + nomovemsg = (char *) 0; } } } diff --git a/src/options.c b/src/options.c index ecb0d773b..77fd14b79 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1573505739 2019/11/11 20:55:39 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.386 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1574900826 2019/11/28 00:27:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.388 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1313,12 +1313,13 @@ STATIC_VAR const struct paranoia_opts { and "d"ie vs "d"eath, synonyms for each other so doesn't matter; (also "p"ray vs "P"aranoia, "pray" takes precedence since "Paranoia" is just a synonym for "Confirm"); "b"ones vs "br"eak-wand, the - latter requires at least two letters; "wand"-break vs "Were"-change, + latter requires at least two letters; "e"at vs "ex"plore, + "cont"inue eating vs "C"onfirm; "wand"-break vs "Were"-change, both require at least two letters during config processing and use case-senstivity for 'O's interactive menu */ { PARANOID_CONFIRM, "Confirm", 1, "Paranoia", 2, "for \"yes\" confirmations, require \"no\" to reject" }, - { PARANOID_QUIT, "quit", 1, "explore", 1, + { PARANOID_QUIT, "quit", 1, "explore", 2, "yes vs y to quit or to enter explore mode" }, { PARANOID_DIE, "die", 1, "death", 2, "yes vs y to die (explore mode or debug mode)" }, @@ -1328,6 +1329,8 @@ STATIC_VAR const struct paranoia_opts { "yes vs y to attack a peaceful monster" }, { PARANOID_BREAKWAND, "wand-break", 2, "break-wand", 2, "yes vs y to break a wand via (a)pply" }, + { PARANOID_EATING, "eat", 1, "continue", 4, + "yes vs y to continue eating after first bite when satiated" }, { PARANOID_WERECHANGE, "Were-change", 2, (const char *) 0, 0, "yes vs y to change form when lycanthropy is controllable" }, { PARANOID_PRAY, "pray", 1, 0, 0, From 566019e588695267f878affea9a42d6fe181712d Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 20:18:45 -0500 Subject: [PATCH 348/529] return struct fields borrowed in 3.6 This will break existing 3.7 save/bones. --- include/monst.h | 3 ++- src/dog.c | 2 +- src/mkmaze.c | 4 ++-- src/sfdata.c | 6 ++++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/monst.h b/include/monst.h index bc8f939c5..3a26b7241 100644 --- a/include/monst.h +++ b/include/monst.h @@ -159,8 +159,9 @@ struct monst { long mtrapseen; /* bitmap of traps we've been trapped in */ long mlstmv; /* for catching up with lost time */ + long mstate; /* debugging info on monsters stored here */ + long migflags; /* migrating flags */ long mspare1; -#define mstate mspare1 /* only for debug exam right now, not code flow */ struct obj *minvent; /* mon's inventory */ struct obj *mw; /* mon's weapon */ long misc_worn_check; /* mon's wornmask */ diff --git a/src/dog.c b/src/dog.c index a5946eb76..5b9cfed69 100644 --- a/src/dog.c +++ b/src/dog.c @@ -417,7 +417,7 @@ boolean with_you; break; } - if ((mtmp->mspare1 & MIGR_LEFTOVERS) != 0L) { + if ((mtmp->migflags & MIGR_LEFTOVERS) != 0L) { /* Pick up the rest of the MIGR_TO_SPECIES objects */ if (g.migrating_objs) deliver_obj_to_mon(mtmp, 0, DF_ALL); diff --git a/src/mkmaze.c b/src/mkmaze.c index 0313c002d..b5fd346fd 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -646,14 +646,14 @@ unsigned long mflags; /* once in a blue moon, he won't be at the very bottom */ if (!rn2(40)) nlev--; - mtmp->mspare1 |= MIGR_LEFTOVERS; + mtmp->migflags |= MIGR_LEFTOVERS; } else { nlev = rn2((max_depth - cur_depth) + 1) + cur_depth; if (nlev == cur_depth) nlev++; if (nlev > max_depth) nlev = max_depth; - mtmp->mspare1 = (mtmp->mspare1 & ~MIGR_LEFTOVERS); + mtmp->migflags = (mtmp->migflags & ~MIGR_LEFTOVERS); } get_level(&dest, nlev); migrate_to_level(mtmp, ledger_no(&dest), MIGR_RANDOM, (coord *) 0); diff --git a/src/sfdata.c b/src/sfdata.c index ac6fe5fc5..b3d862ae7 100644 --- a/src/sfdata.c +++ b/src/sfdata.c @@ -1258,6 +1258,8 @@ int cnt; sfo_ulong(nhfp, &d_monst->mstrategy, parent, "mstrategy", 1);/* (unsigned long) */ sfo_long(nhfp, &d_monst->mtrapseen, parent, "mtrapseen", 1); /* (long) */ sfo_long(nhfp, &d_monst->mlstmv, parent, "mlstmv", 1); /* (long) */ + sfo_long(nhfp, &d_monst->mstate, parent, "mstate", 1); /* (long) */ + sfo_long(nhfp, &d_monst->migflags, parent, "migflags", 1); /* (long) */ sfo_long(nhfp, &d_monst->mspare1, parent, "mspare1", 1); /* (long) */ sfo_genericptr(nhfp, (genericptr_t) &d_monst->minvent, parent, "minvent", 1);/* (struct obj *) */ sfo_genericptr(nhfp, (genericptr_t) &d_monst->mw, parent, "mw", 1);/* (struct obj *) */ @@ -3814,6 +3816,8 @@ int cnt; sfi_ulong(nhfp, &d_monst->mstrategy, parent, "mstrategy", 1); sfi_long(nhfp, &d_monst->mtrapseen, parent, "mtrapseen", 1); sfi_long(nhfp, &d_monst->mlstmv, parent, "mlstmv", 1); + sfi_long(nhfp, &d_monst->mstate, parent, "mstate", 1); + sfi_long(nhfp, &d_monst->migflags, parent, "migflags", 1); sfi_long(nhfp, &d_monst->mspare1, parent, "mspare1", 1); sfi_genericptr(nhfp, (genericptr_t) &d_monst->minvent, parent, "minvent", 1); sfi_genericptr(nhfp, (genericptr_t) &d_monst->mw, parent, "mw", 1); @@ -5682,6 +5686,8 @@ const char *critical_members[] = { "struct monst:mstrategy:unsigned long", "struct monst:mtrapseen:long", "struct monst:mlstmv:long", + "struct monst:mstate:long", + "struct monst:migflags:long", "struct monst:mspare1:long", "struct monst:minvent:struct obj *", "struct monst:mw:struct obj *", From 2bfe01d26828ff076639f4266869b8529b34a6c6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 21:28:20 -0500 Subject: [PATCH 349/529] remove c files from nethack.tags generation I noticed that src/sfdata.c and include/sfproto.h come out the same without those c files in the list. Remove them. --- sys/unix/Makefile.utl | 30 +++---- sys/winnt/Makefile.msc | 180 +++++++++++++++++++++++------------------ 2 files changed, 112 insertions(+), 98 deletions(-) diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl index 30676b7e7..3fe09817a 100644 --- a/sys/unix/Makefile.utl +++ b/sys/unix/Makefile.utl @@ -371,20 +371,18 @@ tileedit: tileedit.cpp $(TEXT_IO) # dependencies for readtags # -CTAGDEP = ../include/align.h ../include/artifact.h ../src/artifact.c \ - ../include/artilist.h ../include/attrib.h ../src/bones.c \ - ../include/context.h ../include/coord.h ../include/decl.h \ - ../src/decl.c ../include/dungeon.h ../include/engrave.h \ - ../src/engrave.c ../include/flag.h ../include/func_tab.h \ - ../include/global.h ../include/hack.h ../include/lev.h \ - ../include/mextra.h ../include/mkroom.h ../include/monst.h \ - ../include/monsym.h ../include/obj.h ../include/objclass.h \ - ../include/prop.h ../include/quest.h ../include/rect.h \ - ../include/region.h ../include/rm.h ../include/skills.h \ - ../include/spell.h ../include/sys.h ../include/timeout.h \ - ../include/trap.h ../include/you.h ../include/onames.h \ - ../include/wintype.h -# ../include/permonst.h +CTAGDEP = ../include/align.h ../include/artifact.h ../include/artilist.h \ + ../include/attrib.h ../include/context.h ../include/coord.h \ + ../include/decl.h ../include/dungeon.h ../include/engrave.h \ + ../include/flag.h ../include/func_tab.h ../include/global.h \ + ../include/hack.h ../include/lev.h ../include/mextra.h \ + ../include/mkroom.h ../include/monst.h ../include/monsym.h \ + ../include/obj.h ../include/objclass.h ../include/prop.h \ + ../include/quest.h ../include/rect.h ../include/region.h \ + ../include/rm.h ../include/skills.h ../include/spell.h \ + ../include/sys.h ../include/timeout.h ../include/trap.h \ + ../include/you.h ../include/onames.h ../include/wintype.h +# ../include/permonst.h CTAGSOPT = --language-force=c --sort=no -D"Bitfield(x,n)=unsigned x : n" --excmd=pattern readtags: $(READTAGSOBJS) @@ -399,17 +397,13 @@ nethack.tags: $(CTAGDEP) # $(CTAGSCMD) $(CTAGSOPT) -f nethack.tags ../include/align.h $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/artifact.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../src/artifact.c $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/artilist.h $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/attrib.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../src/bones.c $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/context.h $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/coord.h $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/decl.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../src/decl.c $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/dungeon.h $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/engrave.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../src/engrave.c $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/flag.h $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/func_tab.h $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/global.h diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 064398ce6..2ff6ce57f 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -244,13 +244,26 @@ O = $(OBJ)^\ U = $(UTIL)^\ +!IFDEF TEST_CROSSCOMPILE +CROSSDEFINE_TARGET = -DCROSSCOMPILE_TARGET +CROSSDEFINE_HOST = -DCROSSCOMPILE_HOST +CROSSCOMPILE = -DCROSSCOMPILE +OPTIONS_AT_RUNTIME=Y +HOST=_host +!ELSE +CROSSDEFINE_TARGET = +CROSSDEFINE_HOST = +CROSSCOMPILE = +HOST= +!ENDIF + # # Utility Objects. # MAKESRC = $(U)makedefs.c -MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o +MAKEDEFSOBJS = $(O)makedefs$(HOST).o $(O)monst$(HOST).o $(O)objects$(HOST).o RECOVOBJS = $(O)recover.o @@ -259,16 +272,16 @@ TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt # # These are not invoked during a normal game build in 3.4 # -TEXT_IO = $(O)tiletext.o $(O)tiletxt.o $(O)drawing.o \ - $(O)decl.o $(O)monst.o $(O)objects.o +TEXT_IO = $(O)tiletext$(HOST).o $(O)tiletxt$(HOST).o $(O)drawing$(HOST).o \ + $(O)decl$(HOST).o $(O)monst$(HOST).o $(O)objects$(HOST).o -TEXT_IO32 = $(O)tilete32.o $(O)tiletx32.o $(O)drawing.o \ - $(O)decl.o $(O)monst.o $(O)objects.o +TEXT_IO32 = $(O)tilete32$(HOST).o $(O)tiletx32$(HOST).o $(O)drawing$(HOST).o \ + $(O)decl$(HOST).o $(O)monst$(HOST).o $(O)objects$(HOST).o -GIFREADERS = $(O)gifread.o $(O)alloc.o $(O)panic.o -GIFREADERS32 = $(O)gifrd32.o $(O)alloc.o $(O)panic.o +GIFREADERS = $(O)gifread$(HOST).o $(O)alloc$(HOST).o $(O)panic$(HOST).o +GIFREADERS32 = $(O)gifrd32$(HOST).o $(O)alloc$(HOST).o $(O)panic$(HOST).o -PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o +PPMWRITERS = $(O)ppmwrite$(HOST).o $(O)alloc$(HOST).o $(O)panic$(HOST).o # # Object files for the game itself. @@ -307,31 +320,20 @@ VOBJ29 = $(O)sfstruct.o $(O)sfascii.o $(O)sflendian.o LUAOBJ = $(O)nhlua.o $(O)nhlsel.o LUA_QTEXT_FILE = "quest.lua" +!IFDEF CROSSCOMPILE_HOST +DLBOBJ_HOST = $(O)dlb$(HOST).o +!ENDIF DLBOBJ = $(O)dlb.o REGEX = $(O)cppregex.o TTYOBJ = $(O)topl.o $(O)getline.o $(O)wintty.o -!IFDEF TEST_CROSSCOMPILE -CROSSDEFINE_TARGET = -DCROSSCOMPILE_TARGET -CROSSDEFINE_HOST = -DCROSSCOMPILE_HOST -CROSSCOMPILE = -DCROSSCOMPILE -CROSSDEFINES = $(CROSSCOMPILE) $(CROSSDEFINE_HOST) $(CROSSDEFINE_TARGET) -OPTIONS_AT_RUNTIME=Y -!ELSE -CROSSDEFINE_TARGET = -CROSSDEFINE_HOST = -CROSSCOMPILE = -CROSSDEFINES = -CROSSDEFINES = -!ENDIF +MDLIB = $(O)mdlib.o !IF "$(OPTIONS_AT_RUNTIME)" == "Y" -MDLIB = $(O)mdlib.o RUNTIMEOPTDEF=-DOPTIONS_AT_RUNTIME !ELSE -MDLIB = RUNTIMEOPTDEF= !ENDIF @@ -726,20 +728,20 @@ DLB = #========================================== .c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< {$(SRC)}.c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< #========================================== # Rules for files in sys\share #========================================== {$(SSYS)}.c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< {$(SSYS)}.cpp{$(OBJ)}.o: - @$(cc) $(cflagsBuild) $(CROSSDEFINES) /EHsc -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) /EHsc -Fo$@ $< #========================================== # Rules for files in sys\winnt @@ -756,14 +758,14 @@ DLB = #========================================== {$(UTIL)}.c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ $< #========================================== # Rules for files in win\share #========================================== {$(WSHR)}.c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< {$(WSHR)}.h{$(INCL)}.h: @copy $< $@ @@ -776,7 +778,7 @@ DLB = #========================================== {$(TTY)}.c{$(OBJ)}.o: - $(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< + $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< #========================================== @@ -784,14 +786,14 @@ DLB = #========================================== {$(MSWIN)}.c{$(OBJ)}.o: - $(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< + $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< #========================================== # Rules for files in win\curses #========================================== {$(WCURSES)}.c{$(OBJ)}.o: - @$(cc) -DPDC_NCMOUSE $(PDCINCL) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< + @$(cc) -DPDC_NCMOUSE $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< #{$(WCURSES)}.txt{$(DAT)}.txt: # @copy $< $@ @@ -801,20 +803,20 @@ DLB = #========================================== {$(PDCURSES_TOP)}.c{$(OBJ)}.o: - @$(cc) $(PDCINCL) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< + @$(cc) $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< {$(PDCSRC)}.c{$(OBJ)}.o: - @$(cc) $(PDCINCL) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< + @$(cc) $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< {$(PDCWINCON)}.c{$(OBJ)}.o: - @$(cc) $(PDCINCL) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< + @$(cc) $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< #========================================== # Rules for LUA files #========================================== {$(LUASRC)}.c{$(OBJ)}.o: - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< #========================================== #=============== TARGETS ================== @@ -1053,14 +1055,14 @@ $(U)nhsizes.exe: $(O)nhsizes.o @echo Linking $(@:\=/) $(link) $(lflagsBuild) -out:$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o -$(O)nhsizes.o: $(CONFIG_H) nhsizes.c - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ nhsizes.c +$(O)nhsizes$(HOST).o: $(CONFIG_H) nhsizes.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ nhsizes.c $(U)makedefs.exe: $(MAKEOBJS) @echo Linking $(@:\=/) @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(MAKEOBJS) -$(O)makedefs.o: $(CONFIG_H) $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\objclass.h \ +$(O)makedefs$(HOST).o: $(CONFIG_H) $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\objclass.h \ $(INCL)\monsym.h $(INCL)\qtext.h $(INCL)\patchlevel.h \ $(U)makedefs.c @if not exist $(OBJ)\*.* echo creating directory $(OBJ:\=/) @@ -1092,11 +1094,11 @@ $(SRC)\vis_tab.c: $(U)makedefs.exe # uudecode utility and uuencoded targets #========================================== -$(U)uudecode.exe: $(O)uudecode.o +$(U)uudecode.exe: $(O)uudecode$(HOST).o @echo Linking $(@:\=/) @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)uudecode.o -$(O)uudecode.o: $(SSYS)\uudecode.c +$(O)uudecode$(HOST).o: $(SSYS)\uudecode.c @$(cc) $(cflagsBuild) $(CROSSDEFINES) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c $(MSWSYS)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu @@ -1185,20 +1187,30 @@ $(O)envchk.tag: $(O)obj.tag # DLB utility and nhdatNNN file creation #========================================== -$(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o +$(U)dlb_main.exe: $(DLBOBJ_HOST) $(O)dlb$(HOST).o @echo Linking $(@:\=/) @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk - $(O)dlb_main.o - $(O)dlb.o - $(O)alloc.o - $(O)panic.o + $(O)dlb_main$(HOST).o + $(O)dlb$(HOST).o + $(O)alloc$(HOST).o + $(O)panic$(HOST).o << -$(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)\dlb.h - @$(cc) $(cflagsBuild) $(CROSSDEFINES) /Fo$@ $(SRC)\dlb.c +!IFDEF CROSSCOMPILE_HOST +$(O)dlb$(HOST).o: $(O)dlb_main$(HOST).o $(O)alloc$(HOST).o $(O)panic$(HOST).o $(INCL)\dlb.h + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /Fo$@ $(SRC)\dlb.c +!ENDIF + +$(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)\dlb.h + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /Fo$@ $(SRC)\dlb.c +!IFDEF CROSSCOMPILE_HOST +$(O)dlb_main$(HOST).o: $(UTIL)\dlb_main.c $(INCL)\config.h $(INCL)\dlb.h + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /Fo$@ $(UTIL)\dlb_main.c +!ENDIF + $(O)dlb_main.o: $(UTIL)\dlb_main.c $(INCL)\config.h $(INCL)\dlb.h - @$(cc) $(cflagsBuild) $(CROSSDEFINES) /Fo$@ $(UTIL)\dlb_main.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) /Fo$@ $(UTIL)\dlb_main.c $(DAT)\porthelp: $(MSWSYS)\porthelp @copy $(MSWSYS)\porthelp $@ >nul @@ -1258,32 +1270,32 @@ $(SRC)\tile.c: $(U)tilemap.exe @echo A new $(@:\=/) has been created @$(U)tilemap -$(U)tilemap.exe: $(O)tilemap.o +$(U)tilemap.exe: $(O)tilemap$(HOST).o @echo Linking $(@:\=/) @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)tilemap.o -$(O)tilemap.o: $(WSHR)\tilemap.c $(HACK_H) +$(O)tilemap$(HOST).o: $(WSHR)\tilemap.c $(HACK_H) @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(WSHR)\tilemap.c -$(O)tiletx32.o: $(WSHR)\tilemap.c $(HACK_H) +$(O)tiletx32$(HOST).o: $(WSHR)\tilemap.c $(HACK_H) @$(cc) $(cflagsBuild) $(CROSSDEFINES) /DTILETEXT /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tilemap.c -$(O)tiletxt.o: $(WSHR)\tilemap.c $(HACK_H) +$(O)tiletxt$(HOST).o: $(WSHR)\tilemap.c $(HACK_H) @$(cc) $(cflagsBuild) $(CROSSDEFINES) /DTILETEXT -Fo$@ $(WSHR)\tilemap.c -$(O)gifread.o: $(WSHR)\gifread.c $(CONFIG_H) $(TILE_H) +$(O)gifread$(HOST).o: $(WSHR)\gifread.c $(CONFIG_H) $(TILE_H) @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) -Fo$@ $(WSHR)\gifread.c -$(O)gifrd32.o: $(WSHR)\gifread.c $(CONFIG_H) $(TILE_H) +$(O)gifrd32$(HOST).o: $(WSHR)\gifread.c $(CONFIG_H) $(TILE_H) @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\gifread.c -$(O)ppmwrite.o: $(WSHR)\ppmwrite.c $(CONFIG_H) $(TILE_H) +$(O)ppmwrite$(HOST).o: $(WSHR)\ppmwrite.c $(CONFIG_H) $(TILE_H) @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) -Fo$@ $(WSHR)\ppmwrite.c -$(O)tiletext.o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H) +$(O)tiletext$(HOST).o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H) @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) -Fo$@ $(WSHR)\tiletext.c -$(O)tilete32.o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H) +$(O)tilete32$(HOST).o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H) @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tiletext.c #========================================== @@ -1325,7 +1337,7 @@ $(TILEBMP16): $(TILEUTIL16) $(TILEFILES) # @$(U)til2bm32 $(TILEBMP32) -$(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO) +$(U)tile2bmp.exe: $(O)tile2bmp$(HOST).o $(TEXT_IO) @echo Linking $(@:\=/) @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk $(O)tile2bmp.o @@ -1333,7 +1345,7 @@ $(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO) ) << -$(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32) +$(U)til2bm32.exe: $(O)til2bm32$(HOST).o $(TEXT_IO32) @echo Linking $(@:\=/) @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk $(O)til2bm32.o @@ -1341,10 +1353,10 @@ $(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32) ) << -$(O)tile2bmp.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h +$(O)tile2bmp$(HOST).o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) /DPACKED_FILE /Fo$@ $(WSHR)\tile2bmp.c -$(O)til2bm32.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h +$(O)til2bm32$(HOST).o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c #=============================================================================== @@ -1392,9 +1404,14 @@ $(O)lapi.o: $(LUASRC)\lapi.c # data file. # +!IFDEF CROSSCOMPILE_HOST +$(O)mdlib$(HOST).o: $(SRC)\mdlib.c + $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_HOST) -Fo$@ $(SRC)\mdlib.c +!ENDIF + $(O)mdlib.o: $(SRC)\mdlib.c - $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_TARGET) -DMAKEDEFS_MDOBJ -Fo$@ $(SRC)\mdlib.c -# $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_TARGET) -DMAKEDEFS_MDOBJ /EP -Fo$@ $(SRC)\mdlib.c >mdlib.c.preprocessed + $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_TARGET) -Fo$@ $(SRC)\mdlib.c +# $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_TARGET) /EP -Fo$@ $(SRC)\mdlib.c >mdlib.c.preprocessed #=============================================================================== # Housekeeping @@ -1595,28 +1612,26 @@ $(SRC)\sfdata.c: $(U)readtags.exe $(U)nethack.tags $(INCL)\sfproto.h: $(U)readtags.exe $(U)nethack.tags $(U)readtags.exe -$(U)readtags.exe: $(O)readtags.o +$(U)readtags.exe: $(O)readtags$(HOST).o @$(link) $(lflagsBuild) -out:$@ $(O)readtags.o -$(O)readtags.o: $(U)readtags.c $(U)nethack.tags $(CONFIG_H) $(PATCHLEVEL_H) +$(O)readtags$(HOST).o: $(U)readtags.c $(U)nethack.tags $(CONFIG_H) $(PATCHLEVEL_H) @$(cc) $(cflagsBuild) $(CROSSDEFINES) $(TEMPL) -Fo$@ $(U)readtags.c # #tested only with exuberant ctags from http://ctags.sourceforge.net # -CTAGDEP = $(TINC)/align.h $(TINC)/artifact.h $(TSRC)/artifact.c \ - $(TINC)/artilist.h $(TINC)/attrib.h $(TSRC)/bones.c \ - $(TINC)/context.h $(TINC)/coord.h $(TINC)/decl.h \ - $(TSRC)/decl.c $(TINC)/dungeon.h $(TINC)/engrave.h \ - $(TSRC)/engrave.c $(TINC)/flag.h $(TINC)/func_tab.h \ - $(TINC)/global.h $(TINC)/hack.h $(TINC)/lev.h \ - $(TINC)/mextra.h $(TINC)/mkroom.h $(TINC)/monst.h \ - $(TINC)/monsym.h $(TINC)/obj.h $(TINC)/objclass.h \ - $(TINC)/permonst.h $(TINC)/prop.h $(TINC)/quest.h \ - $(TINC)/rect.h $(TINC)/region.h $(TINC)/rm.h \ - $(TINC)/skills.h $(TINC)/spell.h $(TINC)/sys.h \ - $(TINC)/timeout.h $(TINC)/trap.h $(TINC)/you.h \ - $(TINC)/onames.h $(TINC)/wintype.h +CTAGDEP = ..\include\align.h ..\include\artifact.h ..\include\artilist.h \ + ..\include\attrib.h ..\include\context.h ..\include\coord.h \ + ..\include\decl.h ..\include\dungeon.h ..\include\engrave.h \ + ..\include\flag.h ..\include\func_tab.h ..\include\global.h \ + ..\include\hack.h ..\include\lev.h ..\include\mextra.h \ + ..\include\mkroom.h ..\include\monst.h ..\include\monsym.h \ + ..\include\obj.h ..\include\objclass.h ..\include\prop.h \ + ..\include\quest.h ..\include\rect.h ..\include\region.h \ + ..\include\rm.h ..\include\skills.h ..\include\spell.h \ + ..\include\sys.h ..\include\timeout.h ..\include\trap.h \ + ..\include\you.h ..\include\onames.h ..\include\wintype.h $(U)nethack.tags: $(CTAGDEP) $(CTAGSCMD) $(CTAGSOPT) -f $(U)nethack.tags $(TINC)/align.h @@ -1662,8 +1677,13 @@ $(U)nethack.tags: $(CTAGDEP) # util dependencies # +!IFDEF CROSSCOMPILE_HOST +$(O)panic$(HOST).o: $(U)panic.c $(CONFIG_H) + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ $(U)panic.c +!ENDIF + $(O)panic.o: $(U)panic.c $(CONFIG_H) - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(U)panic.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $(U)panic.c # # sys/share dependencies From e8f796da245ee201a304b828b901a5ff7c20bbca Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 22:11:08 -0500 Subject: [PATCH 350/529] allow testing of CROSSCOMPILE without cross-compiler using windows Makefile --- sys/winnt/Makefile.msc | 136 +++++++++++++++++++++++++++-------------- 1 file changed, 90 insertions(+), 46 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 2ff6ce57f..2a27bc1b5 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -245,14 +245,14 @@ O = $(OBJ)^\ U = $(UTIL)^\ !IFDEF TEST_CROSSCOMPILE -CROSSDEFINE_TARGET = -DCROSSCOMPILE_TARGET -CROSSDEFINE_HOST = -DCROSSCOMPILE_HOST +CROSSCOMPILE_TARGET = -DCROSSCOMPILE_TARGET +CROSSCOMPILE_HOST = -DCROSSCOMPILE_HOST CROSSCOMPILE = -DCROSSCOMPILE OPTIONS_AT_RUNTIME=Y HOST=_host !ELSE -CROSSDEFINE_TARGET = -CROSSDEFINE_HOST = +CROSSCOMPILE_TARGET = +CROSSCOMPILE_HOST = CROSSCOMPILE = HOST= !ENDIF @@ -272,6 +272,7 @@ TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt # # These are not invoked during a normal game build in 3.4 # +!IFDEF CROSSCOMPILE_HOST TEXT_IO = $(O)tiletext$(HOST).o $(O)tiletxt$(HOST).o $(O)drawing$(HOST).o \ $(O)decl$(HOST).o $(O)monst$(HOST).o $(O)objects$(HOST).o @@ -282,6 +283,7 @@ GIFREADERS = $(O)gifread$(HOST).o $(O)alloc$(HOST).o $(O)panic$(HOST).o GIFREADERS32 = $(O)gifrd32$(HOST).o $(O)alloc$(HOST).o $(O)panic$(HOST).o PPMWRITERS = $(O)ppmwrite$(HOST).o $(O)alloc$(HOST).o $(O)panic$(HOST).o +!ENDIF # # Object files for the game itself. @@ -1058,17 +1060,17 @@ $(U)nhsizes.exe: $(O)nhsizes.o $(O)nhsizes$(HOST).o: $(CONFIG_H) nhsizes.c @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ nhsizes.c -$(U)makedefs.exe: $(MAKEOBJS) +$(U)makedefs.exe: $(MAKEDEFSOBJS) @echo Linking $(@:\=/) - @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(MAKEOBJS) + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(MAKEDEFSOBJS) $(O)makedefs$(HOST).o: $(CONFIG_H) $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\objclass.h \ $(INCL)\monsym.h $(INCL)\qtext.h $(INCL)\patchlevel.h \ $(U)makedefs.c @if not exist $(OBJ)\*.* echo creating directory $(OBJ:\=/) @if not exist $(OBJ)\*.* mkdir $(OBJ) - $(cc) -DENUM_PM $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(U)makedefs.c -# $(cc) -DENUM_PM $(cflagsBuild) $(CROSSDEFINES) /EP -Fo$@ $(U)makedefs.c >makedefs.c.preprocessed + $(cc) -DENUM_PM $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ $(U)makedefs.c +# $(cc) -DENUM_PM $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /EP -Fo$@ $(U)makedefs.c >makedefs.c.preprocessed # # date.h should be remade every time any of the source or include @@ -1099,7 +1101,7 @@ $(U)uudecode.exe: $(O)uudecode$(HOST).o @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)uudecode.o $(O)uudecode$(HOST).o: $(SSYS)\uudecode.c - @$(cc) $(cflagsBuild) $(CROSSDEFINES) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c $(MSWSYS)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu chdir $(MSWSYS) @@ -1260,7 +1262,7 @@ $(U)recover.exe: $(RECOVOBJS) $(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(RECOVOBJS) $(O)recover.o: $(CONFIG_H) $(U)recover.c $(MSWSYS)\win32api.h - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(U)recover.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ $(U)recover.c #========================================== # Tile Mapping @@ -1275,28 +1277,28 @@ $(U)tilemap.exe: $(O)tilemap$(HOST).o @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)tilemap.o $(O)tilemap$(HOST).o: $(WSHR)\tilemap.c $(HACK_H) - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(WSHR)\tilemap.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ $(WSHR)\tilemap.c $(O)tiletx32$(HOST).o: $(WSHR)\tilemap.c $(HACK_H) - @$(cc) $(cflagsBuild) $(CROSSDEFINES) /DTILETEXT /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tilemap.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /DTILETEXT /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tilemap.c $(O)tiletxt$(HOST).o: $(WSHR)\tilemap.c $(HACK_H) - @$(cc) $(cflagsBuild) $(CROSSDEFINES) /DTILETEXT -Fo$@ $(WSHR)\tilemap.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /DTILETEXT -Fo$@ $(WSHR)\tilemap.c $(O)gifread$(HOST).o: $(WSHR)\gifread.c $(CONFIG_H) $(TILE_H) - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) -Fo$@ $(WSHR)\gifread.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) -Fo$@ $(WSHR)\gifread.c $(O)gifrd32$(HOST).o: $(WSHR)\gifread.c $(CONFIG_H) $(TILE_H) - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\gifread.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\gifread.c $(O)ppmwrite$(HOST).o: $(WSHR)\ppmwrite.c $(CONFIG_H) $(TILE_H) - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) -Fo$@ $(WSHR)\ppmwrite.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) -Fo$@ $(WSHR)\ppmwrite.c $(O)tiletext$(HOST).o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H) - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) -Fo$@ $(WSHR)\tiletext.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) -Fo$@ $(WSHR)\tiletext.c $(O)tilete32$(HOST).o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H) - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tiletext.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tiletext.c #========================================== # Optional Tile Utilities @@ -1332,6 +1334,7 @@ $(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO) $(TILEBMP16): $(TILEUTIL16) $(TILEFILES) @echo Creating 16x16 binary tile files (this may take some time) @$(U)tile2bmp $(TILEBMP16) + #$(TILEBMP32): $(TILEUTIL32) $(TILEFILES32) # @echo Creating 32x32 binary tile files (this may take some time) # @$(U)til2bm32 $(TILEBMP32) @@ -1340,7 +1343,7 @@ $(TILEBMP16): $(TILEUTIL16) $(TILEFILES) $(U)tile2bmp.exe: $(O)tile2bmp$(HOST).o $(TEXT_IO) @echo Linking $(@:\=/) @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk - $(O)tile2bmp.o + $(O)tile2bmp$(HOST).o $(TEXT_IO:^ =^ ) << @@ -1348,16 +1351,16 @@ $(U)tile2bmp.exe: $(O)tile2bmp$(HOST).o $(TEXT_IO) $(U)til2bm32.exe: $(O)til2bm32$(HOST).o $(TEXT_IO32) @echo Linking $(@:\=/) @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk - $(O)til2bm32.o + $(O)til2bm32$(HOST).o $(TEXT_IO32:^ =^ ) << $(O)tile2bmp$(HOST).o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) /DPACKED_FILE /Fo$@ $(WSHR)\tile2bmp.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) /DPACKED_FILE /Fo$@ $(WSHR)\tile2bmp.c $(O)til2bm32$(HOST).o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c #=============================================================================== # PDCurses @@ -1367,7 +1370,7 @@ $(O)pdcurses.lib : $(PDCLIBOBJS) $(PDCOBJS) lib -nologo /out:$@ $(PDCLIBOBJS) $(PDCOBJS) $(O)pdcscrn.o : $(PDCURSES_HEADERS) $(PDCWINCON)\pdcscrn.c $(MSWSYS)\stub-pdcscrn.c - $(cc) $(PDCINCL) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(MSWSYS)\stub-pdcscrn.c + $(cc) $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $(MSWSYS)\stub-pdcscrn.c #=============================================================================== # LUA @@ -1388,7 +1391,7 @@ $(O)lua$(LUAVER)-static.lib: $(LUAOBJFILES) $(O)lua.o: $(LUASRC)\lua.c $(O)luac.o: $(LUASRC)\luac.c $(O)lapi.o: $(LUASRC)\lapi.c - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -wd4244 -Fo$@ $(LUASRC)\lapi.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -wd4244 -Fo$@ $(LUASRC)\lapi.c #=============================================================================== # CROSSCOMPILE @@ -1410,8 +1413,8 @@ $(O)mdlib$(HOST).o: $(SRC)\mdlib.c !ENDIF $(O)mdlib.o: $(SRC)\mdlib.c - $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_TARGET) -Fo$@ $(SRC)\mdlib.c -# $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_TARGET) /EP -Fo$@ $(SRC)\mdlib.c >mdlib.c.preprocessed + $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $(SRC)\mdlib.c +# $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) /EP -Fo$@ $(SRC)\mdlib.c >mdlib.c.preprocessed #=============================================================================== # Housekeeping @@ -1558,32 +1561,32 @@ $(DAT)\dungeon: $(O)utility.tag $(DAT)\dungeon.def # $(O)nttty.o: $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h $(MSWSYS)\nttty.c - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(WSHR) -Fo$@ $(MSWSYS)\nttty.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -I$(WSHR) -Fo$@ $(MSWSYS)\nttty.c $(O)winnt.o: $(HACK_H) $(MSWSYS)\win32api.h $(MSWSYS)\winnt.c - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(MSWSYS) -I$(MSWIN) -Fo$@ $(MSWSYS)\win10.c - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(MSWSYS)\winnt.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -I$(MSWSYS) -I$(MSWIN) -Fo$@ $(MSWSYS)\win10.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $(MSWSYS)\winnt.c $(O)ntsound.o: $(HACK_H) $(MSWSYS)\ntsound.c - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ $(MSWSYS)\ntsound.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $(MSWSYS)\ntsound.c $(O)windmain.o: $(MSWSYS)\windmain.c $(HACK_H) #if you aren't linking in the full gui then #include the following stub for proper linkage. $(O)guistub.o: $(HACK_H) $(MSWSYS)\stubs.c - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -DGUISTUB -Fo$@ $(MSWSYS)\stubs.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -DGUISTUB -Fo$@ $(MSWSYS)\stubs.c # # WIN32 dependencies # $(O)NetHackW.o: $(HACK_H) $(MSWIN)\NetHackW.c - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -I$(MSWSYS) -I$(MSWIN) -Fo$@ $(MSWIN)\NetHackW.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -I$(MSWSYS) -I$(MSWIN) -Fo$@ $(MSWIN)\NetHackW.c #if you aren't linking in the full tty then #include the following stub for proper linkage. $(O)ttystub.o: $(HACK_H) $(MSWSYS)\stubs.c - @$(cc) $(cflagsBuild) $(CROSSDEFINES) -DTTYSTUB -Fo$@ $(MSWSYS)\stubs.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -DTTYSTUB -Fo$@ $(MSWSYS)\stubs.c # #============================================ @@ -1616,7 +1619,7 @@ $(U)readtags.exe: $(O)readtags$(HOST).o @$(link) $(lflagsBuild) -out:$@ $(O)readtags.o $(O)readtags$(HOST).o: $(U)readtags.c $(U)nethack.tags $(CONFIG_H) $(PATCHLEVEL_H) - @$(cc) $(cflagsBuild) $(CROSSDEFINES) $(TEMPL) -Fo$@ $(U)readtags.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) $(TEMPL) -Fo$@ $(U)readtags.c # #tested only with exuberant ctags from http://ctags.sourceforge.net @@ -1675,6 +1678,7 @@ $(U)nethack.tags: $(CTAGDEP) # # util dependencies +# These have dual-roles and need to be build for host and targt platforms. # !IFDEF CROSSCOMPILE_HOST @@ -1685,12 +1689,63 @@ $(O)panic$(HOST).o: $(U)panic.c $(CONFIG_H) $(O)panic.o: $(U)panic.c $(CONFIG_H) @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $(U)panic.c + +!IFDEF CROSSCOMPILE_HOST +$(O)drawing$(HOST).o: drawing.c $(HACK_H) $(INCL)\tcap.h + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ drawing.c +!ENDIF + +$(O)drawing.o: drawing.c $(HACK_H) $(INCL)\tcap.h + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ drawing.c + +!IFDEF CROSSCOMPILE_HOST +$(O)decl$(HOST).o: decl.c $(HACK_H) + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ decl.c +!ENDIF + +$(O)decl.o: decl.c $(HACK_H) + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ decl.c + +!IFDEF CROSSCOMPILE_HOST +$(O)monst$(HOST).o: monst.c $(CONFIG_H) $(INCL)\permonst.h $(INCL)\align.h \ + $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\monsym.h \ + $(INCL)\color.h + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ monst.c +!ENDIF + +$(O)monst.o: monst.c $(CONFIG_H) $(INCL)\permonst.h $(INCL)\align.h \ + $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\monsym.h \ + $(INCL)\color.h + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ monst.c + +!IFDEF CROSSCOMPILE_HOST +$(O)objects$(HOST).o: objects.c $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ + $(INCL)\prop.h $(INCL)\skills.h $(INCL)\color.h + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ objects.c +!ENDIF + +$(O)objects.o: objects.c $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ + $(INCL)\prop.h $(INCL)\skills.h $(INCL)\color.h + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ objects.c + +!IFDEF CROSSCOMPILE_HOST +$(O)alloc$(HOST).o: alloc.c $(CONFIG_H) + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ alloc.c +!ENDIF + +$(O)alloc.o: alloc.c $(CONFIG_H) + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ alloc.c + +$(O)version.o: version.c $(HACK_H) $(INCL)\dlb.h $(INCL)\date.h \ + $(INCL)\patchlevel.h + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ version.c + # # sys/share dependencies # (O)cppregex.o: $(O)cppregex.cpp $(HACK_H) - @$(CC) $(cflagsBuild) $(CROSSDEFINES) -Fo$@ ..\sys\share\cppregex.cpp + @$(CC) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ ..\sys\share\cppregex.cpp # # curses window port dependencies @@ -1840,7 +1895,6 @@ $(O)wc_trace.o: ..\win\chain\wc_trace.c $(HACK_H) $(INCL)\func_tab.h # @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_trace.c $(O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)\vis_tab.h $(O)allmain.o: allmain.c $(HACK_H) -$(O)alloc.o: alloc.c $(CONFIG_H) $(O)apply.o: apply.c $(HACK_H) $(O)artifact.o: artifact.c $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h $(O)attrib.o: attrib.c $(HACK_H) @@ -1849,7 +1903,6 @@ $(O)bones.o: bones.c $(HACK_H) $(INCL)\lev.h $(O)botl.o: botl.c $(HACK_H) $(O)cmd.o: cmd.c $(HACK_H) $(INCL)\func_tab.h $(O)dbridge.o: dbridge.c $(HACK_H) -$(O)decl.o: decl.c $(HACK_H) $(O)detect.o: detect.c $(HACK_H) $(INCL)\artifact.h $(O)dig.o: dig.c $(HACK_H) $(O)display.o: display.c $(HACK_H) @@ -1861,7 +1914,6 @@ $(O)dog.o: dog.c $(HACK_H) $(O)dogmove.o: dogmove.c $(HACK_H) $(INCL)\mfndpos.h $(O)dokick.o: dokick.c $(HACK_H) $(O)dothrow.o: dothrow.c $(HACK_H) -$(O)drawing.o: drawing.c $(HACK_H) $(INCL)\tcap.h $(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)\dgn_file.h $(INCL)\dlb.h $(O)eat.o: eat.c $(HACK_H) $(O)end.o: end.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h @@ -1891,9 +1943,6 @@ $(O)mkroom.o: mkroom.c $(HACK_H) $(O)mon.o: mon.c $(HACK_H) $(INCL)\mfndpos.h $(O)mondata.o: mondata.c $(HACK_H) $(O)monmove.o: monmove.c $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h -$(O)monst.o: monst.c $(CONFIG_H) $(INCL)\permonst.h $(INCL)\align.h \ - $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\monsym.h \ - $(INCL)\color.h $(O)mplayer.o: mplayer.c $(HACK_H) $(O)mthrowu.o: mthrowu.c $(HACK_H) $(O)muse.o: muse.c $(HACK_H) @@ -1901,8 +1950,6 @@ $(O)music.o: music.c $(HACK_H) #interp.c $(O)nhlua.o: nhlua.c $(HACK_H) $(O)nhlsel.o: nhlsel.c $(HACK_H) $(O)o_init.o: o_init.c $(HACK_H) $(INCL)\lev.h -$(O)objects.o: objects.c $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ - $(INCL)\prop.h $(INCL)\skills.h $(INCL)\color.h $(O)objnam.o: objnam.c $(HACK_H) $(O)options.o: options.c $(CONFIG_H) $(INCL)\objclass.h $(INCL)\flag.h \ $(HACK_H) $(INCL)\tcap.h @@ -1941,9 +1988,6 @@ $(O)trap.o: trap.c $(HACK_H) $(O)u_init.o: u_init.c $(HACK_H) $(O)uhitm.o: uhitm.c $(HACK_H) $(O)vault.o: vault.c $(HACK_H) -$(O)version.o: version.c $(HACK_H) $(INCL)\dlb.h $(INCL)\date.h \ - $(INCL)\patchlevel.h - @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_TARGET) -Fo$@ version.c $(O)vision.o: vision.c $(HACK_H) $(INCL)\vis_tab.h $(O)weapon.o: weapon.c $(HACK_H) $(O)were.o: were.c $(HACK_H) From 4b558bf94e1152405c62b5442acb11ae86d30d88 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Nov 2019 22:34:55 -0500 Subject: [PATCH 351/529] yet more Windows Makefile --- sys/winnt/Makefile.msc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 2a27bc1b5..e5f479925 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -251,10 +251,10 @@ CROSSCOMPILE = -DCROSSCOMPILE OPTIONS_AT_RUNTIME=Y HOST=_host !ELSE -CROSSCOMPILE_TARGET = -CROSSCOMPILE_HOST = -CROSSCOMPILE = -HOST= +!UNDEF CROSSCOMPILE_TARGET +!UNDEF CROSSCOMPILE_HOST +!UNDEF CROSSCOMPILE +!UNDEF HOST !ENDIF # @@ -623,8 +623,8 @@ CL_RECENT=-sdl !IF "$(ADD_CURSES)" == "Y" CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE" -DCHTYPE_32 !ELSE -CURSDEF= -CURSESLIB= +!UNDEF CURSDEF= +!UNDEF CURSESLIB= !ENDIF ccommon= -c -nologo -D"_CONSOLE" -D"_CRT_NONSTDC_NO_DEPRECATE" -D"_CRT_SECURE_NO_DEPRECATE" \ From 059e0277ff3b5aea5984c39c03204ee954052539 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Thu, 28 Nov 2019 12:17:54 -0500 Subject: [PATCH 352/529] This is cron-daily v1-Nov-24-2019. guidebook updated: doc/Guidebook.txt --- doc/Guidebook.txt | 2518 ++++++++++++++++++++++----------------------- 1 file changed, 1259 insertions(+), 1259 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index d8a3bc93d..e991beead 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -126,7 +126,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -192,7 +192,7 @@ you have seen on the current dungeon level; as you explore more - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -258,7 +258,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -324,7 +324,7 @@ Intelligence affects your ability to cast spells and read - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -456,7 +456,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -588,7 +588,7 @@ symbol at the chosen location, conditionally check for "More - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -720,7 +720,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -786,7 +786,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -803,6 +803,12 @@ in inventory. Precede `e' with the `m' prefix to bypass at- tempting to eat anything off the floor. + If you attempt to eat while already satiated, you might + choke to death. If you risk it, you will be asked whether + to "continue eating?" if you survive the first bite. You + can set the paranoid_confirmation:eating option to require a + response of yes instead of just y. + E Engrave a message on the floor. E- - write in the dust with your fingers. @@ -844,15 +850,9 @@ ing upon it, depending on your user interface). For the non-boolean choices, a further menu or prompt will appear once you've closed this menu. The available options are - listed later in this Guidebook. Options are usually set be- - fore the game rather than with the `O' command; see the sec- - tion on options below. - - ^O Show overview. - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -862,6 +862,12 @@ + listed later in this Guidebook. Options are usually set be- + fore the game rather than with the `O' command; see the sec- + tion on options below. + + ^O Show overview. + Shortcut for "#overview": list interesting dungeon levels visited. @@ -910,15 +916,9 @@ `T' command below. It lists armor as the inventory choices but will accept an accessory and attempt to remove it.) - ^R Redraw the screen. - - s Search for secret doors and traps around you. It usually - takes several tries to find something. - - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -928,6 +928,11 @@ + ^R Redraw the screen. + + s Search for secret doors and traps around you. It usually + takes several tries to find something. + Can also be used to figure out whether there is still a mon- ster at an adjacent "remembered, unseen monster" marker. @@ -976,15 +981,10 @@ ^T Teleport, if you have the ability. - v Display version number. - - V Display the game history. - - w Wield weapon. - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -994,6 +994,12 @@ + v Display version number. + + V Display the game history. + + w Wield weapon. + w- - wield nothing, use your bare (or gloved) hands. Some characters can wield two weapons at once; use the `X' @@ -1042,15 +1048,9 @@ Z Zap (cast) a spell. - Z. - to cast at yourself, use `.' for the direction. - - __________ - (R)UNIX is a registered trademark of The Open Group. - - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -1060,6 +1060,8 @@ + Z. - to cast at yourself, use `.' for the direction. + ^Z Suspend the game (UNIX(R) versions with job control only). : Look at what is here. @@ -1108,15 +1110,13 @@ ` Show discovered types for one class of objects. - ! Escape to a shell. - - # Perform an extended command. + __________ + (R)UNIX is a registered trademark of The Open Group. - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -1126,6 +1126,12 @@ + ! Escape to a shell. + + # Perform an extended command. + + + As you can see, the authors of NetHack used up all the let- ters, so this is a way to introduce the less frequently used com- mands. What extended commands are available depends on what fea- @@ -1174,15 +1180,9 @@ If the tool used acts on items on the floor, using the `m' prefix skips those items. - If used on a wand, that wand will be broken, releasing its - magic in the process. Confirmation is required. - - #attributes - Show your attributes. Default key is `^X'. - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -1192,6 +1192,12 @@ + If used on a wand, that wand will be broken, releasing its + magic in the process. Confirmation is required. + + #attributes + Show your attributes. Default key is `^X'. + #autopickup Toggle the autopickup option on/off. Default key is `@'. @@ -1240,15 +1246,9 @@ Advance or check weapon and spell skills. Autocompletes. Default key is `M-e'. - #exploremode - Enter the explore mode. - - Requires confirmation; default response is n (no). To real- - ly switch to explore mode, respond with y. You can set the - paranoid_confirmation:quit option to require a response of - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -1258,6 +1258,12 @@ + #exploremode + Enter the explore mode. + + Requires confirmation; default response is n (no). To real- + ly switch to explore mode, respond with y. You can set the + paranoid_confirmation:quit option to require a response of yes instead. #fire @@ -1306,15 +1312,9 @@ Show discovered types for one class of objects. Default key is ``'. - #levelchange - Change your experience level. Autocompletes. Debug mode - only. - - #lightsources - Show mobile light sources. Autocompletes. Debug mode only. - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -1324,6 +1324,13 @@ + #levelchange + Change your experience level. Autocompletes. Debug mode + only. + + #lightsources + Show mobile light sources. Autocompletes. Debug mode only. + #look Look at what is here, under you. Default key is `:'. @@ -1370,17 +1377,10 @@ ited level will be included regardless of annotations. Au- tocompletes. Default keys are `^O', and `M-O'. - #panic - Test the panic routine. Terminates the current game. Auto- - completes. Debug mode only. - - Asks for confirmation; default is n (no); continue playing. - To really panic, respond with y. You can set the para- - noid_confirmation:quit option to require a response of yes - instead. - NetHack 3.6 November 17, 2019 + + NetHack 3.6 November 27, 2019 @@ -1390,6 +1390,15 @@ + #panic + Test the panic routine. Terminates the current game. Auto- + completes. Debug mode only. + + Asks for confirmation; default is n (no); continue playing. + To really panic, respond with y. You can set the para- + noid_confirmation:quit option to require a response of yes + instead. + #pay Pay your shopping bill. Default key is `p'. @@ -1434,6 +1443,19 @@ really quit, respond with y. You can set the paranoid_con- firmation:quit option to require a response of yes instead. + + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 23 + + + #quiver Select ammunition for quiver. Default key is `Q'. @@ -1445,17 +1467,6 @@ Redraw the screen. Default key is `^R', and also `^L' if number_pad is on. - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 23 - - - #remove Remove an accessory (ring, amulet, etc). Default key is `R'. @@ -1499,6 +1510,18 @@ #seetools Show the tools currently in use. Default key is `('. + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 24 + + + #seetrap Show the type of an adjacent trap. Default key is `^'. @@ -1511,17 +1534,6 @@ #sit Sit down. Autocompletes. Default key is `M-s'. - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 24 - - - #stats Show memory usage statistics. Autocompletes. Debug mode only. @@ -1563,8 +1575,20 @@ Travel to a specific location on the map. Default key is `_'. Using the "request menu" prefix shows a menu of inter- esting targets in sight without asking to move the cursor. - When picking a target with cursor and the autodescribe op- - tion is on, the top line will show "(no travel path)" if + When picking a target with cursor and the autodescribe + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 25 + + + + option is on, the top line will show "(no travel path)" if your character does not know of a path to that location. #turn @@ -1577,17 +1601,6 @@ Note that you must use suitable weapons for this type of combat, or it will be automatically turned off. - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 25 - - - #untrap Untrap something (trap, door, or chest). Default key is `M- u', and `u' if number_pad is on. @@ -1628,6 +1641,19 @@ #wield Wield a weapon. Default key is `w'. + + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 26 + + + #wipe Wipe off your face. Autocompletes. Default key is `M-w'. @@ -1642,18 +1668,6 @@ #wizgenesis Create a monster. May be prefixed by a count to create more - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 26 - - - than one. Autocompletes. Debug mode only. Default key is `^G'. @@ -1693,6 +1707,19 @@ #zap Zap a wand. Default key is `z'. + + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 27 + + + #? Help menu: get the list of available extended commands. @@ -1708,18 +1735,6 @@ behavior. On other systems, if typing "Alt" plus another key transmits a two character sequence consisting of an Escape fol- lowed by the other key, you may set the altmeta option to have - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 27 - - - NetHack combine them into meta+key. M-? #? (not supported by all platforms) @@ -1758,6 +1773,19 @@ M-q #quit + + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 28 + + + M-r #rub M-R #ride @@ -1776,18 +1804,6 @@ - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 28 - - - - - If the number_pad option is on, some additional letter com- mands are available: @@ -1825,6 +1841,17 @@ the lock with the `a' (apply) command, or by kicking it open with the `^D' (kick) command. + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 29 + + + Open doors cannot be entered diagonally; you must approach them straight on, horizontally or vertically. Doorways without doors are not restricted in this fashion. @@ -1837,21 +1864,6 @@ (search) command. Once found they are in all ways equivalent to normal doors. - - - - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 29 - - - 5.2. Traps (`^') There are traps throughout the dungeon to snare the unwary @@ -1894,6 +1906,18 @@ Ordinarily when you climb a set of stairs, you will arrive on the corresponding staircase at your destination. However, + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 30 + + + pets (see below) and some other monsters will follow along if they're close enough when you travel up or down stairs, and occa- sionally one of these creatures will displace you during the @@ -1904,20 +1928,6 @@ types of inter-level connections are nearly indistinguishable during game play. - - - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 30 - - - 5.4. Shops and shopping Occasionally you will run across a room with a shopkeeper @@ -1961,6 +1971,19 @@ * The price of a given item can vary due to a variety of factors. + + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 31 + + + * A shopkeeper treats the spot immediately inside the door as if it were outside the shop. @@ -1973,17 +1996,6 @@ * Shops do not get restocked with new items, regardless of inven- tory depletion. - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 31 - - - 6. Monsters Monsters you cannot see are not displayed on the screen. @@ -2026,6 +2038,18 @@ monster has moved and you don't wish to fight, you can use the `m' command to move without fighting; likewise, if you don't re- member a monster but want to try fighting anyway, you can use the + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 32 + + + `F' command. 6.2. Your pet @@ -2039,17 +2063,6 @@ feed it, too, by throwing it food. A properly trained pet can be very useful under certain circumstances. - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 32 - - - Your pet also gains experience from killing monsters, and can grow over time, gaining hit points and doing more damage. Initially, your pet may even be better at killing things than @@ -2091,6 +2104,18 @@ You may encounter the shades and corpses of other adventur- ers (or even former incarnations of yourself!) and their personal + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 33 + + + effects. Ghosts are hard to kill, but easy to avoid, since they're slow and do little damage. You can plunder the deceased adventurer's possessions; however, they are likely to be cursed. @@ -2105,17 +2130,6 @@ more will result in it disappearing from your map, similarly if it is the one who moved rather than you. - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 33 - - - However, if you encounter a monster which you can't see or sense -- perhaps it is invisible and has just tapped you on the noggin -- a special "remembered, unseen monster" marker will be @@ -2156,6 +2170,18 @@ When you pick up an object, it is assigned an inventory let- ter. Many commands that operate on objects must ask you to find + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 34 + + + out which object you want to use. When NetHack asks you to choose a particular object you are carrying, you are usually pre- sented with a list of inventory letters to choose from (see Com- @@ -2170,18 +2196,6 @@ When you use one of these objects, if its effect is obvious, NetHack will remember what it is for you. If its effect isn't extremely obvious, you will be asked what you want to call this - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 34 - - - type of object so you will recognize it later. You can also use the "#name" command, for the same purpose at any time, to name all objects of a particular type or just an individual object. @@ -2222,6 +2236,18 @@ distinguished in your inventory by the presence of the word "cursed", "uncursed" or "blessed" in the description of the item. In some cases "uncursed" will be omitted as being redundant when + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 35 + + + enough other information is displayed. The implicit_uncursed op- tion can be used to control this; toggle it off to have "un- cursed" be displayed even when that can be deduced from other at- @@ -2236,18 +2262,6 @@ exception; they normally do more damage with bare (or gloved) hands than they do with weapons. - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 35 - - - There are wielded weapons, like maces and swords, and thrown weapons, like arrows and spears. To hit monsters with a weapon, you must wield it and attack them, or throw it at them. You can @@ -2289,6 +2303,17 @@ mand which allows you to unwield the current weapon in addition to taking off other worn items. + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 36 + + + Those of you in the audience who are AD&D players, be aware that each weapon which existed in AD&D does roughly the same dam- age to monsters in NetHack. Some of the more obscure weapons @@ -2299,21 +2324,6 @@ `f' (fire, an alternate way of throwing), `Q' (quiver), `x' (ex- change), `X' (twoweapon), and "#enhance" (see below). - - - - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 36 - - - 7.2.1. Throwing and shooting You can throw just about anything via the `t' command. It @@ -2355,6 +2365,21 @@ in the same direction; if the first ones kill a monster, the oth- ers can still continue beyond that spot. + + + + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 37 + + + 7.2.2. Weapon proficiency You will have varying degrees of skill in the weapons avail- @@ -2368,18 +2393,6 @@ polearms. Each role has a limit on what level of proficiency a character can achieve for each group. For instance, wizards can become highly skilled in daggers or staves but not in swords or - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 37 - - - bows. The "#enhance" extended command is used to review current @@ -2421,6 +2434,18 @@ you stop -- or before you begin, for that matter -- wielding two weapons at once. The primary is your wielded weapon and the sec- ondary is just an item in your inventory that's been designated + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 38 + + + as alternate weapon.) If your primary weapon is wielded but your off hand is empty @@ -2433,19 +2458,6 @@ first wield the intended secondary, swap it to off hand, and then wield the primary. - - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 38 - - - The whole process can be simplified via use of the push- weapon option. When it is enabled, then using `w' to wield some- thing causes the currently wielded weapon to become your alter- @@ -2488,6 +2500,18 @@ leather jacket 9 no armor 10 + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 39 + + + You can also wear other pieces of armor (for example hel- mets, boots, shields, cloaks) to lower your armor class even fur- ther, but you can only wear one item of each category (one suit @@ -2500,18 +2524,6 @@ would give you better protection than normal chain mail, lowering your armor class one unit further to 4. When you put on a piece of armor, you immediately find out the armor class and any - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 39 - - - "plusses" it provides. Cursed pieces of armor usually have nega- tive enchantments (minuses) in addition to being unremovable. @@ -2554,6 +2566,18 @@ or "THANX MAUD" backwards). Scrolls disappear after you read them (except for blank ones, without magic spells on them). + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 40 + + + One of the most useful of these is the scroll of identify, which can be used to determine what another object is, whether it is cursed or blessed, and how many uses it has left. Some ob- @@ -2565,25 +2589,13 @@ feature on versions where NetHack mail delivery is triggered by electronic mail appearing in your system mailbox, you must let NetHack know where to look for new mail by setting the "MAIL" en- - vironment variable to the file name of your mailbox. You may - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 40 - - - - also want to set the "MAILREADER" environment variable to the - file name of your favorite reader, so NetHack can shell to it - when you read the scroll. On versions of NetHack where mail is - randomly generated internal to the game, these environment vari- - ables are ignored. You can disable the mail daemon by turning - off the mail option. + vironment variable to the file name of your mailbox. You may al- + so want to set the "MAILREADER" environment variable to the file + name of your favorite reader, so NetHack can shell to it when you + read the scroll. On versions of NetHack where mail is randomly + generated internal to the game, these environment variables are + ignored. You can disable the mail daemon by turning off the mail + option. The command to read a scroll is `r'. @@ -2620,6 +2632,18 @@ In a truly desperate situation, when your back is up against the wall, you might decide to go for broke and break your wand. + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 41 + + + This is not for the faint of heart. Doing so will almost cer- tainly cause a catastrophic release of magical energies. @@ -2632,18 +2656,6 @@ The command to use a wand is `z' (zap). To break one, use the `a' (apply) command. - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 41 - - - 7.8. Rings (`=') Rings are very useful items, since they are relatively per- @@ -2686,6 +2698,18 @@ lar to wands. To cast one at yourself, just give a `.' or `s' for the direction. A few spells require you to pick a target lo- cation rather than just specify a particular direction. Other + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 42 + + + spells don't require any direction or target. Just as weapons are divided into groups in which a character @@ -2699,17 +2723,6 @@ slots are shared with weapons skills. (See also the section on "Weapon proficiency".) - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 42 - - - Casting a spell also requires flexible movement, and wearing various types of armor may interfere with that. @@ -2750,6 +2763,19 @@ Like rings, amulets have various magical properties, some benefi- cial, some harmful, which are activated by putting them on. + + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 43 + + + Only one amulet may be worn at a time, around your neck. The commands to use amulets are the same as for rings, `P' @@ -2763,21 +2789,9 @@ you exit. Other small rocks are also categorized as gems, but they are - much less valuable. All rocks, however, can be used as - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 43 - - - - projectile weapons (if you have a sling). In the most desperate - of cases, you can still throw them by hand. + much less valuable. All rocks, however, can be used as projec- + tile weapons (if you have a sling). In the most desperate of + cases, you can still throw them by hand. 7.13. Large rocks (``') @@ -2815,6 +2829,19 @@ then once you see or feel that location again you will re-discov- er the object and resume remembering it. + + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 44 + + + The situation is the same for a pile of objects, except that only the top item of the pile is displayed. The hilite_pile op- tion can be enabled in order to show an item differently when it @@ -2830,18 +2857,6 @@ action which breaks a challenge, it will no longer be listed. This gives players extra "bragging rights" for winning the game with these challenges. Note that it is perfectly acceptable to - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 44 - - - win the game without resorting to these restrictions and that it is unusual for players to adhere to challenges the first time they win the game. @@ -2881,6 +2896,18 @@ corpse. Eating leather, dragon hide, or bone items while poly- morphed into a creature that can digest it, or eating monster brains while polymorphed into a mind flayer, is considered eating + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 45 + + + an animal, although wax is only an animal byproduct. Regardless of conduct, there will be some items which are @@ -2896,18 +2923,6 @@ "fruits", although they could be anything from "cherries" to "pork chops", are also assumed to be vegan. - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 45 - - - An atheist is one who rejects religion. This means that you cannot #pray, #offer sacrifices to any god, #turn undead, or #chat with a priest. Particularly selective readers may argue @@ -2947,6 +2962,18 @@ may respond with the monster type "none" if you want to decline. You can change the form of an item into another item of the same type ("polypiling") or the form of your own body into another + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 46 + + + creature ("polyself") by wand, spell, or potion of polymorph; avoiding these effects are each considered challenges. Polymor- phing monsters, including pets, does not break either of these @@ -2963,17 +2990,6 @@ NetHack should do things, there are options you can set to change how NetHack behaves. - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 46 - - - 9.1. Setting the options Options may be set in a number of ways. Within the game, @@ -3011,8 +3027,20 @@ Any line beginning with `[' and ending in `]' is considered a section marker. The text between the square brackets is the section name. Lines after a section marker belong to that sec- - tion, and are ignored unless a CHOOSE statement was used to se- - lect that section. Section names are case insensitive. + tion, and are ignored unless a CHOOSE statement was used to + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 47 + + + + select that section. Section names are case insensitive. You can use different configuration statements in the file, some of which can be used multiple times. In general, the state- @@ -3028,18 +3056,6 @@ "no" or `!' to turn it off. For compound options, the option name and value are separated by a colon. Some options are per- sistent, and apply only to new games. You can specify multiple - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 47 - - - OPTIONS statements, and multiple options separated by commas in a single OPTIONS statement. (Comma separated options are pro- cessed from right to left.) @@ -3078,6 +3094,18 @@ AUTOCOMPLETE Enable or disable an extended command autocompletion. Autocom- pletion has no effect for the X11 windowport. You can specify + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 48 + + + multiple autocompletions. To enable autocompletion, list the extended command. Prefix the command with "!" to disable the autocompletion for that command. @@ -3094,18 +3122,6 @@ Change the key bindings of some special keys, menu accelera- tors, or extended commands. You can specify multiple bindings. Format is key followed by the command, separated by a colon. - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 48 - - - See the "Changing Key Bindings" section for more information. Example: @@ -3145,6 +3161,17 @@ Define the directory that contains the sound files. See the "Configuring User Sounds" section. + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 49 + + + SYMBOLS Override one or more symbols in the symbol set used for all dungeon levels except for the special rogue level. See the @@ -3161,17 +3188,6 @@ names, one per line, up to a maximum of 128 lines. Each line is processed by the function that handles wishing. - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 49 - - - Example: WIZKIT=~/wizkit.txt @@ -3209,6 +3225,19 @@ equals sign, and then the value of the string. The value is ter- minated by the next comma or the end of string. + + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 50 + + + For example, to set up an environment variable so that color is on, legacy is off, character name is set to "Blue Meanie", and named fruit is set to "lime", you would enter the command @@ -3226,18 +3255,6 @@ The NETHACKOPTIONS value is effectively the same as a single OPTIONS statement in a configuration file. The "OPTIONS=" prefix is implied and comma separated options are processed from right - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 50 - - - to left. Other types of configuration statements such as BIND or MSGTYPE are not allowed. @@ -3276,6 +3293,17 @@ get a location on the map (default true). The whatis_coord op- tion controls whether the description includes map coordinates. + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 51 + + + autodig Automatically dig if you are wielding a digging tool and moving into a place that can be dug (default false). Persistent. @@ -3292,18 +3320,6 @@ This option controls what happens when you attempt the `f' (fire) command when nothing is quivered or readied (default false). When true, the computer will fill your quiver or - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 51 - - - quiver sack or make ready some suitable weapon. Note that it will not take into account the blessed/cursed status, enchant- ment, damage, or quality of the weapon; you are free to manual- @@ -3343,6 +3359,17 @@ up looking like insufficient space). Only applies when MFLOPPY was defined during compilation. + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 52 + + + clicklook Allows looking at things on the screen by navigating the mouse over them and clicking the right mouse button (default off). @@ -3359,17 +3386,6 @@ dark_room Show out-of-sight areas of lit rooms (default on). Persistent. - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 52 - - - disclose Controls what information the program reveals when the game ends. Value is a space separated list of prompting/category @@ -3409,6 +3425,17 @@ Order of the disclosure categories does not matter, program display for end-of-game disclosure follows a set sequence. + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 53 + + + (for example "disclose:yi na +v -g o") The example sets inven- tory to prompt and default to yes, attributes to prompt and de- fault to no, vanquished to disclose without prompting, genocid- @@ -3424,18 +3451,6 @@ Name your starting dog (for example "dogname:Fang"). Cannot be set with the `O' command. - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 53 - - - extmenu Changes the extended commands interface to pop-up a menu of available commands. It is keystroke compatible with the tradi- @@ -3475,6 +3490,18 @@ option will take precedence. The default is to randomly pick an appropriate gender. If you prefix the value with `!' or "no", you will exclude that gender from being picked randomly. + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 54 + + + Cannot be set with the `O' command. Persistent. goldX @@ -3490,18 +3517,6 @@ the `/' command, ask if you want to see it (default on). Turn- ing help off makes just looking at things faster, since you aren't interrupted with the "More info?" prompt, but it also - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 54 - - - means that you might miss some interesting and/or important in- formation. Persistent. @@ -3542,6 +3557,17 @@ Ignore interrupt signals, including breaks (default off). Per- sistent. + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 55 + + + implicit_uncursed Omit "uncursed" from inventory lists, if possible (default on). @@ -3556,18 +3582,6 @@ lootabc When using a menu to interact with a container, use the old `a', `b', and `c' keyboard shortcuts rather than the mnemonics - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 55 - - - `o', `i', and `b' (default off). Persistent. mail @@ -3609,6 +3623,17 @@ of a menu. Implemented by the Amiga, Gem and tty ports. De- fault `\'. + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 56 + + + menu_first_page Menu character accelerator to jump to the first page in a menu. Implemented by the Amiga, Gem and tty ports. Default `^'. @@ -3622,18 +3647,6 @@ Menu character accelerator to invert all items in a menu. Im- plemented by the Amiga, Gem, X11 and tty ports. Default `@'. - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 56 - - - menu_invert_page Menu character accelerator to invert all items on this page of a menu. Implemented by the Amiga, Gem and tty ports. Default @@ -3675,6 +3688,18 @@ monpolycontrol Prompt for new form whenever any monster changes shape (default + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 57 + + + off). Debug mode only. mouse_support @@ -3688,18 +3713,6 @@ Omitting a value is the same as specifying 1 and negating mouse_support is the same as specifying 0. - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 57 - - - msghistory The number of top line messages to keep (and be able to recall with `^P') (default 20). Cannot be set with the `O' command. @@ -3742,6 +3755,17 @@ Use digit keys instead of letters to move (default 0 or off). Valid settings are: + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 58 + + + 0 - move by letters; "yuhjklbn" 1 - move by numbers; digit `5' acts as `G' movement prefix 2 - like 1 but `5' works as `g' prefix instead of as `G' @@ -3753,23 +3777,11 @@ specifying 1 and negating number_pad is the same as specifying 0. (Settings 2 and 4 are for compatibility with MS-DOS or old PC Hack; in addition to the different behavior for `5', `Alt-5' - acts as `G' and `Alt-0' acts as `I'. Setting -1 is to - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 58 - - - - accommodate some QWERTZ keyboards which have the location of - the `y' and `z' keys swapped.) When moving by numbers, to en- - ter a count prefix for those commands which accept one (such as - "12s" to search twelve times), precede it with the letter `n' + acts as `G' and `Alt-0' acts as `I'. Setting -1 is to accommo- + date some QWERTZ keyboards which have the location of the `y' + and `z' keys swapped.) When moving by numbers, to enter a + count prefix for those commands which accept one (such as "12s" + to search twelve times), precede it with the letter `n' ("n12s"). packorder @@ -3798,31 +3810,19 @@ ing a peaceful monster; wand-break - require "yes" rather than `y' to confirm breaking a wand; + eating - require "yes" rather than `y' to confirm whether + to continue eating; Were-change - require "yes" rather than `y' to confirm changing - form due to lycanthropy when hero has polymorph + form due to lycanthropy when hero has polymorph control; - pray - require `y' to confirm an attempt to pray rather + pray - require `y' to confirm an attempt to pray rather than immediately praying; on by default; - Remove - require selection from inventory for `R' and `T' - commands even when wearing just one applicable + Remove - require selection from inventory for `R' and `T' + commands even when wearing just one applicable item. - all - turn on all of the above. - - By default, the pray choice is enabled, the others disabled. - To disable it without setting any of the other choices, use - "paranoid_confirmation:none". To keep it enabled while setting - any of the others, include it in the list, such as "para- - noid_confirmation:attack pray Remove". - - perm_invent - If true, always display your current inventory in a window. - This only makes sense for windowing system interfaces that im- - plement this feature. - - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -3832,9 +3832,22 @@ + all - turn on all of the above. + + By default, the pray choice is enabled, the others disabled. + To disable it without setting any of the other choices, use + "paranoid_confirmation:none". To keep it enabled while setting + any of the others, include it in the list, such as "para- + noid_confirmation:attack pray Remove". + + perm_invent + If true, always display your current inventory in a window. + This only makes sense for windowing system interfaces that im- + plement this feature. + petattr - Specifies one or more text highlighting attributes to use when - showing pets on the map. Effectively a superset of the + Specifies one or more text highlighting attributes to use when + showing pets on the map. Effectively a superset of the hilite_pet boolean option. Curses interface only; value is one or more of the following letters. @@ -3848,47 +3861,34 @@ l - Left line indicator r - Right line indicator - Some of those choices might not work, particularly the final - three, depending upon terminal hardware or terminal emulation + Some of those choices might not work, particularly the final + three, depending upon terminal hardware or terminal emulation software. - Currently multiple highlight-style letters can be combined by - simply stringing them together (for example, "bk"), but in the - future they might require being separated by plus signs (such - as "b+k", which works already). When using the `n' choice, it - should be specified on its own, not in combination with any of + Currently multiple highlight-style letters can be combined by + simply stringing them together (for example, "bk"), but in the + future they might require being separated by plus signs (such + as "b+k", which works already). When using the `n' choice, it + should be specified on its own, not in combination with any of the other letters. pettype - Specify the type of your initial pet, if you are playing a - character class that uses multiple types of pets; or choose to - have no initial pet at all. Possible values are "cat", "dog", + Specify the type of your initial pet, if you are playing a + character class that uses multiple types of pets; or choose to + have no initial pet at all. Possible values are "cat", "dog", "horse", and "none". If the choice is not allowed for the role - you are currently playing, it will be silently ignored. For - example, "horse" will only be honored when playing a knight. + you are currently playing, it will be silently ignored. For + example, "horse" will only be honored when playing a knight. Cannot be set with the `O' command. pickup_burden - When you pick up an item that would exceed this encumbrance - level (Unencumbered, Burdened, streSsed, straiNed, overTaxed, - or overLoaded), you will be asked if you want to continue. + When you pick up an item that would exceed this encumbrance + level (Unencumbered, Burdened, streSsed, straiNed, overTaxed, + or overLoaded), you will be asked if you want to continue. (Default `S'). Persistent. - pickup_thrown - If this option is on and autopickup is also on, try to pick up - things that you threw, even if they aren't in pickup_types or - match an autopickup exception. Default is on. Persistent. - pickup_types - Specify the object types to be picked up when autopickup is on. - Default is all types. You can use autopickup_exception config- - uration file lines to further refine autopickup behavior. Per- - sistent. - - - - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -3898,63 +3898,63 @@ + pickup_thrown + If this option is on and autopickup is also on, try to pick up + things that you threw, even if they aren't in pickup_types or + match an autopickup exception. Default is on. Persistent. + + pickup_types + Specify the object types to be picked up when autopickup is on. + Default is all types. You can use autopickup_exception config- + uration file lines to further refine autopickup behavior. Per- + sistent. + pile_limit - When walking across a pile of objects on the floor, threshold - at which the message "there are few/several/many objects here" - is given instead of showing a popup list of those objects. A - value of 0 means "no limit" (always list the objects); a value - of 1 effectively means "never show the objects" since the pile - size will always be at least that big; default value is 5. + When walking across a pile of objects on the floor, threshold + at which the message "there are few/several/many objects here" + is given instead of showing a popup list of those objects. A + value of 0 means "no limit" (always list the objects); a value + of 1 effectively means "never show the objects" since the pile + size will always be at least that big; default value is 5. Persistent. playmode - Values are "normal", "explore", or "debug". Allows selection - of explore mode (also known as discovery mode) or debug mode + Values are "normal", "explore", or "debug". Allows selection + of explore mode (also known as discovery mode) or debug mode (also known as wizard mode) instead of normal play. Debug mode - might only be allowed for someone logged in under a particular - user name (on multi-user systems) or specifying a particular + might only be allowed for someone logged in under a particular + user name (on multi-user systems) or specifying a particular character name (on single-user systems) or it might be disabled - entirely. Requesting it when not allowed or not possible re- + entirely. Requesting it when not allowed or not possible re- sults in explore mode instead. Default is normal play. pushweapon - Using the `w' (wield) command when already wielding something - pushes the old item into your alternate weapon slot (default - off). Likewise for the `a' (apply) command if it causes the + Using the `w' (wield) command when already wielding something + pushes the old item into your alternate weapon slot (default + off). Likewise for the `a' (apply) command if it causes the applied item to become wielded. Persistent. race Selects your race (for example, "race:human"). Default is ran- - dom. If you prefix the value with `!' or "no", you will ex- + dom. If you prefix the value with `!' or "no", you will ex- clude that race from being picked randomly. Cannot be set with the `O' command. Persistent. rest_on_space - Make the space bar a synonym for the `.' (#wait) command (de- + Make the space bar a synonym for the `.' (#wait) command (de- fault off). Persistent. role - Pick your type of character (for example "role:Samurai"); syn- - onym for "character". See "name" for an alternate method of - specifying your role. Normally only the first letter of the - value is examined; `r' is an exception with "Rogue", "Ranger", + Pick your type of character (for example "role:Samurai"); syn- + onym for "character". See "name" for an alternate method of + specifying your role. Normally only the first letter of the + value is examined; `r' is an exception with "Rogue", "Ranger", and "random" values. If you prefix the value with `!' or "no", - you will exclude that role from being picked randomly. Cannot + you will exclude that role from being picked randomly. Cannot be set with the `O' command. Persistent. - roguesymset - This option may be used to select one of the named symbol sets - found within "symbols" to alter the symbols displayed on the - screen on the rogue level. - rlecomp - When writing out a save file, perform run length compression of - the map. Not all ports support run length compression. It has - no effect on reading an existing save file. - - - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -3964,10 +3964,20 @@ + roguesymset + This option may be used to select one of the named symbol sets + found within "symbols" to alter the symbols displayed on the + screen on the rogue level. + + rlecomp + When writing out a save file, perform run length compression of + the map. Not all ports support run length compression. It has + no effect on reading an existing save file. + runmode - Controls the amount of screen updating for the map window when - engaged in multi-turn movement (running via shift+direction or - control+direction and so forth, or via the travel command or + Controls the amount of screen updating for the map window when + engaged in multi-turn movement (running via shift+direction or + control+direction and so forth, or via the travel command or mouse click). The possible values are: teleport - update the map after movement has finished; @@ -3976,13 +3986,13 @@ crawl - like walk, but pause briefly after each step. This option only affects the game's screen display, not the ac- - tual results of moving. The default is "run"; versions prior - to 3.4.1 used "teleport" only. Whether or not the effect is + tual results of moving. The default is "run"; versions prior + to 3.4.1 used "teleport" only. Whether or not the effect is noticeable will depend upon the window port used or on the type of terminal. Persistent. safe_pet - Prevent you from (knowingly) attacking your pets (default on). + Prevent you from (knowingly) attacking your pets (default on). Persistent. sanity_check @@ -3990,8 +4000,8 @@ off). Debug mode only. scores - Control what parts of the score list you are shown at the end - (for example "scores:5 top scores/4 around my score/own + Control what parts of the score list you are shown at the end + (for example "scores:5 top scores/4 around my score/own scores"). Only the first letter of each category (`t', `a', or `o') is necessary. Persistent. @@ -4000,27 +4010,17 @@ off). Persistent. showrace - Display yourself as the glyph for your race, rather than the - glyph for your role (default off). Note that this setting af- - fects only the appearance of the display, not the way the game + Display yourself as the glyph for your race, rather than the + glyph for your role (default off). Note that this setting af- + fects only the appearance of the display, not the way the game treats you. Persistent. showscore Show your approximate accumulated score on bottom line (default off). Persistent. - silent - Suppress terminal beeps (default on). Persistent. - sortloot - Controls the sorting behavior of the pickup lists for inventory - and #loot commands and some others. Persistent. The possible - values are: - - full - always sort the lists; - - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -4030,63 +4030,63 @@ - loot - only sort the lists that don't use inventory letters, + silent + Suppress terminal beeps (default on). Persistent. + + sortloot + Controls the sorting behavior of the pickup lists for inventory + and #loot commands and some others. Persistent. The possible + values are: + + full - always sort the lists; + loot - only sort the lists that don't use inventory letters, like with the #loot and pickup commands; none - show lists the traditional way without sorting. sortpack - Sort the pack contents by type when displaying inventory (de- + Sort the pack contents by type when displaying inventory (de- fault on). Persistent. sparkle Display a sparkly effect when a monster (including yourself) is - hit by an attack to which it is resistant (default on). Per- + hit by an attack to which it is resistant (default on). Per- sistent. standout Boldface monsters and "--More--" (default off). Persistent. statushilites - Controls how many turns status hilite behaviors highlight the - field. If negated or set to zero, disables status hiliting. + Controls how many turns status hilite behaviors highlight the + field. If negated or set to zero, disables status hiliting. See "Configuring Status Hilites" for further information. status_updates - Allow updates to the status lines at the bottom of the screen + Allow updates to the status lines at the bottom of the screen (default true). suppress_alert - This option may be set to a NetHack version level to suppress - alert notification messages about feature changes for that and + This option may be set to a NetHack version level to suppress + alert notification messages about feature changes for that and prior versions (for example "suppress_alert:3.3.1"). symset - This option may be used to select one of the named symbol sets - found within "symbols" to alter the symbols displayed on the - screen. Use "symset:default" to explicitly select the default + This option may be used to select one of the named symbol sets + found within "symbols" to alter the symbols displayed on the + screen. Use "symset:default" to explicitly select the default symbols. time - Show the elapsed game time in turns on bottom line (default + Show the elapsed game time in turns on bottom line (default off). Persistent. timed_delay - When pausing momentarily for display effect, such as with ex- - plosions and moving objects, use a timer rather than sending - extra characters to the screen. (Applies to "tty" interface - only; "X11" interface always uses a timer based delay. The de- - fault is on if configured into the program.) Persistent. - - tombstone - Draw a tombstone graphic upon your death (default on). Persis- - tent. - - toptenwin - Put the ending display in a NetHack window instead of on stdout - (default off). Setting this option makes the score list + When pausing momentarily for display effect, such as with ex- + plosions and moving objects, use a timer rather than sending + extra characters to the screen. (Applies to "tty" interface + only; "X11" interface always uses a timer based delay. The - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -4096,23 +4096,32 @@ - visible when a windowing version of NetHack is started without - a parent window, but it no longer leaves the score list around + default is on if configured into the program.) Persistent. + + tombstone + Draw a tombstone graphic upon your death (default on). Persis- + tent. + + toptenwin + Put the ending display in a NetHack window instead of on stdout + (default off). Setting this option makes the score list visi- + ble when a windowing version of NetHack is started without a + parent window, but it no longer leaves the score list around after game end on a terminal or emulating window. travel Allow the travel command (default on). Turning this option off - will prevent the game from attempting unintended moves if you + will prevent the game from attempting unintended moves if you make inadvertent mouse clicks on the map window. Persistent. verbose - Provide more commentary during the game (default on). Persis- + Provide more commentary during the game (default on). Persis- tent. whatis_coord - When using the `/' or `;' commands to look around on the map - with autodescribe on, display coordinates after the descrip- - tion. Also works in other situations where you are asked to + When using the `/' or `;' commands to look around on the map + with autodescribe on, display coordinates after the descrip- + tion. Also works in other situations where you are asked to pick a location. The possible settings are: @@ -4129,30 +4138,21 @@ whatis_filter When getting a location on the map, and using the keys to cycle - through next and previous targets, allows filtering the possi- + through next and previous targets, allows filtering the possi- ble targets. n - no filtering [default] v - in view only a - in same area only - The area-filter tries to be slightly predictive -- if you're + The area-filter tries to be slightly predictive -- if you're standing on a doorway, it will consider the area on the side of the door you were last moving towards. - Filtering can also be changed when getting a location with the - "getpos.filter" key. - - whatis_menu - When getting a location on the map, and using a key to cycle - through next and previous targets, use a menu instead to pick a - target. (default off) - - whatis_moveskip - When getting a location on the map, and using shifted movement - NetHack 3.6 November 17, 2019 + + NetHack 3.6 November 27, 2019 @@ -4162,19 +4162,29 @@ + Filtering can also be changed when getting a location with the + "getpos.filter" key. + + whatis_menu + When getting a location on the map, and using a key to cycle + through next and previous targets, use a menu instead to pick a + target. (default off) + + whatis_moveskip + When getting a location on the map, and using shifted movement keys or meta-digit keys to fast-move, instead of moving 8 units at a time, move by skipping the same glyphs. (default off) windowtype When the program has been built to support multiple interfaces, - select which one to use, such as "tty" or "X11" (default de- + select which one to use, such as "tty" or "X11" (default de- pends on build-time settings; use "#version" to check). Cannot be set with the `O' command. - When used, it should be the first option set since its value - might enable or disable the availability of various other op- - tions. For multiple lines in a configuration file, that would - be the first non-comment line. For a comma-separated list in + When used, it should be the first option set since its value + might enable or disable the availability of various other op- + tions. For multiple lines in a configuration file, that would + be the first non-comment line. For a comma-separated list in NETHACKOPTIONS or an OPTIONS line in a configuration file, that would be the rightmost option in the list. @@ -4183,42 +4193,32 @@ off). Debug mode only. zerocomp - When writing out a save file, perform zero-comp compression of - the contents. Not all ports support zero-comp compression. It + When writing out a save file, perform zero-comp compression of + the contents. Not all ports support zero-comp compression. It has no effect on reading an existing save file. 9.5. Window Port Customization options - Here are explanations of the various options that are used - to customize and change the characteristics of the windowtype + Here are explanations of the various options that are used + to customize and change the characteristics of the windowtype that you have chosen. Character strings that are too long may be - truncated. Not all window ports will adjust for all settings - listed here. You can safely add any of these options to your - configuration file, and if the window port is capable of adjust- - ing to suit your preferences, it will attempt to do so. If it - can't it will silently ignore it. You can find out if an option - is supported by the window port that you are currently using by + truncated. Not all window ports will adjust for all settings + listed here. You can safely add any of these options to your + configuration file, and if the window port is capable of adjust- + ing to suit your preferences, it will attempt to do so. If it + can't it will silently ignore it. You can find out if an option + is supported by the window port that you are currently using by checking to see if it shows up in the Options list. Some options - are dynamic and can be specified during the game with the `O' + are dynamic and can be specified during the game with the `O' command. align_message - Where to align or place the message window (top, bottom, left, + Where to align or place the message window (top, bottom, left, or right) - align_status - Where to align or place the status window (top, bottom, left, - or right). - - ascii_map - If NetHack can, it should display an ascii character map if it - can. - - color - If NetHack can, it should display color if it can for different - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -4228,11 +4228,21 @@ + align_status + Where to align or place the status window (top, bottom, left, + or right). + + ascii_map + If NetHack can, it should display an ascii character map if it + can. + + color + If NetHack can, it should display color if it can for different monsters, objects, and dungeon features. eight_bit_tty - If NetHack can, it should pass eight-bit character values (for - example, specified with the traps option) straight through to + If NetHack can, it should pass eight-bit character values (for + example, specified with the traps option) straight through to your terminal (default off). font_map @@ -4240,7 +4250,7 @@ map window. font_menu - If NetHack can, it should use a font by the chosen name for + If NetHack can, it should use a font by the chosen name for menu windows. font_message @@ -4252,39 +4262,29 @@ status window. font_text - If NetHack can, it should use a font by the chosen name for + If NetHack can, it should use a font by the chosen name for text windows. font_size_map - If NetHack can, it should use this size font for the map win- + If NetHack can, it should use this size font for the map win- dow. font_size_menu If NetHack can, it should use this size font for menu windows. font_size_message - If NetHack can, it should use this size font for the message + If NetHack can, it should use this size font for the message window. font_size_status - If NetHack can, it should use this size font for the status + If NetHack can, it should use this size font for the status window. font_size_text If NetHack can, it should use this size font for text windows. - fullscreen - If NetHack can, it should try and display on the entire screen - rather than in a window. - guicolor - Use color text and/or highlighting attributes when displaying - some non-map data (such as menu selector letters). Curses in- - terface only; default is on. - - - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -4294,15 +4294,24 @@ + fullscreen + If NetHack can, it should try and display on the entire screen + rather than in a window. + + guicolor + Use color text and/or highlighting attributes when displaying + some non-map data (such as menu selector letters). Curses in- + terface only; default is on. + large_font If NetHack can, it should use a large font. map_mode - If NetHack can, it should display the map in the manner speci- + If NetHack can, it should display the map in the manner speci- fied. player_selection - If NetHack can, it should pop up dialog boxes, or use prompts + If NetHack can, it should pop up dialog boxes, or use prompts for character selection. popup_dialog @@ -4310,27 +4319,27 @@ preload_tiles If NetHack can, it should preload tiles into memory. For exam- - ple, in the protected mode MS-DOS version, control whether - tiles get pre-loaded into RAM at the start of the game. Doing - so enhances performance of the tile graphics, but uses more + ple, in the protected mode MS-DOS version, control whether + tiles get pre-loaded into RAM at the start of the game. Doing + so enhances performance of the tile graphics, but uses more memory. (default on). Cannot be set with the `O' command. scroll_amount - If NetHack can, it should scroll the display by this number of + If NetHack can, it should scroll the display by this number of cells when the hero reaches the scroll_margin. scroll_margin - If NetHack can, it should scroll the display when the hero or - cursor is this number of cells away from the edge of the win- + If NetHack can, it should scroll the display when the hero or + cursor is this number of cells away from the edge of the win- dow. selectsaved - If NetHack can, it should display a menu of existing saved + If NetHack can, it should display a menu of existing saved games for the player to choose from at game startup, if it can. Not all ports support this option. softkeyboard - Display an onscreen keyboard. Handhelds are most likely to + Display an onscreen keyboard. Handhelds are most likely to support this option. splash_screen @@ -4338,19 +4347,10 @@ it starts up (default yes). statuslines - Number of lines for traditional below-the-map status display. - Acceptable values are 2 and 3 (default is 2). Curses and tty - interfaces only. - - term_cols and - - term_rows - Curses interface only. Number of columns and rows to use for - the display. Curses will attempt to resize to the values spec- - ified but will settle for smaller sizes if they are too big. + Number of lines for traditional below-the-map status display. - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -4360,17 +4360,26 @@ + Acceptable values are 2 and 3 (default is 2). Curses and tty + interfaces only. + + term_cols and + + term_rows + Curses interface only. Number of columns and rows to use for + the display. Curses will attempt to resize to the values spec- + ified but will settle for smaller sizes if they are too big. Default is the current window size. tiled_map If NetHack can, it should display a tiled map if it can. tile_file - Specify the name of an alternative tile file to override the + Specify the name of an alternative tile file to override the default. tile_height - Specify the preferred height of each tile in a tile capable + Specify the preferred height of each tile in a tile capable port. tile_width @@ -4380,43 +4389,34 @@ Use bold black instead of blue for black glyphs (TTY only). use_inverse - If NetHack can, it should display inverse when the game speci- + If NetHack can, it should display inverse when the game speci- fies it. vary_msgcount - If NetHack can, it should display this number of messages at a + If NetHack can, it should display this number of messages at a time in the message window. windowborders - Whether to draw boxes around the map, status area, message - area, and persistent inventory window if enabled. Curses in- + Whether to draw boxes around the map, status area, message + area, and persistent inventory window if enabled. Curses in- terface only. Acceptable values are 0 - off, never show borders 1 - on, always show borders 2 - auto, on if display is at least (24+2)x(80+2) (default) - (The 26x82 size threshold for `2' refers to number of rows and - columns of the display. A width of at least 110 columns + (The 26x82 size threshold for `2' refers to number of rows and + columns of the display. A width of at least 110 columns (80+2+26+2) is needed for align_status set to left or right.) windowcolors - If NetHack can, it should display windows with the specified + If NetHack can, it should display windows with the specified foreground/background colors. Windows GUI only. The format is - OPTION=windowcolors:wintype foreground/background - - where wintype is one of "menu", "message", "status", or - "text", and foreground and background are colors, either a hexa- - decimal \'#rrggbb', one of the named colors (black, red, green, - brown, blue, magenta, cyan, orange, brightgreen, yellow, bright- - blue, brightmagenta, brightcyan, white, trueblack, gray, purple, - silver, maroon, fuchsia, lime, olive, navy, teal, aqua), or one - of Windows UI colors (activeborder, activecaption, appworkspace, - background, btnface, btnshadow, btntext, captiontext, graytext, - NetHack 3.6 November 17, 2019 + + NetHack 3.6 November 27, 2019 @@ -4426,8 +4426,18 @@ - greytext, highlight, highlighttext, inactiveborder, inactivecap- - tion, menu, menutext, scrollbar, window, windowframe, window- + OPTION=windowcolors:wintype foreground/background + + where wintype is one of "menu", "message", "status", or + "text", and foreground and background are colors, either a hexa- + decimal \'#rrggbb', one of the named colors (black, red, green, + brown, blue, magenta, cyan, orange, brightgreen, yellow, bright- + blue, brightmagenta, brightcyan, white, trueblack, gray, purple, + silver, maroon, fuchsia, lime, olive, navy, teal, aqua), or one + of Windows UI colors (activeborder, activecaption, appworkspace, + background, btnface, btnshadow, btntext, captiontext, graytext, + greytext, highlight, highlighttext, inactiveborder, inactivecap- + tion, menu, menutext, scrollbar, window, windowframe, window- text). wraptext @@ -4436,12 +4446,12 @@ 9.6. Platform-specific Customization options - Here are explanations of options that are used by specific + Here are explanations of options that are used by specific platforms or ports to customize and change the port behavior. altkeyhandler - Select an alternate keystroke handler dll to load (Win32 tty - NetHack only). The name of the handler is specified without + Select an alternate keystroke handler dll to load (Win32 tty + NetHack only). The name of the handler is specified without the .dll extension and without any path information. Cannot be set with the `O' command. @@ -4451,25 +4461,37 @@ altmeta On other (non-Amiga) systems where this option is available, it - can be set to tell NetHack to convert a two character sequence - beginning with ESC into a meta-shifted version of the second + can be set to tell NetHack to convert a two character sequence + beginning with ESC into a meta-shifted version of the second character (default off). - This conversion is only done for commands, not for other input + This conversion is only done for commands, not for other input prompts. Note that typing one or more digits as a count prefix prior to a command -- preceded by n if the number_pad option is - set -- is also subject to this conversion, so attempting to - abort the count by typing ESC will leave NetHack waiting for + set -- is also subject to this conversion, so attempting to + abort the count by typing ESC will leave NetHack waiting for another character to complete the two character sequence. Type - a second ESC to finish cancelling such a count. At other + a second ESC to finish cancelling such a count. At other prompts a single ESC suffices. BIOS Use BIOS calls to update the screen display quickly and to read - the keyboard (allowing the use of arrow keys to move) on ma- - chines with an IBM PC compatible BIOS ROM (default off, OS/2, + the keyboard (allowing the use of arrow keys to move) on ma- + chines with an IBM PC compatible BIOS ROM (default off, OS/2, PC, and ST NetHack only). + + + NetHack 3.6 November 27, 2019 + + + + + + NetHack Guidebook 69 + + + flush (default off, Amiga NetHack only). @@ -4479,24 +4501,11 @@ page_wait (default on, Mac NetHack only). - - - - NetHack 3.6 November 17, 2019 - - - - - - NetHack Guidebook 69 - - - rawio - Force raw (non-cbreak) mode for faster output and more bullet- - proof input (MS-DOS sometimes treats `^P' as a printer toggle - without it) (default off, OS/2, PC, and ST NetHack only). - Note: DEC Rainbows hang if this is turned on. Cannot be set + Force raw (non-cbreak) mode for faster output and more bullet- + proof input (MS-DOS sometimes treats `^P' as a printer toggle + without it) (default off, OS/2, PC, and ST NetHack only). + Note: DEC Rainbows hang if this is turned on. Cannot be set with the `O' command. soundcard @@ -4504,51 +4513,42 @@ mand. subkeyvalue - (Win32 tty NetHack only). May be used to alter the value of + (Win32 tty NetHack only). May be used to alter the value of keystrokes that the operating system returns to NetHack to help - compensate for international keyboard issues. OPTIONS=subkey- - value:171/92 will return 92 to NetHack, if 171 was originally - going to be returned. You can use multiple subkeyvalue state- - ments in the configuration file if needed. Cannot be set with + compensate for international keyboard issues. OPTIONS=subkey- + value:171/92 will return 92 to NetHack, if 171 was originally + going to be returned. You can use multiple subkeyvalue state- + ments in the configuration file if needed. Cannot be set with the `O' command. video Set the video mode used (PC NetHack only). Values are "autode- - tect", "default", or "vga". Setting "vga" (or "autodetect" - with vga hardware present) will cause the game to display + tect", "default", or "vga". Setting "vga" (or "autodetect" + with vga hardware present) will cause the game to display tiles. Cannot be set with the `O' command. videocolors - Set the color palette for PC systems using NO_TERMS (default - 4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order - of colors is red, green, brown, blue, magenta, cyan, - bright.white, bright.red, bright.green, yellow, bright.blue, - bright.magenta, and bright.cyan. Cannot be set with the `O' + Set the color palette for PC systems using NO_TERMS (default + 4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order + of colors is red, green, brown, blue, magenta, cyan, + bright.white, bright.red, bright.green, yellow, bright.blue, + bright.magenta, and bright.cyan. Cannot be set with the `O' command. videoshades Set the intensity level of the three gray scales available (de- fault dark normal light, PC NetHack only). If the game display - is difficult to read, try adjusting these scales; if this does - not correct the problem, try !color. Cannot be set with the + is difficult to read, try adjusting these scales; if this does + not correct the problem, try !color. Cannot be set with the `O' command. 9.7. Regular Expressions - Regular expressions are normally POSIX extended regular ex- - pressions. It is possible to compile NetHack without regular ex- - pression support on a platform where there is no regular expres- - sion library. While this is not true of any modern platform, if - your NetHack was built this way, patterns are instead glob pat- - terns. This applies to Autopickup exceptions, Message types, Menu - colors, and User sounds. + Regular expressions are normally POSIX extended regular ex- + pressions. It is possible to compile NetHack without regular - - - - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -4558,34 +4558,40 @@ + expression support on a platform where there is no regular ex- + pression library. While this is not true of any modern platform, + if your NetHack was built this way, patterns are instead glob + patterns. This applies to Autopickup exceptions, Message types, + Menu colors, and User sounds. + 9.8. Configuring Autopickup Exceptions You can further refine the behavior of the autopickup option beyond what is available through the pickup_types option. - By placing autopickup_exception lines in your configuration - file, you can define patterns to be checked when the game is + By placing autopickup_exception lines in your configuration + file, you can define patterns to be checked when the game is about to autopickup something. autopickup_exception - Sets an exception to the pickup_types option. The autopick- - up_exception option should be followed by a regular expression - to be used as a pattern to match against the singular form of + Sets an exception to the pickup_types option. The autopick- + up_exception option should be followed by a regular expression + to be used as a pattern to match against the singular form of the description of an object at your location. - In addition, some characters are treated specially if they oc- + In addition, some characters are treated specially if they oc- cur as the first character in the pattern, specifically: < - always pickup an object that matches rest of pattern; > - never pickup an object that matches rest of pattern. - The autopickup_exception rules are processed in the order in - which they appear in your configuration file, thus allowing a + The autopickup_exception rules are processed in the order in + which they appear in your configuration file, thus allowing a later rule to override an earlier rule. - Exceptions can be set with the `O' command, but because they - are not included in your configuration file, they won't be in - effect if you save and then restore your game. autopickup_ex- + Exceptions can be set with the `O' command, but because they + are not included in your configuration file, they won't be in + effect if you save and then restore your game. autopickup_ex- ception rules and not saved with the game. Here are some examples: @@ -4594,27 +4600,21 @@ autopickup_exception=">*corpse" autopickup_exception=">* cursed*" - The first example above will result in autopickup of any - type of arrow. The second example results in the exclusion of - any corpse from autopickup. The last example results in the ex- + The first example above will result in autopickup of any + type of arrow. The second example results in the exclusion of + any corpse from autopickup. The last example results in the ex- clusion of items known to be cursed from autopickup. 9.9. Changing Key Bindings - It is possible to change the default key bindings of some - special commands, menu accelerator keys, and extended commands, - by using BIND stanzas in the configuration file. Format is key, - followed by the command to bind to, separated by a colon. The + It is possible to change the default key bindings of some + special commands, menu accelerator keys, and extended commands, + by using BIND stanzas in the configuration file. Format is key, + followed by the command to bind to, separated by a colon. The key can be a single character ("x"), a control key ("^X", "C-x"), - a meta key ("M-x"), or a three-digit decimal ASCII code. - - For example: - - - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -4624,30 +4624,34 @@ + a meta key ("M-x"), or a three-digit decimal ASCII code. + + For example: + BIND=^X:getpos.autodescribe BIND={:menu_first_page BIND=v:loot Extended command keys - You can bind multiple keys to the same extended command. Un- - bind a key by using "nothing" as the extended command to bind - to. You can also bind the "", "", and "" + You can bind multiple keys to the same extended command. Un- + bind a key by using "nothing" as the extended command to bind + to. You can also bind the "", "", and "" keys. Menu accelerator keys - The menu control or accelerator keys can also be rebound via - OPTIONS lines in the configuration file. You cannot bind ob- + The menu control or accelerator keys can also be rebound via + OPTIONS lines in the configuration file. You cannot bind ob- ject symbols into menu accelerators. Special command keys - Below are the special commands you can rebind. Some of them - can be bound to same keys with no problems, others are in the - same "context", and if bound to same keys, only one of those - commands will be available. Special command can only be bound + Below are the special commands you can rebind. Some of them + can be bound to same keys with no problems, others are in the + same "context", and if bound to same keys, only one of those + commands will be available. Special command can only be bound to a single key. count - Prefix key to start a count, to repeat a command this many + Prefix key to start a count, to repeat a command this many times. With number_pad only. Default is `n'. doinv @@ -4657,30 +4661,26 @@ Prefix key to force fight a direction. Default is `F'. fight.numpad - Prefix key to force fight a direction. With number_pad only. + Prefix key to force fight a direction. With number_pad only. Default is `-'. getdir.help - When asked for a direction, the key to show the help. Default + When asked for a direction, the key to show the help. Default is `?'. getdir.self - When asked for a direction, the key to target yourself. De- + When asked for a direction, the key to target yourself. De- fault is `.'. getdir.self2 - When asked for a direction, the key to target yourself. De- + When asked for a direction, the key to target yourself. De- fault is `s'. getpos.autodescribe - When asked for a location, the key to toggle autodescribe. De- - fault is `#'. - - getpos.all.next - When asked for a location, the key to go to next closest + When asked for a location, the key to toggle autodescribe. - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -4690,63 +4690,63 @@ - interesting thing. Default is `a'. + Default is `#'. + + getpos.all.next + When asked for a location, the key to go to next closest inter- + esting thing. Default is `a'. getpos.all.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest interesting thing. Default is `A'. getpos.door.next - When asked for a location, the key to go to next closest door + When asked for a location, the key to go to next closest door or doorway. Default is `d'. getpos.door.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest door or doorway. Default is `D'. getpos.help - When asked for a location, the key to show help. Default is + When asked for a location, the key to show help. Default is `?'. getpos.mon.next - When asked for a location, the key to go to next closest mon- + When asked for a location, the key to go to next closest mon- ster. Default is `m'. getpos.mon.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest monster. Default is `M'. getpos.obj.next - When asked for a location, the key to go to next closest ob- + When asked for a location, the key to go to next closest ob- ject. Default is `o'. getpos.obj.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest object. Default is `O'. getpos.menu - When asked for a location, and using one of the next or previ- - ous keys to cycle through targets, toggle showing a menu in- + When asked for a location, and using one of the next or previ- + ous keys to cycle through targets, toggle showing a menu in- stead. Default is `!'. getpos.moveskip - When asked for a location, and using the shifted movement keys - or meta-digit keys to fast-move around, move by skipping the + When asked for a location, and using the shifted movement keys + or meta-digit keys to fast-move around, move by skipping the same glyphs instead of by 8 units. Default is `*'. getpos.filter When asked for a location, change the filtering mode when using - one of the next or previous keys to cycle through targets. - Toggles between no filtering, in view only, and in the same + one of the next or previous keys to cycle through targets. + Toggles between no filtering, in view only, and in the same area only. Default is `"'. - getpos.pick - When asked for a location, the key to choose the location, and - possibly ask for more info. Default is `.'. - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -4756,17 +4756,21 @@ - getpos.pick.once + getpos.pick When asked for a location, the key to choose the location, and + possibly ask for more info. Default is `.'. + + getpos.pick.once + When asked for a location, the key to choose the location, and skip asking for more info. Default is `,'. getpos.pick.quick When asked for a location, the key to choose the location, skip - asking for more info, and exit the location asking loop. De- + asking for more info, and exit the location asking loop. De- fault is `;'. getpos.pick.verbose - When asked for a location, the key to choose the location, and + When asked for a location, the key to choose the location, and show more info without asking. Default is `:'. getpos.self @@ -4774,23 +4778,23 @@ fault is `@'. getpos.unexplored.next - When asked for a location, the key to go to next closest unex- + When asked for a location, the key to go to next closest unex- plored location. Default is `x'. getpos.unexplored.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest unexplored location. Default is `X'. getpos.valid - When asked for a location, the key to go to show valid target + When asked for a location, the key to go to show valid target locations. Default is `$'. getpos.valid.next - When asked for a location, the key to go to next closest valid + When asked for a location, the key to go to next closest valid location. Default is `z'. getpos.valid.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest valid location. Default is `Z'. nopickup @@ -4800,19 +4804,15 @@ Key to redraw the screen. Default is `^R'. redraw.numpad - Key to redraw the screen. With number_pad only. Default is + Key to redraw the screen. With number_pad only. Default is `^L'. repeat Key to repeat previous command. Default is `^A'. - reqmenu - Prefix key to request menu from some commands. Default is `m'. - - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -4822,15 +4822,18 @@ + reqmenu + Prefix key to request menu from some commands. Default is `m'. + run Prefix key to run towards a direction. Default is `G'. run.nopickup - Prefix key to run towards a direction without picking up items + Prefix key to run towards a direction without picking up items on the way. Default is `M'. run.numpad - Prefix key to run towards a direction. With number_pad only. + Prefix key to run towards a direction. With number_pad only. Default is `5'. rush @@ -4841,7 +4844,7 @@ You can change the way the messages are shown in the message area, when the message matches a user-defined pattern. - In general, the configuration file entries to describe the + In general, the configuration file entries to describe the message types look like this: MSGTYPE=type "pattern" type - how the message should be shown; @@ -4854,31 +4857,28 @@ show - show message normally; hide - never show the message; stop - wait for user with more-prompt; - norep - show the message once, but not again if no other mes- + norep - show the message once, but not again if no other mes- sage is shown in between. - Here's an example of message types using NetHack's internal + Here's an example of message types using NetHack's internal pattern matching facility: MSGTYPE=stop "You feel hungry." MSGTYPE=hide "You displaced *." - specifies that whenever a message "You feel hungry" is shown, - the user is prompted with more-prompt, and a message matching + specifies that whenever a message "You feel hungry" is shown, + the user is prompted with more-prompt, and a message matching "You displaced ." is not shown at all. - The order of the defined MSGTYPE lines is important; the last - matching rule is used. Put the general case first, exceptions + The order of the defined MSGTYPE lines is important; the last + matching rule is used. Put the general case first, exceptions below them. - 9.11. Configuring Menu Colors - - Some platforms allow you to define colors used in menu lines - when the line matches a user-defined pattern. At this time the - tty, curses, win32tty and win32gui interfaces support this. - NetHack 3.6 November 17, 2019 + + + NetHack 3.6 November 27, 2019 @@ -4888,63 +4888,63 @@ - In general, the configuration file entries to describe the + 9.11. Configuring Menu Colors + + Some platforms allow you to define colors used in menu lines + when the line matches a user-defined pattern. At this time the + tty, curses, win32tty and win32gui interfaces support this. + + In general, the configuration file entries to describe the menu color mappings look like this: MENUCOLOR="pattern"=color&attribute pattern - the pattern to match; - color - the color to use for lines matching the pat- + color - the color to use for lines matching the pat- tern; - attribute - the attribute to use for lines matching the - pattern. The attribute is optional, and if + attribute - the attribute to use for lines matching the + pattern. The attribute is optional, and if left out, you must also leave out the preced- - ing ampersand. If no attribute is defined, + ing ampersand. If no attribute is defined, no attribute is used. The pattern should be a regular expression. - Allowed colors are black, red, green, brown, blue, magenta, - cyan, gray, orange, light-green, yellow, light-blue, light-ma- - genta, light-cyan, and white. And no-color, the default fore- - ground color, which isn't necessarily the same as any of the + Allowed colors are black, red, green, brown, blue, magenta, + cyan, gray, orange, light-green, yellow, light-blue, light-ma- + genta, light-cyan, and white. And no-color, the default fore- + ground color, which isn't necessarily the same as any of the other colors. - Allowed attributes are none, bold, dim, underline, blink, and - inverse. "Normal" is a synonym for "none". Note that the + Allowed attributes are none, bold, dim, underline, blink, and + inverse. "Normal" is a synonym for "none". Note that the platform used may interpret the attributes any way it wants. - Here's an example of menu colors using NetHack's internal pat- + Here's an example of menu colors using NetHack's internal pat- tern matching facility: MENUCOLOR="* blessed *"=green MENUCOLOR="* cursed *"=red MENUCOLOR="* cursed *(being worn)"=red&underline - specifies that any menu line with " blessed " contained in it - will be shown in green color, lines with " cursed " will be - shown in red, and lines with " cursed " followed by "(being - worn)" on the same line will be shown in red color and under- + specifies that any menu line with " blessed " contained in it + will be shown in green color, lines with " cursed " will be + shown in red, and lines with " cursed " followed by "(being + worn)" on the same line will be shown in red color and under- lined. You can have multiple MENUCOLOR entries in your config- - uration file, and the last MENUCOLOR line that matches a menu + uration file, and the last MENUCOLOR line that matches a menu line will be used for the line. Note that if you intend to have one or more color specifica- - tions match " uncursed ", you will probably want to turn the im- + tions match " uncursed ", you will probably want to turn the im- plicit_uncursed option off so that all items known to be uncursed are actually displayed with the "uncursed" description. - 9.12. Configuring User Sounds - - Some platforms allow you to define sound files to be played - when a message that matches a user-defined pattern is delivered - to the message window. At this time the Qt port and the win32tty - and win32gui ports support the use of user sounds. - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -4954,18 +4954,25 @@ - The following configuration file entries are relevant to + 9.12. Configuring User Sounds + + Some platforms allow you to define sound files to be played + when a message that matches a user-defined pattern is delivered + to the message window. At this time the Qt port and the win32tty + and win32gui ports support the use of user sounds. + + The following configuration file entries are relevant to mapping user sounds to messages: SOUNDDIR The directory that houses the sound files to be played. SOUND - An entry that maps a sound file to a user-specified message - pattern. Each SOUND entry is broken down into the following + An entry that maps a sound file to a user-specified message + pattern. Each SOUND entry is broken down into the following parts: - MESG - message window mapping (the only one supported in + MESG - message window mapping (the only one supported in 3.6); pattern - the pattern to match; sound file - the sound file to play; @@ -4976,7 +4983,7 @@ 9.13. Configuring Status Hilites Your copy of NetHack may have been compiled with support for - "Status Hilites". If so, you can customize your game display by + "Status Hilites". If so, you can customize your game display by setting thresholds to change the color or appearance of fields in the status display. @@ -4984,8 +4991,8 @@ OPTION=hilite_status:field-name/behavior/color&attributes - For example, the following line in your configuration file - will cause the hitpoints field to display in the color red if + For example, the following line in your configuration file + will cause the hitpoints field to display in the color red if your hitpoints drop to or below a threshold of 30%: OPTION=hilite_status:hitpoints/<=30%/red/normal @@ -4993,24 +5000,17 @@ (That example is actually specifying red&normal for <=30% and no- color&normal for >30%.) - For another example, the following line in your configura- - tion file will cause wisdom to be displayed red if it drops and + For another example, the following line in your configura- + tion file will cause wisdom to be displayed red if it drops and green if it rises: OPTION=hilite_status:wisdom/down/red/up/green - Allowed colors are black, red, green, brown, blue, magenta, - cyan, gray, orange, light-green, yellow, light-blue, light-magen- - ta, light-cyan, and white. And "no-color", the default fore- - ground color on the display, which is not necessarily the same as - black or white or any of the other colors. - - Allowed attributes are none, bold, dim, underline, blink, - and inverse. "Normal" is a synonym for "none"; they should not - be used in combination with any of the other attributes. + Allowed colors are black, red, green, brown, blue, magenta, + cyan, gray, orange, light-green, yellow, light-blue, light- - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5020,22 +5020,30 @@ + magenta, light-cyan, and white. And "no-color", the default + foreground color on the display, which is not necessarily the + same as black or white or any of the other colors. + + Allowed attributes are none, bold, dim, underline, blink, + and inverse. "Normal" is a synonym for "none"; they should not + be used in combination with any of the other attributes. + To specify both a color and an attribute, use `&' to combine - them. To specify multiple attributes, use `+' to combine those. + them. To specify multiple attributes, use `+' to combine those. For example: "magenta&inverse+dim". - Note that the display may substitute or ignore particular - attributes depending upon its capabilities, and in general may - interpret the attributes any way it wants. For example, on some + Note that the display may substitute or ignore particular + attributes depending upon its capabilities, and in general may + interpret the attributes any way it wants. For example, on some display systems a request for bold might yield blink or vice ver- sa. On others, issuing an attribute request while another is al- - ready set up will replace the earlier attribute rather than com- - bine with it. Since NetHack issues attribute requests sequen- + ready set up will replace the earlier attribute rather than com- + bine with it. Since NetHack issues attribute requests sequen- tially (at least with the tty interface) rather than all at once, the only way a situation like that can be controlled is to speci- fy just one attribute. - You can adjust the appearance of the following status + You can adjust the appearance of the following status fields: title dungeon-level experience-level strength gold experience @@ -5046,16 +5054,16 @@ charisma armor-class condition alignment score - The pseudo-field "characteristics" can be used to set all six - of Str, Dex, Con, Int, Wis, and Cha at once. "HD" is "hit - dice", an approximation of experience level displayed when - polymorphed. "experience", "time", and "score" are condition- + The pseudo-field "characteristics" can be used to set all six + of Str, Dex, Con, Int, Wis, and Cha at once. "HD" is "hit + dice", an approximation of experience level displayed when + polymorphed. "experience", "time", and "score" are condition- ally displayed depending upon your other option settings. - Instead of a behavior, "condition" takes the following condi- - tion flags: stone, slime, strngl, foodpois, termill, blind, - deaf, stun, conf, hallu, lev, fly, and ride. You can use "ma- - jor_troubles" as an alias for stone through termill, "mi- + Instead of a behavior, "condition" takes the following condi- + tion flags: stone, slime, strngl, foodpois, termill, blind, + deaf, stun, conf, hallu, lev, fly, and ride. You can use "ma- + jor_troubles" as an alias for stone through termill, "mi- nor_troubles" for blind through hallu, "movement" for lev, fly, and ride, and "all" for every condition. @@ -5064,19 +5072,11 @@ * "always" will set the default attributes for that field. - * "up", "down" set the field attributes for when the field - value changes upwards or downwards. This attribute times - out after statushilites turns. - - * "changed" sets the field attribute for when the field val- - ue changes. This attribute times out after statushilites - turns. (If a field has both a "changed" rule and an "up" - or "down" rule which matches a change in the field's val- - ue, the "up" or "down" one takes precedence.) + * "up", "down" set the field attributes for when the field + value changes upwards or downwards. This attribute times - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5086,47 +5086,55 @@ - * percentage sets the field attribute when the field value - matches the percentage. It is specified as a number be- - tween 0 and 100, followed by `%' (percent sign). If the - percentage is prefixed with `<=' or `>=', it also matches - when value is below or above the percentage. Use prefix - `<' or `>' to match when strictly below or above. (The - numeric limit is relaxed slightly for those: >-1% and - <101% are allowed.) Only four fields support percentage - rules. Percentages for "hitpoints" and "power" are - straightforward; they're based on the corresponding maxi- - mum field. Percentage highlight rules are also allowed + out after statushilites turns. + + * "changed" sets the field attribute for when the field val- + ue changes. This attribute times out after statushilites + turns. (If a field has both a "changed" rule and an "up" + or "down" rule which matches a change in the field's val- + ue, the "up" or "down" one takes precedence.) + + * percentage sets the field attribute when the field value + matches the percentage. It is specified as a number be- + tween 0 and 100, followed by `%' (percent sign). If the + percentage is prefixed with `<=' or `>=', it also matches + when value is below or above the percentage. Use prefix + `<' or `>' to match when strictly below or above. (The + numeric limit is relaxed slightly for those: >-1% and + <101% are allowed.) Only four fields support percentage + rules. Percentages for "hitpoints" and "power" are + straightforward; they're based on the corresponding maxi- + mum field. Percentage highlight rules are also allowed for "experience level" and "experience points" (valid when the showexp option is enabled). For those, the percentage is based on the progress from the start of the current ex- perience level to the start of the next level. So if lev- - el 2 starts at 20 points and level 3 starts at 40 points, - having 30 points is 50% and 35 points is 75%. 100% is - unattainable for experience because you'll gain a level + el 2 starts at 20 points and level 3 starts at 40 points, + having 30 points is 50% and 35 points is 75%. 100% is + unattainable for experience because you'll gain a level and the calculations will be reset for that new level, but - a rule for =100% is allowed and matches the special case + a rule for =100% is allowed and matches the special case of being exactly 1 experience point short of the next lev- el. - * absolute value sets the attribute when the field value - matches that number. The number must be 0 or higher, ex- - cept for "armor-class' which allows negative values, and - may optionally be preceded by `='. If the number is pre- - ceded by `<=' or `>=' instead, it also matches when value - is below or above. If the prefix is `<' or `>', only + * absolute value sets the attribute when the field value + matches that number. The number must be 0 or higher, ex- + cept for "armor-class' which allows negative values, and + may optionally be preceded by `='. If the number is pre- + ceded by `<=' or `>=' instead, it also matches when value + is below or above. If the prefix is `<' or `>', only match when strictly above or below. * text match sets the attribute when the field value matches - the text. Text matches can only be used for "alignment", - "carrying-capacity", "hunger", "dungeon-level", and "ti- - tle". For title, only the role's rank title is tested; + the text. Text matches can only be used for "alignment", + "carrying-capacity", "hunger", "dungeon-level", and "ti- + tle". For title, only the role's rank title is tested; the character's name is ignored. - The in-game options menu can help you determine the correct + The in-game options menu can help you determine the correct syntax for a configuration file. - The whole feature can be disabled by setting option sta- + The whole feature can be disabled by setting option sta- tushilites to 0. Example hilites: @@ -5134,15 +5142,7 @@ - - - - - - - - - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5167,23 +5167,23 @@ NetHack can load entire symbol sets from the symbol file. - The options that are used to select a particular symbol set + The options that are used to select a particular symbol set from the symbol file are: symset Set the name of the symbol set that you want to load. roguesymset - Set the name of the symbol set that you want to load for dis- + Set the name of the symbol set that you want to load for dis- play on the rogue level. - You can also override one or more symbols using the SYMBOLS - and ROGUESYMBOLS configuration file options. Symbols are speci- + You can also override one or more symbols using the SYMBOLS + and ROGUESYMBOLS configuration file options. Symbols are speci- fied as name:value pairs. Note that NetHack escape-processes the - value string in conventional C fashion. This means that \ is a - prefix to take the following character literally. Thus \ needs - to be represented as \\. The special prefix form \m switches on - the meta bit in the symbol value, and the ^ prefix causes the + value string in conventional C fashion. This means that \ is a + prefix to take the following character literally. Thus \ needs + to be represented as \\. The special prefix form \m switches on + the meta bit in the symbol value, and the ^ prefix causes the following character to be treated as a control character. NetHack Symbols @@ -5208,7 +5208,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5274,7 +5274,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5340,7 +5340,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5406,7 +5406,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5422,57 +5422,57 @@ Notes: * Several symbols in this table appear to be blank. They are the - space character, except for S_pet_override and S_hero_override - which don't have any default value and can only be used if en- + space character, except for S_pet_override and S_hero_override + which don't have any default value and can only be used if en- abled in the "sysconf" file. - * S_rock is misleadingly named; rocks and stones use S_gem. - Statues and boulders are the rock being referred to, but since - version 3.6.0, statues are displayed as the monster they de- - pict. So S_rock is only used for boulders and not used at all + * S_rock is misleadingly named; rocks and stones use S_gem. + Statues and boulders are the rock being referred to, but since + version 3.6.0, statues are displayed as the monster they de- + pict. So S_rock is only used for boulders and not used at all if overridden by the more specific S_boulder. 9.15. Configuring NetHack for Play by the Blind - NetHack can be set up to use only standard ASCII characters - for making maps of the dungeons. This makes the MS-DOS versions - of NetHack completely accessible to the blind who use speech - and/or Braille access technologies. Players will require a good - working knowledge of their screen-reader's review features, and - will have to know how to navigate horizontally and vertically - character by character. They will also find the search capabili- - ties of their screen-readers to be quite valuable. Be certain to - examine this Guidebook before playing so you have an idea what - the screen layout is like. You'll also need to be able to locate - the PC cursor. It is always where your character is located. - Merely searching for an @-sign will not always find your charac- + NetHack can be set up to use only standard ASCII characters + for making maps of the dungeons. This makes the MS-DOS versions + of NetHack completely accessible to the blind who use speech + and/or Braille access technologies. Players will require a good + working knowledge of their screen-reader's review features, and + will have to know how to navigate horizontally and vertically + character by character. They will also find the search capabili- + ties of their screen-readers to be quite valuable. Be certain to + examine this Guidebook before playing so you have an idea what + the screen layout is like. You'll also need to be able to locate + the PC cursor. It is always where your character is located. + Merely searching for an @-sign will not always find your charac- ter since there are other humanoids represented by the same sign. - Your screen-reader should also have a function which gives you - the row and column of your review cursor and the PC cursor. - These co-ordinates are often useful in giving players a better + Your screen-reader should also have a function which gives you + the row and column of your review cursor and the PC cursor. + These co-ordinates are often useful in giving players a better sense of the overall location of items on the screen. - NetHack can also be compiled with support for sending the - game messages to an external program, such as a text-to-speech - synthesizer. If the "#version" extended command shows "external - program as a message handler", your NetHack has been compiled + NetHack can also be compiled with support for sending the + game messages to an external program, such as a text-to-speech + synthesizer. If the "#version" extended command shows "external + program as a message handler", your NetHack has been compiled with the capability. When compiling NetHack from source on Linux - and other POSIX systems, define MSGHANDLER to enable it. To use - the capability, set the environment variable NETHACK_MSGHANDLER + and other POSIX systems, define MSGHANDLER to enable it. To use + the capability, set the environment variable NETHACK_MSGHANDLER to an executable, which will be executed with the game message as the program's only parameter. - While it is not difficult for experienced users to edit the - defaults.nh file to accomplish this, novices may find this task + While it is not difficult for experienced users to edit the + defaults.nh file to accomplish this, novices may find this task somewhat daunting. Included within the "symbols" file of all of- ficial distributions of NetHack is a symset called NHAccess. Se- - lecting that symset in your configuration file will cause the - game to run in a manner accessible to the blind. After you have - gained some experience with the game and with editing files, you + lecting that symset in your configuration file will cause the + game to run in a manner accessible to the blind. After you have + gained some experience with the game and with editing files, you may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5483,19 +5483,19 @@ configuration file to better suit your preferences. See the pre- - vious section for the special symbols S_pet_override to force a - consistent symbol for all pets and S_hero_override to force a - unique symbol for the player character if accessibility is en- + vious section for the special symbols S_pet_override to force a + consistent symbol for all pets and S_hero_override to force a + unique symbol for the player character if accessibility is en- abled in the sysconf file. - The most crucial settings to make the game more accessible + The most crucial settings to make the game more accessible are: symset:NHAccess Load a symbol set appropriate for use by blind players. roguesymset:NHAccess - Load a symbol set for the rogue level that is appropriate for + Load a symbol set for the rogue level that is appropriate for use by blind players. menustyle:traditional @@ -5505,40 +5505,40 @@ Show menus on a cleared screen and aligned to the left edge. number_pad - A lot of speech access programs use the number-pad to review + A lot of speech access programs use the number-pad to review the screen. If this is the case, disable the number_pad option and use the traditional Rogue-like commands. autodescribe - Automatically describe the terrain under the cursor when tar- + Automatically describe the terrain under the cursor when tar- geting. mention_walls - Give feedback messages when walking towards a wall or when + Give feedback messages when walking towards a wall or when travel command was interrupted. whatis_coord:compass - When targeting with cursor, describe the cursor position with + When targeting with cursor, describe the cursor position with coordinates relative to your character. whatis_filter:area - When targeting with cursor, filter possible locations so only - those in the same area (eg. same room, or same corridor) are + When targeting with cursor, filter possible locations so only + those in the same area (eg. same room, or same corridor) are considered. whatis_moveskip - When targeting with cursor and using fast-move, skip the same + When targeting with cursor and using fast-move, skip the same glyphs instead of moving 8 units at a time. nostatus_updates - Prevent updates to the status lines at the bottom of the - screen, if your screen-reader reads those lines. The same in- + Prevent updates to the status lines at the bottom of the + screen, if your screen-reader reads those lines. The same in- formation can be seen via the "#attributes" command. - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5550,16 +5550,16 @@ 9.16. Global Configuration for System Administrators - If NetHack is compiled with the SYSCF option, a system ad- - ministrator should set up a global configuration; this is a file + If NetHack is compiled with the SYSCF option, a system ad- + ministrator should set up a global configuration; this is a file in the same format as the traditional per-user configuration file (see above). This file should be named sysconf and placed in the - same directory as the other NetHack support files. The options + same directory as the other NetHack support files. The options recognized in this file are listed below. Any option not set us- - es a compiled-in default (which may not be appropriate for your + es a compiled-in default (which may not be appropriate for your system). - WIZARDS = A space-separated list of user names who are allowed + WIZARDS = A space-separated list of user names who are allowed to play in debug mode (commonly referred to as wizard mode). A value of a single asterisk (*) allows anyone to start a game in debug mode. @@ -5567,28 +5567,28 @@ SHELLERS = A list of users who are allowed to use the shell es- cape command (!). The syntax is the same as WIZARDS. - EXPLORERS = A list of users who are allowed to use the explore + EXPLORERS = A list of users who are allowed to use the explore mode. The syntax is the same as WIZARDS. MAXPLAYERS = Limit the maximum number of games that can be run- ning at the same time. - SUPPORT = A string explaining how to get local support (no de- + SUPPORT = A string explaining how to get local support (no de- fault value). - RECOVER = A string explaining how to recover a game on this + RECOVER = A string explaining how to recover a game on this system (no default value). - SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE + SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE option. When disabled, incubi and succubi behave like nymphs. - CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- + CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- ARDS, and SHELLERS check for the player name instead of the us- er's login name. CHECK_SAVE_UID = 0 or 1 to disable or enable, respectively, the - UID (used identification number) checking for save files (to - verify that the user who is restoring is the same one who + UID (used identification number) checking for save files (to + verify that the user who is restoring is the same one who saved). The following options affect the score file: @@ -5597,14 +5597,14 @@ ENTRYMAX = Maximum number of entries in the score file. - POINTSMIN = Minimum number of points to get an entry in the + POINTSMIN = Minimum number of points to get an entry in the score file. - PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- + PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- spectively, to identify unique people for the score file. - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5614,11 +5614,11 @@ - MAX_STATUENAME_RANK = Maximum number of score file entries to + MAX_STATUENAME_RANK = Maximum number of score file entries to use for random statue names (default is 10). DUMPLOGFILE = A filename where the end-of-game dumplog is - saved. Not defining this will prevent dumplog from being cre- + saved. Not defining this will prevent dumplog from being cre- ated. Only available if your game is compiled with DUMPLOG. Al- lows the following placeholders: @@ -5634,43 +5634,43 @@ 10. Scoring - NetHack maintains a list of the top scores or scorers on + NetHack maintains a list of the top scores or scorers on your machine, depending on how it is set up. In the latter case, - each account on the machine can post only one non-winning score - on this list. If you score higher than someone else on this - list, or better your previous score, you will be inserted in the - proper place under your current name. How many scores are kept + each account on the machine can post only one non-winning score + on this list. If you score higher than someone else on this + list, or better your previous score, you will be inserted in the + proper place under your current name. How many scores are kept can also be set up when NetHack is compiled. - Your score is chiefly based upon how much experience you + Your score is chiefly based upon how much experience you gained, how much loot you accumulated, how deep you explored, and how the game ended. If you quit the game, you escape with all of - your gold intact. If, however, you get killed in the Mazes of + your gold intact. If, however, you get killed in the Mazes of Menace, the guild will only hear about 90% of your gold when your - corpse is discovered (adventurers have been known to collect - finder's fees). So, consider whether you want to take one last - hit at that monster and possibly live, or quit and stop with - whatever you have. If you quit, you keep all your gold, but if + corpse is discovered (adventurers have been known to collect + finder's fees). So, consider whether you want to take one last + hit at that monster and possibly live, or quit and stop with + whatever you have. If you quit, you keep all your gold, but if you swing and live, you might find more. - If you just want to see what the current top players/games + If you just want to see what the current top players/games list is, you can type nethack -s all on most versions. 11. Explore mode - NetHack is an intricate and difficult game. Novices might + NetHack is an intricate and difficult game. Novices might falter in fear, aware of their ignorance of the means to survive. Well, fear not. Your dungeon comes equipped with an "explore" or - "discovery" mode that enables you to keep old save files and - cheat death, at the paltry cost of not getting on the high score + "discovery" mode that enables you to keep old save files and + cheat death, at the paltry cost of not getting on the high score list. - There are two ways of enabling explore mode. One is to - start the game with the -X command-line switch or with the play- - mode:explore option. The other is to issue the "#exploremode" + There are two ways of enabling explore mode. One is to + start the game with the -X command-line switch or with the play- + mode:explore option. The other is to issue the "#exploremode" - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5680,63 +5680,63 @@ - extended command while already playing the game. Starting a new + extended command while already playing the game. Starting a new game in explore mode provides your character with a wand of wish- - ing in initial inventory; switching during play does not. The - other benefits of explore mode are left for the trepid reader to + ing in initial inventory; switching during play does not. The + other benefits of explore mode are left for the trepid reader to discover. 11.1. Debug mode Debug mode, also known as wizard mode, is undocumented aside - from this brief description and the various "debug mode only" - commands listed among the command descriptions. It is intended + from this brief description and the various "debug mode only" + commands listed among the command descriptions. It is intended for tracking down problems within the program rather than to pro- - vide god-like powers to your character, and players who attempt - debugging are expected to figure out how to use it themselves. - It is initiated by starting the game with the -D command-line + vide god-like powers to your character, and players who attempt + debugging are expected to figure out how to use it themselves. + It is initiated by starting the game with the -D command-line switch or with the playmode:debug option. - For some systems, the player must be logged in under a par- - ticular user name to be allowed to use debug mode; for others, - the hero must be given a particular character name (but may be - any role; there's no connection between "wizard mode" and the - Wizard role). Attempting to start a game in debug mode when not - allowed or not available will result in falling back to explore + For some systems, the player must be logged in under a par- + ticular user name to be allowed to use debug mode; for others, + the hero must be given a particular character name (but may be + any role; there's no connection between "wizard mode" and the + Wizard role). Attempting to start a game in debug mode when not + allowed or not available will result in falling back to explore mode instead. 12. Credits - The original hack game was modeled on the Berkeley UNIX - rogue game. Large portions of this paper were shamelessly - cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy - and Kenneth C. R. C. Arnold. Small portions were adapted from + The original hack game was modeled on the Berkeley UNIX + rogue game. Large portions of this paper were shamelessly + cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy + and Kenneth C. R. C. Arnold. Small portions were adapted from Further Exploration of the Dungeons of Doom, by Ken Arromdee. NetHack is the product of literally dozens of people's work. - Main events in the course of the game development are described + Main events in the course of the game development are described below: - Jay Fenlason wrote the original Hack, with help from Kenny + Jay Fenlason wrote the original Hack, with help from Kenny Woodland, Mike Thome and Jon Payne. Andries Brouwer did a major re-write, transforming Hack into - a very different game, and published (at least) three versions + a very different game, and published (at least) three versions (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. - Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, - producing PC HACK 1.01e, added support for DEC Rainbow graphics - in version 1.03g, and went on to produce at least four more ver- + Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, + producing PC HACK 1.01e, added support for DEC Rainbow graphics + in version 1.03g, and went on to produce at least four more ver- sions (3.0, 3.2, 3.51, and 3.6). - R. Black ported PC HACK 3.51 to Lattice C and the Atari + R. Black ported PC HACK 3.51 to Lattice C and the Atari 520/1040ST, producing ST Hack 1.03. Mike Stephenson merged these various versions back together, - incorporating many of the added features, and produced NetHack + incorporating many of the added features, and produced NetHack - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5746,7 +5746,7 @@ - 1.4. He then coordinated a cast of thousands in enhancing and + 1.4. He then coordinated a cast of thousands in enhancing and debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. Later, Mike coordinated a major rewrite of the game, heading @@ -5754,55 +5754,55 @@ Creps, Eric Hendrickson, Izchak Miller, John Rupley, Mike Threep- oint, and Janet Walz, to produce NetHack 3.0c. - NetHack 3.0 was ported to the Atari by Eric R. Smith, to - OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three + NetHack 3.0 was ported to the Atari by Eric R. Smith, to + OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three of them and Kevin Darcy later joined the main NetHack Development Team to produce subsequent revisions of 3.0. - Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm - Meluch, Stephen Spackman and Pierre Martineau designed overlay - code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the - Macintosh. Along with various other Dungeoneers, they continued - to enhance the PC, Macintosh, and Amiga ports through the later + Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm + Meluch, Stephen Spackman and Pierre Martineau designed overlay + code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the + Macintosh. Along with various other Dungeoneers, they continued + to enhance the PC, Macintosh, and Amiga ports through the later revisions of 3.0. - Headed by Mike Stephenson and coordinated by Izchak Miller - and Janet Walz, the NetHack Development Team which now included - Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, - Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, + Headed by Mike Stephenson and coordinated by Izchak Miller + and Janet Walz, the NetHack Development Team which now included + Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, + Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Eric Raymond, and Eric Smith undertook a radical revision of 3.0. They re-structured the game's design, and re-wrote major parts of - the code. They added multiple dungeons, a new display, special - individual character quests, a new endgame and many other new + the code. They added multiple dungeons, a new display, special + individual character quests, a new endgame and many other new features, and produced NetHack 3.1. - Ken Lorber, Gregg Wonderly and Greg Olson, with help from - Richard Addison, Mike Passaretti, and Olaf Seibert, developed + Ken Lorber, Gregg Wonderly and Greg Olson, with help from + Richard Addison, Mike Passaretti, and Olaf Seibert, developed NetHack 3.1 for the Amiga. - Norm Meluch and Kevin Smolkowski, with help from Carl Sche- + Norm Meluch and Kevin Smolkowski, with help from Carl Sche- lin, Stephen Spackman, Steve VanDevender, and Paul Winner, ported NetHack 3.1 to the PC. Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike - Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny - Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack + Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny + Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack 3.1 for the Macintosh, porting it for MPW. Building on their de- velopment, Bart House added a Think C port. Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith port- - ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua - Delahunty, was responsible for the VMS version of NetHack 3.1. + ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua + Delahunty, was responsible for the VMS version of NetHack 3.1. Michael Allison ported NetHack 3.1 to Windows NT. - Dean Luick, with help from David Cohrs, developed NetHack - 3.1 for X11. Warwick Allison wrote a tiled version of NetHack - for the Atari; he later contributed the tiles to the NetHack De- - velopment Team and tile support was then added to other plat- + Dean Luick, with help from David Cohrs, developed NetHack + 3.1 for X11. Warwick Allison wrote a tiled version of NetHack + for the Atari; he later contributed the tiles to the NetHack De- + velopment Team and tile support was then added to other plat- forms. - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5815,60 +5815,60 @@ The 3.2 NetHack Development Team, comprised of Michael Alli- son, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Er- - ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released + ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released version 3.2 in April of 1996. Version 3.2 marked the tenth anniversary of the formation of - the development team. In a testament to their dedication to the - game, all thirteen members of the original NetHack Development - Team remained on the team at the start of work on that release. - During the interval between the release of 3.1.3 and 3.2, one of - the founding members of the NetHack Development Team, Dr. Izchak - Miller, was diagnosed with cancer and passed away. That release - of the game was dedicated to him by the development and porting + the development team. In a testament to their dedication to the + game, all thirteen members of the original NetHack Development + Team remained on the team at the start of work on that release. + During the interval between the release of 3.1.3 and 3.2, one of + the founding members of the NetHack Development Team, Dr. Izchak + Miller, was diagnosed with cancer and passed away. That release + of the game was dedicated to him by the development and porting teams. During the lifespan of NetHack 3.1 and 3.2, several enthusi- - asts of the game added their own modifications to the game and + asts of the game added their own modifications to the game and made these "variants" publicly available: - Tom Proudfoot and Yuval Oren created NetHack++, which was - quickly renamed NetHack--. Working independently, Stephen White - wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and + Tom Proudfoot and Yuval Oren created NetHack++, which was + quickly renamed NetHack--. Working independently, Stephen White + wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and his own NetHack-- to produce SLASH. Larry Stewart-Zerba and War- - wick Allison improved the spell casting system with the Wizard - Patch. Warwick Allison also ported NetHack to use the Qt inter- + wick Allison improved the spell casting system with the Wizard + Patch. Warwick Allison also ported NetHack to use the Qt inter- face. - Warren Cheung combined SLASH with the Wizard Patch to pro- - duce Slash'EM, and with the help of Kevin Hugo, added more fea- - tures. Kevin later joined the NetHack Development Team and in- + Warren Cheung combined SLASH with the Wizard Patch to pro- + duce Slash'EM, and with the help of Kevin Hugo, added more fea- + tures. Kevin later joined the NetHack Development Team and in- corporated the best of these ideas in NetHack 3.3. The final update to 3.2 was the bug fix release 3.2.3, which - was released simultaneously with 3.3.0 in December 1999 just in + was released simultaneously with 3.3.0 in December 1999 just in time for the Year 2000. - The 3.3 NetHack Development Team, consisting of Michael Al- - lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, - Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- - ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet - Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 + The 3.3 NetHack Development Team, consisting of Michael Al- + lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, + Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- + ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet + Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 in August of 2000. Version 3.3 offered many firsts. It was the first version to - separate race and profession. The Elf class was removed in pref- + separate race and profession. The Elf class was removed in pref- erence to an elf race, and the races of dwarves, gnomes, and orcs - made their first appearance in the game alongside the familiar - human race. Monk and Ranger roles joined Archeologists, Barbar- - ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, - Tourists, Valkyries and of course, Wizards. It was also the - first version to allow you to ride a steed, and was the first - version to have a publicly available web-site listing all the - bugs that had been discovered. Despite that constantly growing + made their first appearance in the game alongside the familiar + human race. Monk and Ranger roles joined Archeologists, Barbar- + ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, + Tourists, Valkyries and of course, Wizards. It was also the + first version to allow you to ride a steed, and was the first + version to have a publicly available web-site listing all the + bugs that had been discovered. Despite that constantly growing - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5878,40 +5878,40 @@ - bug list, 3.3 proved stable enough to last for more than a year + bug list, 3.3 proved stable enough to last for more than a year and a half. - The 3.4 NetHack Development Team initially consisted of - Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin - Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet - Walz, and Paul Winner, with Warwick Allison joining just before + The 3.4 NetHack Development Team initially consisted of + Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin + Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet + Walz, and Paul Winner, with Warwick Allison joining just before the release of NetHack 3.4.0 in March 2002. - As with version 3.3, various people contributed to the game + As with version 3.3, various people contributed to the game as a whole as well as supporting ports on the different platforms that NetHack runs on: Pat Rankin maintained 3.4 for VMS. - Michael Allison maintained NetHack 3.4 for the MS-DOS plat- + Michael Allison maintained NetHack 3.4 for the MS-DOS plat- form. Paul Winner and Yitzhak Sapir provided encouragement. - Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- + Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- hanced the Macintosh port of 3.4. - Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, - and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft + Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, + and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft Windows platform. Alex Kompel contributed a new graphical inter- - face for the Windows port. Alex Kompel also contributed a Win- + face for the Windows port. Alex Kompel also contributed a Win- dows CE port for 3.4.1. Ron Van Iwaarden was the sole maintainer of NetHack for OS/2 - the past several releases. Unfortunately Ron's last OS/2 machine - stopped working in early 2006. A great many thanks to Ron for + the past several releases. Unfortunately Ron's last OS/2 machine + stopped working in early 2006. A great many thanks to Ron for keeping NetHack alive on OS/2 all these years. - Janne Salmijarvi and Teemu Suikki maintained and enhanced - the Amiga port of 3.4 after Janne Salmijarvi resurrected it for + Janne Salmijarvi and Teemu Suikki maintained and enhanced + the Amiga port of 3.4 after Janne Salmijarvi resurrected it for 3.3.1. Christian "Marvin" Bressler maintained 3.4 for the Atari af- @@ -5920,21 +5920,21 @@ The release of NetHack 3.4.3 in December 2003 marked the be- ginning of a long release hiatus. 3.4.3 proved to be a remarkably stable version that provided continued enjoyment by the community - for more than a decade. The NetHack Development Team 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 + for more than a decade. The NetHack Development Team slowly and + quietly continued to work on the game behind the scenes during + the tenure of 3.4.3. It was during that same period that several new variants emerged within the NetHack community. Notably sporkhack by Derek S. Ray, unnethack by Patric Mueller, nitrohack - and its successors originally by Daniel Thaler and then by Alex - Smith, and Dynahack by Tung Nguyen. Some of those variants con- - tinue to be developed, maintained, and enjoyed by the community + and its successors originally by Daniel Thaler and then by Alex + Smith, and Dynahack by Tung Nguyen. Some of those variants con- + tinue to be developed, maintained, and enjoyed by the community to this day. In September 2014, an interim snapshot of the code under de- velopment was released publicly by other parties. Since that code - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -5944,63 +5944,63 @@ - was a work-in-progress and had not gone through the process of - debugging it as a suitable release, it was decided that the ver- - sion numbers present on that code snapshot would be retired and - never used in an official NetHack release. An announcement was - posted on the NetHack Development Team's official nethack.org - website to that effect, stating that there would never be a + was a work-in-progress and had not gone through the process of + debugging it as a suitable release, it was decided that the ver- + sion numbers present on that code snapshot would be retired and + never used in an official NetHack release. An announcement was + posted on the NetHack Development Team's official nethack.org + website to that effect, stating that there would never be a 3.4.4, 3.5, or 3.5.0 official release version. - In January 2015, preparation began for the release of + In January 2015, preparation began for the release of NetHack 3.6. - At the beginning of development for what would eventually - get released as 3.6.0, the NetHack Development Team consisted of - Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, - Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- - son, Janet Walz, and Paul Winner. In early 2015, ahead of the + At the beginning of development for what would eventually + get released as 3.6.0, the NetHack Development Team consisted of + Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, + Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- + son, Janet Walz, and Paul Winner. In early 2015, ahead of the release of 3.6.0, new members Sean Hunt, Pasi Kallinen, and Derek S. Ray joined the NetHack Development Team. Near the end of the development of 3.6.0, one of the signif- - icant inspirations for many of the humorous and fun features - found in the game, author Terry Pratchett, passed away. NetHack + icant inspirations for many of the humorous and fun features + found in the game, author Terry Pratchett, passed away. NetHack 3.6.0 introduced a tribute to him. 3.6.0 was released in December 2015, and merged work done by - the development team since the release of 3.4.3 with some of the + the development team since the release of 3.4.3 with some of the beloved community patches. Many bugs were fixed and some code was restructured. - The NetHack Development Team, as well as Steve VanDevender + The NetHack Development Team, as well as Steve VanDevender and Kevin Smolkowski, ensured that NetHack 3.6 continued to oper- ate on various UNIX flavors and maintained the X11 interface. - Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- + Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- tained the port of NetHack 3.6 for Mac OSX. - Michael Allison, David Cohrs, Bart House, Pasi Kallinen, - Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- + Michael Allison, David Cohrs, Bart House, Pasi Kallinen, + Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- tained the port of NetHack 3.6 for Microsoft Windows. - Pat Rankin attempted to keep the VMS port running for + Pat Rankin attempted to keep the VMS port running for NetHack 3.6, hindered by limited access. Kevin Smolkowski has up- - dated and tested it for the most recent version of OpenVMS (V8.4 + dated 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. - Ray Chason resurrected the msdos port for 3.6 and contrib- + Ray Chason resurrected the msdos port for 3.6 and contrib- uted the necessary updates to the community at large. - In late April 2018, several hundred bug fixes for 3.6.0 and - some new features were assembled and released as NetHack 3.6.1. + In late April 2018, several hundred bug fixes for 3.6.0 and + some new features were assembled and released as NetHack 3.6.1. The NetHack Development Team at the time of release of 3.6.1 con- - sisted of Warwick Allison, Michael Allison, Ken Arromdee, David - Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, + sisted of Warwick Allison, Michael Allison, Ken Arromdee, David + Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -6010,14 +6010,14 @@ - Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike + Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz, and Paul Winner. In early May 2019, another 320 bug fixes along with some en- - hancements and the adopted curses window port, were released as + hancements and the adopted curses window port, were released as 3.6.2. - Bart House, who had contributed to the game as a porting + Bart House, who had contributed to the game as a porting team participant for decades, joined the NetHack Development Team in late May 2019. @@ -6027,19 +6027,19 @@ 12.1. SPECIAL THANKS On behalf of the NetHack community, thank you very much once - again to M. Drew Streib and Pasi Kallinen for providing a public - NetHack server at nethack.alt.org. Thanks to Keith Simpson and + again to M. Drew Streib and Pasi Kallinen for providing a public + NetHack server at nethack.alt.org. Thanks to Keith Simpson and Andy Thomson for hardfought.org. Thanks to all those unnamed dun- - geoneers who invest their time and effort into annual NetHack - tournaments such as Junethack, The November NetHack Tournament + geoneers who invest their time and effort into annual NetHack + tournaments such as Junethack, The November NetHack Tournament and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list + of the names of the worst of these miscreants in this, the list of Dungeoneers: Adam Aronow J. Ali Harlow Mikko Juola Alex Kompel Janet Walz Nathan Eady @@ -6066,7 +6066,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 @@ -6097,7 +6097,7 @@ Irina Rempt-Drijfhout Mike Passaretti Izchak Miller Mike Stephenson - Brand and product names are trademarks or registered trade- + Brand and product names are trademarks or registered trade- marks of their respective holders. @@ -6132,7 +6132,7 @@ - NetHack 3.6 November 17, 2019 + NetHack 3.6 November 27, 2019 From 654203f0ba4768562c7464c8561e590345855090 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 28 Nov 2019 12:37:54 -0500 Subject: [PATCH 353/529] Guidebook update from cron --- doc/Guidebook.txt | 1565 ++++++++++++++++++++++----------------------- 1 file changed, 749 insertions(+), 816 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index 82544f9b6..3367d3e6f 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -126,7 +126,7 @@ - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -192,7 +192,7 @@ you have seen on the current dungeon level; as you explore more - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -258,7 +258,7 @@ - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -324,7 +324,7 @@ Intelligence affects your ability to cast spells and read - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -456,7 +456,7 @@ - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -588,7 +588,7 @@ symbol at the chosen location, conditionally check for "More - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -720,7 +720,7 @@ - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -786,7 +786,7 @@ - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -852,10 +852,9 @@ once you've closed this menu. The available options are - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -919,11 +918,10 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 NetHack Guidebook 15 @@ -986,10 +984,9 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -1053,7 +1050,7 @@ - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -1119,10 +1116,9 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -1186,10 +1182,9 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -1253,8 +1248,7 @@ - NetHack 3.6 November 27, 2019 - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -1320,7 +1314,7 @@ - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -1386,7 +1380,7 @@ - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -1452,7 +1446,7 @@ - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -1518,11 +1512,10 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 NetHack Guidebook 24 @@ -1585,11 +1578,10 @@ When picking a target with cursor and the autodescribe - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 NetHack Guidebook 25 @@ -1652,7 +1644,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -1676,7 +1668,6 @@ #wizgenesis Create a monster. May be prefixed by a count to create more - NetHack 3.7 November 17, 2019 than one. Autocompletes. Debug mode only. Default key is `^G'. @@ -1719,7 +1710,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -1744,7 +1735,6 @@ behavior. On other systems, if typing "Alt" plus another key transmits a two character sequence consisting of an Escape fol- lowed by the other key, you may set the altmeta option to have - NetHack 3.7 November 17, 2019 NetHack combine them into meta+key. M-? #? (not supported by all platforms) @@ -1786,7 +1776,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -1795,7 +1785,6 @@ NetHack Guidebook 28 - NetHack 3.7 November 17, 2019 M-r #rub @@ -1853,11 +1842,10 @@ the `^D' (kick) command. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 NetHack Guidebook 29 @@ -1920,10 +1908,9 @@ on the corresponding staircase at your destination. However, - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -1987,10 +1974,9 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -2054,7 +2040,7 @@ member a monster but want to try fighting anyway, you can use the - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -2077,7 +2063,6 @@ feed it, too, by throwing it food. A properly trained pet can be very useful under certain circumstances. - NetHack 3.7 November 17, 2019 Your pet also gains experience from killing monsters, and can grow over time, gaining hit points and doing more damage. Initially, your pet may even be better at killing things than @@ -2121,7 +2106,7 @@ ers (or even former incarnations of yourself!) and their personal - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -2145,7 +2130,6 @@ more will result in it disappearing from your map, similarly if it is the one who moved rather than you. - NetHack 3.7 November 17, 2019 However, if you encounter a monster which you can't see or sense -- perhaps it is invisible and has just tapped you on the noggin -- a special "remembered, unseen monster" marker will be @@ -2188,7 +2172,7 @@ ter. Many commands that operate on objects must ask you to find - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -2212,7 +2196,6 @@ When you use one of these objects, if its effect is obvious, NetHack will remember what it is for you. If its effect isn't extremely obvious, you will be asked what you want to call this - NetHack 3.7 November 17, 2019 type of object so you will recognize it later. You can also use the "#name" command, for the same purpose at any time, to name all objects of a particular type or just an individual object. @@ -2255,7 +2238,7 @@ In some cases "uncursed" will be omitted as being redundant when - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -2279,7 +2262,6 @@ exception; they normally do more damage with bare (or gloved) hands than they do with weapons. - NetHack 3.7 November 17, 2019 There are wielded weapons, like maces and swords, and thrown weapons, like arrows and spears. To hit monsters with a weapon, you must wield it and attack them, or throw it at them. You can @@ -2322,11 +2304,10 @@ to taking off other worn items. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 NetHack Guidebook 36 @@ -2388,8 +2369,8 @@ - NetHack 3.7 November 17, 2019 - NetHack 3.6 November 27, 2019 + + NetHack 3.7 November 27, 2019 @@ -2455,10 +2436,9 @@ ondary is just an item in your inventory that's been designated - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -2522,7 +2502,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -2544,7 +2524,6 @@ would give you better protection than normal chain mail, lowering your armor class one unit further to 4. When you put on a piece of armor, you immediately find out the armor class and any - NetHack 3.7 November 17, 2019 "plusses" it provides. Cursed pieces of armor usually have nega- tive enchantments (minuses) in addition to being unremovable. @@ -2589,7 +2568,7 @@ - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -2655,11 +2634,10 @@ the wall, you might decide to go for broke and break your wand. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 NetHack Guidebook 41 @@ -2722,7 +2700,7 @@ cation rather than just specify a particular direction. Other - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -2745,7 +2723,6 @@ slots are shared with weapons skills. (See also the section on "Weapon proficiency".) - NetHack 3.7 November 17, 2019 Casting a spell also requires flexible movement, and wearing various types of armor may interfere with that. @@ -2789,11 +2766,10 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 NetHack Guidebook 43 @@ -2856,7 +2832,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -2881,7 +2857,6 @@ action which breaks a challenge, it will no longer be listed. This gives players extra "bragging rights" for winning the game with these challenges. Note that it is perfectly acceptable to - NetHack 3.7 November 17, 2019 win the game without resorting to these restrictions and that it is unusual for players to adhere to challenges the first time they win the game. @@ -2923,7 +2898,7 @@ brains while polymorphed into a mind flayer, is considered eating - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -2948,7 +2923,6 @@ "fruits", although they could be anything from "cherries" to "pork chops", are also assumed to be vegan. - NetHack 3.7 November 17, 2019 An atheist is one who rejects religion. This means that you cannot #pray, #offer sacrifices to any god, #turn undead, or #chat with a priest. Particularly selective readers may argue @@ -2990,7 +2964,7 @@ type ("polypiling") or the form of your own body into another - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -3016,7 +2990,6 @@ NetHack should do things, there are options you can set to change how NetHack behaves. - NetHack 3.7 November 17, 2019 9.1. Setting the options Options may be set in a number of ways. Within the game, @@ -3057,7 +3030,7 @@ tion, and are ignored unless a CHOOSE statement was used to - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -3083,7 +3056,6 @@ "no" or `!' to turn it off. For compound options, the option name and value are separated by a colon. Some options are per- sistent, and apply only to new games. You can specify multiple - NetHack 3.7 November 17, 2019 OPTIONS statements, and multiple options separated by commas in a single OPTIONS statement. (Comma separated options are pro- cessed from right to left.) @@ -3124,7 +3096,7 @@ pletion has no effect for the X11 windowport. You can specify - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -3150,7 +3122,6 @@ Change the key bindings of some special keys, menu accelera- tors, or extended commands. You can specify multiple bindings. Format is key followed by the command, separated by a colon. - NetHack 3.7 November 17, 2019 See the "Changing Key Bindings" section for more information. Example: @@ -3191,7 +3162,7 @@ "Configuring User Sounds" section. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -3217,7 +3188,6 @@ names, one per line, up to a maximum of 128 lines. Each line is processed by the function that handles wishing. - NetHack 3.7 November 17, 2019 Example: WIZKIT=~/wizkit.txt @@ -3258,7 +3228,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -3285,7 +3255,6 @@ The NETHACKOPTIONS value is effectively the same as a single OPTIONS statement in a configuration file. The "OPTIONS=" prefix is implied and comma separated options are processed from right - NetHack 3.7 November 17, 2019 to left. Other types of configuration statements such as BIND or MSGTYPE are not allowed. @@ -3325,7 +3294,7 @@ tion controls whether the description includes map coordinates. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -3351,7 +3320,6 @@ This option controls what happens when you attempt the `f' (fire) command when nothing is quivered or readied (default false). When true, the computer will fill your quiver or - NetHack 3.7 November 17, 2019 quiver sack or make ready some suitable weapon. Note that it will not take into account the blessed/cursed status, enchant- ment, damage, or quality of the weapon; you are free to manual- @@ -3392,7 +3360,7 @@ was defined during compilation. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -3418,7 +3386,6 @@ dark_room Show out-of-sight areas of lit rooms (default on). Persistent. - NetHack 3.7 November 17, 2019 disclose Controls what information the program reveals when the game ends. Value is a space separated list of prompting/category @@ -3459,7 +3426,7 @@ display for end-of-game disclosure follows a set sequence. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -3484,7 +3451,6 @@ Name your starting dog (for example "dogname:Fang"). Cannot be set with the `O' command. - NetHack 3.7 November 17, 2019 extmenu Changes the extended commands interface to pop-up a menu of available commands. It is keystroke compatible with the tradi- @@ -3526,7 +3492,7 @@ "no", you will exclude that gender from being picked randomly. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -3551,7 +3517,6 @@ the `/' command, ask if you want to see it (default on). Turn- ing help off makes just looking at things faster, since you aren't interrupted with the "More info?" prompt, but it also - NetHack 3.7 November 17, 2019 means that you might miss some interesting and/or important in- formation. Persistent. @@ -3593,7 +3558,7 @@ sistent. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -3617,7 +3582,6 @@ lootabc When using a menu to interact with a container, use the old `a', `b', and `c' keyboard shortcuts rather than the mnemonics - NetHack 3.7 November 17, 2019 `o', `i', and `b' (default off). Persistent. mail @@ -3660,7 +3624,7 @@ fault `\'. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -3683,7 +3647,6 @@ Menu character accelerator to invert all items in a menu. Im- plemented by the Amiga, Gem, X11 and tty ports. Default `@'. - NetHack 3.7 November 17, 2019 menu_invert_page Menu character accelerator to invert all items on this page of a menu. Implemented by the Amiga, Gem and tty ports. Default @@ -3727,12 +3690,11 @@ Prompt for new form whenever any monster changes shape (default - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 NetHack Guidebook 57 @@ -3794,7 +3756,7 @@ Valid settings are: - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 @@ -3818,7 +3780,7 @@ acts as `G' and `Alt-0' acts as `I'. Setting -1 is to accommo- date some QWERTZ keyboards which have the location of the `y' and `z' keys swapped.) When moving by numbers, to enter a - NetHack 3.7 November 17, 2019 + count prefix for those commands which accept one (such as "12s" to search twelve times), precede it with the letter `n' ("n12s"). @@ -3860,11 +3822,10 @@ item. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 NetHack Guidebook 59 @@ -3927,10 +3888,9 @@ (Default `S'). Persistent. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -3994,10 +3954,9 @@ be set with the `O' command. Persistent. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -4061,10 +4020,9 @@ off). Persistent. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -4128,10 +4086,9 @@ only; "X11" interface always uses a timer based delay. The - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -4195,7 +4152,7 @@ - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -4261,10 +4218,9 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -4328,10 +4284,9 @@ If NetHack can, it should use this size font for text windows. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -4395,10 +4350,9 @@ Number of lines for traditional below-the-map status display. - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -4462,7 +4416,7 @@ - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -4528,11 +4482,10 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 NetHack Guidebook 69 @@ -4556,49 +4509,46 @@ with the `O' command. subkeyvalue - (Win32 tty NetHack only). May be used to alter the value of + (Win32 tty NetHack only). May be used to alter the value of keystrokes that the operating system returns to NetHack to help - compensate for international keyboard issues. OPTIONS=subkey- - value:171/92 will return 92 to NetHack, if 171 was originally - going to be returned. You can use multiple subkeyvalue state- - ments in the configuration file if needed. Cannot be set with + compensate for international keyboard issues. OPTIONS=subkey- + value:171/92 will return 92 to NetHack, if 171 was originally + going to be returned. You can use multiple subkeyvalue state- + ments in the configuration file if needed. Cannot be set with the `O' command. video Set the video mode used (PC NetHack only). Values are "autode- - tect", "default", or "vga". Setting "vga" (or "autodetect" - with vga hardware present) will cause the game to display + tect", "default", or "vga". Setting "vga" (or "autodetect" + with vga hardware present) will cause the game to display tiles. Cannot be set with the `O' command. videocolors - Set the color palette for PC systems using NO_TERMS (default - 4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order - of colors is red, green, brown, blue, magenta, cyan, - bright.white, bright.red, bright.green, yellow, bright.blue, - bright.magenta, and bright.cyan. Cannot be set with the `O' + Set the color palette for PC systems using NO_TERMS (default + 4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order + of colors is red, green, brown, blue, magenta, cyan, + bright.white, bright.red, bright.green, yellow, bright.blue, + bright.magenta, and bright.cyan. Cannot be set with the `O' command. videoshades Set the intensity level of the three gray scales available (de- fault dark normal light, PC NetHack only). If the game display - is difficult to read, try adjusting these scales; if this does - not correct the problem, try !color. Cannot be set with the + is difficult to read, try adjusting these scales; if this does + not correct the problem, try !color. Cannot be set with the `O' command. 9.7. Regular Expressions - Regular expressions are normally POSIX extended regular ex- - pressions. It is possible to compile NetHack without regular ex- - pression support on a platform where there is no regular expres- - sion library. While this is not true of any modern platform, if - your NetHack was built this way, patterns are instead glob pat- - 9.8. Configuring Autopickup Exceptions - You can further refine the behavior of the autopickup option - beyond what is available through the pickup_types option. - By placing autopickup_exception lines in your configuration - file, you can define patterns to be checked when the game is + Regular expressions are normally POSIX extended regular ex- + pressions. It is possible to compile NetHack without regular ex- + pression support on a platform where there is no regular expres- + sion library. While this is not true of any modern platform, if + your NetHack was built this way, patterns are instead glob pat- + terns. This applies to Autopickup exceptions, Message types, Menu - NetHack 3.7 November 17, 2019 + + NetHack 3.7 November 27, 2019 @@ -4608,33 +4558,36 @@ - expression support on a platform where there is no regular ex- - pression library. While this is not true of any modern platform, - if your NetHack was built this way, patterns are instead glob - patterns. This applies to Autopickup exceptions, Message types, - Menu colors, and User sounds. + colors, and User sounds. + 9.8. Configuring Autopickup Exceptions + + You can further refine the behavior of the autopickup option + beyond what is available through the pickup_types option. + + By placing autopickup_exception lines in your configuration + file, you can define patterns to be checked when the game is about to autopickup something. autopickup_exception - Sets an exception to the pickup_types option. The autopick- - up_exception option should be followed by a regular expression - to be used as a pattern to match against the singular form of + Sets an exception to the pickup_types option. The autopick- + up_exception option should be followed by a regular expression + to be used as a pattern to match against the singular form of the description of an object at your location. - In addition, some characters are treated specially if they oc- + In addition, some characters are treated specially if they oc- cur as the first character in the pattern, specifically: < - always pickup an object that matches rest of pattern; > - never pickup an object that matches rest of pattern. - The autopickup_exception rules are processed in the order in - which they appear in your configuration file, thus allowing a + The autopickup_exception rules are processed in the order in + which they appear in your configuration file, thus allowing a later rule to override an earlier rule. - Exceptions can be set with the `O' command, but because they - are not included in your configuration file, they won't be in - effect if you save and then restore your game. autopickup_ex- + Exceptions can be set with the `O' command, but because they + are not included in your configuration file, they won't be in + effect if you save and then restore your game. autopickup_ex- ception rules and not saved with the game. Here are some examples: @@ -4643,31 +4596,27 @@ autopickup_exception=">*corpse" autopickup_exception=">* cursed*" - The first example above will result in autopickup of any - type of arrow. The second example results in the exclusion of - any corpse from autopickup. The last example results in the ex- + The first example above will result in autopickup of any + type of arrow. The second example results in the exclusion of + any corpse from autopickup. The last example results in the ex- clusion of items known to be cursed from autopickup. 9.9. Changing Key Bindings - It is possible to change the default key bindings of some - special commands, menu accelerator keys, and extended commands, - by using BIND stanzas in the configuration file. Format is key, - followed by the command to bind to, separated by a colon. The + It is possible to change the default key bindings of some + special commands, menu accelerator keys, and extended commands, + by using BIND stanzas in the configuration file. Format is key, + followed by the command to bind to, separated by a colon. The key can be a single character ("x"), a control key ("^X", "C-x"), - BIND=^X:getpos.autodescribe - BIND={:menu_first_page - BIND=v:loot + a meta key ("M-x"), or a three-digit decimal ASCII code. - Extended command keys - You can bind multiple keys to the same extended command. Un- - bind a key by using "nothing" as the extended command to bind - to. You can also bind the "", "", and "" - keys. + For example: + + + + NetHack 3.7 November 27, 2019 - NetHack 3.6 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -4675,24 +4624,30 @@ - a meta key ("M-x"), or a three-digit decimal ASCII code. + BIND=^X:getpos.autodescribe + BIND={:menu_first_page + BIND=v:loot - For example: + Extended command keys + You can bind multiple keys to the same extended command. Un- + bind a key by using "nothing" as the extended command to bind + to. You can also bind the "", "", and "" + keys. Menu accelerator keys - The menu control or accelerator keys can also be rebound via - OPTIONS lines in the configuration file. You cannot bind ob- + The menu control or accelerator keys can also be rebound via + OPTIONS lines in the configuration file. You cannot bind ob- ject symbols into menu accelerators. Special command keys - Below are the special commands you can rebind. Some of them - can be bound to same keys with no problems, others are in the - same "context", and if bound to same keys, only one of those - commands will be available. Special command can only be bound + Below are the special commands you can rebind. Some of them + can be bound to same keys with no problems, others are in the + same "context", and if bound to same keys, only one of those + commands will be available. Special command can only be bound to a single key. count - Prefix key to start a count, to repeat a command this many + Prefix key to start a count, to repeat a command this many times. With number_pad only. Default is `n'. doinv @@ -4702,37 +4657,30 @@ Prefix key to force fight a direction. Default is `F'. fight.numpad - Prefix key to force fight a direction. With number_pad only. + Prefix key to force fight a direction. With number_pad only. Default is `-'. getdir.help - When asked for a direction, the key to show the help. Default + When asked for a direction, the key to show the help. Default is `?'. getdir.self - When asked for a direction, the key to target yourself. De- + When asked for a direction, the key to target yourself. De- fault is `.'. getdir.self2 - When asked for a direction, the key to target yourself. De- + When asked for a direction, the key to target yourself. De- fault is `s'. getpos.autodescribe - When asked for a location, the key to toggle autodescribe. - When asked for a location, the key to go to next closest inter- - esting thing. Default is `a'. + When asked for a location, the key to toggle autodescribe. De- + fault is `#'. - getpos.all.prev - When asked for a location, the key to go to previous closest - interesting thing. Default is `A'. - - getpos.door.next - When asked for a location, the key to go to next closest door - or doorway. Default is `d'. + getpos.all.next + When asked for a location, the key to go to next closest - - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -4740,66 +4688,65 @@ NetHack Guidebook 72 - getpos.all.next - When asked for a location, the key to go to next closest inter- - esting thing. Default is `a'. + interesting thing. Default is `a'. + + getpos.all.prev + When asked for a location, the key to go to previous closest + interesting thing. Default is `A'. + + getpos.door.next + When asked for a location, the key to go to next closest door + or doorway. Default is `d'. getpos.door.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest door or doorway. Default is `D'. getpos.help - When asked for a location, the key to show help. Default is + When asked for a location, the key to show help. Default is `?'. getpos.mon.next - When asked for a location, the key to go to next closest mon- + When asked for a location, the key to go to next closest mon- ster. Default is `m'. getpos.mon.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest monster. Default is `M'. getpos.obj.next - When asked for a location, the key to go to next closest ob- + When asked for a location, the key to go to next closest ob- ject. Default is `o'. getpos.obj.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest object. Default is `O'. getpos.menu - When asked for a location, and using one of the next or previ- - ous keys to cycle through targets, toggle showing a menu in- + When asked for a location, and using one of the next or previ- + ous keys to cycle through targets, toggle showing a menu in- stead. Default is `!'. getpos.moveskip - When asked for a location, and using the shifted movement keys - or meta-digit keys to fast-move around, move by skipping the + When asked for a location, and using the shifted movement keys + or meta-digit keys to fast-move around, move by skipping the same glyphs instead of by 8 units. Default is `*'. getpos.filter When asked for a location, change the filtering mode when using - one of the next or previous keys to cycle through targets. - Toggles between no filtering, in view only, and in the same + one of the next or previous keys to cycle through targets. + Toggles between no filtering, in view only, and in the same area only. Default is `"'. - When asked for a location, the key to choose the location, and - getpos.pick.once + getpos.pick When asked for a location, the key to choose the location, and - skip asking for more info. Default is `,'. - - getpos.pick.quick - When asked for a location, the key to choose the location, skip - asking for more info, and exit the location asking loop. De- - fault is `;'. + possibly ask for more info. Default is `.'. - - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -4807,14 +4754,19 @@ NetHack Guidebook 73 - getpos.pick + + + getpos.pick.once When asked for a location, the key to choose the location, and - possibly ask for more info. Default is `.'. - + skip asking for more info. Default is `,'. + getpos.pick.quick + When asked for a location, the key to choose the location, skip + asking for more info, and exit the location asking loop. De- + fault is `;'. getpos.pick.verbose - When asked for a location, the key to choose the location, and + When asked for a location, the key to choose the location, and show more info without asking. Default is `:'. getpos.self @@ -4822,23 +4774,23 @@ fault is `@'. getpos.unexplored.next - When asked for a location, the key to go to next closest unex- + When asked for a location, the key to go to next closest unex- plored location. Default is `x'. getpos.unexplored.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest unexplored location. Default is `X'. getpos.valid - When asked for a location, the key to go to show valid target + When asked for a location, the key to go to show valid target locations. Default is `$'. getpos.valid.next - When asked for a location, the key to go to next closest valid + When asked for a location, the key to go to next closest valid location. Default is `z'. getpos.valid.prev - When asked for a location, the key to go to previous closest + When asked for a location, the key to go to previous closest valid location. Default is `Z'. nopickup @@ -4848,34 +4800,38 @@ Key to redraw the screen. Default is `^R'. redraw.numpad - Key to redraw the screen. With number_pad only. Default is + Key to redraw the screen. With number_pad only. Default is `^L'. repeat Key to repeat previous command. Default is `^A'. - run - Prefix key to run towards a direction. Default is `G'. - run.nopickup - Prefix key to run towards a direction without picking up items - on the way. Default is `M'. - - run.numpad - Prefix key to run towards a direction. With number_pad only. - Default is `5'. + reqmenu + Prefix key to request menu from some commands. Default is `m'. - NetHack 3.7 November 17, 2019 + + + NetHack 3.7 November 27, 2019 NetHack Guidebook 74 - Prefix key to request menu from some commands. Default is `m'. + run + Prefix key to run towards a direction. Default is `G'. + + run.nopickup + Prefix key to run towards a direction without picking up items + on the way. Default is `M'. + + run.numpad + Prefix key to run towards a direction. With number_pad only. + Default is `5'. rush Prefix key to rush towards a direction. Default is `g'. @@ -4885,7 +4841,7 @@ You can change the way the messages are shown in the message area, when the message matches a user-defined pattern. - In general, the configuration file entries to describe the + In general, the configuration file entries to describe the message types look like this: MSGTYPE=type "pattern" type - how the message should be shown; @@ -4898,40 +4854,31 @@ show - show message normally; hide - never show the message; stop - wait for user with more-prompt; - norep - show the message once, but not again if no other mes- + norep - show the message once, but not again if no other mes- sage is shown in between. - Here's an example of message types using NetHack's internal + Here's an example of message types using NetHack's internal pattern matching facility: MSGTYPE=stop "You feel hungry." MSGTYPE=hide "You displaced *." - specifies that whenever a message "You feel hungry" is shown, - the user is prompted with more-prompt, and a message matching + specifies that whenever a message "You feel hungry" is shown, + the user is prompted with more-prompt, and a message matching "You displaced ." is not shown at all. - The order of the defined MSGTYPE lines is important; the last - matching rule is used. Put the general case first, exceptions + The order of the defined MSGTYPE lines is important; the last + matching rule is used. Put the general case first, exceptions below them. + 9.11. Configuring Menu Colors - when the line matches a user-defined pattern. At this time the - - In general, the configuration file entries to describe the - menu color mappings look like this: - - MENUCOLOR="pattern"=color&attribute - NetHack 3.6 November 27, 2019 - - pattern - the pattern to match; - color - the color to use for lines matching the pat- - tern; - attribute - the attribute to use for lines matching the - pattern. The attribute is optional, and if + Some platforms allow you to define colors used in menu lines + when the line matches a user-defined pattern. At this time the + tty, curses, win32tty and win32gui interfaces support this. - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -4939,66 +4886,65 @@ NetHack Guidebook 75 - Some platforms allow you to define colors used in menu lines - when the line matches a user-defined pattern. At this time the - tty, curses, win32tty and win32gui interfaces support this. + In general, the configuration file entries to describe the + menu color mappings look like this: + MENUCOLOR="pattern"=color&attribute + + pattern - the pattern to match; + color - the color to use for lines matching the pat- + tern; + attribute - the attribute to use for lines matching the + pattern. The attribute is optional, and if left out, you must also leave out the preced- - ing ampersand. If no attribute is defined, + ing ampersand. If no attribute is defined, no attribute is used. The pattern should be a regular expression. - Allowed colors are black, red, green, brown, blue, magenta, - cyan, gray, orange, light-green, yellow, light-blue, light-ma- - genta, light-cyan, and white. And no-color, the default fore- - ground color, which isn't necessarily the same as any of the + Allowed colors are black, red, green, brown, blue, magenta, + cyan, gray, orange, light-green, yellow, light-blue, light-ma- + genta, light-cyan, and white. And no-color, the default fore- + ground color, which isn't necessarily the same as any of the other colors. - Allowed attributes are none, bold, dim, underline, blink, and - inverse. "Normal" is a synonym for "none". Note that the + Allowed attributes are none, bold, dim, underline, blink, and + inverse. "Normal" is a synonym for "none". Note that the platform used may interpret the attributes any way it wants. - Here's an example of menu colors using NetHack's internal pat- + Here's an example of menu colors using NetHack's internal pat- tern matching facility: MENUCOLOR="* blessed *"=green MENUCOLOR="* cursed *"=red MENUCOLOR="* cursed *(being worn)"=red&underline - specifies that any menu line with " blessed " contained in it - will be shown in green color, lines with " cursed " will be - shown in red, and lines with " cursed " followed by "(being - worn)" on the same line will be shown in red color and under- + specifies that any menu line with " blessed " contained in it + will be shown in green color, lines with " cursed " will be + shown in red, and lines with " cursed " followed by "(being + worn)" on the same line will be shown in red color and under- lined. You can have multiple MENUCOLOR entries in your config- - uration file, and the last MENUCOLOR line that matches a menu + uration file, and the last MENUCOLOR line that matches a menu line will be used for the line. Note that if you intend to have one or more color specifica- - tions match " uncursed ", you will probably want to turn the im- + tions match " uncursed ", you will probably want to turn the im- plicit_uncursed option off so that all items known to be uncursed are actually displayed with the "uncursed" description. + 9.12. Configuring User Sounds - Some platforms allow you to define sound files to be played - when a message that matches a user-defined pattern is delivered - - The following configuration file entries are relevant to - mapping user sounds to messages: - - SOUNDDIR - The directory that houses the sound files to be played. - - SOUND - An entry that maps a sound file to a user-specified message - pattern. Each SOUND entry is broken down into the following - parts: + Some platforms allow you to define sound files to be played + when a message that matches a user-defined pattern is delivered + to the message window. At this time the Qt port and the win32tty + and win32gui ports support the use of user sounds. - NetHack 3.7 November 17, 2019 + + NetHack 3.7 November 27, 2019 @@ -5006,15 +4952,20 @@ NetHack Guidebook 76 - Some platforms allow you to define sound files to be played - when a message that matches a user-defined pattern is delivered - to the message window. At this time the Qt port and the win32tty - and win32gui ports support the use of user sounds. + The following configuration file entries are relevant to + mapping user sounds to messages: + SOUNDDIR + The directory that houses the sound files to be played. - MESG - message window mapping (the only one supported in + SOUND + An entry that maps a sound file to a user-specified message + pattern. Each SOUND entry is broken down into the following + parts: + + MESG - message window mapping (the only one supported in 3.6); pattern - the pattern to match; sound file - the sound file to play; @@ -5025,7 +4976,7 @@ 9.13. Configuring Status Hilites Your copy of NetHack may have been compiled with support for - "Status Hilites". If so, you can customize your game display by + "Status Hilites". If so, you can customize your game display by setting thresholds to change the color or appearance of fields in the status display. @@ -5033,8 +4984,8 @@ OPTION=hilite_status:field-name/behavior/color&attributes - For example, the following line in your configuration file - will cause the hitpoints field to display in the color red if + For example, the following line in your configuration file + will cause the hitpoints field to display in the color red if your hitpoints drop to or below a threshold of 30%: OPTION=hilite_status:hitpoints/<=30%/red/normal @@ -5042,31 +4993,24 @@ (That example is actually specifying red&normal for <=30% and no- color&normal for >30%.) - For another example, the following line in your configura- - tion file will cause wisdom to be displayed red if it drops and + For another example, the following line in your configura- + tion file will cause wisdom to be displayed red if it drops and green if it rises: OPTION=hilite_status:wisdom/down/red/up/green - Allowed colors are black, red, green, brown, blue, magenta, - cyan, gray, orange, light-green, yellow, light-blue, light- - ta, light-cyan, and white. And "no-color", the default fore- - Allowed attributes are none, bold, dim, underline, blink, - and inverse. "Normal" is a synonym for "none"; they should not + Allowed colors are black, red, green, brown, blue, magenta, + cyan, gray, orange, light-green, yellow, light-blue, light-magen- + ta, light-cyan, and white. And "no-color", the default fore- + ground color on the display, which is not necessarily the same as + black or white or any of the other colors. - To specify both a color and an attribute, use `&' to combine - them. To specify multiple attributes, use `+' to combine those. - For example: "magenta&inverse+dim". - - Note that the display may substitute or ignore particular - attributes depending upon its capabilities, and in general may - interpret the attributes any way it wants. For example, on some - display systems a request for bold might yield blink or vice ver- - sa. On others, issuing an attribute request while another is al- - ready set up will replace the earlier attribute rather than + Allowed attributes are none, bold, dim, underline, blink, + and inverse. "Normal" is a synonym for "none"; they should not + be used in combination with any of the other attributes. - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -5074,22 +5018,24 @@ NetHack Guidebook 77 - magenta, light-cyan, and white. And "no-color", the default - foreground color on the display, which is not necessarily the - same as black or white or any of the other colors. - - Allowed attributes are none, bold, dim, underline, blink, - and inverse. "Normal" is a synonym for "none"; they should not - be used in combination with any of the other attributes. + To specify both a color and an attribute, use `&' to combine + them. To specify multiple attributes, use `+' to combine those. + For example: "magenta&inverse+dim". - combine with it. Since NetHack issues attribute requests sequen- + Note that the display may substitute or ignore particular + attributes depending upon its capabilities, and in general may + interpret the attributes any way it wants. For example, on some + display systems a request for bold might yield blink or vice ver- + sa. On others, issuing an attribute request while another is al- + ready set up will replace the earlier attribute rather than com- + bine with it. Since NetHack issues attribute requests sequen- tially (at least with the tty interface) rather than all at once, the only way a situation like that can be controlled is to speci- fy just one attribute. - You can adjust the appearance of the following status + You can adjust the appearance of the following status fields: title dungeon-level experience-level strength gold experience @@ -5100,16 +5046,16 @@ charisma armor-class condition alignment score - The pseudo-field "characteristics" can be used to set all six - of Str, Dex, Con, Int, Wis, and Cha at once. "HD" is "hit - dice", an approximation of experience level displayed when - polymorphed. "experience", "time", and "score" are condition- + The pseudo-field "characteristics" can be used to set all six + of Str, Dex, Con, Int, Wis, and Cha at once. "HD" is "hit + dice", an approximation of experience level displayed when + polymorphed. "experience", "time", and "score" are condition- ally displayed depending upon your other option settings. - Instead of a behavior, "condition" takes the following condi- - tion flags: stone, slime, strngl, foodpois, termill, blind, - deaf, stun, conf, hallu, lev, fly, and ride. You can use "ma- - jor_troubles" as an alias for stone through termill, "mi- + Instead of a behavior, "condition" takes the following condi- + tion flags: stone, slime, strngl, foodpois, termill, blind, + deaf, stun, conf, hallu, lev, fly, and ride. You can use "ma- + jor_troubles" as an alias for stone through termill, "mi- nor_troubles" for blind through hallu, "movement" for lev, fly, and ride, and "all" for every condition. @@ -5118,26 +5064,21 @@ * "always" will set the default attributes for that field. - * "up", "down" set the field attributes for when the field - value changes upwards or downwards. This attribute times + * "up", "down" set the field attributes for when the field + value changes upwards or downwards. This attribute times + out after statushilites turns. - ue changes. This attribute times out after statushilites - turns. (If a field has both a "changed" rule and an "up" - or "down" rule which matches a change in the field's val- - - * percentage sets the field attribute when the field value - matches the percentage. It is specified as a number be- - tween 0 and 100, followed by `%' (percent sign). If the - percentage is prefixed with `<=' or `>=', it also matches - when value is below or above the percentage. Use prefix - `<' or `>' to match when strictly below or above. (The - numeric limit is relaxed slightly for those: >-1% and - <101% are allowed.) Only four fields support percentage - rules. Percentages for "hitpoints" and "power" are - straightforward; they're based on the corresponding + * "changed" sets the field attribute for when the field val- + ue changes. This attribute times out after statushilites + turns. (If a field has both a "changed" rule and an "up" + or "down" rule which matches a change in the field's val- + ue, the "up" or "down" one takes precedence.) + + + + NetHack 3.7 November 27, 2019 - NetHack 3.7 November 17, 2019 @@ -5145,49 +5086,72 @@ - out after statushilites turns. + * percentage sets the field attribute when the field value + matches the percentage. It is specified as a number be- + tween 0 and 100, followed by `%' (percent sign). If the + percentage is prefixed with `<=' or `>=', it also matches + when value is below or above the percentage. Use prefix + `<' or `>' to match when strictly below or above. (The + numeric limit is relaxed slightly for those: >-1% and + <101% are allowed.) Only four fields support percentage + rules. Percentages for "hitpoints" and "power" are + straightforward; they're based on the corresponding maxi- + mum field. Percentage highlight rules are also allowed + for "experience level" and "experience points" (valid when + the showexp option is enabled). For those, the percentage + is based on the progress from the start of the current ex- + perience level to the start of the next level. So if lev- + el 2 starts at 20 points and level 3 starts at 40 points, + having 30 points is 50% and 35 points is 75%. 100% is + unattainable for experience because you'll gain a level + and the calculations will be reset for that new level, but + a rule for =100% is allowed and matches the special case + of being exactly 1 experience point short of the next lev- + el. - * "changed" sets the field attribute for when the field val- - ue changes. This attribute times out after statushilites - turns. (If a field has both a "changed" rule and an "up" - or "down" rule which matches a change in the field's val- - ue, the "up" or "down" one takes precedence.) - - maximum field. Percentage highlight rules are also al- - lowed for "experience level" and "experience points" - (valid when the showexp option is enabled). For those, - the percentage is based on the progress from the start of - the current experience level to the start of the next lev- - el. So if level 2 starts at 20 points and level 3 starts - at 40 points, having 30 points is 50% and 35 points is - 75%. 100% is unattainable for experience because you'll - gain a level and the calculations will be reset for that - new level, but a rule for =100% is allowed and matches the - special case of being exactly 1 experience point short of - the next level. - - * absolute value sets the attribute when the field value - matches that number. The number must be 0 or higher, ex- - cept for "armor-class' which allows negative values, and - may optionally be preceded by `='. If the number is pre- - ceded by `<=' or `>=' instead, it also matches when value - is below or above. If the prefix is `<' or `>', only + * absolute value sets the attribute when the field value + matches that number. The number must be 0 or higher, ex- + cept for "armor-class' which allows negative values, and + may optionally be preceded by `='. If the number is pre- + ceded by `<=' or `>=' instead, it also matches when value + is below or above. If the prefix is `<' or `>', only match when strictly above or below. * text match sets the attribute when the field value matches - the text. Text matches can only be used for "alignment", - "carrying-capacity", "hunger", "dungeon-level", and "ti- - tle". For title, only the role's rank title is tested; + the text. Text matches can only be used for "alignment", + "carrying-capacity", "hunger", "dungeon-level", and "ti- + tle". For title, only the role's rank title is tested; the character's name is ignored. - The in-game options menu can help you determine the correct + The in-game options menu can help you determine the correct syntax for a configuration file. - The whole feature can be disabled by setting option sta- + The whole feature can be disabled by setting option sta- tushilites to 0. Example hilites: + + + + + + + + + + + + NetHack 3.7 November 27, 2019 + + + + + + NetHack Guidebook 79 + + + OPTION=hilite_status: gold/up/yellow/down/brown OPTION=hilite_status: characteristics/up/green/down/red OPTION=hilite_status: hitpoints/100%/gray&normal @@ -5203,36 +5167,23 @@ NetHack can load entire symbol sets from the symbol file. - The options that are used to select a particular symbol set + The options that are used to select a particular symbol set from the symbol file are: - - - - NetHack 3.7 November 17, 2019 - - - - - - NetHack Guidebook 79 - - - symset Set the name of the symbol set that you want to load. roguesymset - Set the name of the symbol set that you want to load for dis- + Set the name of the symbol set that you want to load for dis- play on the rogue level. - You can also override one or more symbols using the SYMBOLS - and ROGUESYMBOLS configuration file options. Symbols are speci- + You can also override one or more symbols using the SYMBOLS + and ROGUESYMBOLS configuration file options. Symbols are speci- fied as name:value pairs. Note that NetHack escape-processes the - value string in conventional C fashion. This means that \ is a - prefix to take the following character literally. Thus \ needs - to be represented as \\. The special prefix form \m switches on - the meta bit in the symbol value, and the ^ prefix causes the + value string in conventional C fashion. This means that \ is a + prefix to take the following character literally. Thus \ needs + to be represented as \\. The special prefix form \m switches on + the meta bit in the symbol value, and the ^ prefix causes the following character to be treated as a control character. NetHack Symbols @@ -5254,6 +5205,19 @@ - S_blcorn (bottom left corner) b S_blob (blob) + S_book (spellbook) + + + + NetHack 3.7 November 27, 2019 + + + + + + NetHack Guidebook 80 + + + ) S_boomleft (boomerang open left) ( S_boomright (boomerang open right) ` S_boulder (boulder) @@ -5272,19 +5236,6 @@ > S_dnladder (ladder down) > S_dnstair (staircase down) d S_dog (dog or other canine) - - - - NetHack 3.7 November 17, 2019 - - - - - - NetHack Guidebook 80 - - - D S_dragon (dragon) ; S_eel (sea monster) E S_elemental (elemental) @@ -5320,6 +5271,19 @@ ^ S_hole (hole) @ S_human (human or elf) h S_humanoid (humanoid) + + + + NetHack 3.7 November 27, 2019 + + + + + + NetHack Guidebook 81 + + + - S_hwall (horizontal wall) . S_ice (ice) i S_imp (imp or minor demon) @@ -5338,19 +5302,6 @@ : S_lizard (lizard) \ S_lslant (diagonal beam [zap animation]) ^ S_magic_portal (magic portal) - - - - NetHack 3.7 November 17, 2019 - - - - - - NetHack Guidebook 81 - - - ^ S_magic_trap (magic trap) m S_mimic (mimic) ] S_mimic_def (mimic) @@ -5386,6 +5337,19 @@ ^ S_squeaky_board (squeaky board) 0 S_ss1 (magic shield 1 of 4) # S_ss2 (magic shield 2 of 4) + + + + NetHack 3.7 November 27, 2019 + + + + + + NetHack Guidebook 82 + + + @ S_ss3 (magic shield 3 of 4) * S_ss4 (magic shield 4 of 4) ^ S_statue_trap (statue trap) @@ -5404,19 +5368,6 @@ ^ S_teleportation_trap (teleportation trap) \ S_throne (opulent throne) - S_tlcorn (top left corner) - - - - NetHack 3.7 November 17, 2019 - - - - - - NetHack Guidebook 82 - - - | S_tlwall (wall) ( S_tool (useful item (pick-axe, key, lamp...)) ^ S_trap_door (trap door) @@ -5452,28 +5403,10 @@ Y S_yeti (apelike creature) Z S_zombie (zombie) z S_zruty (zruty) - S_pet_override (any pet if ACCESSIBILITY=1 is set) - S_hero_override (hero if ACCESSIBILITY=1 is set) - - Notes: - - * Several symbols in this table appear to be blank. They are the - space character, except for S_pet_override and S_hero_override - which don't have any default value and can only be used if en- - abled in the "sysconf" file. - - * S_rock is misleadingly named; rocks and stones use S_gem. - Statues and boulders are the rock being referred to, but since - version 3.6.0, statues are displayed as the monster they de- - pict. So S_rock is only used for boulders and not used at all - if overridden by the more specific S_boulder. - - - - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -5483,63 +5416,63 @@ + S_pet_override (any pet if ACCESSIBILITY=1 is set) + S_hero_override (hero if ACCESSIBILITY=1 is set) + + Notes: + + * Several symbols in this table appear to be blank. They are the + space character, except for S_pet_override and S_hero_override + which don't have any default value and can only be used if en- + abled in the "sysconf" file. + + * S_rock is misleadingly named; rocks and stones use S_gem. + Statues and boulders are the rock being referred to, but since + version 3.6.0, statues are displayed as the monster they de- + pict. So S_rock is only used for boulders and not used at all + if overridden by the more specific S_boulder. + 9.15. Configuring NetHack for Play by the Blind - NetHack can be set up to use only standard ASCII characters - for making maps of the dungeons. This makes the MS-DOS versions - of NetHack completely accessible to the blind who use speech - and/or Braille access technologies. Players will require a good - working knowledge of their screen-reader's review features, and - will have to know how to navigate horizontally and vertically - character by character. They will also find the search capabili- - ties of their screen-readers to be quite valuable. Be certain to - examine this Guidebook before playing so you have an idea what - the screen layout is like. You'll also need to be able to locate - the PC cursor. It is always where your character is located. - Merely searching for an @-sign will not always find your charac- + NetHack can be set up to use only standard ASCII characters + for making maps of the dungeons. This makes the MS-DOS versions + of NetHack completely accessible to the blind who use speech + and/or Braille access technologies. Players will require a good + working knowledge of their screen-reader's review features, and + will have to know how to navigate horizontally and vertically + character by character. They will also find the search capabili- + ties of their screen-readers to be quite valuable. Be certain to + examine this Guidebook before playing so you have an idea what + the screen layout is like. You'll also need to be able to locate + the PC cursor. It is always where your character is located. + Merely searching for an @-sign will not always find your charac- ter since there are other humanoids represented by the same sign. - Your screen-reader should also have a function which gives you - the row and column of your review cursor and the PC cursor. - These co-ordinates are often useful in giving players a better + Your screen-reader should also have a function which gives you + the row and column of your review cursor and the PC cursor. + These co-ordinates are often useful in giving players a better sense of the overall location of items on the screen. - NetHack can also be compiled with support for sending the - game messages to an external program, such as a text-to-speech - synthesizer. If the "#version" extended command shows "external - program as a message handler", your NetHack has been compiled + NetHack can also be compiled with support for sending the + game messages to an external program, such as a text-to-speech + synthesizer. If the "#version" extended command shows "external + program as a message handler", your NetHack has been compiled with the capability. When compiling NetHack from source on Linux - and other POSIX systems, define MSGHANDLER to enable it. To use - the capability, set the environment variable NETHACK_MSGHANDLER + and other POSIX systems, define MSGHANDLER to enable it. To use + the capability, set the environment variable NETHACK_MSGHANDLER to an executable, which will be executed with the game message as the program's only parameter. - While it is not difficult for experienced users to edit the - defaults.nh file to accomplish this, novices may find this task + While it is not difficult for experienced users to edit the + defaults.nh file to accomplish this, novices may find this task somewhat daunting. Included within the "symbols" file of all of- ficial distributions of NetHack is a symset called NHAccess. Se- - lecting that symset in your configuration file will cause the - game to run in a manner accessible to the blind. After you have - gained some experience with the game and with editing files, you + lecting that symset in your configuration file will cause the + game to run in a manner accessible to the blind. After you have + gained some experience with the game and with editing files, you may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your - configuration file to better suit your preferences. See the pre- - vious section for the special symbols S_pet_override to force a - consistent symbol for all pets and S_hero_override to force a - unique symbol for the player character if accessibility is en- - abled in the sysconf file. - - The most crucial settings to make the game more accessible - are: - - symset:NHAccess - Load a symbol set appropriate for use by blind players. - - roguesymset:NHAccess - Load a symbol set for the rogue level that is appropriate for - use by blind players. - - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -5549,6 +5482,22 @@ + configuration file to better suit your preferences. See the pre- + vious section for the special symbols S_pet_override to force a + consistent symbol for all pets and S_hero_override to force a + unique symbol for the player character if accessibility is en- + abled in the sysconf file. + + The most crucial settings to make the game more accessible + are: + + symset:NHAccess + Load a symbol set appropriate for use by blind players. + + roguesymset:NHAccess + Load a symbol set for the rogue level that is appropriate for + use by blind players. + menustyle:traditional This will assist in the interface to speech synthesizers. @@ -5556,56 +5505,40 @@ Show menus on a cleared screen and aligned to the left edge. number_pad - A lot of speech access programs use the number-pad to review + A lot of speech access programs use the number-pad to review the screen. If this is the case, disable the number_pad option and use the traditional Rogue-like commands. autodescribe - Automatically describe the terrain under the cursor when tar- + Automatically describe the terrain under the cursor when tar- geting. mention_walls - Give feedback messages when walking towards a wall or when + Give feedback messages when walking towards a wall or when travel command was interrupted. whatis_coord:compass - When targeting with cursor, describe the cursor position with + When targeting with cursor, describe the cursor position with coordinates relative to your character. whatis_filter:area - When targeting with cursor, filter possible locations so only - those in the same area (eg. same room, or same corridor) are + When targeting with cursor, filter possible locations so only + those in the same area (eg. same room, or same corridor) are considered. whatis_moveskip - When targeting with cursor and using fast-move, skip the same + When targeting with cursor and using fast-move, skip the same glyphs instead of moving 8 units at a time. nostatus_updates - Prevent updates to the status lines at the bottom of the - screen, if your screen-reader reads those lines. The same in- + Prevent updates to the status lines at the bottom of the + screen, if your screen-reader reads those lines. The same in- formation can be seen via the "#attributes" command. - 9.16. Global Configuration for System Administrators - - If NetHack is compiled with the SYSCF option, a system ad- - ministrator should set up a global configuration; this is a file - in the same format as the traditional per-user configuration file - (see above). This file should be named sysconf and placed in the - same directory as the other NetHack support files. The options - recognized in this file are listed below. Any option not set us- - es a compiled-in default (which may not be appropriate for your - system). - - WIZARDS = A space-separated list of user names who are allowed - to play in debug mode (commonly referred to as wizard mode). A - value of a single asterisk (*) allows anyone to start a game in - debug mode. - - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -5615,63 +5548,63 @@ + 9.16. Global Configuration for System Administrators + + If NetHack is compiled with the SYSCF option, a system ad- + ministrator should set up a global configuration; this is a file + in the same format as the traditional per-user configuration file + (see above). This file should be named sysconf and placed in the + same directory as the other NetHack support files. The options + recognized in this file are listed below. Any option not set us- + es a compiled-in default (which may not be appropriate for your + system). + + WIZARDS = A space-separated list of user names who are allowed + to play in debug mode (commonly referred to as wizard mode). A + value of a single asterisk (*) allows anyone to start a game in + debug mode. + SHELLERS = A list of users who are allowed to use the shell es- cape command (!). The syntax is the same as WIZARDS. - EXPLORERS = A list of users who are allowed to use the explore + EXPLORERS = A list of users who are allowed to use the explore mode. The syntax is the same as WIZARDS. MAXPLAYERS = Limit the maximum number of games that can be run- ning at the same time. SAVEFORMAT = A list of up to two save file formats separated by - space. The first format in the list will written as well as - read. The second format will be read only if no save file in - the first format exists. Valid choices are "historical" for - binary writing of entire structs, "lendian" for binary writing - of each field in little-endian order, "ascii" for writing the + space. The first format in the list will written as well as + read. The second format will be read only if no save file in + the first format exists. Valid choices are "historical" for + binary writing of entire structs, "lendian" for binary writing + of each field in little-endian order, "ascii" for writing the save file content in ascii text. - BONESFORMAT = A list of up to two bones file formats separated + BONESFORMAT = A list of up to two bones file formats separated by space. The first format in the list will written as well as - read. The second format will be read only if no bones files in + read. The second format will be read only if no bones files in the first format exist. Valid choices are "historical" for bi- nary writing of entire structs, "lendian" for binary writing of - each field in little-endian order, "ascii" for writing the + each field in little-endian order, "ascii" for writing the bones file content in ascii text. - SUPPORT = A string explaining how to get local support (no de- + SUPPORT = A string explaining how to get local support (no de- fault value). - RECOVER = A string explaining how to recover a game on this + RECOVER = A string explaining how to recover a game on this system (no default value). - SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE + SEDUCE = 0 or 1 to disable or enable, respectively, the SEDUCE option. When disabled, incubi and succubi behave like nymphs. - CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- + CHECK_PLNAME = Setting this to 1 will make the EXPLORERS, WIZ- ARDS, and SHELLERS check for the player name instead of the us- er's login name. - CHECK_SAVE_UID = 0 or 1 to disable or enable, respectively, the - UID (used identification number) checking for save files (to - verify that the user who is restoring is the same one who - saved). - - The following options affect the score file: - - PERSMAX = Maximum number of entries for one person. - - ENTRYMAX = Maximum number of entries in the score file. - - POINTSMIN = Minimum number of points to get an entry in the - score file. - - PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- - spectively, to identify unique people for the score file. - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -5681,11 +5614,28 @@ - MAX_STATUENAME_RANK = Maximum number of score file entries to + CHECK_SAVE_UID = 0 or 1 to disable or enable, respectively, the + UID (used identification number) checking for save files (to + verify that the user who is restoring is the same one who + saved). + + The following options affect the score file: + + PERSMAX = Maximum number of entries for one person. + + ENTRYMAX = Maximum number of entries in the score file. + + POINTSMIN = Minimum number of points to get an entry in the + score file. + + PERS_IS_UID = 0 or 1 to use user names or numeric userids, re- + spectively, to identify unique people for the score file. + + MAX_STATUENAME_RANK = Maximum number of score file entries to use for random statue names (default is 10). DUMPLOGFILE = A filename where the end-of-game dumplog is - saved. Not defining this will prevent dumplog from being cre- + saved. Not defining this will prevent dumplog from being cre- ated. Only available if your game is compiled with DUMPLOG. Al- lows the following placeholders: @@ -5701,43 +5651,26 @@ 10. Scoring - NetHack maintains a list of the top scores or scorers on + NetHack maintains a list of the top scores or scorers on your machine, depending on how it is set up. In the latter case, - each account on the machine can post only one non-winning score - on this list. If you score higher than someone else on this - list, or better your previous score, you will be inserted in the - proper place under your current name. How many scores are kept + each account on the machine can post only one non-winning score + on this list. If you score higher than someone else on this + list, or better your previous score, you will be inserted in the + proper place under your current name. How many scores are kept can also be set up when NetHack is compiled. - Your score is chiefly based upon how much experience you + Your score is chiefly based upon how much experience you gained, how much loot you accumulated, how deep you explored, and how the game ended. If you quit the game, you escape with all of - your gold intact. If, however, you get killed in the Mazes of + your gold intact. If, however, you get killed in the Mazes of Menace, the guild will only hear about 90% of your gold when your - corpse is discovered (adventurers have been known to collect - finder's fees). So, consider whether you want to take one last - hit at that monster and possibly live, or quit and stop with - whatever you have. If you quit, you keep all your gold, but if - you swing and live, you might find more. - - If you just want to see what the current top players/games - list is, you can type nethack -s all on most versions. - - 11. Explore mode - - NetHack is an intricate and difficult game. Novices might - falter in fear, aware of their ignorance of the means to survive. - Well, fear not. Your dungeon comes equipped with an "explore" or - "discovery" mode that enables you to keep old save files and - cheat death, at the paltry cost of not getting on the high score - list. - - There are two ways of enabling explore mode. One is to - start the game with the -X command-line switch or with the play- - mode:explore option. The other is to issue the "#exploremode" + corpse is discovered (adventurers have been known to collect + finder's fees). So, consider whether you want to take one last + hit at that monster and possibly live, or quit and stop with + whatever you have. If you quit, you keep all your gold, but if - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -5747,63 +5680,63 @@ - extended command while already playing the game. Starting a new + you swing and live, you might find more. + + If you just want to see what the current top players/games + list is, you can type nethack -s all on most versions. + + 11. Explore mode + + NetHack is an intricate and difficult game. Novices might + falter in fear, aware of their ignorance of the means to survive. + Well, fear not. Your dungeon comes equipped with an "explore" or + "discovery" mode that enables you to keep old save files and + cheat death, at the paltry cost of not getting on the high score + list. + + There are two ways of enabling explore mode. One is to + start the game with the -X command-line switch or with the play- + mode:explore option. The other is to issue the "#exploremode" + extended command while already playing the game. Starting a new game in explore mode provides your character with a wand of wish- - ing in initial inventory; switching during play does not. The - other benefits of explore mode are left for the trepid reader to + ing in initial inventory; switching during play does not. The + other benefits of explore mode are left for the trepid reader to discover. 11.1. Debug mode Debug mode, also known as wizard mode, is undocumented aside - from this brief description and the various "debug mode only" - commands listed among the command descriptions. It is intended + from this brief description and the various "debug mode only" + commands listed among the command descriptions. It is intended for tracking down problems within the program rather than to pro- - vide god-like powers to your character, and players who attempt - debugging are expected to figure out how to use it themselves. - It is initiated by starting the game with the -D command-line + vide god-like powers to your character, and players who attempt + debugging are expected to figure out how to use it themselves. + It is initiated by starting the game with the -D command-line switch or with the playmode:debug option. - For some systems, the player must be logged in under a par- - ticular user name to be allowed to use debug mode; for others, - the hero must be given a particular character name (but may be - any role; there's no connection between "wizard mode" and the - Wizard role). Attempting to start a game in debug mode when not - allowed or not available will result in falling back to explore + For some systems, the player must be logged in under a par- + ticular user name to be allowed to use debug mode; for others, + the hero must be given a particular character name (but may be + any role; there's no connection between "wizard mode" and the + Wizard role). Attempting to start a game in debug mode when not + allowed or not available will result in falling back to explore mode instead. 12. Credits - The original hack game was modeled on the Berkeley UNIX - rogue game. Large portions of this paper were shamelessly - cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy - and Kenneth C. R. C. Arnold. Small portions were adapted from + The original hack game was modeled on the Berkeley UNIX + rogue game. Large portions of this paper were shamelessly + cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy + and Kenneth C. R. C. Arnold. Small portions were adapted from Further Exploration of the Dungeons of Doom, by Ken Arromdee. NetHack is the product of literally dozens of people's work. - Main events in the course of the game development are described + Main events in the course of the game development are described below: - Jay Fenlason wrote the original Hack, with help from Kenny - Woodland, Mike Thome and Jon Payne. - - Andries Brouwer did a major re-write, transforming Hack into - a very different game, and published (at least) three versions - (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. - - Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, - producing PC HACK 1.01e, added support for DEC Rainbow graphics - in version 1.03g, and went on to produce at least four more ver- - sions (3.0, 3.2, 3.51, and 3.6). - - R. Black ported PC HACK 3.51 to Lattice C and the Atari - 520/1040ST, producing ST Hack 1.03. - - Mike Stephenson merged these various versions back together, - incorporating many of the added features, and produced NetHack - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -5813,7 +5746,24 @@ - 1.4. He then coordinated a cast of thousands in enhancing and + Jay Fenlason wrote the original Hack, with help from Kenny + Woodland, Mike Thome and Jon Payne. + + Andries Brouwer did a major re-write, transforming Hack into + a very different game, and published (at least) three versions + (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. + + Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, + producing PC HACK 1.01e, added support for DEC Rainbow graphics + in version 1.03g, and went on to produce at least four more ver- + sions (3.0, 3.2, 3.51, and 3.6). + + R. Black ported PC HACK 3.51 to Lattice C and the Atari + 520/1040ST, producing ST Hack 1.03. + + Mike Stephenson merged these various versions back together, + incorporating many of the added features, and produced NetHack + 1.4. He then coordinated a cast of thousands in enhancing and debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. Later, Mike coordinated a major rewrite of the game, heading @@ -5821,55 +5771,38 @@ Creps, Eric Hendrickson, Izchak Miller, John Rupley, Mike Threep- oint, and Janet Walz, to produce NetHack 3.0c. - NetHack 3.0 was ported to the Atari by Eric R. Smith, to - OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three + NetHack 3.0 was ported to the Atari by Eric R. Smith, to + OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three of them and Kevin Darcy later joined the main NetHack Development Team to produce subsequent revisions of 3.0. - Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm - Meluch, Stephen Spackman and Pierre Martineau designed overlay - code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the - Macintosh. Along with various other Dungeoneers, they continued - to enhance the PC, Macintosh, and Amiga ports through the later + Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm + Meluch, Stephen Spackman and Pierre Martineau designed overlay + code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the + Macintosh. Along with various other Dungeoneers, they continued + to enhance the PC, Macintosh, and Amiga ports through the later revisions of 3.0. - Headed by Mike Stephenson and coordinated by Izchak Miller - and Janet Walz, the NetHack Development Team which now included - Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, - Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, + Headed by Mike Stephenson and coordinated by Izchak Miller + and Janet Walz, the NetHack Development Team which now included + Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, + Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Eric Raymond, and Eric Smith undertook a radical revision of 3.0. They re-structured the game's design, and re-wrote major parts of - the code. They added multiple dungeons, a new display, special - individual character quests, a new endgame and many other new + the code. They added multiple dungeons, a new display, special + individual character quests, a new endgame and many other new features, and produced NetHack 3.1. - Ken Lorber, Gregg Wonderly and Greg Olson, with help from - Richard Addison, Mike Passaretti, and Olaf Seibert, developed + Ken Lorber, Gregg Wonderly and Greg Olson, with help from + Richard Addison, Mike Passaretti, and Olaf Seibert, developed NetHack 3.1 for the Amiga. - Norm Meluch and Kevin Smolkowski, with help from Carl Sche- + Norm Meluch and Kevin Smolkowski, with help from Carl Sche- lin, Stephen Spackman, Steve VanDevender, and Paul Winner, ported NetHack 3.1 to the PC. - Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike - Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny - Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack - 3.1 for the Macintosh, porting it for MPW. Building on their de- - velopment, Bart House added a Think C port. - Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith port- - ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua - Delahunty, was responsible for the VMS version of NetHack 3.1. - Michael Allison ported NetHack 3.1 to Windows NT. - - Dean Luick, with help from David Cohrs, developed NetHack - 3.1 for X11. Warwick Allison wrote a tiled version of NetHack - for the Atari; he later contributed the tiles to the NetHack De- - velopment Team and tile support was then added to other plat- - forms. - - - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -5879,63 +5812,63 @@ + Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike + Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny + Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack + 3.1 for the Macintosh, porting it for MPW. Building on their de- + velopment, Bart House added a Think C port. + + Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith port- + ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua + Delahunty, was responsible for the VMS version of NetHack 3.1. + Michael Allison ported NetHack 3.1 to Windows NT. + + Dean Luick, with help from David Cohrs, developed NetHack + 3.1 for X11. Warwick Allison wrote a tiled version of NetHack + for the Atari; he later contributed the tiles to the NetHack De- + velopment Team and tile support was then added to other plat- + forms. + The 3.2 NetHack Development Team, comprised of Michael Alli- son, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Er- - ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released + ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released version 3.2 in April of 1996. Version 3.2 marked the tenth anniversary of the formation of - the development team. In a testament to their dedication to the - game, all thirteen members of the original NetHack Development - Team remained on the team at the start of work on that release. - During the interval between the release of 3.1.3 and 3.2, one of - the founding members of the NetHack Development Team, Dr. Izchak - Miller, was diagnosed with cancer and passed away. That release - of the game was dedicated to him by the development and porting + the development team. In a testament to their dedication to the + game, all thirteen members of the original NetHack Development + Team remained on the team at the start of work on that release. + During the interval between the release of 3.1.3 and 3.2, one of + the founding members of the NetHack Development Team, Dr. Izchak + Miller, was diagnosed with cancer and passed away. That release + of the game was dedicated to him by the development and porting teams. During the lifespan of NetHack 3.1 and 3.2, several enthusi- - asts of the game added their own modifications to the game and + asts of the game added their own modifications to the game and made these "variants" publicly available: - Tom Proudfoot and Yuval Oren created NetHack++, which was - quickly renamed NetHack--. Working independently, Stephen White - wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and + Tom Proudfoot and Yuval Oren created NetHack++, which was + quickly renamed NetHack--. Working independently, Stephen White + wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and his own NetHack-- to produce SLASH. Larry Stewart-Zerba and War- - wick Allison improved the spell casting system with the Wizard - Patch. Warwick Allison also ported NetHack to use the Qt inter- + wick Allison improved the spell casting system with the Wizard + Patch. Warwick Allison also ported NetHack to use the Qt inter- face. - Warren Cheung combined SLASH with the Wizard Patch to pro- - duce Slash'EM, and with the help of Kevin Hugo, added more fea- - tures. Kevin later joined the NetHack Development Team and in- + Warren Cheung combined SLASH with the Wizard Patch to pro- + duce Slash'EM, and with the help of Kevin Hugo, added more fea- + tures. Kevin later joined the NetHack Development Team and in- corporated the best of these ideas in NetHack 3.3. The final update to 3.2 was the bug fix release 3.2.3, which - was released simultaneously with 3.3.0 in December 1999 just in + was released simultaneously with 3.3.0 in December 1999 just in time for the Year 2000. - The 3.3 NetHack Development Team, consisting of Michael Al- - lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, - Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- - ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet - Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 - in August of 2000. - - Version 3.3 offered many firsts. It was the first version to - separate race and profession. The Elf class was removed in pref- - erence to an elf race, and the races of dwarves, gnomes, and orcs - made their first appearance in the game alongside the familiar - human race. Monk and Ranger roles joined Archeologists, Barbar- - ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, - Tourists, Valkyries and of course, Wizards. It was also the - first version to allow you to ride a steed, and was the first - version to have a publicly available web-site listing all the - bugs that had been discovered. Despite that constantly growing - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -5945,63 +5878,63 @@ - bug list, 3.3 proved stable enough to last for more than a year + The 3.3 NetHack Development Team, consisting of Michael Al- + lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, + Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- + ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet + Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 + in August of 2000. + + Version 3.3 offered many firsts. It was the first version to + separate race and profession. The Elf class was removed in pref- + erence to an elf race, and the races of dwarves, gnomes, and orcs + made their first appearance in the game alongside the familiar + human race. Monk and Ranger roles joined Archeologists, Barbar- + ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, + Tourists, Valkyries and of course, Wizards. It was also the + first version to allow you to ride a steed, and was the first + version to have a publicly available web-site listing all the + bugs that had been discovered. Despite that constantly growing + bug list, 3.3 proved stable enough to last for more than a year and a half. - The 3.4 NetHack Development Team initially consisted of - Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin - Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet - Walz, and Paul Winner, with Warwick Allison joining just before + The 3.4 NetHack Development Team initially consisted of + Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin + Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet + Walz, and Paul Winner, with Warwick Allison joining just before the release of NetHack 3.4.0 in March 2002. - As with version 3.3, various people contributed to the game + As with version 3.3, various people contributed to the game as a whole as well as supporting ports on the different platforms that NetHack runs on: Pat Rankin maintained 3.4 for VMS. - Michael Allison maintained NetHack 3.4 for the MS-DOS plat- + Michael Allison maintained NetHack 3.4 for the MS-DOS plat- form. Paul Winner and Yitzhak Sapir provided encouragement. - Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- + Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- hanced the Macintosh port of 3.4. - Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, - and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft + Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, + and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft Windows platform. Alex Kompel contributed a new graphical inter- - face for the Windows port. Alex Kompel also contributed a Win- + face for the Windows port. Alex Kompel also contributed a Win- dows CE port for 3.4.1. Ron Van Iwaarden was the sole maintainer of NetHack for OS/2 - the past several releases. Unfortunately Ron's last OS/2 machine - stopped working in early 2006. A great many thanks to Ron for + the past several releases. Unfortunately Ron's last OS/2 machine + stopped working in early 2006. A great many thanks to Ron for keeping NetHack alive on OS/2 all these years. - Janne Salmijarvi and Teemu Suikki maintained and enhanced - the Amiga port of 3.4 after Janne Salmijarvi resurrected it for + Janne Salmijarvi and Teemu Suikki maintained and enhanced + the Amiga port of 3.4 after Janne Salmijarvi resurrected it for 3.3.1. - Christian "Marvin" Bressler maintained 3.4 for the Atari af- - ter he resurrected it for 3.3.1. - - The release of NetHack 3.4.3 in December 2003 marked the be- - ginning of a long release hiatus. 3.4.3 proved to be a remarkably - stable version that provided continued enjoyment by the community - for more than a decade. The NetHack Development Team slowly and - quietly continued to work on the game behind the scenes during - the tenure of 3.4.3. It was during that same period that several - new variants emerged within the NetHack community. Notably - sporkhack by Derek S. Ray, unnethack by Patric Mueller, nitrohack - and its successors originally by Daniel Thaler and then by Alex - Smith, and Dynahack by Tung Nguyen. Some of those variants con- - tinue to be developed, maintained, and enjoyed by the community - to this day. - - In September 2014, an interim snapshot of the code under de- - velopment was released publicly by other parties. Since that code - NetHack 3.7 November 17, 2019 + + NetHack 3.7 November 27, 2019 @@ -6011,63 +5944,63 @@ - was a work-in-progress and had not gone through the process of - debugging it as a suitable release, it was decided that the ver- - sion numbers present on that code snapshot would be retired and - never used in an official NetHack release. An announcement was - posted on the NetHack Development Team's official nethack.org - website to that effect, stating that there would never be a + Christian "Marvin" Bressler maintained 3.4 for the Atari af- + ter he resurrected it for 3.3.1. + + The release of NetHack 3.4.3 in December 2003 marked the be- + ginning of a long release hiatus. 3.4.3 proved to be a remarkably + stable version that provided continued enjoyment by the community + for more than a decade. The NetHack Development Team slowly and + quietly continued to work on the game behind the scenes during + the tenure of 3.4.3. It was during that same period that several + new variants emerged within the NetHack community. Notably + sporkhack by Derek S. Ray, unnethack by Patric Mueller, nitrohack + and its successors originally by Daniel Thaler and then by Alex + Smith, and Dynahack by Tung Nguyen. Some of those variants con- + tinue to be developed, maintained, and enjoyed by the community + to this day. + + In September 2014, an interim snapshot of the code under de- + velopment was released publicly by other parties. Since that code + was a work-in-progress and had not gone through the process of + debugging it as a suitable release, it was decided that the ver- + sion numbers present on that code snapshot would be retired and + never used in an official NetHack release. An announcement was + posted on the NetHack Development Team's official nethack.org + website to that effect, stating that there would never be a 3.4.4, 3.5, or 3.5.0 official release version. - In January 2015, preparation began for the release of + In January 2015, preparation began for the release of NetHack 3.6. - At the beginning of development for what would eventually - get released as 3.6.0, the NetHack Development Team consisted of - Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, - Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- - son, Janet Walz, and Paul Winner. In early 2015, ahead of the + At the beginning of development for what would eventually + get released as 3.6.0, the NetHack Development Team consisted of + Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, + Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- + son, Janet Walz, and Paul Winner. In early 2015, ahead of the release of 3.6.0, new members Sean Hunt, Pasi Kallinen, and Derek S. Ray joined the NetHack Development Team. Near the end of the development of 3.6.0, one of the signif- - icant inspirations for many of the humorous and fun features - found in the game, author Terry Pratchett, passed away. NetHack + icant inspirations for many of the humorous and fun features + found in the game, author Terry Pratchett, passed away. NetHack 3.6.0 introduced a tribute to him. 3.6.0 was released in December 2015, and merged work done by - the development team since the release of 3.4.3 with some of the + the development team since the release of 3.4.3 with some of the beloved community patches. Many bugs were fixed and some code was restructured. - The NetHack Development Team, as well as Steve VanDevender + The NetHack Development Team, as well as Steve VanDevender and Kevin Smolkowski, ensured that NetHack 3.6 continued to oper- ate on various UNIX flavors and maintained the X11 interface. - Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- + Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- tained the port of NetHack 3.6 for Mac OSX. - Michael Allison, David Cohrs, Bart House, Pasi Kallinen, - Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- - tained the port of NetHack 3.6 for Microsoft Windows. - - Pat Rankin attempted to keep the VMS port running for - NetHack 3.6, hindered by limited access. Kevin Smolkowski has up- - dated 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. - - Ray Chason resurrected the msdos port for 3.6 and contrib- - uted the necessary updates to the community at large. - - In late April 2018, several hundred bug fixes for 3.6.0 and - some new features were assembled and released as NetHack 3.6.1. - The NetHack Development Team at the time of release of 3.6.1 con- - sisted of Warwick Allison, Michael Allison, Ken Arromdee, David - Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 @@ -6077,14 +6010,32 @@ - Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike + Michael Allison, David Cohrs, Bart House, Pasi Kallinen, + Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- + tained the port of NetHack 3.6 for Microsoft Windows. + + Pat Rankin attempted to keep the VMS port running for + NetHack 3.6, hindered by limited access. Kevin Smolkowski has up- + dated 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. + + Ray Chason resurrected the msdos port for 3.6 and contrib- + uted the necessary updates to the community at large. + + In late April 2018, several hundred bug fixes for 3.6.0 and + some new features were assembled and released as NetHack 3.6.1. + The NetHack Development Team at the time of release of 3.6.1 con- + sisted of Warwick Allison, Michael Allison, Ken Arromdee, David + Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, + Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz, and Paul Winner. In early May 2019, another 320 bug fixes along with some en- - hancements and the adopted curses window port, were released as + hancements and the adopted curses window port, were released as 3.6.2. - Bart House, who had contributed to the game as a porting + Bart House, who had contributed to the game as a porting team participant for decades, joined the NetHack Development Team in late May 2019. @@ -6094,24 +6045,37 @@ 12.1. SPECIAL THANKS On behalf of the NetHack community, thank you very much once - again to M. Drew Streib and Pasi Kallinen for providing a public - NetHack server at nethack.alt.org. Thanks to Keith Simpson and + again to M. Drew Streib and Pasi Kallinen for providing a public + NetHack server at nethack.alt.org. Thanks to Keith Simpson and Andy Thomson for hardfought.org. Thanks to all those unnamed dun- - geoneers who invest their time and effort into annual NetHack - tournaments such as Junethack, The November NetHack Tournament + geoneers who invest their time and effort into annual NetHack + tournaments such as Junethack, The November NetHack Tournament and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list + of the names of the worst of these miscreants in this, the list of Dungeoneers: Adam Aronow J. Ali Harlow Mikko Juola Alex Kompel Janet Walz Nathan Eady Alex Smith Janne Salmijarvi Norm Meluch Andreas Dorn Jean-Christophe Collet Olaf Seibert + + + + NetHack 3.7 November 27, 2019 + + + + + + NetHack Guidebook 93 + + + Andy Church Jeff Bailey Pasi Kallinen Andy Swanson Jochen Erwied Pat Rankin Andy Thomson John Kallen Patric Mueller @@ -6130,19 +6094,6 @@ David Gentzel Ken Washikita Ron Van Iwaarden David Hairston Kevin Darcy Ronnen Miller Dean Luick Kevin Hugo Ross Brown - - - - NetHack 3.7 November 17, 2019 - - - - - - NetHack Guidebook 93 - - - Del Lamb Kevin Sitze Sascha Wostmann Derek S. Ray Kevin Smolkowski Scott Bigham Deron Meranda Kevin Sweet Scott R. Turner @@ -6164,7 +6115,7 @@ Irina Rempt-Drijfhout Mike Passaretti Izchak Miller Mike Stephenson - Brand and product names are trademarks or registered trade- + Brand and product names are trademarks or registered trade- marks of their respective holders. @@ -6181,25 +6132,7 @@ - - - - - - - - - - - - - - - - - - - NetHack 3.7 November 17, 2019 + NetHack 3.7 November 27, 2019 From adc455129df305f4726ee5bb223671257e7ec2a4 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 28 Nov 2019 15:00:54 -0800 Subject: [PATCH 354/529] 3.7: goldX and other stuff Move option variable goldX (True: treat gold as BUC unknown, False: treat gold as uncursed during BUCX filtering) from iflags to flags so that it persists across save/restore. Get rid of a few obsolete things from struct flags. Try to make the 'cursesgraphics' option work although I don't think that it was ever functional enough for anybody to use so probably could have been removed instead. Bump EDITLEVEL; any current save files are invalid. Demote status from Beta to Work-in-Progress. I modified src/sfdata.c manually (not included here) to get a full build. The Unix Makefile.src needs to be taught when and how to regenerate it. --- include/flag.h | 47 +++++++------------------------------------- include/global.h | 4 ++-- include/patchlevel.h | 4 ++-- src/invent.c | 8 ++++---- src/options.c | 12 +++++------ src/pickup.c | 4 ++-- 6 files changed, 23 insertions(+), 56 deletions(-) diff --git a/include/flag.h b/include/flag.h index 19c1ec9f6..d0237d628 100644 --- a/include/flag.h +++ b/include/flag.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 flag.h $NHDT-Date: 1574900824 2019/11/28 00:27:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.160 $ */ +/* NetHack 3.7 flag.h $NHDT-Date: 1574982014 2019/11/28 23:00:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.166 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -32,6 +32,7 @@ struct flag { #define discover flags.explore boolean female; boolean friday13; /* it's Friday the 13th */ + boolean goldX; /* for BUCX filtering, whether gold is X or U */ boolean help; /* look in data file for info about stuff */ boolean ignintr; /* ignore interrupts */ boolean ins_chkpt; /* checkpoint as appropriate; INSURANCE */ @@ -40,7 +41,6 @@ struct flag { boolean lit_corridor; /* show a dark corr as lit if it is in sight */ boolean nap; /* `timed_delay' option for display effects */ boolean null; /* OK to send nulls to the terminal */ - boolean p__obsolete; /* [3.6.2: perm_invent moved to iflags] */ boolean pickup; /* whether you pickup or move and look */ boolean pickup_thrown; /* auto-pickup items you threw */ boolean pushweapon; /* When wielding, push old weapon into second slot */ @@ -49,27 +49,6 @@ struct flag { boolean showexp; /* show experience points */ boolean showscore; /* show score */ boolean silent; /* whether the bell rings or not */ - /* The story so far: - * 'sortloot' originally took a True/False value but was changed - * to use a letter instead. 3.6.0 was released without changing its - * type from 'boolean' to 'char'. A compiler was smart enough to - * complain that assigning any of the relevant letters was not 0 or 1 - * so not appropriate for boolean (by a configuration which used - * SKIP_BOOLEAN to bypass nethack's 'boolean' and use a C++-compatible - * one). So the type was changed to 'xchar', which is guaranteed to - * match the size of 'boolean' (this guarantee only applies for the - * !SKIP_BOOLEAN config, unfortunately). Since xchar does not match - * actual use, the type was later changed to 'char'. But that would - * break 3.6.0 savefile compatibility for configurations which typedef - * 'schar' to 'short int' instead of to 'char'. (Needed by pre-ANSI - * systems that use unsigned characters without a way to force them - * to be signed.) So, the type has been changed back to 'xchar' for - * 3.6.x. - * - * TODO: change to 'char' (and move out of this block of booleans, - * and get rid of these comments...) once 3.6.0 savefile compatibility - * eventually ends. - */ boolean sortpack; /* sorted inventory */ boolean sparkle; /* show "resisting" special FX (Scott Bigham) */ boolean standout; /* use standout for --More-- */ @@ -94,7 +73,7 @@ struct flag { #define PARANOID_EATING 0x0200 int pickup_burden; /* maximum burden before prompt */ int pile_limit; /* controls feedback when walking over objects */ - char sortloot; /* 'n'=none, 'l'=loot (pickup), 'f'=full ('l'+invent) */ + char sortloot; /* 'n'=none, 'l'=loot (pickup), 'f'=full ('l'+invent) */ char inv_order[MAXOCLASSES]; char pickup_types[MAXOCLASSES]; #define NUM_DISCLOSURE_OPTIONS 6 /* i,a,v,g,c,o (decl.c) */ @@ -273,9 +252,6 @@ struct instance_flags { boolean deferred_X; /* deferred entry into explore mode */ boolean echo; /* 1 to echo characters */ boolean force_invmenu; /* always menu when handling inventory */ - /* FIXME: goldX belongs in flags, but putting it in iflags avoids - breaking 3.6.[01] save files */ - boolean goldX; /* for BUCX filtering, whether gold is X or U */ boolean hilite_pile; /* mark piles of objects with a hilite */ boolean implicit_uncursed; /* maybe omit "uncursed" status in inventory */ boolean mention_walls; /* give feedback when bumping walls */ @@ -296,25 +272,16 @@ struct instance_flags { boolean use_background_glyph; /* use background glyph when appropriate */ boolean use_menu_color; /* use color in menus; only if wc_color */ #ifdef STATUS_HILITES - long hilite_delta; /* number of moves to leave a temp hilite lit */ + long hilite_delta; /* number of moves to leave a temp hilite lit */ long unhilite_deadline; /* time when oldest temp hilite should be unlit */ #endif boolean zerocomp; /* write zero-compressed save files */ boolean rlecomp; /* alternative to zerocomp; run-length encoding * compression of levels when writing savefile */ uchar num_pad_mode; - boolean cursesgraphics; /* Use portable curses extended characters */ -#if 0 /* XXXgraphics superseded by symbol sets */ - boolean DECgraphics; /* use DEC VT-xxx extended character set */ - boolean IBMgraphics; /* use IBM extended character set */ -#ifdef MAC_GRAPHICS_ENV - boolean MACgraphics; /* use Macintosh extended character set, as - as defined in the special font HackFont */ -#endif -#endif - uchar bouldersym; /* symbol for boulder display */ - char prevmsg_window; /* type of old message window to use */ - boolean extmenu; /* extended commands use menu interface */ + uchar bouldersym; /* symbol for boulder display */ + char prevmsg_window; /* type of old message window to use */ + boolean extmenu; /* extended commands use menu interface */ #ifdef MFLOPPY boolean checkspace; /* check disk space before writing files */ /* (in iflags to allow restore after moving diff --git a/include/global.h b/include/global.h index 7bc33dcd8..b9f7c2e42 100644 --- a/include/global.h +++ b/include/global.h @@ -1,4 +1,4 @@ -/* NetHack 3.7 global.h $NHDT-Date: 1557510460 2019/05/10 17:47:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.72 $ */ +/* NetHack 3.7 global.h $NHDT-Date: 1574982019 2019/11/28 23:00:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.92 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -18,7 +18,7 @@ /* * Development status of this NetHack version. */ -#define NH_DEVEL_STATUS NH_STATUS_BETA +#define NH_DEVEL_STATUS NH_STATUS_WIP #ifndef DEBUG /* allow tool chains to define without causing warnings */ #define DEBUG diff --git a/include/patchlevel.h b/include/patchlevel.h index c43ba0fc8..f86626926 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -1,4 +1,4 @@ -/* NetHack 3.7 patchlevel.h $NHDT-Date: 1557510467 2019/05/10 17:47:47 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.127 $ */ +/* NetHack 3.7 patchlevel.h $NHDT-Date: 1574982020 2019/11/28 23:00:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.134 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -14,7 +14,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 0 +#define EDITLEVEL 1 #define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2019" #define COPYRIGHT_BANNER_B \ diff --git a/src/invent.c b/src/invent.c index 925d4abf2..34fe3c083 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 invent.c $NHDT-Date: 1573346190 2019/11/10 00:36:30 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.266 $ */ +/* NetHack 3.6 invent.c $NHDT-Date: 1574982020 2019/11/28 23:00:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.280 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2895,7 +2895,7 @@ boolean FDECL((*filterfunc), (OBJ_P)); /* coins are either uncursed or unknown based upon option setting */ if (list->oclass == COIN_CLASS) { - if (type == (iflags.goldX ? BUC_UNKNOWN : BUC_UNCURSED)) + if (type == (flags.goldX ? BUC_UNKNOWN : BUC_UNCURSED)) ++count; continue; } @@ -2931,7 +2931,7 @@ int *bcp, *ucp, *ccp, *xcp, *ocp; list->bknown = (list->oclass != COIN_CLASS); /* coins are either uncursed or unknown based upon option setting */ if (list->oclass == COIN_CLASS) { - if (iflags.goldX) + if (flags.goldX) ++(*xcp); else ++(*ucp); @@ -3095,7 +3095,7 @@ struct obj *obj; /* if filtering by bless/curse state, gold is classified as either unknown or uncursed based on user option setting */ if (g.this_type && index("BUCX", g.this_type)) - res = (g.this_type == (iflags.goldX ? 'X' : 'U')); + res = (g.this_type == (flags.goldX ? 'X' : 'U')); } else { switch (g.this_type) { case 'B': diff --git a/src/options.c b/src/options.c index 632598e28..ded48e7ae 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1574900826 2019/11/28 00:27:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.388 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1574982022 2019/11/28 23:00:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.416 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -134,7 +134,7 @@ static const struct Bool_Opt { #endif { "force_invmenu", &iflags.force_invmenu, FALSE, SET_IN_GAME }, { "fullscreen", &iflags.wc2_fullscreen, FALSE, SET_IN_FILE }, /*WC2*/ - { "goldX", &iflags.goldX, FALSE, SET_IN_GAME }, + { "goldX", &flags.goldX, FALSE, SET_IN_GAME }, { "guicolor", &iflags.wc2_guicolor, TRUE, SET_IN_GAME}, /*WC2*/ { "help", &flags.help, TRUE, SET_IN_GAME }, { "herecmd_menu", &iflags.herecmd_menu, FALSE, SET_IN_GAME }, @@ -3840,10 +3840,13 @@ boolean tinitial, tfrom_file; } fullname = "DECgraphics"; - if (match_optname(opts, fullname, 3, TRUE)) { + if (match_optname(opts, fullname, 3, FALSE) + || match_optname(opts, "cursesgraphics", 4, FALSE)) { #ifdef BACKWARD_COMPAT boolean badflag = FALSE; + if (lowc(*opts) == 'c') + fullname = "curses"; /* symbol set name is shorter than optname */ if (duplicate) complain_about_duplicate(opts, 1); if (!negated) { @@ -4052,9 +4055,6 @@ boolean tinitial, tfrom_file; || boolopt[i].addr == &iflags.use_inverse || boolopt[i].addr == &iflags.hilite_pile || boolopt[i].addr == &iflags.perm_invent -#ifdef CURSES_GRAPHICS - || boolopt[i].addr == &iflags.cursesgraphics -#endif || boolopt[i].addr == &iflags.wc_ascii_map || boolopt[i].addr == &iflags.wc_tiled_map) { g.opt_need_redraw = TRUE; diff --git a/src/pickup.c b/src/pickup.c index 4c1a51300..cc793a66b 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pickup.c $NHDT-Date: 1570566381 2019/10/08 20:26:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.235 $ */ +/* NetHack 3.6 pickup.c $NHDT-Date: 1574982023 2019/11/28 23:00:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.249 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -392,7 +392,7 @@ struct obj *obj; : g.shop_filter /* coins are never unpaid, but check anyway */ ? (obj->unpaid ? TRUE : FALSE) : g.bucx_filter - ? (index(g.valid_menu_classes, iflags.goldX ? 'X' : 'U') + ? (index(g.valid_menu_classes, flags.goldX ? 'X' : 'U') ? TRUE : FALSE) : TRUE; /* catchall: no filters specified, so accept */ From 8ac2ae3a644b7d55452908daf1a286baeee4d4ef Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 28 Nov 2019 19:05:39 -0500 Subject: [PATCH 355/529] fix a gcc warning --- util/readtags.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/readtags.c b/util/readtags.c index d9225ae48..442ab43f1 100644 --- a/util/readtags.c +++ b/util/readtags.c @@ -1226,7 +1226,7 @@ static void generate_c_files() } else { /**************** not a bitfield ****************/ char arrbuf[BUFSZ]; - char lbuf[BUFSZ]; + char lbuf[BUFSZ * 2]; /* sprintf target for others, gcc complaint */ char fnbuf[BUFSZ]; char altbuf[BUFSZ]; boolean isptr = FALSE, kludge_sbrooms = FALSE; From 954ffd11d3758a9e7493f2b26c6ab5e6f0d0e002 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 28 Nov 2019 20:20:04 -0500 Subject: [PATCH 356/529] updates to extended version info --- src/version.c | 176 +++++++++++++++++++++++++++++--------------------- 1 file changed, 104 insertions(+), 72 deletions(-) diff --git a/src/version.c b/src/version.c index 099cecb6d..ee01e4dfc 100644 --- a/src/version.c +++ b/src/version.c @@ -45,7 +45,7 @@ const char *NetHack_git_sha = NETHACK_GIT_SHA #else #ifdef NETHACK_HOST_GIT_SHA - = NETHACK_HOST_GIT_SHA + = NETHACK_HOST_GIT_SHA #endif #endif ; @@ -135,14 +135,38 @@ doversion() int doextversion() { -#if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) - const char *rtbuf; int rtcontext = 0; -#else - dlb *f; -#endif + const char *rtbuf; + dlb *f = (dlb *) 0; char buf[BUFSZ], *p = 0; winid win = create_nhwindow(NHW_TEXT); + boolean use_dlb = TRUE, + keepgoing = TRUE, + done_rt = FALSE, + done_dlb = FALSE, + prolog; + const char *lua_info[] = { + "About Lua: Copyright (c) 1994-2019 Lua.org, PUC-Rio.", + /* 1 2 3 4 5 6 7 + 1234567890123456789012345678901234567890123456789012345678901234567890123456789 + */ + " \"Permission is hereby granted, free of charge, to any person obtaining", + " a copy of this software and associated documentation files (the ", + " \"Software\"), to deal in the Software without restriction including", + " without limitation the rights to use, copy, modify, merge, publish,", + " distribute, sublicense, and/or sell copies of the Software, and to ", + " permit persons to whom the Software is furnished to do so, subject to", + " the following conditions:", + " The above copyright notice and this permission notice shall be", + " included in all copies or substantial portions of the Software.\"", + (const char *) 0 + }; + +#if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) + use_dlb = FALSE; +#else + done_rt = TRUE; +#endif /* instead of using ``display_file(OPTIONS_USED,TRUE)'' we handle the file manually so we can include dynamic version info */ @@ -161,74 +185,82 @@ doextversion() putstr(win, 0, p); } -#if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) -#else - f = dlb_fopen(OPTIONS_USED, "r"); - if (!f) { - putstr(win, 0, ""); - Sprintf(buf, "[Configuration '%s' not available?]", OPTIONS_USED); - putstr(win, 0, buf); - } else { -#endif - /* - * already inserted above: - * + outdented program name and version plus build date and time - * dat/options; display contents with lines prefixed by '-' deleted: - * - blank-line - * - indented program name and version - * blank-line - * outdented feature header - * - blank-line - * indented feature list - * spread over multiple lines - * blank-line - * outdented windowing header - * - blank-line - * indented windowing choices with - * optional second line for default - * - blank-line - * - EOF - */ - boolean prolog = TRUE; /* to skip indented program name */ - -#if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) - while ((rtbuf = do_runtime_info(&rtcontext))) { - if ((int) strlen(rtbuf) >= (BUFSZ - 1)) - continue; - Strcpy(buf, rtbuf); -#else - while (dlb_fgets(buf, BUFSZ, f)) { - (void) strip_newline(buf); -#endif - if (index(buf, '\t') != 0) - (void) tabexpand(buf); - - if (*buf && *buf != ' ') { - /* found outdented header; insert a separator since we'll - have skipped corresponding blank line inside the file */ - putstr(win, 0, ""); - prolog = FALSE; - } - /* skip blank lines and prolog (progame name plus version) */ - if (prolog || !*buf) - continue; - - if (index(buf, ':')) - insert_rtoption(buf); - - if (*buf) - putstr(win, 0, buf); + if (use_dlb) { + f = dlb_fopen(OPTIONS_USED, "r"); + if (!f) { + putstr(win, 0, ""); + Sprintf(buf, "[Configuration '%s' not available?]", OPTIONS_USED); + putstr(win, 0, buf); + done_dlb = TRUE; } -#if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) -#else - (void) dlb_fclose(f); -#endif - display_nhwindow(win, FALSE); - destroy_nhwindow(win); -#if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) -#else } -#endif + /* + * already inserted above: + * + outdented program name and version plus build date and time + * dat/options; display contents with lines prefixed by '-' deleted: + * - blank-line + * - indented program name and version + * blank-line + * outdented feature header + * - blank-line + * indented feature list + * spread over multiple lines + * blank-line + * outdented windowing header + * - blank-line + * indented windowing choices with + * optional second line for default + * - blank-line + * - EOF + */ + + prolog = TRUE; /* to skip indented program name */ + while (keepgoing) { + if (use_dlb && !done_dlb) { + if (!dlb_fgets(buf, BUFSZ, f)) { + done_dlb = TRUE; + continue; + } + } else if (!done_rt) { + if (!(rtbuf = do_runtime_info(&rtcontext))) { + done_rt = TRUE; + continue; + } else { + if ((int) strlen(rtbuf) >= (BUFSZ - 1)) + continue; + Strcpy(buf, rtbuf); + } + } else { + if (!(rtbuf = lua_info[rtcontext++])) { + keepgoing = FALSE; + break; + } else { + Strcpy(buf, rtbuf); + } + } + if (index(buf, '\t') != 0) + (void) tabexpand(buf); + + if (*buf && *buf != ' ') { + /* found outdented header; insert a separator since we'll + have skipped corresponding blank line inside the file */ + putstr(win, 0, ""); + prolog = FALSE; + } + /* skip blank lines and prolog (progame name plus version) */ + if (prolog || !*buf) + continue; + + if (index(buf, ':')) + insert_rtoption(buf); + + if (*buf) + putstr(win, 0, buf); + } + if (use_dlb) + (void) dlb_fclose(f); + display_nhwindow(win, FALSE); + destroy_nhwindow(win); return 0; } From 8a971a378b45c709c6719e003016246d707d04d9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 28 Nov 2019 20:56:42 -0500 Subject: [PATCH 357/529] put back unintended removal of end of line strip --- src/version.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/version.c b/src/version.c index ee01e4dfc..09b06a7d0 100644 --- a/src/version.c +++ b/src/version.c @@ -238,6 +238,7 @@ doextversion() Strcpy(buf, rtbuf); } } + (void) strip_newline(buf); if (index(buf, '\t') != 0) (void) tabexpand(buf); From ff39e44276dbd82de49162ce2bc16af13f6fd836 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 28 Nov 2019 22:48:57 -0500 Subject: [PATCH 358/529] resolve 48 warning building on Mac OS X --- util/.gitignore | 2 + util/readtags.c | 116 +++++++++++++++++++++++++++++------------------- 2 files changed, 72 insertions(+), 46 deletions(-) diff --git a/util/.gitignore b/util/.gitignore index c211d0a77..a6a92da07 100644 --- a/util/.gitignore +++ b/util/.gitignore @@ -19,6 +19,8 @@ gif2txt txt2ppm tile2img.ttp xpm2ppm.ttp +nethack.tags +readtags # dev tool for analyzing data collected by nethack's #define MONITOR_HEAP heaputil heaputil.c diff --git a/util/readtags.c b/util/readtags.c index 442ab43f1..d74298303 100644 --- a/util/readtags.c +++ b/util/readtags.c @@ -76,20 +76,28 @@ static void quit(void); static void out_of_memory(void); static void doline(char *); static void chain(struct tagstruct *); +#if 0 static void showthem(void); static char *stripspecial(char *); +#endif static char *deblank(char *); static char *deeol(char *); static void generate_c_files(); static char *findtype(char *, char *); +#if 0 static boolean FDECL(is_prim, (char *)); +#endif static void taglineparse(char *, struct tagstruct *); static void parseExtensionFields(struct tagstruct *, char *); static void set_member_array_size(struct tagstruct *); +#if 0 static char *member_array_dims(struct tagstruct *, char *); static char *member_array_size(struct tagstruct *, char *); +#endif static void output_types(FILE *); +#if 0 static char *FDECL(dtmacro,(const char *,int)); +#endif static char *FDECL(dtfn,(const char *,int, boolean *)); static char *FDECL(bfsize,(const char *)); static char *FDECL(fieldfix,(char *,char *)); @@ -242,7 +250,7 @@ struct needs_array_handling nah[] = { }; /* conditional code tags - eecch */ -char *condtag[] = { +const char *condtag[] = { #ifdef SYSFLAGS "sysflag","altmeta","#ifdef AMIFLUSH", "", "sysflag","amiflush","","#endif /*AMIFLUSH*/", @@ -296,10 +304,10 @@ char *argv[]; return 0; } -static void doline(line) -char *line; +static void doline(aline) +char *aline; { - char buf[255], *tmp1 = (char *)0; + char buf[255]; struct tagstruct *tmptag = malloc(sizeof(struct tagstruct)); if (!tmptag) { @@ -307,12 +315,12 @@ char *line; } *tmptag = zerotag; - if (!line || (line && *line == '!')) { + if (!aline || (aline && *aline == '!')) { free(tmptag); return; } - strncpy(buf, deeol(line), 254); + strncpy(buf, deeol(aline), 254); taglineparse(buf,tmptag); chain(tmptag); return; @@ -348,6 +356,11 @@ static void out_of_memory() quit(); } +#if 0 +static char empt[] = {0, 0, 0, 0, 0, 0, 0, 0}; +#endif + +#if 0 static char *member_array_dims(struct tagstruct *tmptag, char *buf) { if (buf && tmptag) { @@ -357,7 +370,7 @@ static char *member_array_dims(struct tagstruct *tmptag, char *buf) Sprintf(eos(buf), "[%s]", tmptag->arraysize2); return buf; } - return ""; + return empt; } static char *member_array_size(struct tagstruct *tmptag, char *buf) @@ -369,17 +382,18 @@ static char *member_array_size(struct tagstruct *tmptag, char *buf) Sprintf(eos(buf), " * %s", tmptag->arraysize2); return buf; } - return ""; + return empt; } +#endif void set_member_array_size(struct tagstruct *tmptag) { char buf[BUFSZ]; - static char result[49]; + /* static char result[49]; */ char *arr1 = (char *)0, *arr2 = (char *)0, *tmp; int cnt = 0; - if (!tmptag || (tmptag && !tmptag->searchtext)) return; + if (!tmptag) return; strcpy(buf, tmptag->searchtext); tmptag->arraysize1[0] = '\0'; @@ -512,7 +526,7 @@ struct tagstruct *tmptag; set_member_array_size(tmptag); /* determine if this is a pointer and mark it as such */ - if (tmptag->searchtext && + if (tmptag->searchtext[0] && (tmptag->tagtype == 'm' || tmptag->tagtype == 's')) { char ptrbuf[BUFSZ], searchbuf[BUFSZ]; @@ -558,6 +572,7 @@ char *s; static char stripbuf[255]; +#if 0 static char *stripspecial(char *st) { char *out = stripbuf; @@ -567,11 +582,12 @@ static char *stripspecial(char *st) if (*st >= SPACE) *out++ = *st++; else - *st++; + st++; } *out = '\0'; return stripbuf; } +#endif static char *deblank(char *st) { @@ -624,6 +640,7 @@ static void showthem() } #endif +#if 0 static boolean is_prim(sdt) char *sdt; @@ -644,6 +661,7 @@ char *sdt; } return FALSE; } +#endif char * findtype(st, tag) @@ -652,7 +670,9 @@ char *tag; { static char ftbuf[512]; static char prevbuf[512]; - char *tmp1, *tmp2, *tmp3, *tmp4, *r; + char *tmp1, *tmp2, *tmp3, *tmp4; + const char *r; + if (!st) return (char *)0; if (st[0] == '/' && st[1] == '^') { tmp2 = tmp3 = tmp4 = (char *)0; @@ -707,7 +727,7 @@ char *tag; tmp2 = strstr(ftbuf, tag); return prevbuf; } else { - /* a comma means that more than one thing declared on line */ + /* a comma means that more than one thing declared on ine */ tmp3 = strchr(tmp1, ','); tmp2 = strstr(tmp1, tag); } @@ -748,9 +768,9 @@ char *tag; y = 1; } if (strncmpi(ftbuf, "struct ", 7) == 0) - r = ftbuf + 7; + r = (const char *) (ftbuf + 7); else if (strncmpi(ftbuf, "union ", 6) == 0) - r = ftbuf + 6; + r = (const char *) (ftbuf + 6); /* a couple of kludges follow unfortunately */ else if (strncmpi(ftbuf, "coord", 5) == 0) r = "nhcoord"; @@ -759,9 +779,9 @@ char *tag; else if (strncmpi(ftbuf, "const char", 10) == 0) r = "char"; else - r = ftbuf; + r = (const char *) ftbuf; strcpy(prevbuf, r); - return r; + return prevbuf; } } prevbuf[0] = '\0'; @@ -835,7 +855,7 @@ int n; static void output_types(fp1) FILE *fp1; { - int k, cnt, hcnt = 1; + int k, cnt /*, hcnt = 1 */; struct tagstruct *t = first; Fprintf(fp1, "%s", @@ -888,12 +908,12 @@ static void generate_c_files() #else time_t clocktim = 0; #endif - char *c, cbuf[60], sfparent[BUFSZ], *substruct, *line; + char *c, cbuf[60], sfparent[BUFSZ], *substruct, *gline; FILE *SFO_DATA, *SFI_DATA, *SFDATATMP, *SFO_PROTO, *SFI_PROTO, *SFDATA, *SFPROTO; - int k = 0, j, opening, closetag = 0; - char *iftxt = "} else "; - char *ft, *pt, *layout, *last_ft = (char *)0; + int k = 0, j, opening /*, closetag = 0 */; + const char *pt; + char *ft, *layout, *last_ft = (char *)0; int okeydokey, x, a; boolean did_i; @@ -1034,7 +1054,8 @@ static void generate_c_files() insert_const = TRUE; #endif - pt = layout = (char *)0; + pt = (const char *) 0; + layout = (char *) 0; t = first; while(t) { if (t->tagtype == 'u' && !strcmp(t->tag, readtagstypes[k].dtype)) { @@ -1186,14 +1207,14 @@ static void generate_c_files() /***************** Bitfield *******************/ if (!strncmpi(ft, "Bitfield", 8)) { char lbuf[BUFSZ]; - int j, z; + int j2, z; Sprintf(lbuf, " " "bitfield = d_%s->%s;", readtagstypes[k].dtype, t->tag); z = (int) strlen(lbuf); - for (j = 0; j < (65 - z); ++j) + for (j2 = 0; j2 < (65 - z); ++j2) Strcat(lbuf, " "); Sprintf(eos(lbuf), "/* (%s) */\n", ft); Fprintf(SFO_DATA, "%s", lbuf); @@ -1231,7 +1252,7 @@ static void generate_c_files() char altbuf[BUFSZ]; boolean isptr = FALSE, kludge_sbrooms = FALSE; boolean insert_loop = FALSE; - int j, z; + int j2, z; /*************** kludge for sbrooms *************/ if (!strcmp(t->tag, "sbrooms")) { @@ -1312,7 +1333,7 @@ static void generate_c_files() arrbuf); /* align comments */ z = (int) strlen(lbuf); - for (j = 0; j < (65 - z); ++j) + for (j2 = 0; j2 < (65 - z); ++j2) Strcat(lbuf, " "); Sprintf(eos(lbuf), "/* (%s) */\n", ft); Fprintf(SFO_DATA, "%s", lbuf); @@ -1381,45 +1402,45 @@ static void generate_c_files() SFO_DATA = fopen("../src/sfo_data.tmp", "r"); if (!SFO_DATA) return; - while ((line = fgetline(SFO_DATA)) != 0) { - (void) fputs(line, SFDATA); - free(line); + while ((gline = fgetline(SFO_DATA)) != 0) { + (void) fputs(gline, SFDATA); + free(gline); } (void) fclose(SFO_DATA); (void) remove("../src/sfo_data.tmp"); SFI_DATA = fopen("../src/sfi_data.tmp", "r"); if (!SFI_DATA) return; - while ((line = fgetline(SFI_DATA)) != 0) { - (void) fputs(line, SFDATA); - free(line); + while ((gline = fgetline(SFI_DATA)) != 0) { + (void) fputs(gline, SFDATA); + free(gline); } (void) fclose(SFI_DATA); (void) remove("../src/sfi_data.tmp"); SFO_PROTO = fopen("../include/sfo_proto.tmp", "r"); if (!SFO_PROTO) return; - while ((line = fgetline(SFO_PROTO)) != 0) { - (void) fputs(line, SFPROTO); - free(line); + while ((gline = fgetline(SFO_PROTO)) != 0) { + (void) fputs(gline, SFPROTO); + free(gline); } (void) fclose(SFO_PROTO); (void) remove("../include/sfo_proto.tmp"); SFI_PROTO = fopen("../include/sfi_proto.tmp", "r"); if (!SFI_PROTO) return; - while ((line = fgetline(SFI_PROTO)) != 0) { - (void) fputs(line, SFPROTO); - free(line); + while ((gline = fgetline(SFI_PROTO)) != 0) { + (void) fputs(gline, SFPROTO); + free(gline); } (void) fclose(SFI_PROTO); (void) remove("../include/sfi_proto.tmp"); SFDATATMP = fopen("../src/sfdata.tmp", "r"); if (!SFDATATMP) return; - while ((line = fgetline(SFDATATMP)) != 0) { - (void) fputs(line, SFDATA); - free(line); + while ((gline = fgetline(SFDATATMP)) != 0) { + (void) fputs(gline, SFDATA); + free(gline); } (void) fclose(SFDATATMP); (void) remove("../src/sfdata.tmp"); @@ -1430,6 +1451,7 @@ static void generate_c_files() (void) fclose(SFPROTO); } +#if 0 static char * dtmacro(str,n) const char *str; @@ -1488,6 +1510,7 @@ int n; /* 1 = supress appending |SF_PTRMASK */ (ispointer && (n == 0)) ? " | SF_PTRMASK" : ""); return buf2; } +#endif static char * dtfn(str,n, isptr) @@ -1496,7 +1519,8 @@ int n; /* 1 = supress appending |SF_PTRMASK */ boolean *isptr; { static char buf[128], buf2[128]; - char *nam, *c; + const char *nam; + char *c; int ispointer = 0; if (!str) @@ -1537,7 +1561,7 @@ boolean *isptr; c = buf; } - for (nam = c; *c; c++) { + for (nam = (const char *) c; *c; c++) { if (*c >= 'A' && *c <= 'Z') *c = tolower(*c); else if (*c == ' ') @@ -1565,7 +1589,7 @@ static char * fieldfix(f,ss) char *f, *ss; { - char *c, *dest = fieldfixbuf; + char *c /*, *dest = fieldfixbuf */; if (strcmp(f,"}") == 0 && strlen(ss) > 0 && strlen(ss) < BUFSZ - 1) { /* (void)sprintf(fieldfixbuf,"struct %s", ss); */ From 381b8b4fcbc0178af3414192e59087f92b176122 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 28 Nov 2019 22:50:28 -0500 Subject: [PATCH 359/529] updated sfdata.c --- src/sfdata.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sfdata.c b/src/sfdata.c index b3d862ae7..b8e29d445 100644 --- a/src/sfdata.c +++ b/src/sfdata.c @@ -726,6 +726,7 @@ int cnt; sfo_boolean(nhfp, &d_flag->explore, parent, "explore", 1); /* (boolean) */ sfo_boolean(nhfp, &d_flag->female, parent, "female", 1); /* (boolean) */ sfo_boolean(nhfp, &d_flag->friday13, parent, "friday13", 1); /* (boolean) */ + sfo_boolean(nhfp, &d_flag->goldX, parent, "goldX", 1); /* (boolean) */ sfo_boolean(nhfp, &d_flag->help, parent, "help", 1); /* (boolean) */ sfo_boolean(nhfp, &d_flag->ignintr, parent, "ignintr", 1); /* (boolean) */ sfo_boolean(nhfp, &d_flag->ins_chkpt, parent, "ins_chkpt", 1);/* (boolean) */ @@ -734,7 +735,6 @@ int cnt; sfo_boolean(nhfp, &d_flag->lit_corridor, parent, "lit_corridor", 1);/* (boolean) */ sfo_boolean(nhfp, &d_flag->nap, parent, "nap", 1); /* (boolean) */ sfo_boolean(nhfp, &d_flag->null, parent, "null", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->p__obsolete, parent, "p__obsolete", 1);/* (boolean) */ sfo_boolean(nhfp, &d_flag->pickup, parent, "pickup", 1); /* (boolean) */ sfo_boolean(nhfp, &d_flag->pickup_thrown, parent, "pickup_thrown", 1);/* (boolean) */ sfo_boolean(nhfp, &d_flag->pushweapon, parent, "pushweapon", 1);/* (boolean) */ @@ -3118,6 +3118,7 @@ int cnt; sfi_boolean(nhfp, &d_flag->explore, parent, "explore", 1); sfi_boolean(nhfp, &d_flag->female, parent, "female", 1); sfi_boolean(nhfp, &d_flag->friday13, parent, "friday13", 1); + sfi_boolean(nhfp, &d_flag->goldX, parent, "goldX", 1); sfi_boolean(nhfp, &d_flag->help, parent, "help", 1); sfi_boolean(nhfp, &d_flag->ignintr, parent, "ignintr", 1); sfi_boolean(nhfp, &d_flag->ins_chkpt, parent, "ins_chkpt", 1); @@ -3126,7 +3127,6 @@ int cnt; sfi_boolean(nhfp, &d_flag->lit_corridor, parent, "lit_corridor", 1); sfi_boolean(nhfp, &d_flag->nap, parent, "nap", 1); sfi_boolean(nhfp, &d_flag->null, parent, "null", 1); - sfi_boolean(nhfp, &d_flag->p__obsolete, parent, "p__obsolete", 1); sfi_boolean(nhfp, &d_flag->pickup, parent, "pickup", 1); sfi_boolean(nhfp, &d_flag->pickup_thrown, parent, "pickup_thrown", 1); sfi_boolean(nhfp, &d_flag->pushweapon, parent, "pushweapon", 1); @@ -5481,6 +5481,7 @@ const char *critical_members[] = { "struct flag:explore:boolean", "struct flag:female:boolean", "struct flag:friday13:boolean", + "struct flag:goldX:boolean", "struct flag:help:boolean", "struct flag:ignintr:boolean", "struct flag:ins_chkpt:boolean", @@ -5489,7 +5490,6 @@ const char *critical_members[] = { "struct flag:lit_corridor:boolean", "struct flag:nap:boolean", "struct flag:null:boolean", - "struct flag:p__obsolete:boolean", "struct flag:pickup:boolean", "struct flag:pickup_thrown:boolean", "struct flag:pushweapon:boolean", From 2954608a398f883ffd31cc8bd429871e94b87a25 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 28 Nov 2019 23:36:15 -0500 Subject: [PATCH 360/529] another Windows Makefile bit Ensure the tools build whether a CROSSCOMPILE_HOST build, or when there is no CROSSCOMPILE. --- sys/winnt/Makefile.msc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index e5f479925..cffd4d044 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -272,7 +272,16 @@ TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt # # These are not invoked during a normal game build in 3.4 # + !IFDEF CROSSCOMPILE_HOST +DO_UTILS = Y +!ELSE IFNDEF CROSSCOMPILE +DO_UTILS = Y +!ELSE +DO_UTILS = N +!ENDIF + +!IF "$(DO_UTILS)" == "Y" TEXT_IO = $(O)tiletext$(HOST).o $(O)tiletxt$(HOST).o $(O)drawing$(HOST).o \ $(O)decl$(HOST).o $(O)monst$(HOST).o $(O)objects$(HOST).o From fd7d0f5d521f4b4e61fad6aede97eebdaa9f76c1 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 29 Nov 2019 11:14:55 -0500 Subject: [PATCH 361/529] more things considered when you're on the brink --- doc/fixes36.3 | 1 + include/extern.h | 1 + src/dig.c | 2 +- src/do.c | 9 +++++---- src/engrave.c | 3 ++- src/hack.c | 6 ++++-- src/pickup.c | 2 +- src/sit.c | 2 +- src/trap.c | 20 +++++++++++++++----- 9 files changed, 31 insertions(+), 15 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 2573be3bc..c4ce381b1 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -241,6 +241,7 @@ check for whether a monster was entering a region (gas cloud) erroneously all Is_*_level tests during early startup would test as true until dungeon_topology was initialized in a new game or restored from a save file +take holes that you avoided into consideration when you're on the brink Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/include/extern.h b/include/extern.h index 4316a6f62..88f71fed9 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2550,6 +2550,7 @@ E int FDECL(launch_obj, (SHORT_P, int, int, int, int, int)); E boolean NDECL(launch_in_progress); E void NDECL(force_launch_placement); E boolean FDECL(uteetering_at_seen_pit, (struct trap *)); +E boolean FDECL(uescaped_shaft, (struct trap *)); E boolean NDECL(lava_effects); E void NDECL(sink_into_lava); E void NDECL(sokoban_guilt); diff --git a/src/dig.c b/src/dig.c index dbf5eb5ca..9b91f982c 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1169,7 +1169,7 @@ struct obj *obj; You("cannot stay under%s long enough.", is_pool(u.ux, u.uy) ? "water" : " the lava"); } else if ((trap = t_at(u.ux, u.uy)) != 0 - && uteetering_at_seen_pit(trap)) { + && (uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) { dotrap(trap, FORCEBUNGLE); /* might escape trap and still be teetering at brink */ if (!u.utrap) diff --git a/src/do.c b/src/do.c index 72b315640..8b35c071f 100644 --- a/src/do.c +++ b/src/do.c @@ -246,12 +246,13 @@ const char *verb; } return water_damage(obj, NULL, FALSE) == ER_DESTROYED; } else if (u.ux == x && u.uy == y && (t = t_at(x, y)) != 0 - && uteetering_at_seen_pit(t)) { + && (uteetering_at_seen_pit(t) || uescaped_shaft(t))) { if (Blind && !Deaf) You_hear("%s tumble downwards.", the(xname(obj))); else - pline("%s %s into %s pit.", The(xname(obj)), - otense(obj, "tumble"), the_your[t->madeby_u]); + pline("%s %s into %s %s.", The(xname(obj)), + otense(obj, "tumble"), the_your[t->madeby_u], + is_pit(t->ttyp) ? "pit" : "hole"); } else if (obj->globby) { /* Globby things like puddings might stick together */ while (obj && (otmp = obj_nexto_xy(obj, x, y, TRUE)) != 0) { @@ -1001,7 +1002,7 @@ dodown() } if (!stairs_down && !ladder_down) { trap = t_at(u.ux, u.uy); - if (trap && uteetering_at_seen_pit(trap)) { + if (trap && (uteetering_at_seen_pit(trap) || uescaped_shaft)) { dotrap(trap, TOOKPLUNGE); return 1; } else if (!trap || !is_hole(trap->ttyp) diff --git a/src/engrave.c b/src/engrave.c index acd5247d1..b0018556f 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -154,7 +154,8 @@ boolean check_pit; if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) return FALSE; if (check_pit && !Flying - && (t = t_at(u.ux, u.uy)) != 0 && uteetering_at_seen_pit(t)) + && (t = t_at(u.ux, u.uy)) != 0 + && (uteetering_at_seen_pit(t) || uescaped_shaft(t))) return FALSE; return (boolean) ((!Levitation || Is_airlevel(&u.uz) diff --git a/src/hack.c b/src/hack.c index e615385d0..dca467262 100644 --- a/src/hack.c +++ b/src/hack.c @@ -2635,8 +2635,10 @@ pickup_checks() } if (!can_reach_floor(TRUE)) { struct trap *traphere = t_at(u.ux, u.uy); - if (traphere && uteetering_at_seen_pit(traphere)) - You("cannot reach the bottom of the pit."); + if (traphere + && (uteetering_at_seen_pit(traphere) || uescaped_shaft(traphere))) + You("cannot reach the bottom of the %s.", + is_pit(traphere->ttyp) ? "pit" : "abyss"); else if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) rider_cant_reach(); else if (Blind && !can_reach_floor(TRUE)) diff --git a/src/pickup.c b/src/pickup.c index 4c789f38a..cd0fd118b 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -521,7 +521,7 @@ int what; /* should be a long */ if (!can_reach_floor(TRUE)) { if ((multi && !context.run) || (autopickup && !flags.pickup) || ((ttmp = t_at(u.ux, u.uy)) != 0 - && uteetering_at_seen_pit(ttmp))) + && (uteetering_at_seen_pit(ttmp) || uescaped_shaft(ttmp)))) read_engr_at(u.ux, u.uy); return 0; } diff --git a/src/sit.c b/src/sit.c index 2c164c2fe..371e1ffa6 100644 --- a/src/sit.c +++ b/src/sit.c @@ -67,7 +67,7 @@ dosit() if (OBJ_AT(u.ux, u.uy) /* ensure we're not standing on the precipice */ - && !uteetering_at_seen_pit(trap)) { + && !(uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) { register struct obj *obj; obj = level.objects[u.ux][u.uy]; diff --git a/src/trap.c b/src/trap.c index 071bad6dc..fe63d2b66 100644 --- a/src/trap.c +++ b/src/trap.c @@ -5104,11 +5104,21 @@ boolean uteetering_at_seen_pit(trap) struct trap *trap; { - if (trap && trap->tseen && (!u.utrap || u.utraptype != TT_PIT) - && is_pit(trap->ttyp)) - return TRUE; - else - return FALSE; + return (trap && is_pit(trap->ttyp) && trap->tseen + && trap->tx == u.ux && trap->ty == u.uy + && !(u.utrap && u.utraptype == TT_PIT)); +} + +/* + * Returns TRUE if you didn't fall through a hole or didn't + * release a trap door + */ +boolean +uescaped_shaft(trap) +struct trap *trap; +{ + return (trap && is_hole(trap->ttyp) && trap->tseen + && trap->tx == u.ux && trap->ty == u.uy); } /* Destroy a trap that emanates from the floor. */ From 97a61e2e9571eb81038627b32b23202f9ec1fdfe Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 29 Nov 2019 12:05:21 -0500 Subject: [PATCH 362/529] move fixes entry to correct section --- doc/fixes36.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index c4ce381b1..0f584ac0e 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -241,7 +241,6 @@ check for whether a monster was entering a region (gas cloud) erroneously all Is_*_level tests during early startup would test as true until dungeon_topology was initialized in a new game or restored from a save file -take holes that you avoided into consideration when you're on the brink Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository @@ -315,6 +314,7 @@ clairvoyance showed all monsters in range, then after player viewed the map, did a normal monster refresh; the 'I' glyph step clobbers remembered object at same spot, so skip it for locations where monster refresh is going to immediately redisplay a monster +take holes that you avoided into consideration when you're on the brink unix: fix double DLB definition in linux hints file windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix From 49e4dfbc0f0323b3927d7bf00125405d9defb072 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 29 Nov 2019 11:38:42 -0800 Subject: [PATCH 363/529] fix teetering typo do.c:1005:54: warning: address of function 'uescaped_shaft' will always evaluate to 'true' [-Wpointer-bool-conversion] if (trap && (uteetering_at_seen_pit(trap) || uescaped_shaft)) { ~~ ^~~~~~~~~~~~~~ --- src/do.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/do.c b/src/do.c index 8b35c071f..4ea785133 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do.c $NHDT-Date: 1574722862 2019/11/25 23:01:02 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.193 $ */ +/* NetHack 3.6 do.c $NHDT-Date: 1575056306 2019/11/29 19:38:26 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.195 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1002,7 +1002,7 @@ dodown() } if (!stairs_down && !ladder_down) { trap = t_at(u.ux, u.uy); - if (trap && (uteetering_at_seen_pit(trap) || uescaped_shaft)) { + if (trap && (uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) { dotrap(trap, TOOKPLUNGE); return 1; } else if (!trap || !is_hole(trap->ttyp) From f8a1059a87e24357eb6960dfddb9382561dd06c3 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 29 Nov 2019 21:48:59 +0200 Subject: [PATCH 364/529] Read lua files more efficiently ... replacing horribly hacky loop. --- src/nhlua.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/nhlua.c b/src/nhlua.c index a8f33ca8e..39c71496e 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -804,7 +804,7 @@ const char *fname; dlb *fh; char *buf = (char *) 0; long buflen; - int c, llret; + int cnt, llret; long bufidx = 0; fh = dlb_fopen(fname, "r"); @@ -819,13 +819,12 @@ const char *fname; buf = (char *) alloc(sizeof(char) * (buflen + 1)); dlb_fseek(fh, 0L, SEEK_SET); - do { - c = dlb_fgetc(fh); - if (c == EOF) - break; - buf[bufidx++] = (char) c; - } while (bufidx < buflen); - buf[bufidx] = '\0'; + if ((cnt = dlb_fread(buf, 1, buflen, fh)) != buflen) { + impossible("nhl_loadlua: Error loading %s, got %i/%li bytes", fname, cnt, buflen); + ret = FALSE; + goto give_up; + } + buf[buflen] = '\0'; (void) dlb_fclose(fh); llret = luaL_loadstring(L, buf); From 453745701fcf958e78a1c964724c5d3c98a04c47 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 29 Nov 2019 17:38:51 -0500 Subject: [PATCH 365/529] casting lua_tointeger --- src/dungeon.c | 11 +++++++---- src/nhlua.c | 4 ++-- src/questpgr.c | 3 ++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/dungeon.c b/src/dungeon.c index de7319b88..ae6e6866b 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -779,8 +779,9 @@ lua_State *L; lua_getfield(L, -1, "flags"); if (lua_type(L, -1) == LUA_TTABLE) { int f, nflags; + lua_len(L, -1); - nflags = LUA_INTCAST(lua_tointeger(L, -1)); + nflags = (int) lua_tointeger(L, -1); lua_pop(L, 1); for (f = 0; f < nflags; f++) { lua_pushinteger(L, f+1); @@ -856,7 +857,7 @@ init_dungeons() panic("dungeon is not a lua table"); lua_len(L, -1); - g.n_dgns = LUA_INTCAST(lua_tointeger(L, -1)); + g.n_dgns = (int) lua_tointeger(L, -1); lua_pop(L, 1); pd.start = 0; @@ -905,8 +906,9 @@ init_dungeons() lua_getfield(L, -1, "levels"); if (lua_type(L, -1) == LUA_TTABLE) { int f, nlevels; + lua_len(L, -1); - nlevels = LUA_INTCAST(lua_tointeger(L, -1)); + nlevels = (int) lua_tointeger(L, -1); pd.tmpdungeon[i].levels = nlevels; lua_pop(L, 1); for (f = 0; f < nlevels; f++) { @@ -965,8 +967,9 @@ init_dungeons() lua_getfield(L, -1, "branches"); if (lua_type(L, -1) == LUA_TTABLE) { int f, nbranches; + lua_len(L, -1); - nbranches = LUA_INTCAST(lua_tointeger(L, -1)); + nbranches = (int) lua_tointeger(L, -1); pd.tmpdungeon[i].branches = nbranches; lua_pop(L, 1); for (f = 0; f < nbranches; f++) { diff --git a/src/nhlua.c b/src/nhlua.c index 39c71496e..678dd7338 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -217,8 +217,8 @@ lua_State *L; int argc = lua_gettop(L); if (argc == 2) { - int x = LUA_INTCAST(lua_tointeger(L, 1)); - int y = LUA_INTCAST(lua_tointeger(L, 2)); + int x = (int) lua_tointeger(L, 1); + int y = (int) lua_tointeger(L, 2); if (x >= 0 && x < COLNO && y >= 0 && y < ROWNO) { char buf[BUFSZ]; diff --git a/src/questpgr.c b/src/questpgr.c index 64eea0c4d..594e4952b 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -484,8 +484,9 @@ const char *msgid; if (!synopsis && !text) { int nelems; + lua_len(L, -1); - nelems = LUA_INTCAST(lua_tointeger(L, -1)); + nelems = (int) lua_tointeger(L, -1); lua_pop(L, 1); if (nelems < 2) { impossible("com_pager: questtext[%s][%s] in %s in not an array of strings", section, msgid, QTEXT_FILE); From e13e166620b706992bceea14f0404350304262a1 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 29 Nov 2019 17:40:58 -0500 Subject: [PATCH 366/529] get rid of LUA_INTCAST defines --- include/system.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/system.h b/include/system.h index 60437f0bc..3906e68e4 100644 --- a/include/system.h +++ b/include/system.h @@ -571,12 +571,6 @@ E int FDECL(atoi, (const char *)); #if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET) #include "nhlua.h" - -#if defined(WIN32) -#define LUA_INTCAST(i) ((int) i) -#else -#define LUA_INTCAST(i) (i) #endif -#endif /* !CROSSCOMPILE || CROSSCOMPILE_TARGET */ #endif /* SYSTEM_H */ From 10359c7bee7dc8d97287c626e56ff1b800996b1e Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 29 Nov 2019 15:58:03 -0800 Subject: [PATCH 367/529] build fix for unix Add src/mdlib.[co] to Makefile.src. Dependencies for mklib.o have been added manually rather than via 'make depend'. --- sys/unix/Makefile.src | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 18323ccb2..d2d3ee377 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -1,5 +1,5 @@ # NetHack Makefile. -# NetHack 3.6 Makefile.src $NHDT-Date: 1574825214 2019/11/27 03:26:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.77 $ +# NetHack 3.6 Makefile.src $NHDT-Date: 1575071867 2019/11/29 23:57:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.78 $ # Copyright (c) 2018 by Pasi Kallinen # NetHack may be freely redistributed. See license for details. @@ -445,8 +445,8 @@ HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c ball.c bones.c \ do_name.c do_wear.c dog.c dogmove.c dokick.c dothrow.c drawing.c \ dungeon.c eat.c end.c engrave.c exper.c explode.c extralev.c \ files.c fountain.c hack.c hacklib.c invent.c isaac64.c light.c \ - lock.c mail.c makemon.c mapglyph.c mcastu.c mhitm.c mhitu.c \ - minion.c mklev.c mkmap.c mkmaze.c mkobj.c mkroom.c mon.c \ + lock.c mail.c makemon.c mapglyph.c mcastu.c mdlib.c mhitm.c \ + mhitu.c minion.c mklev.c mkmap.c mkmaze.c mkobj.c mkroom.c mon.c \ mondata.c monmove.c monst.c mplayer.c mthrowu.c muse.c music.c \ nhlua.c nhlsel.c o_init.c objects.c objnam.c \ options.c pager.c pickup.c pline.c polyself.c potion.c pray.c \ @@ -513,8 +513,8 @@ HOBJ = $(FIRSTOBJ) allmain.o alloc.o apply.o artifact.o attrib.o ball.o \ do.o do_name.o do_wear.o dog.o dogmove.o dokick.o dothrow.o \ drawing.o dungeon.o eat.o end.o engrave.o exper.o explode.o \ extralev.o files.o fountain.o hack.o hacklib.o invent.o isaac64.o \ - light.o lock.o mail.o makemon.o mapglyph.o mcastu.o mhitm.o mhitu.o \ - minion.o mklev.o mkmap.o mkmaze.o mkobj.o mkroom.o mon.o \ + light.o lock.o mail.o makemon.o mapglyph.o mcastu.o mdlib.o mhitm.o \ + mhitu.o minion.o mklev.o mkmap.o mkmaze.o mkobj.o mkroom.o mon.o \ mondata.o monmove.o mplayer.o mthrowu.o muse.o music.o \ nhlua.o nhlsel.o o_init.o objnam.o options.o \ pager.o pickup.o pline.o polyself.o potion.o pray.o priest.o \ @@ -1049,6 +1049,11 @@ mail.o: mail.c $(HACK_H) ../include/mail.h makemon.o: makemon.c $(HACK_H) mapglyph.o: mapglyph.c $(HACK_H) mcastu.o: mcastu.c $(HACK_H) +mdlib.o: mdlib.c $(CONFIG_H) ../include/permonst.h ../include/objclass.h \ + ../include/monsym.h ../include/artilist.h \ + ../include/dungeon.h ../include/obj.h ../include/monst.h \ + ../include/you.h ../include/context.h ../include/flag.h \ + ../include/dlb.h ../include/patchlevel.h mhitm.o: mhitm.c $(HACK_H) ../include/artifact.h mhitu.o: mhitu.c $(HACK_H) ../include/artifact.h minion.o: minion.c $(HACK_H) From 099fdca8cdd053765706d78e7958ec4e38ed100e Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 29 Nov 2019 15:59:50 -0800 Subject: [PATCH 368/529] no longer used variable --- src/nhlua.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/nhlua.c b/src/nhlua.c index 678dd7338..7c20d9b98 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 nhlua.c $NHDT-Date: 1574825214 2019/11/27 03:26:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */ +/* NetHack 3.6 nhlua.c $NHDT-Date: 1575071986 2019/11/29 23:59:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */ /* Copyright (c) 2018 by Pasi Kallinen */ /* NetHack may be freely redistributed. See license for details. */ @@ -805,7 +805,6 @@ const char *fname; char *buf = (char *) 0; long buflen; int cnt, llret; - long bufidx = 0; fh = dlb_fopen(fname, "r"); if (!fh) { @@ -820,7 +819,8 @@ const char *fname; dlb_fseek(fh, 0L, SEEK_SET); if ((cnt = dlb_fread(buf, 1, buflen, fh)) != buflen) { - impossible("nhl_loadlua: Error loading %s, got %i/%li bytes", fname, cnt, buflen); + impossible("nhl_loadlua: Error loading %s, got %i/%li bytes", + fname, cnt, buflen); ret = FALSE; goto give_up; } @@ -829,7 +829,8 @@ const char *fname; llret = luaL_loadstring(L, buf); if (llret != LUA_OK) { - impossible("luaL_loadstring: Error loading %s (errcode %i)", fname, llret); + impossible("luaL_loadstring: Error loading %s (errcode %i)", + fname, llret); ret = FALSE; goto give_up; } else { @@ -842,7 +843,7 @@ const char *fname; } } -give_up: + give_up: if (buf) { free(buf); buf = (char *) 0; @@ -898,7 +899,7 @@ const char *name; goto give_up; } -give_up: + give_up: lua_close(L); return ret; From 769799105c91b48830d1041959d61057c7d03f13 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 29 Nov 2019 16:05:14 -0800 Subject: [PATCH 369/529] move lua notice to makedefs.c and dat/options Prefix the lua notice with a one-line explanation. One minor change: the copyright date didn't match the one from the actual lua notice. --- src/version.c | 27 ++++++++++++--------------- util/makedefs.c | 34 ++++++++++++++++++++++++++++------ 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/src/version.c b/src/version.c index 09b06a7d0..3c30657d2 100644 --- a/src/version.c +++ b/src/version.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 version.c $NHDT-Date: 1552353060 2019/03/12 01:11:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.52 $ */ +/* NetHack 3.6 version.c $NHDT-Date: 1575072301 2019/11/30 00:05:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.62 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -141,12 +141,12 @@ doextversion() char buf[BUFSZ], *p = 0; winid win = create_nhwindow(NHW_TEXT); boolean use_dlb = TRUE, - keepgoing = TRUE, done_rt = FALSE, done_dlb = FALSE, prolog; +#if 0 /* moved to util/makedefs.c and rendered via dat/options */ const char *lua_info[] = { - "About Lua: Copyright (c) 1994-2019 Lua.org, PUC-Rio.", + "About Lua: Copyright (c) 1994-2017 Lua.org, PUC-Rio.", /* 1 2 3 4 5 6 7 1234567890123456789012345678901234567890123456789012345678901234567890123456789 */ @@ -161,7 +161,7 @@ doextversion() " included in all copies or substantial portions of the Software.\"", (const char *) 0 }; - +#endif /*0*/ #if defined(OPTIONS_AT_RUNTIME) || defined(CROSSCOMPILE_TARGET) use_dlb = FALSE; #else @@ -215,7 +215,7 @@ doextversion() */ prolog = TRUE; /* to skip indented program name */ - while (keepgoing) { + for (;;) { if (use_dlb && !done_dlb) { if (!dlb_fgets(buf, BUFSZ, f)) { done_dlb = TRUE; @@ -225,18 +225,15 @@ doextversion() if (!(rtbuf = do_runtime_info(&rtcontext))) { done_rt = TRUE; continue; - } else { - if ((int) strlen(rtbuf) >= (BUFSZ - 1)) - continue; - Strcpy(buf, rtbuf); } + (void) strncpy(buf, rtbuf, BUFSZ - 1); + buf[BUFSZ - 1] = '\0'; +#if 0 /* handled via dat/options */ + } else if ((rtbuf = lua_info[rtcontext++]) != 0) { + Strcpy(buf, rtbuf); +#endif /*0*/ } else { - if (!(rtbuf = lua_info[rtcontext++])) { - keepgoing = FALSE; - break; - } else { - Strcpy(buf, rtbuf); - } + break; } (void) strip_newline(buf); if (index(buf, '\t') != 0) diff --git a/util/makedefs.c b/util/makedefs.c index c9db1eb42..835d2e1b5 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 makedefs.c $NHDT-Date: 1574705221 2019/11/25 18:07:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.165 $ */ +/* NetHack 3.6 makedefs.c $NHDT-Date: 1575072306 2019/11/30 00:05:06 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.166 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -1186,7 +1186,8 @@ do_date() #endif #if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST) - Fprintf(ofp, "\n#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST)\n"); + Fprintf(ofp, + "\n#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST)\n"); #endif /* CROSSCOMPILE || CROSSCOMPILE_HOST */ if (date_via_env) Fprintf(ofp, "#define SOURCE_DATE_EPOCH (%lu%s) /* via getenv() */\n", @@ -1287,11 +1288,13 @@ char *githash, *gitbranch; *end = '\0'; len = strlen(opt); - if ((len >= strlen("gitbranch")) && !case_insensitive_comp(opt, "gitbranch")) { + if ((len >= strlen("gitbranch")) + && !case_insensitive_comp(opt, "gitbranch")) { Strcpy(gitbranch, strval); havebranch = TRUE; } - if ((len >= strlen("githash")) && !case_insensitive_comp(opt, "githash")) { + if ((len >= strlen("githash")) + && !case_insensitive_comp(opt, "githash")) { Strcpy(githash, strval); havehash = TRUE; } @@ -1308,7 +1311,24 @@ void do_options() { const char *optline; - int infocontext = 0; + int i, infocontext = 0; + const char *lua_info[] = { + "NetHack 3.7.* uses the 'Lua' interpreter to process some data:\n", + " About Lua: Copyright (c) 1994-2017 Lua.org, PUC-Rio.\n", + /* 1 2 3 4 5 6 7 + 1234567890123456789012345678901234567890123456789012345678901234567890123456 + */ + " \"Permission is hereby granted, free of charge, to any person obtaining", + " a copy of this software and associated documentation files (the ", + " \"Software\"), to deal in the Software without restriction including", + " without limitation the rights to use, copy, modify, merge, publish,", + " distribute, sublicense, and/or sell copies of the Software, and to ", + " permit persons to whom the Software is furnished to do so, subject to", + " the following conditions:", + " The above copyright notice and this permission notice shall be", + " included in all copies or substantial portions of the Software.\"", + (const char *) 0 + }; windowing_sanity(); filename[0] = '\0'; @@ -1320,7 +1340,9 @@ do_options() perror(filename); exit(EXIT_FAILURE); } - while ((optline = do_runtime_info(&infocontext))) + while ((optline = do_runtime_info(&infocontext)) != 0) + Fprintf(ofp, "%s\n", optline); + for (i = 0; (optline = lua_info[i]) != 0; ++i) Fprintf(ofp, "%s\n", optline); Fclose(ofp); return; From 5226726c99d152eb71e9c432117159f6b01562a0 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 29 Nov 2019 17:19:37 -0800 Subject: [PATCH 370/529] more lua notice from makedefs.c to mdlib.c Add missing dependency of makedefs needing src/mdlib.c to unix Makefile.src. --- src/mdlib.c | 60 +++++++++++++++++++++++++++++++++---------- src/version.c | 4 +-- sys/unix/Makefile.src | 5 ++-- util/makedefs.c | 23 ++--------------- 4 files changed, 54 insertions(+), 38 deletions(-) diff --git a/src/mdlib.c b/src/mdlib.c index ff776ad93..812bc1e73 100644 --- a/src/mdlib.c +++ b/src/mdlib.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 mdlib.c $NHDT-Date: 1574646946 2019/11/25 01:55:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ */ +/* NetHack 3.7 mdlib.c $NHDT-Date: 1575076762 2019/11/30 01:19:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -52,9 +52,9 @@ static char *FDECL(bannerc_string, (char *, const char *)); static void FDECL(opt_out_words, (char *, int *)); static void NDECL(build_savebones_compat_string); static int idxopttext, done_runtime_opt_init_once = 0; -#define MAXOPT 30 +#define MAXOPT 40 static char rttimebuf[MAXOPT]; -static char *opttext[ROWNO] = {0}; +static char *opttext[120] = { 0 }; char optbuf[BUFSZ]; static struct version_info version; static const char opt_indent[] = " "; @@ -328,19 +328,25 @@ static void build_savebones_compat_string() { #ifdef VERSION_COMPATIBILITY - unsigned long uver = VERSION_COMPATIBILITY; + unsigned long uver = VERSION_COMPATIBILITY, + cver = (((unsigned long) VERSION_MAJOR << 24) + | ((unsigned long) VERSION_MINOR << 16) + | ((unsigned long) PATCHLEVEL << 8)); #endif + Strcpy(save_bones_compat_buf, "save and bones files accepted from version"); #ifdef VERSION_COMPATIBILITY - Sprintf(eos(save_bones_compat_buf), "s %lu.%lu.%lu through %d.%d.%d", - ((uver & 0xFF000000L) >> 24), ((uver & 0x00FF0000L) >> 16), - ((uver & 0x0000FF00L) >> 8), VERSION_MAJOR, VERSION_MINOR, - PATCHLEVEL); -#else - Sprintf(eos(save_bones_compat_buf), " %d.%d.%d only", VERSION_MAJOR, - VERSION_MINOR, PATCHLEVEL); + if (uver != cver) + Sprintf(eos(save_bones_compat_buf), "s %lu.%lu.%lu through %d.%d.%d", + ((uver >> 24) & 0x0ffUL), + ((uver >> 16) & 0x0ffUL), + ((uver >> 8) & 0x0ffUL), + VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL); + else #endif + Sprintf(eos(save_bones_compat_buf), " %d.%d.%d only", + VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL); } static const char *build_opts[] = { @@ -627,11 +633,39 @@ build_options() idxopttext++; optbuf[0] = '\0'; +#if defined(MAKEDEFS_C) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_TARGET)) + { + static const char *lua_info[] = { + "", "NetHack 3.7.* uses the 'Lua' interpreter to process some data:", "", + " About Lua: Copyright (c) 1994-2017 Lua.org, PUC-Rio.", "", + /* 1 2 3 4 5 6 7 + 1234567890123456789012345678901234567890123456789012345678901234567890123456 + */ + " \"Permission is hereby granted, free of charge, to any person obtaining", + " a copy of this software and associated documentation files (the ", + " \"Software\"), to deal in the Software without restriction including", + " without limitation the rights to use, copy, modify, merge, publish,", + " distribute, sublicense, and/or sell copies of the Software, and to ", + " permit persons to whom the Software is furnished to do so, subject to", + " the following conditions:", + " The above copyright notice and this permission notice shall be", + " included in all copies or substantial portions of the Software.\"", + (const char *) 0 + }; + + /* add lua copyright notice */ + for (i = 0; lua_info[i]; ++i) { + opttext[idxopttext] = strdup(lua_info[i]); + if (idxopttext < (MAXOPT - 1)) + idxopttext++; + } + } +#endif /* MAKEDEFS_C || (CROSSCOMPILE && CROSSCOMPILE_TARGET) */ + /* end with a blank line */ - opttext[idxopttext] = strdup(optbuf); + opttext[idxopttext] = strdup(""); if (idxopttext < (MAXOPT - 1)) idxopttext++; - optbuf[0] = '\0'; return; } diff --git a/src/version.c b/src/version.c index 3c30657d2..a4e2c5157 100644 --- a/src/version.c +++ b/src/version.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 version.c $NHDT-Date: 1575072301 2019/11/30 00:05:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.62 $ */ +/* NetHack 3.6 version.c $NHDT-Date: 1575076767 2019/11/30 01:19:27 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.63 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -458,7 +458,7 @@ void store_version(nhfp) NHFILE *nhfp; { -#if !defined(CROSSCOMPILE) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST)) +#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST) static const struct version_info version_data = { VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY1, VERSION_SANITY2, VERSION_SANITY3 diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index d2d3ee377..4ed03277e 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -1,5 +1,5 @@ # NetHack Makefile. -# NetHack 3.6 Makefile.src $NHDT-Date: 1575071867 2019/11/29 23:57:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.78 $ +# NetHack 3.6 Makefile.src $NHDT-Date: 1575076770 2019/11/30 01:19:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.79 $ # Copyright (c) 2018 by Pasi Kallinen # NetHack may be freely redistributed. See license for details. @@ -636,7 +636,8 @@ qt4yndlg.moc : ../win/Qt4/qt4yndlg.h # build monst.o and objects.o before executing '$(MAKE) makedefs' $(MAKEDEFS): $(FIRSTOBJ) \ - ../util/makedefs.c $(CONFIG_H) ../include/permonst.h \ + ../util/makedefs.c ../src/mdlib.c $(CONFIG_H) \ + ../include/permonst.h \ ../include/objclass.h ../include/monsym.h \ ../include/artilist.h ../include/dungeon.h ../include/obj.h \ ../include/monst.h ../include/you.h ../include/flag.h \ diff --git a/util/makedefs.c b/util/makedefs.c index 835d2e1b5..e9f55f8fc 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 makedefs.c $NHDT-Date: 1575072306 2019/11/30 00:05:06 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.166 $ */ +/* NetHack 3.6 makedefs.c $NHDT-Date: 1575076769 2019/11/30 01:19:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.167 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -1311,24 +1311,7 @@ void do_options() { const char *optline; - int i, infocontext = 0; - const char *lua_info[] = { - "NetHack 3.7.* uses the 'Lua' interpreter to process some data:\n", - " About Lua: Copyright (c) 1994-2017 Lua.org, PUC-Rio.\n", - /* 1 2 3 4 5 6 7 - 1234567890123456789012345678901234567890123456789012345678901234567890123456 - */ - " \"Permission is hereby granted, free of charge, to any person obtaining", - " a copy of this software and associated documentation files (the ", - " \"Software\"), to deal in the Software without restriction including", - " without limitation the rights to use, copy, modify, merge, publish,", - " distribute, sublicense, and/or sell copies of the Software, and to ", - " permit persons to whom the Software is furnished to do so, subject to", - " the following conditions:", - " The above copyright notice and this permission notice shall be", - " included in all copies or substantial portions of the Software.\"", - (const char *) 0 - }; + int infocontext = 0; windowing_sanity(); filename[0] = '\0'; @@ -1342,8 +1325,6 @@ do_options() } while ((optline = do_runtime_info(&infocontext)) != 0) Fprintf(ofp, "%s\n", optline); - for (i = 0; (optline = lua_info[i]) != 0; ++i) - Fprintf(ofp, "%s\n", optline); Fclose(ofp); return; } From dd1d978b84a70f0f62a606f71c033079a26a435d Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 29 Nov 2019 21:19:31 -0500 Subject: [PATCH 371/529] a couple of very minor follow-up bits --- src/version.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/version.c b/src/version.c index a4e2c5157..a85867908 100644 --- a/src/version.c +++ b/src/version.c @@ -144,7 +144,7 @@ doextversion() done_rt = FALSE, done_dlb = FALSE, prolog; -#if 0 /* moved to util/makedefs.c and rendered via dat/options */ +#if 0 /* moved to util/mdlib.c and rendered via do_runtime_info() */ const char *lua_info[] = { "About Lua: Copyright (c) 1994-2017 Lua.org, PUC-Rio.", /* 1 2 3 4 5 6 7 @@ -228,10 +228,6 @@ doextversion() } (void) strncpy(buf, rtbuf, BUFSZ - 1); buf[BUFSZ - 1] = '\0'; -#if 0 /* handled via dat/options */ - } else if ((rtbuf = lua_info[rtcontext++]) != 0) { - Strcpy(buf, rtbuf); -#endif /*0*/ } else { break; } From 756f6a10062214afc6e3f8ab4b40eae06b41137c Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 29 Nov 2019 18:31:45 -0800 Subject: [PATCH 372/529] fix a memory leak Memory allocated for a trap in getlev() wasn't being freed. There is already one extra allocation which is supposed to get freed after the loop, but the 'keepgoing' flag caused an extra trap allocation before loop termination. So the unintentional one got freed but did so by intercepting the free for the end-of-list one. Fruit had similar code which applied to full game save and restore rather than level save and restore so wasn't as noticeable. --- src/restore.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/restore.c b/src/restore.c index c4c725b2c..6aae06343 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 restore.c $NHDT-Date: 1561485720 2019/06/25 18:02:00 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.131 $ */ +/* NetHack 3.6 restore.c $NHDT-Date: 1575081102 2019/11/30 02:31:42 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.155 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2009. */ /* NetHack may be freely redistributed. See license for details. */ @@ -565,12 +565,11 @@ static struct fruit * loadfruitchn(nhfp) NHFILE *nhfp; { - register struct fruit *flist, *fnext = (struct fruit *) 0; - boolean keepgoing; + register struct fruit *flist, *fnext; flist = 0; - keepgoing = TRUE; - while (fnext = newfruit(), keepgoing) { + for (;;) { + fnext = newfruit(); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t)fnext, sizeof *fnext); if (nhfp->fieldlevel) @@ -579,7 +578,7 @@ NHFILE *nhfp; fnext->nextf = flist; flist = fnext; } else - keepgoing = FALSE; + break; } dealloc_fruit(fnext); return flist; @@ -1227,7 +1226,6 @@ boolean ghostly; int hpid; xchar dlvl; int x, y; - boolean keepgoing; #ifdef TOS short tlev; #endif @@ -1288,7 +1286,8 @@ boolean ghostly; for (c = 0; c < COLNO; ++c) for (r = 0; r < ROWNO; ++r) - sfi_schar(nhfp, &g.lastseentyp[c][r], "lev", "g.lastseentyp", 1); + sfi_schar(nhfp, &g.lastseentyp[c][r], + "lev", "g.lastseentyp", 1); sfi_long(nhfp, &g.omoves, "lev", "timestmp", 1); } @@ -1331,9 +1330,10 @@ boolean ghostly; /* rest_worm(fd); */ /* restore worm information */ rest_worm(nhfp); /* restore worm information */ + g.ftrap = 0; - keepgoing = TRUE; - while (trap = newtrap(), keepgoing) { + for (;;) { + trap = newtrap(); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t)trap, sizeof(struct trap)); if (nhfp->fieldlevel) @@ -1342,9 +1342,10 @@ boolean ghostly; trap->ntrap = g.ftrap; g.ftrap = trap; } else - keepgoing = FALSE; + break; } dealloc_trap(trap); + fobj = restobjchn(nhfp, ghostly, FALSE); find_lev_obj(); /* restobjchn()'s `frozen' argument probably ought to be a callback From 004ac4bb49b12bddda65ac7475814d782a4c1227 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 29 Nov 2019 22:37:30 -0500 Subject: [PATCH 373/529] insert Lua version Instead of the hardcoded value that's in this right at the moment, the intention is to get the Lua version information directly from Lua itself for the insertion. For now, this will have to do. --- src/mdlib.c | 2 +- src/version.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mdlib.c b/src/mdlib.c index 812bc1e73..e252037f1 100644 --- a/src/mdlib.c +++ b/src/mdlib.c @@ -637,7 +637,7 @@ build_options() { static const char *lua_info[] = { "", "NetHack 3.7.* uses the 'Lua' interpreter to process some data:", "", - " About Lua: Copyright (c) 1994-2017 Lua.org, PUC-Rio.", "", + " About Lua:LUAVERSION:: Copyright (c) 1994-2017 Lua.org, PUC-Rio.", "", /* 1 2 3 4 5 6 7 1234567890123456789012345678901234567890123456789012345678901234567890123456 */ diff --git a/src/version.c b/src/version.c index a85867908..c4040c1bc 100644 --- a/src/version.c +++ b/src/version.c @@ -303,6 +303,7 @@ static struct rt_opt { const char *token, *value; } rt_opts[] = { { ":PATMATCH:", regex_id }, + { ":LUAVERSION:", " 5.3.5"}, /* plan is to get this directly from Lua */ }; /* From c9a741ffd32c12eb4b87e4d43cd250da24013887 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 29 Nov 2019 22:40:30 -0500 Subject: [PATCH 374/529] more Windows Makefile adjustments --- sys/winnt/Makefile.msc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index cffd4d044..3bae6668d 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -1062,12 +1062,12 @@ $(O)console.res: $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico #========================================== # Makedefs Stuff #========================================== -$(U)nhsizes.exe: $(O)nhsizes.o +$(U)nhsizes3.exe: $(O)nhsizes3$(HOST).o @echo Linking $(@:\=/) - $(link) $(lflagsBuild) -out:$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o + $(link) $(lflagsBuild) -out:$@ $(O)nhsizes$(HOST).o $(O)panic$(HOST).o $(O)alloc$(HOST).o -$(O)nhsizes$(HOST).o: $(CONFIG_H) nhsizes.c - @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ nhsizes.c +$(O)nhsizes3$(HOST).o: $(CONFIG_H) nhsizes3.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ nhsizes3.c $(U)makedefs.exe: $(MAKEDEFSOBJS) @echo Linking $(@:\=/) @@ -1107,7 +1107,7 @@ $(SRC)\vis_tab.c: $(U)makedefs.exe $(U)uudecode.exe: $(O)uudecode$(HOST).o @echo Linking $(@:\=/) - @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)uudecode.o + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)uudecode$(HOST).o $(O)uudecode$(HOST).o: $(SSYS)\uudecode.c @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c @@ -1283,7 +1283,7 @@ $(SRC)\tile.c: $(U)tilemap.exe $(U)tilemap.exe: $(O)tilemap$(HOST).o @echo Linking $(@:\=/) - @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)tilemap.o + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)tilemap$(HOST).o $(O)tilemap$(HOST).o: $(WSHR)\tilemap.c $(HACK_H) @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ $(WSHR)\tilemap.c @@ -1625,7 +1625,7 @@ $(INCL)\sfproto.h: $(U)readtags.exe $(U)nethack.tags $(U)readtags.exe $(U)readtags.exe: $(O)readtags$(HOST).o - @$(link) $(lflagsBuild) -out:$@ $(O)readtags.o + @$(link) $(lflagsBuild) -out:$@ $(O)readtags$(HOST).o $(O)readtags$(HOST).o: $(U)readtags.c $(U)nethack.tags $(CONFIG_H) $(PATCHLEVEL_H) @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) $(TEMPL) -Fo$@ $(U)readtags.c From 42a13a119835992c4c20e2e9aec928c9df6b0a07 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 11:44:07 -0500 Subject: [PATCH 375/529] has_color() performance fixes Performance profiling showed that multiple strcmpi() calls were occurring each and every time a character was going to the map. This update: - honors the WC_COLOR capability - It allows a window-port to control individual color availability should the window-port wish to do so. - Makes checking on the individual colors for the active window-port is a straightforward table lookup at the CLR_ offset. iflags.use_color remains a master on/off switch for use of color, regardless of the capability compiled into the game (default TRUE). The has_color() routine, which is now a shared routine in src/windows.c, could likely be made into a simple macro to eliminate the function call, but this update does not go that far. This hits a lot of port files due to the window-port interface change, mostly cookie-cutter. --- include/winprocs.h | 1 + src/mapglyph.c | 7 +------ src/options.c | 6 +----- src/windows.c | 28 +++++++++++++++++++++++++++- sys/amiga/winami.c | 8 ++++++-- sys/mac/macwin.c | 4 +++- sys/wince/mswproc.c | 1 + sys/winnt/nttty.c | 2 ++ sys/winnt/stubs.c | 6 ------ win/Qt/qt_win.cpp | 1 + win/Qt4/qt4bind.cpp | 1 + win/X11/winX.c | 1 + win/curses/cursmain.c | 1 + win/gem/wingem.c | 4 +++- win/gnome/gnbind.c | 4 +++- win/share/safeproc.c | 1 + win/tty/termcap.c | 5 ++++- win/tty/wintty.c | 5 +++++ 18 files changed, 62 insertions(+), 24 deletions(-) diff --git a/include/winprocs.h b/include/winprocs.h index cc3b4046c..f68952765 100644 --- a/include/winprocs.h +++ b/include/winprocs.h @@ -14,6 +14,7 @@ struct window_procs { * '+' are reserved for processors. */ unsigned long wincap; /* window port capability options supported */ unsigned long wincap2; /* additional window port capability options */ + boolean has_color[CLR_MAX]; void FDECL((*win_init_nhwindows), (int *, char **)); void NDECL((*win_player_selection)); void NDECL((*win_askname)); diff --git a/src/mapglyph.c b/src/mapglyph.c index 388e318a0..cec7e2e80 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -245,16 +245,11 @@ unsigned mgflags; #ifdef TEXTCOLOR /* Turn off color if no color defined, or rogue level w/o PC graphics. */ if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_color)) - color = NO_COLOR; #endif - + color = NO_COLOR; *ochar = (int) ch; *ospecial = special; -#ifdef TEXTCOLOR *ocolor = color; -#else - nhUse(ocolor); -#endif return idx; } diff --git a/src/options.c b/src/options.c index 77fd14b79..e9071996a 100644 --- a/src/options.c +++ b/src/options.c @@ -106,11 +106,7 @@ static struct Bool_Opt { #endif { "clicklook", &iflags.clicklook, FALSE, SET_IN_GAME }, { "cmdassist", &iflags.cmdassist, TRUE, SET_IN_GAME }, -#if defined(MICRO) || defined(WIN32) || defined(CURSES_GRAPHICS) - { "color", &iflags.wc_color, TRUE, SET_IN_GAME }, /*WC*/ -#else /* systems that support multiple terminals, many monochrome */ - { "color", &iflags.wc_color, FALSE, SET_IN_GAME }, /*WC*/ -#endif + { "color", &iflags.wc_color, TRUE, SET_IN_GAME }, /* on/off: use WC or not */ { "confirm", &flags.confirm, TRUE, SET_IN_GAME }, { "dark_room", &flags.dark_room, TRUE, SET_IN_GAME }, { "eight_bit_tty", &iflags.wc_eight_bit_input, FALSE, SET_IN_GAME }, /*WC*/ diff --git a/src/windows.c b/src/windows.c index 7dac248a0..f310d555f 100644 --- a/src/windows.c +++ b/src/windows.c @@ -525,7 +525,9 @@ static void FDECL(hup_void_fdecl_winid, (winid)); static void FDECL(hup_void_fdecl_constchar_p, (const char *)); static struct window_procs hup_procs = { - "hup", 0L, 0L, hup_init_nhwindows, + "hup", 0L, 0L, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + hup_init_nhwindows, hup_void_ndecl, /* player_selection */ hup_void_ndecl, /* askname */ hup_void_ndecl, /* get_nh_event */ @@ -1373,4 +1375,28 @@ boolean onoff_flag; } } +#ifdef TTY_GRAPHICS +#ifdef TEXTCOLOR +#ifdef TOS +extern const char *hilites[CLR_MAX]; +#else +extern NEARDATA char *hilites[CLR_MAX]; +#endif +#endif +#endif + +int +has_color(color) +int color; +{ + return (iflags.use_color && windowprocs.name + && (windowprocs.wincap & WC_COLOR) && windowprocs.has_color[color] +#ifdef TTY_GRAPHICS +#if defined(TEXTCOLOR) && defined(TERMLIB) && !defined(NO_TERMS) + && (hilites[color] != 0) +#endif +#endif + ); +} + /*windows.c*/ diff --git a/sys/amiga/winami.c b/sys/amiga/winami.c index cd1854eb8..d445be286 100644 --- a/sys/amiga/winami.c +++ b/sys/amiga/winami.c @@ -28,7 +28,9 @@ long amii_scrnmode; * the intuition interface for the amiga... */ struct window_procs amii_procs = { - "amii", WC_COLOR | WC_HILITE_PET | WC_INVERSE, 0L, amii_init_nhwindows, + "amii", WC_COLOR | WC_HILITE_PET | WC_INVERSE, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + 0L, amii_init_nhwindows, amii_player_selection, amii_askname, amii_get_nh_event, amii_exit_nhwindows, amii_suspend_nhwindows, amii_resume_nhwindows, amii_create_nhwindow, amii_clear_nhwindow, amii_display_nhwindow, @@ -60,7 +62,9 @@ struct window_procs amii_procs = { * a shared library to allow the executable to be smaller. */ struct window_procs amiv_procs = { - "amitile", WC_COLOR | WC_HILITE_PET | WC_INVERSE, 0L, amii_init_nhwindows, + "amitile", WC_COLOR | WC_HILITE_PET | WC_INVERSE, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + 0L, amii_init_nhwindows, amii_player_selection, amii_askname, amii_get_nh_event, amii_exit_nhwindows, amii_suspend_nhwindows, amii_resume_nhwindows, amii_create_nhwindow, amii_clear_nhwindow, amii_display_nhwindow, diff --git a/sys/mac/macwin.c b/sys/mac/macwin.c index 210b13994..aec93d0b0 100644 --- a/sys/mac/macwin.c +++ b/sys/mac/macwin.c @@ -3251,7 +3251,9 @@ struct window_procs mac_procs = { WC_COLOR | WC_HILITE_PET | WC_FONT_MAP | WC_FONT_MENU | WC_FONT_MESSAGE | WC_FONT_STATUS | WC_FONT_TEXT | WC_FONTSIZ_MAP | WC_FONTSIZ_MENU | WC_FONTSIZ_MESSAGE | WC_FONTSIZ_STATUS | WC_FONTSIZ_TEXT, - 0L, mac_init_nhwindows, + 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + mac_init_nhwindows, mac_unimplemented, /* see macmenu.c:mac_askname() for player selection */ mac_askname, mac_get_nh_event, mac_exit_nhwindows, mac_suspend_nhwindows, mac_unimplemented, mac_create_nhwindow, mac_clear_nhwindow, diff --git a/sys/wince/mswproc.c b/sys/wince/mswproc.c index c140a8b58..acc0ec463 100644 --- a/sys/wince/mswproc.c +++ b/sys/wince/mswproc.c @@ -50,6 +50,7 @@ struct window_procs mswin_procs = { | WC_TILE_WIDTH | WC_TILE_HEIGHT | WC_TILE_FILE | WC_VARY_MSGCOUNT | WC_WINDOWCOLORS | WC_PLAYER_SELECTION, WC2_FULLSCREEN | WC2_SOFTKEYBOARD | WC2_WRAPTEXT, mswin_init_nhwindows, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ mswin_player_selection, mswin_askname, mswin_get_nh_event, mswin_exit_nhwindows, mswin_suspend_nhwindows, mswin_resume_nhwindows, mswin_create_nhwindow, mswin_clear_nhwindow, mswin_display_nhwindow, diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index cd79c1d82..df817e6c9 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -790,6 +790,7 @@ init_ttycolor() } #endif /* TEXTCOLOR */ +#if 0 int has_color(int color) { @@ -803,6 +804,7 @@ has_color(int color) else return 0; } +#endif int term_attr_fixup(int attrmask) diff --git a/sys/winnt/stubs.c b/sys/winnt/stubs.c index fa4a9361c..447b0dabb 100644 --- a/sys/winnt/stubs.c +++ b/sys/winnt/stubs.c @@ -114,12 +114,6 @@ backsp() return; } -int -has_color(int color) -{ - return 1; -} - #ifndef NO_MOUSE_ALLOWED void toggle_mouse_support() diff --git a/win/Qt/qt_win.cpp b/win/Qt/qt_win.cpp index ca2e59343..6d560f1ce 100644 --- a/win/Qt/qt_win.cpp +++ b/win/Qt/qt_win.cpp @@ -5229,6 +5229,7 @@ struct window_procs Qt_procs = { WC_FONT_MAP|WC_TILE_FILE|WC_TILE_WIDTH|WC_TILE_HEIGHT| WC_PLAYER_SELECTION|WC_SPLASH_SCREEN, 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ NetHackQtBind::qt_init_nhwindows, NetHackQtBind::qt_player_selection, NetHackQtBind::qt_askname, diff --git a/win/Qt4/qt4bind.cpp b/win/Qt4/qt4bind.cpp index b143b8e8d..86358d1de 100644 --- a/win/Qt4/qt4bind.cpp +++ b/win/Qt4/qt4bind.cpp @@ -730,6 +730,7 @@ struct window_procs Qt_procs = { | WC_FONT_MAP | WC_TILE_FILE | WC_TILE_WIDTH | WC_TILE_HEIGHT | WC_PLAYER_SELECTION | WC_SPLASH_SCREEN, 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ nethack_qt4::NetHackQtBind::qt_init_nhwindows, nethack_qt4::NetHackQtBind::qt_player_selection, nethack_qt4::NetHackQtBind::qt_askname, diff --git a/win/X11/winX.c b/win/X11/winX.c index c8af06a90..d5b7d263c 100644 --- a/win/X11/winX.c +++ b/win/X11/winX.c @@ -107,6 +107,7 @@ struct window_procs X11_procs = { WC2_FLUSH_STATUS | WC2_RESET_STATUS | WC2_HILITE_STATUS | #endif 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ X11_init_nhwindows, X11_player_selection, X11_askname, X11_get_nh_event, X11_exit_nhwindows, X11_suspend_nhwindows, X11_resume_nhwindows, X11_create_nhwindow, diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index 447255343..e56f0e3ab 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -51,6 +51,7 @@ struct window_procs curses_procs = { | WC2_FLUSH_STATUS | WC2_TERM_SIZE | WC2_STATUSLINES | WC2_WINDOWBORDERS | WC2_PETATTR | WC2_GUICOLOR | WC2_SUPPRESS_HIST), + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ curses_init_nhwindows, curses_player_selection, curses_askname, diff --git a/win/gem/wingem.c b/win/gem/wingem.c index a83c7760f..ddd5f813c 100644 --- a/win/gem/wingem.c +++ b/win/gem/wingem.c @@ -43,7 +43,9 @@ struct window_procs Gem_procs = { | WC_FONT_TEXT | WC_FONT_MAP | WC_FONTSIZ_MESSAGE | WC_FONTSIZ_STATUS | WC_FONTSIZ_MENU | WC_FONTSIZ_TEXT | WC_FONTSIZ_MAP | WC_TILE_WIDTH | WC_TILE_HEIGHT | WC_TILE_FILE | WC_VARY_MSGCOUNT | WC_ASCII_MAP, - 0L, Gem_init_nhwindows, Gem_player_selection, Gem_askname, + 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + Gem_init_nhwindows, Gem_player_selection, Gem_askname, Gem_get_nh_event, Gem_exit_nhwindows, Gem_suspend_nhwindows, Gem_resume_nhwindows, Gem_create_nhwindow, Gem_clear_nhwindow, Gem_display_nhwindow, Gem_destroy_nhwindow, Gem_curs, Gem_putstr, diff --git a/win/gnome/gnbind.c b/win/gnome/gnbind.c index 43e067891..d23018cd8 100644 --- a/win/gnome/gnbind.c +++ b/win/gnome/gnbind.c @@ -24,7 +24,9 @@ extern NEARDATA winid WIN_STATUS; /* Interface definition, for windows.c */ struct window_procs Gnome_procs = { - "Gnome", WC_COLOR | WC_HILITE_PET | WC_INVERSE, 0L, gnome_init_nhwindows, + "Gnome", WC_COLOR | WC_HILITE_PET | WC_INVERSE, 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + gnome_init_nhwindows, gnome_player_selection, gnome_askname, gnome_get_nh_event, gnome_exit_nhwindows, gnome_suspend_nhwindows, gnome_resume_nhwindows, gnome_create_nhwindow, gnome_clear_nhwindow, gnome_display_nhwindow, diff --git a/win/share/safeproc.c b/win/share/safeproc.c index ab5cb1c5a..b0f75220a 100644 --- a/win/share/safeproc.c +++ b/win/share/safeproc.c @@ -67,6 +67,7 @@ struct window_procs safe_procs = { "safe-startup", 0L, 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ safe_init_nhwindows, safe_player_selection, safe_askname, safe_get_nh_event, safe_exit_nhwindows, safe_suspend_nhwindows, safe_resume_nhwindows, safe_create_nhwindow, safe_clear_nhwindow, safe_display_nhwindow, diff --git a/win/tty/termcap.c b/win/tty/termcap.c index 0e256ee91..4d2ac1f62 100644 --- a/win/tty/termcap.c +++ b/win/tty/termcap.c @@ -1282,6 +1282,9 @@ int color; xputs(hilites[color]); } +#if 0 +/* Replaced by src/windows.c general proc or a macro in 3.6.3 */ + /* not to be confused with has_colors() in unixtty.c */ int has_color(color) @@ -1316,7 +1319,7 @@ int color; return hilites[color] != (char *) 0; #endif } - +#endif /* 0 */ #endif /* TEXTCOLOR */ #endif /* TTY_GRAPHICS && !NO_TERMS */ diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 7c95bfc3f..475767ec4 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -97,6 +97,11 @@ struct window_procs tty_procs = { | WC2_RESET_STATUS #endif | WC2_DARKGRAY | WC2_SUPPRESS_HIST | WC2_STATUSLINES), +#ifdef TEXTCOLOR + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ +#else + {1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1}, +#endif tty_init_nhwindows, tty_player_selection, tty_askname, tty_get_nh_event, tty_exit_nhwindows, tty_suspend_nhwindows, tty_resume_nhwindows, tty_create_nhwindow, tty_clear_nhwindow, tty_display_nhwindow, From 0843c5d9225d43fe99478be33d4b2b2900081243 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 13:35:14 -0500 Subject: [PATCH 376/529] some dead code eliminations and a couple of documentation updates --- doc/fixes36.3 | 5 +++++ doc/window.doc | 4 ++++ sys/winnt/nttty.c | 2 +- win/tty/termcap.c | 38 -------------------------------------- 4 files changed, 10 insertions(+), 39 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 0f584ac0e..8fa4afc0a 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -315,6 +315,11 @@ clairvoyance showed all monsters in range, then after player viewed the map, object at same spot, so skip it for locations where monster refresh is going to immediately redisplay a monster take holes that you avoided into consideration when you're on the brink +update window port spec to include a color-availability table that the window + port can set; merge all has_color() implementations into one central + function in src/windows.c which uses a few data checks only and + elminates multiple string function calls for each map cell update + that were being done in some cases previously unix: fix double DLB definition in linux hints file windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix diff --git a/doc/window.doc b/doc/window.doc index da1790253..3758bf55b 100644 --- a/doc/window.doc +++ b/doc/window.doc @@ -663,6 +663,10 @@ port can access the fields directly. Your window port identifies what options it will react to and support by setting bits in the window_procs wincap mask and/or wincap2 mask. +Your window port can also fill in the color-availability table for +the window port, has_color[CLR_MAX] to flag the colors it supports +1 it does, or 0 it doesn't. [CLR_MAX is 16 as of 3.6.3.] + See section IX for details of where the wincap masks reside. Two things control whether any preference setting appears in the diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index df817e6c9..8a52fb683 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -792,7 +792,7 @@ init_ttycolor() #if 0 int -has_color(int color) +has_color(int color) /* this function is commented out */ { #ifdef TEXTCOLOR if ((color >= 0) && (color < CLR_MAX)) diff --git a/win/tty/termcap.c b/win/tty/termcap.c index 4d2ac1f62..09a0be55e 100644 --- a/win/tty/termcap.c +++ b/win/tty/termcap.c @@ -1282,44 +1282,6 @@ int color; xputs(hilites[color]); } -#if 0 -/* Replaced by src/windows.c general proc or a macro in 3.6.3 */ - -/* not to be confused with has_colors() in unixtty.c */ -int -has_color(color) -int color; -{ -#ifdef X11_GRAPHICS - /* XXX has_color() should be added to windowprocs */ - if (windowprocs.name != NULL && !strcmpi(windowprocs.name, "X11")) - return 1; -#endif -#ifdef GEM_GRAPHICS - /* XXX has_color() should be added to windowprocs */ - if (windowprocs.name != NULL && !strcmpi(windowprocs.name, "Gem")) - return 1; -#endif -#ifdef QT_GRAPHICS - /* XXX has_color() should be added to windowprocs */ - if (windowprocs.name != NULL && !strcmpi(windowprocs.name, "Qt")) - return 1; -#endif -#ifdef CURSES_GRAPHICS - /* XXX has_color() should be added to windowprocs */ - /* iflags.wc_color is set to false and the option disabled if the - terminal cannot display color */ - if (windowprocs.name != NULL && !strcmpi(windowprocs.name, "curses")) - return iflags.wc_color; -#endif -#ifdef AMII_GRAPHICS - /* hilites[] not used */ - return iflags.use_color ? 1 : 0; -#else - return hilites[color] != (char *) 0; -#endif -} -#endif /* 0 */ #endif /* TEXTCOLOR */ #endif /* TTY_GRAPHICS && !NO_TERMS */ From 31cfe76b67f37df3300f839c1e2193530e782a1d Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 15:05:48 -0500 Subject: [PATCH 377/529] build with TEXTCOLOR undef'd turned up a couple of things Also, one more has_color in obsolete sys/mac folder. Adjusted code. --- sys/mac/mttymain.c | 30 ++++++++++++++++++++++++++++++ sys/winnt/nttty.c | 2 -- win/tty/wintty.c | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/sys/mac/mttymain.c b/sys/mac/mttymain.c index 5231e84da..2cd59a9d2 100644 --- a/sys/mac/mttymain.c +++ b/sys/mac/mttymain.c @@ -269,6 +269,33 @@ _mt_init_stuff(void) clear_tty(_mt_window); InitMenuRes(); + + { + /* update the window proc has_color table */ + int i, setting = 0; + Rect r; +// Point p = {0, 0}; + GDHandle gh = (GDHandle) 0; + + if (_mt_in_color) { + GetWindowBounds(_mt_window, kWindowContentRgn, &r); +// SetPortWindowPort(_mt_window); +// LocalToGlobal (&p); +// OffsetRect (&r, p.h, p.v); + gh = GetMaxDevice(&r); + /* > 4 bpp */ + setting = ((*((*gh)->gdPMap))->pixelSize > 4) ? 1 : 0; + } + + for (i = 0; i < CLR_MAX ; ++i) { + tty_procs.has_color[i] = + (i == CLR_BLACK || i == NO_COLOR || i == CLR_WHITE) + ? 1 + : (_mt_in_color && gh) + ? setting + : 0; + } + } } int @@ -302,6 +329,8 @@ getreturn(char *str) (void) tgetch(); } +#if 0 /* this function is commented out */ +/* the tty has_color[] table is filled in during init above */ int has_color(int color) { @@ -327,6 +356,7 @@ has_color(int color) return (*((*gh)->gdPMap))->pixelSize > 4; /* > 4 bpp */ } +#endif void tty_delay_output(void) diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 8a52fb683..88aea5aad 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -715,7 +715,6 @@ tty_delay_output() } } -#ifdef TEXTCOLOR /* * CLR_BLACK 0 * CLR_RED 1 @@ -788,7 +787,6 @@ init_ttycolor() #endif init_ttycolor_completed = TRUE; } -#endif /* TEXTCOLOR */ #if 0 int diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 475767ec4..bcd039a71 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -4311,7 +4311,7 @@ unsigned long *bmarray; the condition where this gets used always has the same value */ #define condcolor(bm,bmarray) NO_COLOR #define term_start_color(color) /*empty*/ -#define term_end_color(color) /*empty*/ +#define term_end_color() /*empty*/ #endif /* TEXTCOLOR */ STATIC_OVL int From e8ef02d59764675e1fed04211f015c292666f905 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 15:27:04 -0500 Subject: [PATCH 378/529] one more win_proc --- win/win32/mswproc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 65a729891..f5da7136b 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -90,7 +90,9 @@ struct window_procs mswin_procs = { #ifdef STATUS_HILITES WC2_HITPOINTBAR | WC2_FLUSH_STATUS | WC2_RESET_STATUS | WC2_HILITE_STATUS | #endif - 0L, mswin_init_nhwindows, mswin_player_selection, mswin_askname, + 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + mswin_init_nhwindows, mswin_player_selection, mswin_askname, mswin_get_nh_event, mswin_exit_nhwindows, mswin_suspend_nhwindows, mswin_resume_nhwindows, mswin_create_nhwindow, mswin_clear_nhwindow, mswin_display_nhwindow, mswin_destroy_nhwindow, mswin_curs, mswin_putstr, From d2d2887cbcf5dced13eba8ec84f75a3ff9fa5d1d Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 15:51:58 -0500 Subject: [PATCH 379/529] leave option setting as previous (it was not part of the change) --- src/options.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/options.c b/src/options.c index e9071996a..c1e946ade 100644 --- a/src/options.c +++ b/src/options.c @@ -106,7 +106,11 @@ static struct Bool_Opt { #endif { "clicklook", &iflags.clicklook, FALSE, SET_IN_GAME }, { "cmdassist", &iflags.cmdassist, TRUE, SET_IN_GAME }, +#if defined(MICRO) || defined(WIN32) || defined(CURSES_GRAPHICS) { "color", &iflags.wc_color, TRUE, SET_IN_GAME }, /* on/off: use WC or not */ +#else /* systems that support multiple terminals, many monochrome */ + { "color", &iflags.wc_color, FALSE, SET_IN_GAME }, +#endif { "confirm", &flags.confirm, TRUE, SET_IN_GAME }, { "dark_room", &flags.dark_room, TRUE, SET_IN_GAME }, { "eight_bit_tty", &iflags.wc_eight_bit_input, FALSE, SET_IN_GAME }, /*WC*/ From 7031b6b504ea5771bafee4ac90175898c339f9dd Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 17:23:14 -0500 Subject: [PATCH 380/529] get lua version from lua itself --- include/extern.h | 1 + src/nhlua.c | 22 ++++++++++++++++++++++ src/version.c | 8 ++++++-- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/include/extern.h b/include/extern.h index 9c8de1b74..7e9a62c41 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1692,6 +1692,7 @@ E int FDECL(get_table_boolean_opt, (lua_State *, const char *, int)); E int FDECL(get_table_option, (lua_State *, const char *, const char *, const char *const *)); E int FDECL(str_lines_max_width, (const char *)); E char *FDECL(stripdigits, (char *)); +E const char *NDECL(get_lua_version); #endif /* !CROSSCOMPILE || CROSSCOMPILE_TARGET */ /* ### nhregex.c ### */ diff --git a/src/nhlua.c b/src/nhlua.c index 7c20d9b98..c66cd8039 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -904,3 +904,25 @@ const char *name; return ret; } + +const char * +get_lua_version() +{ + size_t len; + const char *vs = (const char *) 0; + lua_State *L; + + if (g.lua_ver[0] == 0) { + L = nhl_init(); + + if (L) { + lua_getglobal(L, "_VERSION"); + if (lua_isstring(L, -1)) + vs = lua_tolstring (L, -1, &len); + if (vs && (int) len < sizeof g.lua_ver - 1) + Strcpy(g.lua_ver, vs); + } + lua_close(L); + } + return (const char *) g.lua_ver; +} diff --git a/src/version.c b/src/version.c index c4040c1bc..4939f9f14 100644 --- a/src/version.c +++ b/src/version.c @@ -290,6 +290,7 @@ boolean pastebuf; } extern const char regex_id[]; +extern char lua_ver[]; /* nhlua.c */ /* * makedefs should put the first token into dat/options; we'll substitute @@ -303,7 +304,7 @@ static struct rt_opt { const char *token, *value; } rt_opts[] = { { ":PATMATCH:", regex_id }, - { ":LUAVERSION:", " 5.3.5"}, /* plan is to get this directly from Lua */ + { ":LUAVERSION:", (const char *) g.lua_ver + 3 }, /* +3 skip past "Lua" */ }; /* @@ -318,8 +319,11 @@ char *buf; { int i; + if (!g.lua_ver[0]) + get_lua_version(); + for (i = 0; i < SIZE(rt_opts); ++i) { - if (strstri(buf, rt_opts[i].token)) + if (strstri(buf, rt_opts[i].token) && *rt_opts[i].value) (void) strsubst(buf, rt_opts[i].token, rt_opts[i].value); /* we don't break out of the loop after a match; there might be other matches on the same line */ From c5babb0de1f3d535df48a6f0dade3bfae94f94c4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 17:24:11 -0500 Subject: [PATCH 381/529] instance_globals update to include lua_ver storage --- include/decl.h | 5 +++++ src/decl.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/include/decl.h b/include/decl.h index 87ed80edd..0ce8f2cd0 100644 --- a/include/decl.h +++ b/include/decl.h @@ -700,6 +700,8 @@ struct role_filter { #define WIZKIT_MAX 128 #define CVT_BUF_SIZE 64 +#define LUA_VER_BUFSIZ 20 + struct instance_globals { /* apply.c */ @@ -1253,6 +1255,9 @@ struct instance_globals { int poly_zapped; boolean obj_zapped; + /* new stuff */ + char lua_ver[LUA_VER_BUFSIZ]; + unsigned long magic; /* validate that structure layout is preserved */ }; diff --git a/src/decl.c b/src/decl.c index d5ba98d92..28c3e1c75 100644 --- a/src/decl.c +++ b/src/decl.c @@ -691,6 +691,9 @@ const struct instance_globals g_init = { UNDEFINED_VALUE, /* poly_zap */ UNDEFINED_VALUE, /* obj_zapped */ + /* new */ + DUMMY, /* lua_ver[LUA_VER_BUFSIZ] */ + IVMAGIC /* used to validate that structure layout has been preserved */ }; From 719ca3003e285a5a1798894a2852f2bd17fa43ed Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 17:34:10 -0500 Subject: [PATCH 382/529] remove variable left over from earlier testing --- src/version.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/version.c b/src/version.c index 4939f9f14..9a4691983 100644 --- a/src/version.c +++ b/src/version.c @@ -290,7 +290,6 @@ boolean pastebuf; } extern const char regex_id[]; -extern char lua_ver[]; /* nhlua.c */ /* * makedefs should put the first token into dat/options; we'll substitute From 2a2021d5e49d73329bbe59f9eccdb77b35ddbf8f Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 18:43:57 -0500 Subject: [PATCH 383/529] use the copyright statement provided by the Lua distribution in lua.h --- include/decl.h | 2 ++ src/decl.c | 1 + src/mdlib.c | 2 +- src/nhlua.c | 4 ++++ src/version.c | 8 ++++++-- 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/include/decl.h b/include/decl.h index 0ce8f2cd0..ce0ecabe8 100644 --- a/include/decl.h +++ b/include/decl.h @@ -701,6 +701,7 @@ struct role_filter { #define CVT_BUF_SIZE 64 #define LUA_VER_BUFSIZ 20 +#define LUA_COPYRIGHT_BUFSIZ 120 struct instance_globals { @@ -1257,6 +1258,7 @@ struct instance_globals { /* new stuff */ char lua_ver[LUA_VER_BUFSIZ]; + char lua_copyright[LUA_COPYRIGHT_BUFSIZ]; unsigned long magic; /* validate that structure layout is preserved */ }; diff --git a/src/decl.c b/src/decl.c index 28c3e1c75..a0c3a9d4a 100644 --- a/src/decl.c +++ b/src/decl.c @@ -693,6 +693,7 @@ const struct instance_globals g_init = { /* new */ DUMMY, /* lua_ver[LUA_VER_BUFSIZ] */ + DUMMY, /* lua_copyright[LUA_COPYRIGHT_BUFSIZ] */ IVMAGIC /* used to validate that structure layout has been preserved */ }; diff --git a/src/mdlib.c b/src/mdlib.c index e252037f1..c73fc11b9 100644 --- a/src/mdlib.c +++ b/src/mdlib.c @@ -637,7 +637,7 @@ build_options() { static const char *lua_info[] = { "", "NetHack 3.7.* uses the 'Lua' interpreter to process some data:", "", - " About Lua:LUAVERSION:: Copyright (c) 1994-2017 Lua.org, PUC-Rio.", "", + " :LUACOPYRIGHT:", "", /* 1 2 3 4 5 6 7 1234567890123456789012345678901234567890123456789012345678901234567890123456 */ diff --git a/src/nhlua.c b/src/nhlua.c index c66cd8039..867a06590 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -923,6 +923,10 @@ get_lua_version() Strcpy(g.lua_ver, vs); } lua_close(L); +#ifdef LUA_COPYRIGHT + if (sizeof LUA_COPYRIGHT < sizeof g.lua_copyright - 1) + Strcpy(g.lua_copyright, LUA_COPYRIGHT); +#endif } return (const char *) g.lua_ver; } diff --git a/src/version.c b/src/version.c index 9a4691983..4843e3f5d 100644 --- a/src/version.c +++ b/src/version.c @@ -304,6 +304,9 @@ static struct rt_opt { } rt_opts[] = { { ":PATMATCH:", regex_id }, { ":LUAVERSION:", (const char *) g.lua_ver + 3 }, /* +3 skip past "Lua" */ +#ifdef LUA_COPYRIGHT + { ":LUACOPYRIGHT:", (const char *) g.lua_copyright }, +#endif }; /* @@ -320,10 +323,11 @@ char *buf; if (!g.lua_ver[0]) get_lua_version(); - + for (i = 0; i < SIZE(rt_opts); ++i) { - if (strstri(buf, rt_opts[i].token) && *rt_opts[i].value) + if (strstri(buf, rt_opts[i].token) && *rt_opts[i].value) { (void) strsubst(buf, rt_opts[i].token, rt_opts[i].value); + } /* we don't break out of the loop after a match; there might be other matches on the same line */ } From ef59ceaabcd060f63a80fbc14330a882cce2d9fb Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 19:18:00 -0500 Subject: [PATCH 384/529] Makefile.utl bit --- sys/unix/Makefile.utl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl index 3fe09817a..be6299298 100644 --- a/sys/unix/Makefile.utl +++ b/sys/unix/Makefile.utl @@ -97,7 +97,7 @@ NHSROOT=.. #CFLAGS = -O -I../include #LFLAGS = -CFLAGS += -I../lib/lua-5.3.5/src +CFLAGS += -I../lib/lua-$(LUA_VERSION)/src LFLAGS += -lm # we specify C preprocessor flags via CFLAGS; files built with default rules From b7689128e72a0324cc8aa0e4232285921d62add5 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 30 Nov 2019 16:59:35 -0800 Subject: [PATCH 385/529] mdlib.c tweaks Eliminate a couple of warnings about unused static routines. That led to a couple of other things. I hope I got host vs target right in the mdlib.c '#if's. --- src/mdlib.c | 35 ++++++++++++++++++++++------------- src/nhlua.c | 14 ++++++++++---- src/version.c | 6 ++---- util/makedefs.c | 11 ++--------- 4 files changed, 36 insertions(+), 30 deletions(-) diff --git a/src/mdlib.c b/src/mdlib.c index c73fc11b9..54ad8f437 100644 --- a/src/mdlib.c +++ b/src/mdlib.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 mdlib.c $NHDT-Date: 1575076762 2019/11/30 01:19:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $ */ +/* NetHack 3.7 mdlib.c $NHDT-Date: 1575161954 2019/12/01 00:59:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.6 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -47,8 +47,20 @@ #endif #endif /* !MAKEDEFS_C */ -void NDECL(build_options); +#if defined(MAKEDEFS_C) || defined(CROSSCOMPILE_TARGET) +/* REPRODUCIBLE_BUILD will change this to TRUE */ +static boolean date_via_env = FALSE; + +static char *FDECL(version_string, (char *, const char *)); +static char *FDECL(version_id_string, (char *, const char *)); static char *FDECL(bannerc_string, (char *, const char *)); + +static int FDECL(case_insensitive_comp, (const char *, const char *)); +static void NDECL(make_version); +static char *FDECL(eos, (char *)); +#endif /* MAKEDEFS_C || CROSSCOMPILE_TARGET */ + +void NDECL(build_options); static void FDECL(opt_out_words, (char *, int *)); static void NDECL(build_savebones_compat_string); static int idxopttext, done_runtime_opt_init_once = 0; @@ -59,16 +71,6 @@ char optbuf[BUFSZ]; static struct version_info version; static const char opt_indent[] = " "; -#ifndef MAKEDEFS_C -static int FDECL(case_insensitive_comp, (const char *, const char *)); -static void NDECL(make_version); -static char *FDECL(version_id_string, (char *, const char *)); -static char *FDECL(version_string, (char *, const char *)); -static char *FDECL(eos, (char *)); -/* REPRODUCIBLE_BUILD will change this to TRUE */ -static boolean date_via_env = FALSE; -#endif /* !MAKEDEFS_C */ - struct win_info { const char *id, /* DEFAULT_WINDOW_SYS string */ *name; /* description, often same as id */ @@ -220,6 +222,8 @@ make_version() return; } +#if defined(MAKEDEFS_C) || defined(CROSSCOMPILE_TARGET) + static char * version_string(outbuf, delim) char *outbuf; @@ -262,6 +266,8 @@ const char *build_date; return outbuf; } +/* still within #if MAKDEFS_C || CROSSCOMPILE_TARGET */ + static char * bannerc_string(outbuf, build_date) char *outbuf; @@ -293,6 +299,8 @@ const char *build_date; return outbuf; } +#endif /* MAKEDEFS_C || CROSSCOMPILE_TARGET */ + static int case_insensitive_comp(s1, s2) const char *s1; @@ -653,7 +661,8 @@ build_options() (const char *) 0 }; - /* add lua copyright notice */ + /* add lua copyright notice; + ":TAG:" substitutions are deferred to caller */ for (i = 0; lua_info[i]; ++i) { opttext[idxopttext] = strdup(lua_info[i]); if (idxopttext < (MAXOPT - 1)) diff --git a/src/nhlua.c b/src/nhlua.c index 867a06590..eb8a0af9c 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 nhlua.c $NHDT-Date: 1575071986 2019/11/29 23:59:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */ +/* NetHack 3.6 nhlua.c $NHDT-Date: 1575161963 2019/12/01 00:59:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.15 $ */ /* Copyright (c) 2018 by Pasi Kallinen */ /* NetHack may be freely redistributed. See license for details. */ @@ -815,7 +815,7 @@ const char *fname; dlb_fseek(fh, 0L, SEEK_END); buflen = dlb_ftell(fh); - buf = (char *) alloc(sizeof(char) * (buflen + 1)); + buf = (char *) alloc(buflen + 1); dlb_fseek(fh, 0L, SEEK_SET); if ((cnt = dlb_fread(buf, 1, buflen, fh)) != buflen) { @@ -919,12 +919,18 @@ get_lua_version() lua_getglobal(L, "_VERSION"); if (lua_isstring(L, -1)) vs = lua_tolstring (L, -1, &len); - if (vs && (int) len < sizeof g.lua_ver - 1) + if (vs && len < sizeof g.lua_ver) { + if (!strncmpi(vs, "Lua", 3)) { + vs += 3; + if (*vs == '-') + vs += 1; + } Strcpy(g.lua_ver, vs); + } } lua_close(L); #ifdef LUA_COPYRIGHT - if (sizeof LUA_COPYRIGHT < sizeof g.lua_copyright - 1) + if (sizeof LUA_COPYRIGHT <= sizeof g.lua_copyright) Strcpy(g.lua_copyright, LUA_COPYRIGHT); #endif } diff --git a/src/version.c b/src/version.c index 4843e3f5d..03ebbb60d 100644 --- a/src/version.c +++ b/src/version.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 version.c $NHDT-Date: 1575076767 2019/11/30 01:19:27 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.63 $ */ +/* NetHack 3.6 version.c $NHDT-Date: 1575161965 2019/12/01 00:59:25 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.69 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -303,10 +303,8 @@ static struct rt_opt { const char *token, *value; } rt_opts[] = { { ":PATMATCH:", regex_id }, - { ":LUAVERSION:", (const char *) g.lua_ver + 3 }, /* +3 skip past "Lua" */ -#ifdef LUA_COPYRIGHT + { ":LUAVERSION:", (const char *) g.lua_ver }, { ":LUACOPYRIGHT:", (const char *) g.lua_copyright }, -#endif }; /* diff --git a/util/makedefs.c b/util/makedefs.c index e9f55f8fc..9df5ec3e4 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 makedefs.c $NHDT-Date: 1575076769 2019/11/30 01:19:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.167 $ */ +/* NetHack 3.6 makedefs.c $NHDT-Date: 1575161967 2019/12/01 00:59:27 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.168 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -216,14 +216,7 @@ extern unsigned _stklen = STKSIZ; * information for the target environment during the game compile portion * under the cross-compiler and/or at runtime in some cases. */ -/* These actually reside in src/mdlib.c */ -static int FDECL(case_insensitive_comp, (const char *, const char *)); -static void NDECL(make_version); -static char *FDECL(version_id_string, (char *, const char *)); -static char *FDECL(version_string, (char *, const char *)); -static char *FDECL(eos, (char *)); -/* REPRODUCIBLE_BUILD will change this to TRUE */ -static boolean date_via_env = FALSE; + #include "../src/mdlib.c" #ifdef MACsansMPWTOOL From 34979460744b8f97646b87115baa9770b9d1ebf8 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 22:20:03 -0500 Subject: [PATCH 386/529] yet-another has_color --- sys/msdos/video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/msdos/video.c b/sys/msdos/video.c index 1429ade16..2076c3489 100644 --- a/sys/msdos/video.c +++ b/sys/msdos/video.c @@ -227,6 +227,7 @@ register int col, row; } } +#if 0 int has_color(int color) { @@ -237,6 +238,7 @@ has_color(int color) return 0; #endif } +#endif void home() From 8f069744144b47bc293b362845a119ca9fb8a27a Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 30 Nov 2019 20:19:10 -0800 Subject: [PATCH 387/529] fix #H9479 - worn dented pot can't be taken off Taking off no-delay helmets, gloves, and boots were unintentionally taking off suit instead and stayed worn themselves. As far as I saw, only helmet types "fedora" and "dented pot" were applicable; all gloves and boots have a small multi-turn delay. This was an unintended side-effect of the first "slippery gloves" commit so happened about three weeks ago. --- doc/fixes36.3 | 4 +++- src/do_wear.c | 49 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 8fa4afc0a..375c2497c 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.192 $ $NHDT-Date: 1574882658 2019/11/27 19:24:18 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.197 $ $NHDT-Date: 1575173931 2019/12/01 04:18:51 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -320,6 +320,8 @@ update window port spec to include a color-availability table that the window function in src/windows.c which uses a few data checks only and elminates multiple string function calls for each map cell update that were being done in some cases previously +taking off a fedora or dented pot (no-delay helmets) left the helmet stuck + and took off hero's suit unix: fix double DLB definition in linux hints file windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix diff --git a/src/do_wear.c b/src/do_wear.c index 15959738d..afbb98fae 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_wear.c $NHDT-Date: 1574638390 2019/11/24 23:33:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.114 $ */ +/* NetHack 3.6 do_wear.c $NHDT-Date: 1575173934 2019/12/01 04:18:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.115 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1577,28 +1577,46 @@ int armoroff(otmp) struct obj *otmp; { - register int delay = -objects[otmp->otyp].oc_delay; + static char offdelaybuf[60]; + int delay = -objects[otmp->otyp].oc_delay; + const char *what = 0; if (cursed(otmp)) return 0; + /* this used to make assumptions about which types of armor had + delays and which didn't; now both are handled for all types */ if (delay) { nomul(delay); multi_reason = "disrobing"; if (is_helmet(otmp)) { /* ick... */ - nomovemsg = !strcmp(helm_simple_name(otmp), "hat") - ? "You finish taking off your hat." - : "You finish taking off your helmet."; + what = helm_simple_name(otmp); afternmv = Helmet_off; } else if (is_gloves(otmp)) { - nomovemsg = "You finish taking off your gloves."; + what = gloves_simple_name(otmp); afternmv = Gloves_off; } else if (is_boots(otmp)) { - nomovemsg = "You finish taking off your boots."; + what = c_boots; afternmv = Boots_off; - } else { - nomovemsg = "You finish taking off your suit."; + } else if (is_suit(otmp)) { + what = suit_simple_name(otmp); afternmv = Armor_off; + } else if (is_cloak(otmp)) { + what = cloak_simple_name(otmp); + afternmv = Cloak_off; + } else if (is_shield(otmp)) { + what = c_shield; + afternmv = Shield_off; + } else if (is_shirt(otmp)) { + what = c_shirt; + afternmv = Shirt_off; + } else { + impossible("Taking off unknown armor (%d: %d), delay %d", + otmp->otyp, objects[otmp->otyp].oc_armcat, delay); + } + if (what) { + Sprintf(offdelaybuf, "You finish taking off your %s.", what); + nomovemsg = offdelaybuf; } } else { /* Be warned! We want off_msg after removing the item to @@ -1622,8 +1640,19 @@ struct obj *otmp; (void) Cloak_off(); else if (is_shield(otmp)) (void) Shield_off(); - else + else if (is_helmet(otmp)) + (void) Helmet_off(); + else if (is_gloves(otmp)) + (void) Gloves_off(); + else if (is_boots(otmp)) + (void) Boots_off(); + else if (is_shirt(otmp)) + (void) Shirt_off(); + else if (is_suit(otmp)) (void) Armor_off(); + else + impossible("Taking off unknown armor (%d: %d), no delay", + otmp->otyp, objects[otmp->otyp].oc_armcat); off_msg(otmp); } context.takeoff.mask = context.takeoff.what = 0L; From 689039b9d7f0f95ce488d6d67273c934014e750d Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 23:52:39 -0500 Subject: [PATCH 388/529] Merge branch 'NetHack-3.6' part 2 --- src/do_wear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/do_wear.c b/src/do_wear.c index 3a2309507..7373a4f50 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1612,7 +1612,7 @@ struct obj *otmp; } if (what) { Sprintf(offdelaybuf, "You finish taking off your %s.", what); - nomovemsg = offdelaybuf; + g.nomovemsg = offdelaybuf; } } else { /* Be warned! We want off_msg after removing the item to From 839597eb5937d21e0d2cec9bd70e22815ed61e58 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 1 Dec 2019 07:38:01 -0800 Subject: [PATCH 389/529] comment bit 'ick' comment was from there were multiple "You finish taking off..," strings that only varied by one word. That was replaced last night. --- src/do_wear.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/do_wear.c b/src/do_wear.c index afbb98fae..b48c69dcf 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_wear.c $NHDT-Date: 1575173934 2019/12/01 04:18:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.115 $ */ +/* NetHack 3.6 do_wear.c $NHDT-Date: 1575214670 2019/12/01 15:37:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.116 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1589,7 +1589,6 @@ struct obj *otmp; nomul(delay); multi_reason = "disrobing"; if (is_helmet(otmp)) { - /* ick... */ what = helm_simple_name(otmp); afternmv = Helmet_off; } else if (is_gloves(otmp)) { From d2d40289e69e89129b899ee7444ae2bd5fbeaa12 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 1 Dec 2019 19:07:28 -0500 Subject: [PATCH 390/529] update and/or clarify some version references --- doc/Guidebook.mn | 6 +++--- doc/Guidebook.tex | 4 ++-- include/config.h | 4 ++-- src/attrib.c | 4 ++-- src/cmd.c | 4 ++-- src/detect.c | 4 ++-- src/do.c | 4 ++-- src/dokick.c | 4 ++-- src/end.c | 4 ++-- src/invent.c | 6 +++--- src/mhitu.c | 6 +++--- src/minion.c | 4 ++-- src/monmove.c | 4 ++-- src/objnam.c | 4 ++-- src/options.c | 6 +++--- src/restore.c | 4 ++-- src/steed.c | 4 ++-- src/teleport.c | 4 ++-- src/u_init.c | 4 ++-- src/windows.c | 4 ++-- sys/amiga/.gitattributes | 2 +- sys/atari/.gitattributes | 2 +- sys/be/.gitattributes | 2 +- sys/msdos/.gitattributes | 2 +- sys/os2/.gitattributes | 2 +- sys/share/.gitattributes | 10 +++++----- sys/unix/README.linux | 10 +++++----- sys/unix/sysconf | 4 ++-- sys/vms/Install.vms | 4 ++-- sys/wince/.gitattributes | 2 +- sys/wince/ceinc/.gitattributes | 2 +- sys/wince/winhack.rc | 12 ++++++------ sys/wince/winhcksp.rc | 12 ++++++------ sys/winnt/Install.nt | 19 +++++++++---------- sys/winnt/console.rc | 12 ++++++------ sys/winnt/nethack.def | 2 +- sys/winnt/sysconf.template | 2 +- win/gem/.gitattributes | 2 +- win/gnome/.gitattributes | 2 +- win/macosx/NetHackGuidebook.applescript | 2 +- win/macosx/NetHackTerm.applescript | 2 +- win/tty/wintty.c | 4 ++-- win/win32/mswproc.c | 4 ++-- 43 files changed, 102 insertions(+), 103 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 5bf417b7a..7d6d3afd2 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.333 $ $NHDT-Date: 1574900824 2019/11/28 00:27:04 $ +.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.334 $ $NHDT-Date: 1575245028 2019/12/02 00:03:48 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "November 27, 2019 +.ds f2 "December 1, 2019 . .\" A note on some special characters: .\" \(lq = left double quote @@ -4796,7 +4796,7 @@ if your game is compiled with DUMPLOG. Allows the following placeholders: .PL %% literal \(oq\f(CR%\fP\(cq .PL %v -version (eg. \(lq\f(CR3.6.2\-0\fP\(rq) +version (eg. \(lq\f(CR3.6.3\-0\fP\(rq) .PL %u game UID .PL %t diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 8a37b106f..7532786ed 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{November 27, 2019} +\date{December 1, 2019} \maketitle @@ -5304,7 +5304,7 @@ if your game is compiled with DUMPLOG. Allows the following placeholders: %.sd %.si {\tt \%\%} --- literal `{\tt \%}'\\ -{\tt \%v} --- version (eg. ``{\tt 3.6.2-0}'')\\ +{\tt \%v} --- version (eg. ``{\tt 3.6.3-0}'')\\ {\tt \%u} --- game UID\\ {\tt \%t} --- game start time, UNIX timestamp format\\ {\tt \%T} --- current time, UNIX timestamp format\\ diff --git a/include/config.h b/include/config.h index d12576f9d..b606b5db1 100644 --- a/include/config.h +++ b/include/config.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 config.h $NHDT-Date: 1559601008 2019/06/03 22:30:08 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.123 $ */ +/* NetHack 3.6 config.h $NHDT-Date: 1575245033 2019/12/02 00:03:53 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.126 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2016. */ /* NetHack may be freely redistributed. See license for details. */ @@ -554,7 +554,7 @@ typedef unsigned char uchar; #define DUMPLOG_FILE "/tmp/nethack.%n.%d.log" /* DUMPLOG_FILE allows following placeholders: %% literal '%' - %v version (eg. "3.6.2-0") + %v version (eg. "3.6.3-0") %u game UID %t game start time, UNIX timestamp format %T current time, UNIX timestamp format diff --git a/src/attrib.c b/src/attrib.c index 25d57a24c..028eebf83 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 attrib.c $NHDT-Date: 1553363417 2019/03/23 17:50:17 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.65 $ */ +/* NetHack 3.6 attrib.c $NHDT-Date: 1575245050 2019/12/02 00:04:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.66 $ */ /* Copyright 1988, 1989, 1990, 1992, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ @@ -147,7 +147,7 @@ int msgflg; /* positive => no message, zero => message, and */ * taken below the minimum, reduce max value (peak reached) * instead. That means that restore ability and repeated * applications of unicorn horn will not be able to recover - * all the lost value. Starting will 3.6.2, we only take away + * all the lost value. As of 3.6.2, we only take away * some (average half, possibly zero) of the excess from max * instead of all of it, but without intervening recovery, it * can still eventually drop to the minimum allowed. After diff --git a/src/cmd.c b/src/cmd.c index dca4c54ea..6b285240d 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1573346187 2019/11/10 00:36:27 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.349 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1575245052 2019/12/02 00:04:12 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.350 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1944,7 +1944,7 @@ int final; enlght_out(buf); } - /* 3.6.2: dungeon level, so that ^X really has all status info as + /* As of 3.6.2: dungeon level, so that ^X really has all status info as claimed by the comment below; this reveals more information than the basic status display, but that's one of the purposes of ^X; similar information is revealed by #overview; the "You died in diff --git a/src/detect.c b/src/detect.c index 574a85b7b..dfac26a76 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 detect.c $NHDT-Date: 1574882659 2019/11/27 19:24:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.99 $ */ +/* NetHack 3.6 detect.c $NHDT-Date: 1575245054 2019/12/02 00:04:14 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.100 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1336,7 +1336,7 @@ struct obj *sobj; /* scroll--actually fake spellbook--object */ * Unlike when casting the spell, it is much too intrustive when * in the midst of walking around or combatting monsters. * - * For 3.6.2, show terrain, then object, then monster like regular + * As of 3.6.2, show terrain, then object, then monster like regular * map updating, except in this case the map locations get marked * as seen from every direction rather than just from direction of * hero. Skilled spell marks revealed objects as 'seen up close' diff --git a/src/do.c b/src/do.c index 4ea785133..f27d82e6a 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do.c $NHDT-Date: 1575056306 2019/11/29 19:38:26 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.195 $ */ +/* NetHack 3.6 do.c $NHDT-Date: 1575245055 2019/12/02 00:04:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.196 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -167,7 +167,7 @@ const char *verb; since trapped target is a sitting duck */ int damage, dieroll = 1; - /* 3.6.2: this was calling hmon() unconditionally + /* As of 3.6.2: this was calling hmon() unconditionally so always credited/blamed the hero but the boulder might have been thrown by a giant or launched by a rolling boulder trap triggered by a monster or diff --git a/src/dokick.c b/src/dokick.c index d70b2e504..e86a313ec 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 dokick.c $NHDT-Date: 1562462061 2019/07/07 01:14:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.133 $ */ +/* NetHack 3.6 dokick.c $NHDT-Date: 1575245057 2019/12/02 00:04:17 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.136 $ */ /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1763,7 +1763,7 @@ long num; Strcpy(obuf, optr); if (num) { /* means: other objects are impacted */ - /* 3.6.2: use a separate buffer for the suffix to avoid risk of + /* As of 3.6.2: use a separate buffer for the suffix to avoid risk of overrunning obuf[] (let pline() handle truncation if necessary) */ Sprintf(xbuf, " %s %s object%s", otense(otmp, "hit"), (num == 1L) ? "another" : "other", (num > 1L) ? "s" : ""); diff --git a/src/end.c b/src/end.c index f3d4a5bda..fd00aa2ec 100644 --- a/src/end.c +++ b/src/end.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 end.c $NHDT-Date: 1573869062 2019/11/16 01:51:02 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.180 $ */ +/* NetHack 3.6 end.c $NHDT-Date: 1575245059 2019/12/02 00:04:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.181 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -969,7 +969,7 @@ int size; /* max value is less than 20 */ #if 0 /* * odds_and_ends() was used for 3.6.0 and 3.6.1. - * Schroedinger's Cat is handled differently starting with 3.6.2. + * Schroedinger's Cat is handled differently as of 3.6.2. */ STATIC_DCL boolean FDECL(odds_and_ends, (struct obj *, int)); diff --git a/src/invent.c b/src/invent.c index 5cb094bcc..7e7e3b218 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 invent.c $NHDT-Date: 1573346190 2019/11/10 00:36:30 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.266 $ */ +/* NetHack 3.6 invent.c $NHDT-Date: 1575245062 2019/12/02 00:04:22 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.267 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -471,8 +471,8 @@ const genericptr vptr2; * (fragile) or by avoiding sortloot() during inventory display * (more robust). * - * 3.6.2 reverts to the temporary array of ordered obj pointers - * but has sortloot() do the counting and allocation. Callers + * As of 3.6.2: revert to the temporary array of ordered obj pointers + * but have sortloot() do the counting and allocation. Callers * need to use array traversal instead of linked list traversal * and need to free the temporary array when done. And the * array contains 'struct sortloot_item' (aka 'Loot') entries diff --git a/src/mhitu.c b/src/mhitu.c index f14ddbb63..849ddb148 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mhitu.c $NHDT-Date: 1573688693 2019/11/13 23:44:53 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.167 $ */ +/* NetHack 3.6 mhitu.c $NHDT-Date: 1575245065 2019/12/02 00:04:25 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.168 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1402,7 +1402,7 @@ register struct attack *mattk; (Teleport_control && !Stunned && !unconscious()) ? "" : "very "); tele(); - /* 3.6.2: make sure damage isn't fatal; previously, it + /* As of 3.6.2: make sure damage isn't fatal; previously, it was possible to be teleported and then drop dead at the destination when QM's 1d4 damage gets applied below; even though that wasn't "wrong", it seemed strange, @@ -2019,7 +2019,7 @@ struct attack *mattk; is_animal(mtmp->data) ? "regurgitates" : "expels"); expels(mtmp, mtmp->data, FALSE); } else if (!u.uswldtim || youmonst.data->msize >= MZ_HUGE) { - /* 3.6.2: u.uswldtim used to be set to 0 by life-saving but it + /* As of 3.6.2: u.uswldtim used to be set to 0 by life-saving but it expels now so the !u.uswldtim case is no longer possible; however, polymorphing into a huge form while already swallowed is still possible */ diff --git a/src/minion.c b/src/minion.c index e752ddbce..bdeed7aa0 100644 --- a/src/minion.c +++ b/src/minion.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 minion.c $NHDT-Date: 1572530226 2019/10/31 13:57:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.43 $ */ +/* NetHack 3.6 minion.c $NHDT-Date: 1575245071 2019/12/02 00:04:31 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.44 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -405,7 +405,7 @@ aligntyp atyp; /* A_NONE is used for 'any alignment' */ struct permonst *ptr; /* - * 3.6.2: [fix #H2204, 22-Dec-2010, eight years later...] + * As of 3.6.2: [fix #H2204, 22-Dec-2010, eight years later...] * pick a correctly aligned demon in one try. This used to * use mkclass() to choose a random demon type and keep trying * (up to 20 times) until it got one with the desired alignment. diff --git a/src/monmove.c b/src/monmove.c index 35a57e504..cd6ca98bb 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 monmove.c $NHDT-Date: 1574530078 2019/11/23 17:27:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.115 $ */ +/* NetHack 3.6 monmove.c $NHDT-Date: 1575245074 2019/12/02 00:04:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.116 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1396,7 +1396,7 @@ register int after; add_damage(mtmp->mx, mtmp->my, 0L); } } else if (levl[mtmp->mx][mtmp->my].typ == IRONBARS) { - /* 3.6.2: was using may_dig() but it doesn't handle bars */ + /* As of 3.6.2: was using may_dig() but it doesn't handle bars */ if (!(levl[mtmp->mx][mtmp->my].wall_info & W_NONDIGGABLE) && (dmgtype(ptr, AD_RUST) || dmgtype(ptr, AD_CORR))) { if (canseemon(mtmp)) diff --git a/src/objnam.c b/src/objnam.c index 9bc9148b4..e54b20732 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 objnam.c $NHDT-Date: 1573290418 2019/11/09 09:06:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.248 $ */ +/* NetHack 3.6 objnam.c $NHDT-Date: 1575245076 2019/12/02 00:04:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.255 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -435,7 +435,7 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */ buf = nextobuf() + PREFIX; /* leave room for "17 -3 " */ if (Role_if(PM_SAMURAI) && Japanese_item_name(typ)) actualn = Japanese_item_name(typ); - /* 3.6.2: this used to be part of 'dn's initialization, but it + /* As of 3.6.2: this used to be part of 'dn's initialization, but it needs to come after possibly overriding 'actualn' */ if (!dn) dn = actualn; diff --git a/src/options.c b/src/options.c index c1e946ade..19f189813 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1574900826 2019/11/28 00:27:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.388 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1575245078 2019/12/02 00:04:38 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.391 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -178,7 +178,7 @@ static struct Bool_Opt { #else { "page_wait", (boolean *) 0, FALSE, SET_IN_FILE }, #endif - /* 3.6.2: move perm_invent from flags to iflags and out of save file */ + /* moved perm_invent from flags to iflags and out of save file in 3.6.2 */ { "perm_invent", &iflags.perm_invent, FALSE, SET_IN_GAME }, { "pickup_thrown", &flags.pickup_thrown, TRUE, SET_IN_GAME }, { "popup_dialog", &iflags.wc_popup_dialog, FALSE, SET_IN_GAME }, /*WC*/ @@ -2620,7 +2620,7 @@ boolean tinitial, tfrom_file; } if (!op) return FALSE; - /* 3.6.2: strip leading and trailing spaces, condense internal ones */ + /* stripped leading and trailing spaces, condensed internal ones in 3.6.2 */ mungspaces(op); if (!initial) { struct fruit *f; diff --git a/src/restore.c b/src/restore.c index b6126a227..8c8703ba8 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 restore.c $NHDT-Date: 1561485720 2019/06/25 18:02:00 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.131 $ */ +/* NetHack 3.6 restore.c $NHDT-Date: 1575245087 2019/12/02 00:04:47 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.136 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2009. */ /* NetHack may be freely redistributed. See license for details. */ @@ -309,7 +309,7 @@ boolean ghostly, frozen; /* * TODO: Remove this after 3.6.x save compatibility is dropped. * - * For 3.6.2, SchroedingersBox() always has a cat corpse in it. + * As of 3.6.2, SchroedingersBox() always has a cat corpse in it. * For 3.6.[01], it was empty and its weight was falsified * to have the value it would have had if there was one inside. * Put a non-rotting cat corpse in this box to convert to 3.6.2. diff --git a/src/steed.c b/src/steed.c index 2f09e5896..9de2935f1 100644 --- a/src/steed.c +++ b/src/steed.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 steed.c $NHDT-Date: 1573940541 2019/11/16 21:42:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.67 $ */ +/* NetHack 3.6 steed.c $NHDT-Date: 1575245090 2019/12/02 00:04:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.68 $ */ /* Copyright (c) Kevin Hugo, 1998-1999. */ /* NetHack may be freely redistributed. See license for details. */ @@ -245,7 +245,7 @@ boolean force; /* Quietly force this animal */ } if (mtmp->data == &mons[PM_LONG_WORM] && (u.ux + u.dx != mtmp->mx || u.uy + u.dy != mtmp->my)) { - /* 3.6.2: test_move(below) is used to check for trying to mount + /* As of 3.6.2: test_move(below) is used to check for trying to mount diagonally into or out of a doorway or through a tight squeeze; attempting to mount a tail segment when hero was not adjacent to worm's head could trigger an impossible() in worm_cross() diff --git a/src/teleport.c b/src/teleport.c index 1e51ab1be..ab1e67c65 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 teleport.c $NHDT-Date: 1570227405 2019/10/04 22:16:45 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.93 $ */ +/* NetHack 3.6 teleport.c $NHDT-Date: 1575245091 2019/12/02 00:04:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.94 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -690,7 +690,7 @@ boolean break_the_rules; /* True: wizard mode ^T */ if (!Teleportation || (u.ulevel < (Role_if(PM_WIZARD) ? 8 : 12) && !can_teleport(youmonst.data))) { /* Try to use teleport away spell. - 3.6.2: this used to require that you know the spellbook + Prior to 3.6.2 this used to require that you know the spellbook (probably just intended as an optimization to skip the lookup loop) but it is possible to know and cast a spell after forgetting its book due to amnesia. */ diff --git a/src/u_init.c b/src/u_init.c index 5b5c5113f..77e7445c1 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 u_init.c $NHDT-Date: 1539510426 2018/10/14 09:47:06 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.43 $ */ +/* NetHack 3.6 u_init.c $NHDT-Date: 1575245094 2019/12/02 00:04:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.60 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2017. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1114,7 +1114,7 @@ register struct trobj *trop; if (obj->oclass == ARMOR_CLASS) { if (is_shield(obj) && !uarms && !(uwep && bimanual(uwep))) { setworn(obj, W_ARMS); - /* 3.6.2: this used to unset uswapwep if it was set, but + /* Prior to 3.6.2 this used to unset uswapwep if it was set, but wearing a shield doesn't prevent having an alternate weapon ready to swap with the primary; just make sure we aren't two-weaponing (academic; no one starts that way) */ diff --git a/src/windows.c b/src/windows.c index f310d555f..0f0ccb4ed 100644 --- a/src/windows.c +++ b/src/windows.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 windows.c $NHDT-Date: 1573869064 2019/11/16 01:51:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.58 $ */ +/* NetHack 3.6 windows.c $NHDT-Date: 1575245096 2019/12/02 00:04:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.60 $ */ /* Copyright (c) D. Cohrs, 1993. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1157,7 +1157,7 @@ boolean fullsubs; /* True -> full substitution for file name, False -> else Strcpy(tmpbuf, "{current date+time}"); break; - case 'v': /* version, eg. "3.6.2-0" */ + case 'v': /* version, eg. "3.6.3-0" */ Sprintf(tmpbuf, "%s", version_string(verbuf)); break; case 'u': /* UID */ diff --git a/sys/amiga/.gitattributes b/sys/amiga/.gitattributes index 732c6177e..5df6a5f30 100644 --- a/sys/amiga/.gitattributes +++ b/sys/amiga/.gitattributes @@ -1,2 +1,2 @@ *.p NHSUBST -* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.3) diff --git a/sys/atari/.gitattributes b/sys/atari/.gitattributes index dea950a06..66c510f6c 100644 --- a/sys/atari/.gitattributes +++ b/sys/atari/.gitattributes @@ -1 +1 @@ -* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.3) diff --git a/sys/be/.gitattributes b/sys/be/.gitattributes index 76f62f434..9d9a35874 100644 --- a/sys/be/.gitattributes +++ b/sys/be/.gitattributes @@ -1 +1 @@ -* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.3) diff --git a/sys/msdos/.gitattributes b/sys/msdos/.gitattributes index f24897760..77cd3847b 100644 --- a/sys/msdos/.gitattributes +++ b/sys/msdos/.gitattributes @@ -4,6 +4,6 @@ Makefile.* NHSUBST Install.* NHSUBST moveinit.pat NH_header=no vesa.h NH_header=no -* NH_filestag=(file%s_for_MSDOS_version_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_MSDOS_version_-_tested_for_3.6.3_via_cross-compile_only) nhico.uu NH_filestag=(file%s_for_running_MSDOS_binary_under_Windows) nhpif.uu NH_filestag=>nhico.uu diff --git a/sys/os2/.gitattributes b/sys/os2/.gitattributes index 9a0ea4eb3..0537d04f5 100644 --- a/sys/os2/.gitattributes +++ b/sys/os2/.gitattributes @@ -1,2 +1,2 @@ Makefile.* NHSUBST -* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.3) diff --git a/sys/share/.gitattributes b/sys/share/.gitattributes index 6169bc89e..a34fbc350 100644 --- a/sys/share/.gitattributes +++ b/sys/share/.gitattributes @@ -5,16 +5,16 @@ dgn_comp.h NH_header=no lev_comp.h NH_header=no Makefile.lib NH_header=no -Makefile.lib NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.2) -#termcap.uu NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.2) +Makefile.lib NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.3) +#termcap.uu NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.3) termcap.uu NH_filestag=>Makefile.lib -pcmain.c NH_filestag=(file_for_MSDOS,_OS/2,_Amiga,_and_Atari_versions_-_untested_for_3.6.2) +pcmain.c NH_filestag=(file_for_MSDOS,_OS/2,_Amiga,_and_Atari_versions_-_untested_for_3.6.3) -pcsys.c NH_filestag=(file%s_for_MSDOS,_OS/2_and_Atari_versions_-_untested_for_3.6.2) +pcsys.c NH_filestag=(file%s_for_MSDOS,_OS/2_and_Atari_versions_-_tested_on_MSDOS_for_3.6.3_via_cross-compile_only) pcunix.c NH_filestag=>pcsys.c -NetHack.cnf NH_filestag=(file_for_MSDOS,_OS/2,_and_Atari_versions_-_untested_for_3.6.2) +NetHack.cnf NH_filestag=(file_for_MSDOS,_OS/2,_and_Atari_versions_-_untested_for_3.6.3) pctty.c NH_filestag=>NetHack.cnf ioctl.c NH_filestag=(file%s_for_UNIX_and_Be_versions) diff --git a/sys/unix/README.linux b/sys/unix/README.linux index 64c73674c..b98d4cc7c 100644 --- a/sys/unix/README.linux +++ b/sys/unix/README.linux @@ -1,6 +1,6 @@ NetHack 3.6.0 Linux Elf -$NHDT-Date: 1524684188 2018/04/25 19:23:08 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.22 $ +$NHDT-Date: 1575245121 2019/12/02 00:05:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.25 $ This README provides the instructions for using the official Linux binary, system platform requirements, as well as steps used to create that binary. @@ -26,10 +26,10 @@ home directory you might perform these steps. If you have old record and logfile entries from a previous NetHack version, you might want to save copies before they get overwritten by the new empty -files; old saved games and bones files from 3.6.0 and 3.6.1 should work -with 3.6.2 but even older saved games and bones files from 3.4.3 will not. -If you are installing from the RPM, there is no need to save the old record -and logfile; they are automatically preserved. +files; old saved games and bones files from 3.6.0 through to 3.6.2 should +work with 3.6.3 but even older saved games and bones files from 3.4.3 will +not. If you are installing from the RPM, there is no need to save the old +record and logfile; they are automatically preserved. In addition to data files for running the game, you will find other useful things in /usr/games/lib/nethackdir (such as a copy of this README :-). diff --git a/sys/unix/sysconf b/sys/unix/sysconf index 856d36b18..7a5c8a1c4 100644 --- a/sys/unix/sysconf +++ b/sys/unix/sysconf @@ -1,4 +1,4 @@ -# NetHack 3.6 sysconf $NHDT-Date: 1573943504 2019/11/16 22:31:44 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.31 $ +# NetHack 3.6 sysconf $NHDT-Date: 1575245127 2019/12/02 00:05:27 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.32 $ # Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland # NetHack may be freely redistributed. See license for details. # @@ -95,7 +95,7 @@ MAXPLAYERS=10 # Only available if NetHack was compiled with DUMPLOG # Allows following placeholders: # %% literal '%' -# %v version (eg. "3.6.2-0") +# %v version (eg. "3.6.3-0") # %u game UID # %t game start time, UNIX timestamp format # %T current time, UNIX timestamp format diff --git a/sys/vms/Install.vms b/sys/vms/Install.vms index 993ad4f50..8c4bb2ee2 100644 --- a/sys/vms/Install.vms +++ b/sys/vms/Install.vms @@ -147,7 +147,7 @@ Notes: 1. Save files and bones files from 3.4.x and earlier versions will not work with 3.6.3, but save files and bones file from 3.6.0, - 3.6.1, and 3.6.2 should work. The scoreboard file (RECORD) from 3.6.x + through 3.6.2 should work. The scoreboard file (RECORD) from 3.6.x or 3.4.x or 3.3.x will work. 2. To specify user-preference options in your environment, define the @@ -507,6 +507,6 @@ Notes: minimally updated 9-NOV-2015... and again 5-MAY-2019... -# NetHack 3.6 Install.vms $NHDT-Date: 1557701510 2019/05/12 22:51:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.15 $ +# NetHack 3.6 Install.vms $NHDT-Date: 1575245132 2019/12/02 00:05:32 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.16 $ # Copyright (c) 2003 by Robert Patrick Rankin # NetHack may be freely redistributed. See license for details. diff --git a/sys/wince/.gitattributes b/sys/wince/.gitattributes index b3d2a6646..8e28791ce 100644 --- a/sys/wince/.gitattributes +++ b/sys/wince/.gitattributes @@ -1,4 +1,4 @@ *.ce NHSUBST *.mak NHSUBST *.bat NHSUBST -* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.3) diff --git a/sys/wince/ceinc/.gitattributes b/sys/wince/ceinc/.gitattributes index 1763a5005..8e72b80f0 100644 --- a/sys/wince/ceinc/.gitattributes +++ b/sys/wince/ceinc/.gitattributes @@ -1 +1 @@ -* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2) +* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.3) diff --git a/sys/wince/winhack.rc b/sys/wince/winhack.rc index 10a0a03f5..c85fdec67 100644 --- a/sys/wince/winhack.rc +++ b/sys/wince/winhack.rc @@ -284,8 +284,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,1,0 - PRODUCTVERSION 3,6,2,0 + FILEVERSION 3,6,3,0 + PRODUCTVERSION 3,6,3,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x9L @@ -300,17 +300,17 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "NetHack 3.6.2 for Windows CE\0" + VALUE "Comments", "NetHack 3.6.3 for Windows CE\0" VALUE "CompanyName", " \0" VALUE "FileDescription", "nethackm\0" - VALUE "FileVersion", "3, 6, 2, 0\0" + VALUE "FileVersion", "3, 6, 3, 0\0" VALUE "InternalName", "nethackm\0" - VALUE "LegalCopyright", "Copyright © 1985-2018\0" + VALUE "LegalCopyright", "Copyright © 1985-2019\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "nethackm.exe\0" VALUE "PrivateBuild", "090914\0" VALUE "ProductName", "NetHack\0" - VALUE "ProductVersion", "3, 6, 2, 0\0" + VALUE "ProductVersion", "3, 6, 3, 0\0" VALUE "SpecialBuild", "\0" END END diff --git a/sys/wince/winhcksp.rc b/sys/wince/winhcksp.rc index 2ac6e1710..04f7aec40 100644 --- a/sys/wince/winhcksp.rc +++ b/sys/wince/winhcksp.rc @@ -260,8 +260,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,1,0 - PRODUCTVERSION 3,6,1,0 + FILEVERSION 3,6,3,0 + PRODUCTVERSION 3,6,3,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x9L @@ -276,17 +276,17 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "NetHack 3.6.2 for Smartphone 2002\0" + VALUE "Comments", "NetHack 3.6.3 for Smartphone 2002\0" VALUE "CompanyName", " \0" VALUE "FileDescription", "nethackm\0" - VALUE "FileVersion", "3, 6, 2, 0\0" + VALUE "FileVersion", "3, 6, 3, 0\0" VALUE "InternalName", "nethackm\0" - VALUE "LegalCopyright", "Copyright © 1985-2018\0" + VALUE "LegalCopyright", "Copyright © 1985-2019\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "nethackm.exe\0" VALUE "PrivateBuild", "090914\0" VALUE "ProductName", "NetHack For Smartphone\0" - VALUE "ProductVersion", "3, 6, 2, 0\0" + VALUE "ProductVersion", "3, 6, 3, 0\0" VALUE "SpecialBuild", "\0" END END diff --git a/sys/winnt/Install.nt b/sys/winnt/Install.nt index 48c2dddd4..5b87226c1 100644 --- a/sys/winnt/Install.nt +++ b/sys/winnt/Install.nt @@ -5,7 +5,7 @@ NetHack 3.6 on a Windows system (Windows 7/8.x/10 or later only) ============================================================== - Last revision: $NHDT-Date: 1554784481 2019/04/09 04:34:41 $ + Last revision: $NHDT-Date: 1575245156 2019/12/02 00:05:56 $ Credit for the porting of NetHack to the Win32 Console Subsystem goes to the NT Porting Team started by Michael Allison. @@ -16,7 +16,7 @@ contributed the port. Alex Kompel, Dion Nicolaas, Yitzhak Sapir, Derek S. Ray, Michael Allison, Pasi Kallinen, Bart House, and Janet Walz contributed to the maintainance -of the tty and graphical windows versions of NetHack 3.6.2. +of the tty and graphical windows versions of NetHack 3.6.3. You can build a TTY version of NetHack and a Windows Graphical version. You can use one of the following build environments: @@ -93,11 +93,10 @@ using. Change to the directory win\win32\vs2017 and run "build.bat". * Optional curses window-port support * -Starting with 3.6.2, the community patch for a window-port that uses -curses was incorporated into the NetHack source code tree. That window-port, -which evolved from work originally done by Karl Garrison, has been used in -several NetHack variants and on nethack.alt.org and on -www.hardfought.org/nethack/. +Since 3.6.2, the community patch for a window-port that uses curses has been +incorporated into the NetHack source code tree. That window-port, which +evolved from work originally done by Karl Garrison, has been used in several +NetHack variants and on nethack.alt.org and on www.hardfought.org/nethack/. If you want to include the curses window-port support in your Visual Studio build, you will have to first obtain the PDCurses sources from @@ -152,7 +151,7 @@ a 32-bit x86 version, or a 64-bit x64 version. The default Makefile is set up for a 32-bit x86 version, but that's only because it will run on the most number of existing Windows environments. -NetHack's save files and bones files in the 3.6.2 release have not yet +NetHack's save files and bones files in the 3.6.3 release have not yet evolved enough to allow them to interchange between the 32-bit version and the 64-bit version (or between different platforms). Hopefully that will change in an upcoming release. @@ -204,8 +203,8 @@ Setting Up source tree. cd src -2. Starting with 3.6.2, the community patch for an optional curses - window-port was incorporated into the NetHack source code tree. That +2. Since 3.6.2, the community patch for an optional curses window-port + has been incorporated into the NetHack source code tree. That window-port, which evolved from work originally done by Karl Garrison, has been used in several NetHack variants and on nethack.alt.org and on www.hardfought.org/nethack/. The optional curses window-port is diff --git a/sys/winnt/console.rc b/sys/winnt/console.rc index 0d9733971..427079ede 100644 --- a/sys/winnt/console.rc +++ b/sys/winnt/console.rc @@ -1,4 +1,4 @@ -/* NetHack 3.6 console.rc $NHDT-Date: 1432512793 2015/05/25 00:13:13 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */ +/* NetHack 3.6 console.rc $NHDT-Date: 1575245149 2019/12/02 00:05:49 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.13 $ */ /* Copyright (c) Yitzhak Sapir, 2002. */ /* NetHack may be freely redistributed. See license for details. */ @@ -12,8 +12,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,2,0 - PRODUCTVERSION 3,6,2,0 + FILEVERSION 3,6,3,0 + PRODUCTVERSION 3,6,3,0 FILEFLAGSMASK 0x1fL #ifdef _DEBUG FILEFLAGS 0x9L @@ -29,13 +29,13 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "NetHack for Windows - TTY Interface\0" - VALUE "FileVersion", "3.6.2\0" + VALUE "FileVersion", "3.6.3\0" VALUE "InternalName", "NetHack\0" - VALUE "LegalCopyright", "Copyright (C) 1985 - 2018. By Stichting Mathematisch Centrum and M. Stephenson. See license for details.\0" + VALUE "LegalCopyright", "Copyright (C) 1985 - 2019. By Stichting Mathematisch Centrum and M. Stephenson. See license for details.\0" VALUE "OriginalFilename", "NetHack.exe\0" VALUE "PrivateBuild", "050102\0" VALUE "ProductName", "NetHack\0" - VALUE "ProductVersion", "3.6.2\0" + VALUE "ProductVersion", "3.6.3\0" END END BLOCK "VarFileInfo" diff --git a/sys/winnt/nethack.def b/sys/winnt/nethack.def index 9d3a5cceb..bc08347a1 100644 --- a/sys/winnt/nethack.def +++ b/sys/winnt/nethack.def @@ -1,5 +1,5 @@ NAME NETHACK -DESCRIPTION 'NetHack 3.6.2 for Windows' +DESCRIPTION 'NetHack 3.6.3 for Windows' EXETYPE WINDOWS STUB 'WINSTUB.EXE' CODE PRELOAD MOVEABLE DISCARDABLE diff --git a/sys/winnt/sysconf.template b/sys/winnt/sysconf.template index d77b114a3..fccec7fe6 100644 --- a/sys/winnt/sysconf.template +++ b/sys/winnt/sysconf.template @@ -24,7 +24,7 @@ WIZARDS=* # Only available if NetHack was compiled with DUMPLOG # Allows following placeholders: # %% literal '%' -# %v version (eg. "3.6.2-0") +# %v version (eg. "3.6.3-0") # %u game UID # %t game start time, UNIX timestamp format # %T current time, UNIX timestamp format diff --git a/win/gem/.gitattributes b/win/gem/.gitattributes index 133df44a1..e108c78d7 100644 --- a/win/gem/.gitattributes +++ b/win/gem/.gitattributes @@ -1 +1 @@ -* NH_filestag=(file%s_for_GEM_versions_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_GEM_versions_-_untested_for_3.6.3) diff --git a/win/gnome/.gitattributes b/win/gnome/.gitattributes index b1449f357..013227bc8 100644 --- a/win/gnome/.gitattributes +++ b/win/gnome/.gitattributes @@ -1 +1 @@ -* NH_filestag=(file%s_for_GNOME_versions_-_untested_for_3.6.2) +* NH_filestag=(file%s_for_GNOME_versions_-_untested_for_3.6.3) diff --git a/win/macosx/NetHackGuidebook.applescript b/win/macosx/NetHackGuidebook.applescript index e91d12e03..dd05a3a8f 100644 --- a/win/macosx/NetHackGuidebook.applescript +++ b/win/macosx/NetHackGuidebook.applescript @@ -1,5 +1,5 @@ #!/usr/bin/osascript -# NetHack 3.6.2 NetHackGuidebook.applescript $NHDT-Date: 1524684596 2018/04/25 19:29:56 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.8 $ +# NetHack 3.6.3 NetHackGuidebook.applescript $NHDT-Date: 1575245175 2019/12/02 00:06:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.10 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011 # NetHack may be freely redistributed. See license for details. diff --git a/win/macosx/NetHackTerm.applescript b/win/macosx/NetHackTerm.applescript index a4936d021..7c31b1610 100644 --- a/win/macosx/NetHackTerm.applescript +++ b/win/macosx/NetHackTerm.applescript @@ -1,5 +1,5 @@ #!/usr/bin/osascript -# NetHack 3.6.2 NetHackTerm.applescript $NHDT-Date: 1524684597 2018/04/25 19:29:57 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.8 $ +# NetHack 3.6.3 NetHackTerm.applescript $NHDT-Date: 1575245179 2019/12/02 00:06:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.10 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011 # NetHack may be freely redistributed. See license for details. diff --git a/win/tty/wintty.c b/win/tty/wintty.c index bcd039a71..dd1e34009 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 wintty.c $NHDT-Date: 1571787079 2019/10/22 23:31:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.223 $ */ +/* NetHack 3.6 wintty.c $NHDT-Date: 1575245194 2019/12/02 00:06:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.227 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -3963,7 +3963,7 @@ unsigned long *colormasks; enclev = stat_cap_indx(); break; } - /* 3.6.2 we only render on BL_FLUSH (or BL_RESET) */ + /* As of 3.6.2 we only render on BL_FLUSH (or BL_RESET) */ return; } diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index f5da7136b..324418f0c 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mswproc.c $NHDT-Date: 1545705822 2018/12/25 02:43:42 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.130 $ */ +/* NetHack 3.6 mswproc.c $NHDT-Date: 1575245201 2019/12/02 00:06:41 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.137 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ @@ -2316,7 +2316,7 @@ logDebug(const char *fmt, ...) /* Reading and writing settings from the registry. */ #define CATEGORYKEY "Software" #define COMPANYKEY "NetHack" -#define PRODUCTKEY "NetHack 3.6.2" +#define PRODUCTKEY "NetHack 3.6.3" #define SETTINGSKEY "Settings" #define MAINSHOWSTATEKEY "MainShowState" #define MAINMINXKEY "MainMinX" From 5de24d2a0d8cc7c023420931078b48da0daf268d Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 1 Dec 2019 19:11:12 -0500 Subject: [PATCH 391/529] follow-up bit --- src/minion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/minion.c b/src/minion.c index bdeed7aa0..fa37a5480 100644 --- a/src/minion.c +++ b/src/minion.c @@ -405,7 +405,7 @@ aligntyp atyp; /* A_NONE is used for 'any alignment' */ struct permonst *ptr; /* - * As of 3.6.2: [fix #H2204, 22-Dec-2010, eight years later...] + * 3.6.2: [fixed #H2204, 22-Dec-2010, eight years later...] * pick a correctly aligned demon in one try. This used to * use mkclass() to choose a random demon type and keep trying * (up to 20 times) until it got one with the desired alignment. From 1603267cfa0114ae6853215f819b2d50dd46c1a9 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 1 Dec 2019 16:33:01 -0800 Subject: [PATCH 392/529] lua version bit --- src/nhlua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nhlua.c b/src/nhlua.c index eb8a0af9c..deb5a1782 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 nhlua.c $NHDT-Date: 1575161963 2019/12/01 00:59:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.15 $ */ +/* NetHack 3.6 nhlua.c $NHDT-Date: 1575246766 2019/12/02 00:32:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.16 $ */ /* Copyright (c) 2018 by Pasi Kallinen */ /* NetHack may be freely redistributed. See license for details. */ @@ -922,7 +922,7 @@ get_lua_version() if (vs && len < sizeof g.lua_ver) { if (!strncmpi(vs, "Lua", 3)) { vs += 3; - if (*vs == '-') + if (*vs == '-' || *vs == ' ') vs += 1; } Strcpy(g.lua_ver, vs); From 5e5217aceb68d2dbf584e1d79019ae1859d543d0 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 1 Dec 2019 19:38:47 -0500 Subject: [PATCH 393/529] more versioning bits --- src/nhlsel.c | 2 +- src/nhlua.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nhlsel.c b/src/nhlsel.c index 50e328e8a..6fa291d17 100644 --- a/src/nhlsel.c +++ b/src/nhlsel.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 nhlua.c $NHDT-Date: 1574646948 2019/11/25 01:55:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $ */ +/* NetHack 3.7 nhlua.c $NHDT-Date: 1574646948 2019/11/25 01:55:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $ */ /* Copyright (c) 2018 by Pasi Kallinen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/nhlua.c b/src/nhlua.c index deb5a1782..d573f8db4 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 nhlua.c $NHDT-Date: 1575246766 2019/12/02 00:32:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.16 $ */ +/* NetHack 3.7 nhlua.c $NHDT-Date: 1575246766 2019/12/02 00:32:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.16 $ */ /* Copyright (c) 2018 by Pasi Kallinen */ /* NetHack may be freely redistributed. See license for details. */ From 0db4ddcd5b67d89e538c5e455214562b334f13cd Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 1 Dec 2019 22:25:34 -0500 Subject: [PATCH 394/529] update Cross-compiling text --- Cross-compiling | 198 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 194 insertions(+), 4 deletions(-) diff --git a/Cross-compiling b/Cross-compiling index 757e8df14..034dfd166 100644 --- a/Cross-compiling +++ b/Cross-compiling @@ -1,7 +1,197 @@ -Cross-compiling +Cross-compiling NetHack 3.7 Last edit: December 1, 2019 -Placeholder for keeping cross-compiling notes for NetHack +The NetHack 3.7 build process differs from the build process of previous +versions in some important ways that make it possible to use a cross-compiler +running on one platform (the "host" platform of the build) to produce a binary +NetHack package that can execute on an entirely different platform. + + +----------------------+ + | Why cross-compile? | + +----------------------+ + +By using cross-compilers on host platforms with fast processors, plenty of RAM +and storage resources, and an available cross-compiler, it may be possible to +keep or resurrect a working version of NetHack on platforms that are now too +constrained to carry out the build process natively on the platform any more. + +Some of the constraints in carrying out a native build on the desired target +may include, but not necessarily be limited to, any of the following: + + o Access: Somebody with a working knowledge of the NetHack build process may + not have the desired target build platform available to them. Conversly, + somebody with a keen knowledge of the target platform, and access to it, + may not be all that familiar with the NetHack build process. + + o Resources: Address space limitations, insufficient RAM, low amounts of disk + storage, slow processor performance, may impede the ability to execute the + compile process on the target platform. + + o Compilers: Some of the native compilers on historical platforms may only + support the particular dialect of C that was popular when the platform and + compiler were in their prime. + +Another useful potential result of cross-compiling, is that it paves the way +for carrying out test and production builds of NetHack for multiple target +platforms through automated steps carried out on the host platform(s). + + + +---------------------------------+ + | Building NetHack 3.6 (before) | + +---------------------------------+ + +Very generally, the build of NetHack in past versions required the following +steps to be carried out: + + 1. Compile and link util/makedefs. + 2. Run makedefs repeatedly with different command line options to produce + several output files that are required for: + (a) additional build steps to follow, including some header + files: pm.h, onames.h, date.h. + (b) creation of files, containing information required by, + or about the game during its execution, that are stored in a + portable, platform-independent way, that need to be inserted + into the game package. + (c) creation of files containing information required by, or about + the game during its execution, that are stored in an architecture + and/or platform and/or operating system dependent way, that need + to be inserted into the game package (the quest text format is + one example). + 3. Compile and link the level compiler. This step needs to execute + work-alike tools to lex and yacc, or needs to build pre-built lex and + yacc output (.c, .h files) that are provided in the sys/share part of + the NetHack source code tree. + 4. Execute the level compiler to read dat/*.des files and create + a set of binary output files that are architecture and/or operating + system dependent on the build platform, for use by the game during + its execution. + 5. Compile and link the dungeon compiler. Like the level compiler, this + step needs to execute work-alike tools to lex and yacc, or needs to + build pre-built lex and yacc output (.c, .h files) that are provided + in the sys/share part of the NetHack source code tree. + 6. Execute the dungeon compiler to read dat/dungeon.def and create + a set of binary output files that are architecture and/or operating + system dependent on the build platform, for use by the game during + its execution. + 7. Compile and link several less critical utilities such as uudecode, + tile-generation utilities, and so forth, all of which need to execute + on the build platform during the build process to produce output files + for use during the game, that are reasonably portable (not architecture + and/or operating system dependent; only the output of the utilities + becomes part of the game package, not the executable utilities + themselves. + 8. Compile and link the game itself. + 9. Package the game and its required files including the output from + previous steps 2b, 2c, 4, 6, 7 and 8 above. + +Steps 1, 2a, 2b, 7, and 9 above are not impediments to cross-compiling NetHack. + +Steps 2c, 3, 4, 5, 6 and 8 above are impediments to cross-compiling NetHack. + +That's because the files that those steps produce are very much tied to the +platform where the build of NetHack is being carried out. Variations between +platforms (such as 32-bit vs 64-bit, integer sizes, pointer sizes, processor +byte order, data alignment requirements, struct padding and the way bitfields +are stored) impact the portability of those data files between different +platforms and operating systems. If all those things happen to match, the files +might, just might, be usable across platforms, but the chances are against it, +and that certainly cannot be counted on. + + +--------------------------------------+ + | Building NetHack 3.7 (going forward) | + +--------------------------------------+ + +Again, very generally, the build of NetHack in 3.7 requires the following +steps to be carried out: + + 1. Compile and link util/makedefs. + 2. Run makedefs repeatedly with different command line options to produce + several output files that are required for: + (a) additional build steps to follow, including some header + files: pm.h, onames.h, date.h. + (b) creation of files, containing information required by, + or about the game during its execution, that are stored in a + portable, platform-independent way, that need to be inserted + into the game package. + 3. Compile and link several less critical utilities such as uudecode, + tile-generation utilities, and so forth, all of which need to execute + on the build platform during the build process to produce output files + for use during the game, that are reasonably portable (not architecture + and/or operating system dependent; only the output of the utilities + becomes part of the game package, not the executable utilities + themselves. + 4. Compile and link the game itself. + 5. Package the game and its required files including the output from + previous steps 2b, 2c, 4, 6, 7 and 8 above. + +Step 4 is now the only impediment to cross-compiling NetHack, and is resolved +by executing step 4 using a cross-compiler that runs on the build (host) +platform to produce a resulting binary for the target platform, instead of +executing the native compiler. + + +--------------------------------------------------------+ + | How was the build procedure reduced to those 5 steps ? | + +--------------------------------------------------------+ + +The following are among several design changes planned in NetHack 3.7, +and these specific changes are what altered the build process to make +cross-compiling possible: + + o There is no creation of platform-dependent files, such as the quest + text files, by makedefs during the build process. Instead, the quest + text files have been converted to Lua and are inserted into the game + package for processing by the embedded Lua + during execution of NetHack. + + o There is no build-time level compiler involved. Instead, the level + descriptions have been converted to Lua and are inserted into the game + package for processing by the embeded Lua + during execution of NetHack. + + o There is no build-time dungeon compiler involved. Instead, the dungeon + description has been converted to Lua and is inserted into the game + package for processing by the embeded Lua + during execution of NetHack. + + o Some of the build and option information that was formerly produced + during build time by makedefs, and contained information about the + build-platform specifically, is now produced at runtime within the + game under a cross-compiled build. As such, it now produces information + applicable to the target NetHack environment, not the build environment. + + + +--------------------------------------------------------+ + | How can I help with the cross-compiling initiative? | + +--------------------------------------------------------+ + + o If you have a favourite target platform (let's call it XX-Platform for + example purposes) that you'd like to see NetHack be able to run on, do + some research to find out if a cross-compiler exists that: + - produces output for XX-Platform. + - executes on a platform that you use and love (Linux, Windows, + Mac OS X are some examples of platforms that have cross-compilers + for other targets available) + + Then, make the community, devteam, and so forth aware that you're starting + a cross-compile of NetHack for XX-Platform. You might need to ask some + "starting out" questions initially, and as you get deeper into it, you + might need to ask some tougher questions. + + Perhaps consider forking from NetHack on GitHub, and do the + cross-compiler work there in your fork. Strive to get it to a point where + its ready to play-test on XX-Platform, or perhaps even use an emulator + of XX-Platform if one is available. We live in a time where plenty do. + + Doing your work on a GitHub fork has the following advantages: + - It will make it really simple to integrate your work back into + the NetHack source tree if that's one of your goals. + - It will make it possible and straightforward to merge upstream + NetHack changes into your work for the XX-Platform cross-compile + so that it stays current with the game as it evolves. + - You may get help from others in the form of suggestions, or + pull-requests, or offers to join the development. Chances are, + you aren't the only person out there that would like to + establish/resurrect/maintain NetHack on XX-Platform. + + Have fun! -This file will be updated with more information prior -to release. From 3d484f4d4da616d5db6375b7feb07fb59cb3b987 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 1 Dec 2019 22:31:09 -0500 Subject: [PATCH 395/529] cut-and-paste correction --- Cross-compiling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cross-compiling b/Cross-compiling index 034dfd166..5511813e8 100644 --- a/Cross-compiling +++ b/Cross-compiling @@ -121,7 +121,7 @@ steps to be carried out: themselves. 4. Compile and link the game itself. 5. Package the game and its required files including the output from - previous steps 2b, 2c, 4, 6, 7 and 8 above. + previous steps 2b, 3 and 4 above. Step 4 is now the only impediment to cross-compiling NetHack, and is resolved by executing step 4 using a cross-compiler that runs on the build (host) From 103ad2521db7f71625f84aa68998374e9da8b238 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Mon, 2 Dec 2019 07:21:03 -0500 Subject: [PATCH 396/529] This is cron-daily v1-Dec-1-2019. files updated: Files --- Files | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Files b/Files index 3e137d1fe..4fc47fee8 100644 --- a/Files +++ b/Files @@ -113,7 +113,7 @@ vault.c version.c vision.c weapon.c were.c wield.c windows.c wizard.c worm.c worn.c write.c zap.c sys/amiga: -(files for Amiga versions - untested for 3.6.2) +(files for Amiga versions - untested for 3.6.3) Build.ami Install.ami Makefile.agc Makefile.ami NetHack.cnf amidos.c amidos.p amifont.uu amifont8.uu amigst.c amii.hlp amimenu.c amirip.c amisnd.c amistack.c @@ -124,12 +124,12 @@ winfuncs.c winkey.c winmenu.c winproto.h winreq.c winstr.c xpm2iff.c sys/atari: -(files for Atari version - untested for 3.6.2) +(files for Atari version - untested for 3.6.3) Install.tos atarifnt.uue nethack.mnu setup.g tos.c unx2atar.sed sys/be: -(files for BeOS version - untested for 3.6.2) +(files for BeOS version - untested for 3.6.3) README bemain.c sys/mac: @@ -142,7 +142,7 @@ macwin.c mgetline.c mmodal.c mrecover.c mrecover.hqx mttymain.c sys/msdos: -(files for MSDOS version - untested for 3.6.2) +(files for MSDOS version - tested for 3.6.3 via cross-compile only) Install.dos Makefile.BC Makefile.GCC Makefile.MSC Makefile1.cross Makefile2.cross SCHEMA35.MSC moveinit.pat msdos.c msdoshlp.txt ovlinit.c pckeys.c @@ -155,7 +155,7 @@ vidtxt.c vidvesa.c vidvga.c nhico.uu nhpif.uu sys/os2: -(files for OS/2 version - untested for 3.6.2) +(files for OS/2 version - untested for 3.6.3) Install.os2 Makefile.os2 nhpmico.uu os2.c sys/share: @@ -165,10 +165,10 @@ random.c (Berkeley uudecode file, which may be used in build process of any version) uudecode.c -(file for MSDOS, OS/2, Amiga, and Atari versions - untested for 3.6.2) +(file for MSDOS, OS/2, Amiga, and Atari versions - untested for 3.6.3) pcmain.c -(file for MSDOS, OS/2, and Atari versions - untested for 3.6.2) +(file for MSDOS, OS/2, and Atari versions - untested for 3.6.3) NetHack.cnf pctty.c (file for MSDOS, OS/2, and VMS versions) @@ -180,10 +180,10 @@ nhlan.c (file for VMS version) tclib.c -(files for MSDOS and OS/2 versions - untested for 3.6.2) +(files for MSDOS and OS/2 versions - untested for 3.6.3) Makefile.lib termcap.uu -(files for MSDOS, OS/2 and Atari versions - untested for 3.6.2) +(files for MSDOS, OS/2 and Atari versions - tested on MSDOS for 3.6.3 via cross-compile only) pcsys.c pcunix.c (files for UNIX and Be versions) @@ -253,7 +253,7 @@ spec_lev.com sysconf vmsbuild.com vmsfiles.c vmsmail.c vmsmain.c vmsmisc.c vmstty.c vmsunix.c sys/wince: -(files for Windows CE and PocketPC - untested for 3.6.2) +(files for Windows CE and PocketPC - untested for 3.6.3) Install.ce bootstrp.mak celib.c cesetup.bat cesound.c defaults.nh keypad.uu menubar.uu mhaskyn.c mhaskyn.h mhcmd.c mhcmd.h mhcolor.c mhcolor.h mhdlg.c @@ -266,7 +266,7 @@ resource.h winMS.h winhack.c winhack.rc winhcksp.rc winmain.c sys/wince/ceinc: -(header files for Windows CE and PocketPC - untested for 3.6.2) +(header files for Windows CE and PocketPC - untested for 3.6.3) assert.h errno.h fcntl.h sys/wince/ceinc/sys: @@ -332,12 +332,12 @@ cursinit.h cursinvt.c cursinvt.h cursmain.c cursmesg.c cursmesg.h cursmisc.c cursmisc.h cursstat.c cursstat.h curswins.c curswins.h win/gem: -(files for GEM versions - untested for 3.6.2) +(files for GEM versions - untested for 3.6.3) Install.gem bitmfile.c gem_rsc.uu gem_rso.uu gr_rect.c gr_rect.h load_img.c tile2img.c title.uu wingem.c wingem1.c xpm2img.c win/gnome: -(files for GNOME versions - untested for 3.6.2) +(files for GNOME versions - untested for 3.6.3) README gn_xpms.h gnaskstr.c gnaskstr.h gnbind.c gnbind.h gnglyph.c gnglyph.h gnmain.c gnmain.h gnmap.c gnmap.h gnmenu.c gnmenu.h gnmesg.c gnmesg.h gnomeprv.h gnopts.c From cc6eb75b0accb17ac9b369141c4f639ce8b39180 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 2 Dec 2019 07:55:10 -0500 Subject: [PATCH 397/529] cron-daily updates to NetHack-3.7 --- Files | 34 +++------ doc/Guidebook.txt | 186 +++++++++++++++++++++++----------------------- 2 files changed, 105 insertions(+), 115 deletions(-) diff --git a/Files b/Files index 51cf22e6d..c16972f72 100644 --- a/Files +++ b/Files @@ -99,11 +99,11 @@ mfndpos.h micro.h mkroom.h monattk.h mondata.h monflag.h monst.h monsym.h ntconf.h obj.h objclass.h os2conf.h patchlevel.h pcconf.h permonst.h prop.h qtext.h quest.h rect.h region.h -rm.h skills.h sp_lev.h spell.h sys.h -system.h tcap.h tileset.h timeout.h tosconf.h -tradstdc.h trampoli.h trap.h unixconf.h vision.h -vmsconf.h wceconf.h winami.h wincurs.h winprocs.h -wintype.h you.h youprop.h +rm.h sfprocs.h sfproto.h skills.h sp_lev.h +spell.h sys.h system.h tcap.h tileset.h +timeout.h tosconf.h tradstdc.h trampoli.h trap.h +unixconf.h vision.h vmsconf.h wceconf.h winami.h +wincurs.h winprocs.h wintype.h you.h youprop.h (file for tty versions) wintty.h @@ -139,12 +139,11 @@ sys/amiga: (files for Amiga versions - untested for 3.6.3) Build.ami Install.ami Makefile.agc Makefile.ami NetHack.cnf amidos.c amidos.p amifont.uu amifont8.uu amigst.c -amii.hlp amimenu.c amirip.c amisnd.c amistack.c -amitty.c amiwind.c amiwind.p clipwin.c colorwin.c -cvtsnd.c grave16.xpm ifchange mkdmake txt2iff.c -winami.c winami.p winchar.c windefs.h winext.h -winfuncs.c winkey.c winmenu.c winproto.h winreq.c -winstr.c xpm2iff.c +amii.hlp amimenu.c amirip.c amistack.c amitty.c +amiwind.c amiwind.p clipwin.c colorwin.c grave16.xpm +ifchange mkdmake txt2iff.c winami.c winami.p +winchar.c windefs.h winext.h winfuncs.c winkey.c +winmenu.c winproto.h winreq.c winstr.c xpm2iff.c sys/atari: (files for Atari version - untested for 3.6.3) @@ -160,9 +159,8 @@ sys/mac: Files.r Install.mw MacHelp NHDeflts NHrsrc.hqx NHsound.hqx News README carbon.plist dprintf.c maccurs.c macerrs.c macfile.c machelp.hqx macmain.c -macmenu.c macsnd.c mactopl.c mactty.c macunix.c -macwin.c mgetline.c mmodal.c mrecover.c mrecover.hqx -mttymain.c +macmenu.c mactopl.c mactty.c macunix.c macwin.c +mgetline.c mmodal.c mrecover.c mrecover.hqx mttymain.c sys/msdos: (files for MSDOS version - tested for 3.6.3 via cross-compile only) @@ -224,11 +222,6 @@ cppregex.cpp (pmatch regex for other versions) pmatchregex.c -sys/share/sounds: -(files for Amiga and Macintosh versions) -README bell.uu bugle.uu erthdrum.uu firehorn.uu frsthorn.uu -lethdrum.uu mgcflute.uu mgcharp.uu toolhorn.uu wdnflute.uu wdnharp.uu - sys/unix: (files for UNIX versions) Install.unx Makefile.dat Makefile.doc Makefile.src @@ -240,9 +233,6 @@ unixmain.c unixres.c unixunix.c (files for replacement cpp, only needed by some ancient UNIX systems) cpp1.shr cpp2.shr cpp3.shr -(file for sound driver for 386 UNIX) -snd86unx.shr - sys/unix/NetHack.xcodeproj: (file for UNIX versions) project.pbxproj diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index 3367d3e6f..2259c1293 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -126,7 +126,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -192,7 +192,7 @@ you have seen on the current dungeon level; as you explore more - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -258,7 +258,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -324,7 +324,7 @@ Intelligence affects your ability to cast spells and read - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -456,7 +456,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -588,7 +588,7 @@ symbol at the chosen location, conditionally check for "More - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -720,7 +720,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -786,7 +786,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -852,7 +852,7 @@ once you've closed this menu. The available options are - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -918,7 +918,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -984,7 +984,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1050,7 +1050,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1116,7 +1116,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1248,7 +1248,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1314,7 +1314,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1380,7 +1380,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1446,7 +1446,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1512,7 +1512,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1578,7 +1578,7 @@ When picking a target with cursor and the autodescribe - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1644,7 +1644,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1710,7 +1710,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1776,7 +1776,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1842,7 +1842,7 @@ the `^D' (kick) command. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1908,7 +1908,7 @@ on the corresponding staircase at your destination. However, - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -1974,7 +1974,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2040,7 +2040,7 @@ member a monster but want to try fighting anyway, you can use the - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2106,7 +2106,7 @@ ers (or even former incarnations of yourself!) and their personal - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2172,7 +2172,7 @@ ter. Many commands that operate on objects must ask you to find - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2238,7 +2238,7 @@ In some cases "uncursed" will be omitted as being redundant when - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2304,7 +2304,7 @@ to taking off other worn items. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2370,7 +2370,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2436,7 +2436,7 @@ ondary is just an item in your inventory that's been designated - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2502,7 +2502,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2568,7 +2568,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2634,7 +2634,7 @@ the wall, you might decide to go for broke and break your wand. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2700,7 +2700,7 @@ cation rather than just specify a particular direction. Other - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2766,7 +2766,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2832,7 +2832,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2898,7 +2898,7 @@ brains while polymorphed into a mind flayer, is considered eating - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -2964,7 +2964,7 @@ type ("polypiling") or the form of your own body into another - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3030,7 +3030,7 @@ tion, and are ignored unless a CHOOSE statement was used to - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3096,7 +3096,7 @@ pletion has no effect for the X11 windowport. You can specify - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3162,7 +3162,7 @@ "Configuring User Sounds" section. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3228,7 +3228,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3294,7 +3294,7 @@ tion controls whether the description includes map coordinates. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3360,7 +3360,7 @@ was defined during compilation. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3426,7 +3426,7 @@ display for end-of-game disclosure follows a set sequence. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3492,7 +3492,7 @@ "no", you will exclude that gender from being picked randomly. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3558,7 +3558,7 @@ sistent. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3624,7 +3624,7 @@ fault `\'. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3690,7 +3690,7 @@ Prompt for new form whenever any monster changes shape (default - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3756,7 +3756,7 @@ Valid settings are: - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3822,7 +3822,7 @@ item. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3888,7 +3888,7 @@ (Default `S'). Persistent. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -3954,7 +3954,7 @@ be set with the `O' command. Persistent. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4020,7 +4020,7 @@ off). Persistent. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4086,7 +4086,7 @@ only; "X11" interface always uses a timer based delay. The - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4152,7 +4152,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4218,7 +4218,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4284,7 +4284,7 @@ If NetHack can, it should use this size font for text windows. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4350,7 +4350,7 @@ Number of lines for traditional below-the-map status display. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4416,7 +4416,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4482,7 +4482,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4548,7 +4548,7 @@ terns. This applies to Autopickup exceptions, Message types, Menu - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4614,7 +4614,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4680,7 +4680,7 @@ When asked for a location, the key to go to next closest - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4746,7 +4746,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4812,7 +4812,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4878,7 +4878,7 @@ tty, curses, win32tty and win32gui interfaces support this. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -4944,7 +4944,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5010,7 +5010,7 @@ be used in combination with any of the other attributes. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5076,7 +5076,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5142,7 +5142,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5208,7 +5208,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5274,7 +5274,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5340,7 +5340,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5406,7 +5406,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5472,7 +5472,7 @@ may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5538,7 +5538,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5604,7 +5604,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5640,7 +5640,7 @@ lows the following placeholders: %% - literal `%' - %v - version (eg. "3.6.2-0") + %v - version (eg. "3.6.3-0") %u - game UID %t - game start time, UNIX timestamp format %T - current time, UNIX timestamp format @@ -5670,7 +5670,7 @@ whatever you have. If you quit, you keep all your gold, but if - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5736,7 +5736,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5802,7 +5802,7 @@ NetHack 3.1 to the PC. - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5868,7 +5868,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -5934,7 +5934,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -6000,7 +6000,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -6066,7 +6066,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 @@ -6132,7 +6132,7 @@ - NetHack 3.7 November 27, 2019 + NetHack 3.7 December 1, 2019 From e5dd0e735a8cb1e69a65f32dced91003043119c5 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Mon, 2 Dec 2019 07:21:09 -0500 Subject: [PATCH 398/529] This is cron-daily v1-Dec-1-2019. guidebook updated: doc/Guidebook.txt --- doc/Guidebook.txt | 186 +++++++++++++++++++++++----------------------- 1 file changed, 93 insertions(+), 93 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index e991beead..5518f6899 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -126,7 +126,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -192,7 +192,7 @@ you have seen on the current dungeon level; as you explore more - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -258,7 +258,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -324,7 +324,7 @@ Intelligence affects your ability to cast spells and read - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -456,7 +456,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -588,7 +588,7 @@ symbol at the chosen location, conditionally check for "More - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -720,7 +720,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -786,7 +786,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -852,7 +852,7 @@ once you've closed this menu. The available options are - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -918,7 +918,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -984,7 +984,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1050,7 +1050,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1116,7 +1116,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1248,7 +1248,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1314,7 +1314,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1380,7 +1380,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1446,7 +1446,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1512,7 +1512,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1578,7 +1578,7 @@ When picking a target with cursor and the autodescribe - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1644,7 +1644,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1710,7 +1710,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1776,7 +1776,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1842,7 +1842,7 @@ the `^D' (kick) command. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1908,7 +1908,7 @@ on the corresponding staircase at your destination. However, - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -1974,7 +1974,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2040,7 +2040,7 @@ member a monster but want to try fighting anyway, you can use the - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2106,7 +2106,7 @@ ers (or even former incarnations of yourself!) and their personal - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2172,7 +2172,7 @@ ter. Many commands that operate on objects must ask you to find - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2238,7 +2238,7 @@ In some cases "uncursed" will be omitted as being redundant when - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2304,7 +2304,7 @@ to taking off other worn items. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2370,7 +2370,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2436,7 +2436,7 @@ ondary is just an item in your inventory that's been designated - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2502,7 +2502,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2568,7 +2568,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2634,7 +2634,7 @@ the wall, you might decide to go for broke and break your wand. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2700,7 +2700,7 @@ cation rather than just specify a particular direction. Other - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2766,7 +2766,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2832,7 +2832,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2898,7 +2898,7 @@ brains while polymorphed into a mind flayer, is considered eating - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -2964,7 +2964,7 @@ type ("polypiling") or the form of your own body into another - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3030,7 +3030,7 @@ tion, and are ignored unless a CHOOSE statement was used to - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3096,7 +3096,7 @@ pletion has no effect for the X11 windowport. You can specify - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3162,7 +3162,7 @@ "Configuring User Sounds" section. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3228,7 +3228,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3294,7 +3294,7 @@ tion controls whether the description includes map coordinates. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3360,7 +3360,7 @@ was defined during compilation. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3426,7 +3426,7 @@ display for end-of-game disclosure follows a set sequence. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3492,7 +3492,7 @@ "no", you will exclude that gender from being picked randomly. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3558,7 +3558,7 @@ sistent. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3624,7 +3624,7 @@ fault `\'. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3690,7 +3690,7 @@ Prompt for new form whenever any monster changes shape (default - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3756,7 +3756,7 @@ Valid settings are: - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3822,7 +3822,7 @@ item. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3888,7 +3888,7 @@ (Default `S'). Persistent. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -3954,7 +3954,7 @@ be set with the `O' command. Persistent. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4020,7 +4020,7 @@ off). Persistent. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4086,7 +4086,7 @@ only; "X11" interface always uses a timer based delay. The - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4152,7 +4152,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4218,7 +4218,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4284,7 +4284,7 @@ If NetHack can, it should use this size font for text windows. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4350,7 +4350,7 @@ Number of lines for traditional below-the-map status display. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4416,7 +4416,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4482,7 +4482,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4548,7 +4548,7 @@ pressions. It is possible to compile NetHack without regular - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4614,7 +4614,7 @@ key can be a single character ("x"), a control key ("^X", "C-x"), - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4680,7 +4680,7 @@ When asked for a location, the key to toggle autodescribe. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4746,7 +4746,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4812,7 +4812,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4878,7 +4878,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -4944,7 +4944,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5010,7 +5010,7 @@ cyan, gray, orange, light-green, yellow, light-blue, light- - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5076,7 +5076,7 @@ value changes upwards or downwards. This attribute times - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5142,7 +5142,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5208,7 +5208,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5274,7 +5274,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5340,7 +5340,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5406,7 +5406,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5472,7 +5472,7 @@ may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5538,7 +5538,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5604,7 +5604,7 @@ spectively, to identify unique people for the score file. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5623,7 +5623,7 @@ lows the following placeholders: %% - literal `%' - %v - version (eg. "3.6.2-0") + %v - version (eg. "3.6.3-0") %u - game UID %t - game start time, UNIX timestamp format %T - current time, UNIX timestamp format @@ -5670,7 +5670,7 @@ mode:explore option. The other is to issue the "#exploremode" - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5736,7 +5736,7 @@ incorporating many of the added features, and produced NetHack - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5802,7 +5802,7 @@ forms. - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5868,7 +5868,7 @@ bugs that had been discovered. Despite that constantly growing - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -5934,7 +5934,7 @@ velopment was released publicly by other parties. Since that code - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -6000,7 +6000,7 @@ Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -6066,7 +6066,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 @@ -6132,7 +6132,7 @@ - NetHack 3.6 November 27, 2019 + NetHack 3.6 December 1, 2019 From 5a3b8e7b380e9a7141a6357a34aff20d58c156a2 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 2 Dec 2019 12:05:18 -0500 Subject: [PATCH 399/529] README update Dec 2 --- README | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README b/README index 013a63153..73e872c22 100644 --- a/README +++ b/README @@ -1,12 +1,12 @@ - NetHack 3.6.3 beta1 -- General information + NetHack 3.6.3 post-beta1 -- General information NetHack 3.6 is an enhancement to the dungeon exploration game NetHack, which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.4 as there was no NetHack 3.5 release. -NetHack 3.6.3 beta1 is not an official release of NetHack. It -currently contains a collection of over 150 bug fixes to NetHack 3.6.2 -and more than 16 enhancements and community contributions. The file +NetHack 3.6.3 post-beta1 is not an official release of NetHack. It +currently contains a collection of over 190 bug fixes to NetHack 3.6.2 +and over 22 game enhancements and community contributions. The file doc/fixes36.3 in the source distribution has a full list of them. The text in there was written for the development team's own use and is provided "as is", so please do not ask us to further explain the entries @@ -33,6 +33,7 @@ spoilers: * Fixed ignoring of god's wrath when hero injured himself during altar kick * Fixed several cases where persistent inventory window was not updated * Fixed temple priests or shopkeepers moving over other monsters + * Fixed a crash-causing bug when putting on levitation boots over a sink * Ensured that thrown or kicked objects will end up in bones * Made water go all the way to the edges of level on the Plane of Water * Made clouds disrupt line of sight along the edges of the Plane of Air @@ -42,6 +43,8 @@ spoilers: * the Windows platform * Improved the layout and display of the player selection dialog used on the * Windows graphical implementation + * Improved performance of some tty versions by reducing the number of + * function calls made from mapglyph * Allowed the msdos implementation to build with curses and PDCurses * Over 100 other fixes and improvements @@ -191,6 +194,6 @@ In our own patches, we will assume that your code is synchronized with ours. -- Good luck, and happy Hacking -- -# $NHDT-Date: 1572309271 2019/10/29 00:34:31 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.57 $ +# $NHDT-Date: 1575306309 2019/12/02 17:05:09 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.62 $ # Copyright (c) 2012 by Michael Allison # NetHack may be freely redistributed. See license for details. From 8a7ec78d1743a52a5ce8d3a1efb6fea918c16780 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 2 Dec 2019 22:55:48 -0500 Subject: [PATCH 400/529] add code support to make keypad behave better with swap_yz option This is being committed commented out in include/ntconf.h. --- doc/fixes36.3 | 2 ++ include/ntconf.h | 4 +++- sys/winnt/nh340key.c | 40 ++++++++++++++++++++++++++++++++++++ sys/winnt/nhdefkey.c | 39 +++++++++++++++++++++++++++++++++++ sys/winnt/nhraykey.c | 40 ++++++++++++++++++++++++++++++++++++ sys/winnt/nttty.c | 49 +++++++++++++++++++++++++++++++++++--------- 6 files changed, 163 insertions(+), 11 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 375c2497c..baf32548d 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -325,6 +325,8 @@ taking off a fedora or dented pot (no-delay helmets) left the helmet stuck unix: fix double DLB definition in linux hints file windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix +windows+tty: add code to make keypad support for swap_yz behave (currently + commented out in include/ntconf.h) Platform- and/or Interface-Specific Fixes or Features diff --git a/include/ntconf.h b/include/ntconf.h index a135ee420..ecdf7bc81 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -34,7 +34,9 @@ /*#define CHANGE_COLOR*/ /* allow palette changes */ #define SELECTSAVED /* Provide menu of saved games to choose from at start */ - + +/* #define QWERTZ_SUPPORT */ /* when swap_yz is True, numpad 7 is 'z' not 'y' */ + /* * ----------------------------------------------------------------- * The remaining code shouldn't need modification. diff --git a/sys/winnt/nh340key.c b/sys/winnt/nh340key.c index 78600ec67..a4faa80c1 100644 --- a/sys/winnt/nh340key.c +++ b/sys/winnt/nh340key.c @@ -52,6 +52,13 @@ DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved) #define PADKEYS (KEYPADHI - KEYPADLO + 1) #define iskeypad(x) (KEYPADLO <= (x) && (x) <= KEYPADHI) +#ifdef QWERTZ_SUPPORT +/* when 'numberpad' is 0 and Cmd.swap_yz is True + (signaled by setting 0x10 on boolean numpad argument) + treat keypress of numpad 7 as 'z' rather than 'y' */ +static boolean qwertz = FALSE; +#endif + /* * Keypad keys are translated to the normal values below. * Shifted keypad keys are translated to the @@ -110,6 +117,15 @@ int portdebug; int altseq = 0; const struct pad *kpad; +#ifdef QWERTZ_SUPPORT + if (numberpad & 0x10) { + numberpad &= ~0x10; + qwertz = TRUE; + } else { + qwertz = FALSE; + } +#endif + shiftstate = 0L; ch = pre_ch = ir->Event.KeyEvent.uChar.AsciiChar; scan = ir->Event.KeyEvent.wVirtualScanCode; @@ -149,6 +165,14 @@ int portdebug; } else { ch = kpad[scan - KEYPADLO].normal; } +#ifdef QWERTZ_SUPPORT + /* OPTIONS=number_pad:-1 is for qwertz keyboard; for that setting, + 'numberpad' will be 0; core swaps y to zap, z to move northwest; + we want numpad 7 to move northwest, so when qwertz is set, + tell core that user who types numpad 7 typed z rather than y */ + if (qwertz && kpad[scan - KEYPADLO].normal == 'y') + ch += 1; /* changes y to z, Y to Z, ^Y to ^Z */ +#endif /*QWERTZ_SUPPORT*/ } else if (altseq > 0) { /* ALT sequence */ if (vk == 0xBF) ch = M('?'); @@ -238,6 +262,15 @@ coord *cc; #endif int ch; boolean valid = 0, done = 0; + +#ifdef QWERTZ_SUPPORT + if (numpad & 0x10) { + numpad &= ~0x10; + qwertz = TRUE; + } else { + qwertz = FALSE; + } +#endif while (!done) { #if defined(SAFERHANGUP) dwWait = WaitForSingleObjectEx(hConIn, // event object to wait for @@ -249,7 +282,14 @@ coord *cc; ReadConsoleInput(hConIn, ir, 1, count); if (mode == 0) { if ((ir->EventType == KEY_EVENT) && ir->Event.KeyEvent.bKeyDown) { +#ifdef QWERTZ_SUPPORT + if (qwertz) + numpad |= 0x10; +#endif ch = ProcessKeystroke(hConIn, ir, &valid, numpad, 0); +#ifdef QWERTZ_SUPPORT + numpad &= ~0x10; +#endif done = valid; } } else { diff --git a/sys/winnt/nhdefkey.c b/sys/winnt/nhdefkey.c index f6d110adb..e40cf6a1e 100644 --- a/sys/winnt/nhdefkey.c +++ b/sys/winnt/nhdefkey.c @@ -60,6 +60,13 @@ DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved) #define PADKEYS (KEYPADHI - KEYPADLO + 1) #define iskeypad(x) (KEYPADLO <= (x) && (x) <= KEYPADHI) +#ifdef QWERTZ_SUPPORT +/* when 'numberpad' is 0 and Cmd.swap_yz is True + (signaled by setting 0x10 on boolean numpad argument) + treat keypress of numpad 7 as 'z' rather than 'y' */ +static boolean qwertz = FALSE; +#endif + /* * Keypad keys are translated to the normal values below. * Shifted keypad keys are translated to the @@ -120,6 +127,14 @@ int portdebug; int altseq = 0; const struct pad *kpad; +#ifdef QWERTZ_SUPPORT + if (numberpad & 0x10) { + numberpad &= ~0x10; + qwertz = TRUE; + } else { + qwertz = FALSE; + } +#endif shiftstate = 0L; ch = pre_ch = ir->Event.KeyEvent.uChar.AsciiChar; scan = ir->Event.KeyEvent.wVirtualScanCode; @@ -163,6 +178,14 @@ int portdebug; } else { ch = kpad[scan - KEYPADLO].normal; } +#ifdef QWERTZ_SUPPORT + /* OPTIONS=number_pad:-1 is for qwertz keyboard; for that setting, + 'numberpad' will be 0; core swaps y to zap, z to move northwest; + we want numpad 7 to move northwest, so when qwertz is set, + tell core that user who types numpad 7 typed z rather than y */ + if (qwertz && kpad[scan - KEYPADLO].normal == 'y') + ch += 1; /* changes y to z, Y to Z, ^Y to ^Z */ +#endif /*QWERTZ_SUPPORT*/ } else if (altseq > 0) { /* ALT sequence */ if (vk == 0xBF) ch = M('?'); @@ -271,6 +294,15 @@ coord *cc; #endif int ch; boolean valid = 0, done = 0; + +#ifdef QWERTZ_SUPPORT + if (numpad & 0x10) { + numpad &= ~0x10; + qwertz = TRUE; + } else { + qwertz = FALSE; + } +#endif while (!done) { #if defined(SAFERHANGUP) dwWait = WaitForSingleObjectEx(hConIn, // event object to wait for @@ -289,7 +321,14 @@ coord *cc; if (count > 0) { if (ir->EventType == KEY_EVENT && ir->Event.KeyEvent.bKeyDown) { +#ifdef QWERTZ_SUPPORT + if (qwertz) + numpad |= 0x10; +#endif ch = ProcessKeystroke(hConIn, ir, &valid, numpad, 0); +#ifdef QWERTZ_SUPPORT + numpad &= ~0x10; +#endif if (valid) return ch; } else if (ir->EventType == MOUSE_EVENT) { diff --git a/sys/winnt/nhraykey.c b/sys/winnt/nhraykey.c index aafe9c44c..7ce4e0e50 100644 --- a/sys/winnt/nhraykey.c +++ b/sys/winnt/nhraykey.c @@ -212,6 +212,13 @@ DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved) #define isnumkeypad(x) \ (KEYPADLO <= (x) && (x) <= 0x51 && (x) != 0x4A && (x) != 0x4E) +#ifdef QWERTZ_SUPPORT +/* when 'numberpad' is 0 and Cmd.swap_yz is True + (signaled by setting 0x10 on boolean numpad argument) + treat keypress of numpad 7 as 'z' rather than 'y' */ +static boolean qwertz = FALSE; +#endif + /* * Keypad keys are translated to the normal values below. * Shifted keypad keys are translated to the @@ -301,6 +308,14 @@ int portdebug; const struct pad *kpad; DWORD count; +#ifdef QWERTZ_SUPPORT + if (numberpad & 0x10) { + numberpad &= ~0x10; + qwertz = TRUE; + } else { + qwertz = FALSE; + } +#endif shiftstate = 0L; ch = pre_ch = ir->Event.KeyEvent.uChar.AsciiChar; scan = ir->Event.KeyEvent.wVirtualScanCode; @@ -347,6 +362,14 @@ int portdebug; } else { ch = kpad[scan - KEYPADLO].normal; } +#ifdef QWERTZ_SUPPORT + /* OPTIONS=number_pad:-1 is for qwertz keyboard; for that setting, + 'numberpad' will be 0; core swaps y to zap, z to move northwest; + we want numpad 7 to move northwest, so when qwertz is set, + tell core that user who types numpad 7 typed z rather than y */ + if (qwertz && kpad[scan - KEYPADLO].normal == 'y') + ch += 1; /* changes y to z, Y to Z, ^Y to ^Z */ +#endif /*QWERTZ_SUPPORT*/ } else if (altseq > 0) { /* ALT sequence */ ReadConsoleInput(hConIn, ir, 1, &count); if (vk == 0xBF) @@ -471,6 +494,15 @@ coord *cc; #endif int ch; boolean valid = 0, done = 0; + +#ifdef QWERTZ_SUPPORT + if (numpad & 0x10) { + numpad &= ~0x10; + qwertz = TRUE; + } else { + qwertz = FALSE; + } +#endif while (!done) { *count = 0; dwWait = WaitForSingleObject(hConIn, INFINITE); @@ -490,12 +522,19 @@ coord *cc; if (count > 0) { if (ir->EventType == KEY_EVENT && ir->Event.KeyEvent.bKeyDown) { +#ifdef QWERTZ_SUPPORT + if (qwertz) + numpad |= 0x10; +#endif ch = ProcessKeystroke(hConIn, ir, &valid, numpad, #ifdef PORTDEBUG 1); #else 0); #endif +#ifdef QWERTZ_SUPPORT + numpad &= ~0x10; +#endif if (valid) return ch; } else { @@ -549,6 +588,7 @@ INPUT_RECORD *ir; unsigned char ch; unsigned long shiftstate; int altseq = 0, keycode, vk; + done = 0; retval = 0; while (!done) { diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 88aea5aad..9c96ae8a4 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -13,7 +13,6 @@ * */ - #ifdef WIN32 #define NEED_VARARGS /* Uses ... */ #include "win32api.h" @@ -428,8 +427,17 @@ boolean *valid; boolean numberpad; int portdebug; { - int ch = keyboard_handler.pProcessKeystroke( + int ch; + +#ifdef QWERTZ_SUPPORT + if (Cmd.swap_yz) + numberpad |= 0x10; +#endif + ch = keyboard_handler.pProcessKeystroke( console.hConIn, ir, valid, numberpad, portdebug); +#ifdef QWERTZ_SUPPORT + numberpad &= ~0x10; +#endif /* check for override */ if (ch && ch < MAX_OVERRIDES && key_overrides[ch]) ch = key_overrides[ch]; @@ -448,13 +456,20 @@ tgetch() int mod; coord cc; DWORD count; + boolean numpad = iflags.num_pad; + really_move_cursor(); if (iflags.debug_fuzzer) return randomkey(); +#ifdef QWERTZ_SUPPORT + if (Cmd.swap_yz) + numpad |= 0x10; +#endif + return (program_state.done_hup) ? '\033' : keyboard_handler.pCheckInput( - console.hConIn, &ir, &count, iflags.num_pad, 0, &mod, &cc); + console.hConIn, &ir, &count, numpad, 0, &mod, &cc); } int @@ -464,13 +479,22 @@ int *x, *y, *mod; int ch; coord cc; DWORD count; + boolean numpad = iflags.num_pad; + really_move_cursor(); if (iflags.debug_fuzzer) return randomkey(); +#ifdef QWERTZ_SUPPORT + if (Cmd.swap_yz) + numpad |= 0x10; +#endif ch = (program_state.done_hup) ? '\033' : keyboard_handler.pCheckInput( - console.hConIn, &ir, &count, iflags.num_pad, 1, mod, &cc); + console.hConIn, &ir, &count, numpad, 1, mod, &cc); +#ifdef QWERTZ_SUPPORT + numpad &= ~0x10; +#endif if (!ch) { *x = cc.x; *y = cc.y; @@ -1901,12 +1925,17 @@ void nethack_enter_nttty() HKL keyboard_layout = GetKeyboardLayout(0); DWORD primary_language = (UINT_PTR) keyboard_layout & 0x3f; - if (primary_language == LANG_ENGLISH) { - if (!load_keyboard_handler("nhdefkey")) - error("Unable to load nhdefkey.dll"); - } else { - if (!load_keyboard_handler("nhraykey")) - error("Unable to load nhraykey.dll"); + /* This was overriding the handler that had already + been loaded during options parsing. Needs to + check first */ + if (!iflags.altkeyhandler[0]) { + if (primary_language == LANG_ENGLISH) { + if (!load_keyboard_handler("nhdefkey")) + error("Unable to load nhdefkey.dll"); + } else { + if (!load_keyboard_handler("nhraykey")) + error("Unable to load nhraykey.dll"); + } } } #endif /* TTY_GRAPHICS */ From 2fa1d29100fc7f87c2bdb3cf459b00877d894632 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 2 Dec 2019 23:22:45 -0500 Subject: [PATCH 401/529] uncomment setting in ntconf.h --- include/ntconf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ntconf.h b/include/ntconf.h index f5c4930b7..0a35dd51b 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -33,7 +33,7 @@ /*#define CHANGE_COLOR*/ /* allow palette changes */ #define SELECTSAVED /* Provide menu of saved games to choose from at start */ -/* #define QWERTZ_SUPPORT */ /* when swap_yz is True, numpad 7 is 'z' not 'y' */ +#define QWERTZ_SUPPORT /* when swap_yz is True, numpad 7 is 'z' not 'y' */ /* * ----------------------------------------------------------------- From 5ba08f50d38d67f80432186ed51a8cff3a33b7c4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 2 Dec 2019 23:27:07 -0500 Subject: [PATCH 402/529] Merge branch 'NetHack-3.6' part 2 --- sys/winnt/nttty.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 1c46c8cb2..7a14722ce 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -430,7 +430,7 @@ int portdebug; int ch; #ifdef QWERTZ_SUPPORT - if (Cmd.swap_yz) + if (g.Cmd.swap_yz) numberpad |= 0x10; #endif ch = keyboard_handler.pProcessKeystroke( @@ -462,7 +462,7 @@ tgetch() if (iflags.debug_fuzzer) return randomkey(); #ifdef QWERTZ_SUPPORT - if (Cmd.swap_yz) + if (g.Cmd.swap_yz) numpad |= 0x10; #endif @@ -488,13 +488,11 @@ int *x, *y, *mod; if (poskey == 0) { *x = rn2(console.width); *y = rn2(console.height); - if (poskey == 0) { - *x = rn2(console.width); - *y = rn2(console.height); } + } return poskey; } #ifdef QWERTZ_SUPPORT - if (Cmd.swap_yz) + if (g.Cmd.swap_yz) numpad |= 0x10; #endif ch = (g.program_state.done_hup) From 5c57804a97bda18a5383279161e9163e89fe8054 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 3 Dec 2019 23:32:12 -0500 Subject: [PATCH 403/529] fix self-recover prompting on windows the prompting on Windows wasn't working correctly if a prior game had crashed and the self-recover feature was trying to kick in. This impacts tty, curses, and mswin (GUI). --- doc/fixes36.3 | 1 + include/extern.h | 8 +- sys/winnt/Makefile.msc | 2 +- sys/winnt/nttty.c | 28 ++++- sys/winnt/windmain.c | 239 +++++++++++++++++++++++++++++++---------- win/share/safeproc.c | 2 +- 6 files changed, 216 insertions(+), 64 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index baf32548d..d0b52cd5d 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -327,6 +327,7 @@ windows: fix --showpaths output for the data file which relies on being constructed programmatically to incorporate the version suffix windows+tty: add code to make keypad support for swap_yz behave (currently commented out in include/ntconf.h) +windows: fix self-recover user prompting (tty, curses, mswin) Platform- and/or Interface-Specific Fixes or Features diff --git a/include/extern.h b/include/extern.h index 88f71fed9..0ac10abee 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1823,15 +1823,17 @@ E char *FDECL(dowhatdoes_core, (CHAR_P, char *)); E int NDECL(dohelp); E int NDECL(dohistory); -/* ### pcmain.c ### */ +/* ### xxmain.c ### */ #if defined(MICRO) || defined(WIN32) #ifdef CHDIR E void FDECL(chdirx, (char *, BOOLEAN_P)); #endif /* CHDIR */ E boolean NDECL(authorize_wizard_mode); - #endif /* MICRO || WIN32 */ +#if defined(WIN32) +E int NDECL(getlock); +#endif /* ### pcsys.c ### */ @@ -1869,10 +1871,10 @@ E void FDECL(msleep, (unsigned)); #if defined(MICRO) E void FDECL(regularize, (char *)); -#endif /* MICRO */ #if defined(PC_LOCKING) E void NDECL(getlock); #endif +#endif /* MICRO */ /* ### pickup.c ### */ diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 8e0da5bd4..550c71fc0 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -73,7 +73,7 @@ DEBUGINFO = Y # of your PDCurses C files. # #ADD_CURSES=Y -#PDCURSES_TOP=..\..\pdcurses +#PDCURSES_TOP=..\lib\pdcurses # #============================================================================== # This marks the end of the BUILD DECISIONS section. diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 9c96ae8a4..2760b5493 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -680,13 +680,37 @@ cl_end() void raw_clear_screen() { - buffer_fill_to_end(console.back_buffer, &clear_cell, 0, 0); + if (WINDOWPORT("tty")) { + cell_t * back = console.back_buffer; + cell_t * front = console.front_buffer; + COORD pos; + DWORD unused; + + for (pos.Y = 0; pos.Y < console.height; pos.Y++) { + for (pos.X = 0; pos.X < console.width; pos.X++) { + WriteConsoleOutputAttribute(console.hConOut, &back->attribute, + 1, pos, &unused); + front->attribute = back->attribute; + if (console.has_unicode) { + WriteConsoleOutputCharacterW(console.hConOut, + &back->character, 1, pos, &unused); + } else { + char ch = (char)back->character; + WriteConsoleOutputCharacterA(console.hConOut, &ch, 1, pos, + &unused); + } + *front = *back; + back++; + front++; + } + } + } } void clear_screen() { - raw_clear_screen(); + buffer_fill_to_end(console.back_buffer, &clear_cell, 0, 0); home(); } diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 5fba32d74..332d363dd 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -39,6 +39,13 @@ extern void NDECL(backsp); extern void NDECL(clear_screen); #undef E +#ifdef _MSC_VER +#ifdef kbhit +#undef kbhit +#endif +#include +#endif + #ifdef PC_LOCKING static int NDECL(eraseoldlocks); #endif @@ -50,6 +57,8 @@ char FDECL(windows_yn_function, (const char *, const char *, CHAR_P)); static void FDECL(windows_getlin, (const char *, char *)); extern int NDECL(windows_console_custom_nhgetch); void NDECL(safe_routines); +int NDECL(tty_self_recover_prompt); +int NDECL(other_self_recover_prompt); char orgdir[PATHLEN]; boolean getreturn_enabled; @@ -460,7 +469,8 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ fnamebuf, encodedfnamebuf, BUFSZ); Sprintf(lock, "%s", encodedfnamebuf); /* regularize(lock); */ /* we encode now, rather than substitute */ - getlock(); + if (getlock() == 0) + nethack_exit(EXIT_SUCCESS); /* Set up level 0 file to keep the game state. */ @@ -997,15 +1007,16 @@ eraseoldlocks() return (1); /* success! */ } -void +int getlock() { - register int fd, c, ci, ct, ern; + register int fd, ern, prompt_result = 0; int fcmask = FCMASK; char tbuf[BUFSZ]; const char *fq_lock; #define OOPS_BUFSZ 512 char oops[OOPS_BUFSZ]; + boolean istty = WINDOWPORT("tty"); /* we ignore QUIT and INT at this point */ if (!lock_file(HLOCK, LOCKPREFIX, 10)) { @@ -1050,56 +1061,41 @@ getlock() (void) nhclose(fd); - if (iflags.window_inited || WINDOWPORT("curses")) { -#ifdef SELF_RECOVER - c = yn("There are files from a game in progress under your name. " - "Recover?"); -#else - pline("There is already a game in progress under your name."); - pline("You may be able to use \"recover %s\" to get it back.\n", - tbuf); - c = yn("Do you want to destroy the old game?"); -#endif - } else { - c = 'n'; - ct = 0; -#ifdef SELF_RECOVER - raw_print("There are files from a game in progress under your name. " - "Recover? [yn]"); -#else - raw_print("\nThere is already a game in progress under your name.\n"); - raw_print("If this is unexpected, you may be able to use \n"); - raw_print("\"recover %s\" to get it back.", tbuf); - raw_print("\nDo you want to destroy the old game? [yn] "); -#endif - while ((ci = nhgetch()) != '\n') { - if (ct > 0) { - raw_print("\b \b"); - ct = 0; - c = 'n'; - } - if (ci == 'y' || ci == 'n' || ci == 'Y' || ci == 'N') { - ct = 1; - c = ci; - } - } - } - if (c == 'y' || c == 'Y') -#ifndef SELF_RECOVER - if (eraseoldlocks()) { - if (WINDOWPORT("tty")) - clear_screen(); /* display gets fouled up otherwise */ - goto gotlock; - } else { - unlock_file(HLOCK); -#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS) - chdirx(orgdir, 0); -#endif - raw_print("Couldn't destroy old game."); - } -#else /*SELF_RECOVER*/ + if (WINDOWPORT("tty")) + prompt_result = tty_self_recover_prompt(); + else + prompt_result = other_self_recover_prompt(); + /* + * prompt_result == 1 means recover old game. + * prompt_result == -1 means willfully destroy the old game. + * prompt_result == 0 should just exit. + */ + Sprintf(oops, "You chose to %s.", + (prompt_result == -1) + ? "destroy the old game and start a new one" + : (prompt_result == 1) + ? "recover the old game" + : "not start a new game"); + if (istty) + clear_screen(); + pline(oops); + if (prompt_result == 1) { /* recover */ if (recover_savefile()) { - if (WINDOWPORT("tty")) +#if 0 + if (istty) + clear_screen(); /* display gets fouled up otherwise */ +#endif + goto gotlock; + } else { + unlock_file(HLOCK); +#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS) + chdirx(orgdir, 0); +#endif + raw_print("Couldn't recover the old game."); + } + } else if (prompt_result < 0) { /* destroy old game */ + if (eraseoldlocks()) { + if (istty) clear_screen(); /* display gets fouled up otherwise */ goto gotlock; } else { @@ -1107,16 +1103,15 @@ getlock() #if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS) chdirx(orgdir, 0); #endif - raw_print("Couldn't recover old game."); + raw_print("Couldn't destroy the old game."); + return 0; } -#endif /*SELF_RECOVER*/ - else { + } else { unlock_file(HLOCK); #if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS) chdirx(orgdir, 0); #endif - Sprintf(oops, "%s", "Cannot start a new game."); - raw_print(oops); + return 0; } gotlock: @@ -1147,6 +1142,7 @@ gotlock: error("cannot close lock (%s)", fq_lock); } } + return 1; } #endif /* PC_LOCKING */ @@ -1187,4 +1183,133 @@ const char * b_path; return FALSE; } +/* + * returns: + * 1 if game should be recovered + * -1 if old game should be destroyed, allowing new game to proceed. + */ +int +tty_self_recover_prompt() +{ + register int c, ci, ct, pl, retval = 0; + /* for saving/replacing functions, if needed */ + struct window_procs saved_procs = {0}; + + pl = 1; + c = 'n'; + ct = 0; + saved_procs = windowprocs; + safe_routines(); + raw_print("\n"); + raw_print("\n"); + raw_print("\n"); + raw_print("\n"); + raw_print("\n"); + raw_print("There are files from a game in progress under your name. "); + raw_print("Recover? [yn] "); + + tty_ask_again: + + while ((ci = nhgetch()) && !(ci == '\n' || ci == 13)) { + if (ct > 0) { + /* invalid answer */ + raw_print("\b \b"); + ct = 0; + c = 'n'; + } + if (ci == 'y' || ci == 'n' || ci == 'Y' || ci == 'N') { + ct = 1; + c = ci; +#ifdef _MSC_VER + _putch(ci); +#endif + } + } + + if (pl == 1 && (c == 'n' || c == 'N')) { + /* no to recover */ + raw_print("\n\nAre you sure you wish to destroy the old game rather than try to\n"); + raw_print("recover it? [yn] "); + c = 'n'; + ct = 0; + pl = 2; + goto tty_ask_again; + } + + if (pl == 2 && (c == 'n' || c == 'N')) { + /* no to destruction of old game */ + retval = 0; + } else { + /* only yes answers get here */ + if (pl == 2) + retval = -1; /* yes, do destroy the old game anyway */ + else + retval = 1; /* yes, do recover the old game */ + } + if (saved_procs.name[0]) { + windowprocs = saved_procs; + raw_clear_screen(); + } + return retval; +} + +int +other_self_recover_prompt() +{ + register int c, ci, ct, pl, retval = 0; + boolean ismswin = WINDOWPORT("mswin"), + iscurses = WINDOWPORT("curses"); + + pl = 1; + c = 'n'; + ct = 0; + if (iflags.window_inited || WINDOWPORT("curses")) { + c = yn("There are files from a game in progress under your name. " + "Recover?"); + } else { + c = 'n'; + ct = 0; + raw_print("There are files from a game in progress under your name. " + "Recover? [yn]"); + } + + other_ask_again: + + if (!ismswin && !iscurses) { + while ((ci = nhgetch()) && !(ci == '\n' || ci == 13)) { + if (ct > 0) { + /* invalid answer */ + raw_print("\b \b"); + ct = 0; + c = 'n'; + } + if (ci == 'y' || ci == 'n' || ci == 'Y' || ci == 'N') { + ct = 1; + c = ci; + } + } + } + if (pl == 1 && (c == 'n' || c == 'N')) { + /* no to recover */ + c = yn("Are you sure you wish to destroy the old game, rather than try to " + "recover it? [yn] "); + pl = 2; + if (!ismswin && !iscurses) { + c = 'n'; + ct = 0; + goto other_ask_again; + } + } + if (pl == 2 && (c == 'n' || c == 'N')) { + /* no to destruction of old game */ + retval = 0; + } else { + /* only yes answers get here */ + if (pl == 2) + retval = -1; /* yes, do destroy the old game anyway */ + else + retval = 1; /* yes, do recover the old game */ + } + return retval; +} /*windmain.c*/ diff --git a/win/share/safeproc.c b/win/share/safeproc.c index b0f75220a..28896c9c2 100644 --- a/win/share/safeproc.c +++ b/win/share/safeproc.c @@ -538,7 +538,7 @@ stdio_raw_print(str) const char *str; { if (str) - fprintf(stdout, "%s\n", str); + fprintf(stdout, "%s", str); return; } From ea2b8a90ee45a01e092739f5da3498614ffbb90e Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Dec 2019 04:46:41 -0500 Subject: [PATCH 404/529] remove conflicting prototype declared for getlock in ntconf.h with mingw build --- include/ntconf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ntconf.h b/include/ntconf.h index ecdf7bc81..50b9bf81c 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -108,7 +108,7 @@ extern void FDECL(interject, (int)); #ifdef strcasecmp #undef strcasecmp #endif -extern void NDECL(getlock); +/* extern int NDECL(getlock); */ #endif #ifdef _MSC_VER From 1e6b4c1a6dcd7381c355444570b9006976e09faf Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Dec 2019 11:36:01 -0500 Subject: [PATCH 405/529] doc updates for release --- README | 17 ++++++++--------- dat/history | 3 +++ doc/Guidebook.mn | 5 ++++- doc/Guidebook.tex | 7 ++++++- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/README b/README index 73e872c22..1c5dc57cd 100644 --- a/README +++ b/README @@ -1,17 +1,16 @@ - NetHack 3.6.3 post-beta1 -- General information + NetHack 3.6.3 -- General information December 5, 2019 NetHack 3.6 is an enhancement to the dungeon exploration game NetHack, which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.4 as there was no NetHack 3.5 release. -NetHack 3.6.3 post-beta1 is not an official release of NetHack. It -currently contains a collection of over 190 bug fixes to NetHack 3.6.2 -and over 22 game enhancements and community contributions. The file -doc/fixes36.3 in the source distribution has a full list of them. -The text in there was written for the development team's own use and is -provided "as is", so please do not ask us to further explain the entries -in that file. Some entries might be considered "spoilers", particularly in -the "new features" section. +NetHack 3.6.3 is the official release of NetHack that follows NetHack 3.6.2. +It contains a collection of over 190 bug fixes to NetHack 3.6.2 and over 22 +game enhancements and community contributions. The file doc/fixes36.3 in the +source distribution has a full list of them. The text in there was written for +the development team's own use and is provided "as is", so please do not ask +us to further explain the entries in that file. Some entries might be +considered "spoilers", particularly in the "new features" section. Below you will find some other general notes that were not considered spoilers: diff --git a/dat/history b/dat/history index 23dba2d4c..50cb7ca1a 100644 --- a/dat/history +++ b/dat/history @@ -220,6 +220,9 @@ the adopted curses window port, were released as 3.6.2. Bart House, who had contributed to the game as a porting team participant for decades, joined the NetHack Development Team in late May 2019. +NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug +fixes to NetHack 3.6.2. + The official NetHack web site is maintained by Ken Lorber at http://www.nethack.org/. diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 7d6d3afd2..7b841ebe4 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "December 1, 2019 +.ds f2 "December 5, 2019 . .\" A note on some special characters: .\" \(lq = left double quote @@ -5146,6 +5146,9 @@ the adopted curses window port, were released as 3.6.2. \fBBart House\fP, who had contributed to the game as a porting team participant for decades, joined the NetHack Development Team in late May 2019. .pg +NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug +fixes to NetHack 3.6.2. +.pg The official NetHack web site is maintained by \fBKen Lorber\fP at .UR http://www.nethack.org/ . diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 7532786ed..5d6280b56 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{December 1, 2019} +\date{December 5, 2019} \maketitle @@ -5748,6 +5748,11 @@ the adopted curses window port, were released as 3.6.2. {\it Bart House}, who had contributed to the game as a porting team participant for decades, joined the {\it NetHack Development Team} in late May 2019. +%.pg +\medskip +NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug +fixes to NetHack 3.6.2. + %.pg \medskip \nd The official {\it NetHack\/} web site is maintained by {\it Ken Lorber} at From 491b88577787f1e72b4c364bb7311391f7bc6778 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Dec 2019 11:46:15 -0500 Subject: [PATCH 406/529] more prep work --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/global.h b/include/global.h index 9fb64ebf0..c3d2b4f22 100644 --- a/include/global.h +++ b/include/global.h @@ -18,7 +18,7 @@ /* * Development status of this NetHack version. */ -#define NH_DEVEL_STATUS NH_STATUS_BETA +#define NH_DEVEL_STATUS NH_STATUS_RELEASED #ifndef DEBUG /* allow tool chains to define without causing warnings */ #define DEBUG From cfb382c626edca8936fae6bd43e34584b7e5c98e Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Dec 2019 11:51:24 -0500 Subject: [PATCH 407/529] more prep bits --- include/patchlevel.h | 5 ++++- util/makedefs.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/patchlevel.h b/include/patchlevel.h index 2151087ee..c945e68b5 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -36,7 +36,7 @@ /****************************************************************************/ /* Version 3.6.x */ -/* Patch 3, +/* Patch 3, December 5, 2019 * * Fixed stale 'thrownobj' pointer for returning thrown aklys while engulfed * Fixed uarmh null pointer dereference if a helm of opposite alignment came @@ -55,6 +55,7 @@ * Fixed ignoring of god's wrath when hero injured himself during altar kick * Fixed several cases where persistent inventory window was not updated * Fixed temple priests or shopkeepers moving over other monsters + * Fixed a crash-causing bug when putting on levitation boots over a sink * Ensured that thrown or kicked objects will end up in bones * Made water go all the way to the edges of level on the Plane of Water * Made clouds disrupt line of sight along the edges of the Plane of Air @@ -64,6 +65,8 @@ * the Windows platform * Improved the layout and display of the player selection dialog used on the * Windows graphical implementation + * Improved performance of some tty versions by reducing the number of + * function calls made from mapglyph * Allowed the msdos implementation to build with curses and PDCurses * Included over 100 other fixes and improvements as outlined in doc/fixes36.3 */ diff --git a/util/makedefs.c b/util/makedefs.c index ac196f8e2..4334b9b0e 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -53,7 +53,7 @@ #endif #if defined(UNIX) && !defined(LINT) && !defined(GCC_WARN) -static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.6\t2019/05/07"; +static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.6\t2019/12/05"; #endif /* names of files to be generated */ From 67dee9d579aa5c86dcfa7eda257ab6049569912a Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Dec 2019 12:26:10 -0500 Subject: [PATCH 408/529] http to https --- doc/Guidebook.mn | 2 +- doc/Guidebook.tex | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 7b841ebe4..4c4cd5f11 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -5151,7 +5151,7 @@ fixes to NetHack 3.6.2. .pg The official NetHack web site is maintained by \fBKen Lorber\fP at -.UR http://www.nethack.org/ . +.UR https://www.nethack.org/ . .pg .hn 2 SPECIAL THANKS diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 5d6280b56..049aa8598 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -5757,8 +5757,8 @@ fixes to NetHack 3.6.2. \medskip \nd The official {\it NetHack\/} web site is maintained by {\it Ken Lorber} at {\catcode`\#=11 -\special{html:}} -http:{\tt /}{\tt /}www.nethack.org{\tt /}. +\special{html:}} +https:{\tt /}{\tt /}www.nethack.org{\tt /}. {\catcode`\#=11 \special{html:}} From 4868f83db17a1caef6ee7163265914fe71856e08 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Dec 2019 13:10:12 -0500 Subject: [PATCH 409/529] more self-recover prompting cleanup (tty) --- include/winprocs.h | 1 + sys/winnt/windmain.c | 4 +++- win/share/safeproc.c | 13 +++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/winprocs.h b/include/winprocs.h index f68952765..55b2b0611 100644 --- a/include/winprocs.h +++ b/include/winprocs.h @@ -451,6 +451,7 @@ extern void FDECL(safe_status_enablefield, extern void FDECL(safe_status_update, (int, genericptr_t, int, int, int, unsigned long *)); extern boolean NDECL(safe_can_suspend); extern void FDECL(stdio_raw_print, (const char *)); +extern void FDECL(stdio_nonl_raw_print, (const char *)); extern void FDECL(stdio_raw_print_bold, (const char *)); extern void NDECL(stdio_wait_synch); extern int NDECL(stdio_nhgetch); diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 332d363dd..317d4657e 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -1199,7 +1199,9 @@ tty_self_recover_prompt() c = 'n'; ct = 0; saved_procs = windowprocs; - safe_routines(); + if (!WINDOWPORT("safe-startup")) + windowprocs = *get_safe_procs(2); /* arg 2 uses no-newline variant */ + windowprocs.win_nhgetch = windows_console_custom_nhgetch; raw_print("\n"); raw_print("\n"); raw_print("\n"); diff --git a/win/share/safeproc.c b/win/share/safeproc.c index 28896c9c2..927744c4e 100644 --- a/win/share/safeproc.c +++ b/win/share/safeproc.c @@ -114,6 +114,8 @@ int optn; safe_procs.win_raw_print_bold = stdio_raw_print_bold; safe_procs.win_nhgetch = stdio_nhgetch; safe_procs.win_wait_synch = stdio_wait_synch; + if (optn == 2) + safe_procs.win_raw_print = stdio_nonl_raw_print; } return &safe_procs; } @@ -536,6 +538,17 @@ stdio_wait_synch() void stdio_raw_print(str) const char *str; +{ + if (str) + fprintf(stdout, "%s\n", str); + return; +} + +/* no newline variation, add to your code: + windowprocs.win_raw_print = stdio_nonl_raw_print; */ +void +stdio_nonl_raw_print(str) +const char *str; { if (str) fprintf(stdout, "%s", str); From d35db397773eb316e68097ca75fe24d51efec976 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Dec 2019 21:17:44 -0500 Subject: [PATCH 410/529] update Cross-compiling --- Cross-compiling | 352 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 333 insertions(+), 19 deletions(-) diff --git a/Cross-compiling b/Cross-compiling index 5511813e8..bccd5bce6 100644 --- a/Cross-compiling +++ b/Cross-compiling @@ -5,9 +5,26 @@ versions in some important ways that make it possible to use a cross-compiler running on one platform (the "host" platform of the build) to produce a binary NetHack package that can execute on an entirely different platform. - +----------------------+ - | Why cross-compile? | - +----------------------+ +Part A Contents: + A1. Why cross-compile? + A2. Building NetHack 3.6 (before) + A3. Building NetHack 3.7 (going forward) + A4. How was the build procedure reduced to 5 steps? + A5. How can I help with the cross-compiling initiative? + +Part B Contents: + B1. Two sets of compiles and procedures + B2. What needs to be built and executed on the HOST? + B3. What needs to be built for the TARGET? + B4. Case sample: msdos + +-------------------------------------------------------------------------------- + Part A - Cross-compiling NetHack +-------------------------------------------------------------------------------- + + +--------------------------+ + | A1. Why cross-compile? | + +--------------------------+ By using cross-compilers on host platforms with fast processors, plenty of RAM and storage resources, and an available cross-compiler, it may be possible to @@ -35,9 +52,9 @@ for carrying out test and production builds of NetHack for multiple target platforms through automated steps carried out on the host platform(s). - +---------------------------------+ - | Building NetHack 3.6 (before) | - +---------------------------------+ + +-------------------------------------+ + | A2. Building NetHack 3.6 (before) | + +-------------------------------------+ Very generally, the build of NetHack in past versions required the following steps to be carried out: @@ -96,9 +113,9 @@ platforms and operating systems. If all those things happen to match, the files might, just might, be usable across platforms, but the chances are against it, and that certainly cannot be counted on. - +--------------------------------------+ - | Building NetHack 3.7 (going forward) | - +--------------------------------------+ + +------------------------------------------+ + | A3. Building NetHack 3.7 (going forward) | + +------------------------------------------+ Again, very generally, the build of NetHack in 3.7 requires the following steps to be carried out: @@ -119,7 +136,9 @@ steps to be carried out: and/or operating system dependent; only the output of the utilities becomes part of the game package, not the executable utilities themselves. - 4. Compile and link the game itself. + 4. Compile and link the game components for the TARGET; that includes + NetHack itself, Lua, and any optional regular-expression or window port + libraries that you plan to link into the NetHack game executable. 5. Package the game and its required files including the output from previous steps 2b, 3 and 4 above. @@ -128,9 +147,9 @@ by executing step 4 using a cross-compiler that runs on the build (host) platform to produce a resulting binary for the target platform, instead of executing the native compiler. - +--------------------------------------------------------+ - | How was the build procedure reduced to those 5 steps ? | - +--------------------------------------------------------+ + +-----------------------------------------------------+ + | A4. How was the build procedure reduced to 5 steps? | + +-----------------------------------------------------+ The following are among several design changes planned in NetHack 3.7, and these specific changes are what altered the build process to make @@ -158,10 +177,9 @@ cross-compiling possible: game under a cross-compiled build. As such, it now produces information applicable to the target NetHack environment, not the build environment. - - +--------------------------------------------------------+ - | How can I help with the cross-compiling initiative? | - +--------------------------------------------------------+ + +------------------------------------------------------------+ + | A5. How can I help with the cross-compiling initiative? | + +------------------------------------------------------------+ o If you have a favourite target platform (let's call it XX-Platform for example purposes) that you'd like to see NetHack be able to run on, do @@ -171,12 +189,12 @@ cross-compiling possible: Mac OS X are some examples of platforms that have cross-compilers for other targets available) - Then, make the community, devteam, and so forth aware that you're starting + o Then, make the community, devteam, and otheres aware that you're starting a cross-compile of NetHack for XX-Platform. You might need to ask some "starting out" questions initially, and as you get deeper into it, you might need to ask some tougher questions. - Perhaps consider forking from NetHack on GitHub, and do the + o Perhaps consider forking from NetHack on GitHub, and do the cross-compiler work there in your fork. Strive to get it to a point where its ready to play-test on XX-Platform, or perhaps even use an emulator of XX-Platform if one is available. We live in a time where plenty do. @@ -194,4 +212,300 @@ cross-compiling possible: Have fun! +----------------------------------------------------------------------------- + Part B - Cross-compiling details +----------------------------------------------------------------------------- + +Part B Contents: + B1. Two sets of compiles and procedures + B2. What needs to be built and executed on the HOST? + B3. What needs to be built for the TARGET? + B4. Case sample: msdos + + +-----------------------------------------+ + | B1. Two sets of compiles and procedures | + +-----------------------------------------+ + +The HOST is the platform/place that you're running the build procedures using +the native compiler/linker, and the cross-compiler/linker that runs on the HOST +to build the game for a TARGET platform. + +You have to: + 1. Build mandatory utilities on the HOST. + 2. Execute the mandatory utilities to generate components that will be used + during step 4 to build the game itself, or that will generate components + that will become part of the TARGET game package. + 3. Build optional or enhancing utilities on the HOST, execute those + optional or enhancing utilities on the HOST to generate components that + will become part of the TARGET game package. + 4. Execute a supported cross-compiler to compile the rest of the game + components like NetHack, Lua, and any optional libraries. + (the word "supported", in this sense, means a compiler that runs on your + HOST build platform, and generates output executable files for the TARGET + platform. + +It should be mentioned that you can execute the cross-compile build approach +even to generate binaries for the same platform as the host, where the HOST +compilerand the TARGET compiler are actually one and the same. + + + +------------------------------------------------------+ + | B2. What needs to be built and executed on the HOST? | + +------------------------------------------------------+ + +On the HOST, here are the mandatory things that have to be built. + + a) Using the HOST native compiler, build HOST native utility makedefs + + Compile and link the following with these compiler switches: + -DCROSSCOMPILE and -DCROSSCOMPILE_HOST + from sources: util/makedefs.c, src/mdlib.c, src/monst.c, src/objects.c + + b) Execute HOST native makedefs utility, util/makedefs, as follows: + util/makedefs -v + util/makedefs -o + util/makedefs -p + util/makedefs -z + util/makedefs -d + util/makedefs -r + util/makedefs -h + util/makedefs -s + + c) Using the HOST native compiler, build these additional utilities if your + target platform requires components that they produce. It is important + to note that all of the required source files need to be compiled to + native obj files for linking into the HOST-side utility. Some of the + source files (src/monst.c, src/objects.c) were likely already compiled + as native HOST-side obj files in order to build the native HOST utility + 'makedefs' HOST utility above, and you don't need to compile them again + for use in linking other HOST utilities if the HOST-native obj files + produced from them are still around. + + NOTE: A few other source files (src/drawing.c, src/decl.c) that need to + be compiled for native HOST utilities, also need to be compiled again + later as TARGET obj files for linking into the TARGET executable. It is + important to keep the compiled HOST-side obj files produced by the HOST + native compiler, and the TARGET-side obj files produced by the + cross-compiler separate and distinct from one another. That can be done + either by naming the differing object files a little differently + (perhaps with a suffix), or by placing the HOST-side obj files and the + TARGET-side obj files into different folders during the build process. + Whatever works best for your cross-compile. + + util/dlb + + from sources: src/dlb.c, src/dlb_main.c, src/alloc.c, + src/panic.c + purpose: For packaging up many files that are + required components of the TARGET game + into a single nhdat or nhdat370 combined + file + + util/uudecode + + from sources: sys/share/uudecode.c + purpose: convert some binary files, that are + distributed in the NetHack sources in + uuencoded format, back into their + original binary state + util/tilemap + + from sources: win/share/tilemap.c + purpose: produce output file src/tile.c that is + required for building TARGET packages with + tile support + + util/tile2bmp + + from sources: win/share/tile2bmp.c, win/share/tiletext.c, + win/share/tilemap.c, src/drawing.c, + src/decl.c, src/monst.c, src/objects.c + purpose: + + util/gif2txt + + from sources: win/share/gifread.c, win/share/tiletext.c, + win/share/tilemap.c, src/drawing.c, + src/decl.c, src/monst.c, src/objects.c, + src/alloc.c, src/panic.c + purpose: + + util/ppmwrite + + from sources: win/share/ppmwrite.c, win/share/tiletext.c, + win/share/tilemap.c, src/drawing.c, + src/decl.c, src/monst.c, src/objects.c, + src/alloc.c, src/panic.c + purpose: + + + +--------------------------------------------+ + | B3. What needs to be built for the TARGET? | + +--------------------------------------------+ + + +For the TARGET side, here are the mandatory things that have to be built via +the HOST-executed cross-compiler that generates code for the TARGET platform. + +Using the cross-compiler, build the following targets: + + a) NetHack sources (core is mandatory) + + With the cross-compiler and linker for the TARGET platform, + cross-compile and link with these compiler switches: + -DCROSSCOMPILE and -DCROSSCOMPILE_TARGET + + core sources (2019): src/allmain.c, src/apply.c, src/artifact.c, + src/attrib.c, src/ball.c, src/bones.c, + src/botl.c, src/cmd.c, src/dbridge.c, src/decl.c, + src/detect.c, src/dig.c, src/display.c, src/do.c, + src/do_name.c, src/do_wear.c, src/dog.c, + src/dogmove.c, src/dokick.c, src/dothrow.c, + src/drawing.c, src/dungeon.c, src/eat.c, src/end.c, + src/engrave.c, src/exper.c, src/explode.c, + src/extralev.c, src/files.c, src/fountain.c, + src/hack.c, src/hacklib.c, src/invent.c, + src/isaac64.c, src/light.c, src/lock.c, src/mail.c, + src/makemon.c, src/mapglyph.c, src/mcastu.c, + src/mdlib.c, src/mhitm.c, src/mhitu.c, src/minion.c, + src/mklev.c, src/mkmap.c, src/mkmaze.c, src/mkobj.c, + src/mkroom.c, src/mon.c, src/mondata.c, src/monmove.c, + src/monst.c, src/mplayer.c, src/mthrowu.c, src/muse.c, + src/music.c, src/nhlsel.c, src/nhlua.c, src/o_init.c, + src/objects.c, src/objnam.c, src/options.c, + src/pager.c, src/pickup.c, src/pline.c, + src/polyself.c, src/potion.c, src/pray.c, + src/priest.c, src/quest.c, src/questpgr.c, + src/random.c, src/read.c, src/rect.c, src/region.c, + src/restore.c, src/rip.c, src/rnd.c, src/role.c, + src/rumors.c, src/save.c, src/sfbase.c, + src/sfdata.c, src/sflendian.c, src/sfstruct.c, + src/shk.c, src/shknam.c, src/sit.c, src/sounds.c, + src/sp_lev.c, src/spell.c, src/steal.c, src/steed.c, + src/sys.c, src/teleport.c, src/tile.c, + src/timeout.c, src/topten.c, src/track.c, + src/trap.c, src/u_init.c, src/uhitm.c, src/vault.c, + src/version.c, src/vis_tab.c, src/vision.c, + src/weapon.c, src/were.c, src/wield.c, src/windows.c, + src/wizard.c, src/worm.c, src/worn.c, src/write.c, + src/zap.c, sys/share/cppregex.cpp + + tty sources: win/tty/getline.c, win/tty/termcap.c, + win/tty/topl.c, win/tty/wintty.c + + plus your platform-specific source files that contain main, typically + *main.c, and unix support in *unix.c, tty support in *tty.c, and other + system support in *sys.c as well as others sources pertaining to your + specific target platform(s). + + b) Lua (mandatory in 3.7) + + lib/lua-5.3.5/src + + from sources: lua.c, lapi.c, lauxlib.c, lbaselib.c, lcode.c, + lcorolib.c, lctype.c, ldblib.c, ldebug.c, + ldo.c, ldump.c, lfunc.c, lgc.c, linit.c, + liolib.c, llex.c, lmathlib.c, lmem.c, + loadlib.c, lobject.c, lopcodes.c, + loslib.c, lparser.c, lstate.c, lstring.c, + lstrlib.c, ltable.c, ltablib.c, ltm.c, + lundump.c, lutf8lib.c, lvm.c, lzio.c, + lbitlib.c + purpose: links into the game executable to interpret + lua level description files, lua dungeon + description files, and a lua quest text file. + + d) recover (optional if desired/required; some targets have recover + functionality built into NetHack itself) + + c) Additional optional library packages/obj files as required + + lib/pdcurses/... + + from sources: addch.c, addchstr.c, addstr.c, attr.c, beep.c, + bkgd.c, border.c, clear.c, color.c, delch.c, + deleteln.c, getch.c, getstr.c, getyx.c, + inch.c, inchstr.c, initscr.c, inopts.c, + insch.c, insstr.c, instr.c, kernel.c, + keyname.c, mouse.c, move.c, outopts.c, + overlay.c, pad.c, panel.c, printw.c, + refresh.c, scanw.c, scr_dump.c, scroll.c, + slk.c, termattr.c, touch.c, util.c, window.c, + debug.c, pdcclip.c, pdcdisp.c, pdcgetsc.c, + pdckbd.c, pdcutil.c + purpose: underlying curses platform support for some + target platforms where inclusion of the + NetHack curses window port in win/curses is + desired + + +-------------------------+ + | B4. Case sample: msdos | + +-------------------------+ + +Cross-compiler used: Andrew Wu's djgpp cross-compiler +Cross-compiler url: https://github.com/andrewwutw/build-djgpp +Cross-compiler pre-built binary downloads: + https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/ + Mac OS X pre-built binary: djgpp-osx-gcc550.tar.bz2 (tested) + Linux pre-built binary : djgpp-linux64-gcc550.tar.bz2 (tested) + mingw pre-built binary : djgpp-mingw-gcc550-standalone.zip (untested) + +The msdos cross-compile for NetHack 3.7 uses two phases of compiles: +Phase1 is the host-side prerequisite stuff that needs to be done first. +Phase2 is the cross-compile pieces using the djgpp cross-compiler hosted on +Linux, Mac OS X, or Windows mingw. + +First, on the host platform, you need to set up for a native Unix NetHack +build in the usual way. For example, on linux: + cd sys/unix + sh setup.sh hints/linux + cd ../.. + make fetch-lua + +Now, you could proceed to go ahead and issue + make all +to build a native NetHack at that point if you wish, but it is not needed +for the msdos cross-compile. + +Instead, a test shell script has been put together that will next accomplish +each of the following tasks when it is executed. The shell script can be +invoked by: + sh sys/msdos/msdos-cross-compile.sh +but before you do that, please read the paragraphs below. + +The shell script is meant to accomplish the following things: + + Prep : the script downloads the djgpp cross-compiler for the host + platform into lib/djgpp (it doesn't install anything on the + system, nor does it need to, it just downloads them into the + identified directories), it downloads a copy of the msdos + dos-extender into lib/djgpp/cwsdpmi for later packaging up with + the msdos game, and it downloads pdcurses into lib/pdcurses + for cross-compiling during the TARGET build. + + Be certain to ensure the right products are at the url's + identified above *before* you execute the Case sample msdos + cross-compile script. The correct products were at those url's + at the time this was written in Dec 2019, but we don't assume + any responsibility for what is at those url's now or in the + future. You need to check before executing the script. + + Phase1 : the script uses the Makefile sys/msdos/Makefile1.cross + to complete the host-side build steps using the native gcc + compiler for the host platform. During phase1 the host obj + files are put in subfolder src/host_o to keep them separated + and distinguishable from the target obj files that will be + built in phase2. + + Phase2 : the script uses the Makefile sys/msdos/Makefile2.cross + to complete the target-side build steps using the + cross-compiler that was obtained during the prep step of the + script described above. During phase2 the target obj files + are put in src/msdos_o to keep them separated and + distinguishable from the host obj files + + Package: the script then packages up the results that reside in + msdos-binary into a zip file which it places in lib called + nh370dos.zip. + From e72491a3db9e8f19a617f54f94bed34531509715 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Dec 2019 22:06:18 -0500 Subject: [PATCH 411/529] update Porting --- Porting | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 102 insertions(+), 11 deletions(-) diff --git a/Porting b/Porting index baccb37d5..675b9ca4f 100644 --- a/Porting +++ b/Porting @@ -1,4 +1,4 @@ - NetHack Porting Guidelines v 3.6 1999-11-29 + NetHack Porting Guidelines v 3.7 2019-12-05 1.0 Introduction @@ -6,7 +6,7 @@ This document goes through the steps required to port NetHack to a new machine. The basic steps in porting the program are: - 1. Get the code onto your machine. The parts of the current + 1. Get the code onto your build machine. The parts of the current directory setup you definitely need include src (NetHack code shared by all systems), include (include files), util (code for utility programs), and dat (various data files). The @@ -14,6 +14,10 @@ new machine. The basic steps in porting the program are: have the files in the top directory since you're reading this one. :-) + If you will be cross-compiling for your target platform on + a different platform, you may want to read Cross-compiling + in the Top folder as well. + A full list of the distribution files and their associated OSes may be found in the top-level file "Files". @@ -53,7 +57,8 @@ new machine. The basic steps in porting the program are: possibly send us some mail. We might be able to help. 6. Mail all of your fixes to us in a contextual form so that we can - easily integrate them into the code. + easily integrate them into the code, or fork the NetHack + repository on GitHub and issue a pull-request for your changes. One general rule of thumb exists. Always add code. Don't delete somebody else's code for yours -- it won't work on their machine if you do. @@ -120,13 +125,6 @@ files for the game. You may have to create an OS-specific module to handle things you want to use, like a mouse or a ram-disk. - The utility compilers "dgn_comp" and "lev_comp" may be a better -place to start. They also require "makedefs" but are independent of -"nethack". They are usually the last programs made, but since they are -much smaller they may be more tractable when first arguing with the include -files. These programs create binary data files that "nethack" uses to -guide its dungeon creation. - 3.1 Makefiles This distribution provides makefiles for several kinds of systems. @@ -167,11 +165,104 @@ for raw I/O, etc. to. This file contains some OS dependencies concerning time and filename creation. - An object of the NetHack development project is to get the game working on as many different types of hardware and under as many different operating systems as is practical. Any assistance will be appreciated. +Cross-compiling may allow porting of NetHack to a machine where there may +be challenges building on the platform directly, and may help maintain a +working version of NetHack on that platform. See the file Cross-compiling +for more information. + + 4.0 Build Process + +NetHack requires the following steps to be carried out: + + 4.1. makedefs + +Compile and link util/makedefs. Run makedefs repeatedly with different command +line options to produce several output files that are required for: + (a) additional build steps to follow, including some header + files: pm.h, onames.h, date.h. + (b) creation of files, containing information required by, + or about the game during its execution, that are stored in a + portable, platform-independent way, that need to be inserted + into the final game package. + + util/makedefs -v + util/makedefs -o + util/makedefs -p + util/makedefs -z + util/makedefs -d + util/makedefs -r + util/makedefs -h + util/makedefs -s + + 4.2. Other utilities + +Compile and link other utilities such as uudecode, tile-generation utilities, +and so forth. Those produce output files for use during the game and need to +be included in the packaging of the game. + + 4.3. Lua + +Compile and link into a library, or obtain a prebuilt Lua library for your platform; +place the Lua source into lib/lua-5.3.5 (or other folder representing an appropriate +Lua version); place the Lua library into lib. + + 4.4 Compile NetHack sources + +Compile the source code of the game, including a suitable regular-expression +interface from several options available in sys/share. Pick one that is +supported by your OS or that you have obtained a 3rd party library for. + + 4.5 Compile optional window port components into a library + +If your platform requires 3rd party sources in order to support the window +port options that you have chosen, such as curses sources for the curses +window port, you may store the sources for that library in a subfolder under +lib. + + 4.5. Link the game + +Link the game to the Lua library, any window port support libraries. + + 4.6 Package the game + + + 5.0 Design Updates + +The following design updates were introduced in NetHack 3.7. + + 5.1 Quest text files + +The quest text files that were formerly converted from their source text by +makedefs during the build process, have been replaced by Lua versions and +are inserted into the game package for processing by the embedded Lua +interpreter during game execution. + + 5.2 Level Compiler + +There is no longer a build-time level compiler. Instead, the level descriptions +have been converted to Lua and are inserted into the game package for +processing by the embeded Lua interpreter during game execution. + + 5.3 Dungeon Compiler + +There is no longer a build-time dungeon compiler. Instead, the dungeon +description has been converted to Lua and is inserted into the game package for +processing by the embeded Lua interpreter during game execution. + + + 5.4 Run-time Options + +Some of the build and option information that was formerly produced at +build-time by makedefs, and contained information about the game platform and +options selected during the build of the game can now be produced at run-time +by code within the game itself. That was done to facilitate cross-compiling of +NetHack on one platform for game execution on another. + + # NetHack 3.6 Porting $NHDT-Date: 1524689603 2018/04/25 20:53:23 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.5 $ # Copyright (c) 2005 by Michael Allison # NetHack may be freely redistributed. See license for details. From d44dd394445f8d1b345ecd0e67570632b34b109a Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Dec 2019 22:15:44 -0500 Subject: [PATCH 412/529] more Porting updates --- Porting | 51 +++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/Porting b/Porting index 675b9ca4f..cc27f9965 100644 --- a/Porting +++ b/Porting @@ -200,34 +200,37 @@ line options to produce several output files that are required for: 4.2. Other utilities -Compile and link other utilities such as uudecode, tile-generation utilities, -and so forth. Those produce output files for use during the game and need to -be included in the packaging of the game. + Compile and link other utilities such as uudecode, tile-generation +utilities, and so forth. Those produce output files for use during the game and +need to be included in the packaging of the game. 4.3. Lua - -Compile and link into a library, or obtain a prebuilt Lua library for your platform; -place the Lua source into lib/lua-5.3.5 (or other folder representing an appropriate -Lua version); place the Lua library into lib. + + Compile and link into a library, or obtain a prebuilt Lua library for +your platform. Place the Lua source into lib/lua-5.3.5 (or other folder +representing an appropriate Lua version); place the compiled Lua library into +lib. 4.4 Compile NetHack sources -Compile the source code of the game, including a suitable regular-expression -interface from several options available in sys/share. Pick one that is -supported by your OS or that you have obtained a 3rd party library for. + Compile the source code of the game, including a suitable +regular-expression choice from several options available in sys/share. Pick one +that is supported by your OS or that you have obtained a 3rd party library for. 4.5 Compile optional window port components into a library -If your platform requires 3rd party sources in order to support the window -port options that you have chosen, such as curses sources for the curses + If your platform requires 3rd party sources in order to support the +window port options that you have chosen, such as curses sources for the curses window port, you may store the sources for that library in a subfolder under lib. - 4.5. Link the game + 4.6. Link the game -Link the game to the Lua library, any window port support libraries. + Link the game to the Lua library, and to any window port support +libraries. + + 4.7 Package the game - 4.6 Package the game 5.0 Design Updates @@ -236,27 +239,27 @@ The following design updates were introduced in NetHack 3.7. 5.1 Quest text files -The quest text files that were formerly converted from their source text by -makedefs during the build process, have been replaced by Lua versions and -are inserted into the game package for processing by the embedded Lua + The quest text files that were formerly converted from their source +text by makedefs during the build process, have been replaced by Lua versions +and are inserted into the game package for processing by the embedded Lua interpreter during game execution. 5.2 Level Compiler -There is no longer a build-time level compiler. Instead, the level descriptions -have been converted to Lua and are inserted into the game package for -processing by the embeded Lua interpreter during game execution. + There is no longer a build-time level compiler. Instead, the level +descriptions have been converted to Lua and are inserted into the game package +for processing by the embeded Lua interpreter during game execution. 5.3 Dungeon Compiler -There is no longer a build-time dungeon compiler. Instead, the dungeon + There is no longer a build-time dungeon compiler. Instead, the dungeon description has been converted to Lua and is inserted into the game package for -processing by the embeded Lua interpreter during game execution. +processing by the embeded Lua interpreter during game execution. 5.4 Run-time Options -Some of the build and option information that was formerly produced at + Some of the build and option information that was formerly produced at build-time by makedefs, and contained information about the game platform and options selected during the build of the game can now be produced at run-time by code within the game itself. That was done to facilitate cross-compiling of From 3e0b4e0b5a7f2a328b10f19a7e8183335e687794 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Dec 2019 22:32:26 -0500 Subject: [PATCH 413/529] more doc --- doc/nethack.6 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/nethack.6 b/doc/nethack.6 index dda4c89f4..446568ffb 100644 --- a/doc/nethack.6 +++ b/doc/nethack.6 @@ -277,7 +277,7 @@ nethack The program itself. .br data, oracles, rumors Data files used by NetHack. .br -quest.dat, bogusmon More data files. +bogusmon another data file. .br engrave, epitaph, tribute Still more data files. .br @@ -294,9 +294,8 @@ help, hh Help data files. .br cmdhelp, opthelp, wizhelp More help data files. .br -*.lev Predefined special levels. -.br -dungeon Control file for special levels. +*.lua Predefined special levels, dungeon control for + special levels, quest texts .br history A short history of NetHack. .br @@ -393,7 +392,7 @@ SHOPTYPE and SPLEVTYPE can be used in debugging (wizard) mode. DEBUGFILES can be used if the program was built with 'DEBUG' enabled. .SH "SEE ALSO" .PP -dgn_comp(6), lev_comp(6), recover(6) +recover(6) .SH BUGS .PP Probably infinite. From 565e020573d56afb3eefafa4e8975d24b677c80d Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 5 Dec 2019 02:33:47 -0800 Subject: [PATCH 414/529] kinda/sorta fix github issue #246 When picking up from floor or removing from container fails because there aren't any inventory slots available, pickup/take-out stops. But the message |Your knapsack can't accomodate any more items. is inaccurate if there is gold beyond the stopping point. Actually continuing in order to pickup/take-out gold would require substantial changes, but varying the message to be |Your knapsack can't accomodate any more items (except gold). when stopping is a one line fix. The parenthesized remark is only added if there is actually some gold after the current object and is given regardless of whether autopickup happens to be targetting it. Fixes #246 --- doc/fixes37.0 | 5 ++++- src/pickup.c | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 003e9342d..f9f60be61 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.8 $ $NHDT-Date: 1557663358 2019/05/12 12:15:58 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.17 $ $NHDT-Date: 1575542023 2019/12/05 10:33:43 $ General Fixes and Modified Features ----------------------------------- @@ -10,6 +10,9 @@ hero polymorphed into a vampire can use #monster to shape-shift rather than adjust bones filename buffer sizes to accommodate suffix fix internal self-recover to work with recent fields added to checkpoint file improvements to pronoun usage when hallucinating +message "your knapsack can't accomodate any more items" when picking stuff up + or removing such from container was inaccurate if there was some gold + pending; vary the message rather than add more convoluted pickup code Fixes to Pre-3.7.0 Problems that Were Exposed Via git Repository diff --git a/src/pickup.c b/src/pickup.c index 67921de6f..49fbc609b 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pickup.c $NHDT-Date: 1574982023 2019/11/28 23:00:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.249 $ */ +/* NetHack 3.6 pickup.c $NHDT-Date: 1575542023 2019/12/05 10:33:43 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.251 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1412,7 +1412,14 @@ boolean telekinesis; /* [exception for gold coins will have to change if silver/copper ones ever get implemented] */ && inv_cnt(FALSE) >= 52 && !merge_choice(g.invent, obj)) { - Your("knapsack cannot accommodate any more items."); + /* if there is some gold here (and we haven't already skipped it), + we aren't limited by the 52 item limit for it, but caller and + "grandcaller" aren't prepared to skip stuff and then pickup + just gold, so the best we can do here is vary the message */ + Your("knapsack cannot accommodate any more items%s.", + /* floor follows by nexthere, otherwise container so by nobj */ + nxtobj(obj, GOLD_PIECE, (boolean) (obj->where == OBJ_FLOOR)) + ? " (except gold)" : ""); result = -1; /* nothing lifted */ } else { result = 1; From e8642ae7086b038da12626c088c0a5f4768cf68a Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 08:37:02 -0500 Subject: [PATCH 415/529] remove no longer generated files --- dat/GENFILES | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/dat/GENFILES b/dat/GENFILES index c360d940f..1a49c97a2 100755 --- a/dat/GENFILES +++ b/dat/GENFILES @@ -9,17 +9,17 @@ ($dir = $0) =~ s!^(.*/)(.*)!$1!; -print "T (files generated by lev_comp at playground creation time)\n"; - -foreach $des (<$dir*.des>){ - open IN, "<", $des or warn("Can't open $des: $!"); - while(){ - m/^(MAZE|LEVEL):\s*"(.*?)"/ && do { - print "F $2.lev\n"; - }; - } - close IN; -} +#print "T (files generated by lev_comp at playground creation time)\n"; +# +#foreach $des (<$dir*.des>){ +# open IN, "<", $des or warn("Can't open $des: $!"); +# while(){ +# m/^(MAZE|LEVEL):\s*"(.*?)"/ && do { +# print "F $2.lev\n"; +# }; +# } +# close IN; +#} while(){ print; } @@ -41,10 +41,6 @@ T (files generated for win32 gui at compile time) F guioptions T (files generated by makedefs at playground creation time) F data -F dungeon.pdf F options F oracles -F quest.dat F rumors -T (file generated by dgn_comp at playground creation time) -F dungeon From a701c5870d9941a34ec3d1e73f206f0dc4a4c2cf Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 11:52:21 -0500 Subject: [PATCH 416/529] quiet a number of macosx warnings --- src/bones.c | 2 +- src/dungeon.c | 7 +- src/engrave.c | 2 +- src/light.c | 2 +- src/mkmaze.c | 2 +- src/nhlua.c | 4 +- src/o_init.c | 2 +- src/region.c | 8 +- src/restore.c | 24 +- src/sfascii.c | 80 +- src/sp_lev.c | 2 +- src/timeout.c | 2 +- src/worm.c | 2 +- sys/unix/NetHack.xcodeproj/project.pbxproj | 785 +++++------------- .../xcshareddata/xcschemes/NetHack.xcscheme | 10 +- .../xcshareddata/xcschemes/makedefs.xcscheme | 10 +- .../xcshareddata/xcschemes/recover.xcscheme | 10 +- 17 files changed, 340 insertions(+), 614 deletions(-) diff --git a/src/bones.c b/src/bones.c index 1e55db088..f1ec5a8a3 100644 --- a/src/bones.c +++ b/src/bones.c @@ -599,7 +599,7 @@ getbones() { int ok, i; NHFILE *nhfp = (NHFILE *) 0; - char c, *bonesid, oldbonesid[40]; /* was [10]; more should be safer */ + char c = 0, *bonesid, oldbonesid[40]; /* was [10]; more should be safer */ if (discover) /* save bones files for real games */ return 0; diff --git a/src/dungeon.c b/src/dungeon.c index ae6e6866b..93486b6b4 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -221,7 +221,7 @@ restore_dungeon(nhfp) NHFILE *nhfp; { branch *curr, *last; - int count, i; + int count = 0, i; mapseen *curr_ms, *last_ms; if (nhfp->structlevel) { @@ -808,13 +808,12 @@ init_dungeons() const char *const dgnaligns[] = { "unaligned", "noalign", "lawful", "neutral", "chaotic", NULL}; const int dgnaligns2i[] = { D_ALIGN_NONE, D_ALIGN_NONE, D_ALIGN_LAWFUL, D_ALIGN_NEUTRAL, D_ALIGN_CHAOTIC, D_ALIGN_NONE }; lua_State *L; - register int i, cl = 0, cb = 0; + register int i, cl = 0; register s_level *x; struct proto_dungeon pd; struct level_map *lev_map; int tidx; - nhUse(cb); (void) memset(&pd, 0, sizeof(struct proto_dungeon)); pd.n_levs = pd.n_brs = 0; @@ -2486,7 +2485,7 @@ static mapseen * load_mapseen(nhfp) NHFILE *nhfp; { - int i, branchnum, brindx; + int i, branchnum = 0, brindx; mapseen *load; branch *curr; diff --git a/src/engrave.c b/src/engrave.c index b50425cbf..ca8a1bc1b 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -1218,7 +1218,7 @@ rest_engravings(nhfp) NHFILE *nhfp; { struct engr *ep; - unsigned lth; + unsigned lth = 0; head_engr = 0; while (1) { diff --git a/src/light.c b/src/light.c index 2fd09425a..4a7551c05 100644 --- a/src/light.c +++ b/src/light.c @@ -373,7 +373,7 @@ void restore_light_sources(nhfp) NHFILE *nhfp; { - int count; + int count = 0; light_source *ls; /* restore elements */ diff --git a/src/mkmaze.c b/src/mkmaze.c index b5fd346fd..e32bb245f 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -1602,7 +1602,7 @@ restore_waterlevel(nhfp) NHFILE *nhfp; { struct bubble *b = (struct bubble *) 0, *btmp; - int i, n; + int i, n = 0; if (!Is_waterlevel(&u.uz) && !Is_airlevel(&u.uz)) return; diff --git a/src/nhlua.c b/src/nhlua.c index d573f8db4..a314bb657 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -575,7 +575,7 @@ const char *name; ltyp = lua_type(L, -1); if (ltyp == LUA_TSTRING) { const char *const boolstr[] = { "true", "false", "yes", "no", NULL }; - const int boolstr2i[] = { TRUE, FALSE, TRUE, FALSE, -1 }; + /* const int boolstr2i[] = { TRUE, FALSE, TRUE, FALSE, -1 }; */ ret = luaL_checkoption(L, -1, NULL, boolstr); nhUse(boolstr2i[0]); @@ -908,7 +908,7 @@ const char *name; const char * get_lua_version() { - size_t len; + size_t len = (size_t) 0; const char *vs = (const char *) 0; lua_State *L; diff --git a/src/o_init.c b/src/o_init.c index 35b268c17..85b39daf9 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -339,7 +339,7 @@ restnames(nhfp) NHFILE *nhfp; { int i, j; - unsigned int len; + unsigned int len = 0; if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) g.bases, sizeof g.bases); diff --git a/src/region.c b/src/region.c index 63cb9ca29..548486d82 100644 --- a/src/region.c +++ b/src/region.c @@ -428,7 +428,7 @@ boolean in_out_region(x, y) xchar x, y; { - int i, f_indx; + int i, f_indx = 0; /* First check if hero can do the move */ for (i = 0; i < g.n_regions; i++) { @@ -483,7 +483,7 @@ m_in_out_region(mon, x, y) struct monst *mon; xchar x, y; { - int i, f_indx; + int i, f_indx = 0; /* First check if mon can do the move */ for (i = 0; i < g.n_regions; i++) { @@ -752,8 +752,8 @@ NHFILE *nhfp; boolean ghostly; /* If a bones file restore */ { int i, j; - unsigned n; - long tmstamp; + unsigned n = 0; + long tmstamp = 0L; char *msg_buf; clear_regions(); /* Just for security */ diff --git a/src/restore.c b/src/restore.c index 181f6c426..1cab78c8c 100644 --- a/src/restore.c +++ b/src/restore.c @@ -122,7 +122,7 @@ static void restlevchn(nhfp) NHFILE *nhfp; { - int cnt; + int cnt = 0; s_level *tmplev, *x; g.sp_levchn = (s_level *) 0; @@ -154,7 +154,7 @@ restdamage(nhfp, ghostly) NHFILE *nhfp; boolean ghostly; { - unsigned int dmgcount; + unsigned int dmgcount = 0; int counter; struct damage *tmp_dam; @@ -208,7 +208,7 @@ restobj(nhfp, otmp) NHFILE *nhfp; struct obj *otmp; { - int buflen; + int buflen = 0; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) otmp, sizeof(struct obj)); @@ -300,7 +300,7 @@ boolean ghostly, frozen; { register struct obj *otmp, *otmp2 = 0; register struct obj *first = (struct obj *) 0; - int buflen; + int buflen = 0; while (1) { if (nhfp->structlevel) @@ -389,7 +389,7 @@ restmon(nhfp, mtmp) NHFILE *nhfp; struct monst *mtmp; { - int buflen; + int buflen = 0; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) mtmp, sizeof(struct monst)); @@ -491,7 +491,7 @@ boolean ghostly; { register struct monst *mtmp, *mtmp2 = 0; register struct monst *first = (struct monst *) 0; - int offset, buflen; + int offset, buflen = 0; while (1) { if (nhfp->structlevel) @@ -633,7 +633,7 @@ unsigned int *stuckid, *steedid; struct obj *otmp; struct obj *bc_obj; char timebuf[15]; - unsigned long uid; + unsigned long uid = 0; boolean defer_perm_invent; if (nhfp->fieldlevel && nhfp->addinfo) @@ -971,7 +971,7 @@ dorecover(nhfp) NHFILE *nhfp; { unsigned int stuckid = 0, steedid = 0; /* not a register */ - xchar ltmp; + xchar ltmp = 0; int rtmp; struct obj *otmp; @@ -1126,7 +1126,7 @@ NHFILE *nhfp; struct cemetery **cemeteryaddr; { struct cemetery *bonesinfo, **bonesaddr; - int cflag; + int cflag = 0; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &cflag, sizeof cflag); @@ -1223,8 +1223,8 @@ boolean ghostly; register struct monst *mtmp; long elapsed; branch *br; - int hpid; - xchar dlvl; + int hpid = 0; + xchar dlvl = 0; int x, y; #ifdef TOS short tlev; @@ -1472,7 +1472,7 @@ static void restore_msghistory(nhfp) NHFILE *nhfp; { - int msgsize, msgcount = 0; + int msgsize = 0, msgcount = 0; char msg[BUFSZ]; while (1) { diff --git a/src/sfascii.c b/src/sfascii.c index 4dcc990d4..0a85ed209 100644 --- a/src/sfascii.c +++ b/src/sfascii.c @@ -89,9 +89,9 @@ const char *myparent UNUSED; const char *myname UNUSED; int cnt UNUSED; { - const char *parent = "any"; + /* const char *parent = "any"; */ - nhUse(parent); + /* nhUse(parent); */ Sprintf(outbuf, "%llx", (unsigned long long) d_any->a_void); put_savefield(nhfp, outbuf, BUFSZ); @@ -139,9 +139,11 @@ const char *myname UNUSED; int cnt UNUSED; { int itmp; +#if 0 const char *parent = "aligntyp"; nhUse(parent); +#endif itmp = (int) *d_aligntyp; Sprintf(outbuf, "%d", (short) itmp); put_savefield(nhfp, outbuf, BUFSZ); @@ -155,9 +157,11 @@ const char *myparent UNUSED; const char *myname UNUSED; int cnt UNUSED; { +#if 0 const char *parent = "bitfield"; nhUse(parent); +#endif /* for bitfields, cnt is the number of bits, not an array */ Sprintf(outbuf, "%hu", (unsigned short) *d_bitfield); put_savefield(nhfp, outbuf, BUFSZ); @@ -172,9 +176,11 @@ const char *myname UNUSED; int cnt; { int i; +#if 0 const char *parent = "boolean"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { if (nhfp->fpdebug) fprintf(nhfp->fpdebug, "(%s)\n", (*d_boolean) ? "TRUE" : "FALSE"); @@ -193,9 +199,11 @@ const char *myname UNUSED; int cnt; { int i = cnt; +#if 0 const char *parent = "char"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { if (nhfp->fpdebug) fprintf(nhfp->fpdebug, "(%s)\n", d_char ? d_char : ""); @@ -216,9 +224,11 @@ int cnt; int i; unsigned long tmp; char *byteptr = (char *) d_genericptr; +#if 0 const char *parent = "genericptr"; nhUse(parent); +#endif /* * sbrooms is an array of pointers to mkroom. * That array dimension is MAX_SUBROOMS. @@ -246,9 +256,11 @@ const char *myname UNUSED; int cnt; { int i; +#if 0 const char *parent = "int"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { Sprintf(outbuf, "%d", *d_int); put_savefield(nhfp, outbuf, BUFSZ); @@ -265,9 +277,11 @@ const char *myname UNUSED; int cnt; { int i; +#if 0 const char *parent = "long"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { Sprintf(outbuf, "%ld", *d_long); put_savefield(nhfp, outbuf, BUFSZ); @@ -284,9 +298,11 @@ const char *myname UNUSED; int cnt; { int i, itmp; +#if 0 const char *parent = "schar"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { itmp = (int) *d_schar; Sprintf(outbuf, "%d", itmp); @@ -304,9 +320,11 @@ const char *myname UNUSED; int cnt; { int i; +#if 0 const char *parent = "short"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { Sprintf(outbuf, "%hd", *d_short); put_savefield(nhfp, outbuf, BUFSZ); @@ -323,9 +341,11 @@ const char *myname UNUSED; int cnt; { int i; +#if 0 const char *parent = "size_t"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { unsigned long ul = (unsigned long) *d_size_t; @@ -343,9 +363,11 @@ const char *myparent UNUSED; const char *myname UNUSED; int cnt UNUSED; { +#if 0 const char *parent = "time_t"; nhUse(parent); +#endif Sprintf(outbuf, "%s", yyyymmddhhmmss(*d_time_t)); put_savefield(nhfp, outbuf, BUFSZ); } @@ -370,9 +392,11 @@ const char *myname UNUSED; int cnt; { int i; +#if 0 const char *parent = "uchar"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { unsigned short us = (unsigned short) *d_uchar; @@ -391,9 +415,11 @@ const char *myname UNUSED; int cnt; { int i; +#if 0 const char *parent = "uint"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { Sprintf(outbuf, "%u", *d_uint); put_savefield(nhfp, outbuf, BUFSZ); @@ -410,9 +436,11 @@ const char *myname UNUSED; int cnt; { int i; +#if 0 const char *parent = "ulong"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { Sprintf(outbuf, "%lu", *d_ulong); put_savefield(nhfp, outbuf, BUFSZ); @@ -429,9 +457,11 @@ const char *myname UNUSED; int cnt; { int i; +#if 0 const char *parent = "ushort"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { Sprintf(outbuf, "%hu", *d_ushort); put_savefield(nhfp, outbuf, BUFSZ); @@ -448,9 +478,11 @@ const char *myname UNUSED; int cnt; { int i; +#if 0 const char *parent = "xchar"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { short tmp; @@ -472,10 +504,14 @@ const char *myname UNUSED; int cnt; { int i, j, intval; +#if 0 const char *parent = "str"; +#endif char sval[QBUFSZ], *src = d_str, *dest = strbuf; +#if 0 nhUse(parent); +#endif /* cnt is the number of characters */ for (i = 0; i < cnt; ++i) { if ((*src < 32) || (*src == '\\') || (*src > 127)) { @@ -527,9 +563,11 @@ int cnt UNUSED; { char *rstr; long long tmp; +#if 0 const char *parent = "any"; nhUse(parent); +#endif rstr = get_savefield(nhfp, linebuf, BUFSZ); tmp = atoll(rstr); d_any->a_void = (void *) tmp; @@ -582,9 +620,11 @@ int cnt UNUSED; char *rstr; aligntyp tmp; long long lltmp; +#if 0 const char *parent = "aligntyp"; nhUse(parent); +#endif rstr = get_savefield(nhfp, linebuf, BUFSZ); lltmp = atoll(rstr); tmp = (aligntyp) lltmp; @@ -606,9 +646,11 @@ int cnt UNUSED; { char *rstr; uint8_t tmp; +#if 0 const char *parent = "bitfield"; nhUse(parent); +#endif /* cnt is the number of bits in the bitfield, not an array dimension */ rstr = get_savefield(nhfp, linebuf, BUFSZ); tmp = (uint8_t) atoi(rstr); @@ -630,9 +672,11 @@ int cnt; { char *rstr; int i; +#if 0 const char *parent = "boolean"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); #ifdef SAVEFILE_DEBUGGING @@ -660,9 +704,11 @@ int cnt; char *rstr; int i; char tmp; +#if 0 const char *parent = "char"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); tmp = (char) atoi(rstr); @@ -687,11 +733,15 @@ int cnt; int i; long long lltmp; char *rstr; +#if 0 const char *parent = "genericptr"; +#endif static const char *glorkum = "glorkum"; char *byteptr = (char *) d_genericptr; +#if 0 nhUse(parent); +#endif /* * sbrooms is an array of pointers to mkroom. * That array dimension is MAX_SUBROOMS. @@ -723,9 +773,11 @@ int cnt; int i, tmp; char *rstr; long long lltmp; +#if 0 const char *parent = "int"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); lltmp = atoll(rstr); @@ -752,9 +804,11 @@ int cnt; long tmp; long long lltmp; char *rstr; +#if 0 const char *parent = "long"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); lltmp = atoll(rstr); @@ -780,9 +834,11 @@ int cnt; int i; schar tmp; char *rstr; +#if 0 const char *parent = "schar"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); tmp = (schar) atoi(rstr); @@ -807,9 +863,11 @@ int cnt; int i; short tmp; char *rstr; +#if 0 const char *parent = "short"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); tmp = (short) atoi(rstr); @@ -834,9 +892,11 @@ int cnt; int i; size_t tmp; char *rstr; +#if 0 const char *parent = "size_t"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); tmp = (size_t) atol(rstr); @@ -861,9 +921,11 @@ int cnt UNUSED; int i; time_t tmp; char *rstr; +#if 0 const char *parent = "time_t"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); tmp = time_from_yyyymmddhhmmss(rstr); @@ -900,9 +962,11 @@ int cnt; uchar tmp; int i, itmp; char *rstr; +#if 0 const char *parent = "uchar"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); itmp = atoi(rstr); @@ -929,9 +993,11 @@ int cnt; char *rstr; unsigned int tmp; long long lltmp; +#if 0 const char *parent = "uint"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); lltmp = atoll(rstr); @@ -958,9 +1024,11 @@ int cnt; unsigned long tmp; long long lltmp; char *rstr; +#if 0 const char *parent = "ulong"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); lltmp = atoll(rstr); @@ -987,9 +1055,11 @@ int cnt; short tmp; long long lltmp; char *rstr; +#if 0 const char *parent = "ushort"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); lltmp = atoll(rstr); @@ -1015,9 +1085,11 @@ int cnt; xchar tmp; int i, itmp; char *rstr; +#if 0 const char *parent = "xchar"; nhUse(parent); +#endif for (i = 0; i < cnt; ++i) { rstr = get_savefield(nhfp, linebuf, BUFSZ); itmp = atoi(rstr); @@ -1044,14 +1116,18 @@ int cnt; { int i, j, sval; char n[4], *rstr; +#if 0 const char *parent = "str"; +#endif char *src, *dest; #ifdef SAVEFILE_DEBUGGING boolean match; char testbuf[BUFSZ]; #endif +#if 0 nhUse(parent); +#endif /* cnt is the length of the string */ rstr = get_savefield(nhfp, strbuf, BUFSZ * 4); src = rstr; diff --git a/src/sp_lev.c b/src/sp_lev.c index c759dd318..94a829938 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -5203,7 +5203,7 @@ TODO: g.coder->croom needs to be updated const int l_or_r2i[] = { LEFT, H_LEFT, CENTER, H_RIGHT, RIGHT, -1, -1 }; const char *const top_or_bot[] = { "top", "center", "bottom", "none", NULL }; const int t_or_b2i[] = { TOP, CENTER, BOTTOM, -1, -1 }; - int lr, tb, keepregion = 1, x, y; + int lr, tb, keepregion = 1, x = -1, y = -1; char *tmps, *mapdata; int mapwid, maphei = 0; int argc = lua_gettop(L); diff --git a/src/timeout.c b/src/timeout.c index fb9863a9e..894167da1 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -2383,7 +2383,7 @@ int range; boolean ghostly; /* restoring from a ghost level */ long adjust; /* how much to adjust timeout */ { - int count; + int count = 0; timer_element *curr; if (range == RANGE_GLOBAL) { diff --git a/src/worm.c b/src/worm.c index 0d14c83a0..7c338bb43 100644 --- a/src/worm.c +++ b/src/worm.c @@ -544,7 +544,7 @@ void rest_worm(nhfp) NHFILE *nhfp; { - int i, j, count; + int i, j, count = 0; struct wseg *curr, *temp; for (i = 1; i < MAX_NUM_WORMS; i++) { diff --git a/sys/unix/NetHack.xcodeproj/project.pbxproj b/sys/unix/NetHack.xcodeproj/project.pbxproj index 19e24bee6..17f12cf5b 100644 --- a/sys/unix/NetHack.xcodeproj/project.pbxproj +++ b/sys/unix/NetHack.xcodeproj/project.pbxproj @@ -7,8 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 3192867C21A3ACAC00325BEB /* lev_comp.y in Sources */ = {isa = PBXBuildFile; fileRef = 3192867B21A3ACAB00325BEB /* lev_comp.y */; }; - 3192867E21A3ACB800325BEB /* lev_comp.l in Sources */ = {isa = PBXBuildFile; fileRef = 3192867D21A3ACB800325BEB /* lev_comp.l */; }; 31B8A30C21A20D8B0055BD01 /* makedefs.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A30B21A20D8B0055BD01 /* makedefs.c */; }; 31B8A30F21A20DC10055BD01 /* objects.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A30D21A20DC10055BD01 /* objects.c */; }; 31B8A31021A20DC10055BD01 /* monst.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A30E21A20DC10055BD01 /* monst.c */; }; @@ -139,89 +137,24 @@ 31B8A41721A243E80055BD01 /* libncurses.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 31B8A41521A243CC0055BD01 /* libncurses.tbd */; }; 31B8A41821A2448C0055BD01 /* monst.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A30E21A20DC10055BD01 /* monst.c */; }; 31B8A41921A244940055BD01 /* objects.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A30D21A20DC10055BD01 /* objects.c */; }; - 31B8A42921A267E60055BD01 /* lev_yacc.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A42521A267E60055BD01 /* lev_yacc.c */; }; - 31B8A42A21A267E60055BD01 /* lev_lex.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A42621A267E60055BD01 /* lev_lex.c */; }; - 31B8A42B21A267E60055BD01 /* panic.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A42721A267E60055BD01 /* panic.c */; }; - 31B8A42C21A267E60055BD01 /* lev_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A42821A267E60055BD01 /* lev_main.c */; }; - 31B8A42D21A267F50055BD01 /* alloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A36521A238040055BD01 /* alloc.c */; }; - 31B8A42E21A2680B0055BD01 /* drawing.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A33621A238010055BD01 /* drawing.c */; }; - 31B8A42F21A2681E0055BD01 /* decl.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A34621A238020055BD01 /* decl.c */; }; - 31B8A43021A268370055BD01 /* monst.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A30E21A20DC10055BD01 /* monst.c */; }; - 31B8A43121A268420055BD01 /* objects.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A30D21A20DC10055BD01 /* objects.c */; }; - 31B8A44321A269EA0055BD01 /* dgn_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A44221A269EA0055BD01 /* dgn_main.c */; }; - 31B8A44421A26A020055BD01 /* panic.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A42721A267E60055BD01 /* panic.c */; }; - 31B8A44521A26A0A0055BD01 /* alloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A36521A238040055BD01 /* alloc.c */; }; 31B8A45221A26A750055BD01 /* recover.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A45121A26A750055BD01 /* recover.c */; }; 31B8A45E21A26ACF0055BD01 /* dlb.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A3E321A238B30055BD01 /* dlb.c */; }; 31B8A46021A26AE70055BD01 /* dlb_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A45F21A26AE70055BD01 /* dlb_main.c */; }; 31B8A46121A26AF60055BD01 /* panic.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A42721A267E60055BD01 /* panic.c */; }; 31B8A46221A26B020055BD01 /* alloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A36521A238040055BD01 /* alloc.c */; }; - 31B8A46621A2820F0055BD01 /* dgn_comp.y in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A46421A278AC0055BD01 /* dgn_comp.y */; }; - 31B8A46921A288770055BD01 /* dgn_comp.l in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A46821A288770055BD01 /* dgn_comp.l */; }; + 544768A323994965004B9739 /* sfascii.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768A223994965004B9739 /* sfascii.c */; }; + 544768A5239949A8004B9739 /* sfbase.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768A4239949A8004B9739 /* sfbase.c */; }; + 544768A9239949FA004B9739 /* sfdata.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768A6239949FA004B9739 /* sfdata.c */; }; + 544768AA239949FA004B9739 /* sflendian.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768A7239949FA004B9739 /* sflendian.c */; }; + 544768AB239949FA004B9739 /* sfstruct.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768A8239949FA004B9739 /* sfstruct.c */; }; + 544768AE23994A17004B9739 /* nhlsel.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768AC23994A17004B9739 /* nhlsel.c */; }; + 544768AF23994A17004B9739 /* nhlua.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768AD23994A17004B9739 /* nhlua.c */; }; + 544768B123994A2C004B9739 /* mdlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768B023994A2C004B9739 /* mdlib.c */; }; + 544768BA23995BB7004B9739 /* liblua.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 544768B923995BB7004B9739 /* liblua.a */; }; 54FCE8292223261F00F393C8 /* isaac64.c in Sources */ = {isa = PBXBuildFile; fileRef = 54FCE8282223261F00F393C8 /* isaac64.c */; }; /* End PBXBuildFile section */ -/* Begin PBXBuildRule section */ - 317E7C5221A3774F00F6E4E5 /* PBXBuildRule */ = { - isa = PBXBuildRule; - compilerSpec = com.apple.compilers.proxy.script; - fileType = sourcecode.yacc; - isEditable = 1; - outputFiles = ( - "$(NH_INC_DIR)/lev_comp.h", - "$(NH_UTIL_DIR)/lev_yacc.c", - ); - script = "cd ${NH_UTIL_DIR}\nbison -o lev_yacc.c -d lev_comp.y\nmv lev_yacc.h ${NH_INC_DIR}/lev_comp.h \n"; - }; - 317E7C5321A3796200F6E4E5 /* PBXBuildRule */ = { - isa = PBXBuildRule; - compilerSpec = com.apple.compilers.proxy.script; - fileType = sourcecode.lex; - isEditable = 1; - outputFiles = ( - "$(NH_UTIL_DIR)/lev_lex.c", - ); - script = "cd ${NH_UTIL_DIR}\nlex -o lev_lex.c lev_comp.l\nsed -e 's# *$$##' -e 's#static void yyunput#void yyunput#' lev_lex.c > lev_lex.x\nmv lev_lex.x lev_lex.c\n"; - }; - 31B8A46321A270680055BD01 /* PBXBuildRule */ = { - isa = PBXBuildRule; - compilerSpec = com.apple.compilers.proxy.script; - filePatterns = dgn_comp.y; - fileType = sourcecode.yacc; - isEditable = 1; - outputFiles = ( - "$(NH_UTIL_DIR)/dgn_yacc.c", - "$(NH_INC_DIR)/dgn_comp.h", - ); - script = "cd ${NH_UTIL_DIR}\nbison -o dgn_yacc.c -d dgn_comp.y\nmv dgn_yacc.h ${NH_INC_DIR}/dgn_comp.h \n"; - }; - 31B8A46721A286E70055BD01 /* PBXBuildRule */ = { - isa = PBXBuildRule; - compilerSpec = com.apple.compilers.proxy.script; - fileType = sourcecode.lex; - isEditable = 1; - outputFiles = ( - "$(NH_UTIL_DIR)/dgn_lex.c", - ); - script = "cd ${NH_UTIL_DIR}\nlex -o dgn_lex.c dgn_comp.l\nsed -e 's# *$$##' -e 's#static void yyunput#void yyunput#' dgn_lex.c > dgn_lex.x\nmv dgn_lex.x dgn_lex.c\n"; - }; -/* End PBXBuildRule section */ - /* Begin PBXContainerItemProxy section */ - 316B91C621A3BD5000EC3E81 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 3189576921A1FCC100FB2ABE /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3189577E21A1FDA400FB2ABE; - remoteInfo = makedefs; - }; - 316B91C821A3BD5C00EC3E81 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 3189576921A1FCC100FB2ABE /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3189577E21A1FDA400FB2ABE; - remoteInfo = makedefs; - }; 316B91CA21A3BD7C00EC3E81 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 3189576921A1FCC100FB2ABE /* Project object */; @@ -250,20 +183,6 @@ remoteGlobalIDString = 31B8A45621A26A970055BD01; remoteInfo = dlb; }; - 3192867721A3AB0400325BEB /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 3189576921A1FCC100FB2ABE /* Project object */; - proxyType = 1; - remoteGlobalIDString = 31B8A43521A268DF0055BD01; - remoteInfo = dgn_comp; - }; - 3192867921A3AB0800325BEB /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 3189576921A1FCC100FB2ABE /* Project object */; - proxyType = 1; - remoteGlobalIDString = 31B8A41D21A2669A0055BD01; - remoteInfo = lev_comp; - }; 31B8A31321A2355C0055BD01 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 3189576921A1FCC100FB2ABE /* Project object */; @@ -292,24 +211,6 @@ ); runOnlyForDeploymentPostprocessing = 1; }; - 31B8A41C21A2669A0055BD01 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; - 31B8A43421A268DF0055BD01 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; 31B8A44821A26A4B0055BD01 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -572,12 +473,10 @@ 31B8A40921A23EEB0055BD01 /* cursstat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cursstat.c; path = ../../win/curses/cursstat.c; sourceTree = ""; }; 31B8A40A21A23EEB0055BD01 /* curswins.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = curswins.c; path = ../../win/curses/curswins.c; sourceTree = ""; }; 31B8A41521A243CC0055BD01 /* libncurses.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libncurses.tbd; path = usr/lib/libncurses.tbd; sourceTree = SDKROOT; }; - 31B8A41E21A2669A0055BD01 /* lev_comp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = lev_comp; sourceTree = BUILT_PRODUCTS_DIR; }; 31B8A42521A267E60055BD01 /* lev_yacc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lev_yacc.c; path = ../../util/lev_yacc.c; sourceTree = ""; }; 31B8A42621A267E60055BD01 /* lev_lex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lev_lex.c; path = ../../util/lev_lex.c; sourceTree = ""; }; 31B8A42721A267E60055BD01 /* panic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = panic.c; path = ../../util/panic.c; sourceTree = ""; }; 31B8A42821A267E60055BD01 /* lev_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lev_main.c; path = ../../util/lev_main.c; sourceTree = ""; }; - 31B8A43621A268DF0055BD01 /* dgn_comp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = dgn_comp; sourceTree = BUILT_PRODUCTS_DIR; }; 31B8A43D21A2699B0055BD01 /* dgn_yacc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dgn_yacc.c; path = ../../util/dgn_yacc.c; sourceTree = ""; }; 31B8A44021A269C80055BD01 /* dgn_lex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dgn_lex.c; path = ../../util/dgn_lex.c; sourceTree = ""; }; 31B8A44221A269EA0055BD01 /* dgn_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dgn_main.c; path = ../../util/dgn_main.c; sourceTree = ""; }; @@ -587,6 +486,19 @@ 31B8A45F21A26AE70055BD01 /* dlb_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dlb_main.c; path = ../../util/dlb_main.c; sourceTree = ""; }; 31B8A46421A278AC0055BD01 /* dgn_comp.y */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; name = dgn_comp.y; path = ../../util/dgn_comp.y; sourceTree = ""; }; 31B8A46821A288770055BD01 /* dgn_comp.l */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; name = dgn_comp.l; path = ../../util/dgn_comp.l; sourceTree = ""; }; + 544768A223994965004B9739 /* sfascii.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sfascii.c; path = ../../src/sfascii.c; sourceTree = ""; }; + 544768A4239949A8004B9739 /* sfbase.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sfbase.c; path = ../../src/sfbase.c; sourceTree = ""; }; + 544768A6239949FA004B9739 /* sfdata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sfdata.c; path = ../../src/sfdata.c; sourceTree = ""; }; + 544768A7239949FA004B9739 /* sflendian.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sflendian.c; path = ../../src/sflendian.c; sourceTree = ""; }; + 544768A8239949FA004B9739 /* sfstruct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sfstruct.c; path = ../../src/sfstruct.c; sourceTree = ""; }; + 544768AC23994A17004B9739 /* nhlsel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nhlsel.c; path = ../../src/nhlsel.c; sourceTree = ""; }; + 544768AD23994A17004B9739 /* nhlua.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nhlua.c; path = ../../src/nhlua.c; sourceTree = ""; }; + 544768B023994A2C004B9739 /* mdlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mdlib.c; path = ../../src/mdlib.c; sourceTree = ""; }; + 544768B423995447004B9739 /* isaac64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = isaac64.h; path = ../../include/isaac64.h; sourceTree = ""; }; + 544768B523995488004B9739 /* nhlua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = nhlua.h; path = ../../include/nhlua.h; sourceTree = ""; }; + 544768B623995488004B9739 /* sfprocs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sfprocs.h; path = ../../include/sfprocs.h; sourceTree = ""; }; + 544768B723995488004B9739 /* sfproto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sfproto.h; path = ../../include/sfproto.h; sourceTree = ""; }; + 544768B923995BB7004B9739 /* liblua.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblua.a; path = ../../lib/lua/liblua.a; sourceTree = ""; }; 54FCE8282223261F00F393C8 /* isaac64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = isaac64.c; path = ../../src/isaac64.c; sourceTree = ""; }; /* End PBXFileReference section */ @@ -596,6 +508,7 @@ buildActionMask = 2147483647; files = ( 31B8A41721A243E80055BD01 /* libncurses.tbd in Frameworks */, + 544768BA23995BB7004B9739 /* liblua.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -606,20 +519,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 31B8A41B21A2669A0055BD01 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 31B8A43321A268DF0055BD01 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; 31B8A44721A26A4B0055BD01 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -656,8 +555,6 @@ children = ( 3189577121A1FCC100FB2ABE /* NetHack */, 3189577F21A1FDA400FB2ABE /* makedefs */, - 31B8A41E21A2669A0055BD01 /* lev_comp */, - 31B8A43621A268DF0055BD01 /* dgn_comp */, 31B8A44A21A26A4B0055BD01 /* recover */, 31B8A45721A26A970055BD01 /* dlb */, ); @@ -667,6 +564,14 @@ 3189578C21A1FF8200FB2ABE /* src */ = { isa = PBXGroup; children = ( + 544768B023994A2C004B9739 /* mdlib.c */, + 544768AC23994A17004B9739 /* nhlsel.c */, + 544768AD23994A17004B9739 /* nhlua.c */, + 544768A6239949FA004B9739 /* sfdata.c */, + 544768A7239949FA004B9739 /* sflendian.c */, + 544768A8239949FA004B9739 /* sfstruct.c */, + 544768A4239949A8004B9739 /* sfbase.c */, + 544768A223994965004B9739 /* sfascii.c */, 31B8A35521A238030055BD01 /* allmain.c */, 31B8A36521A238040055BD01 /* alloc.c */, 31B8A35E21A238040055BD01 /* apply.c */, @@ -804,6 +709,10 @@ 3189579621A2046700FB2ABE /* include */ = { isa = PBXGroup; children = ( + 544768B523995488004B9739 /* nhlua.h */, + 544768B623995488004B9739 /* sfprocs.h */, + 544768B723995488004B9739 /* sfproto.h */, + 544768B423995447004B9739 /* isaac64.h */, 3186A3B721A4B0FD0052BF02 /* align.h */, 3186A38021A4B0FB0052BF02 /* amiconf.h */, 3186A38821A4B0FB0052BF02 /* artifact.h */, @@ -983,6 +892,7 @@ 31B8A41421A243CB0055BD01 /* Frameworks */ = { isa = PBXGroup; children = ( + 544768B923995BB7004B9739 /* liblua.a */, 31B8A41521A243CC0055BD01 /* libncurses.tbd */, ); name = Frameworks; @@ -1007,8 +917,6 @@ ); dependencies = ( 31B8A31421A2355C0055BD01 /* PBXTargetDependency */, - 3192867A21A3AB0800325BEB /* PBXTargetDependency */, - 3192867821A3AB0400325BEB /* PBXTargetDependency */, 3192867621A3AAFE00325BEB /* PBXTargetDependency */, 3192867421A3AAFA00325BEB /* PBXTargetDependency */, ); @@ -1021,14 +929,15 @@ isa = PBXNativeTarget; buildConfigurationList = 3189578321A1FDA400FB2ABE /* Build configuration list for PBXNativeTarget "makedefs" */; buildPhases = ( + 544768B223995106004B9739 /* Build nhlua header */, 3189577B21A1FDA400FB2ABE /* Sources */, 3189577C21A1FDA400FB2ABE /* Frameworks */, 3189577D21A1FDA400FB2ABE /* CopyFiles */, 317E7C4B21A35F0500F6E4E5 /* Copy makedefs */, 319CBA3821A3458100150830 /* Build data */, 317E7C4521A3548F00F6E4E5 /* Build rumors */, - 317E7C4621A355E700F6E4E5 /* Build quest.dat */, 317E7C4E21A3697300F6E4E5 /* Build options and headers */, + 544768B8239954B9004B9739 /* Build Lua library */, 317E7C4F21A36A5700F6E4E5 /* Build engrave, epitaph and bogusmon */, 3192867F21A3AF8000325BEB /* Build oracles */, ); @@ -1041,51 +950,6 @@ productReference = 3189577F21A1FDA400FB2ABE /* makedefs */; productType = "com.apple.product-type.tool"; }; - 31B8A41D21A2669A0055BD01 /* lev_comp */ = { - isa = PBXNativeTarget; - buildConfigurationList = 31B8A42221A2669A0055BD01 /* Build configuration list for PBXNativeTarget "lev_comp" */; - buildPhases = ( - 31B8A41A21A2669A0055BD01 /* Sources */, - 31B8A41B21A2669A0055BD01 /* Frameworks */, - 31B8A41C21A2669A0055BD01 /* CopyFiles */, - 317E7C4C21A3625000F6E4E5 /* Copy lev_comp */, - 317E7C4A21A35E9400F6E4E5 /* Build special levels */, - 317E7C4D21A3649B00F6E4E5 /* Build quest levels */, - ); - buildRules = ( - 317E7C5321A3796200F6E4E5 /* PBXBuildRule */, - 317E7C5221A3774F00F6E4E5 /* PBXBuildRule */, - ); - dependencies = ( - 316B91C921A3BD5C00EC3E81 /* PBXTargetDependency */, - ); - name = lev_comp; - productName = lev_comp; - productReference = 31B8A41E21A2669A0055BD01 /* lev_comp */; - productType = "com.apple.product-type.tool"; - }; - 31B8A43521A268DF0055BD01 /* dgn_comp */ = { - isa = PBXNativeTarget; - buildConfigurationList = 31B8A43A21A268E00055BD01 /* Build configuration list for PBXNativeTarget "dgn_comp" */; - buildPhases = ( - 31B8A43221A268DF0055BD01 /* Sources */, - 31B8A43321A268DF0055BD01 /* Frameworks */, - 31B8A43421A268DF0055BD01 /* CopyFiles */, - 317E7C5021A3735300F6E4E5 /* Copy dgn_comp */, - 317E7C5121A373E100F6E4E5 /* Build dungeon */, - ); - buildRules = ( - 31B8A46721A286E70055BD01 /* PBXBuildRule */, - 31B8A46321A270680055BD01 /* PBXBuildRule */, - ); - dependencies = ( - 316B91C721A3BD5000EC3E81 /* PBXTargetDependency */, - ); - name = dgn_comp; - productName = dgn_comp; - productReference = 31B8A43621A268DF0055BD01 /* dgn_comp */; - productType = "com.apple.product-type.tool"; - }; 31B8A44921A26A4B0055BD01 /* recover */ = { isa = PBXNativeTarget; buildConfigurationList = 31B8A44E21A26A4B0055BD01 /* Build configuration list for PBXNativeTarget "recover" */; @@ -1129,7 +993,7 @@ 3189576921A1FCC100FB2ABE /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1010; + LastUpgradeCheck = 1120; ORGANIZATIONNAME = "Bart House"; TargetAttributes = { 3189577021A1FCC100FB2ABE = { @@ -1138,12 +1002,6 @@ 3189577E21A1FDA400FB2ABE = { CreatedOnToolsVersion = 10.1; }; - 31B8A41D21A2669A0055BD01 = { - CreatedOnToolsVersion = 10.1; - }; - 31B8A43521A268DF0055BD01 = { - CreatedOnToolsVersion = 10.1; - }; 31B8A44921A26A4B0055BD01 = { CreatedOnToolsVersion = 10.1; }; @@ -1167,8 +1025,6 @@ targets = ( 3189577021A1FCC100FB2ABE /* NetHack */, 3189577E21A1FDA400FB2ABE /* makedefs */, - 31B8A41D21A2669A0055BD01 /* lev_comp */, - 31B8A43521A268DF0055BD01 /* dgn_comp */, 31B8A44921A26A4B0055BD01 /* recover */, 31B8A45621A26A970055BD01 /* dlb */, ); @@ -1198,57 +1054,6 @@ shellPath = /bin/sh; shellScript = "cd ${NH_DAT_DIR}\n${NH_UTIL_DIR}/makedefs -r\n"; }; - 317E7C4621A355E700F6E4E5 /* Build quest.dat */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(NH_DAT_DIR)/quest.txt", - "$(NH_UTIL_DIR)/makedefs", - ); - name = "Build quest.dat"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(NH_DAT_DIR)/quest.dat", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "cd ${NH_DAT_DIR}\n${NH_UTIL_DIR}/makedefs -q\n\n"; - }; - 317E7C4A21A35E9400F6E4E5 /* Build special levels */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(NH_UTIL_DIR)/lev_comp", - "$(NH_DAT_DIR)/bigroom.des", - "$(NH_DAT_DIR)/castle.des", - "$(NH_DAT_DIR)/endgame.des", - "$(NH_DAT_DIR)/knox.des", - "$(NH_DAT_DIR)/medusa.des", - "$(NH_DAT_DIR)/mines.des", - "$(NH_DAT_DIR)/oracle.des", - "$(NH_DAT_DIR)/sokoban.des", - "$(NH_DAT_DIR)/tower.des", - "$(NH_DAT_DIR)/yendor.des", - ); - name = "Build special levels"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(NH_DAT_DIR)/spec_levs", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "cd ${NH_DAT_DIR}\n${NH_UTIL_DIR}/lev_comp bigroom.des\n${NH_UTIL_DIR}/lev_comp castle.des\n${NH_UTIL_DIR}/lev_comp endgame.des\n${NH_UTIL_DIR}/lev_comp gehennom.des\n${NH_UTIL_DIR}/lev_comp knox.des\n${NH_UTIL_DIR}/lev_comp medusa.des\n${NH_UTIL_DIR}/lev_comp mines.des\n${NH_UTIL_DIR}/lev_comp oracle.des\n${NH_UTIL_DIR}/lev_comp sokoban.des\n${NH_UTIL_DIR}/lev_comp tower.des\n${NH_UTIL_DIR}/lev_comp yendor.des\ntouch spec_levs\n"; - }; 317E7C4B21A35F0500F6E4E5 /* Copy makedefs */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1269,59 +1074,6 @@ shellPath = /bin/sh; shellScript = "cp ${BUILT_PRODUCTS_DIR}/makedefs ${NH_UTIL_DIR}/makedefs\n"; }; - 317E7C4C21A3625000F6E4E5 /* Copy lev_comp */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/lev_comp", - ); - name = "Copy lev_comp"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(NH_UTIL_DIR)/lev_comp", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "cp ${BUILT_PRODUCTS_DIR}/lev_comp ${NH_UTIL_DIR}/lev_comp\n"; - }; - 317E7C4D21A3649B00F6E4E5 /* Build quest levels */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(NH_UTIL_DIR)/lev_comp", - "$(NH_DAT_DIR)/Arch.des", - "$(NH_DAT_DIR)/Barb.des", - "$(NH_DAT_DIR)/Caveman.des", - "$(NH_DAT_DIR)/Healer.des", - "$(NH_DAT_DIR)/Knight.des", - "$(NH_DAT_DIR)/Monk.des", - "$(NH_DAT_DIR)/Priest.des", - "$(NH_DAT_DIR)/Ranger.des", - "$(NH_DAT_DIR)/Rogue.des", - "$(NH_DAT_DIR)/Samurai.des", - "$(NH_DAT_DIR)/Tourist.des", - "$(NH_DAT_DIR)/Valkyrie.des", - "$(NH_DAT_DIR)/Wizard.des", - ); - name = "Build quest levels"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(NH_DAT_DIR)/quest_levs", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "cd ${NH_DAT_DIR}\n${NH_UTIL_DIR}/lev_comp Arch.des\n${NH_UTIL_DIR}/lev_comp Barb.des\n${NH_UTIL_DIR}/lev_comp Caveman.des\n${NH_UTIL_DIR}/lev_comp Healer.des\n${NH_UTIL_DIR}/lev_comp Knight.des\n${NH_UTIL_DIR}/lev_comp Monk.des\n${NH_UTIL_DIR}/lev_comp Priest.des\n${NH_UTIL_DIR}/lev_comp Ranger.des\n${NH_UTIL_DIR}/lev_comp Rogue.des\n${NH_UTIL_DIR}/lev_comp Samurai.des\n${NH_UTIL_DIR}/lev_comp Tourist.des\n${NH_UTIL_DIR}/lev_comp Valkyrie.des\n${NH_UTIL_DIR}/lev_comp Wizard.des\ntouch quest_levs\n"; - }; 317E7C4E21A3697300F6E4E5 /* Build options and headers */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1339,7 +1091,6 @@ "$(NH_UTIL_DIR)/options", "$(NH_INC_DIR)/date.h", "$(NH_INC_DIR)/onames.h", - "$(NH_INC_DIR)/pm.h", "$(NH_INC_DIR)/vis_tab.h", "$(NH_SRC_DIR)/vis_tab.c", ); @@ -1371,48 +1122,6 @@ shellPath = /bin/sh; shellScript = "cd ${NH_DAT_DIR}\n${NH_UTIL_DIR}/makedefs -s\n"; }; - 317E7C5021A3735300F6E4E5 /* Copy dgn_comp */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/dgn_comp", - ); - name = "Copy dgn_comp"; - outputFileListPaths = ( - ); - outputPaths = ( - "${NH_UTIL_DIR}/dgn_comp", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "cp ${BUILT_PRODUCTS_DIR}/dgn_comp ${NH_UTIL_DIR}/dgn_comp\n"; - }; - 317E7C5121A373E100F6E4E5 /* Build dungeon */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(NH_UTIL_DIR)/makedefs", - "$(NH_UTIL_DIR)/dgn_comp", - "$(NH_DAT_DIR)/dungeon.pdf", - ); - name = "Build dungeon"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(NH_DAT_DIR)/dungeon", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "cd ${NH_DAT_DIR}\n${NH_UTIL_DIR}/makedefs -e\n${NH_UTIL_DIR}/dgn_comp dungeon.pdf\n"; - }; 317E7C5421A3804400F6E4E5 /* Build Guidebook */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1444,142 +1153,142 @@ inputFileListPaths = ( ); inputPaths = ( - "$(NH_DAT_DIR)/Arc-fila.lev", - "$(NH_DAT_DIR)/Arc-filb.lev", - "$(NH_DAT_DIR)/Arc-goal.lev", - "$(NH_DAT_DIR)/Arc-loca.lev", - "$(NH_DAT_DIR)/Arc-strt.lev", - "$(NH_DAT_DIR)/Bar-fila.lev", - "$(NH_DAT_DIR)/Bar-filb.lev", - "$(NH_DAT_DIR)/Bar-goal.lev", - "$(NH_DAT_DIR)/Bar-loca.lev", - "$(NH_DAT_DIR)/Bar-strt.lev", - "$(NH_DAT_DIR)/Cav-fila.lev", - "$(NH_DAT_DIR)/Cav-filb.lev", - "$(NH_DAT_DIR)/Cav-goal.lev", - "$(NH_DAT_DIR)/Cav-loca.lev", - "$(NH_DAT_DIR)/Cav-strt.lev", - "$(NH_DAT_DIR)/Hea-fila.lev", - "$(NH_DAT_DIR)/Hea-filb.lev", - "$(NH_DAT_DIR)/Hea-goal.lev", - "$(NH_DAT_DIR)/Hea-loca.lev", - "$(NH_DAT_DIR)/Hea-strt.lev", - "$(NH_DAT_DIR)/Kni-fila.lev", - "$(NH_DAT_DIR)/Kni-filb.lev", - "$(NH_DAT_DIR)/Kni-goal.lev", - "$(NH_DAT_DIR)/Kni-loca.lev", - "$(NH_DAT_DIR)/Kni-strt.lev", - "$(NH_DAT_DIR)/Mon-fila.lev", - "$(NH_DAT_DIR)/Mon-filb.lev", - "$(NH_DAT_DIR)/Mon-goal.lev", - "$(NH_DAT_DIR)/Mon-loca.lev", - "$(NH_DAT_DIR)/Mon-strt.lev", - "$(NH_DAT_DIR)/Pri-fila.lev", - "$(NH_DAT_DIR)/Pri-filb.lev", - "$(NH_DAT_DIR)/Pri-goal.lev", - "$(NH_DAT_DIR)/Pri-loca.lev", - "$(NH_DAT_DIR)/Pri-strt.lev", - "$(NH_DAT_DIR)/Ran-fila.lev", - "$(NH_DAT_DIR)/Ran-filb.lev", - "$(NH_DAT_DIR)/Ran-goal.lev", - "$(NH_DAT_DIR)/Ran-loca.lev", - "$(NH_DAT_DIR)/Ran-strt.lev", - "$(NH_DAT_DIR)/Rog-fila.lev", - "$(NH_DAT_DIR)/Rog-filb.lev", - "$(NH_DAT_DIR)/Rog-goal.lev", - "$(NH_DAT_DIR)/Rog-loca.lev", - "$(NH_DAT_DIR)/Rog-strt.lev", - "$(NH_DAT_DIR)/Sam-fila.lev", - "$(NH_DAT_DIR)/Sam-filb.lev", - "$(NH_DAT_DIR)/Sam-goal.lev", - "$(NH_DAT_DIR)/Sam-loca.lev", - "$(NH_DAT_DIR)/Sam-strt.lev", - "$(NH_DAT_DIR)/Tou-fila.lev", - "$(NH_DAT_DIR)/Tou-filb.lev", - "$(NH_DAT_DIR)/Tou-goal.lev", - "$(NH_DAT_DIR)/Tou-loca.lev", - "$(NH_DAT_DIR)/Tou-strt.lev", - "$(NH_DAT_DIR)/Val-fila.lev", - "$(NH_DAT_DIR)/Val-filb.lev", - "$(NH_DAT_DIR)/Val-goal.lev", - "$(NH_DAT_DIR)/Val-loca.lev", - "$(NH_DAT_DIR)/Val-strt.lev", - "$(NH_DAT_DIR)/Wiz-fila.lev", - "$(NH_DAT_DIR)/Wiz-filb.lev", - "$(NH_DAT_DIR)/Wiz-goal.lev", - "$(NH_DAT_DIR)/Wiz-loca.lev", - "$(NH_DAT_DIR)/Wiz-strt.lev", - "$(NH_DAT_DIR)/air.lev", - "$(NH_DAT_DIR)/asmodeus.lev", - "$(NH_DAT_DIR)/astral.lev", - "$(NH_DAT_DIR)/baalz.lev", - "$(NH_DAT_DIR)/bigrm-1.lev", - "$(NH_DAT_DIR)/bigrm-10.lev", - "$(NH_DAT_DIR)/bigrm-2.lev", - "$(NH_DAT_DIR)/bigrm-3.lev", - "$(NH_DAT_DIR)/bigrm-4.lev", - "$(NH_DAT_DIR)/bigrm-5.lev", - "$(NH_DAT_DIR)/bigrm-6.lev", - "$(NH_DAT_DIR)/bigrm-7.lev", - "$(NH_DAT_DIR)/bigrm-8.lev", - "$(NH_DAT_DIR)/bigrm-9.lev", + "$(NH_DAT_DIR)/Arc-fila.lua", + "$(NH_DAT_DIR)/Arc-filb.lua", + "$(NH_DAT_DIR)/Arc-goal.lua", + "$(NH_DAT_DIR)/Arc-loca.lua", + "$(NH_DAT_DIR)/Arc-strt.lua", + "$(NH_DAT_DIR)/Bar-fila.lua", + "$(NH_DAT_DIR)/Bar-filb.lua", + "$(NH_DAT_DIR)/Bar-goal.lua", + "$(NH_DAT_DIR)/Bar-loca.lua", + "$(NH_DAT_DIR)/Bar-strt.lua", + "$(NH_DAT_DIR)/Cav-fila.lua", + "$(NH_DAT_DIR)/Cav-filb.lua", + "$(NH_DAT_DIR)/Cav-goal.lua", + "$(NH_DAT_DIR)/Cav-loca.lua", + "$(NH_DAT_DIR)/Cav-strt.lua", + "$(NH_DAT_DIR)/Hea-fila.lua", + "$(NH_DAT_DIR)/Hea-filb.lua", + "$(NH_DAT_DIR)/Hea-goal.lua", + "$(NH_DAT_DIR)/Hea-loca.lua", + "$(NH_DAT_DIR)/Hea-strt.lua", + "$(NH_DAT_DIR)/Kni-fila.lua", + "$(NH_DAT_DIR)/Kni-filb.lua", + "$(NH_DAT_DIR)/Kni-goal.lua", + "$(NH_DAT_DIR)/Kni-loca.lua", + "$(NH_DAT_DIR)/Kni-strt.lua", + "$(NH_DAT_DIR)/Mon-fila.lua", + "$(NH_DAT_DIR)/Mon-filb.lua", + "$(NH_DAT_DIR)/Mon-goal.lua", + "$(NH_DAT_DIR)/Mon-loca.lua", + "$(NH_DAT_DIR)/Mon-strt.lua", + "$(NH_DAT_DIR)/Pri-fila.lua", + "$(NH_DAT_DIR)/Pri-filb.lua", + "$(NH_DAT_DIR)/Pri-goal.lua", + "$(NH_DAT_DIR)/Pri-loca.lua", + "$(NH_DAT_DIR)/Pri-strt.lua", + "$(NH_DAT_DIR)/Ran-fila.lua", + "$(NH_DAT_DIR)/Ran-filb.lua", + "$(NH_DAT_DIR)/Ran-goal.lua", + "$(NH_DAT_DIR)/Ran-loca.lua", + "$(NH_DAT_DIR)/Ran-strt.lua", + "$(NH_DAT_DIR)/Rog-fila.lua", + "$(NH_DAT_DIR)/Rog-filb.lua", + "$(NH_DAT_DIR)/Rog-goal.lua", + "$(NH_DAT_DIR)/Rog-loca.lua", + "$(NH_DAT_DIR)/Rog-strt.lua", + "$(NH_DAT_DIR)/Sam-fila.lua", + "$(NH_DAT_DIR)/Sam-filb.lua", + "$(NH_DAT_DIR)/Sam-goal.lua", + "$(NH_DAT_DIR)/Sam-loca.lua", + "$(NH_DAT_DIR)/Sam-strt.lua", + "$(NH_DAT_DIR)/Tou-fila.lua", + "$(NH_DAT_DIR)/Tou-filb.lua", + "$(NH_DAT_DIR)/Tou-goal.lua", + "$(NH_DAT_DIR)/Tou-loca.lua", + "$(NH_DAT_DIR)/Tou-strt.lua", + "$(NH_DAT_DIR)/Val-fila.lua", + "$(NH_DAT_DIR)/Val-filb.lua", + "$(NH_DAT_DIR)/Val-goal.lua", + "$(NH_DAT_DIR)/Val-loca.lua", + "$(NH_DAT_DIR)/Val-strt.lua", + "$(NH_DAT_DIR)/Wiz-fila.lua", + "$(NH_DAT_DIR)/Wiz-filb.lua", + "$(NH_DAT_DIR)/Wiz-goal.lua", + "$(NH_DAT_DIR)/Wiz-loca.lua", + "$(NH_DAT_DIR)/Wiz-strt.lua", + "$(NH_DAT_DIR)/air.lua", + "$(NH_DAT_DIR)/asmodeus.lua", + "$(NH_DAT_DIR)/astral.lua", + "$(NH_DAT_DIR)/baalz.lua", + "$(NH_DAT_DIR)/bigrm-1.lua", + "$(NH_DAT_DIR)/bigrm-10.lua", + "$(NH_DAT_DIR)/bigrm-2.lua", + "$(NH_DAT_DIR)/bigrm-3.lua", + "$(NH_DAT_DIR)/bigrm-4.lua", + "$(NH_DAT_DIR)/bigrm-5.lua", + "$(NH_DAT_DIR)/bigrm-6.lua", + "$(NH_DAT_DIR)/bigrm-7.lua", + "$(NH_DAT_DIR)/bigrm-8.lua", + "$(NH_DAT_DIR)/bigrm-9.lua", "$(NH_DAT_DIR)/bogusmon", - "$(NH_DAT_DIR)/castle.lev", + "$(NH_DAT_DIR)/castle.lua", "$(NH_DAT_DIR)/cmdhelp", "$(NH_DAT_DIR)/data", - "$(NH_DAT_DIR)/dungeon", - "$(NH_DAT_DIR)/earth.lev", + "$(NH_DAT_DIR)/dungeon.lua", + "$(NH_DAT_DIR)/earth.lua", "$(NH_DAT_DIR)/engrave", "$(NH_DAT_DIR)/epitaph", - "$(NH_DAT_DIR)/fakewiz1.lev", - "$(NH_DAT_DIR)/fakewiz2.lev", - "$(NH_DAT_DIR)/fire.lev", + "$(NH_DAT_DIR)/fakewiz1.lua", + "$(NH_DAT_DIR)/fakewiz2.lua", + "$(NH_DAT_DIR)/fire.lua", "$(NH_DAT_DIR)/help", "$(NH_DAT_DIR)/hh", "$(NH_DAT_DIR)/history", - "$(NH_DAT_DIR)/juiblex.lev", + "$(NH_DAT_DIR)/juiblex.lua", "$(NH_DAT_DIR)/keyhelp", - "$(NH_DAT_DIR)/knox.lev", - "$(NH_DAT_DIR)/medusa-1.lev", - "$(NH_DAT_DIR)/medusa-2.lev", - "$(NH_DAT_DIR)/medusa-3.lev", - "$(NH_DAT_DIR)/medusa-4.lev", - "$(NH_DAT_DIR)/minefill.lev", - "$(NH_DAT_DIR)/minend-1.lev", - "$(NH_DAT_DIR)/minend-2.lev", - "$(NH_DAT_DIR)/minend-3.lev", - "$(NH_DAT_DIR)/minetn-1.lev", - "$(NH_DAT_DIR)/minetn-2.lev", - "$(NH_DAT_DIR)/minetn-3.lev", - "$(NH_DAT_DIR)/minetn-4.lev", - "$(NH_DAT_DIR)/minetn-5.lev", - "$(NH_DAT_DIR)/minetn-6.lev", - "$(NH_DAT_DIR)/minetn-7.lev", + "$(NH_DAT_DIR)/knox.lua", + "$(NH_DAT_DIR)/medusa-1.lua", + "$(NH_DAT_DIR)/medusa-2.lua", + "$(NH_DAT_DIR)/medusa-3.lua", + "$(NH_DAT_DIR)/medusa-4.lua", + "$(NH_DAT_DIR)/minefill.lua", + "$(NH_DAT_DIR)/minend-1.lua", + "$(NH_DAT_DIR)/minend-2.lua", + "$(NH_DAT_DIR)/minend-3.lua", + "$(NH_DAT_DIR)/minetn-1.lua", + "$(NH_DAT_DIR)/minetn-2.lua", + "$(NH_DAT_DIR)/minetn-3.lua", + "$(NH_DAT_DIR)/minetn-4.lua", + "$(NH_DAT_DIR)/minetn-5.lua", + "$(NH_DAT_DIR)/minetn-6.lua", + "$(NH_DAT_DIR)/minetn-7.lua", "$(NH_DAT_DIR)/opthelp", "$(NH_DAT_DIR)/options", - "$(NH_DAT_DIR)/oracle.lev", + "$(NH_DAT_DIR)/oracle.lua", "$(NH_DAT_DIR)/oracles", - "$(NH_DAT_DIR)/orcus.lev", - "$(NH_DAT_DIR)/quest.dat", + "$(NH_DAT_DIR)/orcus.lua", + "$(NH_DAT_DIR)/quest.lua", "$(NH_DAT_DIR)/rumors", - "$(NH_DAT_DIR)/sanctum.lev", - "$(NH_DAT_DIR)/soko1-1.lev", - "$(NH_DAT_DIR)/soko1-2.lev", - "$(NH_DAT_DIR)/soko2-1.lev", - "$(NH_DAT_DIR)/soko2-2.lev", - "$(NH_DAT_DIR)/soko3-1.lev", - "$(NH_DAT_DIR)/soko3-2.lev", - "$(NH_DAT_DIR)/soko4-1.lev", - "$(NH_DAT_DIR)/soko4-2.lev", - "$(NH_DAT_DIR)/tower1.lev", - "$(NH_DAT_DIR)/tower2.lev", - "$(NH_DAT_DIR)/tower3.lev", + "$(NH_DAT_DIR)/sanctum.lua", + "$(NH_DAT_DIR)/soko1-1.lua", + "$(NH_DAT_DIR)/soko1-2.lua", + "$(NH_DAT_DIR)/soko2-1.lua", + "$(NH_DAT_DIR)/soko2-2.lua", + "$(NH_DAT_DIR)/soko3-1.lua", + "$(NH_DAT_DIR)/soko3-2.lua", + "$(NH_DAT_DIR)/soko4-1.lua", + "$(NH_DAT_DIR)/soko4-2.lua", + "$(NH_DAT_DIR)/tower1.lua", + "$(NH_DAT_DIR)/tower2.lua", + "$(NH_DAT_DIR)/tower3.lua", "$(NH_DAT_DIR)/tribute", - "$(NH_DAT_DIR)/valley.lev", - "$(NH_DAT_DIR)/water.lev", - "$(NH_DAT_DIR)/wizard1.lev", - "$(NH_DAT_DIR)/wizard2.lev", - "$(NH_DAT_DIR)/wizard3.lev", + "$(NH_DAT_DIR)/valley.lua", + "$(NH_DAT_DIR)/water.lua", + "$(NH_DAT_DIR)/wizard1.lua", + "$(NH_DAT_DIR)/wizard2.lua", + "$(NH_DAT_DIR)/wizard3.lua", "$(NH_DAT_DIR)/wizhelp", ); name = "Build nhdat"; @@ -1590,11 +1299,11 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd ${NH_DAT_DIR}\n${NH_UTIL_DIR}/dlb cf nhdat help hh cmdhelp keyhelp history opthelp wizhelp dungeon tribute asmodeus.lev baalz.lev bigrm-*.lev castle.lev fakewiz?.lev juiblex.lev knox.lev medusa-?.lev minend-?.lev minefill.lev minetn-?.lev oracle.lev orcus.lev sanctum.lev soko?-?.lev tower?.lev valley.lev wizard?.lev astral.lev air.lev earth.lev fire.lev water.lev ???-goal.lev ???-fil?.lev ???-loca.lev ???-strt.lev bogusmon data engrave epitaph oracles options quest.dat rumors\n\n"; + shellScript = "cd ${NH_DAT_DIR}\n${NH_UTIL_DIR}/dlb cf nhdat help hh cmdhelp keyhelp history opthelp wizhelp dungeon.lua tribute asmodeus.lua baalz.lua bigrm-*.lua castle.lua fakewiz?.lua juiblex.lua knox.lua medusa-?.lua minend-?.lua minefill.lua minetn-?.lua oracle.lua orcus.lua sanctum.lua soko?-?.lua tower?.lua valley.lua wizard?.lua astral.lua air.lua earth.lua fire.lua water.lua ???-goal.lua ???-fil?.lua ???-loca.lua ???-strt.lua bogusmon data engrave epitaph oracles options quest.lua rumors\n\n"; }; 3192867021A39F6A00325BEB /* Install */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 12; files = ( ); inputFileListPaths = ( @@ -1621,7 +1330,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "mkdir -p ${NH_INSTALL_DIR}/save\ncd ${NH_DAT_DIR}\ncp nhdat license symbols ${NH_INSTALL_DIR}\ncp ${NH_SRC_DIR}/nethack ${NH_INSTALL_DIR}\ncp ${NH_UTIL_DIR}/recover ${NH_INSTALL_DIR}\ntouch ${NH_INSTALL_DIR}/perm\ntouch ${NH_INSTALL_DIR}/record\ntouch ${NH_INSTALL_DIR}/logfile\ntouch ${NH_INSTALL_DIR}/xlogfile\ncd ${NH_ROOT_DIR}\nsys/unix/hints/macosx.sh editsysconf sys/unix/sysconf ${NH_INSTALL_DIR}/sysconf\n"; + shellScript = "mkdir -p ${NH_INSTALL_DIR}/save\ncd ${NH_DAT_DIR}\ncp nhdat license symbols ${NH_INSTALL_DIR}\ncp ${NH_SRC_DIR}/nethack ${NH_INSTALL_DIR}\ncp ${NH_UTIL_DIR}/recover ${NH_INSTALL_DIR}\ntouch ${NH_INSTALL_DIR}/perm\ntouch ${NH_INSTALL_DIR}/record\ntouch ${NH_INSTALL_DIR}/logfile\ntouch ${NH_INSTALL_DIR}/xlogfile\ncd ${NH_UNIX_DIR}\nsh hints/macosx.sh editsysconf sysconf ${NH_INSTALL_DIR}/sysconf\n"; }; 3192867121A3A2D500325BEB /* Copy nethack */ = { isa = PBXShellScriptBuildPhase; @@ -1704,6 +1413,44 @@ shellPath = /bin/sh; shellScript = "# make data from data.base\ncd ${NH_DAT_DIR}\n${NH_UTIL_DIR}/makedefs -d\n"; }; + 544768B223995106004B9739 /* Build nhlua header */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Build nhlua header"; + outputFileListPaths = ( + ); + outputPaths = ( + "${NH_INC_DIR}/nhlua.h", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd ${NH_INC_DIR}\necho '/* nhlua.h - generated by Xcode script */' > nhlua.h\necho '#include \"../lib/lua-5.3.5/src/lua.h\"' >> nhlua.h\nsed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < ${NH_LIB_DIR}/lua-5.3.5/src/lua.h >> nhlua.h\necho '#include \"../lib/lua-5.3.5/src/lualib.h\"' >> nhlua.h\necho '#include \"../lib/lua-5.3.5/src/lauxlib.h\"' >> nhlua.h\necho '/*nhlua.h*/' >> nhlua.h\n"; + }; + 544768B8239954B9004B9739 /* Build Lua library */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Build Lua library"; + outputFileListPaths = ( + ); + outputPaths = ( + "${NH_LIB_DIR}/lua/liblua.a", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd ${NH_LIB_DIR}\nmkdir -p lua\ncd ${NH_LIB_DIR}/lua-5.3.5/src\nmake a\ncp liblua.a ../../lua\ncd ../../..\n\n"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -1713,6 +1460,8 @@ files = ( 31B8A3BC21A238060055BD01 /* eat.c in Sources */, 31B8A3A921A238060055BD01 /* music.c in Sources */, + 544768A9239949FA004B9739 /* sfdata.c in Sources */, + 544768B123994A2C004B9739 /* mdlib.c in Sources */, 31B8A3D221A238060055BD01 /* engrave.c in Sources */, 31B8A3A021A238060055BD01 /* exper.c in Sources */, 31B8A38A21A238060055BD01 /* priest.c in Sources */, @@ -1730,6 +1479,7 @@ 31B8A41921A244940055BD01 /* objects.c in Sources */, 31B8A3AA21A238060055BD01 /* wizard.c in Sources */, 31B8A3D021A238060055BD01 /* explode.c in Sources */, + 544768A5239949A8004B9739 /* sfbase.c in Sources */, 31B8A3DE21A238060055BD01 /* sys.c in Sources */, 31B8A38021A238060055BD01 /* sit.c in Sources */, 31B8A3AF21A238060055BD01 /* lock.c in Sources */, @@ -1745,6 +1495,7 @@ 31B8A3C321A238060055BD01 /* steed.c in Sources */, 31B8A39D21A238060055BD01 /* artifact.c in Sources */, 31B8A3FF21A23E6E0055BD01 /* topl.c in Sources */, + 544768AF23994A17004B9739 /* nhlua.c in Sources */, 31B8A3C021A238060055BD01 /* dig.c in Sources */, 31B8A3CB21A238060055BD01 /* alloc.c in Sources */, 31B8A39821A238060055BD01 /* mail.c in Sources */, @@ -1757,6 +1508,7 @@ 31B8A40121A23E6E0055BD01 /* wintty.c in Sources */, 31B8A3FE21A23E6E0055BD01 /* termcap.c in Sources */, 31B8A39621A238060055BD01 /* attrib.c in Sources */, + 544768AE23994A17004B9739 /* nhlsel.c in Sources */, 31B8A40C21A23EEC0055BD01 /* cursdial.c in Sources */, 31B8A3A321A238060055BD01 /* mhitm.c in Sources */, 31B8A3DC21A238060055BD01 /* polyself.c in Sources */, @@ -1770,6 +1522,7 @@ 31B8A3AD21A238060055BD01 /* uhitm.c in Sources */, 31B8A3B321A238060055BD01 /* track.c in Sources */, 31B8A41221A23EEC0055BD01 /* curswins.c in Sources */, + 544768AB239949FA004B9739 /* sfstruct.c in Sources */, 31B8A3A721A238060055BD01 /* minion.c in Sources */, 31B8A3F021A23D420055BD01 /* unixtty.c in Sources */, 31B8A37F21A238060055BD01 /* extralev.c in Sources */, @@ -1827,6 +1580,7 @@ 31B8A38E21A238060055BD01 /* quest.c in Sources */, 31B8A3D621A238060055BD01 /* region.c in Sources */, 31B8A3D421A238060055BD01 /* worm.c in Sources */, + 544768AA239949FA004B9739 /* sflendian.c in Sources */, 31B8A3C921A238060055BD01 /* sounds.c in Sources */, 31B8A37C21A238060055BD01 /* pager.c in Sources */, 31B8A39F21A238060055BD01 /* fountain.c in Sources */, @@ -1835,6 +1589,7 @@ 31B8A3D321A238060055BD01 /* cmd.c in Sources */, 31B8A3AB21A238060055BD01 /* mplayer.c in Sources */, 31B8A3CC21A238060055BD01 /* pickup.c in Sources */, + 544768A323994965004B9739 /* sfascii.c in Sources */, 31B8A39721A238060055BD01 /* invent.c in Sources */, 31B8A40021A23E6E0055BD01 /* getline.c in Sources */, 31B8A3B521A238060055BD01 /* rect.c in Sources */, @@ -1851,36 +1606,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 31B8A41A21A2669A0055BD01 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3192867C21A3ACAC00325BEB /* lev_comp.y in Sources */, - 31B8A42B21A267E60055BD01 /* panic.c in Sources */, - 31B8A43021A268370055BD01 /* monst.c in Sources */, - 31B8A42921A267E60055BD01 /* lev_yacc.c in Sources */, - 31B8A42C21A267E60055BD01 /* lev_main.c in Sources */, - 31B8A42D21A267F50055BD01 /* alloc.c in Sources */, - 31B8A42E21A2680B0055BD01 /* drawing.c in Sources */, - 3192867E21A3ACB800325BEB /* lev_comp.l in Sources */, - 31B8A42A21A267E60055BD01 /* lev_lex.c in Sources */, - 31B8A43121A268420055BD01 /* objects.c in Sources */, - 31B8A42F21A2681E0055BD01 /* decl.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 31B8A43221A268DF0055BD01 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 31B8A46921A288770055BD01 /* dgn_comp.l in Sources */, - 31B8A46621A2820F0055BD01 /* dgn_comp.y in Sources */, - 31B8A44321A269EA0055BD01 /* dgn_main.c in Sources */, - 31B8A44521A26A0A0055BD01 /* alloc.c in Sources */, - 31B8A44421A26A020055BD01 /* panic.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 31B8A44621A26A4B0055BD01 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1903,16 +1628,6 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 316B91C721A3BD5000EC3E81 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 3189577E21A1FDA400FB2ABE /* makedefs */; - targetProxy = 316B91C621A3BD5000EC3E81 /* PBXContainerItemProxy */; - }; - 316B91C921A3BD5C00EC3E81 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 3189577E21A1FDA400FB2ABE /* makedefs */; - targetProxy = 316B91C821A3BD5C00EC3E81 /* PBXContainerItemProxy */; - }; 316B91CB21A3BD7C00EC3E81 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 3189577E21A1FDA400FB2ABE /* makedefs */; @@ -1933,16 +1648,6 @@ target = 31B8A45621A26A970055BD01 /* dlb */; targetProxy = 3192867521A3AAFE00325BEB /* PBXContainerItemProxy */; }; - 3192867821A3AB0400325BEB /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 31B8A43521A268DF0055BD01 /* dgn_comp */; - targetProxy = 3192867721A3AB0400325BEB /* PBXContainerItemProxy */; - }; - 3192867A21A3AB0800325BEB /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 31B8A41D21A2669A0055BD01 /* lev_comp */; - targetProxy = 3192867921A3AB0800325BEB /* PBXContainerItemProxy */; - }; 31B8A31421A2355C0055BD01 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 3189577E21A1FDA400FB2ABE /* makedefs */; @@ -2012,6 +1717,7 @@ NH_DOC_DIR = "$(NH_ROOT_DIR)/doc"; NH_INC_DIR = "$(NH_ROOT_DIR)/include"; NH_INSTALL_DIR = "$(HOME)/nethackdir"; + NH_LIB_DIR = /Users/mikeallison/Documents/devel/nhdev/NHsource/sys/unix/../../lib; NH_ROOT_DIR = "$(SOURCE_ROOT)/../.."; NH_SRC_DIR = "$(NH_ROOT_DIR)/src"; NH_UNIX_DIR = "$(NH_ROOT_DIR)/sys/unix"; @@ -2088,6 +1794,7 @@ NH_DOC_DIR = "$(NH_ROOT_DIR)/doc"; NH_INC_DIR = "$(NH_ROOT_DIR)/include"; NH_INSTALL_DIR = "$(HOME)/nethackdir"; + NH_LIB_DIR = /Users/mikeallison/Documents/devel/nhdev/NHsource/sys/unix/../../lib; NH_ROOT_DIR = "$(SOURCE_ROOT)/../.."; NH_SRC_DIR = "$(NH_ROOT_DIR)/src"; NH_UNIX_DIR = "$(NH_ROOT_DIR)/sys/unix"; @@ -2111,8 +1818,11 @@ 3189577921A1FCC100FB2ABE /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; GCC_C_LANGUAGE_STANDARD = c99; + INSTALL_PATH = "$(NH_INSTALL_DIR)"; + "OTHER_LDFLAGS[arch=*]" = "-L${NH_LIB_DIR}/lua"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -2120,8 +1830,11 @@ 3189577A21A1FCC100FB2ABE /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; GCC_C_LANGUAGE_STANDARD = c99; + INSTALL_PATH = "$(NH_INSTALL_DIR)"; + "OTHER_LDFLAGS[arch=*]" = "-L${NH_LIB_DIR}/lua"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -2129,6 +1842,7 @@ 3189578421A1FDA400FB2ABE /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -2137,52 +1851,16 @@ 3189578521A1FDA400FB2ABE /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; - 31B8A42321A2669A0055BD01 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 31B8A42421A2669A0055BD01 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 31B8A43B21A268E00055BD01 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 31B8A43C21A268E00055BD01 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; 31B8A44F21A26A4B0055BD01 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -2191,6 +1869,7 @@ 31B8A45021A26A4B0055BD01 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -2199,6 +1878,7 @@ 31B8A45C21A26A970055BD01 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -2207,6 +1887,7 @@ 31B8A45D21A26A970055BD01 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -2242,24 +1923,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 31B8A42221A2669A0055BD01 /* Build configuration list for PBXNativeTarget "lev_comp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 31B8A42321A2669A0055BD01 /* Debug */, - 31B8A42421A2669A0055BD01 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 31B8A43A21A268E00055BD01 /* Build configuration list for PBXNativeTarget "dgn_comp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 31B8A43B21A268E00055BD01 /* Debug */, - 31B8A43C21A268E00055BD01 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 31B8A44E21A26A4B0055BD01 /* Build configuration list for PBXNativeTarget "recover" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/sys/unix/NetHack.xcodeproj/xcshareddata/xcschemes/NetHack.xcscheme b/sys/unix/NetHack.xcodeproj/xcshareddata/xcschemes/NetHack.xcscheme index 92558e275..c67695cf6 100644 --- a/sys/unix/NetHack.xcodeproj/xcshareddata/xcschemes/NetHack.xcscheme +++ b/sys/unix/NetHack.xcodeproj/xcshareddata/xcschemes/NetHack.xcscheme @@ -1,6 +1,6 @@ - - - - + + - - - - - - + + - - - - - - + + - - Date: Thu, 5 Dec 2019 12:05:06 -0500 Subject: [PATCH 417/529] more macosx Xcode warning quiets --- src/nhlua.c | 2 +- src/sflendian.c | 96 ++++++++++++++++++++++++------------------------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/src/nhlua.c b/src/nhlua.c index a314bb657..eaa8e9758 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -578,7 +578,7 @@ const char *name; /* const int boolstr2i[] = { TRUE, FALSE, TRUE, FALSE, -1 }; */ ret = luaL_checkoption(L, -1, NULL, boolstr); - nhUse(boolstr2i[0]); + /* nhUse(boolstr2i[0]); */ } else if (ltyp == LUA_TBOOLEAN) { ret = lua_toboolean(L, -1); } else if (ltyp == LUA_TNUMBER) { diff --git a/src/sflendian.c b/src/sflendian.c index ca2a69707..e4dc92fb4 100644 --- a/src/sflendian.c +++ b/src/sflendian.c @@ -138,7 +138,7 @@ const char *myparent UNUSED; const char *myname UNUSED; int cnt; { - const char *parent = "any"; +/* const char *parent = "any"; */ int i; uint64_t ui64; int64_t i64; @@ -146,7 +146,7 @@ int cnt; int32_t i32; int8_t i8; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { ui64 = (uint64_t) d_any->a_void; fwrite(&ui64, sizeof ui64, 1, nhfp->fpdef); @@ -193,11 +193,11 @@ const char *myparent UNUSED; const char *myname UNUSED; int cnt; { - const char *parent = "aligntyp"; +/* const char *parent = "aligntyp"; */ int i; int16_t val; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { val = nhfp->bendian ? bswap16(*d_aligntyp) : *d_aligntyp; #ifdef SAVEFILE_DEBUGGING @@ -218,9 +218,9 @@ const char *myparent UNUSED; const char *myname UNUSED; int cnt UNUSED; { - const char *parent = "bitfield"; +/* const char *parent = "bitfield"; */ - nhUse(parent); + /* nhUse(parent); */ /* for bitfields, cnt is the number of bits, not an array */ #ifdef SAVEFILE_DEBUGGING fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, @@ -238,11 +238,11 @@ const char *myparent UNUSED; const char *myname UNUSED; int cnt; { - const char *parent = "boolean"; +/* const char *parent = "boolean"; */ int i; int8_t val; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { val = *d_boolean; #ifdef SAVEFILE_DEBUGGING @@ -264,10 +264,10 @@ const char *myname UNUSED; int cnt; { int i; - const char *parent = "char"; +/* const char *parent = "char"; */ int8_t val; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { val = *d_char; #ifdef SAVEFILE_DEBUGGING @@ -325,10 +325,10 @@ const char *myname UNUSED; int cnt; { int i; - const char *parent = "int"; +/* const char *parent = "int"; */ int32_t i32, val; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { i32 = (int32_t) *d_int; val = nhfp->bendian ? bswap32(i32) : i32; @@ -351,10 +351,10 @@ const char *myname UNUSED; int cnt; { int i; - const char *parent = "long"; +/* const char *parent = "long"; */ int64_t i64, val64; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { i64 = (int64_t) *d_long; val64 = nhfp->bendian ? bswap64(i64) : i64; @@ -378,9 +378,9 @@ int cnt; { int i; int8_t itmp; - const char *parent = "schar"; +/* const char *parent = "schar"; */ - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { itmp = (int8_t) *d_schar; #ifdef SAVEFILE_DEBUGGING @@ -403,9 +403,9 @@ int cnt; { int i; int16_t itmp; - const char *parent = "short"; +/* const char *parent = "short"; */ - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { itmp = (int16_t) *d_short; #ifdef SAVEFILE_DEBUGGING @@ -428,9 +428,9 @@ int cnt; { int i; uint64_t ui64, val; - const char *parent = "size_t"; +/* const char *parent = "size_t"; */ - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { ui64 = (uint64_t) *d_size_t; val = nhfp->bendian ? bswap64(ui64) : ui64; @@ -453,9 +453,9 @@ const char *myname UNUSED; int cnt UNUSED; { char buf[BUFSZ]; - const char *parent = "time_t"; +/* const char *parent = "time_t"; */ - nhUse(parent); + /* nhUse(parent); */ Sprintf(buf, "%s", yyyymmddhhmmss(*d_time_t)); #ifdef SAVEFILE_DEBUGGING fprintf(nhfp->fpdebug,"%s %s %s %ld %d\n", myname, @@ -485,10 +485,10 @@ const char *myname UNUSED; int cnt; { int i; - const char *parent = "uchar"; +/* const char *parent = "uchar"; */ uint8_t ui8; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { ui8 = (uint8_t) *d_uchar; #ifdef SAVEFILE_DEBUGGING @@ -510,10 +510,10 @@ const char *myname UNUSED; int cnt; { int i; - const char *parent = "uint"; +/* const char *parent = "uint"; */ uint32_t ui32, val; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { ui32 = (uint32_t) *d_uint; val = nhfp->bendian ? bswap32(ui32) : ui32; @@ -536,10 +536,10 @@ const char *myname UNUSED; int cnt; { int i; - const char *parent = "ulong"; +/* const char *parent = "ulong"; */ uint64_t ul64, val64; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { ul64 = (uint64_t) *d_ulong; val64 = nhfp->bendian ? bswap64(ul64) : ul64; @@ -562,10 +562,10 @@ const char *myname UNUSED; int cnt; { int i; - const char *parent = "ushort"; +/* const char *parent = "ushort"; */ uint16_t ui16, val16; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { ui16 = (uint16_t) *d_ushort; val16 = nhfp->bendian ? bswap16(ui16) : ui16; @@ -588,10 +588,10 @@ const char *myname UNUSED; int cnt; { int i; - const char *parent = "xchar"; +/* const char *parent = "xchar"; */ int16_t i16, val16; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { i16 = (int16_t) *d_xchar; val16 = nhfp->bendian ? bswap16(i16) : i16; @@ -617,10 +617,10 @@ int cnt; { int i, j, intval; int16_t i16, outcount = 0; - const char *parent = "str"; +/* const char *parent = "str"; */ char sval[QBUFSZ], *src = d_str, *dest = strbuf; - nhUse(parent); + /* nhUse(parent); */ /* cnt is the number of characters */ for (i = 0; i < cnt; ++i) { if ((*src < 32) || (*src == '\\') || (*src > 127)) { @@ -677,7 +677,7 @@ const char *myparent UNUSED; const char *myname UNUSED; int cnt; { - const char *parent = "any"; +/* const char *parent = "any"; */ int i; uint64_t ui64; int64_t i64; @@ -685,7 +685,7 @@ int cnt; int32_t i32; int8_t i8; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { fread(&ui64, sizeof ui64, 1, nhfp->fpdef); if (feof(nhfp->fpdef)) { @@ -755,11 +755,11 @@ const char *myparent UNUSED; const char *myname UNUSED; int cnt; { - const char *parent = "aligntyp"; +/* const char *parent = "aligntyp"; */ int i; int16_t val, i16; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { #ifdef SAVEFILE_DEBUGGING floc = ftell(nhfp->fpdef); @@ -788,9 +788,9 @@ const char *myparent UNUSED; const char *myname UNUSED; int cnt UNUSED; { - const char *parent = "bitfield"; +/* const char *parent = "bitfield"; */ - nhUse(parent); + /* nhUse(parent); */ #ifdef SAVEFILE_DEBUGGING floc = ftell(nhfp->fpdef); #endif @@ -815,10 +815,10 @@ const char *myname UNUSED; int cnt; { int i; - const char *parent = "boolean"; +/* const char *parent = "boolean"; */ int8_t i8; - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { #ifdef SAVEFILE_DEBUGGING floc = ftell(nhfp->fpdef); @@ -1032,9 +1032,9 @@ int cnt; { int i; uint64_t ui64, val; - const char *parent = "size_t"; +/* const char *parent = "size_t"; */ - nhUse(parent); + /* nhUse(parent); */ for (i = 0; i < cnt; ++i) { #ifdef SAVEFILE_DEBUGGING floc = ftell(nhfp->fpdef); @@ -1065,9 +1065,9 @@ int cnt UNUSED; { time_t tmp; char buf[BUFSZ]; - const char *parent = "time_t"; +/* const char *parent = "time_t"; */ - nhUse(parent); + /* nhUse(parent); */ #ifdef SAVEFILE_DEBUGGING floc = ftell(nhfp->fpdef); #endif @@ -1265,12 +1265,12 @@ int cnt; char testbuf[BUFSZ]; #endif int i, j, sval; - const char *parent = "str"; +/* const char *parent = "str"; */ char n[4]; char *src, *dest; int16_t i16, incount = 0; - nhUse(parent); + /* nhUse(parent); */ #ifdef SAVEFILE_DEBUGGING floc = ftell(nhfp->fpdef); #endif From c2341fb93d60a64242032ae6f162135ee6eed2ac Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 12:19:01 -0500 Subject: [PATCH 418/529] depersonalize a path --- sys/unix/NetHack.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/unix/NetHack.xcodeproj/project.pbxproj b/sys/unix/NetHack.xcodeproj/project.pbxproj index 17f12cf5b..bd3b7cbbf 100644 --- a/sys/unix/NetHack.xcodeproj/project.pbxproj +++ b/sys/unix/NetHack.xcodeproj/project.pbxproj @@ -1717,7 +1717,7 @@ NH_DOC_DIR = "$(NH_ROOT_DIR)/doc"; NH_INC_DIR = "$(NH_ROOT_DIR)/include"; NH_INSTALL_DIR = "$(HOME)/nethackdir"; - NH_LIB_DIR = /Users/mikeallison/Documents/devel/nhdev/NHsource/sys/unix/../../lib; + NH_LIB_DIR = "$(NH_ROOT_DIR)/sys/unix/../../lib"; NH_ROOT_DIR = "$(SOURCE_ROOT)/../.."; NH_SRC_DIR = "$(NH_ROOT_DIR)/src"; NH_UNIX_DIR = "$(NH_ROOT_DIR)/sys/unix"; @@ -1794,7 +1794,7 @@ NH_DOC_DIR = "$(NH_ROOT_DIR)/doc"; NH_INC_DIR = "$(NH_ROOT_DIR)/include"; NH_INSTALL_DIR = "$(HOME)/nethackdir"; - NH_LIB_DIR = /Users/mikeallison/Documents/devel/nhdev/NHsource/sys/unix/../../lib; + NH_LIB_DIR = "$(NH_ROOT_DIR)/sys/unix/../../lib"; NH_ROOT_DIR = "$(SOURCE_ROOT)/../.."; NH_SRC_DIR = "$(NH_ROOT_DIR)/src"; NH_UNIX_DIR = "$(NH_ROOT_DIR)/sys/unix"; From fbcb860d439c60c6cb4bbeeda6299a4eadd96330 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Thu, 5 Dec 2019 12:15:19 -0500 Subject: [PATCH 419/529] This is cron-daily v1-Dec-2-2019. files updated: Files --- Files | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Files b/Files index c16972f72..739ccadaa 100644 --- a/Files +++ b/Files @@ -475,16 +475,8 @@ This is a list of files produced by auxiliary programs. They can all be regenerated from the files in the distribution. dat: -(file generated by dgn_comp at playground creation time) -dungeon - -(files generated by lev_comp at playground creation time) -minefill.lev minend-1.lev minend-2.lev minend-3.lev minetn-1.lev -minetn-2.lev minetn-3.lev minetn-4.lev minetn-5.lev minetn-6.lev -minetn-7.lev - (files generated by makedefs at playground creation time) -data dungeon.pdf options oracles quest.dat rumors +data options oracles rumors (files generated for Qt interface on Mac OS X) Info.plist nethack.icns From e6d1aaeaffc9c1bc336c7cc52dfaff8a6ae0c490 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 12:44:14 -0500 Subject: [PATCH 420/529] extraneous file removed --- dat/mines.des | 1209 ------------------------------------------------- 1 file changed, 1209 deletions(-) delete mode 100644 dat/mines.des diff --git a/dat/mines.des b/dat/mines.des deleted file mode 100644 index 1ef2031f5..000000000 --- a/dat/mines.des +++ /dev/null @@ -1,1209 +0,0 @@ -# NetHack 3.6 mines.des $NHDT-Date: 1548631704 2019/01/27 23:28:24 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.30 $ -# Copyright (c) 1989-95 by Jean-Christophe Collet -# Copyright (c) 1991-95 by M. Stephenson -# NetHack may be freely redistributed. See license for details. -# - -# The "fill" level for the mines. -# -# This level is used to fill out any levels not occupied by -# specific levels as defined below. -# -MAZE: "minefill" , ' ' -INIT_MAP: mines, '.' , ' ' , true , true , random , true -NOMAP -# -STAIR: random, up -STAIR: random, down -# -OBJECT: '*', random -OBJECT: '*', random -OBJECT: '*', random -OBJECT: '(', random -OBJECT: random, random -OBJECT: random, random -OBJECT: random, random -# -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome lord"), random -MONSTER: ('h', "dwarf"), random -MONSTER: ('h', "dwarf"), random -MONSTER: 'G', random -MONSTER: 'G', random -MONSTER: 'h', random -# -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random -TRAP: random, random - - -# A tragic accident has occurred in Frontier Town.... -# -# Minetown variant 1 -# Orcish Town - a variant of Frontier Town that has been -# overrun by orcs. Note the barricades (iron bars). -# -LEVEL: "minetn-1" -FLAGS:mazelevel -INIT_MAP:mines,'.',' ',true,true,random,true -GEOMETRY:center,center -MAP -..................................... -.----------------F------------------. -.|.................................|. -.|.-------------......------------.|. -.|.|...|...|...|......|..|...|...|.|. -.F.|...|...|...|......|..|...|...|.|. -.|.|...|...|...|......|..|...|...|.F. -.|.|...|...|----......------------.|. -.|.---------.......................|. -.|.................................|. -.|.---------.....--...--...........|. -.|.|...|...|----.|.....|.---------.|. -.|.|...|...|...|.|.....|.|..|....|.|. -.|.|...|...|...|.|.....|.|..|....|.|. -.|.|...|...|...|.|.....|.|..|....|.|. -.|.-------------.-------.---------.|. -.|.................................F. -.-----------F------------F----------. -..................................... -ENDMAP - -# Don't let the player fall into his likely death -TELEPORT_REGION:levregion(01,01,20,19),levregion(20,00,70,19) -REGION:(00,00,36,16),lit,"ordinary" -STAIR:levregion(01,03,20,19),(00,00,36,15),up -STAIR:levregion(61,03,75,19),(00,00,36,15),down - -# shame we can't make polluted fountains -FOUNTAIN:(16,09) -FOUNTAIN:(25,09) - -# the altar's defiled; useful for BUC but never coaligned -ALTAR:(20,13),noalign,shrine - -# set up the shop doors; could be broken down -DOOR:random,(5,8) -DOOR:random,(9,8) -DOOR:random,(13,7) -DOOR:random,(22,5) -DOOR:random,(27,7) -DOOR:random,(31,7) -DOOR:random,(5,10) -DOOR:random,(9,10) -DOOR:random,(15,13) -DOOR:random,(25,13) -DOOR:random,(31,11) - -# knock a few holes in the shop interior walls -REPLACE_TERRAIN:(07,04,11,06),'|','.',18% -REPLACE_TERRAIN:(25,04,29,06),'|','.',18% -REPLACE_TERRAIN:(07,12,11,14),'|','.',18% -REPLACE_TERRAIN:(28,12,28,14),'|','.',33% - -# One spot each in most shops... -$place = { (05,04),(09,05),(13,04),(26,04),(31,05),(30,14),(05,14),(10,13),(26,14),(27,13) } -SHUFFLE:$place - -# scatter some bodies -OBJECT:('%',"corpse"),(20,12),montype:"aligned priest" -OBJECT:('%',"corpse"),$place[0],montype:"shopkeeper" -OBJECT:('%',"corpse"),$place[1],montype:"shopkeeper" -OBJECT:('%',"corpse"),$place[2],montype:"shopkeeper" -OBJECT:('%',"corpse"),$place[3],montype:"shopkeeper" -OBJECT:('%',"corpse"),$place[4],montype:"shopkeeper" -OBJECT:('%',"corpse"),random,montype:"watchman" -OBJECT:('%',"corpse"),random,montype:"watchman" -OBJECT:('%',"corpse"),random,montype:"watchman" -OBJECT:('%',"corpse"),random,montype:"watchman" -OBJECT:('%',"corpse"),random,montype:"watch captain" - -# Rubble! -LOOP [9 + 2d5] { - [90%]: OBJECT:('`',"boulder"),random - OBJECT:('*',"rock"),random -} - -# Guarantee 7 candles since we won't have Izchak available -OBJECT:('(',"wax candle"),$place[0],quantity:1d2 -OBJECT:('(',"wax candle"),$place[1],quantity:2d2 -OBJECT:('(',"wax candle"),$place[2],quantity:1d2 -OBJECT:('(',"tallow candle"),$place[3],quantity:1d3 -OBJECT:('(',"tallow candle"),$place[2],quantity:1d2 -OBJECT:('(',"tallow candle"),$place[0],quantity:1d2 - -# go ahead and leave a lamp next to one corpse to be suggestive -# and some empty wands... -OBJECT:('(',"oil lamp"),$place[2] -OBJECT:('/',"striking"),$place[1],uncursed,0 -OBJECT:('/',"striking"),$place[3],uncursed,0 -OBJECT:('/',"striking"),$place[4],uncursed,0 -OBJECT:('/',"magic missile"),$place[4],uncursed,0 -OBJECT:('/',"magic missile"),$place[0],uncursed,0 - -# the Orcish Army - -$inside = selection: floodfill(18,8) -$near_temple = selection: filter(fillrect(17,8, 23,14), $inside) - -LOOP [5 + 1d10] { - IF [50%] { - MONSTER: ('o', "orc-captain"), rndcoord($inside), hostile - } ELSE { - IF [80%] { - MONSTER: ('o', "Uruk-hai"), rndcoord($inside), hostile - } ELSE { - MONSTER: ('o', "Mordor orc"), rndcoord($inside), hostile - } - } -} -# shamans can be hanging out in/near the temple -LOOP [2d3] { - MONSTER: ('o', "orc shaman"), rndcoord($near_temple), hostile -} -# these are not such a big deal -# to run into outside the bars -LOOP [9 + 2d5] { - IF [90%] { - MONSTER: ('o', "hill orc"), random, hostile - } ELSE { - MONSTER: ('o', "goblin"), random, hostile - } -} - -# Hack to force full-level wallification -NOMAP -WALLIFY - - -# Minetown variant 2 -# "Town Square" -# -LEVEL: "minetn-2" -ROOM: "ordinary" , lit, (3,3), (center,center), (31,15) { -FOUNTAIN: (17, 5) -FOUNTAIN: (13, 8) - -[75%]: SUBROOM: "ordinary", random, (2,0), (2,2) { - ROOMDOOR: false, closed, west, random -} - -[75%]: SUBROOM: "ordinary", unlit, (5,0), (2,2) { - ROOMDOOR: false, closed, south, random -} - -[75%]: SUBROOM: "ordinary", random, (8,0), (2,2) { - ROOMDOOR: false, closed, east, random -} - -[75%]: SUBROOM: "ordinary", lit, (16,0), (2,2) { - ROOMDOOR: false, closed, west, random -} - -[75%]: SUBROOM: "ordinary", unlit, (19,0), (2,2) { - ROOMDOOR: false, closed, south, random -} - -[75%]: SUBROOM: "ordinary", random, (22,0), (2,2) { - ROOMDOOR: false, locked, south, random - MONSTER: ('G', "gnome"), random -} - -[75%]: SUBROOM: "ordinary", unlit, (25,0), (2,2) { - ROOMDOOR: false, closed, east, random -} - -[75%]: SUBROOM: "ordinary", lit, (2,5), (2,2) { - ROOMDOOR: false, closed, north, random -} - -[75%]: SUBROOM: "ordinary", lit, (5,5), (2,2) { - ROOMDOOR: false, closed, south, random -} - -[75%]: SUBROOM: "ordinary", random, (8,5), (2,2) { - ROOMDOOR: false, locked, north, random - MONSTER: ('G', "gnome"), random -} - -SUBROOM: "shop" [90%] , lit, (2,10), (4,3) { - ROOMDOOR: false, closed, west, random -} - -SUBROOM: "tool shop" [90%], lit, (23,10), (4,3) { - ROOMDOOR: false, closed, east, random -} - -SUBROOM: "food shop" [90%], lit, (24,5), (3,4) { - ROOMDOOR: false, closed, north, random -} - -SUBROOM: "candle shop", lit, (11,10), (4,3) { - ROOMDOOR: false, closed, east, random -} - -[75%]: SUBROOM: "ordinary", unlit, (7,10), (3,3) { - ROOMDOOR: false, locked, north, random - MONSTER: ('G', "gnome"), random -} - -SUBROOM: "temple", lit, (19,5), (4,4) { - ROOMDOOR: false, closed, north, random - ALTAR:(02,02),align[0],shrine - MONSTER: ('G', "gnomish wizard"), random - MONSTER: ('G', "gnomish wizard"), random -} - -[75%]: SUBROOM: "ordinary", lit, (18,10), (4,3) { - ROOMDOOR: false, locked, west, random - MONSTER: ('G', "gnome lord"), random -} - -# The Town Watch -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watch captain"), random, peaceful - -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - TRAP: random, random - MONSTER: ('G', "gnome"), random - MONSTER: ('G', "gnome"), random -} - -ROOM: "ordinary" , random, random, random, random { - MONSTER: ('h', "dwarf"), random -} - -ROOM: "ordinary" , random, random, random, random { - TRAP: random, random - MONSTER: ('G', "gnome"), random -} - -RANDOM_CORRIDORS - - -# Minetown variant 3 by Kelly Bailey -# "Alley Town" -# -LEVEL: "minetn-3" -ROOM: "ordinary",lit,(3,3),(center,center),(31,15) { -FOUNTAIN:(01,06) -FOUNTAIN:(29,13) - -SUBROOM:"ordinary",random,(2,2),(2,2) { - ROOMDOOR: false,closed,south,random -} - -SUBROOM:"tool shop" [30%], lit,(5,3),(2,3) { - ROOMDOOR: false,closed,south,random -} - -SUBROOM:"ordinary",random,(2,10),(2,3) { - ROOMDOOR: false, locked, north, random - MONSTER: 'G',random -} - -SUBROOM:"ordinary",random,(5,9),(2,2) { - ROOMDOOR: false,closed,north,random -} - -SUBROOM:"temple",lit,(10,2),(3,4) { - ROOMDOOR: false,closed,east,random - ALTAR:(1,1),align[0],shrine - MONSTER: ('G', "gnomish wizard"), random - MONSTER: ('G', "gnomish wizard"), random -} - -SUBROOM:"ordinary",random,(11,7),(2,2) { - ROOMDOOR: false,closed,west,random -} - -SUBROOM:"shop",lit,(10,10),(3,3) { - ROOMDOOR:false,closed,west,random -} - -SUBROOM:"ordinary",random,(14,8),(2,2) { - ROOMDOOR:false,locked,north,random - MONSTER: 'G',random -} - -SUBROOM:"ordinary",random,(14,11),(2,2) { - ROOMDOOR:false,closed,south,random -} - -SUBROOM:"tool shop" [40%],lit,(17,10),(3,3) { - ROOMDOOR:false,closed,north,random -} - -SUBROOM:"ordinary",random,(21,11),(2,2) { - ROOMDOOR:false,locked,east,random - MONSTER:'G',random -} - -SUBROOM:"food shop" [90%],lit,(26,8),(3,2) { - ROOMDOOR:false,closed,west,random -} - -SUBROOM:"ordinary",random,(16,2),(2,2) { - ROOMDOOR:false,closed,west,random -} - -SUBROOM:"ordinary",random,(19,2),(2,2) { - ROOMDOOR:false,closed,north,random -} - -SUBROOM:"wand shop" [30%],lit,(19,5),(3,2) { - ROOMDOOR:false,closed,west,random -} - -SUBROOM: "candle shop",lit,(25,2),(3,3) { - ROOMDOOR:false,closed,south,random -} - -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watch captain"), random, peaceful - -} - -ROOM: "ordinary", random, random, random, random { - STAIR: random, up -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - TRAP: random, random - MONSTER: ('G', "gnome"), random - MONSTER: ('G', "gnome"), random -} - -ROOM: "ordinary" , random, random, random, random { - MONSTER: ('h', "dwarf"), random -} - -ROOM: "ordinary" , random, random, random, random { - TRAP: random, random - MONSTER: ('G', "gnome"), random -} - -RANDOM_CORRIDORS - - -# Minetown variant 4 by Kelly Bailey -# "College Town" -# -LEVEL: "minetn-4" -ROOM: "ordinary",lit,(3,3),(center,center),(30,15) { -FOUNTAIN:(08,07) -FOUNTAIN:(18,07) - -SUBROOM:"book shop",lit,(4,2),(3,3) { - ROOMDOOR: false,closed,south,random -} - -SUBROOM:"ordinary",random,(8,2),(2,2) { - ROOMDOOR: false,closed,south,random -} - -SUBROOM:"temple",lit,(11,3),(5,4) { - ROOMDOOR: false,closed,south,random - ALTAR:(2,1),align[0],shrine - MONSTER: ('G', "gnomish wizard"), random - MONSTER: ('G', "gnomish wizard"), random -} - -SUBROOM:"ordinary",random,(19,2),(2,2) { - ROOMDOOR: false,closed,south,random - MONSTER: 'G', random -} - -SUBROOM:"candle shop",lit,(22,2),(3,3) { - ROOMDOOR:false,closed,south,random -} - -SUBROOM:"ordinary",random,(26,2),(2,2) { - ROOMDOOR:false,locked,east,random - MONSTER: 'G',random -} - -SUBROOM:"tool shop" [90%],lit,(4,10),(3,3) { - ROOMDOOR:false,closed,north,random -} - -SUBROOM:"ordinary",random,(8,11),(2,2) { - ROOMDOOR:false,locked,south,random - MONSTER: ('k',"kobold shaman"),random - MONSTER: ('k',"kobold shaman"),random - MONSTER: ('f',"kitten"),random - MONSTER: 'f',random -} - -SUBROOM:"food shop" [90%],lit,(11,11),(3,2) { - ROOMDOOR:false,closed,east,random -} - -SUBROOM:"ordinary",random,(17,11),(2,2) { - ROOMDOOR:false,closed,west,random -} - -SUBROOM:"ordinary",random,(20,10),(2,2) { - ROOMDOOR:false,locked,north,random - MONSTER:'G',random -} - -SUBROOM:"shop" [90%],lit,(23,10),(3,3) { - ROOMDOOR:false,closed,north,random -} - -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watch captain"), random, peaceful - -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - TRAP: random, random - MONSTER: ('G', "gnome"), random - MONSTER: ('G', "gnome"), random -} - -ROOM: "ordinary" , random, random, random, random { - MONSTER: ('h', "dwarf"), random -} - -ROOM: "ordinary" , random, random, random, random { - TRAP: random, random - MONSTER: ('G', "gnome"), random -} - -RANDOM_CORRIDORS - - -# "Grotto Town" by Kelly Bailey -# -MAZE: "minetn-5",' ' -GEOMETRY:center,center -MAP ------ --------- -|...--- ------.......-- ------- --------------- -|.....----.........--..| |.....| ------- |.............| ---..-....-.----------..| |.....| |.....| --+---+--.----+- - --.--.....---- ---- |.....| ------ --....---- |..-...--.-.+..| - ---.........---- ----- ---+--- |..+.| ---..-..----..---+-..---..| - ----.-....|..----...-- |.| |..|.| ---+-.....-+--........--+- - -----..|....-.....---- |.| |..|.------......--................| - ------ |..|.............---.-- ----.+..|-.......--..--------+--..-- - |....| --......---...........----- |.|..|-...{....---|.........|..-- - |....| |........-...-...........----.|..|--.......| |.........|...| - ---+--------....-------...---......--.-------....---- -----------...| - ------.---...--...--..-..--...-..---...|.--..-...-....------- |.......-- - |..|-.........-..---..-..---.....--....|........---...-|....| |.------- - |..+...............-+---+-----..--..........--....--...+....| |.|...S. ------.....{....----...............-...........--...-...-|....| |.|...| -|..............-- --+--.---------.........--..-........------- |.--+------- --+-----.........| |...|.|....| --.......------...|....---------.....|....| -|...| --..------- |...|.+....| ---...--- --..|...--......-...{..+..-+| -|...| ---- ------|....| ----- -----.....----........|..|.| ------ ------ ------- --------------- -ENDMAP - -IF [75%] { - IF [50%] { - TERRAIN:line (25,8),(25,9), '|' - } ELSE { - TERRAIN:line (16,13),(17,13), '-' - } -} -IF [75%] { - IF [50%] { - TERRAIN:line (36,10),(36,11), '|' - } ELSE { - TERRAIN:line (32,15),(33,15), '-' - } -} -IF [50%] { - TERRAIN:fillrect (21,4,22,5), '.' - TERRAIN:line (14,9),(14,10), '|' -} -IF [50%] { - TERRAIN:(46,13), '|' - TERRAIN:line (43,5),(47,5), '-' - TERRAIN:line (42,6),(46,6), '.' - TERRAIN:line (46,7),(47,7), '.' -} -[50%]: TERRAIN:fillrect (69,11,71,11), '-' - -STAIR:(01,01),up -STAIR:(46,03),down -FOUNTAIN:(50,09) -FOUNTAIN:(10,15) -FOUNTAIN:(66,18) - -REGION:(00,00,74,20),unlit,"ordinary" -REGION:(09,13,11,17),lit,"ordinary" -REGION:(08,14,12,16),lit,"ordinary" -REGION:(49,07,51,11),lit,"ordinary" -REGION:(48,08,52,10),lit,"ordinary" -REGION:(64,17,68,19),lit,"ordinary" -REGION:(37,13,39,17),lit,"ordinary" -REGION:(36,14,40,17),lit,"ordinary" -REGION:(59,02,72,10),lit,"ordinary" - -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watch captain"), random, peaceful -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome lord"), random -MONSTER: ('G', "gnome lord"), random -MONSTER: ('h', "dwarf"), random -MONSTER: ('h', "dwarf"), random -MONSTER: ('h', "dwarf"), random - -# The shops -REGION:(25,17,28,19),lit,"candle shop" -DOOR:closed,(24,18) -REGION:(59,9,67,10),lit,"shop" -DOOR:closed,(66,08) -REGION:(57,13,60,15),lit,"tool shop" -DOOR:closed,(56,14) -REGION:(05,09,08,10),lit,"food shop" -DOOR:closed,(07,11) -# Gnome homes -DOOR:closed,(04,14) -DOOR:locked,(01,17) -MONSTER: ('G', "gnomish wizard"), (02,19) -DOOR:locked,(20,16) -MONSTER: 'G', (20,18) -DOOR:random,(21,14) -DOOR:random,(25,14) -DOOR:random,(42,08) -DOOR:locked,(40,05) -MONSTER: 'G', (38,07) -DOOR:random,(59,03) -DOOR:random,(58,06) -DOOR:random,(63,03) -DOOR:random,(63,05) -DOOR:locked,(71,03) -DOOR:locked,(71,06) -DOOR:closed,(69,04) -DOOR:closed,(67,16) -MONSTER: ('G', "gnomish wizard"), (67,14) -OBJECT: '=', (70,14) -DOOR:locked,(69,18) -MONSTER: ('G', "gnome lord"), (71,19) -DOOR:locked,(73,18) -OBJECT: ('(', "chest"), (73,19) -DOOR:locked,(50,06) -OBJECT: '(', (50,03) -OBJECT: ('`', "statue"), (38,15), montype:"gnome king", 1 -# Temple -REGION:(29,02,33,04),lit,"temple" -DOOR:closed,(31,05) -ALTAR:(31,03),align[0],shrine - - -# "Bustling Town" by Kelly Bailey -# -MAZE: "minetn-6",' ' -FLAGS: inaccessibles -INIT_MAP:mines,'.','-',true,true,lit,true -GEOMETRY:center,top -MAP -.-----................----------------.- -.|...|................|...|..|...|...|.. -.|...+..--+--.........|...|..|...|...|.. -.|...|..|...|..-----..|...|..|-+---+--.. -.-----..|...|--|...|..--+---+-.........| -........|...|..|...+.............-----.. -........-----..|...|......--+-...|...|.. -.----...|...|+------..{...|..|...+...|.. -.|..+...|...|.............|..|...|...|.. -.|..|...|...|-+-.....---+-------------.| -.----...--+--..|..-+-|.................. -...|........|..|..|..|----....---------. -...|..T.....----..|..|...+....|......|-. -...|-....{........|..|...|....+......|-. -...--..-....T.....--------....|......|-. -.......--.....................---------- -ENDMAP - -REGION:(00,00,38,15),lit,"ordinary" -STAIR:levregion(01,03,20,19),(0,0,39,15),up -STAIR:levregion(61,03,75,19),(0,0,39,15),down -FOUNTAIN:(22,07) -FOUNTAIN:(09,13) -REGION:(13,5,14,6),unlit,"ordinary" -REGION:(9,7,11,9),lit,"candle shop" -REGION:(16,4,18,6),lit,"tool shop" -REGION:(23,1,25,3),lit,"shop" -REGION:(22,12,24,13),lit,"food shop" -REGION:(31,12,36,14),lit,"temple" -ALTAR:(35,13),align[0],shrine - -DOOR:closed,(5,2) -DOOR:locked,(4,8) -DOOR:closed,(10,2) -DOOR:closed,(10,10) -DOOR:locked,(13,7) -DOOR:locked,(14,9) -DOOR:closed,(19,5) -DOOR:closed,(19,10) -DOOR:closed,(24,4) -DOOR:closed,(24,9) -DOOR:closed,(25,12) -DOOR:closed,(28,4) -DOOR:locked,(28,6) -DOOR:closed,(30,13) -DOOR:closed,(31,3) -DOOR:closed,(35,3) -DOOR:closed,(33,7) - -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), random -MONSTER: ('G', "gnome"), (14,6) -MONSTER: ('G', "gnome lord"), (14,5) -MONSTER: ('G', "gnome"), (27,8) -MONSTER: ('G', "gnome lord"), random -MONSTER: ('G', "gnome lord"), random -MONSTER: ('h', "dwarf"), random -MONSTER: ('h', "dwarf"), random -MONSTER: ('h', "dwarf"), random -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watch captain"), random, peaceful -MONSTER: ('@', "watch captain"), random, peaceful - - -# "Bazaar Town" by Kelly Bailey -# -LEVEL: "minetn-7" -ROOM: "ordinary" , lit, (3,3), (center,center), (30,15) { -FOUNTAIN: (12, 07) -FOUNTAIN: (11, 13) - -[75%]: SUBROOM: "ordinary", random, (2,2), (4,2) { - ROOMDOOR: false, closed, south, random -} - -[75%]: SUBROOM: "ordinary", random, (7,2), (2,2) { - ROOMDOOR: false, closed, north, random -} - -[75%]: SUBROOM: "ordinary", random, (7,5), (2,2) { - ROOMDOOR: false, closed, south, random -} - -[75%]: SUBROOM: "ordinary", lit, (10,2), (3,4) { - MONSTER:('G',"gnome"),random - MONSTER:('Y',"monkey"),random - MONSTER:('Y',"monkey"),random - MONSTER:('Y',"monkey"),random - ROOMDOOR: false, closed, south, random -} - -[75%]: SUBROOM: "ordinary", random, (14,2), (4,2) { - ROOMDOOR: false, closed, south, 0 - MONSTER: 'n', random -} - -[75%]: SUBROOM: "ordinary", random, (16,5), (2,2) { - ROOMDOOR: false, closed, south, random -} - -[75%]: SUBROOM: "ordinary", unlit, (19,2), (2,2) { - ROOMDOOR: false, locked, east, random - MONSTER: ('G',"gnome king"),random -} - -SUBROOM: "food shop" [50%], lit, (19,5), (2,3) { - ROOMDOOR: false, closed, south, random -} - -[75%]: SUBROOM: "ordinary", random, (2,7), (2,2) { - ROOMDOOR: false, closed, east, random -} - -SUBROOM: "tool shop" [50%], lit, (2,10), (2,3) { - ROOMDOOR: false, closed, south, random -} - -SUBROOM: "candle shop", lit, (5,10),(3,3) { - ROOMDOOR: false, closed, north, random -} - -[75%]: SUBROOM: "ordinary", random, (11,10), (2,2) { - ROOMDOOR: false, locked, west, random - MONSTER: 'G',random -} - -SUBROOM: "shop" [60%], lit, (14,10), (2,3) { - ROOMDOOR: false, closed, north, random -} - -[75%]: SUBROOM: "ordinary", random, (17,11), (4,2) { - ROOMDOOR: false, closed, north, random -} - -[75%]: SUBROOM: "ordinary", random, (22,11), (2,2) { - ROOMDOOR: false, closed, south, random - SINK: (00,00) -} - -SUBROOM: "food shop" [50%], lit, (25,11), (3,2) { - ROOMDOOR: false, closed, east, random -} - -SUBROOM: "tool shop" [30%], lit, (25,2), (3,3) { - ROOMDOOR: false, closed, west, random -} - -SUBROOM: "temple", lit, (24,6), (4,4) { - ROOMDOOR: false, closed, west, random - ALTAR:(02,01),align[0],shrine - MONSTER: ('G', "gnomish wizard"), random - MONSTER: ('G', "gnomish wizard"), random -} - -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watchman"), random, peaceful -MONSTER: ('@', "watch captain"), random, peaceful -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome lord"),random -MONSTER:('Y',"monkey"),random -MONSTER:('Y',"monkey"),random - -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, up -} - -ROOM: "ordinary" , random, random, random, random { - STAIR: random, down - TRAP: random, random - MONSTER: ('G', "gnome"), random - MONSTER: ('G', "gnome"), random -} - -ROOM: "ordinary" , random, random, random, random { - MONSTER: ('h', "dwarf"), random -} - -ROOM: "ordinary" , random, random, random, random { - TRAP: random, random - MONSTER: ('G', "gnome"), random -} - -RANDOM_CORRIDORS - - -# Mine end level variant 1 -# "Mimic of the Mines" -# -MAZE: "minend-1", ' ' -GEOMETRY:center,center -#1234567890123456789012345678901234567890123456789012345678901234567890 -MAP ------------------------------------------------------------------- ------ -| |.......| |.......-...| |.....|. | -| --------- ----.......-------...........| ---...-S- | -| |.......| |..........................-S- --.......| | -| |......------- ---........................|. |.......-- | -| |..--........-----..........................|. -.-..---- | -| --..--.-----........-.....................--- --..-- | -| --..--..| -----------..................---.----------..-- | -| |...--.| |..S...S..............---................-- | -| ----..----- ------------........--- ------------...--- | -| |.........-- ---------- ---...-- ----- | -| --.....---..-- -------- --...---...-- | -| ----..-..-- --..--------------------- --......-- ---........| | -|--....----- --..-..................--- |........| |.......-- | -|.......| --......................S.. --......-- ---..---- | -|--.--.-- ----.................--- ------..------...-- | -| |....S.. |...............-..| ..S...........| | --------- -------------------- ------------------------ -ENDMAP - -# Dungeon Description -$place = { (08,16),(13,07),(21,08),(41,14),(50,04),(50,16),(66,01) } -SHUFFLE: $place - -REGION:(26,01,32,01),unlit,"ordinary",filled,irregular -REGION:(20,08,21,08),unlit,"ordinary" -REGION:(23,08,25,08),unlit,"ordinary" -# Secret doors -DOOR:locked,(07,16) -DOOR:locked,(22,08) -DOOR:locked,(26,08) -DOOR:locked,(40,14) -DOOR:locked,(50,03) -DOOR:locked,(51,16) -DOOR:locked,(66,02) -# Stairs -STAIR:(36,04),up -# Non diggable walls -NON_DIGGABLE:(00,00,74,17) -# Niches -# Note: $place[6] empty -OBJECT:('*',"diamond"),$place[0] -OBJECT:('*',"emerald"),$place[0] -OBJECT:('*',"worthless piece of violet glass"),$place[0] -MONSTER:'m',$place[0], m_object "luckstone" -OBJECT:('*',"worthless piece of white glass"),$place[1] -OBJECT:('*',"emerald"),$place[1] -OBJECT:('*',"amethyst"),$place[1] -MONSTER:'m',$place[1], m_object "loadstone" -OBJECT:('*',"diamond"),$place[2] -OBJECT:('*',"worthless piece of green glass"),$place[2] -OBJECT:('*',"amethyst"),$place[2] -MONSTER:'m',$place[2], m_object "flint" -OBJECT:('*',"worthless piece of white glass"),$place[3] -OBJECT:('*',"emerald"),$place[3] -OBJECT:('*',"worthless piece of violet glass"),$place[3] -MONSTER:'m',$place[3], m_object "touchstone" -OBJECT:('*',"worthless piece of red glass"),$place[4] -OBJECT:('*',"ruby"),$place[4] -OBJECT:('*',"loadstone"),$place[4] -OBJECT:('*',"ruby"),$place[5] -OBJECT:('*',"worthless piece of red glass"),$place[5] -OBJECT:('*',"luckstone"),$place[5] -# Random objects -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'(',random -OBJECT:'(',random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters -MONSTER:('G',"gnome king"),random -MONSTER:('G',"gnome lord"),random -MONSTER:('G',"gnome lord"),random -MONSTER:('G',"gnome lord"),random -MONSTER:('G',"gnomish wizard"),random -MONSTER:('G',"gnomish wizard"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('h',"hobbit"),random -MONSTER:('h',"hobbit"),random -MONSTER:('h',"dwarf"),random -MONSTER:('h',"dwarf"),random -MONSTER:('h',"dwarf"),random -MONSTER:'h',random - - -# Mine end level variant 2 -# "Gnome King's Wine Cellar" -# -MAZE: "minend-2", ' ' -GEOMETRY:center,center -MAP ---------------------------------------------------------------------------- -|...................................................| | -|.|---------S--.--|...|--------------------------|..| | -|.||---| |.||-| |...|..........................|..| | -|.||...| |-|.|.|---...|.............................| .. | -|.||...|-|.....|....|-|..........................|..|. .. | -|.||.....|-S|..|....|............................|..|.. | -|.||--|..|..|..|-|..|----------------------------|..|-. | -|.| |..|..|....|..................................|... | -|.| |..|..|----|..-----------------------------|..|.... | -|.|---|..|--|.......|----------------------------|..|..... | -|...........|----.--|......................| |..|....... | -|-----------|...|.| |------------------|.|.|-----|..|.....|.. | -|-----------|.{.|.|--------------------|.|..........|.....|.... | -|...............|.S......................|-------------..-----... | -|.--------------|.|--------------------|.|......................... | -|.................| |.....................|........ | ---------------------------------------------------------------------------- -ENDMAP - -IF [50%] { - TERRAIN:(55,14),'-' - TERRAIN:(56,14),'-' - TERRAIN:(61,15),'|' - TERRAIN:(52,5), 'S' - DOOR:locked, (52,5) -} -IF [50%] { - TERRAIN:(18,1), '|' - TERRAIN:rect (7,12, 8,13), '.' -} -IF [50%] { - TERRAIN:(49,4), '|' - TERRAIN:(21,5), '.' -} -IF [50%] { - IF [50%] { - TERRAIN:(22,1), '|' - } ELSE { - TERRAIN:(50,7), '-' - TERRAIN:(51,7), '-' - } -} - - -# Dungeon Description -FOUNTAIN:(14,13) -REGION:(23,03,48,06),lit,"ordinary" -REGION:(21,06,22,06),lit,"ordinary" -REGION:(14,04,14,04),unlit,"ordinary" -REGION:(10,05,14,08),unlit,"ordinary" -REGION:(10,09,11,09),unlit,"ordinary" -REGION:(15,08,16,08),unlit,"ordinary" -# Secret doors -DOOR:locked,(12,02) -DOOR:locked,(11,06) -# Stairs -STAIR:(36,04),up -# Non diggable walls -NON_DIGGABLE:(00,00,52,17) -NON_DIGGABLE:(53,00,74,00) -NON_DIGGABLE:(53,17,74,17) -NON_DIGGABLE:(74,01,74,16) -NON_DIGGABLE:(53,07,53,07) -NON_DIGGABLE:(58,12,58,13) -NON_DIGGABLE:(53,14,61,14) -NON_DIGGABLE:(61,15,61,16) -# The Gnome King's wine cellar. -# the Trespassers sign is a long-running joke -ENGRAVING:(12,03),engrave,"You are now entering the Gnome King's wine cellar." -ENGRAVING:(12,04),engrave,"Trespassers will be persecuted!" -OBJECT:('!',"booze"),(10,07) -OBJECT:('!',"booze"),(10,07) -OBJECT:'!',(10,07) -OBJECT:('!',"booze"),(10,08) -OBJECT:('!',"booze"),(10,08) -OBJECT:'!',(10,08) -OBJECT:('!',"booze"),(10,09) -OBJECT:('!',"booze"),(10,09) -OBJECT:('!',"object detection"),(10,09) -# Objects -# The Treasure chamber... -OBJECT:('*',"luckstone"),(70,05) -OBJECT:('*',"diamond"),(69,04) -OBJECT:'*',(69,04) -OBJECT:('*',"diamond"),(69,04) -OBJECT:'*',(69,04) -OBJECT:('*',"emerald"),(70,04) -OBJECT:'*',(70,04) -OBJECT:('*',"emerald"),(70,04) -OBJECT:'*',(70,04) -OBJECT:('*',"emerald"),(69,05) -OBJECT:'*',(69,05) -OBJECT:('*',"ruby"),(69,05) -OBJECT:'*',(69,05) -OBJECT:('*',"ruby"),(70,05) -OBJECT:('*',"amethyst"),(70,05) -OBJECT:'*',(70,05) -OBJECT:('*',"amethyst"),(70,05) -# Scattered gems... -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'*',random -OBJECT:'(',random -OBJECT:'(',random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -# Random traps -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# Random monsters. -MONSTER:('G',"gnome king"),random -MONSTER:('G',"gnome lord"),random -MONSTER:('G',"gnome lord"),random -MONSTER:('G',"gnome lord"),random -MONSTER:('G',"gnomish wizard"),random -MONSTER:('G',"gnomish wizard"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('G',"gnome"),random -MONSTER:('h',"hobbit"),random -MONSTER:('h',"hobbit"),random -MONSTER:('h',"dwarf"),random -MONSTER:('h',"dwarf"),random -MONSTER:('h',"dwarf"),random -MONSTER:'h',random - - -# "Catacombs" by Kelly Bailey -# Relies on some very specific behavior of MAZEWALK. -# -MAZE:"minend-3",'-' -FLAGS:nommap -GEOMETRY:center,bottom -MAP - - - - - - - - - - - -- -- - - . - - - - - - - - - -- - - -- - - - - . - - | -------...---------.-----------...-----.-------.------- ----------------| - - - - - - - - - - - - . - - - . - - - - - - - - - - -- - -- - . - - - - - | -------------.---------...-------------------------.--- ------------------| - - - - - - - - - - - . . - - --- - . - - - - - - - - -- -- - - - - |.....| | ---.---------------.......------------------------------- ----------|.....S-| - - - - - |.. ..| - ....... . - - - - |.........| - - - --- - - - - |.....| | -----.----|.....|------.......--------|.........|--------------.------------| - - - - - |..{..| - - -.... . --- - -.S.........S - - - - - - - - - - - - - | ----------|.....|--.---...------------|.........|---------------------------| - - - - - |.. ..| - - - . - - - - - - |.........| - --- . - - - - - - - - - | -----------------------...-------.---------------------...------------------| ----..| - - - - - - - - . --- - - - - - - - - - - - - - . - - --- - - --- - | --.S..|----.-------.------- ---------.-----------------...----- -----.------- ----..| - - - - - - - -- - - -- . - - - - - . - - - . - . - - -- -- - - - -- --.S..|--------.---.--- -...---------------...{.--------- --------- ---|. - - - - - - - -- - - - -- . - - - --- - - - . . - - - - -- - - - - - - -ENDMAP - -$place = { (1,15),(68,6),(1,13) } -SHUFFLE: $place - -NON_DIGGABLE:(67,3,73,7) -NON_DIGGABLE:(0,12,2,16) -FOUNTAIN:(12,08) -FOUNTAIN:(51,15) -REGION:(0,0,75,16),unlit,"ordinary" -REGION:(38,6,46,10),lit,"ordinary" -DOOR:closed,(37,8) -DOOR:closed,(47,8) -DOOR:closed,(73,5) -DOOR:closed,(2,15) -MAZEWALK:(36,8),west,false -STAIR:(42,8),up -WALLIFY - -# Objects -OBJECT:('*',"luckstone"),$place[0] -OBJECT:('*',"flint"),$place[1] -OBJECT:('*',"diamond"),random -OBJECT:'*',random -OBJECT:('*',"diamond"),random -OBJECT:'*',random -OBJECT:('*',"emerald"),random -OBJECT:'*',random -OBJECT:('*',"emerald"),random -OBJECT:'*',random -OBJECT:('*',"emerald"),random -OBJECT:'*',random -OBJECT:('*',"ruby"),random -OBJECT:'*',random -OBJECT:('*',"ruby"),random -OBJECT:('*',"amethyst"),random -OBJECT:'*',random -OBJECT:('*',"amethyst"),random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'?',random -OBJECT:'+',random -OBJECT:'+',random -OBJECT:'+',random -OBJECT:'+',random -OBJECT:random,random -OBJECT:random,random -OBJECT:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -TRAP:random,random -# One-time annoyance factor -TRAP:"level teleport",$place[0] -TRAP:"level teleport",$place[1] -MONSTER:'M',random -MONSTER:'M',random -MONSTER:'M',random -MONSTER:'M',random -MONSTER:'M',random -MONSTER:('M',"ettin mummy"),random -MONSTER:'V',random -MONSTER:'Z',random -MONSTER:'Z',random -MONSTER:'Z',random -MONSTER:'Z',random -MONSTER:'Z',random -MONSTER:'V',random -MONSTER:'e',random -MONSTER:'e',random -MONSTER:'e',random -MONSTER:'e',random - - -# end mines.des From a2e77064e874339d38ebb4a830723a31c5871f01 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 13:29:22 -0500 Subject: [PATCH 421/529] README update --- README | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/README b/README index cdc0dfcb6..00fecbff8 100644 --- a/README +++ b/README @@ -4,13 +4,27 @@ NetHack 3.7 is an enhancement to the dungeon exploration game NetHack, which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.6. -NetHack 3.7.0 work-in-progress is not an official release of NetHack. It -currently contains a number of enhancements to NetHack 3.6.3. The file -doc/fixes37.0 in the source distribution has a full list of them. The text in -there was written for the development team's own use and is provided "as is", -so please do not ask us to further explain the entries in that file. Some -entries might be considered "spoilers", particularly in the "new features" -section. +NetHack 3.7.0 work-in-progress is not a release of NetHack. As a .0 version, +and still very early in its development cycle, it is quite likely that there +has been, and will continue to be, quite a number of code changes and/or code +additions. The code may involve new approaches to things and may may add many +new features and changes in the weeks and months ahead, and it may alter +existing behavior. + +In short -- there are likely to be bugs. Don't treat NetHack-3.7 branch as +released code, and if stability is paramount, then the most recent +NetHack 3.6.3 release is probably safest for you. + +We're making the .0 work-in-progress available so that you can observe its +development, test it out, and contribute to its development. Constructive +suggestions, GitHub pull requests, and bug reports are all welcome. + +The file doc/fixes37.0 in the source distribution has a full list of bug-fixes +included so far, as well as brief mentions of some of the other code changes. +The text in there was written for the development team's own use and is +provided "as is", so please do not ask us to further explain the entries in +that file. Some entries might be considered "spoilers", particularly in the +"new features" section. Along with the game improvements and bug fixes, NetHack 3.7 strives to make some general architectural improvements to the game or to its building From e41d7390d5a3438862c9527068785ed267dc64f1 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 14:21:58 -0500 Subject: [PATCH 422/529] header should show 3.7 in these files that first appear there --- src/sfascii.c | 12 +++++++++--- src/sfbase.c | 2 +- src/sflendian.c | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/sfascii.c b/src/sfascii.c index 0a85ed209..673d47342 100644 --- a/src/sfascii.c +++ b/src/sfascii.c @@ -1,7 +1,13 @@ -/* NetHack 3.6 sfascii.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.7 sfascii.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ /* Copyright (c) Michael Allison, 2019. */ /* NetHack may be freely redistributed. See license for details. */ +/* + * this is a proof-of-concept alternative output format. It doesn't + * offer value over the sflendian approach and is mostly used to test + * and confirm that alternative saveformat operates correctly. + */ + #include "hack.h" #include "integer.h" #include "sfprocs.h" @@ -17,7 +23,7 @@ void FDECL(report_problem_ascii, (NHFILE *, const char *, const char *, const ch #endif struct sf_procs ascii_sfo_procs = { - ".ascii", + ".tx", { ascii_sfo_aligntyp, ascii_sfo_any, @@ -44,7 +50,7 @@ struct sf_procs ascii_sfo_procs = { struct sf_procs ascii_sfi_procs = { - ".ascii", + ".tx", { ascii_sfi_aligntyp, ascii_sfi_any, diff --git a/src/sfbase.c b/src/sfbase.c index 8f81817b3..396bdd03c 100644 --- a/src/sfbase.c +++ b/src/sfbase.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 sf_base.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.7 sf_base.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ /* Copyright (c) Michael Allison, 2019. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/sflendian.c b/src/sflendian.c index e4dc92fb4..3953a371e 100644 --- a/src/sflendian.c +++ b/src/sflendian.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 sflendian.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.7 sflendian.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ /* Copyright (c) M. Allison, 2019. */ /* NetHack may be freely redistributed. See license for details. */ From 1c6f61bbbdf3dbb55026c1c84344cc78e50f21ab Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 14:35:12 -0500 Subject: [PATCH 423/529] typo "may may" --- README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index 00fecbff8..2b9eba41b 100644 --- a/README +++ b/README @@ -7,9 +7,9 @@ NetHack 3.6. NetHack 3.7.0 work-in-progress is not a release of NetHack. As a .0 version, and still very early in its development cycle, it is quite likely that there has been, and will continue to be, quite a number of code changes and/or code -additions. The code may involve new approaches to things and may may add many -new features and changes in the weeks and months ahead, and it may alter -existing behavior. +additions. The code may involve new approaches to things and may add many new +features and changes in the weeks and months ahead, and it may alter existing +behavior. In short -- there are likely to be bugs. Don't treat NetHack-3.7 branch as released code, and if stability is paramount, then the most recent From 9a707f7d46172869ddc780121d2669258e68597b Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Thu, 5 Dec 2019 15:47:52 -0500 Subject: [PATCH 424/529] This is cron-daily v1-Dec-2-2019. files updated: Files --- Files | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Files b/Files index 739ccadaa..32120db05 100644 --- a/Files +++ b/Files @@ -52,14 +52,14 @@ earth.lua engrave.txt epitaph.txt fakewiz1.lua fakewiz2.lua fire.lua help hh history juiblex.lua keyhelp knox.lua license medusa-1.lua medusa-2.lua medusa-3.lua medusa-4.lua minefill.lua minend-1.lua minend-2.lua -minend-3.lua mines.des minetn-1.lua minetn-2.lua minetn-3.lua -minetn-4.lua minetn-5.lua minetn-6.lua minetn-7.lua nhlib.lua -opthelp oracle.lua oracles.txt orcus.lua quest.lua -rumors.fal rumors.tru sanctum.lua soko1-1.lua soko1-2.lua -soko2-1.lua soko2-2.lua soko3-1.lua soko3-2.lua soko4-1.lua -soko4-2.lua symbols tower1.lua tower2.lua tower3.lua -tribute valley.lua water.lua wizard1.lua wizard2.lua -wizard3.lua wizhelp +minend-3.lua minetn-1.lua minetn-2.lua minetn-3.lua minetn-4.lua +minetn-5.lua minetn-6.lua minetn-7.lua nhlib.lua opthelp +oracle.lua oracles.txt orcus.lua quest.lua rumors.fal +rumors.tru sanctum.lua soko1-1.lua soko1-2.lua soko2-1.lua +soko2-2.lua soko3-1.lua soko3-2.lua soko4-1.lua soko4-2.lua +symbols tower1.lua tower2.lua tower3.lua tribute +valley.lua water.lua wizard1.lua wizard2.lua wizard3.lua +wizhelp doc: (files for all versions) From 5a9acceee6b7ce2493634c6ee8e1f36dadf94b13 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 16:11:20 -0500 Subject: [PATCH 425/529] more README updates --- README | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/README b/README index 2b9eba41b..a8bb0d555 100644 --- a/README +++ b/README @@ -5,15 +5,12 @@ which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.6. NetHack 3.7.0 work-in-progress is not a release of NetHack. As a .0 version, -and still very early in its development cycle, it is quite likely that there -has been, and will continue to be, quite a number of code changes and/or code -additions. The code may involve new approaches to things and may add many new -features and changes in the weeks and months ahead, and it may alter existing -behavior. +and still very early in its development cycle, there has already been changes +made, and there will continue to be many more prior to an eventual release. In short -- there are likely to be bugs. Don't treat NetHack-3.7 branch as released code, and if stability is paramount, then the most recent -NetHack 3.6.3 release is probably safest for you. +NetHack 3.6.3 release is safest for you. We're making the .0 work-in-progress available so that you can observe its development, test it out, and contribute to its development. Constructive @@ -45,13 +42,21 @@ process. Among them: to open up the possibility of utilizing them between different platforms, such as between your desktop computer and your hand-held device. -Below you will find some other general notes on the changes in NetHack 3.7 that -were not considered spoilers: - - automatic annotation "gateway to Moloch's Sanctum" for vibrating square level - once that square's location becomes known (found or magic mapped); - goes away once sanctum temple is found (entered or high altar mapped) - - savefile: add support to deconstruct internal data structures down into their - individual fields and save those fields instead of the entire struct + * Add support to make the game restartable without exit (a.k.a. "play again" + support). Toward that end, many previously scattered and separate variables + have been gathered into a central 'g' structure in decl.h/decl.c. That + will benefit the porting effort to some platforms that are under + consideration. + +Here are some other general notes on the changes in NetHack 3.7 that were not +considered spoilers: + - automatic annotation "gateway to Moloch's Sanctum" for vibrating square + level once that square's location becomes known (found or magic + mapped); goes away once sanctum temple is found (entered or high altar + mapped) + - savefile: add support to deconstruct internal data structures down into + their individual fields and save those fields instead of the entire + struct - savefile: use little-endian format for fields where that makes a difference - - - - - - - - - - - From 8b7aa58b45b09ed404e535f122093d985f4ffeac Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 16:20:46 -0500 Subject: [PATCH 426/529] yet more README --- README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index a8bb0d555..4327bfe02 100644 --- a/README +++ b/README @@ -12,9 +12,9 @@ In short -- there are likely to be bugs. Don't treat NetHack-3.7 branch as released code, and if stability is paramount, then the most recent NetHack 3.6.3 release is safest for you. -We're making the .0 work-in-progress available so that you can observe its -development, test it out, and contribute to its development. Constructive -suggestions, GitHub pull requests, and bug reports are all welcome. +We're making the .0 work-in-progress available so that you can observe, test +out, and contribute to its development. Constructive suggestions, GitHub pull +requests, and bug reports are all welcome and encouraged. The file doc/fixes37.0 in the source distribution has a full list of bug-fixes included so far, as well as brief mentions of some of the other code changes. From bd7547fe6206ab6ec8a549f4ab41cba39220dd4f Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Thu, 5 Dec 2019 18:04:18 -0500 Subject: [PATCH 427/529] This is cron-daily v1-Dec-2-2019. guidebook updated: doc/Guidebook.txt --- doc/Guidebook.txt | 214 +++++++++++++++++++++++----------------------- 1 file changed, 107 insertions(+), 107 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index 5518f6899..60ccbdf68 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -126,7 +126,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -192,7 +192,7 @@ you have seen on the current dungeon level; as you explore more - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -258,7 +258,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -324,7 +324,7 @@ Intelligence affects your ability to cast spells and read - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -456,7 +456,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -588,7 +588,7 @@ symbol at the chosen location, conditionally check for "More - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -720,7 +720,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -786,7 +786,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -852,7 +852,7 @@ once you've closed this menu. The available options are - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -918,7 +918,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -984,7 +984,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1050,7 +1050,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1116,7 +1116,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1248,7 +1248,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1314,7 +1314,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1380,7 +1380,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1446,7 +1446,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1512,7 +1512,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1578,7 +1578,7 @@ When picking a target with cursor and the autodescribe - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1644,7 +1644,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1710,7 +1710,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1776,7 +1776,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1842,7 +1842,7 @@ the `^D' (kick) command. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1908,7 +1908,7 @@ on the corresponding staircase at your destination. However, - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -1974,7 +1974,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2040,7 +2040,7 @@ member a monster but want to try fighting anyway, you can use the - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2106,7 +2106,7 @@ ers (or even former incarnations of yourself!) and their personal - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2172,7 +2172,7 @@ ter. Many commands that operate on objects must ask you to find - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2238,7 +2238,7 @@ In some cases "uncursed" will be omitted as being redundant when - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2304,7 +2304,7 @@ to taking off other worn items. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2370,7 +2370,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2436,7 +2436,7 @@ ondary is just an item in your inventory that's been designated - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2502,7 +2502,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2568,7 +2568,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2634,7 +2634,7 @@ the wall, you might decide to go for broke and break your wand. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2700,7 +2700,7 @@ cation rather than just specify a particular direction. Other - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2766,7 +2766,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2832,7 +2832,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2898,7 +2898,7 @@ brains while polymorphed into a mind flayer, is considered eating - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -2964,7 +2964,7 @@ type ("polypiling") or the form of your own body into another - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3030,7 +3030,7 @@ tion, and are ignored unless a CHOOSE statement was used to - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3096,7 +3096,7 @@ pletion has no effect for the X11 windowport. You can specify - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3162,7 +3162,7 @@ "Configuring User Sounds" section. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3228,7 +3228,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3294,7 +3294,7 @@ tion controls whether the description includes map coordinates. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3360,7 +3360,7 @@ was defined during compilation. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3426,7 +3426,7 @@ display for end-of-game disclosure follows a set sequence. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3492,7 +3492,7 @@ "no", you will exclude that gender from being picked randomly. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3558,7 +3558,7 @@ sistent. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3624,7 +3624,7 @@ fault `\'. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3690,7 +3690,7 @@ Prompt for new form whenever any monster changes shape (default - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3756,7 +3756,7 @@ Valid settings are: - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3822,7 +3822,7 @@ item. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3888,7 +3888,7 @@ (Default `S'). Persistent. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -3954,7 +3954,7 @@ be set with the `O' command. Persistent. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4020,7 +4020,7 @@ off). Persistent. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4086,7 +4086,7 @@ only; "X11" interface always uses a timer based delay. The - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4152,7 +4152,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4218,7 +4218,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4284,7 +4284,7 @@ If NetHack can, it should use this size font for text windows. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4350,7 +4350,7 @@ Number of lines for traditional below-the-map status display. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4416,7 +4416,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4482,7 +4482,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4548,7 +4548,7 @@ pressions. It is possible to compile NetHack without regular - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4614,7 +4614,7 @@ key can be a single character ("x"), a control key ("^X", "C-x"), - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4680,7 +4680,7 @@ When asked for a location, the key to toggle autodescribe. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4746,7 +4746,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4812,7 +4812,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4878,7 +4878,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -4944,7 +4944,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5010,7 +5010,7 @@ cyan, gray, orange, light-green, yellow, light-blue, light- - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5076,7 +5076,7 @@ value changes upwards or downwards. This attribute times - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5142,7 +5142,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5208,7 +5208,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5274,7 +5274,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5340,7 +5340,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5406,7 +5406,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5472,7 +5472,7 @@ may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5538,7 +5538,7 @@ - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5604,7 +5604,7 @@ spectively, to identify unique people for the score file. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5670,7 +5670,7 @@ mode:explore option. The other is to issue the "#exploremode" - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5736,7 +5736,7 @@ incorporating many of the added features, and produced NetHack - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5802,7 +5802,7 @@ forms. - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5868,7 +5868,7 @@ bugs that had been discovered. Despite that constantly growing - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -5934,7 +5934,7 @@ velopment was released publicly by other parties. Since that code - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -6000,7 +6000,7 @@ Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -6021,25 +6021,28 @@ team participant for decades, joined the NetHack Development Team in late May 2019. + NetHack 3.6.3 was released on December 5, 2019 containing + over 190 bug fixes to NetHack 3.6.2. + The official NetHack web site is maintained by Ken Lorber at - http://www.nethack.org/. + https://www.nethack.org/. 12.1. SPECIAL THANKS On behalf of the NetHack community, thank you very much once - again to M. Drew Streib and Pasi Kallinen for providing a public - NetHack server at nethack.alt.org. Thanks to Keith Simpson and + again to M. Drew Streib and Pasi Kallinen for providing a public + NetHack server at nethack.alt.org. Thanks to Keith Simpson and Andy Thomson for hardfought.org. Thanks to all those unnamed dun- - geoneers who invest their time and effort into annual NetHack - tournaments such as Junethack, The November NetHack Tournament + geoneers who invest their time and effort into annual NetHack + tournaments such as Junethack, The November NetHack Tournament and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list + of the names of the worst of these miscreants in this, the list of Dungeoneers: Adam Aronow J. Ali Harlow Mikko Juola Alex Kompel Janet Walz Nathan Eady @@ -6060,13 +6063,10 @@ Chris Russo Ken Arnold Robin Johnson David Cohrs Ken Arromdee Roderick Schertler David Damerell Ken Lorber Roland McGrath - David Gentzel Ken Washikita Ron Van Iwaarden - David Hairston Kevin Darcy Ronnen Miller - Dean Luick Kevin Hugo Ross Brown - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 @@ -6076,6 +6076,9 @@ + David Gentzel Ken Washikita Ron Van Iwaarden + David Hairston Kevin Darcy Ronnen Miller + Dean Luick Kevin Hugo Ross Brown Del Lamb Kevin Sitze Sascha Wostmann Derek S. Ray Kevin Smolkowski Scott Bigham Deron Meranda Kevin Sweet Scott R. Turner @@ -6097,7 +6100,7 @@ Irina Rempt-Drijfhout Mike Passaretti Izchak Miller Mike Stephenson - Brand and product names are trademarks or registered trade- + Brand and product names are trademarks or registered trade- marks of their respective holders. @@ -6129,10 +6132,7 @@ - - - - NetHack 3.6 December 1, 2019 + NetHack 3.6 December 5, 2019 From 3f2abab48c8e43b9bec37de5679b3da794f9c4d5 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 18:18:17 -0500 Subject: [PATCH 428/529] README bit --- README | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README b/README index 1c5dc57cd..25210e92a 100644 --- a/README +++ b/README @@ -20,7 +20,8 @@ spoilers: * off due to being polymorphed * Fixed 'object lost' panic when attempting to crawl of of the water during * emergency disrobing/dropping - * Running now stops when moving over engravings so you can tell where they are + * Running now stops when moving over engravings so you can tell where they + * are * Fixed detection of unseen/secret doors which failed to find monsters hiding * under objects and failed to find monsters hiding at trap locations * Ensured fatal status conditions made it to disclosure and/or dumplog @@ -193,6 +194,6 @@ In our own patches, we will assume that your code is synchronized with ours. -- Good luck, and happy Hacking -- -# $NHDT-Date: 1575306309 2019/12/02 17:05:09 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.62 $ +# $NHDT-Date: 1575587888 2019/12/05 23:18:08 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.64 $ # Copyright (c) 2012 by Michael Allison # NetHack may be freely redistributed. See license for details. From 7ea41cd31d9f418b6eeac8e43a179cfae4b064bd Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 18:24:04 -0500 Subject: [PATCH 429/529] another bit --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 25210e92a..5cbcb70c4 100644 --- a/README +++ b/README @@ -21,7 +21,7 @@ spoilers: * Fixed 'object lost' panic when attempting to crawl of of the water during * emergency disrobing/dropping * Running now stops when moving over engravings so you can tell where they - * are + * are * Fixed detection of unseen/secret doors which failed to find monsters hiding * under objects and failed to find monsters hiding at trap locations * Ensured fatal status conditions made it to disclosure and/or dumplog From b80241492c850011d8166ae5efbd43f636ea1105 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Thu, 5 Dec 2019 18:19:43 -0500 Subject: [PATCH 430/529] This is cron-daily v1-Dec-2-2019. guidebook updated: doc/Guidebook.txt --- doc/Guidebook.txt | 211 +++++++++++++++++++++++----------------------- 1 file changed, 104 insertions(+), 107 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index 4deff64cc..d0b7c749f 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -126,7 +126,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -192,7 +192,7 @@ you have seen on the current dungeon level; as you explore more - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -258,7 +258,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -324,7 +324,7 @@ Intelligence affects your ability to cast spells and read - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -456,7 +456,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -588,7 +588,7 @@ symbol at the chosen location, conditionally check for "More - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -720,7 +720,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -786,7 +786,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -852,7 +852,7 @@ once you've closed this menu. The available options are - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -918,7 +918,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -984,7 +984,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1050,7 +1050,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1116,7 +1116,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1248,7 +1248,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1314,7 +1314,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1380,7 +1380,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1446,7 +1446,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1512,7 +1512,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1578,7 +1578,7 @@ When picking a target with cursor and the autodescribe - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1644,7 +1644,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1710,7 +1710,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1776,7 +1776,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1842,7 +1842,7 @@ the `^D' (kick) command. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1908,7 +1908,7 @@ on the corresponding staircase at your destination. However, - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -1974,7 +1974,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2040,7 +2040,7 @@ member a monster but want to try fighting anyway, you can use the - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2106,7 +2106,7 @@ ers (or even former incarnations of yourself!) and their personal - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2172,7 +2172,7 @@ ter. Many commands that operate on objects must ask you to find - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2238,7 +2238,7 @@ In some cases "uncursed" will be omitted as being redundant when - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2304,7 +2304,7 @@ to taking off other worn items. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2370,7 +2370,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2436,7 +2436,7 @@ ondary is just an item in your inventory that's been designated - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2502,7 +2502,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2568,7 +2568,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2634,7 +2634,7 @@ the wall, you might decide to go for broke and break your wand. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2700,7 +2700,7 @@ cation rather than just specify a particular direction. Other - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2766,7 +2766,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2832,7 +2832,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2898,7 +2898,7 @@ brains while polymorphed into a mind flayer, is considered eating - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -2964,7 +2964,7 @@ type ("polypiling") or the form of your own body into another - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3030,7 +3030,7 @@ tion, and are ignored unless a CHOOSE statement was used to - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3096,7 +3096,7 @@ pletion has no effect for the X11 windowport. You can specify - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3162,7 +3162,7 @@ "Configuring User Sounds" section. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3228,7 +3228,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3294,7 +3294,7 @@ tion controls whether the description includes map coordinates. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3360,7 +3360,7 @@ was defined during compilation. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3426,7 +3426,7 @@ display for end-of-game disclosure follows a set sequence. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3492,7 +3492,7 @@ "no", you will exclude that gender from being picked randomly. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3558,7 +3558,7 @@ sistent. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3624,7 +3624,7 @@ fault `\'. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3690,7 +3690,7 @@ Prompt for new form whenever any monster changes shape (default - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3756,7 +3756,7 @@ Valid settings are: - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3822,7 +3822,7 @@ item. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3888,7 +3888,7 @@ (Default `S'). Persistent. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -3954,7 +3954,7 @@ be set with the `O' command. Persistent. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4020,7 +4020,7 @@ off). Persistent. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4086,7 +4086,7 @@ only; "X11" interface always uses a timer based delay. The - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4152,7 +4152,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4218,7 +4218,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4284,7 +4284,7 @@ If NetHack can, it should use this size font for text windows. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4350,7 +4350,7 @@ Number of lines for traditional below-the-map status display. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4416,7 +4416,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4482,7 +4482,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4548,7 +4548,7 @@ terns. This applies to Autopickup exceptions, Message types, Menu - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4614,7 +4614,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4680,7 +4680,7 @@ When asked for a location, the key to go to next closest - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4746,7 +4746,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4812,7 +4812,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4878,7 +4878,7 @@ tty, curses, win32tty and win32gui interfaces support this. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -4944,7 +4944,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5010,7 +5010,7 @@ be used in combination with any of the other attributes. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5076,7 +5076,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5142,7 +5142,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5208,7 +5208,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5274,7 +5274,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5340,7 +5340,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5406,7 +5406,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5472,7 +5472,7 @@ may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5538,7 +5538,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5604,7 +5604,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5670,7 +5670,7 @@ whatever you have. If you quit, you keep all your gold, but if - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5736,7 +5736,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5802,7 +5802,7 @@ NetHack 3.1 to the PC. - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5868,7 +5868,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -5934,7 +5934,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -6000,7 +6000,7 @@ - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -6039,7 +6039,7 @@ team participant for decades, joined the NetHack Development Team in late May 2019. - NetHack 3.6.3 was released on December 5, 2019 containing + NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug fixes to NetHack 3.6.2. The official NetHack web site is maintained by Ken Lorber at @@ -6048,28 +6048,25 @@ 12.1. SPECIAL THANKS On behalf of the NetHack community, thank you very much once - again to M. Drew Streib and Pasi Kallinen for providing a public - NetHack server at nethack.alt.org. Thanks to Keith Simpson and + again to M. Drew Streib and Pasi Kallinen for providing a public + NetHack server at nethack.alt.org. Thanks to Keith Simpson and Andy Thomson for hardfought.org. Thanks to all those unnamed dun- - geoneers who invest their time and effort into annual NetHack - tournaments such as Junethack, The November NetHack Tournament + geoneers who invest their time and effort into annual NetHack + tournaments such as Junethack, The November NetHack Tournament and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list + of the names of the worst of these miscreants in this, the list of Dungeoneers: Adam Aronow J. Ali Harlow Mikko Juola - Alex Kompel Janet Walz Nathan Eady - Alex Smith Janne Salmijarvi Norm Meluch - Andreas Dorn Jean-Christophe Collet Olaf Seibert - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 @@ -6079,6 +6076,9 @@ + Alex Kompel Janet Walz Nathan Eady + Alex Smith Janne Salmijarvi Norm Meluch + Andreas Dorn Jean-Christophe Collet Olaf Seibert Andy Church Jeff Bailey Pasi Kallinen Andy Swanson Jochen Erwied Pat Rankin Andy Thomson John Kallen Patric Mueller @@ -6118,7 +6118,7 @@ Irina Rempt-Drijfhout Mike Passaretti Izchak Miller Mike Stephenson - Brand and product names are trademarks or registered trade- + Brand and product names are trademarks or registered trade- marks of their respective holders. @@ -6132,10 +6132,7 @@ - - - - NetHack 3.7 December 1, 2019 + NetHack 3.7 December 5, 2019 From 13f2a30d14805132c3259aedf710fe0b6c230c4f Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 20:36:55 -0500 Subject: [PATCH 431/529] README verbiage --- README | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README b/README index 4327bfe02..3eaae82ee 100644 --- a/README +++ b/README @@ -101,8 +101,8 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. 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 the most recent official release, NetHack 3.6, it had + been tested to run/compile on: Intel Pentium or better (or clone) running Linux, BSDI, or Windows (7 through 10) @@ -111,11 +111,12 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. OpenVMS (aka VMS) V8.4 on Alpha and on Integrity/Itanium/IA64 Instructions have been provided by way of community contribution on: - msdos protected mode using djgpp + msdos protected mode using djgpp including a Linux-host djgpp + cross-compile Previous versions of NetHack were tested and known to run on the following systems, but it is unknown if they can still build and - execute NetHack 3.6: + execute NetHack 3.6 or NetHack 3.7: Apple Macintosh running MacOS 7.5 or higher, LinuxPPC, BeOS 4.0 Atari ST/TT/Falcon running TOS (or MultiTOS) with GCC From cb20548d175e3324d81a99c8edd9a70b57553f24 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 20:46:13 -0500 Subject: [PATCH 432/529] travis build failure on 1 of 7 configurations --- win/Qt4/qt4main.cpp | 4 ++-- win/Qt4/qt4yndlg.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/win/Qt4/qt4main.cpp b/win/Qt4/qt4main.cpp index 291bddc35..694415b24 100644 --- a/win/Qt4/qt4main.cpp +++ b/win/Qt4/qt4main.cpp @@ -683,7 +683,7 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) : QToolButton* tb; char actchar[32]; tb = new SmallToolButton( QPixmap(again_xpm),"Again","Action", sm, SLOT(map()), toolbar ); - Sprintf(actchar, "%c", Cmd.spkeys[NHKF_DOAGAIN]); + Sprintf(actchar, "%c", g.Cmd.spkeys[NHKF_DOAGAIN]); sm->setMapping(tb, actchar ); toolbar->addWidget(tb); tb = new SmallToolButton( QPixmap(get_xpm),"Get","Action", sm, SLOT(map()), toolbar ); @@ -977,7 +977,7 @@ void NetHackQtMainWindow::keyPressEvent(QKeyEvent* event) event->key() >= Qt::Key_Left && event->key() <= Qt::Key_Down ) return; - const char* d = Cmd.dirchars; + const char* d = g.Cmd.dirchars; switch (event->key()) { case Qt::Key_Up: if ( dirkey == d[0] ) diff --git a/win/Qt4/qt4yndlg.cpp b/win/Qt4/qt4yndlg.cpp index e315189de..7b1725924 100644 --- a/win/Qt4/qt4yndlg.cpp +++ b/win/Qt4/qt4yndlg.cpp @@ -81,7 +81,7 @@ char NetHackQtYnDialog::Exec() } if ( question.indexOf("what direction") >= 0 ) { // We replace this regardless, since sometimes you get choices. - const char* d = Cmd.dirchars; + const char* d = g.Cmd.dirchars; enable=ch; ch=""; ch.append(d[1]); From 27c778ea2fd7697c741e16fb9fea30c0892bfa84 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 22:24:29 -0500 Subject: [PATCH 433/529] add creation of nhlua.h to msdos cross-compile Makefile1.cross --- sys/msdos/Makefile1.cross | 14 +++++++++++++- sys/msdos/Makefile2.cross | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index 8c9324076..a15a495ed 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -31,6 +31,7 @@ HOBJ = host_o DAT = ../dat DOC = ../doc INCL = ../include +LIB = ../lib MSYS = ../sys/msdos SRC = ../src SSHR = ../sys/share @@ -301,9 +302,20 @@ $(HOST_O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \ tileutil: $(U)gif2txt $(U)txt2ppm @echo Optional tile development utilities are up to date. -$(HOST_O)prereq.tag: hobj.tag $(U)makedefs $(HOST_O)utility.tag $(DAT)/nhdat +$(HOST_O)prereq.tag: $(INCL)/nhlua.h hobj.tag $(U)makedefs \ + $(HOST_O)utility.tag $(DAT)/nhdat echo prereq done >$@ +$(INCL)/nhlua.h: + cd $(INCL); \ + echo '/* nhlua.h - generated by Makefile1.cross */' > $@; \ + echo '#include \"../lib/lua-5.3.5/src/lua.h\"' >> $@; \ + sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < $(LIB)/lua-5.3.5/src/lua.h >> $@; \ + echo '#include \"../lib/lua-5.3.5/src/lualib.h\"' >> $@; \ + echo '#include \"../lib/lua-5.3.5/src/lauxlib.h\"' >> $@; \ + echo '/*nhlua.h*/' >> $@; \ + cd $(SRC) + #========================================== # Other host targets. #========================================== diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index f9a848e13..9a88c16f9 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -71,6 +71,7 @@ HOBJ = host_o DAT = ../dat DOC = ../doc INCL = ../include +LIB = ../lib MSYS = ../sys/msdos SRC = ../src SSHR = ../sys/share From 31184548725efbb72000643b20df47e5ca7ce7c6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 22:36:14 -0500 Subject: [PATCH 434/529] try to fix the broken travis-ci build yml file may have had a mistake --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a8aa59d41..d56ffae16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ matrix: - qtbase5-dev - qtmultimedia5-dev - qtbase5-dev-tools - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && QT_SELECT=5 && make fetch-lua && make MOC=moc install" + script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make fetch-lua && make QT_SELECT=5 MOC=moc install" - os: linux env: DESCR=linux-bionic-gcc-x11 HINTS=linux-x11 dist: bionic From 33fd57082985eb1441d62b487ee69f0bb6746eb6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Dec 2019 23:22:14 -0500 Subject: [PATCH 435/529] cross-compile Makefile1.cross bit --- sys/msdos/Makefile1.cross | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index a15a495ed..1cdc6d287 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -309,10 +309,10 @@ $(HOST_O)prereq.tag: $(INCL)/nhlua.h hobj.tag $(U)makedefs \ $(INCL)/nhlua.h: cd $(INCL); \ echo '/* nhlua.h - generated by Makefile1.cross */' > $@; \ - echo '#include \"../lib/lua-5.3.5/src/lua.h\"' >> $@; \ + echo '#include "../lib/lua-5.3.5/src/lua.h"' >> $@; \ sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < $(LIB)/lua-5.3.5/src/lua.h >> $@; \ - echo '#include \"../lib/lua-5.3.5/src/lualib.h\"' >> $@; \ - echo '#include \"../lib/lua-5.3.5/src/lauxlib.h\"' >> $@; \ + echo '#include "../lib/lua-5.3.5/src/lualib.h"' >> $@; \ + echo '#include "../lib/lua-5.3.5/src/lauxlib.h"' >> $@; \ echo '/*nhlua.h*/' >> $@; \ cd $(SRC) From 28f50066e0f0aa803aea462535fa6fda11ec55e2 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 6 Dec 2019 09:06:31 -0500 Subject: [PATCH 436/529] the latest Qt4 travis breakage --- win/Qt4/qt4stat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win/Qt4/qt4stat.cpp b/win/Qt4/qt4stat.cpp index be0ceb1cc..c8d250718 100644 --- a/win/Qt4/qt4stat.cpp +++ b/win/Qt4/qt4stat.cpp @@ -431,7 +431,7 @@ void NetHackQtStatusWindow::updateStats() if (u.mtimedone) { buf = nh_capitalize_words(mons[u.umonnum].mname); } else { - buf = rank_of(u.ulevel, pl_character[0], ::flags.female); + buf = rank_of(u.ulevel, g.pl_character[0], ::flags.female); } QString buf2; buf2.sprintf("%s the %s", g.plname, buf.toLatin1().constData()); @@ -441,7 +441,7 @@ void NetHackQtStatusWindow::updateStats() if (describe_level(buf3)) { dlevel.setLabel(buf3,true); } else { - buf.sprintf("%s, level ", dungeons[u.uz.dnum].dname); + buf.sprintf("%s, level ", g.dungeons[u.uz.dnum].dname); dlevel.setLabel(buf,(long)::depth(&u.uz)); } From 5266fb9ca3b240345ce6cee163f128e7d9e5daac Mon Sep 17 00:00:00 2001 From: Tangles Date: Fri, 6 Dec 2019 16:39:18 +1100 Subject: [PATCH 437/529] fix VAR_PLAYGROUND / fqn_prefix in unixmain.c --- sys/unix/unixmain.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index 15acd2ef7..372895c70 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -498,12 +498,13 @@ boolean wr; #ifdef VAR_PLAYGROUND int len = strlen(VAR_PLAYGROUND); - fqn_prefix[SCOREPREFIX] = (char *) alloc(len + 2); - Strcpy(fqn_prefix[SCOREPREFIX], VAR_PLAYGROUND); - if (fqn_prefix[SCOREPREFIX][len - 1] != '/') { - fqn_prefix[SCOREPREFIX][len] = '/'; - fqn_prefix[SCOREPREFIX][len + 1] = '\0'; + g.fqn_prefix[SCOREPREFIX] = (char *) alloc(len + 2); + Strcpy(g.fqn_prefix[SCOREPREFIX], VAR_PLAYGROUND); + if (g.fqn_prefix[SCOREPREFIX][len - 1] != '/') { + g.fqn_prefix[SCOREPREFIX][len] = '/'; + g.fqn_prefix[SCOREPREFIX][len + 1] = '\0'; } + #endif } @@ -523,11 +524,11 @@ boolean wr; */ if (wr) { #ifdef VAR_PLAYGROUND - fqn_prefix[LEVELPREFIX] = fqn_prefix[SCOREPREFIX]; - fqn_prefix[SAVEPREFIX] = fqn_prefix[SCOREPREFIX]; - fqn_prefix[BONESPREFIX] = fqn_prefix[SCOREPREFIX]; - fqn_prefix[LOCKPREFIX] = fqn_prefix[SCOREPREFIX]; - fqn_prefix[TROUBLEPREFIX] = fqn_prefix[SCOREPREFIX]; + g.fqn_prefix[LEVELPREFIX] = g.fqn_prefix[SCOREPREFIX]; + g.fqn_prefix[SAVEPREFIX] = g.fqn_prefix[SCOREPREFIX]; + g.fqn_prefix[BONESPREFIX] = g.fqn_prefix[SCOREPREFIX]; + g.fqn_prefix[LOCKPREFIX] = g.fqn_prefix[SCOREPREFIX]; + g.fqn_prefix[TROUBLEPREFIX] = g.fqn_prefix[SCOREPREFIX]; #endif check_recordfile(dir); } From afb4a67f0e985cfb331810917e78e0e59c823c7b Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 6 Dec 2019 12:59:18 -0800 Subject: [PATCH 438/529] PANICTRACE memory leak Changing from BETA to RELEASED resulted in turning off PANICTRACE and that exposed a minor memory leak. Only applies to program exit so doesn't impact play. --- doc/fixes36.4 | 33 +++++++++++++++++++++++++++++++++ src/sys.c | 5 ++--- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 doc/fixes36.4 diff --git a/doc/fixes36.4 b/doc/fixes36.4 new file mode 100644 index 000000000..376382a97 --- /dev/null +++ b/doc/fixes36.4 @@ -0,0 +1,33 @@ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.0 $ $NHDT-Date: 1575665952 2019/12/06 20:59:12 $ + +This fixes36.4 file is here to capture information about updates in the 3.6.x +lineage following the release of 3.6.3 in December 2019. Hypothetical version +3.6.4 may not be released, in which case these fixes will appear in 3.7.0. + +General Fixes and Modified Features +----------------------------------- +GDBPATH and GREPPATH from sysconf or -D... on compilation command line were + being processed even if PANICTRACE was disabled but only being freed + at end of game when that was enabled + + +Fixes to Post-3.6.3 Problems that Were Exposed Via git Repository +------------------------------------------------------------------ + + +Platform- and/or Interface-Specific Fixes or Features +----------------------------------------------------- + + +General New Features +-------------------- + + +NetHack Community Patches (or Variation) Included +------------------------------------------------- + + +Code Cleanup and Reorganization +------------------------------- + + diff --git a/src/sys.c b/src/sys.c index 8c5fb428b..a72a87b4b 100644 --- a/src/sys.c +++ b/src/sys.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 sys.c $NHDT-Date: 1547118632 2019/01/10 11:10:32 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.43 $ */ +/* NetHack 3.6 sys.c $NHDT-Date: 1575665952 2019/12/06 20:59:12 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.46 $ */ /* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -107,12 +107,11 @@ sysopt_release() if (sysopt.genericusers) free((genericptr_t) sysopt.genericusers), sysopt.genericusers = (char *) 0; -#ifdef PANICTRACE if (sysopt.gdbpath) free((genericptr_t) sysopt.gdbpath), sysopt.gdbpath = (char *) 0; if (sysopt.greppath) free((genericptr_t) sysopt.greppath), sysopt.greppath = (char *) 0; -#endif + /* this one's last because it might be used in panic feedback, although none of the preceding ones are likely to trigger a controlled panic */ if (sysopt.fmtd_wizard_list) From 7a3ce901abcbc4759be652d55a4e795330a88ed6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 6 Dec 2019 16:35:47 -0500 Subject: [PATCH 439/529] make this branch recognizable for post-3.6.3 patch commits and patch tests --- include/global.h | 9 +++++---- util/makedefs.c | 14 +++++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/include/global.h b/include/global.h index c3d2b4f22..5c02491c3 100644 --- a/include/global.h +++ b/include/global.h @@ -11,14 +11,15 @@ /* * Development status possibilities. */ -#define NH_STATUS_RELEASED 0 /* Released */ -#define NH_STATUS_WIP 1 /* Work in progress */ -#define NH_STATUS_BETA 2 /* BETA testing */ +#define NH_STATUS_RELEASED 0 /* Released */ +#define NH_STATUS_WIP 1 /* Work in progress */ +#define NH_STATUS_BETA 2 /* BETA testing */ +#define NH_STATUS_POSTRELEASE 3 /* patch commit point only */ /* * Development status of this NetHack version. */ -#define NH_DEVEL_STATUS NH_STATUS_RELEASED +#define NH_DEVEL_STATUS NH_STATUS_POSTRELEASE #ifndef DEBUG /* allow tool chains to define without causing warnings */ #define DEBUG diff --git a/util/makedefs.c b/util/makedefs.c index 4334b9b0e..6b0ef9cc6 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1201,16 +1201,20 @@ char *outbuf; const char *build_date; { char subbuf[64], versbuf[64]; - char betabuf[64]; + char statusbuf[64]; #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) #if (NH_DEVEL_STATUS == NH_STATUS_BETA) - Strcpy(betabuf, " Beta"); + Strcpy(statusbuf, " Beta"); #else - Strcpy(betabuf, " Work-in-progress"); +#if (NH_DEVEL_STATUS == NH_STATUS_WIP) + Strcpy(statusbuf, " Work-in-progress"); +#else + Strcpy(statusbuf, " post-release"); +#endif #endif #else - betabuf[0] = '\0'; + statusbuf[0] = '\0'; #endif subbuf[0] = '\0'; @@ -1220,7 +1224,7 @@ const char *build_date; #endif Sprintf(outbuf, "%s NetHack%s Version %s%s - last %s %s.", PORT_ID, - subbuf, version_string(versbuf, "."), betabuf, + subbuf, version_string(versbuf, "."), statusbuf, date_via_env ? "revision" : "build", build_date); return outbuf; } From a7ac5ce7f3fe2b68afeadb41a82a6218fb1cc1e7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 6 Dec 2019 17:50:59 -0500 Subject: [PATCH 440/529] article fix for polymorphing steed --- doc/fixes36.4 | 1 + src/trap.c | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index 376382a97..e841af4f6 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -9,6 +9,7 @@ General Fixes and Modified Features GDBPATH and GREPPATH from sysconf or -D... on compilation command line were being processed even if PANICTRACE was disabled but only being freed at end of game when that was enabled +fix the article used in the message when your steed encounters a polymorph trap Fixes to Post-3.6.3 Problems that Were Exposed Via git Repository diff --git a/src/trap.c b/src/trap.c index fe63d2b66..d1014fafc 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1627,13 +1627,20 @@ struct obj *otmp; break; case POLY_TRAP: if (!resists_magm(steed) && !resist(steed, WAND_CLASS, 0, NOTELL)) { + struct permonst *mdat = steed->data; + (void) newcham(steed, (struct permonst *) 0, FALSE, FALSE); - if (!can_saddle(steed) || !can_ride(steed)) + if (!can_saddle(steed) || !can_ride(steed)) { dismount_steed(DISMOUNT_POLY); - else - You("have to adjust yourself in the saddle on %s.", - x_monnam(steed, ARTICLE_A, (char *) 0, SUPPRESS_SADDLE, - FALSE)); + } else { + char buf[BUFSZ]; + + Strcpy(buf, x_monnam(steed, ARTICLE_YOUR, (char *) 0, + SUPPRESS_SADDLE, FALSE)); + if (mdat != steed->data) + (void) strsubst(buf, "your ", "your new "); + You("have to adjust yourself in the saddle on %s.", buf); + } } steedhit = TRUE; break; From 66e90ab19b9a9c586b4329a686ece68b9bd42e0a Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 6 Dec 2019 21:28:19 -0500 Subject: [PATCH 441/529] re-add Windows visual studio build back into the travis-ci tests New procedures added to win/win32/vs2017/travisci.sh for travis-ci testing. - use curl to obtain Lua from http://www.lua.org/ftp/lua-5.3.5.tar.gz - use tar to unzip lua into lib/lua-5.3.5/... Note: curl and tar were both added as part of Windows 10 in late Dec 2017 https://techcommunity.microsoft.com/t5/Containers/Tar-and-Curl-Come-to-Windows/ba-p/382409 - use git to clone pdcurses into lib/pdcurses - use git to clone universal-ctags into lib/ctags - build universal-ctags ahead of building NetHack + lua + pdcurses - adjust sys/winnt/Makefile.msc to look for those things in their lib locations when building under travis --- .travis.yml | 10 +++++----- sys/winnt/Makefile.msc | 5 +++++ win/win32/vs2017/travisci.sh | 12 ++++++++++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index d56ffae16..4eab2f6ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,6 +69,11 @@ matrix: sed -i 's/^#define TEXTCOLOR//' include/unixconf.h make fetch-lua && make install cat dat/options + - os: windows + env: DESCR=windows-visualstudio + language: shell + script: + - ./win/win32/vs2017/travisci.sh - os: linux env: DESCR=msdos-cross-on-linux HINTS=linux LUA_VERSION=5.3.5 compiler: gcc @@ -80,11 +85,6 @@ matrix: - sh sys/msdos/msdos-cross-compile.sh exclude: - os: windows - env: DESCR=windows-visualstudio - language: shell - script: - - ./win/win32/vs2017/travisci.sh - - os: windows # install: choco install mingw env: DESCR=windows-mingw script: diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 3bae6668d..614b32533 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -527,7 +527,12 @@ DATABASE = $(DAT)\data.base # ctags options # #CTAGSCMD=ctags-orig.exe +!IF "$(TRAVIS_BUILD_DIR)" != "" +CTAGSCMD=..\lib\ctags\ctags.exe +!ELSE CTAGSCMD=..\..\..\ctags\ctags.exe +!ENDIF + CTAGSOPT =--language-force=c --sort=no -D"Bitfield(x,n)=unsigned x : n" --excmd=pattern # # ctags wants unix-style pathnames diff --git a/win/win32/vs2017/travisci.sh b/win/win32/vs2017/travisci.sh index 812f4cdd8..b3e7de13e 100644 --- a/win/win32/vs2017/travisci.sh +++ b/win/win32/vs2017/travisci.sh @@ -24,9 +24,17 @@ export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/lib/x86:$LIB export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/ucrt/x86:$LIB export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB -git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses +mkdir -p lib +cd lib +git clone --depth 1 https://github.com/wmcbrine/PDCurses.git pdcurses +git clone --depth 1 https://github.com/universal-ctags/ctags.git ctags +curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz +tar zxf lua-5.3.5.tar.gz +cd ctags +nmake -f mk_mvc.mak +cd ../../ export ADD_CURSES=Y -export PDCURSES_TOP=../../pdcurses +export PDCURSES_TOP=../lib/pdcurses export cd src cp ../sys/winnt/Makefile.msc ./Makefile From 4ac02e0cc355c1d4cbb398ed59d624751f818956 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Fri, 6 Dec 2019 21:00:34 -0500 Subject: [PATCH 442/529] This is cron-daily v1-Dec-2-2019. files updated: Files --- Files | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Files b/Files index 32120db05..b7448e53c 100644 --- a/Files +++ b/Files @@ -70,10 +70,10 @@ fixes30.pl05 fixes30.pl06 fixes30.pl07 fixes30.pl08 fixes30.pl09 fixes30.pl10 fixes31.1 fixes31.2 fixes31.3 fixes32.0 fixes32.1 fixes32.2 fixes32.3 fixes33.0 fixes33.1 fixes34.0 fixes34.1 fixes34.2 fixes34.3 fixes35.0 -fixes36.0 fixes36.1 fixes36.2 fixes36.3 fixes37.0 -fixesXX.X makedefs.6 makedefs.txt mn.7 mnh.7 -nethack.6 nethack.txt recover.6 recover.txt tmac.n -tmac.nh window.doc +fixes36.0 fixes36.1 fixes36.2 fixes36.3 fixes36.4 +fixes37.0 fixesXX.X makedefs.6 makedefs.txt mn.7 +mnh.7 nethack.6 nethack.txt recover.6 recover.txt +tmac.n tmac.nh window.doc include: (files for GEM versions) From 850d37b47f6051d294fab499d3c15450d68459bc Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Fri, 6 Dec 2019 21:02:36 -0500 Subject: [PATCH 443/529] This is cron-daily v1-Dec-2-2019. files updated: Files --- Files | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Files b/Files index 4fc47fee8..984a357dd 100644 --- a/Files +++ b/Files @@ -50,9 +50,9 @@ fixes30.pl08 fixes30.pl09 fixes30.pl10 fixes31.1 fixes31.2 fixes31.3 fixes32.0 fixes32.1 fixes32.2 fixes32.3 fixes33.0 fixes33.1 fixes34.0 fixes34.1 fixes34.2 fixes34.3 fixes35.0 fixes36.0 fixes36.1 fixes36.2 -fixes36.3 lev_comp.6 lev_comp.txt makedefs.6 makedefs.txt -mn.7 mnh.7 nethack.6 nethack.txt recover.6 -recover.txt tmac.n tmac.nh window.doc +fixes36.3 fixes36.4 lev_comp.6 lev_comp.txt makedefs.6 +makedefs.txt mn.7 mnh.7 nethack.6 nethack.txt +recover.6 recover.txt tmac.n tmac.nh window.doc include: (files for GEM versions) From 3073a588eb8cdeaef4aef84bcb524392e75e726e Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 6 Dec 2019 10:36:54 -0500 Subject: [PATCH 444/529] Rename Qt4 directory to Qt --- sys/unix/Makefile.dat | 8 +- sys/unix/Makefile.src | 226 +- sys/unix/hints/linux-qt5 | 4 +- win/Qt/.gitattributes | 5 +- win/{Qt4 => Qt}/.gitignore | 0 win/{Qt4/qt4bind.cpp => Qt/qt_bind.cpp} | 116 +- win/{Qt4/qt4bind.h => Qt/qt_bind.h} | 8 +- win/{Qt4/qt4click.cpp => Qt/qt_click.cpp} | 8 +- win/{Qt4/qt4click.h => Qt/qt_click.h} | 6 +- win/Qt/qt_clust.cpp | 11 +- win/{Qt4/qt4clust.h => Qt/qt_clust.h} | 0 win/{Qt4/qt4delay.cpp => Qt/qt_delay.cpp} | 8 +- win/{Qt4/qt4delay.h => Qt/qt_delay.h} | 6 +- win/{Qt4/qt4glyph.cpp => Qt/qt_glyph.cpp} | 12 +- win/{Qt4/qt4glyph.h => Qt/qt_glyph.h} | 6 +- win/{Qt4/qt4icon.cpp => Qt/qt_icon.cpp} | 8 +- win/{Qt4/qt4icon.h => Qt/qt_icon.h} | 6 +- win/{Qt4/qt4inv.cpp => Qt/qt_inv.cpp} | 12 +- win/{Qt4/qt4inv.h => Qt/qt_inv.h} | 6 +- win/{Qt4/qt4kde0.h => Qt/qt_kde0.h} | 2 +- win/{Qt4/qt4key.cpp => Qt/qt_key.cpp} | 8 +- win/{Qt4/qt4key.h => Qt/qt_key.h} | 6 +- win/{Qt4/qt4line.cpp => Qt/qt_line.cpp} | 8 +- win/{Qt4/qt4line.h => Qt/qt_line.h} | 6 +- win/{Qt4/qt4main.cpp => Qt/qt_main.cpp} | 30 +- win/{Qt4/qt4main.h => Qt/qt_main.h} | 8 +- win/{Qt4/qt4map.cpp => Qt/qt_map.cpp} | 18 +- win/{Qt4/qt4map.h => Qt/qt_map.h} | 10 +- win/{Qt4/qt4menu.cpp => Qt/qt_menu.cpp} | 18 +- win/{Qt4/qt4menu.h => Qt/qt_menu.h} | 10 +- win/{Qt4/qt4msg.cpp => Qt/qt_msg.cpp} | 16 +- win/{Qt4/qt4msg.h => Qt/qt_msg.h} | 8 +- win/{Qt4/qt4plsel.cpp => Qt/qt_plsel.cpp} | 18 +- win/{Qt4/qt4plsel.h => Qt/qt_plsel.h} | 6 +- win/{Qt4/qt4rip.cpp => Qt/qt_rip.cpp} | 12 +- win/{Qt4/qt4rip.h => Qt/qt_rip.h} | 6 +- win/{Qt4/qt4set.cpp => Qt/qt_set.cpp} | 14 +- win/{Qt4/qt4set.h => Qt/qt_set.h} | 6 +- win/{Qt4/qt4stat.cpp => Qt/qt_stat.cpp} | 14 +- win/{Qt4/qt4stat.h => Qt/qt_stat.h} | 10 +- win/{Qt4/qt4str.cpp => Qt/qt_str.cpp} | 8 +- win/{Qt4/qt4str.h => Qt/qt_str.h} | 6 +- win/{Qt4/qt4streq.cpp => Qt/qt_streq.cpp} | 10 +- win/{Qt4/qt4streq.h => Qt/qt_streq.h} | 8 +- win/{Qt4/qt4svsel.cpp => Qt/qt_svsel.cpp} | 12 +- win/{Qt4/qt4svsel.h => Qt/qt_svsel.h} | 6 +- win/Qt/qt_win.cpp | 5246 +------------------ win/{Qt4/qt4win.h => Qt/qt_win.h} | 8 +- win/{Qt4/qt4xcmd.cpp => Qt/qt_xcmd.cpp} | 16 +- win/{Qt4/qt4xcmd.h => Qt/qt_xcmd.h} | 6 +- win/{Qt4/qt4yndlg.cpp => Qt/qt_yndlg.cpp} | 12 +- win/{Qt4/qt4yndlg.h => Qt/qt_yndlg.h} | 6 +- win/Qt3/.gitattributes | 4 + win/{Qt => Qt3}/Info.plist | 0 win/{Qt => Qt3}/Install.Qt | 0 win/{Qt => Qt3}/knethack.lnk | 0 win/{Qt => Qt3}/knh-mini.xpm | 0 win/{Qt => Qt3}/knh.xpm | 0 win/{Qt => Qt3}/qpe-nethack.control | 0 win/{Qt4/qt4clust.cpp => Qt3/qt_clust.cpp} | 13 +- win/Qt3/qt_win.cpp | 5312 ++++++++++++++++++++ win/{Qt => Qt3}/qttableview.cpp | 0 win/{Qt => Qt3}/tileedit.cpp | 0 win/{Qt => Qt3}/tileedit.h | 0 win/Qt4/.gitattributes | 1 - win/Qt4/qt4win.cpp | 136 - win/{Qt => share}/nhicns.uu | 0 win/{Qt => share}/nhsplash.xpm | 0 68 files changed, 5750 insertions(+), 5750 deletions(-) rename win/{Qt4 => Qt}/.gitignore (100%) rename win/{Qt4/qt4bind.cpp => Qt/qt_bind.cpp} (88%) rename win/{Qt4/qt4bind.h => Qt/qt_bind.h} (95%) rename win/{Qt4/qt4click.cpp => Qt/qt_click.cpp} (89%) rename win/{Qt4/qt4click.h => Qt/qt_click.h} (85%) rename win/{Qt4/qt4clust.h => Qt/qt_clust.h} (100%) rename win/{Qt4/qt4delay.cpp => Qt/qt_delay.cpp} (85%) rename win/{Qt4/qt4delay.h => Qt/qt_delay.h} (82%) rename win/{Qt4/qt4glyph.cpp => Qt/qt_glyph.cpp} (94%) rename win/{Qt4/qt4glyph.h => Qt/qt_glyph.h} (85%) rename win/{Qt4/qt4icon.cpp => Qt/qt_icon.cpp} (97%) rename win/{Qt4/qt4icon.h => Qt/qt_icon.h} (93%) rename win/{Qt4/qt4inv.cpp => Qt/qt_inv.cpp} (93%) rename win/{Qt4/qt4inv.h => Qt/qt_inv.h} (85%) rename win/{Qt4/qt4kde0.h => Qt/qt_kde0.h} (91%) rename win/{Qt4/qt4key.cpp => Qt/qt_key.cpp} (93%) rename win/{Qt4/qt4key.h => Qt/qt_key.h} (89%) rename win/{Qt4/qt4line.cpp => Qt/qt_line.cpp} (86%) rename win/{Qt4/qt4line.h => Qt/qt_line.h} (81%) rename win/{Qt4/qt4main.cpp => Qt/qt_main.cpp} (98%) rename win/{Qt4/qt4main.h => Qt/qt_main.h} (95%) rename win/{Qt4/qt4map.cpp => Qt/qt_map.cpp} (99%) rename win/{Qt4/qt4map.h => Qt/qt_map.h} (93%) rename win/{Qt4/qt4menu.cpp => Qt/qt_menu.cpp} (98%) rename win/{Qt4/qt4menu.h => Qt/qt_menu.h} (96%) rename win/{Qt4/qt4msg.cpp => Qt/qt_msg.cpp} (94%) rename win/{Qt4/qt4msg.h => Qt/qt_msg.h} (88%) rename win/{Qt4/qt4plsel.cpp => Qt/qt_plsel.cpp} (98%) rename win/{Qt4/qt4plsel.h => Qt/qt_plsel.h} (90%) rename win/{Qt4/qt4rip.cpp => Qt/qt_rip.cpp} (92%) rename win/{Qt4/qt4rip.h => Qt/qt_rip.h} (84%) rename win/{Qt4/qt4set.cpp => Qt/qt_set.cpp} (96%) rename win/{Qt4/qt4set.h => Qt/qt_set.h} (92%) rename win/{Qt4/qt4stat.cpp => Qt/qt_stat.cpp} (98%) rename win/{Qt4/qt4stat.h => Qt/qt_stat.h} (92%) rename win/{Qt4/qt4str.cpp => Qt/qt_str.cpp} (96%) rename win/{Qt4/qt4str.h => Qt/qt_str.h} (83%) rename win/{Qt4/qt4streq.cpp => Qt/qt_streq.cpp} (94%) rename win/{Qt4/qt4streq.h => Qt/qt_streq.h} (84%) rename win/{Qt4/qt4svsel.cpp => Qt/qt_svsel.cpp} (93%) rename win/{Qt4/qt4svsel.h => Qt/qt_svsel.h} (79%) rename win/{Qt4/qt4win.h => Qt/qt_win.h} (93%) rename win/{Qt4/qt4xcmd.cpp => Qt/qt_xcmd.cpp} (94%) rename win/{Qt4/qt4xcmd.h => Qt/qt_xcmd.h} (85%) rename win/{Qt4/qt4yndlg.cpp => Qt/qt_yndlg.cpp} (97%) rename win/{Qt4/qt4yndlg.h => Qt/qt_yndlg.h} (86%) create mode 100644 win/Qt3/.gitattributes rename win/{Qt => Qt3}/Info.plist (100%) rename win/{Qt => Qt3}/Install.Qt (100%) rename win/{Qt => Qt3}/knethack.lnk (100%) rename win/{Qt => Qt3}/knh-mini.xpm (100%) rename win/{Qt => Qt3}/knh.xpm (100%) rename win/{Qt => Qt3}/qpe-nethack.control (100%) rename win/{Qt4/qt4clust.cpp => Qt3/qt_clust.cpp} (93%) create mode 100644 win/Qt3/qt_win.cpp rename win/{Qt => Qt3}/qttableview.cpp (100%) rename win/{Qt => Qt3}/tileedit.cpp (100%) rename win/{Qt => Qt3}/tileedit.h (100%) delete mode 100644 win/Qt4/.gitattributes delete mode 100644 win/Qt4/qt4win.cpp rename win/{Qt => share}/nhicns.uu (100%) rename win/{Qt => share}/nhsplash.xpm (100%) diff --git a/sys/unix/Makefile.dat b/sys/unix/Makefile.dat index 48d50b77c..e60e2fd06 100644 --- a/sys/unix/Makefile.dat +++ b/sys/unix/Makefile.dat @@ -65,11 +65,11 @@ rip.xpm: ../win/X11/rip.xpm mapbg.xpm: ../win/gnome/mapbg.xpm cp ../win/gnome/mapbg.xpm mapbg.xpm -nhsplash.xpm: ../win/Qt/nhsplash.xpm - cp ../win/Qt/nhsplash.xpm nhsplash.xpm +nhsplash.xpm: ../win/share/nhsplash.xpm + cp ../win/share/nhsplash.xpm nhsplash.xpm -nethack.icns: ../win/Qt/nhicns.uu - $(UUDECODE) ../win/Qt/nhicns.uu +nethack.icns: ../win/share/nhicns.uu + $(UUDECODE) ../win/share/nhicns.uu Info.plist: ../win/Qt/Info.pli cp ../win/Qt/Info.pli Info.plist diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 4ed03277e..7f153870b 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -231,19 +231,19 @@ WINQTOBJ = qt_win.o qt_clust.o qttableview.o tile.o # # Files for a Qt 4 or 5 port # -WINQT4SRC = ../win/Qt4/qt4bind.cpp ../win/Qt4/qt4click.cpp \ - ../win/Qt4/qt4clust.cpp ../win/Qt4/qt4delay.cpp \ - ../win/Qt4/qt4glyph.cpp ../win/Qt4/qt4icon.cpp ../win/Qt4/qt4inv.cpp \ - ../win/Qt4/qt4key.cpp ../win/Qt4/qt4line.cpp ../win/Qt4/qt4main.cpp \ - ../win/Qt4/qt4map.cpp ../win/Qt4/qt4menu.cpp ../win/Qt4/qt4msg.cpp \ - ../win/Qt4/qt4plsel.cpp ../win/Qt4/qt4rip.cpp ../win/Qt4/qt4set.cpp \ - ../win/Qt4/qt4stat.cpp ../win/Qt4/qt4str.cpp ../win/Qt4/qt4streq.cpp \ - ../win/Qt4/qt4svsel.cpp ../win/Qt4/qt4win.cpp ../win/Qt4/qt4xcmd.cpp \ - ../win/Qt4/qt4yndlg.cpp -WINQT4OBJ = qt4bind.o qt4click.o qt4clust.o qt4delay.o qt4glyph.o qt4icon.o \ - qt4inv.o qt4key.o qt4line.o qt4main.o qt4map.o qt4menu.o qt4msg.o \ - qt4plsel.o qt4rip.o qt4set.o qt4stat.o qt4str.o qt4streq.o qt4svsel.o \ - qt4win.o qt4xcmd.o qt4yndlg.o tile.o +WINQTSRC = ../win/Qt/qt_bind.cpp ../win/Qt/qt_click.cpp \ + ../win/Qt/qt_clust.cpp ../win/Qt/qt_delay.cpp \ + ../win/Qt/qt_glyph.cpp ../win/Qt/qt_icon.cpp ../win/Qt/qt_inv.cpp \ + ../win/Qt/qt_key.cpp ../win/Qt/qt_line.cpp ../win/Qt/qt_main.cpp \ + ../win/Qt/qt_map.cpp ../win/Qt/qt_menu.cpp ../win/Qt/qt_msg.cpp \ + ../win/Qt/qt_plsel.cpp ../win/Qt/qt_rip.cpp ../win/Qt/qt_set.cpp \ + ../win/Qt/qt_stat.cpp ../win/Qt/qt_str.cpp ../win/Qt/qt_streq.cpp \ + ../win/Qt/qt_svsel.cpp ../win/Qt/qt_win.cpp ../win/Qt/qt_xcmd.cpp \ + ../win/Qt/qt_yndlg.cpp +WINQTOBJ = qt_bind.o qt_click.o qt_clust.o qt_delay.o qt_glyph.o qt_icon.o \ + qt_inv.o qt_key.o qt_line.o qt_main.o qt_map.o qt_menu.o qt_msg.o \ + qt_plsel.o qt_rip.o qt_set.o qt_stat.o qt_str.o qt_streq.o qt_svsel.o \ + qt_win.o qt_xcmd.o qt_yndlg.o tile.o # # Files for a Gnome port # @@ -302,12 +302,12 @@ WINBEOBJ = # # # libraries for Qt 3 -WINQTLIB = -L$(QTDIR)/lib -lqt +WINQT3LIB = -L$(QTDIR)/lib -lqt # # libraries for Qt 4 WINQT4LIB = `pkg-config QtGui --libs` # -# libraries for Qt 5 (use with WINQT4SRC and WINQT4OBJ) +# libraries for Qt 5 (use with WINQTSRC and WINQTOBJ) WINQT5LIB = `pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --libs` # # libraries for KDE (with Qt) @@ -474,7 +474,7 @@ GENCSRC = vis_tab.c sfdata.c #tile.c # all windowing-system-dependent .c (for dependencies and such) WINCSRC = $(WINTTYSRC) $(WINCURSESSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) # all windowing-system-dependent .cpp (for dependencies and such) -WINCXXSRC = $(WINQTSRC) $(WINQT4SRC) $(WINBESRC) +WINCXXSRC = $(WINQTSRC) $(WINBESRC) # Files for window system chaining. Requires SYSCF; include via HINTSRC/HINTOBJ CHAINSRC = ../win/chain/wc_chainin.c ../win/chain/wc_chainout.c \ @@ -613,26 +613,26 @@ qttableview.moc: ../include/qttableview.h $(QTDIR)/bin/moc -o qttableview.moc ../include/qttableview.h # Qt 4 windowport meta-object-compiler output -qt4kde0.moc : ../win/Qt4/qt4kde0.h - $(QTDIR)/bin/$(MOC) -o qt4kde0.moc ../win/Qt4/qt4kde0.h -qt4main.moc : ../win/Qt4/qt4main.h - $(QTDIR)/bin/$(MOC) -o qt4main.moc ../win/Qt4/qt4main.h -qt4map.moc : ../win/Qt4/qt4map.h - $(QTDIR)/bin/$(MOC) -o qt4map.moc ../win/Qt4/qt4map.h -qt4menu.moc : ../win/Qt4/qt4menu.h - $(QTDIR)/bin/$(MOC) -o qt4menu.moc ../win/Qt4/qt4menu.h -qt4msg.moc : ../win/Qt4/qt4msg.h - $(QTDIR)/bin/$(MOC) -o qt4msg.moc ../win/Qt4/qt4msg.h -qt4plsel.moc : ../win/Qt4/qt4plsel.h - $(QTDIR)/bin/$(MOC) -o qt4plsel.moc ../win/Qt4/qt4plsel.h -qt4set.moc : ../win/Qt4/qt4set.h - $(QTDIR)/bin/$(MOC) -o qt4set.moc ../win/Qt4/qt4set.h -qt4stat.moc : ../win/Qt4/qt4stat.h - $(QTDIR)/bin/$(MOC) -o qt4stat.moc ../win/Qt4/qt4stat.h -qt4xcmd.moc : ../win/Qt4/qt4xcmd.h - $(QTDIR)/bin/$(MOC) -o qt4xcmd.moc ../win/Qt4/qt4xcmd.h -qt4yndlg.moc : ../win/Qt4/qt4yndlg.h - $(QTDIR)/bin/$(MOC) -o qt4yndlg.moc ../win/Qt4/qt4yndlg.h +qt_kde0.moc : ../win/Qt/qt_kde0.h + $(QTDIR)/bin/$(MOC) -o qt_kde0.moc ../win/Qt/qt_kde0.h +qt_main.moc : ../win/Qt/qt_main.h + $(QTDIR)/bin/$(MOC) -o qt_main.moc ../win/Qt/qt_main.h +qt_map.moc : ../win/Qt/qt_map.h + $(QTDIR)/bin/$(MOC) -o qt_map.moc ../win/Qt/qt_map.h +qt_menu.moc : ../win/Qt/qt_menu.h + $(QTDIR)/bin/$(MOC) -o qt_menu.moc ../win/Qt/qt_menu.h +qt_msg.moc : ../win/Qt/qt_msg.h + $(QTDIR)/bin/$(MOC) -o qt_msg.moc ../win/Qt/qt_msg.h +qt_plsel.moc : ../win/Qt/qt_plsel.h + $(QTDIR)/bin/$(MOC) -o qt_plsel.moc ../win/Qt/qt_plsel.h +qt_set.moc : ../win/Qt/qt_set.h + $(QTDIR)/bin/$(MOC) -o qt_set.moc ../win/Qt/qt_set.h +qt_stat.moc : ../win/Qt/qt_stat.h + $(QTDIR)/bin/$(MOC) -o qt_stat.moc ../win/Qt/qt_stat.h +qt_xcmd.moc : ../win/Qt/qt_xcmd.h + $(QTDIR)/bin/$(MOC) -o qt_xcmd.moc ../win/Qt/qt_xcmd.h +qt_yndlg.moc : ../win/Qt/qt_yndlg.h + $(QTDIR)/bin/$(MOC) -o qt_yndlg.moc ../win/Qt/qt_yndlg.h # build monst.o and objects.o before executing '$(MAKE) makedefs' $(MAKEDEFS): $(FIRSTOBJ) \ @@ -923,83 +923,83 @@ qt_clust.o: ../win/Qt/qt_clust.cpp ../include/qt_clust.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_clust.cpp qttableview.o: ../win/Qt/qttableview.cpp ../include/qttableview.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qttableview.cpp -qt4bind.o: ../win/Qt4/qt4bind.cpp $(HACK_H) ../win/Qt4/qt4bind.h \ - ../win/Qt4/qt4click.h ../win/Qt4/qt4delay.h \ - ../win/Qt4/qt4xcmd.h ../win/Qt4/qt4key.h ../win/Qt4/qt4map.h \ - ../win/Qt4/qt4menu.h ../win/Qt4/qt4msg.h ../win/Qt4/qt4plsel.h \ - ../win/Qt4/qt4svsel.h ../win/Qt4/qt4set.h ../win/Qt4/qt4stat.h \ - ../win/Qt4/qt4streq.h ../win/Qt4/qt4yndlg.h \ - ../win/Qt4/qt4str.h ../include/dlb.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4bind.cpp -qt4click.o: ../win/Qt4/qt4click.cpp $(HACK_H) ../win/Qt4/qt4click.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4click.cpp -qt4clust.o: ../win/Qt4/qt4clust.cpp ../win/Qt4/qt4clust.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4clust.cpp -qt4delay.o: ../win/Qt4/qt4delay.cpp $(HACK_H) ../win/Qt4/qt4delay.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4delay.cpp -qt4glyph.o: ../win/Qt4/qt4glyph.cpp $(HACK_H) ../include/tile2x11.h \ - ../win/Qt4/qt4glyph.h ../win/Qt4/qt4set.h ../win/Qt4/qt4str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4glyph.cpp -qt4icon.o: ../win/Qt4/qt4icon.cpp $(HACK_H) ../win/Qt4/qt4icon.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4icon.cpp -qt4inv.o: ../win/Qt4/qt4inv.cpp $(HACK_H) ../win/Qt4/qt4inv.h \ - ../win/Qt4/qt4glyph.h ../win/Qt4/qt4set.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4inv.cpp -qt4key.o: ../win/Qt4/qt4key.cpp $(HACK_H) ../win/Qt4/qt4key.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4key.cpp -qt4line.o: ../win/Qt4/qt4line.cpp $(HACK_H) ../win/Qt4/qt4line.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4line.cpp -qt4main.o: ../win/Qt4/qt4main.cpp $(HACK_H) ../include/patchlevel.h \ - ../win/Qt4/qt4main.h qt4main.moc ../win/Qt4/qt4bind.h \ - ../win/Qt4/qt4glyph.h ../win/Qt4/qt4inv.h ../win/Qt4/qt4key.h \ - ../win/Qt4/qt4map.h ../win/Qt4/qt4msg.h ../win/Qt4/qt4set.h \ - ../win/Qt4/qt4stat.h ../win/Qt4/qt4str.h qt4kde0.moc - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4main.cpp -qt4map.o: ../win/Qt4/qt4map.cpp $(HACK_H) ../win/Qt4/qt4map.h qt4map.moc \ - ../win/Qt4/qt4click.h ../win/Qt4/qt4glyph.h \ - ../include/qt_xpms.h ../win/Qt4/qt4set.h ../win/Qt4/qt4str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4map.cpp -qt4menu.o: ../win/Qt4/qt4menu.cpp $(HACK_H) ../win/Qt4/qt4menu.h qt4menu.moc \ - ../win/Qt4/qt4glyph.h ../win/Qt4/qt4set.h \ - ../win/Qt4/qt4streq.h ../win/Qt4/qt4str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4menu.cpp -qt4msg.o: ../win/Qt4/qt4msg.cpp $(HACK_H) ../win/Qt4/qt4msg.h qt4msg.moc \ - ../win/Qt4/qt4map.h ../win/Qt4/qt4set.h ../win/Qt4/qt4str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4msg.cpp -qt4plsel.o: ../win/Qt4/qt4plsel.cpp $(HACK_H) ../win/Qt4/qt4plsel.h \ - qt4plsel.moc ../win/Qt4/qt4bind.h ../win/Qt4/qt4glyph.h \ - ../win/Qt4/qt4set.h ../win/Qt4/qt4str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4plsel.cpp -qt4rip.o: ../win/Qt4/qt4rip.cpp $(HACK_H) ../win/Qt4/qt4rip.h \ - ../win/Qt4/qt4bind.h ../win/Qt4/qt4str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4rip.cpp -qt4set.o: ../win/Qt4/qt4set.cpp $(HACK_H) ../win/Qt4/qt4set.h qt4set.moc \ - ../win/Qt4/qt4glyph.h ../win/Qt4/qt4str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4set.cpp -qt4stat.o: ../win/Qt4/qt4stat.cpp $(HACK_H) ../win/Qt4/qt4stat.h qt4stat.moc \ - ../win/Qt4/qt4set.h ../win/Qt4/qt4str.h ../include/qt_xpms.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4stat.cpp -qt4str.o: ../win/Qt4/qt4str.cpp ../win/Qt4/qt4str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4str.cpp -qt4streq.o: ../win/Qt4/qt4streq.cpp $(HACK_H) ../win/Qt4/qt4streq.h \ - ../win/Qt4/qt4str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4streq.cpp -qt4svsel.o: ../win/Qt4/qt4svsel.cpp $(HACK_H) ../win/Qt4/qt4svsel.h \ - ../win/Qt4/qt4bind.h ../win/Qt4/qt4str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4svsel.cpp -qt4win.o: ../win/Qt4/qt4win.cpp $(HACK_H) ../win/Qt4/qt4win.h \ - ../win/Qt4/qt4bind.h ../win/Qt4/qt4click.h \ - ../win/Qt4/qt4glyph.h ../win/Qt4/qt4inv.h ../win/Qt4/qt4key.h \ - ../win/Qt4/qt4icon.h ../win/Qt4/qt4map.h ../win/Qt4/qt4menu.h \ - ../win/Qt4/qt4msg.h ../win/Qt4/qt4set.h ../win/Qt4/qt4clust.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4win.cpp -qt4xcmd.o: ../win/Qt4/qt4xcmd.cpp $(HACK_H) ../include/func_tab.h \ - ../win/Qt4/qt4xcmd.h qt4xcmd.moc ../win/Qt4/qt4bind.h \ - ../win/Qt4/qt4set.h ../win/Qt4/qt4str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4xcmd.cpp -qt4yndlg.o: ../win/Qt4/qt4yndlg.cpp $(HACK_H) ../win/Qt4/qt4yndlg.h \ - qt4yndlg.moc ../win/Qt4/qt4str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt4/qt4yndlg.cpp +qt_bind.o: ../win/Qt/qt_bind.cpp $(HACK_H) ../win/Qt/qt_bind.h \ + ../win/Qt/qt_click.h ../win/Qt/qt_delay.h \ + ../win/Qt/qt_xcmd.h ../win/Qt/qt_key.h ../win/Qt/qt_map.h \ + ../win/Qt/qt_menu.h ../win/Qt/qt_msg.h ../win/Qt/qt_plsel.h \ + ../win/Qt/qt_svsel.h ../win/Qt/qt_set.h ../win/Qt/qt_stat.h \ + ../win/Qt/qt_streq.h ../win/Qt/qt_yndlg.h \ + ../win/Qt/qt_str.h ../include/dlb.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_bind.cpp +qt_click.o: ../win/Qt/qt_click.cpp $(HACK_H) ../win/Qt/qt_click.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_click.cpp +qt_clust.o: ../win/Qt/qt_clust.cpp ../win/Qt/qt_clust.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_clust.cpp +qt_delay.o: ../win/Qt/qt_delay.cpp $(HACK_H) ../win/Qt/qt_delay.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_delay.cpp +qt_glyph.o: ../win/Qt/qt_glyph.cpp $(HACK_H) ../include/tile2x11.h \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_glyph.cpp +qt_icon.o: ../win/Qt/qt_icon.cpp $(HACK_H) ../win/Qt/qt_icon.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_icon.cpp +qt_inv.o: ../win/Qt/qt_inv.cpp $(HACK_H) ../win/Qt/qt_inv.h \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_inv.cpp +qt_key.o: ../win/Qt/qt_key.cpp $(HACK_H) ../win/Qt/qt_key.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_key.cpp +qt_line.o: ../win/Qt/qt_line.cpp $(HACK_H) ../win/Qt/qt_line.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_line.cpp +qt_main.o: ../win/Qt/qt_main.cpp $(HACK_H) ../include/patchlevel.h \ + ../win/Qt/qt_main.h qt_main.moc ../win/Qt/qt_bind.h \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_inv.h ../win/Qt/qt_key.h \ + ../win/Qt/qt_map.h ../win/Qt/qt_msg.h ../win/Qt/qt_set.h \ + ../win/Qt/qt_stat.h ../win/Qt/qt_str.h qt_kde0.moc + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_main.cpp +qt_map.o: ../win/Qt/qt_map.cpp $(HACK_H) ../win/Qt/qt_map.h qt_map.moc \ + ../win/Qt/qt_click.h ../win/Qt/qt_glyph.h \ + ../include/qt_xpms.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_map.cpp +qt_menu.o: ../win/Qt/qt_menu.cpp $(HACK_H) ../win/Qt/qt_menu.h qt_menu.moc \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h \ + ../win/Qt/qt_streq.h ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_menu.cpp +qt_msg.o: ../win/Qt/qt_msg.cpp $(HACK_H) ../win/Qt/qt_msg.h qt_msg.moc \ + ../win/Qt/qt_map.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_msg.cpp +qt_plsel.o: ../win/Qt/qt_plsel.cpp $(HACK_H) ../win/Qt/qt_plsel.h \ + qt_plsel.moc ../win/Qt/qt_bind.h ../win/Qt/qt_glyph.h \ + ../win/Qt/qt_set.h ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_plsel.cpp +qt_rip.o: ../win/Qt/qt_rip.cpp $(HACK_H) ../win/Qt/qt_rip.h \ + ../win/Qt/qt_bind.h ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_rip.cpp +qt_set.o: ../win/Qt/qt_set.cpp $(HACK_H) ../win/Qt/qt_set.h qt_set.moc \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_set.cpp +qt_stat.o: ../win/Qt/qt_stat.cpp $(HACK_H) ../win/Qt/qt_stat.h qt_stat.moc \ + ../win/Qt/qt_set.h ../win/Qt/qt_str.h ../include/qt_xpms.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_stat.cpp +qt_str.o: ../win/Qt/qt_str.cpp ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_str.cpp +qt_streq.o: ../win/Qt/qt_streq.cpp $(HACK_H) ../win/Qt/qt_streq.h \ + ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_streq.cpp +qt_svsel.o: ../win/Qt/qt_svsel.cpp $(HACK_H) ../win/Qt/qt_svsel.h \ + ../win/Qt/qt_bind.h ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_svsel.cpp +qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../win/Qt/qt_win.h \ + ../win/Qt/qt_bind.h ../win/Qt/qt_click.h \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_inv.h ../win/Qt/qt_key.h \ + ../win/Qt/qt_icon.h ../win/Qt/qt_map.h ../win/Qt/qt_menu.h \ + ../win/Qt/qt_msg.h ../win/Qt/qt_set.h ../win/Qt/qt_clust.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_win.cpp +qt_xcmd.o: ../win/Qt/qt_xcmd.cpp $(HACK_H) ../include/func_tab.h \ + ../win/Qt/qt_xcmd.h qt_xcmd.moc ../win/Qt/qt_bind.h \ + ../win/Qt/qt_set.h ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_xcmd.cpp +qt_yndlg.o: ../win/Qt/qt_yndlg.cpp $(HACK_H) ../win/Qt/qt_yndlg.h \ + qt_yndlg.moc ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_yndlg.cpp wc_chainin.o: ../win/chain/wc_chainin.c $(HACK_H) $(CC) $(CFLAGS) -c -o $@ ../win/chain/wc_chainin.c wc_chainout.o: ../win/chain/wc_chainout.c $(HACK_H) diff --git a/sys/unix/hints/linux-qt5 b/sys/unix/hints/linux-qt5 index c1b13d890..bcf1a06ef 100644 --- a/sys/unix/hints/linux-qt5 +++ b/sys/unix/hints/linux-qt5 @@ -33,8 +33,8 @@ CFLAGS+=`pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --cflags` -fPIC LINK=g++ CXX=g++ -std=gnu++11 -WINSRC = $(WINQT4SRC) -WINOBJ = $(WINQT4OBJ) +WINSRC = $(WINQTSRC) +WINOBJ = $(WINQTOBJ) WINLIB = $(WINQT5LIB) #MOC = moc MOC = moc-qt5 diff --git a/win/Qt/.gitattributes b/win/Qt/.gitattributes index 7b924974c..ef4b40804 100644 --- a/win/Qt/.gitattributes +++ b/win/Qt/.gitattributes @@ -1,4 +1 @@ -Install.Qt NHSUBST -qpe-nethack.control NH_header=no -knethack.lnk NH_header=no -* NH_filestag=(file%s_for_the_Qt_3_widget_library_-_X11,_Windows,_Mac_OS_X,_or_Qtopia) +* NH_filestag=(file%s_for_the_Qt_4_or_5_widget_library_-_X11,_Windows,_Mac_OS_X) diff --git a/win/Qt4/.gitignore b/win/Qt/.gitignore similarity index 100% rename from win/Qt4/.gitignore rename to win/Qt/.gitignore diff --git a/win/Qt4/qt4bind.cpp b/win/Qt/qt_bind.cpp similarity index 88% rename from win/Qt4/qt4bind.cpp rename to win/Qt/qt_bind.cpp index b0f2e6b65..842daf9d9 100644 --- a/win/Qt4/qt4bind.cpp +++ b/win/Qt/qt_bind.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4bind.cpp -- bindings between the Qt 4 interface and the main code +// qt_bind.cpp -- bindings between the Qt 4 interface and the main code extern "C" { #include "hack.h" @@ -25,23 +25,23 @@ extern "C" { #else #include #endif -#include "qt4bind.h" -#include "qt4click.h" +#include "qt_bind.h" +#include "qt_click.h" #ifdef TIMED_DELAY -#include "qt4delay.h" +#include "qt_delay.h" #endif -#include "qt4xcmd.h" -#include "qt4key.h" -#include "qt4map.h" -#include "qt4menu.h" -#include "qt4msg.h" -#include "qt4plsel.h" -#include "qt4svsel.h" -#include "qt4set.h" -#include "qt4stat.h" -#include "qt4streq.h" -#include "qt4yndlg.h" -#include "qt4str.h" +#include "qt_xcmd.h" +#include "qt_key.h" +#include "qt_map.h" +#include "qt_menu.h" +#include "qt_msg.h" +#include "qt_plsel.h" +#include "qt_svsel.h" +#include "qt_set.h" +#include "qt_stat.h" +#include "qt_streq.h" +#include "qt_yndlg.h" +#include "qt_str.h" extern "C" { #include "dlb.h" @@ -51,7 +51,7 @@ extern "C" { extern int qt_compact_mode; // end temporary -namespace nethack_qt4 { +namespace nethack_qt_ { // XXX Should be from Options // @@ -721,7 +721,7 @@ boolean NetHackQtBind::msgs_initd = false; static void Qt_positionbar(char *) {} -} // namespace nethack_qt4 +} // namespace nethack_qt_ struct window_procs Qt_procs = { "Qt", @@ -731,48 +731,48 @@ struct window_procs Qt_procs = { | WC_PLAYER_SELECTION | WC_SPLASH_SCREEN, 0L, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ - nethack_qt4::NetHackQtBind::qt_init_nhwindows, - nethack_qt4::NetHackQtBind::qt_player_selection, - nethack_qt4::NetHackQtBind::qt_askname, - nethack_qt4::NetHackQtBind::qt_get_nh_event, - nethack_qt4::NetHackQtBind::qt_exit_nhwindows, - nethack_qt4::NetHackQtBind::qt_suspend_nhwindows, - nethack_qt4::NetHackQtBind::qt_resume_nhwindows, - nethack_qt4::NetHackQtBind::qt_create_nhwindow, - nethack_qt4::NetHackQtBind::qt_clear_nhwindow, - nethack_qt4::NetHackQtBind::qt_display_nhwindow, - nethack_qt4::NetHackQtBind::qt_destroy_nhwindow, - nethack_qt4::NetHackQtBind::qt_curs, - nethack_qt4::NetHackQtBind::qt_putstr, + nethack_qt_::NetHackQtBind::qt_init_nhwindows, + nethack_qt_::NetHackQtBind::qt_player_selection, + nethack_qt_::NetHackQtBind::qt_askname, + nethack_qt_::NetHackQtBind::qt_get_nh_event, + nethack_qt_::NetHackQtBind::qt_exit_nhwindows, + nethack_qt_::NetHackQtBind::qt_suspend_nhwindows, + nethack_qt_::NetHackQtBind::qt_resume_nhwindows, + nethack_qt_::NetHackQtBind::qt_create_nhwindow, + nethack_qt_::NetHackQtBind::qt_clear_nhwindow, + nethack_qt_::NetHackQtBind::qt_display_nhwindow, + nethack_qt_::NetHackQtBind::qt_destroy_nhwindow, + nethack_qt_::NetHackQtBind::qt_curs, + nethack_qt_::NetHackQtBind::qt_putstr, genl_putmixed, - nethack_qt4::NetHackQtBind::qt_display_file, - nethack_qt4::NetHackQtBind::qt_start_menu, - nethack_qt4::NetHackQtBind::qt_add_menu, - nethack_qt4::NetHackQtBind::qt_end_menu, - nethack_qt4::NetHackQtBind::qt_select_menu, + nethack_qt_::NetHackQtBind::qt_display_file, + nethack_qt_::NetHackQtBind::qt_start_menu, + nethack_qt_::NetHackQtBind::qt_add_menu, + nethack_qt_::NetHackQtBind::qt_end_menu, + nethack_qt_::NetHackQtBind::qt_select_menu, genl_message_menu, /* no need for X-specific handling */ - nethack_qt4::NetHackQtBind::qt_update_inventory, - nethack_qt4::NetHackQtBind::qt_mark_synch, - nethack_qt4::NetHackQtBind::qt_wait_synch, + nethack_qt_::NetHackQtBind::qt_update_inventory, + nethack_qt_::NetHackQtBind::qt_mark_synch, + nethack_qt_::NetHackQtBind::qt_wait_synch, #ifdef CLIPPING - nethack_qt4::NetHackQtBind::qt_cliparound, + nethack_qt_::NetHackQtBind::qt_cliparound, #endif #ifdef POSITIONBAR - nethack_qt4::Qt_positionbar, + nethack_qt_::Qt_positionbar, #endif - nethack_qt4::NetHackQtBind::qt_print_glyph, + nethack_qt_::NetHackQtBind::qt_print_glyph, //NetHackQtBind::qt_print_glyph_compose, - nethack_qt4::NetHackQtBind::qt_raw_print, - nethack_qt4::NetHackQtBind::qt_raw_print_bold, - nethack_qt4::NetHackQtBind::qt_nhgetch, - nethack_qt4::NetHackQtBind::qt_nh_poskey, - nethack_qt4::NetHackQtBind::qt_nhbell, - nethack_qt4::NetHackQtBind::qt_doprev_message, - nethack_qt4::NetHackQtBind::qt_yn_function, - nethack_qt4::NetHackQtBind::qt_getlin, - nethack_qt4::NetHackQtBind::qt_get_ext_cmd, - nethack_qt4::NetHackQtBind::qt_number_pad, - nethack_qt4::NetHackQtBind::qt_delay_output, + nethack_qt_::NetHackQtBind::qt_raw_print, + nethack_qt_::NetHackQtBind::qt_raw_print_bold, + nethack_qt_::NetHackQtBind::qt_nhgetch, + nethack_qt_::NetHackQtBind::qt_nh_poskey, + nethack_qt_::NetHackQtBind::qt_nhbell, + nethack_qt_::NetHackQtBind::qt_doprev_message, + nethack_qt_::NetHackQtBind::qt_yn_function, + nethack_qt_::NetHackQtBind::qt_getlin, + nethack_qt_::NetHackQtBind::qt_get_ext_cmd, + nethack_qt_::NetHackQtBind::qt_number_pad, + nethack_qt_::NetHackQtBind::qt_delay_output, #ifdef CHANGE_COLOR /* only a Mac option currently */ donull, donull, @@ -780,17 +780,17 @@ struct window_procs Qt_procs = { donull, #endif /* other defs that really should go away (they're tty specific) */ - nethack_qt4::NetHackQtBind::qt_start_screen, - nethack_qt4::NetHackQtBind::qt_end_screen, + nethack_qt_::NetHackQtBind::qt_start_screen, + nethack_qt_::NetHackQtBind::qt_end_screen, #ifdef GRAPHIC_TOMBSTONE - nethack_qt4::NetHackQtBind::qt_outrip, + nethack_qt_::NetHackQtBind::qt_outrip, #else genl_outrip, #endif genl_preference_update, - nethack_qt4::NetHackQtBind::qt_getmsghistory, - nethack_qt4::NetHackQtBind::qt_putmsghistory, + nethack_qt_::NetHackQtBind::qt_getmsghistory, + nethack_qt_::NetHackQtBind::qt_putmsghistory, genl_status_init, genl_status_finish, genl_status_enablefield, #ifdef STATUS_HILITES diff --git a/win/Qt4/qt4bind.h b/win/Qt/qt_bind.h similarity index 95% rename from win/Qt4/qt4bind.h rename to win/Qt/qt_bind.h index 820341cae..04d2a43d7 100644 --- a/win/Qt4/qt4bind.h +++ b/win/Qt/qt_bind.h @@ -2,14 +2,14 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4bind.h -- bindings between the Qt 4 interface and the main code +// qt_bind.h -- bindings between the Qt 4 interface and the main code #ifndef QT4BIND_H #define QT4BIND_H -#include "qt4main.h" +#include "qt_main.h" -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtClickBuffer; @@ -94,6 +94,6 @@ private: static boolean msgs_initd; }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4click.cpp b/win/Qt/qt_click.cpp similarity index 89% rename from win/Qt4/qt4click.cpp rename to win/Qt/qt_click.cpp index 78177a14f..6cee16258 100644 --- a/win/Qt4/qt4click.cpp +++ b/win/Qt/qt_click.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4click.cpp -- a mouse click buffer +// qt_click.cpp -- a mouse click buffer #include "hack.h" #undef Invisible @@ -16,9 +16,9 @@ #undef max #include -#include "qt4click.h" +#include "qt_click.h" -namespace nethack_qt4 { +namespace nethack_qt_ { NetHackQtClickBuffer::NetHackQtClickBuffer() : in(0), out(0) @@ -45,4 +45,4 @@ void NetHackQtClickBuffer::Get() out=(out+1)%maxclick; } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4click.h b/win/Qt/qt_click.h similarity index 85% rename from win/Qt4/qt4click.h rename to win/Qt/qt_click.h index 50fd8b1cc..325f455fd 100644 --- a/win/Qt4/qt4click.h +++ b/win/Qt/qt_click.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4click.h -- a mouse click buffer +// qt_click.h -- a mouse click buffer #ifndef QT4CLICK_H #define QT4CLICK_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtClickBuffer { public: @@ -32,6 +32,6 @@ private: int in,out; }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt/qt_clust.cpp b/win/Qt/qt_clust.cpp index c5063a6a3..b21a53a74 100644 --- a/win/Qt/qt_clust.cpp +++ b/win/Qt/qt_clust.cpp @@ -1,10 +1,9 @@ -/* NetHack 3.6 qt_clust.cpp $NHDT-Date: 1524684507 2018/04/25 19:28:27 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.8 $ */ +/* SCCS Id: @(#)qt_clust.cpp 3.4 1999/11/19 */ /* Copyright (c) Warwick Allison, 1999. */ /* NetHack may be freely redistributed. See license for details. */ #include "qt_clust.h" -static -void include(QRect& r, const QRect& rect) +static void include(QRect& r, const QRect& rect) { if (rect.left() -#include "qt4delay.h" +#include "qt_delay.h" -namespace nethack_qt4 { +namespace nethack_qt_ { // RLC Can we use QTimer::single_shot for this? NetHackQtDelay::NetHackQtDelay(int ms) : @@ -39,4 +39,4 @@ void NetHackQtDelay::timerEvent(QTimerEvent* timer) m_timer = 0; } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4delay.h b/win/Qt/qt_delay.h similarity index 82% rename from win/Qt4/qt4delay.h rename to win/Qt/qt_delay.h index 2e0085edf..8c918856f 100644 --- a/win/Qt4/qt4delay.h +++ b/win/Qt/qt_delay.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4delay.h -- implement a delay +// qt_delay.h -- implement a delay #ifndef QT4DELAY_H #define QT4DELAY_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtDelay : QObject { private: @@ -21,6 +21,6 @@ public: virtual void timerEvent(QTimerEvent* timer); }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4glyph.cpp b/win/Qt/qt_glyph.cpp similarity index 94% rename from win/Qt4/qt4glyph.cpp rename to win/Qt/qt_glyph.cpp index 942f3a1ab..a3e4f24ef 100644 --- a/win/Qt4/qt4glyph.cpp +++ b/win/Qt/qt_glyph.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4glyph.cpp -- class to manage the glyphs in a tile set +// qt_glyph.cpp -- class to manage the glyphs in a tile set extern "C" { #include "hack.h" @@ -22,13 +22,13 @@ extern "C" { #if QT_VERSION >= 0x050000 #include #endif -#include "qt4glyph.h" -#include "qt4set.h" -#include "qt4str.h" +#include "qt_glyph.h" +#include "qt_set.h" +#include "qt_str.h" extern short glyph2tile[]; // from tile.c -namespace nethack_qt4 { +namespace nethack_qt_ { static int tilefile_tile_W=16; static int tilefile_tile_H=16; @@ -138,4 +138,4 @@ void NetHackQtGlyphs::setSize(int w, int h) (was1 ? pm2 : pm1) = pm; } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4glyph.h b/win/Qt/qt_glyph.h similarity index 85% rename from win/Qt4/qt4glyph.h rename to win/Qt/qt_glyph.h index 12fd915fd..b85c4f4d3 100644 --- a/win/Qt4/qt4glyph.h +++ b/win/Qt/qt_glyph.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4glyph.h -- class to manage the glyphs in a tile set +// qt_glyph.h -- class to manage the glyphs in a tile set #ifndef QT4GLYPH_H #define QT4GLYPH_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtGlyphs { public: @@ -29,6 +29,6 @@ private: int tiles_per_row; }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4icon.cpp b/win/Qt/qt_icon.cpp similarity index 97% rename from win/Qt4/qt4icon.cpp rename to win/Qt/qt_icon.cpp index 0876cb59d..160fc7e10 100644 --- a/win/Qt4/qt4icon.cpp +++ b/win/Qt/qt_icon.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4icon.cpp -- a labelled icon +// qt_icon.cpp -- a labelled icon #include "hack.h" #undef Invisible @@ -19,9 +19,9 @@ #if QT_VERSION >= 0x050000 #include #endif -#include "qt4icon.h" +#include "qt_icon.h" -namespace nethack_qt4 { +namespace nethack_qt_ { NetHackQtLabelledIcon::NetHackQtLabelledIcon(QWidget* parent, const char* l) : QWidget(parent), @@ -200,4 +200,4 @@ void NetHackQtLabelledIcon::setAlignments() if (icon) icon->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter); } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4icon.h b/win/Qt/qt_icon.h similarity index 93% rename from win/Qt4/qt4icon.h rename to win/Qt/qt_icon.h index bdaf8183c..f1974ba44 100644 --- a/win/Qt4/qt4icon.h +++ b/win/Qt/qt_icon.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4icon.cpp -- a labelled icon +// qt_icon.cpp -- a labelled icon #ifndef QT4ICON_H #define QT4ICON_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtLabelledIcon : public QWidget { public: @@ -48,6 +48,6 @@ private: QLabel* icon; }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4inv.cpp b/win/Qt/qt_inv.cpp similarity index 93% rename from win/Qt4/qt4inv.cpp rename to win/Qt/qt_inv.cpp index 6d1a201b4..be31d536e 100644 --- a/win/Qt4/qt4inv.cpp +++ b/win/Qt/qt_inv.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4inv.cpp -- inventory usage window +// qt_inv.cpp -- inventory usage window // This is at the top center of the main window extern "C" { @@ -22,11 +22,11 @@ extern "C" { #if QT_VERSION >= 0x050000 #include #endif -#include "qt4inv.h" -#include "qt4glyph.h" -#include "qt4set.h" +#include "qt_inv.h" +#include "qt_glyph.h" +#include "qt_set.h" -namespace nethack_qt4 { +namespace nethack_qt_ { NetHackQtInvUsageWindow::NetHackQtInvUsageWindow(QWidget* parent) : QWidget(parent) @@ -96,4 +96,4 @@ QSize NetHackQtInvUsageWindow::sizeHint(void) const } } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4inv.h b/win/Qt/qt_inv.h similarity index 85% rename from win/Qt4/qt4inv.h rename to win/Qt/qt_inv.h index 51cdd4d0b..4c74b8a6a 100644 --- a/win/Qt4/qt4inv.h +++ b/win/Qt/qt_inv.h @@ -2,13 +2,13 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4inv.h -- inventory usage window +// qt_inv.h -- inventory usage window // This is at the top center of the main window #ifndef QT4INV_H #define QT4INV_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtInvUsageWindow : public QWidget { public: @@ -20,6 +20,6 @@ private: void drawWorn(QPainter& painter, obj*, int x, int y, bool canbe=true); }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4kde0.h b/win/Qt/qt_kde0.h similarity index 91% rename from win/Qt4/qt4kde0.h rename to win/Qt/qt_kde0.h index 27a678c01..8ac1f9595 100644 --- a/win/Qt4/qt4kde0.h +++ b/win/Qt/qt_kde0.h @@ -4,7 +4,7 @@ #ifndef QT_DUMMYKDE #define QT_DUMMYKDE -namespace nethack_qt4 { +namespace nethack_qt_ { class KTopLevelWidget : public QMainWindow { Q_OBJECT diff --git a/win/Qt4/qt4key.cpp b/win/Qt/qt_key.cpp similarity index 93% rename from win/Qt4/qt4key.cpp rename to win/Qt/qt_key.cpp index ff16616fe..2a43f7c85 100644 --- a/win/Qt4/qt4key.cpp +++ b/win/Qt/qt_key.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4key.cpp -- a key buffer +// qt_key.cpp -- a key buffer #include "hack.h" #undef Invisible @@ -16,9 +16,9 @@ #undef max #include -#include "qt4key.h" +#include "qt_key.h" -namespace nethack_qt4 { +namespace nethack_qt_ { NetHackQtKeyBuffer::NetHackQtKeyBuffer() : in(0), out(0) @@ -88,4 +88,4 @@ Qt::KeyboardModifiers NetHackQtKeyBuffer::TopState() const return state[out]; } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4key.h b/win/Qt/qt_key.h similarity index 89% rename from win/Qt4/qt4key.h rename to win/Qt/qt_key.h index 0333269cd..c2ef3a89b 100644 --- a/win/Qt4/qt4key.h +++ b/win/Qt/qt_key.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4key.h -- a key buffer +// qt_key.h -- a key buffer #ifndef QT4KEY_H #define QT4KEY_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtKeyBuffer { public: @@ -35,6 +35,6 @@ private: int in,out; }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4line.cpp b/win/Qt/qt_line.cpp similarity index 86% rename from win/Qt4/qt4line.cpp rename to win/Qt/qt_line.cpp index dd9b18c5f..6374bea3f 100644 --- a/win/Qt4/qt4line.cpp +++ b/win/Qt/qt_line.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4line.cpp -- a one line input window +// qt_line.cpp -- a one line input window #include "hack.h" #undef Invisible @@ -19,9 +19,9 @@ #if QT_VERSION >= 0x050000 #include #endif -#include "qt4line.h" +#include "qt_line.h" -namespace nethack_qt4 { +namespace nethack_qt_ { NetHackQtLineEdit::NetHackQtLineEdit() : QLineEdit(0) @@ -39,4 +39,4 @@ void NetHackQtLineEdit::fakeEvent(int key, int ascii, Qt::KeyboardModifiers stat keyPressEvent(&fake); } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4line.h b/win/Qt/qt_line.h similarity index 81% rename from win/Qt4/qt4line.h rename to win/Qt/qt_line.h index bb5067f79..4b3c10cef 100644 --- a/win/Qt4/qt4line.h +++ b/win/Qt/qt_line.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4line.h -- a one line input window +// qt_line.h -- a one line input window #ifndef QT4LINE_H #define QT4LINE_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtLineEdit : public QLineEdit { public: @@ -17,6 +17,6 @@ public: void fakeEvent(int key, int ascii, Qt::KeyboardModifiers state); }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4main.cpp b/win/Qt/qt_main.cpp similarity index 98% rename from win/Qt4/qt4main.cpp rename to win/Qt/qt_main.cpp index 694415b24..06e47c3c5 100644 --- a/win/Qt4/qt4main.cpp +++ b/win/Qt/qt_main.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4main.cpp -- the main window +// qt_main.cpp -- the main window extern "C" { #include "hack.h" @@ -22,20 +22,20 @@ extern "C" { #if QT_VERSION >= 0x050000 #include #endif -#include "qt4main.h" -#include "qt4main.moc" -#include "qt4bind.h" -#include "qt4glyph.h" -#include "qt4inv.h" -#include "qt4key.h" -#include "qt4map.h" -#include "qt4msg.h" -#include "qt4set.h" -#include "qt4stat.h" -#include "qt4str.h" +#include "qt_main.h" +#include "qt_main.moc" +#include "qt_bind.h" +#include "qt_glyph.h" +#include "qt_inv.h" +#include "qt_key.h" +#include "qt_map.h" +#include "qt_msg.h" +#include "qt_set.h" +#include "qt_stat.h" +#include "qt_str.h" #ifndef KDE -#include "qt4kde0.moc" +#include "qt_kde0.moc" #endif // temporary @@ -44,7 +44,7 @@ extern char *qt_tileheight; extern int qt_compact_mode; // end temporary -namespace nethack_qt4 { +namespace nethack_qt_ { // temporary void centerOnMain( QWidget* w ); @@ -1073,4 +1073,4 @@ void NetHackQtMainWindow::ShowIfReady() } } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4main.h b/win/Qt/qt_main.h similarity index 95% rename from win/Qt4/qt4main.h rename to win/Qt/qt_main.h index a3ec15ac2..2e4a2a5d0 100644 --- a/win/Qt4/qt4main.h +++ b/win/Qt/qt_main.h @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4main.h -- the main window +// qt_main.h -- the main window #ifndef QT4MAIN_H #define QT4MAIN_H @@ -11,10 +11,10 @@ #include #include #else -#include "qt4kde0.h" +#include "qt_kde0.h" #endif -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtInvUsageWindow; class NetHackQtKeyBuffer; @@ -90,6 +90,6 @@ private: int dirkey; }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4map.cpp b/win/Qt/qt_map.cpp similarity index 99% rename from win/Qt4/qt4map.cpp rename to win/Qt/qt_map.cpp index 00598e79b..74d30b3c8 100644 --- a/win/Qt4/qt4map.cpp +++ b/win/Qt/qt_map.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4map.cpp -- the map window +// qt_map.cpp -- the map window extern "C" { #include "hack.h" @@ -21,19 +21,19 @@ extern "C" { #if QT_VERSION >= 0x050000 #include #endif -#include "qt4map.h" -#include "qt4map.moc" -#include "qt4click.h" -#include "qt4glyph.h" +#include "qt_map.h" +#include "qt_map.moc" +#include "qt_click.h" +#include "qt_glyph.h" #include "qt_xpms.h" -#include "qt4set.h" -#include "qt4str.h" +#include "qt_set.h" +#include "qt_str.h" // temporary extern int qt_compact_mode; // end temporary -namespace nethack_qt4 { +namespace nethack_qt_ { #ifdef TEXTCOLOR static const QPen& nhcolor_to_pen(int c) @@ -971,4 +971,4 @@ void NetHackQtMapWindow::Changed(int x, int y) } #endif -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4map.h b/win/Qt/qt_map.h similarity index 93% rename from win/Qt4/qt4map.h rename to win/Qt/qt_map.h index 337a726aa..8849a18da 100644 --- a/win/Qt4/qt4map.h +++ b/win/Qt/qt_map.h @@ -2,15 +2,15 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4map.h -- the map window +// qt_map.h -- the map window #ifndef QT4MAP_H #define QT4MAP_H -#include "qt4win.h" -#include "qt4clust.h" +#include "qt_win.h" +#include "qt_clust.h" -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtClickBuffer; @@ -77,6 +77,6 @@ private: QString messages; }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4menu.cpp b/win/Qt/qt_menu.cpp similarity index 98% rename from win/Qt4/qt4menu.cpp rename to win/Qt/qt_menu.cpp index 19d073cfe..8a0106b4d 100644 --- a/win/Qt4/qt4menu.cpp +++ b/win/Qt/qt_menu.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4menu.cpp -- a menu or text-list widget +// qt_menu.cpp -- a menu or text-list widget extern "C" { #include "hack.h" @@ -21,12 +21,12 @@ extern "C" { #if QT_VERSION >= 0x050000 #include #endif -#include "qt4menu.h" -#include "qt4menu.moc" -#include "qt4glyph.h" -#include "qt4set.h" -#include "qt4streq.h" -#include "qt4str.h" +#include "qt_menu.h" +#include "qt_menu.moc" +#include "qt_glyph.h" +#include "qt_set.h" +#include "qt_streq.h" +#include "qt_str.h" // temporary extern "C" int qt_compact_mode; @@ -34,7 +34,7 @@ extern "C" int qt_compact_mode; extern "C" struct menucoloring *menu_colorings; -namespace nethack_qt4 { +namespace nethack_qt_ { // temporary void centerOnMain( QWidget* w ); @@ -827,4 +827,4 @@ int NetHackQtMenuOrTextWindow::SelectMenu(int how, MENU_ITEM_P **menu_list) return actual->SelectMenu(how,menu_list); } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4menu.h b/win/Qt/qt_menu.h similarity index 96% rename from win/Qt4/qt4menu.h rename to win/Qt/qt_menu.h index 5bc265920..1b278a89f 100644 --- a/win/Qt4/qt4menu.h +++ b/win/Qt/qt_menu.h @@ -2,15 +2,15 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4menu.cpp -- a menu or text-list widget +// qt_menu.cpp -- a menu or text-list widget #ifndef QT4MENU_H #define QT4MENU_H -#include "qt4win.h" -#include "qt4rip.h" +#include "qt_win.h" +#include "qt_rip.h" -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtTextListBox : public QListWidget { public: @@ -178,6 +178,6 @@ public: }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4msg.cpp b/win/Qt/qt_msg.cpp similarity index 94% rename from win/Qt4/qt4msg.cpp rename to win/Qt/qt_msg.cpp index d82e102fe..6236f9817 100644 --- a/win/Qt4/qt4msg.cpp +++ b/win/Qt/qt_msg.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4msg.cpp -- a message window +// qt_msg.cpp -- a message window extern "C" { #include "hack.h" @@ -21,13 +21,13 @@ extern "C" { #if QT_VERSION >= 0x050000 #include #endif -#include "qt4msg.h" -#include "qt4msg.moc" -#include "qt4map.h" -#include "qt4set.h" -#include "qt4str.h" +#include "qt_msg.h" +#include "qt_msg.moc" +#include "qt_map.h" +#include "qt_set.h" +#include "qt_str.h" -namespace nethack_qt4 { +namespace nethack_qt_ { NetHackQtMessageWindow::NetHackQtMessageWindow() : list(new QListWidget()) @@ -152,4 +152,4 @@ void NetHackQtMessageWindow::PutStr(int attr, const QString& text) map->putMessage(attr, text2); } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4msg.h b/win/Qt/qt_msg.h similarity index 88% rename from win/Qt4/qt4msg.h rename to win/Qt/qt_msg.h index f4091ad18..08c029b9b 100644 --- a/win/Qt4/qt4msg.h +++ b/win/Qt/qt_msg.h @@ -2,14 +2,14 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4msg.h -- a message window +// qt_msg.h -- a message window #ifndef QT4MSG_H #define QT4MSG_H -#include "qt4win.h" +#include "qt_win.h" -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtMapWindow2; @@ -40,6 +40,6 @@ private slots: void updateFont(); }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4plsel.cpp b/win/Qt/qt_plsel.cpp similarity index 98% rename from win/Qt4/qt4plsel.cpp rename to win/Qt/qt_plsel.cpp index fc1e105b3..c77203bec 100644 --- a/win/Qt4/qt4plsel.cpp +++ b/win/Qt/qt_plsel.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4plsel.cpp -- player selector dialog +// qt_plsel.cpp -- player selector dialog extern "C" { #include "hack.h" @@ -21,17 +21,17 @@ extern "C" { #if QT_VERSION >= 0x050000 #include #endif -#include "qt4plsel.h" -#include "qt4plsel.moc" -#include "qt4bind.h" -#include "qt4glyph.h" -#include "qt4set.h" -#include "qt4str.h" +#include "qt_plsel.h" +#include "qt_plsel.moc" +#include "qt_bind.h" +#include "qt_glyph.h" +#include "qt_set.h" +#include "qt_str.h" // Warwick prefers it this way... #define QT_CHOOSE_RACE_FIRST -namespace nethack_qt4 { +namespace nethack_qt_ { // temporary void centerOnMain( QWidget* w ); @@ -533,4 +533,4 @@ bool NetHackQtPlayerSelector::Choose() } } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4plsel.h b/win/Qt/qt_plsel.h similarity index 90% rename from win/Qt4/qt4plsel.h rename to win/Qt/qt_plsel.h index de070d147..5e2f7923e 100644 --- a/win/Qt4/qt4plsel.h +++ b/win/Qt/qt_plsel.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4plsel.h -- player selector dialog +// qt_plsel.h -- player selector dialog #ifndef QT4PLSEL_H #define QT4PLSEL_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtKeyBuffer; @@ -43,6 +43,6 @@ private: int chosen_align; }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4rip.cpp b/win/Qt/qt_rip.cpp similarity index 92% rename from win/Qt4/qt4rip.cpp rename to win/Qt/qt_rip.cpp index d509f8895..cbe795f85 100644 --- a/win/Qt4/qt4rip.cpp +++ b/win/Qt/qt_rip.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4rip.cpp -- tombstone window +// qt_rip.cpp -- tombstone window #include "hack.h" #undef Invisible @@ -19,11 +19,11 @@ #if QT_VERSION >= 0x050000 #include #endif -#include "qt4rip.h" -#include "qt4bind.h" -#include "qt4str.h" +#include "qt_rip.h" +#include "qt_bind.h" +#include "qt_str.h" -namespace nethack_qt4 { +namespace nethack_qt_ { QPixmap* NetHackQtRIP::pixmap=0; @@ -91,4 +91,4 @@ void NetHackQtRIP::paintEvent(QPaintEvent* event) } } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4rip.h b/win/Qt/qt_rip.h similarity index 84% rename from win/Qt4/qt4rip.h rename to win/Qt/qt_rip.h index 792a4e32f..97670f0d0 100644 --- a/win/Qt4/qt4rip.h +++ b/win/Qt/qt_rip.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4rip.h -- tombstone window +// qt_rip.h -- tombstone window #ifndef QT4RIP_H #define QT4RIP_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtRIP : public QWidget { private: @@ -25,6 +25,6 @@ protected: QSize sizeHint() const; }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4set.cpp b/win/Qt/qt_set.cpp similarity index 96% rename from win/Qt4/qt4set.cpp rename to win/Qt/qt_set.cpp index f9bfa246e..2ac70fd9d 100644 --- a/win/Qt4/qt4set.cpp +++ b/win/Qt/qt_set.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4set.cpp -- the Qt settings +// qt_set.cpp -- the Qt settings #include "hack.h" #undef Invisible @@ -19,10 +19,10 @@ #if QT_VERSION >= 0x050000 #include #endif -#include "qt4set.h" -#include "qt4set.moc" -#include "qt4glyph.h" -#include "qt4str.h" +#include "qt_set.h" +#include "qt_set.moc" +#include "qt_glyph.h" +#include "qt_str.h" /* Used by tile/font-size patch below and in ../../src/files.c */ char *qt_tilewidth=NULL; @@ -34,7 +34,7 @@ int qt_compact_mode = 1; int qt_compact_mode = 0; #endif -namespace nethack_qt4 { +namespace nethack_qt_ { #define TILEWMIN 6 #define TILEHMIN 6 @@ -192,4 +192,4 @@ bool NetHackQtSettings::ynInMessages() NetHackQtSettings* qt_settings; -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4set.h b/win/Qt/qt_set.h similarity index 92% rename from win/Qt4/qt4set.h rename to win/Qt/qt_set.h index 48b90f306..6b2aa6a4a 100644 --- a/win/Qt4/qt4set.h +++ b/win/Qt/qt_set.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4set.h -- the Qt settings +// qt_set.h -- the Qt settings #ifndef QT4SET_H #define QT4SET_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtGlyphs; @@ -54,6 +54,6 @@ private slots: extern NetHackQtSettings* qt_settings; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4stat.cpp b/win/Qt/qt_stat.cpp similarity index 98% rename from win/Qt4/qt4stat.cpp rename to win/Qt/qt_stat.cpp index c8d250718..5e6918f00 100644 --- a/win/Qt4/qt4stat.cpp +++ b/win/Qt/qt_stat.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4stat.cpp -- bindings between the Qt 4 interface and the main code +// qt_stat.cpp -- bindings between the Qt 4 interface and the main code extern "C" { #include "hack.h" @@ -21,16 +21,16 @@ extern "C" { #if QT_VERSION >= 0x050000 #include #endif -#include "qt4stat.h" -#include "qt4stat.moc" -#include "qt4set.h" -#include "qt4str.h" +#include "qt_stat.h" +#include "qt_stat.moc" +#include "qt_set.h" +#include "qt_str.h" #include "qt_xpms.h" extern const char *enc_stat[]; /* from botl.c */ extern const char *hu_stat[]; /* from eat.c */ -namespace nethack_qt4 { +namespace nethack_qt_ { NetHackQtStatusWindow::NetHackQtStatusWindow() : // Notes: @@ -537,4 +537,4 @@ void NetHackQtStatusWindow::checkTurnEvents() { } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4stat.h b/win/Qt/qt_stat.h similarity index 92% rename from win/Qt4/qt4stat.h rename to win/Qt/qt_stat.h index a0a00a46f..73d7d8eca 100644 --- a/win/Qt4/qt4stat.h +++ b/win/Qt/qt_stat.h @@ -2,15 +2,15 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4stat.h -- bindings between the Qt 4 interface and the main code +// qt_stat.h -- bindings between the Qt 4 interface and the main code #ifndef QT4STAT_H #define QT4STAT_H -#include "qt4win.h" -#include "qt4icon.h" +#include "qt_win.h" +#include "qt_icon.h" -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtStatusWindow : QWidget, public NetHackQtWindow { Q_OBJECT @@ -101,6 +101,6 @@ private: void checkTurnEvents(); }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4str.cpp b/win/Qt/qt_str.cpp similarity index 96% rename from win/Qt4/qt4str.cpp rename to win/Qt/qt_str.cpp index b6b4440eb..fc9cd26d7 100644 --- a/win/Qt4/qt4str.cpp +++ b/win/Qt/qt_str.cpp @@ -2,13 +2,13 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4str.cpp -- some string functions +// qt_str.cpp -- some string functions #include #include -#include "qt4str.h" +#include "qt_str.h" -namespace nethack_qt4 { +namespace nethack_qt_ { // Bounded string copy size_t str_copy(char *dest, const char *src, size_t max) @@ -80,4 +80,4 @@ int cp437(int ch) return cp437table[(unsigned char)ch]; } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4str.h b/win/Qt/qt_str.h similarity index 83% rename from win/Qt4/qt4str.h rename to win/Qt/qt_str.h index 05f25f4c4..2d5449363 100644 --- a/win/Qt4/qt4str.h +++ b/win/Qt/qt_str.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4str.h -- various string functions +// qt_str.h -- various string functions #ifndef QT4STR_H #define QT4STR_H -namespace nethack_qt4 { +namespace nethack_qt_ { // Bounded string copy extern size_t str_copy(char *dest, const char *src, size_t max); @@ -19,6 +19,6 @@ extern QString nh_capitalize_words(const QString& str); // Map symbol conversion extern int cp437(int ch); -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4streq.cpp b/win/Qt/qt_streq.cpp similarity index 94% rename from win/Qt4/qt4streq.cpp rename to win/Qt/qt_streq.cpp index abe910ff7..c489e5800 100644 --- a/win/Qt4/qt4streq.cpp +++ b/win/Qt/qt_streq.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4streq.cpp -- string requestor +// qt_streq.cpp -- string requestor #include "hack.h" #undef Invisible @@ -19,10 +19,10 @@ #if QT_VERSION >= 0x050000 #include #endif -#include "qt4streq.h" -#include "qt4str.h" +#include "qt_streq.h" +#include "qt_str.h" -namespace nethack_qt4 { +namespace nethack_qt_ { // temporary void centerOnMain(QWidget *); @@ -99,4 +99,4 @@ bool NetHackQtStringRequestor::Get(char* buffer, int maxchar) } } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4streq.h b/win/Qt/qt_streq.h similarity index 84% rename from win/Qt4/qt4streq.h rename to win/Qt/qt_streq.h index a5f05d769..12fd0a776 100644 --- a/win/Qt4/qt4streq.h +++ b/win/Qt/qt_streq.h @@ -2,14 +2,14 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4streq.h -- string requestor +// qt_streq.h -- string requestor #ifndef QT4STREQ_H #define QT4STREQ_H -#include "qt4line.h" +#include "qt_line.h" -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtStringRequestor : QDialog { private: @@ -25,6 +25,6 @@ public: virtual void resizeEvent(QResizeEvent*); }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4svsel.cpp b/win/Qt/qt_svsel.cpp similarity index 93% rename from win/Qt4/qt4svsel.cpp rename to win/Qt/qt_svsel.cpp index 0b5271588..6950afd79 100644 --- a/win/Qt4/qt4svsel.cpp +++ b/win/Qt/qt_svsel.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4svsel.cpp -- saved game selector +// qt_svsel.cpp -- saved game selector #include "hack.h" #undef Invisible @@ -19,11 +19,11 @@ #if QT_VERSION >= 0x050000 #include #endif -#include "qt4svsel.h" -#include "qt4bind.h" -#include "qt4str.h" +#include "qt_svsel.h" +#include "qt_bind.h" +#include "qt_str.h" -namespace nethack_qt4 { +namespace nethack_qt_ { NetHackQtSavedGameSelector::NetHackQtSavedGameSelector(const char** saved) : QDialog(NetHackQtBind::mainWidget()) @@ -77,4 +77,4 @@ int NetHackQtSavedGameSelector::choose() return exec()-2; } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4svsel.h b/win/Qt/qt_svsel.h similarity index 79% rename from win/Qt4/qt4svsel.h rename to win/Qt/qt_svsel.h index 918e6f7e3..3a5498758 100644 --- a/win/Qt4/qt4svsel.h +++ b/win/Qt/qt_svsel.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4svsel.h -- saved game selector +// qt_svsel.h -- saved game selector #ifndef QT4SVSEL_H #define QT4SVSEL_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtSavedGameSelector : public QDialog { public: @@ -16,6 +16,6 @@ public: int choose(); }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt/qt_win.cpp b/win/Qt/qt_win.cpp index 919018c41..664591834 100644 --- a/win/Qt/qt_win.cpp +++ b/win/Qt/qt_win.cpp @@ -1,5 +1,5 @@ -// NetHack 3.6 qt_win.cpp $NHDT-Date: 1524684508 2018/04/25 19:28:28 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.77 $ // Copyright (c) Warwick Allison, 1999. +// Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. // Qt Binding for NetHack 3.4 @@ -25,8 +25,8 @@ // key events by overiding QApplicion::notify(...), and putting them in // a buffer. Mouse clicks on the map window are treated with a similar // buffer. When the NetHack engine calls for a key, one is taken from -// the buffer, or if that is empty, QApplication::enter_loop() is called. -// Whenever keys or clicks go into the buffer, QApplication::exit_loop() +// the buffer, or if that is empty, QApplication::exec() is called. +// Whenever keys or clicks go into the buffer, QApplication::exit() // is called. // // Another problem is that some NetHack players are decade-long players who @@ -40,1400 +40,78 @@ // by the key event buffer. // -extern "C" { - // This includes all the definitions we need from the NetHack main // engine. We pretend MSC is a STDC compiler, because C++ is close // enough, and we undefine NetHack macros which conflict with Qt // identifiers. -#define alloc hide_alloc // avoid treading on STL symbol -#define lock hide_lock // avoid treading on STL symbol -#ifdef _MSC_VER -#define NHSTDC -#endif +#define QT_DEPRECATED_WARNINGS #include "hack.h" -#include "func_tab.h" -#include "dlb.h" -#include "patchlevel.h" -#include "tile2x11.h" #undef Invisible #undef Warning -#undef red -#undef green -#undef blue -#undef Black -#undef curs -#undef TRUE -#undef FALSE +#undef index +#undef msleep +#undef rindex +#undef wizard +#undef yn #undef min #undef max -#undef alloc -#undef lock -#undef yn - -} +#include +#if QT_VERSION >= 0x050000 +#include +#endif #include "qt_win.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include -//#include +#include "qt_bind.h" +#include "qt_click.h" +#include "qt_glyph.h" +#include "qt_inv.h" +#include "qt_key.h" +#include "qt_icon.h" +#include "qt_map.h" +#include "qt_menu.h" +#include "qt_msg.h" +#include "qt_set.h" #include #include "qt_clust.h" -#include "qt_xpms.h" #include -#ifdef Q_WS_MACX -# include -#else -# include -#endif #ifdef _WS_X11_ // For userid control #include #endif -// Some distributors released Qt 2.1.0beta4 -#if QT_VERSION < 220 -# define nh_WX11BypassWM 0x01000000 -#else -# define nh_WX11BypassWM WX11BypassWM -#endif - #ifdef USER_SOUNDS -# if QT_VERSION < 220 -# undef USER_SOUNDS +#if QT_VERSION >= 0x050000 +# include # else -# include +# include # endif #endif #ifdef USER_SOUNDS -extern "C" void play_sound_for_message(const char* str); +extern void play_sound_for_message(const std::string& str); #endif -#ifdef SAFERHANGUP -#include -#endif +namespace nethack_qt_ { -// Warwick prefers it this way... -#define QT_CHOOSE_RACE_FIRST - -static const char nh_attribution[] = "
    NetHack" - "
    by the NetHack DevTeam
    "; - -static QString -aboutMsg() -{ - QString msg; - msg.sprintf( - "Qt NetHack is a version of NetHack built\n" -#ifdef KDE - "using KDE and the Qt GUI toolkit.\n" -#else - "using the Qt GUI toolkit.\n" -#endif - "This is version %d.%d.%d\n\n" - "Homepage:\n http://trolls.troll.no/warwick/nethack/\n\n" -#ifdef KDE - "KDE:\n http://www.kde.org\n" -#endif - "Qt:\n http://www.troll.no", - VERSION_MAJOR, - VERSION_MINOR, - PATCHLEVEL); - return msg; -} - -static void +void centerOnMain( QWidget* w ) { - QWidget* m = qApp->mainWidget(); + QWidget* m = NetHackQtBind::mainWidget(); if (!m) m = qApp->desktop(); QPoint p = m->mapToGlobal(QPoint(0,0)); w->move( p.x() + m->width()/2 - w->width()/2, p.y() + m->height()/2 - w->height()/2 ); } -NetHackQtLineEdit::NetHackQtLineEdit() : - QLineEdit(0) -{ -} - -NetHackQtLineEdit::NetHackQtLineEdit(QWidget* parent, const char* name) : - QLineEdit(parent,name) -{ -} - -void NetHackQtLineEdit::fakeEvent(int key, int ascii, int state) -{ - QKeyEvent fake(QEvent::KeyPress,key,ascii,state); - keyPressEvent(&fake); -} - -extern "C" { -/* Used by tile/font-size patch below and in ../../src/files.c */ -char *qt_tilewidth=NULL; -char *qt_tileheight=NULL; -char *qt_fontsize=NULL; -#if defined(QWS) -int qt_compact_mode = 1; -#else -int qt_compact_mode = 0; -#endif -extern const char *enc_stat[]; /* from botl.c */ -extern const char *hu_stat[]; /* from eat.c */ -extern int total_tiles_used; // from tile.c -extern short glyph2tile[]; // from tile.c -} - -static int tilefile_tile_W=16; -static int tilefile_tile_H=16; - -#define TILEWMIN 1 -#define TILEHMIN 1 - - -/* XPM */ -static const char * nh_icon[] = { -"40 40 6 1", -" s None c none", -". c #ffffff", -"X c #dadab6", -"o c #6c91b6", -"O c #476c6c", -"+ c #000000", -" ", -" ", -" ", -" . .X..XX.XX X ", -" .. .....X.XXXXXX XX ", -" ... ....X..XX.XXXXX XXX ", -" .. ..........X.XXXXXXXXXXX XX ", -" .... ........X..XX.XXXXXXXXX XXXX ", -" .... ..........X.XXXXXXXXXXX XXXX ", -" ooOOO..ooooooOooOOoOOOOOOOXX+++OO++ ", -" ooOOO..ooooooooOoOOOOOOOOOXX+++OO++ ", -" ....O..ooooooOooOOoOOOOOOOXX+XXXX++ ", -" ....O..ooooooooOoOOOOOOOOOXX+XXXX++ ", -" ..OOO..ooooooOooOOoOOOOOOOXX+++XX++ ", -" ++++..ooooooooOoOOOOOOOOOXX+++ +++ ", -" +++..ooooooOooOOoOOOOOOOXX+++ + ", -" ++..ooooooooOoOOOOOOOOOXX+++ ", -" ..ooooooOooOOoOOOOOOOXX+++ ", -" ..ooooooooOoOOOOOOOOOXX+++ ", -" ..ooooooOooOOoOOOOOOOXX+++ ", -" ..ooooooooOoOOOOOOOOOXX+++ ", -" ..oooooOooOOoOOOOOOXX+++ ", -" ..oooooooOoOOOOOOOOXX+++ ", -" ..ooooOooOOoOOOOOXX+++ ", -" ..ooooooOoOOOOOOOXX++++ ", -" ..o..oooOooOOoOOOOXX+XX+++ ", -" ...o..oooooOoOOOOOXX++XXX++ ", -" ....OO..ooOooOOoOOXX+++XXXX++ ", -" ...oo..+..oooOoOOOXX++XXooXXX++ ", -" ...ooo..++..OooOOoXX+++XXooOXXX+ ", -" ..oooOOXX+++....XXXX++++XXOOoOOXX+ ", -" ..oooOOXX+++ ...XXX+++++XXOOooOXX++ ", -" ..oooOXXX+++ ..XX+++ +XXOOooOXX++ ", -" .....XXX++++ XXXXXXX++ ", -" ....XX++++ XXXXXXX+ ", -" ...XX+++ XXXXX++ ", -" ", -" ", -" ", -" "}; -/* XPM */ -static const char * nh_icon_small[] = { -/* width height ncolors chars_per_pixel */ -"16 16 16 1", -/* colors */ -" c #587070", -". c #D1D5C9", -"X c #8B8C84", -"o c #2A2A28", -"O c #9AABA9", -"+ c #6A8FB2", -"@ c #C4CAC4", -"# c #B6BEB6", -"$ c None", -"% c #54564E", -"& c #476C6C", -"* c #ADB2AB", -"= c #ABABA2", -"- c #5E8295", -"; c #8B988F", -": c #E8EAE7", -/* pixels */ -"$$$$$$$$$$$$$$$$", -"$$$.$#::.#==*$$$", -"$.*:::::....#*=$", -"$@#:..@#*==#;XX;", -"$@O:+++- &&; X%X", -"$#%.+++- &&;% oX", -"$$o.++-- &&;%%X$", -"$$$:++-- &&;%%$$", -"$$$.O++- &&=o $$", -"$$$=:++- & XoX$$", -"$$*:@O-- ;%Xo$$", -"$*:O#$+--;oOOX $", -"$:+ =o::=oo=-;%X", -"$::.%o$*;X;##@%$", -"$$@# ;$$$$$=*;X$", -"$$$$$$$$$$$$$$$$" -}; - -/* XPM */ -static const char * map_xpm[] = { -"12 13 4 1", -". c None", -" c #000000000000", -"X c #0000B6DAFFFF", -"o c #69A69248B6DA", -" .", -" XXXXX ooo ", -" XoooX o ", -" XoooX o o ", -" XoooX ooo ", -" XXoXX o ", -" oooooXXX ", -" oo o oooX ", -" o XooX ", -" oooo XooX ", -" o o XXXX ", -" ", -". "}; -/* XPM */ -static const char * msg_xpm[] = { -"12 13 4 1", -". c None", -" c #FFFFFFFFFFFF", -"X c #69A69248B6DA", -"o c #000000000000", -" .", -" XXX XXX X o", -" o", -" XXXXX XX o", -" o", -" XX XXXXX o", -" o", -" XXXXXX o", -" o", -" XX XXX XX o", -" o", -" o", -".ooooooooooo"}; -/* XPM */ -static const char * stat_xpm[] = { -"12 13 5 1", -" c None", -". c #FFFF00000000", -"X c #000000000000", -"o c #FFFFFFFF0000", -"O c #69A6FFFF0000", -" ", -" ", -"... ", -"...X ", -"...X ... ", -"oooX oooX", -"oooXooo oooX", -"OOOXOOOXOOOX", -"OOOXOOOXOOOX", -"OOOXOOOXOOOX", -"OOOXOOOXOOOX", -"OOOXOOOXOOOX", -" XXXXXXXXXXX"}; -/* XPM */ -static const char * info_xpm[] = { -"12 13 4 1", -" c None", -". c #00000000FFFF", -"X c #FFFFFFFFFFFF", -"o c #000000000000", -" ... ", -" ....... ", -" ...XXX... ", -" .........o ", -"...XXXX.... ", -"....XXX....o", -"....XXX....o", -"....XXX....o", -" ...XXX...oo", -" ..XXXXX..o ", -" .......oo ", -" o...ooo ", -" ooo "}; - - -/* XPM */ -static const char * again_xpm[] = { -"12 13 2 1", -" c None", -". c #000000000000", -" .. ", -" .. ", -" ..... ", -" ....... ", -"... .. .. ", -".. .. .. ", -".. ..", -".. ..", -".. ..", -" .. .. ", -" .......... ", -" ...... ", -" "}; -/* XPM */ -static const char * kick_xpm[] = { -"12 13 3 1", -" c None", -". c #000000000000", -"X c #FFFF6DB60000", -" ", -" ", -" . . . ", -" ... . . ", -" ... . ", -" ... . ", -" ... ", -"XXX ... ", -"XXX. ... ", -"XXX. ... ", -"XXX. .. ", -" ... ", -" "}; -/* XPM */ -static const char * throw_xpm[] = { -"12 13 3 1", -" c None", -". c #FFFF6DB60000", -"X c #000000000000", -" ", -" ", -" ", -" ", -".... X ", -"....X X ", -"....X XXXXXX", -"....X X ", -" XXXX X ", -" ", -" ", -" ", -" "}; -/* XPM */ -static const char * fire_xpm[] = { -"12 13 5 1", -" c None", -". c #B6DA45140000", -"X c #FFFFB6DA9658", -"o c #000000000000", -"O c #FFFF6DB60000", -" . ", -" X. ", -" X . ", -" X .o ", -" X . o ", -" X .o o ", -"OOOOOOOOoooo", -" X .o o ", -" X . o o ", -" X .o ", -" X. o ", -" . o ", -" o "}; -/* XPM */ -static const char * get_xpm[] = { -"12 13 3 1", -" c None", -". c #000000000000", -"X c #FFFF6DB60000", -" ", -" . ", -" ... ", -" . . . ", -" . ", -" . ", -" ", -" XXXXX ", -" XXXXX. ", -" XXXXX. ", -" XXXXX. ", -" ..... ", -" "}; -/* XPM */ -static const char * drop_xpm[] = { -"12 13 3 1", -" c None", -". c #FFFF6DB60000", -"X c #000000000000", -" ", -" ..... ", -" .....X ", -" .....X ", -" .....X ", -" XXXXX ", -" ", -" X ", -" X ", -" X X X ", -" XXX ", -" X ", -" "}; -/* XPM */ -static const char * eat_xpm[] = { -"12 13 4 1", -" c None", -". c #000000000000", -"X c #FFFFB6DA9658", -"o c #FFFF6DB60000", -" .X. .. ", -" .X. .. ", -" .X. .. ", -" .X. .. ", -" ... .. ", -" .. .. ", -" .. .. ", -" oo oo ", -" oo oo ", -" oo oo ", -" oo oo ", -" oo oo ", -" oo oo "}; -/* XPM */ -static const char * rest_xpm[] = { -"12 13 2 1", -" c None", -". c #000000000000", -" ..... ", -" . ", -" . ", -" . ....", -" ..... . ", -" . ", -" ....", -" ", -" .... ", -" . ", -" . ", -" .... ", -" "}; -/* XPM */ -static const char * cast_a_xpm[] = { -"12 13 3 1", -" c None", -". c #FFFF6DB60000", -"X c #000000000000", -" . ", -" . ", -" .. ", -" .. ", -" .. . ", -" .. . ", -" ...... ", -" .. .. XX ", -" .. X X ", -" .. X X ", -" .. XXXX ", -" . X X ", -" . X X "}; -/* XPM */ -static const char * cast_b_xpm[] = { -"12 13 3 1", -" c None", -". c #FFFF6DB60000", -"X c #000000000000", -" . ", -" . ", -" .. ", -" .. ", -" .. . ", -" .. . ", -" ...... ", -" .. .. XXX ", -" .. X X ", -" .. XXX ", -" .. X X ", -" . X X ", -" . XXX "}; -/* XPM */ -static const char * cast_c_xpm[] = { -"12 13 3 1", -" c None", -". c #FFFF6DB60000", -"X c #000000000000", -" . ", -" . ", -" .. ", -" .. ", -" .. . ", -" .. . ", -" ...... ", -" .. .. XX ", -" .. X X ", -" .. X ", -" .. X ", -" . X X ", -" . XX "}; - -NetHackQtSettings::NetHackQtSettings(int w, int h) : - tilewidth(TILEWMIN,64,1,this), - tileheight(TILEHMIN,64,1,this), - widthlbl(&tilewidth,"&Width:",this), - heightlbl(&tileheight,"&Height:",this), - whichsize("&Zoomed",this), - fontsize(this), - normal("times"), -#ifdef WS_WIN - normalfixed("courier new"), -#else - normalfixed("fixed"), -#endif - large("times"), - theglyphs(0) - -{ - int default_fontsize; - - if (w<=300) { - // ~240x320 - default_fontsize=4; - tilewidth.setValue(8); - tileheight.setValue(12); - } else if (w<=700) { - // ~640x480 - default_fontsize=3; - tilewidth.setValue(8); - tileheight.setValue(14); - } else if (w<=900) { - // ~800x600 - default_fontsize=3; - tilewidth.setValue(10); - tileheight.setValue(17); - } else if (w<=1100) { - // ~1024x768 - default_fontsize=2; - tilewidth.setValue(12); - tileheight.setValue(22); - } else if (w<=1200) { - // ~1152x900 - default_fontsize=1; - tilewidth.setValue(14); - tileheight.setValue(26); - } else { - // ~1280x1024 and larger - default_fontsize=0; - tilewidth.setValue(16); - tileheight.setValue(30); - } - - // Tile/font sizes read from .nethackrc - if (qt_tilewidth != NULL) { - tilewidth.setValue(atoi(qt_tilewidth)); - free(qt_tilewidth); - } - if (qt_tileheight != NULL) { - tileheight.setValue(atoi(qt_tileheight)); - free(qt_tileheight); - } - if (qt_fontsize != NULL) { - switch (tolower(qt_fontsize[0])) { - case 'h': default_fontsize = 0; break; - case 'l': default_fontsize = 1; break; - case 'm': default_fontsize = 2; break; - case 's': default_fontsize = 3; break; - case 't': default_fontsize = 4; break; - } - free(qt_fontsize); - } - - theglyphs=new NetHackQtGlyphs(); - resizeTiles(); - - connect(&tilewidth,SIGNAL(valueChanged(int)),this,SLOT(resizeTiles())); - connect(&tileheight,SIGNAL(valueChanged(int)),this,SLOT(resizeTiles())); - connect(&whichsize,SIGNAL(toggled(bool)),this,SLOT(setGlyphSize(bool))); - - fontsize.insertItem("Huge"); - fontsize.insertItem("Large"); - fontsize.insertItem("Medium"); - fontsize.insertItem("Small"); - fontsize.insertItem("Tiny"); - fontsize.setCurrentItem(default_fontsize); - connect(&fontsize,SIGNAL(activated(int)),this,SIGNAL(fontChanged())); - - QGridLayout* grid = new QGridLayout(this, 5, 2, 8); - grid->addMultiCellWidget(&whichsize, 0, 0, 0, 1); - grid->addWidget(&tilewidth, 1, 1); grid->addWidget(&widthlbl, 1, 0); - grid->addWidget(&tileheight, 2, 1); grid->addWidget(&heightlbl, 2, 0); - QLabel* flabel=new QLabel(&fontsize, "&Font:",this); - grid->addWidget(flabel, 3, 0); grid->addWidget(&fontsize, 3, 1); - QPushButton* dismiss=new QPushButton("Dismiss",this); - dismiss->setDefault(TRUE); - grid->addMultiCellWidget(dismiss, 4, 4, 0, 1); - grid->setRowStretch(4,0); - grid->setColStretch(1,1); - grid->setColStretch(2,2); - grid->activate(); - - connect(dismiss,SIGNAL(clicked()),this,SLOT(accept())); - resize(150,140); -} - -NetHackQtGlyphs& NetHackQtSettings::glyphs() -{ - return *theglyphs; -} - -void NetHackQtSettings::resizeTiles() -{ - int w = tilewidth.value(); - int h = tileheight.value(); - - theglyphs->setSize(w,h); - emit tilesChanged(); -} - -void NetHackQtSettings::toggleGlyphSize() -{ - whichsize.toggle(); -} - -void NetHackQtSettings::setGlyphSize(bool which) -{ - QSize n = QSize(tilewidth.value(),tileheight.value()); - if ( othersize.isValid() ) { - tilewidth.blockSignals(TRUE); - tileheight.blockSignals(TRUE); - tilewidth.setValue(othersize.width()); - tileheight.setValue(othersize.height()); - tileheight.blockSignals(FALSE); - tilewidth.blockSignals(FALSE); - resizeTiles(); - } - othersize = n; -} - -const QFont& NetHackQtSettings::normalFont() -{ - static int size[]={ 18, 14, 12, 10, 8 }; - normal.setPointSize(size[fontsize.currentItem()]); - return normal; -} - -const QFont& NetHackQtSettings::normalFixedFont() -{ - static int size[]={ 18, 14, 13, 10, 8 }; - normalfixed.setPointSize(size[fontsize.currentItem()]); - return normalfixed; -} - -const QFont& NetHackQtSettings::largeFont() -{ - static int size[]={ 24, 18, 14, 12, 10 }; - large.setPointSize(size[fontsize.currentItem()]); - return large; -} - -bool NetHackQtSettings::ynInMessages() -{ - return !qt_compact_mode; -} - - -NetHackQtSettings* qt_settings; - - - -NetHackQtKeyBuffer::NetHackQtKeyBuffer() : - in(0), out(0) -{ -} - -bool NetHackQtKeyBuffer::Empty() const { return in==out; } -bool NetHackQtKeyBuffer::Full() const { return (in+1)%maxkey==out; } - -void NetHackQtKeyBuffer::Put(int k, int a, int state) -{ - if ( Full() ) return; // Safety - key[in]=k; - ascii[in]=a; - in=(in+1)%maxkey; -} - -void NetHackQtKeyBuffer::Put(char a) -{ - Put(0,a,0); -} - -void NetHackQtKeyBuffer::Put(const char* str) -{ - while (*str) Put(*str++); -} - -int NetHackQtKeyBuffer::GetKey() -{ - if ( Empty() ) return 0; - int r=TopKey(); - out=(out+1)%maxkey; - return r; -} - -int NetHackQtKeyBuffer::GetAscii() -{ - if ( Empty() ) return 0; // Safety - int r=TopAscii(); - out=(out+1)%maxkey; - return r; -} - -int NetHackQtKeyBuffer::GetState() -{ - if ( Empty() ) return 0; - int r=TopState(); - out=(out+1)%maxkey; - return r; -} - -int NetHackQtKeyBuffer::TopKey() const -{ - if ( Empty() ) return 0; - return key[out]; -} - -int NetHackQtKeyBuffer::TopAscii() const -{ - if ( Empty() ) return 0; - return ascii[out]; -} - -int NetHackQtKeyBuffer::TopState() const -{ - if ( Empty() ) return 0; - return state[out]; -} - - -NetHackQtClickBuffer::NetHackQtClickBuffer() : - in(0), out(0) -{ -} - -bool NetHackQtClickBuffer::Empty() const { return in==out; } -bool NetHackQtClickBuffer::Full() const { return (in+1)%maxclick==out; } - -void NetHackQtClickBuffer::Put(int x, int y, int mod) -{ - click[in].x=x; - click[in].y=y; - click[in].mod=mod; - in=(in+1)%maxclick; -} - -int NetHackQtClickBuffer::NextX() const { return click[out].x; } -int NetHackQtClickBuffer::NextY() const { return click[out].y; } -int NetHackQtClickBuffer::NextMod() const { return click[out].mod; } - -void NetHackQtClickBuffer::Get() -{ - out=(out+1)%maxclick; -} - -class NhPSListViewItem : public QListViewItem { -public: - NhPSListViewItem( QListView* parent, const QString& name ) : - QListViewItem(parent, name) - { - } - - void setGlyph(int g) - { - NetHackQtGlyphs& glyphs = qt_settings->glyphs(); - int gw = glyphs.width(); - int gh = glyphs.height(); - QPixmap pm(gw,gh); - QPainter p(&pm); - glyphs.drawGlyph(p, g, 0, 0); - p.end(); - setPixmap(0,pm); - setHeight(QMAX(pm.height()+1,height())); - } - - void paintCell( QPainter *p, const QColorGroup &cg, - int column, int width, int alignment ) - { - if ( isSelectable() ) { - QListViewItem::paintCell( p, cg, column, width, alignment ); - } else { - QColorGroup disabled( - cg.foreground().light(), - cg.button().light(), - cg.light(), cg.dark(), cg.mid(), - gray, cg.base() ); - QListViewItem::paintCell( p, disabled, column, width, alignment ); - } - } -}; - -class NhPSListViewRole : public NhPSListViewItem { -public: - NhPSListViewRole( QListView* parent, int id ) : - NhPSListViewItem(parent, -#ifdef QT_CHOOSE_RACE_FIRST // Lowerize - looks better - QString(QChar(roles[id].name.m[0])).lower()+QString(roles[id].name.m+1) -#else - roles[id].name.m -#endif - ) - { - setGlyph(monnum_to_glyph(roles[id].malenum)); - } -}; - -class NhPSListViewRace : public NhPSListViewItem { -public: - NhPSListViewRace( QListView* parent, int id ) : - NhPSListViewItem(parent, -#ifdef QT_CHOOSE_RACE_FIRST // Capitalize - looks better - QString(QChar(races[id].noun[0])).upper()+QString(races[id].noun+1) -#else - QString(QChar(races[id].noun[0])+QString(races[id].noun+1)) -#endif - ) - { - setGlyph(monnum_to_glyph(races[id].malenum)); - } -}; - -class NhPSListView : public QListView { -public: - NhPSListView( QWidget* parent ) : - QListView(parent) - { - setSorting(-1); // order is identity - header()->setClickEnabled(FALSE); - } - - QSizePolicy sizePolicy() const - { - return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); - } - - QSize minimumSizeHint() const - { - return sizeHint(); - } - - QSize sizeHint() const - { - QListView::sizeHint(); - QSize sz = header()->sizeHint(); - int h=0; - QListViewItem* c=firstChild(); - while (c) h+=c->height(),c = c->nextSibling(); - sz += QSize(frameWidth()*2, h+frameWidth()*2); - return sz; - } - - int selectedItemNumber() const - { - int i=0; - QListViewItem* c = firstChild(); - while (c) { - if (c == selectedItem()) { - return i; - } - i++; - c = c->nextSibling(); - } - return -1; - } - - void setSelectedItemNumber(int i) - { - QListViewItem* c=firstChild(); - while (i--) - c = c->nextSibling(); - c->setSelected(TRUE); - } -}; - -NetHackQtPlayerSelector::NetHackQtPlayerSelector(NetHackQtKeyBuffer& ks) : - QDialog(qApp->mainWidget(),"plsel",TRUE), - keysource(ks), - fully_specified_role(TRUE) -{ - /* - 0 1 2 - + Name ------------------------------------+ - 0 | | - + ---- ------------------------------------+ - + Role ---+ + Race ---+ + Gender ------+ - | | | | | * Male | - 1 | | | | | * Female | - | | | | +--------------+ - | | | | - | | | | + Alignment ---+ - 2 | | | | | * Male | - | | | | | * Female | - | | | | +--------------+ - 3 | | | | ...stretch... - | | | | - 4 | | | | [ Play ] - 5 | | | | [ Quit ] - +---------+ +---------+ - */ - - int marg=4; - QGridLayout *l = new QGridLayout(this,6,3,marg,marg); - - QButtonGroup* namebox = new QButtonGroup(1,Horizontal,"Name",this); - QLineEdit* name = new QLineEdit(namebox); - name->setMaxLength(sizeof(g.plname)-1); - if ( strncmp(g.plname,"player",6) && strncmp(g.plname,"games",5) ) - name->setText(g.plname); - connect(name, SIGNAL(textChanged(const QString&)), - this, SLOT(selectName(const QString&)) ); - name->setFocus(); - QButtonGroup* genderbox = new QButtonGroup("Sex",this); - QButtonGroup* alignbox = new QButtonGroup("Alignment",this); - QVBoxLayout* vbgb = new QVBoxLayout(genderbox,3,1); - vbgb->setAutoAdd(TRUE); - vbgb->addSpacing(fontMetrics().height()*3/4); - QVBoxLayout* vbab = new QVBoxLayout(alignbox,3,1); - vbab->setAutoAdd(TRUE); - vbab->addSpacing(fontMetrics().height()); - QLabel* logo = new QLabel(nh_attribution, this); - - l->addMultiCellWidget( namebox, 0,0,0,2 ); -#ifdef QT_CHOOSE_RACE_FIRST - race = new NhPSListView(this); - role = new NhPSListView(this); - l->addMultiCellWidget( race, 1,5,0,0 ); - l->addMultiCellWidget( role, 1,5,1,1 ); -#else - role = new NhPSListView(this); - race = new NhPSListView(this); - l->addMultiCellWidget( role, 1,5,0,0 ); - l->addMultiCellWidget( race, 1,5,1,1 ); -#endif - role->addColumn("Role"); - race->addColumn("Race"); - - l->addWidget( genderbox, 1, 2 ); - l->addWidget( alignbox, 2, 2 ); - l->addWidget( logo, 3, 2, AlignCenter ); - l->setRowStretch( 3, 5 ); - - int i; - int nrole; - - for (nrole=0; roles[nrole].name.m; nrole++) - ; - for (i=nrole-1; i>=0; i--) { // XXX QListView unsorted goes in rev. - new NhPSListViewRole( role, i ); - } - connect( role, SIGNAL(selectionChanged()), this, SLOT(selectRole()) ); - - int nrace; - for (nrace=0; races[nrace].noun; nrace++) - ; - for (i=nrace-1; i>=0; i--) { - new NhPSListViewRace( race, i ); - } - connect( race, SIGNAL(selectionChanged()), this, SLOT(selectRace()) ); - - gender = new QRadioButton*[ROLE_GENDERS]; - for (i=0; iaddWidget( ok, 4, 2 ); - ok->setDefault(TRUE); - connect( ok, SIGNAL(clicked()), this, SLOT(accept()) ); - - QPushButton* cancel = new QPushButton("Quit",this); - l->addWidget( cancel, 5, 2 ); - connect( cancel, SIGNAL(clicked()), this, SLOT(reject()) ); - - // Randomize race and role, unless specified in config - int ro = flags.initrole; - if (ro == ROLE_NONE || ro == ROLE_RANDOM) { - ro = rn2(nrole); - if (flags.initrole != ROLE_RANDOM) { - fully_specified_role = FALSE; - } - } - int ra = flags.initrace; - if (ra == ROLE_NONE || ra == ROLE_RANDOM) { - ra = rn2(nrace); - if (flags.initrace != ROLE_RANDOM) { - fully_specified_role = FALSE; - } - } - - // make sure we have a valid combination, honoring - // the users request if possible. - bool choose_race_first; -#ifdef QT_CHOOSE_RACE_FIRST - choose_race_first = TRUE; - if (flags.initrole >= 0 && flags.initrace < 0) { - choose_race_first = FALSE; - } -#else - choose_race_first = FALSE; - if (flags.initrace >= 0 && flags.initrole < 0) { - choose_race_first = TRUE; - } -#endif - while (!validrace(ro,ra)) { - if (choose_race_first) { - ro = rn2(nrole); - if (flags.initrole != ROLE_RANDOM) { - fully_specified_role = FALSE; - } - } else { - ra = rn2(nrace); - if (flags.initrace != ROLE_RANDOM) { - fully_specified_role = FALSE; - } - } - } - - int g = flags.initgend; - if (g == -1) { - g = rn2(ROLE_GENDERS); - fully_specified_role = FALSE; - } - while (!validgend(ro,ra,g)) { - g = rn2(ROLE_GENDERS); - } - gender[g]->setChecked(TRUE); - selectGender(g); - - int a = flags.initalign; - if (a == -1) { - a = rn2(ROLE_ALIGNS); - fully_specified_role = FALSE; - } - while (!validalign(ro,ra,a)) { - a = rn2(ROLE_ALIGNS); - } - alignment[a]->setChecked(TRUE); - selectAlignment(a); - - QListViewItem* li; - - li = role->firstChild(); - while (ro--) li=li->nextSibling(); - role->setSelected(li,TRUE); - - li = race->firstChild(); - while (ra--) li=li->nextSibling(); - race->setSelected(li,TRUE); - - flags.initrace = race->selectedItemNumber(); - flags.initrole = role->selectedItemNumber(); -} - - -void NetHackQtPlayerSelector::selectName(const QString& n) -{ - strncpy(g.plname,n.latin1(),sizeof(g.plname)-1); -} - -void NetHackQtPlayerSelector::selectRole() -{ - int ra = race->selectedItemNumber(); - int ro = role->selectedItemNumber(); - if (ra == -1 || ro == -1) return; - -#ifdef QT_CHOOSE_RACE_FIRST - selectRace(); -#else - QListViewItem* i=role->currentItem(); - QListViewItem* valid=0; - int j; - NhPSListViewItem* item; - item = (NhPSListViewItem*)role->firstChild(); - for (j=0; roles[j].name.m; j++) { - bool v = validrace(j,ra); - item->setSelectable(TRUE); - if ( !valid && v ) valid = item; - item=(NhPSListViewItem*)item->nextSibling(); - } - if ( !validrace(role->selectedItemNumber(),ra) ) - i = valid; - role->setSelected(i,TRUE); - item = (NhPSListViewItem*)role->firstChild(); - for (j=0; roles[j].name.m; j++) { - bool v = validrace(j,ra); - item->setSelectable(v); - item->repaint(); - item=(NhPSListViewItem*)item->nextSibling(); - } -#endif - - flags.initrole = role->selectedItemNumber(); - setupOthers(); -} - -void NetHackQtPlayerSelector::selectRace() -{ - int ra = race->selectedItemNumber(); - int ro = role->selectedItemNumber(); - if (ra == -1 || ro == -1) return; - -#ifndef QT_CHOOSE_RACE_FIRST - selectRole(); -#else - QListViewItem* i=race->currentItem(); - QListViewItem* valid=0; - int j; - NhPSListViewItem* item; - item = (NhPSListViewItem*)race->firstChild(); - for (j=0; races[j].noun; j++) { - bool v = validrace(ro,j); - item->setSelectable(TRUE); - if ( !valid && v ) valid = item; - item=(NhPSListViewItem*)item->nextSibling(); - } - if ( !validrace(ro,race->selectedItemNumber()) ) - i = valid; - race->setSelected(i,TRUE); - item = (NhPSListViewItem*)race->firstChild(); - for (j=0; races[j].noun; j++) { - bool v = validrace(ro,j); - item->setSelectable(v); - item->repaint(); - item=(NhPSListViewItem*)item->nextSibling(); - } -#endif - - flags.initrace = race->selectedItemNumber(); - setupOthers(); -} - -void NetHackQtPlayerSelector::setupOthers() -{ - int ro = role->selectedItemNumber(); - int ra = race->selectedItemNumber(); - int valid=-1; - int c=0; - int j; - for (j=0; jisChecked() ) - c = j; - gender[j]->setEnabled(v); - if ( valid<0 && v ) valid = j; - } - if ( !validgend(ro,ra,c) ) - c = valid; - int k; - for (k=0; ksetChecked(c==k); - } - selectGender(c); - - valid=-1; - for (j=0; jisChecked() ) - c = j; - alignment[j]->setEnabled(v); - if ( valid<0 && v ) valid = j; - } - if ( !validalign(ro,ra,c) ) - c = valid; - for (k=0; ksetChecked(c==k); - } - selectAlignment(c); -} - -void NetHackQtPlayerSelector::selectGender(int i) -{ - flags.initgend = i; -} - -void NetHackQtPlayerSelector::selectAlignment(int i) -{ - flags.initalign = i; -} - - -void NetHackQtPlayerSelector::done(int i) -{ - setResult(i); - qApp->exit_loop(); -} - -void NetHackQtPlayerSelector::Quit() -{ - done(R_Quit); - qApp->exit_loop(); -} - -void NetHackQtPlayerSelector::Random() -{ - done(R_Rand); - qApp->exit_loop(); -} - -bool NetHackQtPlayerSelector::Choose() -{ - if (fully_specified_role) return TRUE; - -#if defined(QWS) // probably safe with Qt 3, too (where show!=exec in QDialog). - if ( qt_compact_mode ) { - showMaximized(); - } else -#endif - { - adjustSize(); - centerOnMain(this); - } - - if ( exec() ) { - return TRUE; - } else { - return FALSE; - } -} - - -NetHackQtStringRequestor::NetHackQtStringRequestor(NetHackQtKeyBuffer& ks, const char* p, const char* cancelstr) : - QDialog(qApp->mainWidget(),"string",FALSE), - prompt(p,this,"prompt"), - input(this,"input"), - keysource(ks) -{ - cancel=new QPushButton(cancelstr,this); - connect(cancel,SIGNAL(clicked()),this,SLOT(reject())); - - okay=new QPushButton("Okay",this); - connect(okay,SIGNAL(clicked()),this,SLOT(accept())); - connect(&input,SIGNAL(returnPressed()),this,SLOT(accept())); - okay->setDefault(TRUE); - - setFocusPolicy(StrongFocus); -} - -void NetHackQtStringRequestor::resizeEvent(QResizeEvent*) -{ - const int margin=5; - const int gutter=5; - - int h=(height()-margin*2-gutter); - - if (strlen(prompt.text()) > 16) { - h/=3; - prompt.setGeometry(margin,margin,width()-margin*2,h); - input.setGeometry(width()*1/5,margin+h+gutter, - (width()-margin-2-gutter)*4/5,h); - } else { - h/=2; - prompt.setGeometry(margin,margin,(width()-margin*2-gutter)*2/5,h); - input.setGeometry(prompt.geometry().right()+gutter,margin, - (width()-margin-2-gutter)*3/5,h); - } - - cancel->setGeometry(margin,input.geometry().bottom()+gutter, - (width()-margin*2-gutter)/2,h); - okay->setGeometry(cancel->geometry().right()+gutter,cancel->geometry().y(), - cancel->width(),h); -} - -void NetHackQtStringRequestor::SetDefault(const char* d) -{ - input.setText(d); -} - -bool NetHackQtStringRequestor::Get(char* buffer, int maxchar) -{ - input.setMaxLength(maxchar); - if (strlen(prompt.text()) > 16) { - resize(fontMetrics().width(prompt.text())+50,fontMetrics().height()*6); - } else { - resize(fontMetrics().width(prompt.text())*2+50,fontMetrics().height()*4); - } - - centerOnMain(this); - show(); - input.setFocus(); - setResult(-1); - while (result()==-1) { - // Put keys in buffer (eg. from macros, from out-of-focus input) - if (!keysource.Empty()) { - while (!keysource.Empty()) { - int key=keysource.TopKey(); - int ascii=keysource.TopAscii(); - int state=keysource.GetState(); - if (ascii=='\r' || ascii=='\n') { - // CR or LF in buffer causes confirmation - strcpy(buffer,input.text()); - return TRUE; - } else if (ascii=='\033') { - return FALSE; - } else { - input.fakeEvent(key,ascii,state); - } - } - } - qApp->enter_loop(); - } - // XXX Get rid of extra keys, since we couldn't get focus! - while (!keysource.Empty()) keysource.GetKey(); - - if (result()) { - strcpy(buffer,input.text()); - return TRUE; - } else { - return FALSE; - } -} -void NetHackQtStringRequestor::done(int i) -{ - setResult(i); - qApp->exit_loop(); -} - - NetHackQtWindow::NetHackQtWindow() { } - NetHackQtWindow::~NetHackQtWindow() { } @@ -1442,3871 +120,17 @@ NetHackQtWindow::~NetHackQtWindow() // void NetHackQtWindow::Clear() { puts("unexpected Clear"); } void NetHackQtWindow::Display(bool block) { puts("unexpected Display"); } -bool NetHackQtWindow::Destroy() { return TRUE; } +bool NetHackQtWindow::Destroy() { return true; } void NetHackQtWindow::CursorTo(int x,int y) { puts("unexpected CursorTo"); } -void NetHackQtWindow::PutStr(int attr, const char* text) { puts("unexpected PutStr"); } +void NetHackQtWindow::PutStr(int attr, const QString& text) { puts("unexpected PutStr"); } void NetHackQtWindow::StartMenu() { puts("unexpected StartMenu"); } void NetHackQtWindow::AddMenu(int glyph, const ANY_P* identifier, char ch, char gch, int attr, - const char* str, bool presel) { puts("unexpected AddMenu"); } -void NetHackQtWindow::EndMenu(const char* prompt) { puts("unexpected EndMenu"); } + const QString& str, bool presel) { puts("unexpected AddMenu"); } +void NetHackQtWindow::EndMenu(const QString& prompt) { puts("unexpected EndMenu"); } int NetHackQtWindow::SelectMenu(int how, MENU_ITEM_P **menu_list) { puts("unexpected SelectMenu"); return 0; } void NetHackQtWindow::ClipAround(int x,int y) { puts("unexpected ClipAround"); } void NetHackQtWindow::PrintGlyph(int x,int y,int glyph) { puts("unexpected PrintGlyph"); } //void NetHackQtWindow::PrintGlyphCompose(int x,int y,int,int) { puts("unexpected PrintGlyphCompose"); } void NetHackQtWindow::UseRIP(int how, time_t when) { puts("unexpected UseRIP"); } - - -// XXX Hmmm... crash after saving bones file if Map window is -// XXX deleted. Strange bug somewhere. -bool NetHackQtMapWindow::Destroy() { return FALSE; } - -NetHackQtMapWindow::NetHackQtMapWindow(NetHackQtClickBuffer& click_sink) : - clicksink(click_sink), - change(10), - rogue_font(0) -{ - viewport.addChild(this); - - setBackgroundColor(black); - viewport.setBackgroundColor(black); - - pet_annotation = QPixmap(qt_compact_mode ? pet_mark_small_xpm : pet_mark_xpm); - - cursor.setX(0); - cursor.setY(0); - Clear(); - - connect(qt_settings,SIGNAL(tilesChanged()),this,SLOT(updateTiles())); - connect(&viewport, SIGNAL(contentsMoving(int,int)), this, - SLOT(moveMessages(int,int))); - - updateTiles(); - //setFocusPolicy(StrongFocus); -#ifdef SAFERHANGUP - QTimer* deadman = new QTimer(this); - connect(deadman, SIGNAL(timeout()), SLOT(timeout())); - deadman->start(2000); // deadman timer every 2 seconds -#endif -} - -#ifdef SAFERHANGUP -// The "deadman" timer is received by this slot -void NetHackQtMapWindow::timeout() {} -#endif - -void NetHackQtMapWindow::moveMessages(int x, int y) -{ - QRect u = messages_rect; - messages_rect.moveTopLeft(QPoint(x,y)); - u |= messages_rect; - update(u); -} - -void NetHackQtMapWindow::clearMessages() -{ - messages = ""; - update(messages_rect); - messages_rect = QRect(); -} - -void NetHackQtMapWindow::putMessage(int attr, const char* text) -{ - if ( !messages.isEmpty() ) - messages += "\n"; - messages += text; - QFontMetrics fm = fontMetrics(); - messages_rect = fm.boundingRect(viewport.contentsX(), viewport.contentsY(), - viewport.width(), 0, - WordBreak|AlignTop|AlignLeft|DontClip, - messages); - update(messages_rect); -} - -void NetHackQtMapWindow::updateTiles() -{ - NetHackQtGlyphs& glyphs = qt_settings->glyphs(); - int gw = glyphs.width(); - int gh = glyphs.height(); - // Be exactly the size we want to be - full map... - resize(COLNO*gw,ROWNO*gh); - - viewport.verticalScrollBar()->setSteps(gh,gh); - viewport.horizontalScrollBar()->setSteps(gw,gw); - /* - viewport.setMaximumSize( - gw*COLNO + viewport.verticalScrollBar()->width(), - gh*ROWNO + viewport.horizontalScrollBar()->height() - ); - */ - viewport.updateScrollBars(); - - change.clear(); - change.add(0,0,COLNO,ROWNO); - delete rogue_font; rogue_font = 0; - Display(FALSE); - - emit resized(); -} - -NetHackQtMapWindow::~NetHackQtMapWindow() -{ - // Remove from viewport porthole, since that is a destructible member. - viewport.removeChild(this); - recreate(0,0,QPoint(0,0)); -} - -QWidget* NetHackQtMapWindow::Widget() -{ - return &viewport; -} - -void NetHackQtMapWindow::Scroll(int dx, int dy) -{ - if (viewport.horizontalScrollBar()->isVisible()) { - while (dx<0) { viewport.horizontalScrollBar()->subtractPage(); dx++; } - while (dx>0) { viewport.horizontalScrollBar()->addPage(); dx--; } - } - if (viewport.verticalScrollBar()->isVisible()) { - while (dy<0) { viewport.verticalScrollBar()->subtractPage(); dy++; } - while (dy>0) { viewport.verticalScrollBar()->addPage(); dy--; } - } -} - -void NetHackQtMapWindow::Clear() -{ - unsigned short stone=cmap_to_glyph(S_stone); - - for (int j=0; jexit_loop(); -} - -void NetHackQtMapWindow::mousePressEvent(QMouseEvent* event) -{ - clicksink.Put( - event->pos().x()/qt_settings->glyphs().width(), - event->pos().y()/qt_settings->glyphs().height(), - event->button()==LeftButton ? CLICK_1 : CLICK_2 - ); - qApp->exit_loop(); -} - -#ifdef TEXTCOLOR -static -const QPen& nhcolor_to_pen(int c) -{ - static QPen* pen=0; - if ( !pen ) { - pen = new QPen[17]; - pen[0] = QColor(24,24,24); // "black" on black - pen[1] = Qt::red; - pen[2] = QColor(0,191,0); - pen[3] = QColor(127,127,0); - pen[4] = Qt::blue; - pen[5] = Qt::magenta; - pen[6] = Qt::cyan; - pen[7] = Qt::gray; - pen[8] = Qt::white; // no color - pen[9] = QColor(255,127,0); - pen[10] = QColor(127,255,127); - pen[11] = Qt::yellow; - pen[12] = QColor(127,127,255); - pen[13] = QColor(255,127,255); - pen[14] = QColor(127,255,255); - pen[15] = Qt::white; - pen[16] = QColor(24,24,24); // "black" on black - } - - return pen[c]; -} -#endif - -void NetHackQtMapWindow::paintEvent(QPaintEvent* event) -{ - QRect area=event->rect(); - QRect garea; - garea.setCoords( - QMAX(0,area.left()/qt_settings->glyphs().width()), - QMAX(0,area.top()/qt_settings->glyphs().height()), - QMIN(COLNO-1,area.right()/qt_settings->glyphs().width()), - QMIN(ROWNO-1,area.bottom()/qt_settings->glyphs().height()) - ); - - QPainter painter; - - painter.begin(this); - - if (Is_rogue_level(&u.uz) || iflags.wc_ascii_map) - { - // You enter a VERY primitive world! - - painter.setClipRect( event->rect() ); // (normally we don't clip) - painter.fillRect( event->rect(), black ); - - if ( !rogue_font ) { - // Find font... - int pts = 5; - QString fontfamily = iflags.wc_font_map - ? iflags.wc_font_map : "Courier"; - bool bold = FALSE; - if ( fontfamily.right(5).lower() == "-bold" ) { - fontfamily.truncate(fontfamily.length()-5); - bold = TRUE; - } - while ( pts < 32 ) { - QFont f(fontfamily, pts, bold ? QFont::Bold : QFont::Normal); - painter.setFont(QFont(fontfamily, pts)); - QFontMetrics fm = painter.fontMetrics(); - if ( fm.width("M") > qt_settings->glyphs().width() ) - break; - if ( fm.height() > qt_settings->glyphs().height() ) - break; - pts++; - } - rogue_font = new QFont(fontfamily,pts-1); - } - painter.setFont(*rogue_font); - - for (int j=garea.top(); j<=garea.bottom(); j++) { - for (int i=garea.left(); i<=garea.right(); i++) { - unsigned short g=Glyph(i,j); - uchar ch; - int color, och; - unsigned special; - - painter.setPen( green ); - /* map glyph to character and color */ - (void)mapglyph(g, &och, &color, &special, i, j, 0); - ch = (uchar)och; -#ifdef TEXTCOLOR - painter.setPen( nhcolor_to_pen(color) ); -#endif - painter.drawText( - i*qt_settings->glyphs().width(), - j*qt_settings->glyphs().height(), - qt_settings->glyphs().width(), - qt_settings->glyphs().height(), - AlignCenter, - (const char*)&ch, 1 - ); - if (glyph_is_pet(g) -#ifdef TEXTCOLOR - && ::iflags.hilite_pet -#endif - ) { - painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(), - j*qt_settings->glyphs().height()), - pet_annotation); - } - } - } - - painter.setFont(font()); - } else { - for (int j=garea.top(); j<=garea.bottom(); j++) { - for (int i=garea.left(); i<=garea.right(); i++) { - unsigned short g=Glyph(i,j); - qt_settings->glyphs().drawCell(painter, g, i, j); - if (glyph_is_pet(g) -#ifdef TEXTCOLOR - && ::iflags.hilite_pet -#endif - ) { - painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(), - j*qt_settings->glyphs().height()), - pet_annotation); - } - } - } - } - - if (garea.contains(cursor)) { - if (Is_rogue_level(&u.uz)) { -#ifdef TEXTCOLOR - painter.setPen( white ); -#else - painter.setPen( green ); // REALLY primitive -#endif - } else - { - int hp100; - if (u.mtimedone) { - hp100=u.mhmax ? u.mh*100/u.mhmax : 100; - } else { - hp100=u.uhpmax ? u.uhp*100/u.uhpmax : 100; - } - - if (hp100 > 75) painter.setPen(white); - else if (hp100 > 50) painter.setPen(yellow); - else if (hp100 > 25) painter.setPen(QColor(0xff,0xbf,0x00)); // orange - else if (hp100 > 10) painter.setPen(red); - else painter.setPen(magenta); - } - - painter.drawRect( - cursor.x()*qt_settings->glyphs().width(),cursor.y()*qt_settings->glyphs().height(), - qt_settings->glyphs().width(),qt_settings->glyphs().height()); - } - - if (area.intersects(messages_rect)) { - painter.setPen(black); - painter.drawText(viewport.contentsX()+1,viewport.contentsY()+1, - viewport.width(),0, WordBreak|AlignTop|AlignLeft|DontClip, messages); - painter.setPen(white); - painter.drawText(viewport.contentsX(),viewport.contentsY(), - viewport.width(),0, WordBreak|AlignTop|AlignLeft|DontClip, messages); - } - - painter.end(); -} - -void NetHackQtMapWindow::Display(bool block) -{ - for (int i=0; iglyphs().width(), - ch.y()*qt_settings->glyphs().height(), - ch.width()*qt_settings->glyphs().width(), - ch.height()*qt_settings->glyphs().height(), - FALSE - ); - } - - change.clear(); - - if (block) { - yn_function("Press a key when done viewing",0,'\0'); - } -} - -void NetHackQtMapWindow::CursorTo(int x,int y) -{ - Changed(cursor.x(),cursor.y()); - cursor.setX(x); - cursor.setY(y); - Changed(cursor.x(),cursor.y()); -} - -void NetHackQtMapWindow::PutStr(int attr, const char* text) -{ - puts("unexpected PutStr in MapWindow"); -} - -void NetHackQtMapWindow::ClipAround(int x,int y) -{ - // Convert to pixel of center of tile - x=x*qt_settings->glyphs().width()+qt_settings->glyphs().width()/2; - y=y*qt_settings->glyphs().height()+qt_settings->glyphs().height()/2; - - // Then ensure that pixel is visible - viewport.center(x,y,0.45,0.45); -} - -void NetHackQtMapWindow::PrintGlyph(int x,int y,int glyph) -{ - Glyph(x,y)=glyph; - Changed(x,y); -} - -//void NetHackQtMapWindow::PrintGlyphCompose(int x,int y,int glyph1, int glyph2) -//{ - // TODO: composed graphics -//} - -void NetHackQtMapWindow::Changed(int x, int y) -{ - change.add(x,y); -} - - -class NetHackQtScrollText : public QTableView { - struct UData { - UData() : text(0), attr(0) { } - ~UData() { if (text) free(text); } - - char* text; - int attr; - }; -public: - int uncleared; - - NetHackQtScrollText(int maxlength) : - uncleared(0), - maxitems(maxlength), - first(0), - count(0), - item_cycle(maxlength) - { - setNumCols(1); - setCellWidth(200); - setCellHeight(fontMetrics().height()); - setBackgroundColor(white); - setTableFlags(Tbl_vScrollBar - |Tbl_autoHScrollBar - |Tbl_clipCellPainting - |Tbl_smoothScrolling); - } - - ~NetHackQtScrollText() - { - } - - void Scroll(int dx, int dy) - { - setXOffset(xOffset()+dx*viewWidth()); - setYOffset(yOffset()+dy*viewHeight()); - } - - void insertItem(int attr, const char* text) - { - setTopCell(count); - - setAutoUpdate(FALSE); - - int i; - if (count cellWidth()) { - // Get wider. - setCellWidth(w); - } - setTopCell(count); - - setAutoUpdate(TRUE); - - if (viewHeight() >= totalHeight()-cellHeight()) { - repaint(); - } else { - scroll(0,cellHeight()); - } - } - - virtual void setFont(const QFont& font) - { - QTableView::setFont(font); - setCellHeight(fontMetrics().height()); - } - -protected: - - UData& item(int i) - { - return item_cycle[(first+i)%maxitems]; - } - - const int maxitems; - int first, count; - QArray item_cycle; - - int datumWidth(const UData& uitem) - { - if (uitem.text) { - int width=fontMetrics().width(uitem.text)+3; - if (uitem.attr) { - // XXX Too expensive to do properly, because - // XXX we have to set the font of the widget - // XXX just to get the font metrics information! - // XXX Could hold a fake widget for that - // XXX purpose, but this hack is less ugly. - width+=width/10; - } - return width; - } else { - return 0; - } - } - - virtual void setupPainter(QPainter *p) - { - // XXX This shouldn't be needed - we set the bg in the constructor. - p->setBackgroundColor(white); - } - - virtual void paintCell(QPainter *p, int row, int col) - { - bool sel=FALSE; - UData& uitem=item(row); - - if (!sel && row < count-uncleared) { - p->setPen(darkGray); - } else { - p->setPen(black); - } - - if (uitem.attr) { - // XXX only bold - QFont bold(font().family(),font().pointSize(),QFont::Bold); - p->setFont(bold); - } - - p->drawText(3, 0, cellWidth(), cellHeight(), - AlignLeft|AlignVCenter, uitem.text); - - if (uitem.attr) { - p->setFont(font()); - } - } -}; - -NetHackQtMessageWindow::NetHackQtMessageWindow() : - list(new NetHackQtScrollText(::iflags.msg_history)) -{ - ::iflags.window_inited = 1; - map = 0; - connect(qt_settings,SIGNAL(fontChanged()),this,SLOT(updateFont())); - updateFont(); -} - -NetHackQtMessageWindow::~NetHackQtMessageWindow() -{ - ::iflags.window_inited = 0; - delete list; -} - -QWidget* NetHackQtMessageWindow::Widget() { return list; } - -void NetHackQtMessageWindow::setMap(NetHackQtMapWindow* m) -{ - map = m; - updateFont(); -} - -void NetHackQtMessageWindow::updateFont() -{ - list->setFont(qt_settings->normalFont()); - if ( map ) - map->setFont(qt_settings->normalFont()); -} - -void NetHackQtMessageWindow::Scroll(int dx, int dy) -{ - list->Scroll(dx,dy); -} - -void NetHackQtMessageWindow::Clear() -{ - if ( map ) - map->clearMessages(); - if (list->uncleared) { - list->uncleared=0; - changed=TRUE; - Display(FALSE); - } -} - -void NetHackQtMessageWindow::Display(bool block) -{ - if (changed) { - list->repaint(); - changed=FALSE; - } -} - -void NetHackQtMessageWindow::PutStr(int attr, const char* text) -{ -#ifdef USER_SOUNDS - play_sound_for_message(text); -#endif - - changed=TRUE; - list->uncleared++; - list->insertItem(attr,text); - - // Force scrollbar to bottom - // XXX list->setTopItem(list->count()); - - if ( map ) - map->putMessage(attr, text); -} - - - -NetHackQtLabelledIcon::NetHackQtLabelledIcon(QWidget* parent, const char* l) : - QWidget(parent), - low_is_good(FALSE), - prev_value(-123), - turn_count(-1), - label(new QLabel(l,this)), - icon(0) -{ - initHighlight(); -} -NetHackQtLabelledIcon::NetHackQtLabelledIcon(QWidget* parent, const char* l, const QPixmap& i) : - QWidget(parent), - low_is_good(FALSE), - prev_value(-123), - turn_count(-1), - label(new QLabel(l,this)), - icon(new QLabel(this)) -{ - setIcon(i); - initHighlight(); -} -void NetHackQtLabelledIcon::initHighlight() -{ - const QPalette& pal=palette(); - const QColorGroup& pa=pal.normal(); - //QColorGroup good(white,darkGreen,pa.light(),pa.dark(),pa.mid(),white,pa.base()); - QColorGroup good(black,green,pa.light(),pa.dark(),pa.mid(),black,pa.base()); - QColorGroup bad(white,red,pa.light(),pa.dark(),pa.mid(),white,pa.base()); - hl_good=pal.copy(); - hl_good.setNormal(good); - hl_good.setActive(good); - hl_bad=pal.copy(); - hl_bad.setNormal(bad); - hl_bad.setActive(bad); -} - -void NetHackQtLabelledIcon::setLabel(const char* t, bool lower) -{ - if (!label) { - label=new QLabel(this); - label->setFont(font()); - resizeEvent(0); - } - if (0!=strcmp(label->text(),t)) { - label->setText(t); - highlight(lower==low_is_good ? hl_good : hl_bad); - } -} -void NetHackQtLabelledIcon::setLabel(const char* t, long v, long cv, const char* tail) -{ - char buf[BUFSZ]; - if (v==NoNum) { - Sprintf(buf,"%s%s",t,tail); - } else { - Sprintf(buf,"%s%ld%s",t,v,tail); - } - setLabel(buf,cvsetPixmap(i); - else { icon=new QLabel(this); icon->setPixmap(i); resizeEvent(0); } - icon->resize(i.width(),i.height()); -} -void NetHackQtLabelledIcon::setFont(const QFont& f) -{ - QWidget::setFont(f); - if (label) label->setFont(f); -} -void NetHackQtLabelledIcon::show() -{ -#if QT_VERSION >= 300 - if (isHidden()) -#else - if (!isVisible()) -#endif - highlight(hl_bad); - QWidget::show(); -} -void NetHackQtLabelledIcon::highlightWhenChanging() -{ - turn_count=0; -} -void NetHackQtLabelledIcon::lowIsGood() -{ - low_is_good=TRUE; -} -void NetHackQtLabelledIcon::dissipateHighlight() -{ - if (turn_count>0) { - turn_count--; - if (!turn_count) - unhighlight(); - } -} -void NetHackQtLabelledIcon::highlight(const QPalette& hl) -{ - if (label) { // Surely it is?! - if (turn_count>=0) { - label->setPalette(hl); - turn_count=4; - // `4' includes this turn, so dissipates after - // 3 more keypresses. - } else { - label->setPalette(palette()); - } - } -} -void NetHackQtLabelledIcon::unhighlight() -{ - if (label) { // Surely it is?! - label->setPalette(palette()); - } -} -void NetHackQtLabelledIcon::resizeEvent(QResizeEvent*) -{ - setAlignments(); - - //int labw=label ? label->fontMetrics().width(label->text()) : 0; - int labh=label ? label->fontMetrics().height() : 0; - int icoh=icon ? icon->height() : 0; - int h=icoh+labh; - int icoy=(h>height() ? height()-labh-icoh : height()/2-h/2); - int laby=icoy+icoh; - if (icon) { - icon->setGeometry(0,icoy,width(),icoh); - } - if (label) { - label->setGeometry(0,laby,width(),labh); - } -} - -void NetHackQtLabelledIcon::setAlignments() -{ - if (label) label->setAlignment(AlignHCenter|AlignVCenter); - if (icon) icon->setAlignment(AlignHCenter|AlignVCenter); -} - -static void -tryload(QPixmap& pm, const char* fn) -{ - if (!pm.load(fn)) { - QString msg; - msg.sprintf("Cannot load \"%s\"", fn); - QMessageBox::warning(0, "IO Error", msg); - } -} - -NetHackQtStatusWindow::NetHackQtStatusWindow() : - // Notes: - // Alignment needs -2 init value, because -1 is an alignment. - // Armor Class is an schar, so 256 is out of range. - // Blank value is 0 and should never change. - name(this,"(name)"), - dlevel(this,"(dlevel)"), - str(this,"STR"), - dex(this,"DEX"), - con(this,"CON"), - intel(this,"INT"), - wis(this,"WIS"), - cha(this,"CHA"), - gold(this,"Gold"), - hp(this,"Hit Points"), - power(this,"Power"), - ac(this,"Armour Class"), - level(this,"Level"), - exp(this,"Experience"), - align(this,"Alignment"), - time(this,"Time"), - score(this,"Score"), - hunger(this,""), - confused(this,"Confused"), - sick_fp(this,"Sick"), - sick_il(this,"Ill"), - blind(this,"Blind"), - stunned(this,"Stunned"), - hallu(this,"Hallu"), - encumber(this,""), - hline1(this), - hline2(this), - hline3(this), - first_set(TRUE) -{ - p_str = QPixmap(str_xpm); - p_str = QPixmap(str_xpm); - p_dex = QPixmap(dex_xpm); - p_con = QPixmap(cns_xpm); - p_int = QPixmap(int_xpm); - p_wis = QPixmap(wis_xpm); - p_cha = QPixmap(cha_xpm); - - p_chaotic = QPixmap(chaotic_xpm); - p_neutral = QPixmap(neutral_xpm); - p_lawful = QPixmap(lawful_xpm); - - p_satiated = QPixmap(satiated_xpm); - p_hungry = QPixmap(hungry_xpm); - - p_confused = QPixmap(confused_xpm); - p_sick_fp = QPixmap(sick_fp_xpm); - p_sick_il = QPixmap(sick_il_xpm); - p_blind = QPixmap(blind_xpm); - p_stunned = QPixmap(stunned_xpm); - p_hallu = QPixmap(hallu_xpm); - - p_encumber[0] = QPixmap(slt_enc_xpm); - p_encumber[1] = QPixmap(mod_enc_xpm); - p_encumber[2] = QPixmap(hvy_enc_xpm); - p_encumber[3] = QPixmap(ext_enc_xpm); - p_encumber[4] = QPixmap(ovr_enc_xpm); - - str.setIcon(p_str); - dex.setIcon(p_dex); - con.setIcon(p_con); - intel.setIcon(p_int); - wis.setIcon(p_wis); - cha.setIcon(p_cha); - - align.setIcon(p_neutral); - hunger.setIcon(p_hungry); - - confused.setIcon(p_confused); - sick_fp.setIcon(p_sick_fp); - sick_il.setIcon(p_sick_il); - blind.setIcon(p_blind); - stunned.setIcon(p_stunned); - hallu.setIcon(p_hallu); - - encumber.setIcon(p_encumber[0]); - - hline1.setFrameStyle(QFrame::HLine|QFrame::Sunken); - hline2.setFrameStyle(QFrame::HLine|QFrame::Sunken); - hline3.setFrameStyle(QFrame::HLine|QFrame::Sunken); - hline1.setLineWidth(1); - hline2.setLineWidth(1); - hline3.setLineWidth(1); - - connect(qt_settings,SIGNAL(fontChanged()),this,SLOT(doUpdate())); - doUpdate(); -} - -void NetHackQtStatusWindow::doUpdate() -{ - const QFont& large=qt_settings->largeFont(); - name.setFont(large); - dlevel.setFont(large); - - const QFont& normal=qt_settings->normalFont(); - str.setFont(normal); - dex.setFont(normal); - con.setFont(normal); - intel.setFont(normal); - wis.setFont(normal); - cha.setFont(normal); - gold.setFont(normal); - hp.setFont(normal); - power.setFont(normal); - ac.setFont(normal); - level.setFont(normal); - exp.setFont(normal); - align.setFont(normal); - time.setFont(normal); - score.setFont(normal); - hunger.setFont(normal); - confused.setFont(normal); - sick_fp.setFont(normal); - sick_il.setFont(normal); - blind.setFont(normal); - stunned.setFont(normal); - hallu.setFont(normal); - encumber.setFont(normal); - - updateStats(); -} - -QWidget* NetHackQtStatusWindow::Widget() { return this; } - -void NetHackQtStatusWindow::Clear() -{ -} -void NetHackQtStatusWindow::Display(bool block) -{ -} -void NetHackQtStatusWindow::CursorTo(int,int y) -{ - cursy=y; -} -void NetHackQtStatusWindow::PutStr(int attr, const char* text) -{ - // do a complete update when line 0 is done (as per X11 fancy status) - if (cursy==0) updateStats(); -} - -void NetHackQtStatusWindow::resizeEvent(QResizeEvent*) -{ - const float SP_name=0.13; // the (large) - const float SP_dlev=0.13; // Level 3 in The Dungeons of Doom (large) - const float SP_atr1=0.25; // STR DEX CON INT WIS CHA - const float SP_hln1=0.02; // --- - const float SP_atr2=0.09; // Au HP PW AC LVL EXP - const float SP_hln2=0.02; // --- - const float SP_time=0.09; // time score - const float SP_hln3=0.02; // --- - const float SP_stat=0.25; // Alignment, Poisoned, Hungry, Sick, etc. - - int h=height(); - int x=0,y=0; - - int iw; // Width of an item across line - int lh; // Height of a line of values - - lh=int(h*SP_name); - name.setGeometry(0,0,width(),lh); y+=lh; - lh=int(h*SP_dlev); - dlevel.setGeometry(0,y,width(),lh); y+=lh; - - lh=int(h*SP_hln1); - hline1.setGeometry(0,y,width(),lh); y+=lh; - - lh=int(h*SP_atr1); - iw=width()/6; - str.setGeometry(x,y,iw,lh); x+=iw; - dex.setGeometry(x,y,iw,lh); x+=iw; - con.setGeometry(x,y,iw,lh); x+=iw; - intel.setGeometry(x,y,iw,lh); x+=iw; - wis.setGeometry(x,y,iw,lh); x+=iw; - cha.setGeometry(x,y,iw,lh); x+=iw; - x=0; y+=lh; - - lh=int(h*SP_hln2); - hline2.setGeometry(0,y,width(),lh); y+=lh; - - lh=int(h*SP_atr2); - iw=width()/6; - gold.setGeometry(x,y,iw,lh); x+=iw; - hp.setGeometry(x,y,iw,lh); x+=iw; - power.setGeometry(x,y,iw,lh); x+=iw; - ac.setGeometry(x,y,iw,lh); x+=iw; - level.setGeometry(x,y,iw,lh); x+=iw; - exp.setGeometry(x,y,iw,lh); x+=iw; - x=0; y+=lh; - - lh=int(h*SP_hln3); - hline3.setGeometry(0,y,width(),lh); y+=lh; - - lh=int(h*SP_time); - iw=width()/3; x+=iw/2; - time.setGeometry(x,y,iw,lh); x+=iw; - score.setGeometry(x,y,iw,lh); x+=iw; - x=0; y+=lh; - - lh=int(h*SP_stat); - iw=width()/9; - align.setGeometry(x,y,iw,lh); x+=iw; - hunger.setGeometry(x,y,iw,lh); x+=iw; - confused.setGeometry(x,y,iw,lh); x+=iw; - sick_fp.setGeometry(x,y,iw,lh); x+=iw; - sick_il.setGeometry(x,y,iw,lh); x+=iw; - blind.setGeometry(x,y,iw,lh); x+=iw; - stunned.setGeometry(x,y,iw,lh); x+=iw; - hallu.setGeometry(x,y,iw,lh); x+=iw; - encumber.setGeometry(x,y,iw,lh); x+=iw; - x=0; y+=lh; -} - - -/* - * Set all widget values to a null string. This is used after all spacings - * have been calculated so that when the window is popped up we don't get all - * kinds of funny values being displayed. - */ -void NetHackQtStatusWindow::nullOut() -{ -} - -void NetHackQtStatusWindow::fadeHighlighting() -{ - name.dissipateHighlight(); - dlevel.dissipateHighlight(); - - str.dissipateHighlight(); - dex.dissipateHighlight(); - con.dissipateHighlight(); - intel.dissipateHighlight(); - wis.dissipateHighlight(); - cha.dissipateHighlight(); - - gold.dissipateHighlight(); - hp.dissipateHighlight(); - power.dissipateHighlight(); - ac.dissipateHighlight(); - level.dissipateHighlight(); - exp.dissipateHighlight(); - align.dissipateHighlight(); - - time.dissipateHighlight(); - score.dissipateHighlight(); - - hunger.dissipateHighlight(); - confused.dissipateHighlight(); - sick_fp.dissipateHighlight(); - sick_il.dissipateHighlight(); - blind.dissipateHighlight(); - stunned.dissipateHighlight(); - hallu.dissipateHighlight(); - encumber.dissipateHighlight(); -} - -/* - * Update the displayed status. The current code in botl.c updates - * two lines of information. Both lines are always updated one after - * the other. So only do our update when we update the second line. - * - * Information on the first line: - * name, attributes, alignment, score - * - * Information on the second line: - * dlvl, gold, hp, power, ac, {level & exp or HD **} - * status (hunger, conf, halu, stun, sick, blind), time, encumbrance - * - * [**] HD is shown instead of level and exp if mtimedone is non-zero. - */ -void NetHackQtStatusWindow::updateStats() -{ - if (!parentWidget()) return; - - char buf[BUFSZ]; - - if (cursy != 0) return; /* do a complete update when line 0 is done */ - - if (ACURR(A_STR) > 118) { - Sprintf(buf,"STR:%d",ACURR(A_STR)-100); - } else if (ACURR(A_STR)==118) { - Sprintf(buf,"STR:18/**"); - } else if(ACURR(A_STR) > 18) { - Sprintf(buf,"STR:18/%02d",ACURR(A_STR)-18); - } else { - Sprintf(buf,"STR:%d",ACURR(A_STR)); - } - str.setLabel(buf,NetHackQtLabelledIcon::NoNum,ACURR(A_STR)); - - dex.setLabel("DEX:",(long)ACURR(A_DEX)); - con.setLabel("CON:",(long)ACURR(A_CON)); - intel.setLabel("INT:",(long)ACURR(A_INT)); - wis.setLabel("WIS:",(long)ACURR(A_WIS)); - cha.setLabel("CHA:",(long)ACURR(A_CHA)); - const char* hung=hu_stat[u.uhs]; - if (hung[0]==' ') { - hunger.hide(); - } else { - hunger.setIcon(u.uhs ? p_hungry : p_satiated); - hunger.setLabel(hung); - hunger.show(); - } - if (Confusion) confused.show(); else confused.hide(); - if (Sick) { - if (u.usick_type & SICK_VOMITABLE) { - sick_fp.show(); - } else { - sick_fp.hide(); - } - if (u.usick_type & SICK_NONVOMITABLE) { - sick_il.show(); - } else { - sick_il.hide(); - } - } else { - sick_fp.hide(); - sick_il.hide(); - } - if (Blind) blind.show(); else blind.hide(); - if (Stunned) stunned.show(); else stunned.hide(); - if (Hallucination) hallu.show(); else hallu.hide(); - const char* enc=enc_stat[near_capacity()]; - if (enc[0]==' ' || !enc[0]) { - encumber.hide(); - } else { - encumber.setIcon(p_encumber[near_capacity()-1]); - encumber.setLabel(enc); - encumber.show(); - } - Strcpy(buf, g.plname); - if ('a' <= buf[0] && buf[0] <= 'z') buf[0] += 'A'-'a'; - Strcat(buf, " the "); - if (u.mtimedone) { - char mname[BUFSZ]; - int k = 0; - - Strcpy(mname, mons[u.umonnum].mname); - while(mname[k] != 0) { - if ((k == 0 || (k > 0 && mname[k-1] == ' ')) - && 'a' <= mname[k] && mname[k] <= 'z') - { - mname[k] += 'A' - 'a'; - } - k++; - } - Strcat(buf, mname); - } else { - Strcat(buf, rank_of(u.ulevel, pl_character[0], ::flags.female)); - } - name.setLabel(buf,NetHackQtLabelledIcon::NoNum,u.ulevel); - - if (describe_level(buf)) { - dlevel.setLabel(buf,(bool)TRUE); - } else { - Sprintf(buf, "%s, level ", dungeons[u.uz.dnum].dname); - dlevel.setLabel(buf,(long)depth(&u.uz)); - } - - gold.setLabel("Au:", money_cnt(g.invent)); - if (u.mtimedone) { - // You're a monster! - - Sprintf(buf, "/%d", u.mhmax); - hp.setLabel("HP:",u.mh > 0 ? u.mh : 0,buf); - level.setLabel("HD:",(long)mons[u.umonnum].mlevel); - } else { - // You're normal. - - Sprintf(buf, "/%d", u.uhpmax); - hp.setLabel("HP:",u.uhp > 0 ? u.uhp : 0,buf); - level.setLabel("Level:",(long)u.ulevel); - } - Sprintf(buf, "/%d", u.uenmax); - power.setLabel("Pow:",u.uen,buf); - ac.setLabel("AC:",(long)u.uac); - if (::flags.showexp) { - exp.setLabel("Exp:",(long)u.uexp); - } else - { - exp.setLabel(""); - } - if (u.ualign.type==A_CHAOTIC) { - align.setIcon(p_chaotic); - align.setLabel("Chaotic"); - } else if (u.ualign.type==A_NEUTRAL) { - align.setIcon(p_neutral); - align.setLabel("Neutral"); - } else { - align.setIcon(p_lawful); - align.setLabel("Lawful"); - } - - if (::flags.time) time.setLabel("Time:",(long)g.moves); - else time.setLabel(""); -#ifdef SCORE_ON_BOTL - if (::flags.showscore) { - score.setLabel("Score:",(long)botl_score()); - } else -#endif - { - score.setLabel(""); - } - - if (first_set) - { - first_set=FALSE; - - name.highlightWhenChanging(); - dlevel.highlightWhenChanging(); - - str.highlightWhenChanging(); - dex.highlightWhenChanging(); - con.highlightWhenChanging(); - intel.highlightWhenChanging(); - wis.highlightWhenChanging(); - cha.highlightWhenChanging(); - - gold.highlightWhenChanging(); - hp.highlightWhenChanging(); - power.highlightWhenChanging(); - ac.highlightWhenChanging(); ac.lowIsGood(); - level.highlightWhenChanging(); - exp.highlightWhenChanging(); - align.highlightWhenChanging(); - - //time.highlightWhenChanging(); - score.highlightWhenChanging(); - - hunger.highlightWhenChanging(); - confused.highlightWhenChanging(); - sick_fp.highlightWhenChanging(); - sick_il.highlightWhenChanging(); - blind.highlightWhenChanging(); - stunned.highlightWhenChanging(); - hallu.highlightWhenChanging(); - encumber.highlightWhenChanging(); - } -} - -/* - * Turn off hilighted status values after a certain amount of turns. - */ -void NetHackQtStatusWindow::checkTurnEvents() -{ -} - - - -NetHackQtMenuDialog::NetHackQtMenuDialog() : - QDialog(qApp->mainWidget(),0,FALSE) -{ -} - -void NetHackQtMenuDialog::resizeEvent(QResizeEvent*) -{ - emit Resized(); -} - -void NetHackQtMenuDialog::Accept() -{ - accept(); -} - -void NetHackQtMenuDialog::Reject() -{ - reject(); -} - -void NetHackQtMenuDialog::SetResult(int r) -{ - setResult(r); -} - -void NetHackQtMenuDialog::done(int i) -{ - setResult(i); - qApp->exit_loop(); -} - -// Table view columns: -// -// [pick-count] [accel] [glyph] [string] -// -// Maybe accel should be near string. We'll see. -// pick-count normally blank. -// double-clicking or click-on-count gives pop-up entry -// string is green when selected -// -NetHackQtMenuWindow::NetHackQtMenuWindow(NetHackQtKeyBuffer& ks) : - QTableView(), - keysource(ks), - dialog(new NetHackQtMenuDialog()), - prompt(0), - pressed(-1) -{ - setNumCols(4); - setCellHeight(QMAX(qt_settings->glyphs().height()+1,fontMetrics().height())); - setBackgroundColor(lightGray); - setFrameStyle(Panel|Sunken); - setLineWidth(2); - - ok=new QPushButton("Ok",dialog); - connect(ok,SIGNAL(clicked()),dialog,SLOT(accept())); - - cancel=new QPushButton("Cancel",dialog); - connect(cancel,SIGNAL(clicked()),dialog,SLOT(reject())); - - all=new QPushButton("All",dialog); - connect(all,SIGNAL(clicked()),this,SLOT(All())); - - none=new QPushButton("None",dialog); - connect(none,SIGNAL(clicked()),this,SLOT(ChooseNone())); - - invert=new QPushButton("Invert",dialog); - connect(invert,SIGNAL(clicked()),this,SLOT(Invert())); - - search=new QPushButton("Search",dialog); - connect(search,SIGNAL(clicked()),this,SLOT(Search())); - - QPoint pos(0,ok->height()); - recreate(dialog,0,pos); - prompt.recreate(dialog,0,pos); - - setBackgroundColor(lightGray); - - connect(dialog,SIGNAL(Resized()),this,SLOT(Layout())); - - setTableFlags(Tbl_autoHScrollBar|Tbl_autoVScrollBar - |Tbl_smoothScrolling|Tbl_clipCellPainting); - setFocusPolicy(StrongFocus); -} - -NetHackQtMenuWindow::~NetHackQtMenuWindow() -{ - // Remove from dialog before we destruct it - recreate(0,0,QPoint(0,0)); - delete dialog; -} - -void NetHackQtMenuWindow::focusInEvent(QFocusEvent *) -{ - // Don't repaint at all, since nothing is using the focus colour -} -void NetHackQtMenuWindow::focusOutEvent(QFocusEvent *) -{ - // Don't repaint at all, since nothing is using the focus colour -} - -int NetHackQtMenuWindow::cellWidth(int col) -{ - switch (col) { - case 0: - return fontMetrics().width("All "); - break; case 1: - return fontMetrics().width(" m "); - break; case 2: - return qt_settings->glyphs().width(); - break; case 3: - return str_width; - } - impossible("Extra column (#%d) in MenuWindow",col); - return 0; -} - -QWidget* NetHackQtMenuWindow::Widget() { return dialog; } - -void NetHackQtMenuWindow::StartMenu() -{ - setNumRows((itemcount=0)); - str_width=200; - str_fixed=FALSE; - next_accel=0; - has_glyphs=FALSE; -} - -NetHackQtMenuWindow::MenuItem::MenuItem() : - str(0) -{ -} - -NetHackQtMenuWindow::MenuItem::~MenuItem() -{ - if (str) free((void*)str); -} - -#define STR_MARGIN 4 - -void NetHackQtMenuWindow::AddMenu(int glyph, const ANY_P* identifier, - char ch, char gch, int attr, const char* str, bool presel) -{ - if (!ch && identifier->a_void!=0) { - // Supply a keyboard accelerator. Limited supply. - static char accel[]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - if (accel[next_accel]) { - ch=accel[next_accel++]; - } - } - - if ((int)item.size() < itemcount+1) { - item.resize(itemcount*4+10); - } - item[itemcount].glyph=glyph; - item[itemcount].identifier=*identifier; - item[itemcount].ch=ch; - item[itemcount].attr=attr; - item[itemcount].str=strdup(str); - item[itemcount].selected=presel; - item[itemcount].count=-1; - ++itemcount; - - str_fixed=str_fixed || strstr(str," "); - if (glyph!=NO_GLYPH) has_glyphs=TRUE; -} -void NetHackQtMenuWindow::EndMenu(const char* p) -{ - prompt.setText(p ? p : ""); -} -void NetHackQtMenuWindow::Layout() -{ - int butw=totalWidth()/6; // 6 buttons - int buth=fontMetrics().height()+8; // 8 for spacing & mitres - int prompth=(prompt.text().isNull() ? 0 : buth); - - prompt.setGeometry(6,buth,dialog->width()-6,prompth); - int h=dialog->height()-buth-prompth; - setGeometry(0,buth+prompth, dialog->width(), h); - - // Below, we take care to use up full width - int x=0; - ok->setGeometry(x,0,butw,buth); x+=butw; butw=(dialog->width()-x)/5; - cancel->setGeometry(x,0,butw,buth); x+=butw; butw=(dialog->width()-x)/4; - all->setGeometry(x,0,butw,buth); x+=butw; butw=(dialog->width()-x)/3; - none->setGeometry(x,0,butw,buth); x+=butw; butw=(dialog->width()-x)/2; - invert->setGeometry(x,0,butw,buth); x+=butw; butw=(dialog->width()-x)/1; - search->setGeometry(x,0,butw,buth); -} - -int NetHackQtMenuWindow::SelectMenu(int h, MENU_ITEM_P **menu_list) -{ - setFont(str_fixed ? - qt_settings->normalFixedFont() : qt_settings->normalFont()); - - for (int i=0; iglyphs().height()+1,fontMetrics().height())); - setNumRows(itemcount); - - int buth=fontMetrics().height()+8; // 8 for spacing & mitres - - how=h; - - ok->setEnabled(how!=PICK_ONE);ok->setDefault(how!=PICK_ONE); - cancel->setEnabled(TRUE); - all->setEnabled(how==PICK_ANY); - none->setEnabled(how==PICK_ANY); - invert->setEnabled(how==PICK_ANY); - search->setEnabled(how!=PICK_NONE); - - dialog->SetResult(-1); - - // 20 allows for scrollbar or spacing - // 4 for frame borders - int mh = QApplication::desktop()->height()*3/5; - if ( qt_compact_mode && totalHeight() > mh ) { - // big, so make it fill - dialog->showMaximized(); - } else { - dialog->resize(totalWidth()+20, - QMIN(totalHeight(), mh)+buth+4+(prompt.text().isNull() ? 0 : buth)); - if ( dialog->width() > QApplication::desktop()->width() ) - dialog->resize(QApplication::desktop()->width(),dialog->height()+16); - centerOnMain(dialog); - dialog->show(); - } - - setFocus(); - while (dialog->result()<0) { - // changed the defaults below to the values in wintype.h 000119 - azy - if (!keysource.Empty()) { - char k=keysource.GetAscii(); - k=map_menu_cmd(k); /* added 000119 - azy */ - if (k=='\033') - dialog->Reject(); - else if (k=='\r' || k=='\n' || k==' ') - dialog->Accept(); - else if (k==MENU_SEARCH) - Search(); - else if (k==MENU_SELECT_ALL) - All(); - else if (k==MENU_INVERT_ALL) - Invert(); - else if (k==MENU_UNSELECT_ALL) - ChooseNone(); - else { - for (int i=0; iresult()<0) - qApp->enter_loop(); - } - //if ( (nhid != WIN_INVEN || !iflags.perm_invent) ) // doesn't work yet - { - dialog->hide(); - } - int result=dialog->result(); - - // Consume ^M (which QDialog steals for default button) - while (!keysource.Empty() && - (keysource.TopAscii()=='\n' || keysource.TopAscii()=='\r')) - keysource.GetAscii(); - - *menu_list=0; - if (how==PICK_NONE) - return result==0 ? -1 : 0; - - if (result>0) { - if (how==PICK_ONE) { - int i; - for (i=0; istate()&ShiftButton)) { - if (event->key()==Key_Prior) { - setYOffset(yOffset()-viewHeight()); - } else if (event->key()==Key_Next) { - setYOffset(yOffset()+viewHeight()); - } else { - event->ignore(); - } - } else { - event->ignore(); - } -} - -void NetHackQtMenuWindow::All() -{ - for (int i=0; iAccept(); - } - } -} - - -void NetHackQtMenuWindow::paintCell(QPainter* painter, int row, int col) -{ - // [pick-count] [accel] [glyph] [string] - - MenuItem& i = item[row]; - - painter->setPen(black); - painter->setFont(font()); - - if (i.selected) { - painter->setPen(darkGreen); - } - - switch (col) { - case 0: - if ( i.ch || i.attr!=ATR_INVERSE ) { - QString text; - if ( i.selected && i.count == -1 ) { - if ( i.str[0]>='0' && i.str[0]<='9' ) - text = "All"; - else - text = "*"; - } else if ( i.count<0 ) { - text = "-"; - } else { - text.sprintf("%d",i.count); - } - painter->drawText(0,0,cellWidth(col),cellHeight(), - AlignHCenter|AlignVCenter,text); - } - break; case 1: - if ((signed char)i.ch >= 0) { - char text[2]={i.ch,0}; - painter->drawText(0,0,cellWidth(col),cellHeight(), - AlignHCenter|AlignVCenter,text); - } - break; case 2: - if (i.glyph!=NO_GLYPH) { - // Centered in height - int y=(cellHeight()-qt_settings->glyphs().height())/2; - if (y<0) y=0; - qt_settings->glyphs().drawGlyph(*painter, i.glyph, 0, y); - } - break; case 3: - // XXX should qt_settings have ALL the various fonts - QFont newfont=font(); - - if (i.attr) { - switch(i.attr) { - case ATR_ULINE: - newfont.setUnderline(TRUE); - break; case ATR_BOLD: - painter->setPen(red); - break; case ATR_BLINK: - newfont.setItalic(TRUE); - break; case ATR_INVERSE: - newfont=qt_settings->largeFont(); - newfont.setWeight(QFont::Bold); - - if (i.selected) { - painter->setPen(blue); - } else { - painter->setPen(darkBlue); - } - } - } - painter->setFont(newfont); - - painter->drawText(STR_MARGIN,0,cellWidth(col),cellHeight(), - AlignLeft|AlignVCenter,i.str); - } -} - -void NetHackQtMenuWindow::mousePressEvent(QMouseEvent* event) -{ - int col=findCol(event->pos().x()); - int row=findRow(event->pos().y()); - - if (col<0 || row<0 || !item[row].Selectable()) return; - - if (how!=PICK_NONE) { - if (col==0) { - // Changing count. - NetHackQtStringRequestor requestor(keysource,"Count:"); - char buf[BUFSZ]; - - if (item[row].count>0) - Sprintf(buf,"%d", item[row].count); - else - Strcpy(buf, ""); - - requestor.SetDefault(buf); - if (requestor.Get(buf)) { - item[row].count=atoi(buf); - if (item[row].count==0) { - item[row].count=-1; - if (item[row].selected) ToggleSelect(row); - } else { - if (!item[row].selected) ToggleSelect(row); - } - updateCell(row,0); - } - } else { - pressed=row; - was_sel=item[row].selected; - ToggleSelect(row); - updateCell(row,0); - } - } -} - -void NetHackQtMenuWindow::mouseReleaseEvent(QMouseEvent* event) -{ - if (pressed>=0) { - int p=pressed; - pressed=-1; - updateCell(p,3); - } -} - -void NetHackQtMenuWindow::mouseMoveEvent(QMouseEvent* event) -{ - if (pressed>=0) { - int col=findCol(event->pos().x()); - int row=findRow(event->pos().y()); - - if (row>=0 && col>=0) { - if (pressed!=row) { - // reset to initial state - if (item[pressed].selected!=was_sel) - ToggleSelect(pressed); - } else { - // reset to new state - if (item[pressed].selected==was_sel) - ToggleSelect(pressed); - } - } - } -} - - -class NetHackQtTextListBox : public QListBox { -public: - NetHackQtTextListBox(QWidget* parent) : QListBox(parent) { } - - int TotalWidth() - { - doLayout(); - return contentsWidth(); - } - int TotalHeight() - { - doLayout(); - return contentsHeight(); - } - - virtual void setFont(const QFont &font) - { - QListBox::setFont(font); - } - void keyPressEvent(QKeyEvent* e) - { - QListBox::keyPressEvent(e); - } -}; - - -QPixmap* NetHackQtRIP::pixmap=0; - -NetHackQtRIP::NetHackQtRIP(QWidget* parent) : - QWidget(parent) -{ - if (!pixmap) { - pixmap=new QPixmap; - tryload(*pixmap, "rip.xpm"); - } - riplines=0; - resize(pixmap->width(),pixmap->height()); - setFont(QFont("times",12)); // XXX may need to be configurable -} - -void NetHackQtRIP::setLines(char** l, int n) -{ - line=l; - riplines=n; -} - -QSize NetHackQtRIP::sizeHint() const -{ - return pixmap->size(); -} - -void NetHackQtRIP::paintEvent(QPaintEvent* event) -{ - if ( riplines ) { - int pix_x=(width()-pixmap->width())/2; - int pix_y=(height()-pixmap->height())/2; - - // XXX positions based on RIP image - int rip_text_x=pix_x+156; - int rip_text_y=pix_y+67; - int rip_text_h=94/riplines; - - QPainter painter; - painter.begin(this); - painter.drawPixmap(pix_x,pix_y,*pixmap); - for (int i=0; imainWidget(),0,FALSE), - keysource(ks), - use_rip(FALSE), - str_fixed(FALSE), - ok("Dismiss",this), - search("Search",this), - lines(new NetHackQtTextListBox(this)), - rip(this) -{ - ok.setDefault(TRUE); - connect(&ok,SIGNAL(clicked()),this,SLOT(accept())); - connect(&search,SIGNAL(clicked()),this,SLOT(Search())); - connect(qt_settings,SIGNAL(fontChanged()),this,SLOT(doUpdate())); - - QVBoxLayout* vb = new QVBoxLayout(this); - vb->addWidget(&rip); - QHBoxLayout* hb = new QHBoxLayout(vb); - hb->addWidget(&ok); - hb->addWidget(&search); - vb->addWidget(lines); -} - -void NetHackQtTextWindow::doUpdate() -{ - update(); -} - - -NetHackQtTextWindow::~NetHackQtTextWindow() -{ - -} - -QWidget* NetHackQtTextWindow::Widget() -{ - return this; -} - -bool NetHackQtTextWindow::Destroy() -{ - return !isVisible(); -} - -void NetHackQtTextWindow::UseRIP(int how, time_t when) -{ -// Code from X11 windowport -#define STONE_LINE_LEN 16 /* # chars that fit on one line */ -#define NAME_LINE 0 /* line # for player name */ -#define GOLD_LINE 1 /* line # for amount of gold */ -#define DEATH_LINE 2 /* line # for death description */ -#define YEAR_LINE 6 /* line # for year */ - -static char** rip_line=0; - if (!rip_line) { - rip_line=new char*[YEAR_LINE+1]; - for (int i=0; i STONE_LINE_LEN) { - for(i = STONE_LINE_LEN; - ((i0 > STONE_LINE_LEN) && i); i--) - if(dpx[i] == ' ') i0 = i; - if(!i) i0 = STONE_LINE_LEN; - } - tmpchar = dpx[i0]; - dpx[i0] = 0; - strcpy(rip_line[line], dpx); - if (tmpchar != ' ') { - dpx[i0] = tmpchar; - dpx= &dpx[i0]; - } else dpx= &dpx[i0+1]; - } - - /* Put year on stone */ - year = yyyymmdd(when) / 10000L; - Sprintf(rip_line[YEAR_LINE], "%4ld", year); - - rip.setLines(rip_line,YEAR_LINE+1); - - use_rip=TRUE; -} - -void NetHackQtTextWindow::Clear() -{ - lines->clear(); - use_rip=FALSE; - str_fixed=FALSE; -} - -void NetHackQtTextWindow::Display(bool block) -{ - if (str_fixed) { - lines->setFont(qt_settings->normalFixedFont()); - } else { - lines->setFont(qt_settings->normalFont()); - } - - int h=0; - if (use_rip) { - h+=rip.height(); - ok.hide(); - search.hide(); - rip.show(); - } else { - h+=ok.height()*2; - ok.show(); - search.show(); - rip.hide(); - } - int mh = QApplication::desktop()->height()*3/5; - if ( qt_compact_mode && (lines->TotalHeight() > mh || use_rip) ) { - // big, so make it fill - showMaximized(); - } else { - resize(QMAX(use_rip ? rip.width() : 200, - lines->TotalWidth()+24), - QMIN(mh, lines->TotalHeight()+h)); - centerOnMain(this); - show(); - } - if (block) { - setResult(-1); - while (result()==-1) { - qApp->enter_loop(); - if (result()==-1 && !keysource.Empty()) { - char k=keysource.GetAscii(); - if (k=='\033' || k==' ' || k=='\r' || k=='\n') { - accept(); - } else if (k=='/') { - Search(); - } - } - } - } -} - -void NetHackQtTextWindow::PutStr(int attr, const char* text) -{ - str_fixed=str_fixed || strstr(text," "); - lines->insertItem(text); -} - -void NetHackQtTextWindow::done(int i) -{ - setResult(i+1000); - hide(); - qApp->exit_loop(); -} - -void NetHackQtTextWindow::keyPressEvent(QKeyEvent* e) -{ - if ( e->ascii() != '\r' && e->ascii() != '\n' && e->ascii() != '\033' ) - lines->keyPressEvent(e); - else - QDialog::keyPressEvent(e); -} - -void NetHackQtTextWindow::Search() -{ - NetHackQtStringRequestor requestor(keysource,"Search for:"); - static char line[256]=""; - requestor.SetDefault(line); - if (requestor.Get(line)) { - int current=lines->currentItem(); - for (uint i=1; icount(); i++) { - int lnum=(i+current)%lines->count(); - QString str=lines->text(lnum); - if (str.contains(line)) { - lines->setCurrentItem(lnum); - lines->centerCurrentItem(); - return; - } - } - lines->setCurrentItem(-1); - } -} - - -NetHackQtDelay::NetHackQtDelay(int ms) : - msec(ms) -{ -} - -void NetHackQtDelay::wait() -{ - startTimer(msec); - qApp->enter_loop(); -} - -void NetHackQtDelay::timerEvent(QTimerEvent* timer) -{ - qApp->exit_loop(); - killTimers(); -} - -NetHackQtInvUsageWindow::NetHackQtInvUsageWindow(QWidget* parent) : - QWidget(parent) -{ -} - -void NetHackQtInvUsageWindow::drawWorn(QPainter& painter, obj* nhobj, int x, int y, bool canbe) -{ - short int glyph; - if (nhobj) - glyph=obj_to_glyph(nhobj, rn2_on_display_rng); - else if (canbe) - glyph=cmap_to_glyph(S_room); - else - glyph=cmap_to_glyph(S_stone); - - qt_settings->glyphs().drawCell(painter,glyph,x,y); -} - -void NetHackQtInvUsageWindow::paintEvent(QPaintEvent*) -{ - // 012 - // - //0 WhB - //1 s"w - //2 gCg - //3 =A= - //4 T - //5 S - - QPainter painter; - painter.begin(this); - - // Blanks - drawWorn(painter,0,0,4,FALSE); - drawWorn(painter,0,0,5,FALSE); - drawWorn(painter,0,2,4,FALSE); - drawWorn(painter,0,2,5,FALSE); - - drawWorn(painter,uarm,1,3); // Armour - drawWorn(painter,uarmc,1,2); // Cloak - drawWorn(painter,uarmh,1,0); // Helmet - drawWorn(painter,uarms,0,1); // Shield - drawWorn(painter,uarmg,0,2); // Gloves - repeated - drawWorn(painter,uarmg,2,2); // Gloves - repeated - drawWorn(painter,uarmf,1,5); // Shoes (feet) - drawWorn(painter,uarmu,1,4); // Undershirt - drawWorn(painter,uleft,0,3); // RingL - drawWorn(painter,uright,2,3); // RingR - - drawWorn(painter,uwep,2,1); // Weapon - drawWorn(painter,uswapwep,0,0); // Secondary weapon - drawWorn(painter,uamul,1,1); // Amulet - drawWorn(painter,ublindf,2,0); // Blindfold - - painter.end(); -} - -class SmallToolButton : public QToolButton { -public: - SmallToolButton(const QPixmap & pm, const QString &textLabel, - const QString& grouptext, - QObject * receiver, const char* slot, - QToolBar * parent) : - QToolButton(pm, textLabel, -#if QT_VERSION < 210 - QString::null, -#else - grouptext, -#endif - receiver, slot, parent) - { - } - - QSize sizeHint() const - { - // get just a couple more pixels for the map - return QToolButton::sizeHint()-QSize(0,2); - } -}; - - -NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) : - message(0), map(0), status(0), invusage(0), - keysink(ks), dirkey(0) -{ - QToolBar* toolbar = new QToolBar(this); -#if QT_VERSION >= 210 - setToolBarsMovable(FALSE); - toolbar->setHorizontalStretchable(TRUE); - toolbar->setVerticalStretchable(TRUE); -#endif - addToolBar(toolbar); - menubar = menuBar(); - - setCaption("Qt NetHack"); - if ( qt_compact_mode ) - setIcon(QPixmap(nh_icon_small)); - else - setIcon(QPixmap(nh_icon)); - - QPopupMenu* game=new QPopupMenu; - QPopupMenu* apparel=new QPopupMenu; - QPopupMenu* act1=new QPopupMenu; - QPopupMenu* act2 = qt_compact_mode ? new QPopupMenu : act1; - QPopupMenu* magic=new QPopupMenu; - QPopupMenu* info=new QPopupMenu; - - QPopupMenu *help; - -#ifdef KDE - help = kapp->getHelpMenu( TRUE, "" ); - help->insertSeparator(); -#else - help = qt_compact_mode ? info : new QPopupMenu; -#endif - - enum { OnDesktop=1, OnHandhelds=2 }; - struct Macro { - QPopupMenu* menu; - const char* name; - const char* action; - int flags; - } item[] = { - { game, 0, 0, 3}, - { game, "Version\tv", "v", 3}, - { game, "Compilation\tAlt+V", "\366", 3}, - { game, "History\tShift+V", "V", 3}, - { game, "Redraw\tCtrl+R", "\022", 0}, // useless - { game, "Options\tShift+O", "O", 3}, - { game, "Explore mode\tShift+X", "X", 3}, - { game, 0, 0, 3}, - { game, "Save\tSy", "Sy", 3}, - { game, "Quit\tAlt+Q", "\361", 3}, - - { apparel, "Apparel off\tShift+A", "A", 2}, - { apparel, "Remove many\tShift+A", "A", 1}, - { apparel, 0, 0, 3}, - { apparel, "Wield weapon\tw", "w", 3}, - { apparel, "Exchange weapons\tx", "x", 3}, - { apparel, "Two weapon combat\t#two", "#tw", 3}, - { apparel, "Load quiver\tShift+Q", "Q", 3}, - { apparel, 0, 0, 3}, - { apparel, "Wear armour\tShift+W", "W", 3}, - { apparel, "Take off armour\tShift+T", "T", 3}, - { apparel, 0, 0, 3}, - { apparel, "Put on non-armour\tShift+P", "P", 3}, - { apparel, "Remove non-armour\tShift+R", "R", 3}, - - { act1, "Again\tCtrl+A", "\001", 2}, - { act1, 0, 0, 3}, - { act1, "Apply\ta?", "a?", 3}, - { act1, "Chat\tAlt+C", "\343", 3}, - { act1, "Close door\tc", "c", 3}, - { act1, "Down\t>", ">", 3}, - { act1, "Drop many\tShift+D", "D", 2}, - { act1, "Drop\td?", "d?", 2}, - { act1, "Eat\te?", "e?", 2}, - { act1, "Engrave\tShift+E", "E", 3}, - { act1, "Fight\tShift+F", "F", 3}, - { act1, "Fire from quiver\tf", "f", 2}, - { act1, "Force\tAlt+F", "\346", 3}, - { act1, "Get\t,", ",", 2}, - { act1, "Jump\tAlt+J", "\352", 3}, - { act2, "Kick\tCtrl+D", "\004", 2}, - { act2, "Loot\tAlt+L", "\354", 3}, - { act2, "Open door\to", "o", 3}, - { act2, "Pay\tp", "p", 3}, - { act2, "Rest\t.", ".", 2}, - { act2, "Ride\t#ri", "#ri", 3}, - { act2, "Search\ts", "s", 3}, - { act2, "Sit\tAlt+S", "\363", 3}, - { act2, "Throw\tt", "t", 2}, - { act2, "Untrap\t#u", "#u", 3}, - { act2, "Up\t<", "<", 3}, - { act2, "Wipe face\tAlt+W", "\367", 3}, - - { magic, "Quaff potion\tq?", "q?", 3}, - { magic, "Read scroll/book\tr?", "r?", 3}, - { magic, "Zap wand\tz?", "z?", 3}, - { magic, "Zap spell\tShift+Z", "Z", 3}, - { magic, "Dip\tAlt+D", "\344", 3}, - { magic, "Rub\tAlt+R", "\362", 3}, - { magic, "Invoke\tAlt+I", "\351", 3}, - { magic, 0, 0, 3}, - { magic, "Offer\tAlt+O", "\357", 3}, - { magic, "Pray\tAlt+P", "\360", 3}, - { magic, 0, 0, 3}, - { magic, "Teleport\tCtrl+T", "\024", 3}, - { magic, "Monster action\tAlt+M", "\355", 3}, - { magic, "Turn undead\tAlt+T", "\364", 3}, - - { help, "Help\t?", "?", 3}, - { help, 0, 0, 3}, - { help, "What is here\t:", ":", 3}, - { help, "What is there\t;", ";", 3}, - { help, "What is...\t/y", "/y", 2}, - { help, 0, 0, 1}, - - { info, "Inventory\ti", "i", 3}, -#ifdef SLASHEM - { info, "Angbandish inventory\t*", "*", 3}, -#endif - { info, "Conduct\t#co", "#co", 3}, - { info, "Discoveries\t\\", "\\", 3}, - { info, "List/reorder spells\t+", "+", 3}, - { info, "Adjust letters\tAlt+A", "\341", 2}, - { info, 0, 0, 3}, - { info, "Name object\tAlt+N", "\356y?", 3}, - { info, "Name object type\tAlt+N", "\356n?", 3}, - { info, "Name creature\tShift+C", "C", 3}, - { info, 0, 0, 3}, - { info, "Qualifications\tAlt+E", "\345", 3}, - - { 0, 0, 0, 0 } - }; - - int i; - int count=0; - for (i=0; item[i].menu; i++) - if (item[i].name) count++; - - macro=new const char* [count]; - - game->insertItem("Qt settings...",1000); - help->insertItem("About Qt NetHack...",2000); - //help->insertItem("NetHack Guidebook...",3000); - help->insertSeparator(); - - count=0; - for (i=0; item[i].menu; i++) { - if ( item[i].flags & (qt_compact_mode ? 1 : 2) ) { - if (item[i].name) { - QString name = item[i].name; - if ( qt_compact_mode ) // accelerators aren't - name.replace(QRegExp("\t.*"),""); - item[i].menu->insertItem(name,count); - macro[count++]=item[i].action; - } else { - item[i].menu->insertSeparator(); - } - } - } - - menubar->insertItem("Game",game); - menubar->insertItem("Gear",apparel); - - if ( qt_compact_mode ) { - menubar->insertItem("A-J",act1); - menubar->insertItem("K-Z",act2); - menubar->insertItem("Magic",magic); - menubar->insertItem(QPixmap(info_xpm),info); - menubar->insertItem(QPixmap(map_xpm), this, SLOT(raiseMap())); - menubar->insertItem(QPixmap(msg_xpm), this, SLOT(raiseMessages())); - menubar->insertItem(QPixmap(stat_xpm), this, SLOT(raiseStatus())); - } else { - menubar->insertItem("Action",act1); - menubar->insertItem("Magic",magic); - menubar->insertItem("Info",info); - menubar->insertSeparator(); - menubar->insertItem("Help",help); - } - - QSignalMapper* sm = new QSignalMapper(this); - connect(sm, SIGNAL(mapped(const QString&)), this, SLOT(doKeys(const QString&))); - QToolButton* tb; - tb = new SmallToolButton( QPixmap(again_xpm),"Again","Action", sm, SLOT(map()), toolbar ); - sm->setMapping(tb, "\001" ); - tb = new SmallToolButton( QPixmap(get_xpm),"Get","Action", sm, SLOT(map()), toolbar ); - sm->setMapping(tb, "," ); - tb = new SmallToolButton( QPixmap(kick_xpm),"Kick","Action", sm, SLOT(map()), toolbar ); - sm->setMapping(tb, "\004" ); - tb = new SmallToolButton( QPixmap(throw_xpm),"Throw","Action", sm, SLOT(map()), toolbar ); - sm->setMapping(tb, "t" ); - tb = new SmallToolButton( QPixmap(fire_xpm),"Fire","Action", sm, SLOT(map()), toolbar ); - sm->setMapping(tb, "f" ); - tb = new SmallToolButton( QPixmap(drop_xpm),"Drop","Action", sm, SLOT(map()), toolbar ); - sm->setMapping(tb, "D" ); - tb = new SmallToolButton( QPixmap(eat_xpm),"Eat","Action", sm, SLOT(map()), toolbar ); - sm->setMapping(tb, "e" ); - tb = new SmallToolButton( QPixmap(rest_xpm),"Rest","Action", sm, SLOT(map()), toolbar ); - sm->setMapping(tb, "." ); - tb = new SmallToolButton( QPixmap(cast_a_xpm),"Cast A","Magic", sm, SLOT(map()), toolbar ); - sm->setMapping(tb, "Za" ); - tb = new SmallToolButton( QPixmap(cast_b_xpm),"Cast B","Magic", sm, SLOT(map()), toolbar ); - sm->setMapping(tb, "Zb" ); - tb = new SmallToolButton( QPixmap(cast_c_xpm),"Cast C","Magic", sm, SLOT(map()), toolbar ); - sm->setMapping(tb, "Zc" ); - if ( !qt_compact_mode ) { - QWidget* filler = new QWidget(toolbar); - filler->setBackgroundMode(PaletteButton); - toolbar->setStretchableWidget(filler); - } - - connect(menubar,SIGNAL(activated(int)),this,SLOT(doMenuItem(int))); - -#ifdef KDE - setMenu (menubar); -#endif - - int x=0,y=0; - int w=QApplication::desktop()->width()-10; // XXX arbitrary extra space for frame - int h=QApplication::desktop()->height()-50; - - int maxwn; - int maxhn; - if (qt_tilewidth != NULL) { - maxwn = atoi(qt_tilewidth) * COLNO + 10; - } else { - maxwn = 1400; - } - if (qt_tileheight != NULL) { - maxhn = atoi(qt_tileheight) * ROWNO * 6/4; - } else { - maxhn = 1024; - } - - // Be exactly the size we want to be - full map... - if (w>maxwn) { - x+=(w-maxwn)/2; - w=maxwn; // Doesn't need to be any wider - } - if (h>maxhn) { - y+=(h-maxhn)/2; - h=maxhn; // Doesn't need to be any taller - } - - setGeometry(x,y,w,h); - - if ( qt_compact_mode ) { - stack = new QWidgetStack(this); - setCentralWidget(stack); - } else { - setCentralWidget(new QWidget(this)); - invusage = new NetHackQtInvUsageWindow(centralWidget()); - } -} - -void NetHackQtMainWindow::zoomMap() -{ - qt_settings->toggleGlyphSize(); -} - -void NetHackQtMainWindow::raiseMap() -{ - if ( stack->id(stack->visibleWidget()) == 0 ) { - zoomMap(); - } else { - stack->raiseWidget(0); - } -} - -void NetHackQtMainWindow::raiseMessages() -{ - stack->raiseWidget(1); -} - -void NetHackQtMainWindow::raiseStatus() -{ - stack->raiseWidget(2); -} - -class NetHackMimeSourceFactory : public QMimeSourceFactory { -public: - const QMimeSource* data(const QString& abs_name) const - { - const QMimeSource* r = 0; - if ( (NetHackMimeSourceFactory*)this == QMimeSourceFactory::defaultFactory() ) - r = QMimeSourceFactory::data(abs_name); - else - r = QMimeSourceFactory::defaultFactory()->data(abs_name); - if ( !r ) { - int sl = abs_name.length(); - do { - sl = abs_name.findRev('/',sl-1); - QString name = sl>=0 ? abs_name.mid(sl+1) : abs_name; - int dot = name.findRev('.'); - if ( dot >= 0 ) - name = name.left(dot); - if ( name == "map" ) - r = new QImageDrag(QImage(map_xpm)); - else if ( name == "msg" ) - r = new QImageDrag(QImage(msg_xpm)); - else if ( name == "stat" ) - r = new QImageDrag(QImage(stat_xpm)); - } while (!r && sl>0); - } - return r; - } -}; - -void NetHackQtMainWindow::doMenuItem(int id) -{ - switch (id) { - case 1000: - centerOnMain(qt_settings); - qt_settings->show(); - break; - case 2000: - QMessageBox::about(this, "About Qt NetHack", aboutMsg()); - break; - case 3000: { - QDialog dlg(this,0,TRUE); - (new QVBoxLayout(&dlg))->setAutoAdd(TRUE); - QTextBrowser browser(&dlg); - NetHackMimeSourceFactory ms; - browser.setMimeSourceFactory(&ms); - browser.setSource(QDir::currentDirPath()+"/Guidebook.html"); - if ( qt_compact_mode ) - dlg.showMaximized(); - dlg.exec(); - } - break; - default: - if ( id >= 0 ) - doKeys(macro[id]); - } -} - -void NetHackQtMainWindow::doKeys(const QString& k) -{ - keysink.Put(k); - qApp->exit_loop(); -} - -void NetHackQtMainWindow::AddMessageWindow(NetHackQtMessageWindow* window) -{ - message=window; - ShowIfReady(); -} - -void NetHackQtMainWindow::AddMapWindow(NetHackQtMapWindow* window) -{ - map=window; - ShowIfReady(); - connect(map,SIGNAL(resized()),this,SLOT(layout())); -} - -void NetHackQtMainWindow::AddStatusWindow(NetHackQtStatusWindow* window) -{ - status=window; - ShowIfReady(); -} - -void NetHackQtMainWindow::RemoveWindow(NetHackQtWindow* window) -{ - if (window==status) { - status=0; - ShowIfReady(); - } else if (window==map) { - map=0; - ShowIfReady(); - } else if (window==message) { - message=0; - ShowIfReady(); - } -} - -void NetHackQtMainWindow::updateInventory() -{ - if ( invusage ) - invusage->repaint(FALSE); -} - -void NetHackQtMainWindow::fadeHighlighting() -{ - if (status) { - status->fadeHighlighting(); - } -} - -void NetHackQtMainWindow::layout() -{ - if ( qt_compact_mode ) - return; - if (message && map && status) { - QSize maxs=map->Widget()->maximumSize(); - int maph=QMIN(height()*2/3,maxs.height()); - - QWidget* c = centralWidget(); - int h=c->height(); - int toph=h-maph; - int iuw=3*qt_settings->glyphs().width(); - int topw=(c->width()-iuw)/2; - - message->Widget()->setGeometry(0,0,topw,toph); - invusage->setGeometry(topw,0,iuw,toph); - status->Widget()->setGeometry(topw+iuw,0,topw,toph); - map->Widget()->setGeometry(QMAX(0,(c->width()-maxs.width())/2), - toph,c->width(),maph); - } -} - -void NetHackQtMainWindow::resizeEvent(QResizeEvent*) -{ - layout(); -#ifdef KDE - updateRects(); -#endif -} - -void NetHackQtMainWindow::keyReleaseEvent(QKeyEvent* event) -{ - if ( dirkey ) { - doKeys(QString(QChar(dirkey))); - if ( !event->isAutoRepeat() ) - dirkey = 0; - } -} - -void NetHackQtMainWindow::keyPressEvent(QKeyEvent* event) -{ - // Global key controls - - // For desktop, arrow keys scroll map, since we don't want players - // to think that's the way to move. For handhelds, the normal way is to - // click-to-travel, so we allow the cursor keys for fine movements. - - // 321 - // 4 0 - // 567 - - if ( event->isAutoRepeat() && - event->key() >= Key_Left && event->key() <= Key_Down ) - return; - - const char* d = Cmd.dirchars; - switch (event->key()) { - case Key_Up: - if ( dirkey == d[0] ) - dirkey = d[1]; - else if ( dirkey == d[4] ) - dirkey = d[3]; - else - dirkey = d[2]; - break; case Key_Down: - if ( dirkey == d[0] ) - dirkey = d[7]; - else if ( dirkey == d[4] ) - dirkey = d[5]; - else - dirkey = d[6]; - break; case Key_Left: - if ( dirkey == d[2] ) - dirkey = d[1]; - else if ( dirkey == d[6] ) - dirkey = d[7]; - else - dirkey = d[0]; - break; case Key_Right: - if ( dirkey == d[2] ) - dirkey = d[3]; - else if ( dirkey == d[6] ) - dirkey = d[5]; - else - dirkey = d[4]; - break; case Key_Prior: - dirkey = 0; - if (message) message->Scroll(0,-1); - break; case Key_Next: - dirkey = 0; - if (message) message->Scroll(0,+1); - break; case Key_Space: - if ( flags.rest_on_space ) { - event->ignore(); - return; - } - case Key_Enter: - if ( map ) - map->clickCursor(); - break; default: - dirkey = 0; - event->ignore(); - } -} - -void NetHackQtMainWindow::closeEvent(QCloseEvent* e) -{ - if ( g.program_state.something_worth_saving ) { - switch ( QMessageBox::information( this, "NetHack", - "This will end your NetHack session", - "&Save", "&Cancel", 0, 1 ) ) - { - case 0: - // See dosave() function - if (dosave0()) { - u.uhp = -1; - NetHackQtBind::qt_exit_nhwindows(0); - nh_terminate(EXIT_SUCCESS); - } - break; - case 1: - break; // ignore the event - } - } else { - e->accept(); - } -} - -void NetHackQtMainWindow::ShowIfReady() -{ - if (message && map && status) { - QPoint pos(0,0); - QWidget* p = qt_compact_mode ? stack : centralWidget(); - message->Widget()->recreate(p,0,pos); - map->Widget()->recreate(p,0,pos); - status->Widget()->recreate(p,0,pos); - if ( qt_compact_mode ) { - message->setMap(map); - stack->addWidget(map->Widget(), 0); - stack->addWidget(message->Widget(), 1); - stack->addWidget(status->Widget(), 2); - raiseMap(); - } else { - layout(); - } - showMaximized(); - } else if (isVisible()) { - hide(); - } -} - - -NetHackQtYnDialog::NetHackQtYnDialog(NetHackQtKeyBuffer& keysrc,const char* q,const char* ch,char df) : - QDialog(qApp->mainWidget(),0,FALSE), - question(q), choices(ch), def(df), - keysource(keysrc) -{ - setCaption("NetHack: Question"); -} - -char NetHackQtYnDialog::Exec() -{ - QString ch(choices); - int ch_per_line=6; - QString qlabel; - QString enable; - if ( qt_compact_mode && !choices ) { - // expand choices from prompt - // ##### why isn't choices set properly??? - const char* c=question; - while ( *c && *c != '[' ) - c++; - qlabel = QString(question).left(c-question); - if ( *c ) { - c++; - if ( *c == '-' ) - ch.append(*c++); - char from=0; - while ( *c && *c != ']' && *c != ' ' ) { - if ( *c == '-' ) { - from = c[-1]; - } else if ( from ) { - for (char f=from+1; f<=*c; f++) - ch.append(f); - from = 0; - } else { - ch.append(*c); - from = 0; - } - c++; - } - if ( *c == ' ' ) { - while ( *c && *c != ']' ) { - if ( *c == '*' || *c == '?' ) - ch.append(*c); - c++; - } - } - } - if ( strstr(question, "what direction") ) { - // We replace this regardless, since sometimes you get choices. - const char* d = Cmd.dirchars; - enable=ch; - ch=""; - ch.append(d[1]); - ch.append(d[2]); - ch.append(d[3]); - ch.append(d[0]); - ch.append('.'); - ch.append(d[4]); - ch.append(d[7]); - ch.append(d[6]); - ch.append(d[5]); - ch.append(d[8]); - ch.append(d[9]); - ch_per_line = 3; - def = ' '; - } else { - // Hmm... they'll have to use a virtual keyboard - } - } else { - qlabel = question; - } - if (!ch.isNull()) { - QVBoxLayout vb(this); - vb.setAutoAdd(TRUE); - bool bigq = qlabel.length()>40; - if ( bigq ) { - QLabel* q = new QLabel(qlabel,this); - q->setAlignment(AlignLeft|WordBreak); - q->setMargin(4); - } - QButtonGroup group(ch_per_line, Horizontal, - bigq ? QString::null : qlabel, this); - - int nchoices=ch.length(); - - bool allow_count=ch.contains('#'); - - const int margin=8; - const int gutter=8; - const int extra=fontMetrics().height(); // Extra for group - int x=margin, y=extra+margin; - int butsize=fontMetrics().height()*2+5; - - QPushButton* button; - for (int i=0; isetEnabled(FALSE); - } - button->setFixedSize(butsize,butsize); // Square - if (ch[i]==def) button->setDefault(TRUE); - if (i%10==9) { - // last in row - x=margin; - y+=butsize+gutter; - } else { - x+=butsize+gutter; - } - } - - connect(&group,SIGNAL(clicked(int)),this,SLOT(doneItem(int))); - - QLabel* lb=0; - QLineEdit* le=0; - - if (allow_count) { - QHBox *hb = new QHBox(this); - lb=new QLabel("Count: ",hb); - le=new QLineEdit(hb); - } - - adjustSize(); - centerOnMain(this); - show(); - char choice=0; - char ch_esc=0; - for (uint i=0; i= 1000 ) { - choice = ch[result() - 1000].latin1(); - } - if ( !choice ) - qApp->enter_loop(); - } - hide(); - if (allow_count && !le->text().isEmpty()) { - yn_number=atoi(le->text()); - choice='#'; - } - return choice; - } else { - QLabel label(qlabel,this); - QPushButton cancel("Dismiss",this); - label.setFrameStyle(QFrame::Box|QFrame::Sunken); - label.setAlignment(AlignCenter); - label.resize(fontMetrics().width(qlabel)+60,30+fontMetrics().height()); - cancel.move(width()/2-cancel.width()/2,label.geometry().bottom()+8); - connect(&cancel,SIGNAL(clicked()),this,SLOT(reject())); - centerOnMain(this); - setResult(-1); - show(); - while (result()<0 && keysource.Empty()) { - qApp->enter_loop(); - } - hide(); - if (keysource.Empty()) { - return '\033'; - } else { - return keysource.GetAscii(); - } - } -} -void NetHackQtYnDialog::keyPressEvent(QKeyEvent* event) -{ - // Don't want QDialog's Return/Esc behaviour - event->ignore(); -} - -void NetHackQtYnDialog::doneItem(int i) -{ - done(i+1000); -} - -void NetHackQtYnDialog::done(int i) -{ - setResult(i); - qApp->exit_loop(); -} - -NetHackQtGlyphs::NetHackQtGlyphs() -{ - const char* tile_file = "nhtiles.bmp"; - if ( iflags.wc_tile_file ) - tile_file = iflags.wc_tile_file; - - if (!img.load(tile_file)) { - tile_file = "x11tiles"; - if (!img.load(tile_file)) { - QString msg; - msg.sprintf("Cannot load x11tiles or nhtiles.bmp"); - QMessageBox::warning(0, "IO Error", msg); - } else { - tiles_per_row = TILES_PER_ROW; - if (img.width()%tiles_per_row) { - impossible( - "Tile file \"%s\" has %d columns, not multiple of row count (%d)", - tile_file, img.width(), tiles_per_row); - } - } - } else { - tiles_per_row = 40; - } - - if ( iflags.wc_tile_width ) - tilefile_tile_W = iflags.wc_tile_width; - else - tilefile_tile_W = img.width() / tiles_per_row; - if ( iflags.wc_tile_height ) - tilefile_tile_H = iflags.wc_tile_height; - else - tilefile_tile_H = tilefile_tile_W; - - setSize(tilefile_tile_W, tilefile_tile_H); -} - -void NetHackQtGlyphs::drawGlyph(QPainter& painter, int glyph, int x, int y) -{ - int tile = glyph2tile[glyph]; - int px = (tile%tiles_per_row)*width(); - int py = tile/tiles_per_row*height(); - - painter.drawPixmap( - x, - y, - pm, - px,py, - width(),height() - ); -} -void NetHackQtGlyphs::drawCell(QPainter& painter, int glyph, int cellx, int celly) -{ - drawGlyph(painter,glyph,cellx*width(),celly*height()); -} -void NetHackQtGlyphs::setSize(int w, int h) -{ - if ( size == QSize(w,h) ) - return; - - bool was1 = size == pm1.size(); - size = QSize(w,h); - if (!w || !h) - return; // Still not decided - - if ( size == pm1.size() ) { - pm = pm1; - return; - } - if ( size == pm2.size() ) { - pm = pm2; - return; - } - - if (w==tilefile_tile_W && h==tilefile_tile_H) { - pm.convertFromImage(img); - } else { - QApplication::setOverrideCursor( Qt::waitCursor ); - QImage scaled = img.smoothScale( - w*img.width()/tilefile_tile_W, - h*img.height()/tilefile_tile_H - ); - pm.convertFromImage(scaled,Qt::ThresholdDither|Qt::PreferDither); - QApplication::restoreOverrideCursor(); - } - (was1 ? pm2 : pm1) = pm; -} - - -////////////////////////////////////////////////////////////// -// -// The ugly C binding classes... -// -////////////////////////////////////////////////////////////// - - -NetHackQtMenuOrTextWindow::NetHackQtMenuOrTextWindow(NetHackQtKeyBuffer& ks) : - actual(0), - keysource(ks) -{ -} - -QWidget* NetHackQtMenuOrTextWindow::Widget() -{ - if (!actual) impossible("Widget called before we know if Menu or Text"); - return actual->Widget(); -} - -// Text -void NetHackQtMenuOrTextWindow::Clear() -{ - if (!actual) - impossible("Clear called before we know if Menu or Text"); - else - actual->Clear(); -} - -void NetHackQtMenuOrTextWindow::Display(bool block) -{ - if (!actual) - impossible("Display called before we know if Menu or Text"); - else - actual->Display(block); -} - -bool NetHackQtMenuOrTextWindow::Destroy() -{ - bool res = FALSE; - - if (!actual) - impossible("Destroy called before we know if Menu or Text"); - else - res = actual->Destroy(); - - return res; -} - -void NetHackQtMenuOrTextWindow::PutStr(int attr, const char* text) -{ - if (!actual) actual=new NetHackQtTextWindow(keysource); - actual->PutStr(attr,text); -} - -// Menu -void NetHackQtMenuOrTextWindow::StartMenu() -{ - if (!actual) actual=new NetHackQtMenuWindow(keysource); - actual->StartMenu(); -} - -void NetHackQtMenuOrTextWindow::AddMenu(int glyph, const ANY_P* identifier, char ch, char gch, int attr, - const char* str, bool presel) -{ - if (!actual) impossible("AddMenu called before we know if Menu or Text"); - actual->AddMenu(glyph,identifier,ch,gch,attr,str,presel); -} - -void NetHackQtMenuOrTextWindow::EndMenu(const char* prompt) -{ - if (!actual) impossible("EndMenu called before we know if Menu or Text"); - actual->EndMenu(prompt); -} - -int NetHackQtMenuOrTextWindow::SelectMenu(int how, MENU_ITEM_P **menu_list) -{ - if (!actual) impossible("SelectMenu called before we know if Menu or Text"); - return actual->SelectMenu(how,menu_list); -} - - -// XXX Should be from Options -// -// XXX Hmm. Tricky part is that perhaps some macros should only be active -// XXX when a key is about to be gotten. For example, the user could -// XXX define "-" to do "E-yyyyyyyy\r", but would still need "-" for -// XXX other purposes. Maybe just too bad. -// -struct { - int key; - int state; - const char* macro; -} key_macro[]={ - { Qt::Key_F1, 0, "n100." }, // Rest (x100) - { Qt::Key_F2, 0, "n20s" }, // Search (x20) - { Qt::Key_F3, 0, "o8o4o6o2o8o4o6o2o8o4o6o2" }, // Open all doors (x3) - { Qt::Key_Tab, 0, "\001" }, - { 0, 0, 0 } -}; - - -NetHackQtBind::NetHackQtBind(int& argc, char** argv) : -#ifdef KDE - KApplication(argc,argv) -#elif defined(QWS) // not quite the right condition - QPEApplication(argc,argv) -#else - QApplication(argc,argv) -#endif -{ - QPixmap pm("nhsplash.xpm"); - if ( iflags.wc_splash_screen && !pm.isNull() ) { - QVBox *vb = new QVBox(0,0, - WStyle_Customize | WStyle_NoBorder | nh_WX11BypassWM | WStyle_StaysOnTop ); - splash = vb; - QLabel *lsplash = new QLabel(vb); - lsplash->setAlignment(AlignCenter); - lsplash->setPixmap(pm); - QLabel* capt = new QLabel("Loading...",vb); - capt->setAlignment(AlignCenter); - if ( pm.mask() ) { - lsplash->setFixedSize(pm.size()); - lsplash->setMask(*pm.mask()); - } - splash->move((QApplication::desktop()->width()-pm.width())/2, - (QApplication::desktop()->height()-pm.height())/2); - //splash->setGeometry(0,0,100,100); - if ( qt_compact_mode ) { - splash->showMaximized(); - } else { - vb->setFrameStyle(QFrame::WinPanel|QFrame::Raised); - vb->setMargin(10); - splash->adjustSize(); - splash->show(); - } - - // force content refresh outside event loop - splash->repaint(FALSE); - lsplash->repaint(FALSE); - capt->repaint(FALSE); - qApp->flushX(); - - } else { - splash = 0; - } - main = new NetHackQtMainWindow(keybuffer); -#if defined(QWS) // not quite the right condition - showMainWidget(main); -#else - setMainWidget(main); -#endif - qt_settings=new NetHackQtSettings(main->width(),main->height()); -} - -void NetHackQtBind::qt_init_nhwindows(int* argc, char** argv) -{ -#ifdef UNIX -// Userid control -// -// Michael Hohmuth ... -// -// As the game runs setuid games, it must seteuid(getuid()) before -// calling XOpenDisplay(), and reset the euid afterwards. -// Otherwise, it can't read the $HOME/.Xauthority file and whines about -// not being able to open the X display (if a magic-cookie -// authorization mechanism is being used). - - uid_t gamesuid=geteuid(); - seteuid(getuid()); -#endif - - QApplication::setColorSpec(ManyColor); - instance=new NetHackQtBind(*argc,argv); - -#ifdef UNIX - seteuid(gamesuid); -#endif - -#ifdef _WS_WIN_ - // This nethack engine feature should be moved into windowport API - nt_kbhit = NetHackQtBind::qt_kbhit; -#endif -} - -int NetHackQtBind::qt_kbhit() -{ - return !keybuffer.Empty(); -} - -static bool have_asked = FALSE; - -void NetHackQtBind::qt_player_selection() -{ - if ( !have_asked ) - qt_askname(); -} - -NetHackQtSavedGameSelector::NetHackQtSavedGameSelector(const char** saved) : - QDialog(qApp->mainWidget(),"sgsel",TRUE) -{ - QVBoxLayout *vbl = new QVBoxLayout(this,6); - QHBox* hb; - - QLabel* logo = new QLabel(this); vbl->addWidget(logo); - logo->setAlignment(AlignCenter); - logo->setPixmap(QPixmap("nhsplash.xpm")); - QLabel* attr = new QLabel("by the NetHack DevTeam",this); - attr->setAlignment(AlignCenter); - vbl->addWidget(attr); - vbl->addStretch(2); - /* - QLabel* logo = new QLabel(hb); - hb = new QHBox(this); - vbl->addWidget(hb, AlignCenter); - logo->setPixmap(QPixmap(nh_icon)); - logo->setAlignment(AlignRight|AlignVCenter); - new QLabel(nh_attribution,hb); - */ - - hb = new QHBox(this); - vbl->addWidget(hb, AlignCenter); - QPushButton* q = new QPushButton("Quit",hb); - connect(q, SIGNAL(clicked()), this, SLOT(reject())); - QPushButton* c = new QPushButton("New Game",hb); - connect(c, SIGNAL(clicked()), this, SLOT(accept())); - c->setDefault(TRUE); - - QButtonGroup* bg = new QButtonGroup(3, Horizontal, "Saved Characters",this); - vbl->addWidget(bg); - connect(bg, SIGNAL(clicked(int)), this, SLOT(done(int))); - for (int i=0; saved[i]; i++) { - QPushButton* b = new QPushButton(saved[i],bg); - bg->insert(b, i+2); - } -} - -int NetHackQtSavedGameSelector::choose() -{ -#if defined(QWS) // probably safe with Qt 3, too (where show!=exec in QDialog). - if ( qt_compact_mode ) - showMaximized(); -#endif - return exec()-2; -} - -void NetHackQtBind::qt_askname() -{ - have_asked = TRUE; - - // We do it all here, and nothing in askname - - char** saved = get_saved_games(); - int ch = -1; - if ( saved && *saved ) { - if ( splash ) splash->hide(); - NetHackQtSavedGameSelector sgsel((const char**)saved); - ch = sgsel.choose(); - if ( ch >= 0 ) - strcpy(g.plname,saved[ch]); - } - free_saved_games(saved); - - switch (ch) { - case -1: - if ( splash ) splash->hide(); - if (NetHackQtPlayerSelector(keybuffer).Choose()) - return; - case -2: - break; - default: - return; - } - - // Quit - clearlocks(); - qt_exit_nhwindows(0); - nh_terminate(0); -} - -void NetHackQtBind::qt_get_nh_event() -{ -} - -#if defined(QWS) -// Kludge to access lastWindowClosed() signal. -class TApp : public QApplication { -public: - TApp(int& c, char**v) : QApplication(c,v) {} - void lwc() { emit lastWindowClosed(); } -}; -#endif - -void NetHackQtBind::qt_exit_nhwindows(const char *) -{ -#if defined(QWS) - // Avoids bug in SHARP SL5500 - ((TApp*)qApp)->lwc(); - qApp->quit(); -#endif - - delete instance; // ie. qApp -} - -void NetHackQtBind::qt_suspend_nhwindows(const char *) -{ -} - -void NetHackQtBind::qt_resume_nhwindows() -{ -} - -static QArray id_to_window; - -winid NetHackQtBind::qt_create_nhwindow(int type) -{ - winid id; - for (id = 0; id < (winid) id_to_window.size(); id++) { - if ( !id_to_window[id] ) - break; - } - if ( id == (winid) id_to_window.size() ) - id_to_window.resize(id+1); - - NetHackQtWindow* window=0; - - switch (type) { - case NHW_MAP: { - NetHackQtMapWindow* w=new NetHackQtMapWindow(clickbuffer); - main->AddMapWindow(w); - window=w; - } break; case NHW_MESSAGE: { - NetHackQtMessageWindow* w=new NetHackQtMessageWindow; - main->AddMessageWindow(w); - window=w; - } break; case NHW_STATUS: { - NetHackQtStatusWindow* w=new NetHackQtStatusWindow; - main->AddStatusWindow(w); - window=w; - } break; case NHW_MENU: - window=new NetHackQtMenuOrTextWindow(keybuffer); - break; case NHW_TEXT: - window=new NetHackQtTextWindow(keybuffer); - } - - window->nhid = id; - - // Note: use of isHidden does not work with Qt 2.1 - if ( splash -#if QT_VERSION >= 300 - && !main->isHidden() -#else - && main->isVisible() -#endif - ) - { - delete splash; - splash = 0; - } - - id_to_window[id] = window; - return id; -} - -void NetHackQtBind::qt_clear_nhwindow(winid wid) -{ - NetHackQtWindow* window=id_to_window[wid]; - window->Clear(); -} - -void NetHackQtBind::qt_display_nhwindow(winid wid, BOOLEAN_P block) -{ - NetHackQtWindow* window=id_to_window[wid]; - window->Display(block); -} - -void NetHackQtBind::qt_destroy_nhwindow(winid wid) -{ - NetHackQtWindow* window=id_to_window[wid]; - main->RemoveWindow(window); - if (window->Destroy()) - delete window; - id_to_window[wid] = 0; -} - -void NetHackQtBind::qt_curs(winid wid, int x, int y) -{ - NetHackQtWindow* window=id_to_window[wid]; - window->CursorTo(x,y); -} - -void NetHackQtBind::qt_putstr(winid wid, int attr, const char *text) -{ - NetHackQtWindow* window=id_to_window[wid]; - window->PutStr(attr,text); -} - -void NetHackQtBind::qt_display_file(const char *filename, BOOLEAN_P must_exist) -{ - NetHackQtTextWindow* window=new NetHackQtTextWindow(keybuffer); - bool complain = FALSE; - -#ifdef DLB - { - dlb *f; - char buf[BUFSZ]; - char *cr; - - window->Clear(); - f = dlb_fopen(filename, "r"); - if (!f) { - complain = must_exist; - } else { - while (dlb_fgets(buf, BUFSZ, f)) { - if ((cr = index(buf, '\n')) != 0) *cr = 0; -#ifdef MSDOS - if ((cr = index(buf, '\r')) != 0) *cr = 0; -#endif - if (index(buf, '\t') != 0) (void) tabexpand(buf); - window->PutStr(ATR_NONE, buf); - } - window->Display(FALSE); - (void) dlb_fclose(f); - } - } -#else - QFile file(filename); - - if (file.open(IO_ReadOnly)) { - char line[128]; - while (file.readLine(line,127) >= 0) { - line[strlen(line)-1]=0;// remove newline - window->PutStr(ATR_NONE,line); - } - window->Display(FALSE); - } else { - complain = must_exist; - } -#endif - - if (complain) { - QString message; - message.sprintf("File not found: %s\n",filename); - QMessageBox::message("File Error", (const char*)message, "Ignore"); - } -} - -void NetHackQtBind::qt_start_menu(winid wid) -{ - NetHackQtWindow* window=id_to_window[wid]; - window->StartMenu(); -} - -void NetHackQtBind::qt_add_menu(winid wid, int glyph, - const ANY_P * identifier, CHAR_P ch, CHAR_P gch, int attr, - const char *str, BOOLEAN_P presel) -{ - NetHackQtWindow* window=id_to_window[wid]; - window->AddMenu(glyph, identifier, ch, gch, attr, str, presel); -} - -void NetHackQtBind::qt_end_menu(winid wid, const char *prompt) -{ - NetHackQtWindow* window=id_to_window[wid]; - window->EndMenu(prompt); -} - -int NetHackQtBind::qt_select_menu(winid wid, int how, MENU_ITEM_P **menu_list) -{ - NetHackQtWindow* window=id_to_window[wid]; - return window->SelectMenu(how,menu_list); -} - -void NetHackQtBind::qt_update_inventory() -{ - if (main) - main->updateInventory(); - /* doesn't work yet - if (g.program_state.something_worth_saving && iflags.perm_invent) - display_inventory(NULL, FALSE); - */ -} - -void NetHackQtBind::qt_mark_synch() -{ -} - -void NetHackQtBind::qt_wait_synch() -{ -} - -void NetHackQtBind::qt_cliparound(int x, int y) -{ - // XXXNH - winid should be a parameter! - qt_cliparound_window(WIN_MAP,x,y); -} - -void NetHackQtBind::qt_cliparound_window(winid wid, int x, int y) -{ - NetHackQtWindow* window=id_to_window[wid]; - window->ClipAround(x,y); -} -void NetHackQtBind::qt_print_glyph(winid wid,XCHAR_P x,XCHAR_P y,int glyph, int bkglyph) -{ - NetHackQtWindow* window=id_to_window[wid]; - window->PrintGlyph(x,y,glyph); -} -//void NetHackQtBind::qt_print_glyph_compose(winid wid,XCHAR_P x,XCHAR_P y,int glyph1, int glyph2) -//{ - //NetHackQtWindow* window=id_to_window[wid]; - //window->PrintGlyphCompose(x,y,glyph1,glyph2); -//} - -void NetHackQtBind::qt_raw_print(const char *str) -{ - puts(str); -} - -void NetHackQtBind::qt_raw_print_bold(const char *str) -{ - puts(str); -} - -int NetHackQtBind::qt_nhgetch() -{ - if (main) - main->fadeHighlighting(); - - // Process events until a key arrives. - // - while (keybuffer.Empty() -#ifdef SAFERHANGUP - && !g.program_state.done_hup -#endif - ) { - qApp->enter_loop(); - } - -#ifdef SAFERHANGUP - if (g.program_state.done_hup && keybuffer.Empty()) return '\033'; -#endif - return keybuffer.GetAscii(); -} - -int NetHackQtBind::qt_nh_poskey(int *x, int *y, int *mod) -{ - if (main) - main->fadeHighlighting(); - - // Process events until a key or map-click arrives. - // - while (keybuffer.Empty() && clickbuffer.Empty() -#ifdef SAFERHANGUP - && !g.program_state.done_hup -#endif - ) { - qApp->enter_loop(); - } -#ifdef SAFERHANGUP - if (g.program_state.done_hup && keybuffer.Empty()) return '\033'; -#endif - if (!keybuffer.Empty()) { - return keybuffer.GetAscii(); - } else { - *x=clickbuffer.NextX(); - *y=clickbuffer.NextY(); - *mod=clickbuffer.NextMod(); - clickbuffer.Get(); - return 0; - } -} - -void NetHackQtBind::qt_nhbell() -{ - QApplication::beep(); -} - -int NetHackQtBind::qt_doprev_message() -{ - // Don't need it - uses scrollbar - // XXX but could make this a shortcut - return 0; -} - -char NetHackQtBind::qt_yn_function(const char *question, const char *choices, CHAR_P def) -{ - if (qt_settings->ynInMessages() && WIN_MESSAGE!=WIN_ERR) { - // Similar to X11 windowport `slow' feature. - - char message[BUFSZ]; - char yn_esc_map='\033'; - - if (choices) { - char *cb, choicebuf[QBUFSZ]; - Strcpy(choicebuf, choices); - if ((cb = index(choicebuf, '\033')) != 0) { - // anything beyond is hidden - *cb = '\0'; - } - (void)strncpy(message, question, QBUFSZ-1); - message[QBUFSZ-1] = '\0'; - Sprintf(eos(message), " [%s]", choicebuf); - if (def) Sprintf(eos(message), " (%c)", def); - Strcat(message, " "); - // escape maps to 'q' or 'n' or default, in that order - yn_esc_map = (index(choices, 'q') ? 'q' : - (index(choices, 'n') ? 'n' : def)); - } else { - Strcpy(message, question); - } - -#ifdef USE_POPUPS - // Improve some special-cases (DIRKS 08/02/23) - if (strcmp (choices,"ynq") == 0) { - switch (QMessageBox::information (qApp->mainWidget(),"NetHack",question,"&Yes","&No","&Quit",0,2)) - { - case 0: return 'y'; - case 1: return 'n'; - case 2: return 'q'; - } - } - - if (strcmp (choices,"yn") == 0) { - switch (QMessageBox::information(qApp->mainWidget(),"NetHack",question,"&Yes", "&No",0,1)) - { - case 0: return 'y'; - case 1: return 'n'; - } - } -#endif - - NetHackQtBind::qt_putstr(WIN_MESSAGE, ATR_BOLD, message); - - int result=-1; - while (result<0) { - char ch=NetHackQtBind::qt_nhgetch(); - if (ch=='\033') { - result=yn_esc_map; - } else if (choices && !index(choices,ch)) { - if (def && (ch==' ' || ch=='\r' || ch=='\n')) { - result=def; - } else { - NetHackQtBind::qt_nhbell(); - // and try again... - } - } else { - result=ch; - } - } - - NetHackQtBind::qt_clear_nhwindow(WIN_MESSAGE); - - return result; - } else { - NetHackQtYnDialog dialog(keybuffer,question,choices,def); - return dialog.Exec(); - } -} - -void NetHackQtBind::qt_getlin(const char *prompt, char *line) -{ - NetHackQtStringRequestor requestor(keybuffer,prompt); - if (!requestor.Get(line)) { - line[0]=0; - } -} - -NetHackQtExtCmdRequestor::NetHackQtExtCmdRequestor(NetHackQtKeyBuffer& ks) : - QDialog(qApp->mainWidget(), "ext-cmd", FALSE), - keysource(ks) -{ - int marg=4; - QVBoxLayout *l = new QVBoxLayout(this,marg,marg); - - QPushButton* can = new QPushButton("Cancel", this); - can->setDefault(TRUE); - can->setMinimumSize(can->sizeHint()); - l->addWidget(can); - - QButtonGroup *group=new QButtonGroup("",0); - QGroupBox *grid=new QGroupBox("Extended commands",this); - l->addWidget(grid); - - int i; - int butw=50; - QFontMetrics fm = fontMetrics(); - for (i=0; extcmdlist[i].ef_txt; i++) { - butw = QMAX(butw,30+fm.width(extcmdlist[i].ef_txt)); - } - int ncols=4; - int nrows=(i+ncols-1)/ncols; - - QVBoxLayout* bl = new QVBoxLayout(grid,marg); - bl->addSpacing(fm.height()); - QGridLayout* gl = new QGridLayout(nrows,ncols,marg); - bl->addLayout(gl); - for (i=0; extcmdlist[i].ef_txt; i++) { - QPushButton* pb=new QPushButton(extcmdlist[i].ef_txt, grid); - pb->setMinimumSize(butw,pb->sizeHint().height()); - group->insert(pb); - gl->addWidget(pb,i/ncols,i%ncols); - } - connect(group,SIGNAL(clicked(int)),this,SLOT(done(int))); - - bl->activate(); - l->activate(); - resize(1,1); - - connect(can,SIGNAL(clicked()),this,SLOT(cancel())); -} - -void NetHackQtExtCmdRequestor::cancel() -{ - setResult(-1); - qApp->exit_loop(); -} - -void NetHackQtExtCmdRequestor::done(int i) -{ - setResult(i); - qApp->exit_loop(); -} - -int NetHackQtExtCmdRequestor::get() -{ - const int none = -10; - char str[32]; - int cursor=0; - resize(1,1); // pack - centerOnMain(this); - show(); - setResult(none); - while (result()==none) { - while (result()==none && !keysource.Empty()) { - char k=keysource.GetAscii(); - if (k=='\r' || k=='\n' || k==' ' || k=='\033') { - setResult(-1); - } else { - str[cursor++] = k; - int r=-1; - for (int i=0; extcmdlist[i].ef_txt; i++) { - if (qstrnicmp(str, extcmdlist[i].ef_txt, cursor)==0) { - if ( r == -1 ) - r = i; - else - r = -2; - } - } - if ( r == -1 ) { // no match! - QApplication::beep(); - cursor=0; - } else if ( r != -2 ) { // only one match - setResult(r); - } - } - } - if (result()==none) - qApp->enter_loop(); - } - hide(); - return result(); -} - - -int NetHackQtBind::qt_get_ext_cmd() -{ - NetHackQtExtCmdRequestor requestor(keybuffer); - return requestor.get(); -} - -void NetHackQtBind::qt_number_pad(int) -{ - // Ignore. -} - -void NetHackQtBind::qt_delay_output() -{ - NetHackQtDelay delay(15); - delay.wait(); -} - -void NetHackQtBind::qt_start_screen() -{ - // Ignore. -} - -void NetHackQtBind::qt_end_screen() -{ - // Ignore. -} - -void NetHackQtBind::qt_outrip(winid wid, int how, time_t when) -{ - NetHackQtWindow* window=id_to_window[wid]; - - window->UseRIP(how, when); -} - -bool NetHackQtBind::notify(QObject *receiver, QEvent *event) -{ - // Ignore Alt-key navigation to menubar, it's annoying when you - // use Alt-Direction to move around. - if ( main && event->type()==QEvent::KeyRelease && main==receiver - && ((QKeyEvent*)event)->key() == Key_Alt ) - return TRUE; - - bool result=QApplication::notify(receiver,event); -#ifdef SAFERHANGUP - if (g.program_state.done_hup) { - keybuffer.Put('\033'); - qApp->exit_loop(); - return TRUE; - } -#endif - if (event->type()==QEvent::KeyPress) { - QKeyEvent* key_event=(QKeyEvent*)event; - - if (!key_event->isAccepted()) { - const int k=key_event->key(); - bool macro=FALSE; - for (int i=0; !macro && key_macro[i].key; i++) { - if (key_macro[i].key==k - && ((key_macro[i].state&key_event->state())==key_macro[i].state)) - { - keybuffer.Put(key_macro[i].macro); - macro=TRUE; - } - } - char ch=key_event->ascii(); - if ( !ch && (key_event->state() & Qt::ControlButton) ) { - // On Mac, it aint-ncessarily-control - if ( k>=Qt::Key_A && k<=Qt::Key_Z ) - ch = k - Qt::Key_A + 1; - } - if (!macro && ch) { - bool alt = (key_event->state()&AltButton) || - (k >= Key_0 && k <= Key_9 && (key_event->state()&ControlButton)); - keybuffer.Put(key_event->key(),ch + (alt ? 128 : 0), - key_event->state()); - key_event->accept(); - result=TRUE; - } - - if (ch || macro) { - qApp->exit_loop(); - } - } - } - return result; -} - -NetHackQtBind* NetHackQtBind::instance=0; -NetHackQtKeyBuffer NetHackQtBind::keybuffer; -NetHackQtClickBuffer NetHackQtBind::clickbuffer; -NetHackQtMainWindow* NetHackQtBind::main=0; -QWidget* NetHackQtBind::splash=0; - - -extern "C" struct window_procs Qt_procs; - -struct window_procs Qt_procs = { - "Qt", - WC_COLOR|WC_HILITE_PET| - WC_ASCII_MAP|WC_TILED_MAP| - WC_FONT_MAP|WC_TILE_FILE|WC_TILE_WIDTH|WC_TILE_HEIGHT| - WC_PLAYER_SELECTION|WC_SPLASH_SCREEN, - 0L, - {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ - NetHackQtBind::qt_init_nhwindows, - NetHackQtBind::qt_player_selection, - NetHackQtBind::qt_askname, - NetHackQtBind::qt_get_nh_event, - NetHackQtBind::qt_exit_nhwindows, - NetHackQtBind::qt_suspend_nhwindows, - NetHackQtBind::qt_resume_nhwindows, - NetHackQtBind::qt_create_nhwindow, - NetHackQtBind::qt_clear_nhwindow, - NetHackQtBind::qt_display_nhwindow, - NetHackQtBind::qt_destroy_nhwindow, - NetHackQtBind::qt_curs, - NetHackQtBind::qt_putstr, - genl_putmixed, - NetHackQtBind::qt_display_file, - NetHackQtBind::qt_start_menu, - NetHackQtBind::qt_add_menu, - NetHackQtBind::qt_end_menu, - NetHackQtBind::qt_select_menu, - genl_message_menu, /* no need for X-specific handling */ - NetHackQtBind::qt_update_inventory, - NetHackQtBind::qt_mark_synch, - NetHackQtBind::qt_wait_synch, -#ifdef CLIPPING - NetHackQtBind::qt_cliparound, -#endif -#ifdef POSITIONBAR - donull, -#endif - NetHackQtBind::qt_print_glyph, - //NetHackQtBind::qt_print_glyph_compose, - NetHackQtBind::qt_raw_print, - NetHackQtBind::qt_raw_print_bold, - NetHackQtBind::qt_nhgetch, - NetHackQtBind::qt_nh_poskey, - NetHackQtBind::qt_nhbell, - NetHackQtBind::qt_doprev_message, - NetHackQtBind::qt_yn_function, - NetHackQtBind::qt_getlin, - NetHackQtBind::qt_get_ext_cmd, - NetHackQtBind::qt_number_pad, - NetHackQtBind::qt_delay_output, -#ifdef CHANGE_COLOR /* only a Mac option currently */ - donull, - donull, -#endif - /* other defs that really should go away (they're tty specific) */ - NetHackQtBind::qt_start_screen, - NetHackQtBind::qt_end_screen, -#ifdef GRAPHIC_TOMBSTONE - NetHackQtBind::qt_outrip, -#else - genl_outrip, -#endif - genl_preference_update, - genl_getmsghistory, - genl_putmsghistory, - genl_status_init, - genl_status_finish, - genl_status_enablefield, - genl_status_update, - genl_can_suspend_yes, -}; - -extern "C" void play_usersound(const char* filename, int volume) -{ -#ifdef USER_SOUNDS -#ifndef QT_NO_SOUND - QSound::play(filename); -#endif -#endif -} - -#include "qt_win.moc" -#ifndef KDE -#include "qt_kde0.moc" -#endif -#if QT_VERSION >= 300 -#include "qttableview.moc" -#endif +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4win.h b/win/Qt/qt_win.h similarity index 93% rename from win/Qt4/qt4win.h rename to win/Qt/qt_win.h index 02e96cd31..b85104414 100644 --- a/win/Qt4/qt4win.h +++ b/win/Qt/qt_win.h @@ -11,10 +11,10 @@ // major application of Qt. // -#ifndef qt4win_h -#define qt4win_h +#ifndef qt_win_h +#define qt_win_h -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtWindow { public: @@ -44,6 +44,6 @@ public: int nhid; }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4xcmd.cpp b/win/Qt/qt_xcmd.cpp similarity index 94% rename from win/Qt4/qt4xcmd.cpp rename to win/Qt/qt_xcmd.cpp index 7c078f640..a994d4eae 100644 --- a/win/Qt4/qt4xcmd.cpp +++ b/win/Qt/qt_xcmd.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4xcmd.cpp -- extended command widget +// qt_xcmd.cpp -- extended command widget #include "hack.h" #include "func_tab.h" @@ -20,13 +20,13 @@ #if QT_VERSION >= 0x050000 #include #endif -#include "qt4xcmd.h" -#include "qt4xcmd.moc" -#include "qt4bind.h" -#include "qt4set.h" -#include "qt4str.h" +#include "qt_xcmd.h" +#include "qt_xcmd.moc" +#include "qt_bind.h" +#include "qt_set.h" +#include "qt_str.h" -namespace nethack_qt4 { +namespace nethack_qt_ { // temporary void centerOnMain(QWidget *); @@ -145,4 +145,4 @@ void NetHackQtExtCmdRequestor::enableButtons() } } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4xcmd.h b/win/Qt/qt_xcmd.h similarity index 85% rename from win/Qt4/qt4xcmd.h rename to win/Qt/qt_xcmd.h index 338ef3370..fe8b027a6 100644 --- a/win/Qt4/qt4xcmd.h +++ b/win/Qt/qt_xcmd.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4xcmd.h -- extended command widget +// qt_xcmd.h -- extended command widget #ifndef QT4XCMD_H #define QT4XCMD_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtExtCmdRequestor : public QDialog { Q_OBJECT @@ -28,6 +28,6 @@ private slots: void cancel(); }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt4/qt4yndlg.cpp b/win/Qt/qt_yndlg.cpp similarity index 97% rename from win/Qt4/qt4yndlg.cpp rename to win/Qt/qt_yndlg.cpp index 7b1725924..8d1caf400 100644 --- a/win/Qt4/qt4yndlg.cpp +++ b/win/Qt/qt_yndlg.cpp @@ -2,7 +2,7 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4yndlg.cpp -- yes/no dialog +// qt_yndlg.cpp -- yes/no dialog #include "hack.h" #undef Invisible @@ -19,15 +19,15 @@ #if QT_VERSION >= 0x050000 #include #endif -#include "qt4yndlg.h" -#include "qt4yndlg.moc" -#include "qt4str.h" +#include "qt_yndlg.h" +#include "qt_yndlg.moc" +#include "qt_str.h" // temporary extern int qt_compact_mode; // end temporary -namespace nethack_qt4 { +namespace nethack_qt_ { // temporary void centerOnMain(QWidget *); @@ -241,4 +241,4 @@ void NetHackQtYnDialog::doneItem(int i) done(i+1000); } -} // namespace nethack_qt4 +} // namespace nethack_qt_ diff --git a/win/Qt4/qt4yndlg.h b/win/Qt/qt_yndlg.h similarity index 86% rename from win/Qt4/qt4yndlg.h rename to win/Qt/qt_yndlg.h index d1474f541..079d7119f 100644 --- a/win/Qt4/qt4yndlg.h +++ b/win/Qt/qt_yndlg.h @@ -2,12 +2,12 @@ // Qt4 conversion copyright (c) Ray Chason, 2012-2014. // NetHack may be freely redistributed. See license for details. -// qt4yndlg.h -- yes/no dialog +// qt_yndlg.h -- yes/no dialog #ifndef QT4YNDLG_H #define QT4YNDLG_H -namespace nethack_qt4 { +namespace nethack_qt_ { class NetHackQtYnDialog : QDialog { Q_OBJECT @@ -29,6 +29,6 @@ public: char Exec(); }; -} // namespace nethack_qt4 +} // namespace nethack_qt_ #endif diff --git a/win/Qt3/.gitattributes b/win/Qt3/.gitattributes new file mode 100644 index 000000000..7b924974c --- /dev/null +++ b/win/Qt3/.gitattributes @@ -0,0 +1,4 @@ +Install.Qt NHSUBST +qpe-nethack.control NH_header=no +knethack.lnk NH_header=no +* NH_filestag=(file%s_for_the_Qt_3_widget_library_-_X11,_Windows,_Mac_OS_X,_or_Qtopia) diff --git a/win/Qt/Info.plist b/win/Qt3/Info.plist similarity index 100% rename from win/Qt/Info.plist rename to win/Qt3/Info.plist diff --git a/win/Qt/Install.Qt b/win/Qt3/Install.Qt similarity index 100% rename from win/Qt/Install.Qt rename to win/Qt3/Install.Qt diff --git a/win/Qt/knethack.lnk b/win/Qt3/knethack.lnk similarity index 100% rename from win/Qt/knethack.lnk rename to win/Qt3/knethack.lnk diff --git a/win/Qt/knh-mini.xpm b/win/Qt3/knh-mini.xpm similarity index 100% rename from win/Qt/knh-mini.xpm rename to win/Qt3/knh-mini.xpm diff --git a/win/Qt/knh.xpm b/win/Qt3/knh.xpm similarity index 100% rename from win/Qt/knh.xpm rename to win/Qt3/knh.xpm diff --git a/win/Qt/qpe-nethack.control b/win/Qt3/qpe-nethack.control similarity index 100% rename from win/Qt/qpe-nethack.control rename to win/Qt3/qpe-nethack.control diff --git a/win/Qt4/qt4clust.cpp b/win/Qt3/qt_clust.cpp similarity index 93% rename from win/Qt4/qt4clust.cpp rename to win/Qt3/qt_clust.cpp index 1cd080c11..c5063a6a3 100644 --- a/win/Qt4/qt4clust.cpp +++ b/win/Qt3/qt_clust.cpp @@ -1,9 +1,10 @@ -/* SCCS Id: @(#)qt_clust.cpp 3.4 1999/11/19 */ +/* NetHack 3.6 qt_clust.cpp $NHDT-Date: 1524684507 2018/04/25 19:28:27 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.8 $ */ /* Copyright (c) Warwick Allison, 1999. */ /* NetHack may be freely redistributed. See license for details. */ -#include "qt4clust.h" +#include "qt_clust.h" -static void include(QRect& r, const QRect& rect) +static +void include(QRect& r, const QRect& rect) { if (rect.left() +// - Userid control +// Svante Gerhard +// - .nethackrc tile and font size settings +// Dirk Schoenberger +// - KDE support +// - SlashEm support +// and many others for bug reports. +// +// Unfortunately, this doesn't use Qt as well as I would like, +// primarily because NetHack is fundamentally a getkey-type program +// rather than being event driven (hence the ugly key and click buffer) +// and also because this is my first major application of Qt. +// +// The problem of NetHack's getkey requirement is solved by intercepting +// key events by overiding QApplicion::notify(...), and putting them in +// a buffer. Mouse clicks on the map window are treated with a similar +// buffer. When the NetHack engine calls for a key, one is taken from +// the buffer, or if that is empty, QApplication::enter_loop() is called. +// Whenever keys or clicks go into the buffer, QApplication::exit_loop() +// is called. +// +// Another problem is that some NetHack players are decade-long players who +// demand complete keyboard control (while Qt and X11 conspire to make this +// difficult by having widget-based focus rather than application based - +// a good thing in general). This problem is solved by again using the key +// event buffer. +// +// Out of all this hackery comes a silver lining however, as macros for +// the super-expert and menus for the ultra-newbie are also made possible +// by the key event buffer. +// + +extern "C" { + +// This includes all the definitions we need from the NetHack main +// engine. We pretend MSC is a STDC compiler, because C++ is close +// enough, and we undefine NetHack macros which conflict with Qt +// identifiers. + +#define alloc hide_alloc // avoid treading on STL symbol +#define lock hide_lock // avoid treading on STL symbol +#ifdef _MSC_VER +#define NHSTDC +#endif +#include "hack.h" +#include "func_tab.h" +#include "dlb.h" +#include "patchlevel.h" +#include "tile2x11.h" +#undef Invisible +#undef Warning +#undef red +#undef green +#undef blue +#undef Black +#undef curs +#undef TRUE +#undef FALSE +#undef min +#undef max +#undef alloc +#undef lock +#undef yn + +} + +#include "qt_win.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +//#include + +#include + +#include "qt_clust.h" +#include "qt_xpms.h" + +#include +#ifdef Q_WS_MACX +# include +#else +# include +#endif + +#ifdef _WS_X11_ +// For userid control +#include +#endif + +// Some distributors released Qt 2.1.0beta4 +#if QT_VERSION < 220 +# define nh_WX11BypassWM 0x01000000 +#else +# define nh_WX11BypassWM WX11BypassWM +#endif + +#ifdef USER_SOUNDS +# if QT_VERSION < 220 +# undef USER_SOUNDS +# else +# include +# endif +#endif + + +#ifdef USER_SOUNDS +extern "C" void play_sound_for_message(const char* str); +#endif + +#ifdef SAFERHANGUP +#include +#endif + +// Warwick prefers it this way... +#define QT_CHOOSE_RACE_FIRST + +static const char nh_attribution[] = "
    NetHack" + "
    by the NetHack DevTeam
    "; + +static QString +aboutMsg() +{ + QString msg; + msg.sprintf( + "Qt NetHack is a version of NetHack built\n" +#ifdef KDE + "using KDE and the Qt GUI toolkit.\n" +#else + "using the Qt GUI toolkit.\n" +#endif + "This is version %d.%d.%d\n\n" + "Homepage:\n http://trolls.troll.no/warwick/nethack/\n\n" +#ifdef KDE + "KDE:\n http://www.kde.org\n" +#endif + "Qt:\n http://www.troll.no", + VERSION_MAJOR, + VERSION_MINOR, + PATCHLEVEL); + return msg; +} + +static void +centerOnMain( QWidget* w ) +{ + QWidget* m = qApp->mainWidget(); + if (!m) m = qApp->desktop(); + QPoint p = m->mapToGlobal(QPoint(0,0)); + w->move( p.x() + m->width()/2 - w->width()/2, + p.y() + m->height()/2 - w->height()/2 ); +} + +NetHackQtLineEdit::NetHackQtLineEdit() : + QLineEdit(0) +{ +} + +NetHackQtLineEdit::NetHackQtLineEdit(QWidget* parent, const char* name) : + QLineEdit(parent,name) +{ +} + +void NetHackQtLineEdit::fakeEvent(int key, int ascii, int state) +{ + QKeyEvent fake(QEvent::KeyPress,key,ascii,state); + keyPressEvent(&fake); +} + +extern "C" { +/* Used by tile/font-size patch below and in ../../src/files.c */ +char *qt_tilewidth=NULL; +char *qt_tileheight=NULL; +char *qt_fontsize=NULL; +#if defined(QWS) +int qt_compact_mode = 1; +#else +int qt_compact_mode = 0; +#endif +extern const char *enc_stat[]; /* from botl.c */ +extern const char *hu_stat[]; /* from eat.c */ +extern int total_tiles_used; // from tile.c +extern short glyph2tile[]; // from tile.c +} + +static int tilefile_tile_W=16; +static int tilefile_tile_H=16; + +#define TILEWMIN 1 +#define TILEHMIN 1 + + +/* XPM */ +static const char * nh_icon[] = { +"40 40 6 1", +" s None c none", +". c #ffffff", +"X c #dadab6", +"o c #6c91b6", +"O c #476c6c", +"+ c #000000", +" ", +" ", +" ", +" . .X..XX.XX X ", +" .. .....X.XXXXXX XX ", +" ... ....X..XX.XXXXX XXX ", +" .. ..........X.XXXXXXXXXXX XX ", +" .... ........X..XX.XXXXXXXXX XXXX ", +" .... ..........X.XXXXXXXXXXX XXXX ", +" ooOOO..ooooooOooOOoOOOOOOOXX+++OO++ ", +" ooOOO..ooooooooOoOOOOOOOOOXX+++OO++ ", +" ....O..ooooooOooOOoOOOOOOOXX+XXXX++ ", +" ....O..ooooooooOoOOOOOOOOOXX+XXXX++ ", +" ..OOO..ooooooOooOOoOOOOOOOXX+++XX++ ", +" ++++..ooooooooOoOOOOOOOOOXX+++ +++ ", +" +++..ooooooOooOOoOOOOOOOXX+++ + ", +" ++..ooooooooOoOOOOOOOOOXX+++ ", +" ..ooooooOooOOoOOOOOOOXX+++ ", +" ..ooooooooOoOOOOOOOOOXX+++ ", +" ..ooooooOooOOoOOOOOOOXX+++ ", +" ..ooooooooOoOOOOOOOOOXX+++ ", +" ..oooooOooOOoOOOOOOXX+++ ", +" ..oooooooOoOOOOOOOOXX+++ ", +" ..ooooOooOOoOOOOOXX+++ ", +" ..ooooooOoOOOOOOOXX++++ ", +" ..o..oooOooOOoOOOOXX+XX+++ ", +" ...o..oooooOoOOOOOXX++XXX++ ", +" ....OO..ooOooOOoOOXX+++XXXX++ ", +" ...oo..+..oooOoOOOXX++XXooXXX++ ", +" ...ooo..++..OooOOoXX+++XXooOXXX+ ", +" ..oooOOXX+++....XXXX++++XXOOoOOXX+ ", +" ..oooOOXX+++ ...XXX+++++XXOOooOXX++ ", +" ..oooOXXX+++ ..XX+++ +XXOOooOXX++ ", +" .....XXX++++ XXXXXXX++ ", +" ....XX++++ XXXXXXX+ ", +" ...XX+++ XXXXX++ ", +" ", +" ", +" ", +" "}; +/* XPM */ +static const char * nh_icon_small[] = { +/* width height ncolors chars_per_pixel */ +"16 16 16 1", +/* colors */ +" c #587070", +". c #D1D5C9", +"X c #8B8C84", +"o c #2A2A28", +"O c #9AABA9", +"+ c #6A8FB2", +"@ c #C4CAC4", +"# c #B6BEB6", +"$ c None", +"% c #54564E", +"& c #476C6C", +"* c #ADB2AB", +"= c #ABABA2", +"- c #5E8295", +"; c #8B988F", +": c #E8EAE7", +/* pixels */ +"$$$$$$$$$$$$$$$$", +"$$$.$#::.#==*$$$", +"$.*:::::....#*=$", +"$@#:..@#*==#;XX;", +"$@O:+++- &&; X%X", +"$#%.+++- &&;% oX", +"$$o.++-- &&;%%X$", +"$$$:++-- &&;%%$$", +"$$$.O++- &&=o $$", +"$$$=:++- & XoX$$", +"$$*:@O-- ;%Xo$$", +"$*:O#$+--;oOOX $", +"$:+ =o::=oo=-;%X", +"$::.%o$*;X;##@%$", +"$$@# ;$$$$$=*;X$", +"$$$$$$$$$$$$$$$$" +}; + +/* XPM */ +static const char * map_xpm[] = { +"12 13 4 1", +". c None", +" c #000000000000", +"X c #0000B6DAFFFF", +"o c #69A69248B6DA", +" .", +" XXXXX ooo ", +" XoooX o ", +" XoooX o o ", +" XoooX ooo ", +" XXoXX o ", +" oooooXXX ", +" oo o oooX ", +" o XooX ", +" oooo XooX ", +" o o XXXX ", +" ", +". "}; +/* XPM */ +static const char * msg_xpm[] = { +"12 13 4 1", +". c None", +" c #FFFFFFFFFFFF", +"X c #69A69248B6DA", +"o c #000000000000", +" .", +" XXX XXX X o", +" o", +" XXXXX XX o", +" o", +" XX XXXXX o", +" o", +" XXXXXX o", +" o", +" XX XXX XX o", +" o", +" o", +".ooooooooooo"}; +/* XPM */ +static const char * stat_xpm[] = { +"12 13 5 1", +" c None", +". c #FFFF00000000", +"X c #000000000000", +"o c #FFFFFFFF0000", +"O c #69A6FFFF0000", +" ", +" ", +"... ", +"...X ", +"...X ... ", +"oooX oooX", +"oooXooo oooX", +"OOOXOOOXOOOX", +"OOOXOOOXOOOX", +"OOOXOOOXOOOX", +"OOOXOOOXOOOX", +"OOOXOOOXOOOX", +" XXXXXXXXXXX"}; +/* XPM */ +static const char * info_xpm[] = { +"12 13 4 1", +" c None", +". c #00000000FFFF", +"X c #FFFFFFFFFFFF", +"o c #000000000000", +" ... ", +" ....... ", +" ...XXX... ", +" .........o ", +"...XXXX.... ", +"....XXX....o", +"....XXX....o", +"....XXX....o", +" ...XXX...oo", +" ..XXXXX..o ", +" .......oo ", +" o...ooo ", +" ooo "}; + + +/* XPM */ +static const char * again_xpm[] = { +"12 13 2 1", +" c None", +". c #000000000000", +" .. ", +" .. ", +" ..... ", +" ....... ", +"... .. .. ", +".. .. .. ", +".. ..", +".. ..", +".. ..", +" .. .. ", +" .......... ", +" ...... ", +" "}; +/* XPM */ +static const char * kick_xpm[] = { +"12 13 3 1", +" c None", +". c #000000000000", +"X c #FFFF6DB60000", +" ", +" ", +" . . . ", +" ... . . ", +" ... . ", +" ... . ", +" ... ", +"XXX ... ", +"XXX. ... ", +"XXX. ... ", +"XXX. .. ", +" ... ", +" "}; +/* XPM */ +static const char * throw_xpm[] = { +"12 13 3 1", +" c None", +". c #FFFF6DB60000", +"X c #000000000000", +" ", +" ", +" ", +" ", +".... X ", +"....X X ", +"....X XXXXXX", +"....X X ", +" XXXX X ", +" ", +" ", +" ", +" "}; +/* XPM */ +static const char * fire_xpm[] = { +"12 13 5 1", +" c None", +". c #B6DA45140000", +"X c #FFFFB6DA9658", +"o c #000000000000", +"O c #FFFF6DB60000", +" . ", +" X. ", +" X . ", +" X .o ", +" X . o ", +" X .o o ", +"OOOOOOOOoooo", +" X .o o ", +" X . o o ", +" X .o ", +" X. o ", +" . o ", +" o "}; +/* XPM */ +static const char * get_xpm[] = { +"12 13 3 1", +" c None", +". c #000000000000", +"X c #FFFF6DB60000", +" ", +" . ", +" ... ", +" . . . ", +" . ", +" . ", +" ", +" XXXXX ", +" XXXXX. ", +" XXXXX. ", +" XXXXX. ", +" ..... ", +" "}; +/* XPM */ +static const char * drop_xpm[] = { +"12 13 3 1", +" c None", +". c #FFFF6DB60000", +"X c #000000000000", +" ", +" ..... ", +" .....X ", +" .....X ", +" .....X ", +" XXXXX ", +" ", +" X ", +" X ", +" X X X ", +" XXX ", +" X ", +" "}; +/* XPM */ +static const char * eat_xpm[] = { +"12 13 4 1", +" c None", +". c #000000000000", +"X c #FFFFB6DA9658", +"o c #FFFF6DB60000", +" .X. .. ", +" .X. .. ", +" .X. .. ", +" .X. .. ", +" ... .. ", +" .. .. ", +" .. .. ", +" oo oo ", +" oo oo ", +" oo oo ", +" oo oo ", +" oo oo ", +" oo oo "}; +/* XPM */ +static const char * rest_xpm[] = { +"12 13 2 1", +" c None", +". c #000000000000", +" ..... ", +" . ", +" . ", +" . ....", +" ..... . ", +" . ", +" ....", +" ", +" .... ", +" . ", +" . ", +" .... ", +" "}; +/* XPM */ +static const char * cast_a_xpm[] = { +"12 13 3 1", +" c None", +". c #FFFF6DB60000", +"X c #000000000000", +" . ", +" . ", +" .. ", +" .. ", +" .. . ", +" .. . ", +" ...... ", +" .. .. XX ", +" .. X X ", +" .. X X ", +" .. XXXX ", +" . X X ", +" . X X "}; +/* XPM */ +static const char * cast_b_xpm[] = { +"12 13 3 1", +" c None", +". c #FFFF6DB60000", +"X c #000000000000", +" . ", +" . ", +" .. ", +" .. ", +" .. . ", +" .. . ", +" ...... ", +" .. .. XXX ", +" .. X X ", +" .. XXX ", +" .. X X ", +" . X X ", +" . XXX "}; +/* XPM */ +static const char * cast_c_xpm[] = { +"12 13 3 1", +" c None", +". c #FFFF6DB60000", +"X c #000000000000", +" . ", +" . ", +" .. ", +" .. ", +" .. . ", +" .. . ", +" ...... ", +" .. .. XX ", +" .. X X ", +" .. X ", +" .. X ", +" . X X ", +" . XX "}; + +NetHackQtSettings::NetHackQtSettings(int w, int h) : + tilewidth(TILEWMIN,64,1,this), + tileheight(TILEHMIN,64,1,this), + widthlbl(&tilewidth,"&Width:",this), + heightlbl(&tileheight,"&Height:",this), + whichsize("&Zoomed",this), + fontsize(this), + normal("times"), +#ifdef WS_WIN + normalfixed("courier new"), +#else + normalfixed("fixed"), +#endif + large("times"), + theglyphs(0) + +{ + int default_fontsize; + + if (w<=300) { + // ~240x320 + default_fontsize=4; + tilewidth.setValue(8); + tileheight.setValue(12); + } else if (w<=700) { + // ~640x480 + default_fontsize=3; + tilewidth.setValue(8); + tileheight.setValue(14); + } else if (w<=900) { + // ~800x600 + default_fontsize=3; + tilewidth.setValue(10); + tileheight.setValue(17); + } else if (w<=1100) { + // ~1024x768 + default_fontsize=2; + tilewidth.setValue(12); + tileheight.setValue(22); + } else if (w<=1200) { + // ~1152x900 + default_fontsize=1; + tilewidth.setValue(14); + tileheight.setValue(26); + } else { + // ~1280x1024 and larger + default_fontsize=0; + tilewidth.setValue(16); + tileheight.setValue(30); + } + + // Tile/font sizes read from .nethackrc + if (qt_tilewidth != NULL) { + tilewidth.setValue(atoi(qt_tilewidth)); + free(qt_tilewidth); + } + if (qt_tileheight != NULL) { + tileheight.setValue(atoi(qt_tileheight)); + free(qt_tileheight); + } + if (qt_fontsize != NULL) { + switch (tolower(qt_fontsize[0])) { + case 'h': default_fontsize = 0; break; + case 'l': default_fontsize = 1; break; + case 'm': default_fontsize = 2; break; + case 's': default_fontsize = 3; break; + case 't': default_fontsize = 4; break; + } + free(qt_fontsize); + } + + theglyphs=new NetHackQtGlyphs(); + resizeTiles(); + + connect(&tilewidth,SIGNAL(valueChanged(int)),this,SLOT(resizeTiles())); + connect(&tileheight,SIGNAL(valueChanged(int)),this,SLOT(resizeTiles())); + connect(&whichsize,SIGNAL(toggled(bool)),this,SLOT(setGlyphSize(bool))); + + fontsize.insertItem("Huge"); + fontsize.insertItem("Large"); + fontsize.insertItem("Medium"); + fontsize.insertItem("Small"); + fontsize.insertItem("Tiny"); + fontsize.setCurrentItem(default_fontsize); + connect(&fontsize,SIGNAL(activated(int)),this,SIGNAL(fontChanged())); + + QGridLayout* grid = new QGridLayout(this, 5, 2, 8); + grid->addMultiCellWidget(&whichsize, 0, 0, 0, 1); + grid->addWidget(&tilewidth, 1, 1); grid->addWidget(&widthlbl, 1, 0); + grid->addWidget(&tileheight, 2, 1); grid->addWidget(&heightlbl, 2, 0); + QLabel* flabel=new QLabel(&fontsize, "&Font:",this); + grid->addWidget(flabel, 3, 0); grid->addWidget(&fontsize, 3, 1); + QPushButton* dismiss=new QPushButton("Dismiss",this); + dismiss->setDefault(TRUE); + grid->addMultiCellWidget(dismiss, 4, 4, 0, 1); + grid->setRowStretch(4,0); + grid->setColStretch(1,1); + grid->setColStretch(2,2); + grid->activate(); + + connect(dismiss,SIGNAL(clicked()),this,SLOT(accept())); + resize(150,140); +} + +NetHackQtGlyphs& NetHackQtSettings::glyphs() +{ + return *theglyphs; +} + +void NetHackQtSettings::resizeTiles() +{ + int w = tilewidth.value(); + int h = tileheight.value(); + + theglyphs->setSize(w,h); + emit tilesChanged(); +} + +void NetHackQtSettings::toggleGlyphSize() +{ + whichsize.toggle(); +} + +void NetHackQtSettings::setGlyphSize(bool which) +{ + QSize n = QSize(tilewidth.value(),tileheight.value()); + if ( othersize.isValid() ) { + tilewidth.blockSignals(TRUE); + tileheight.blockSignals(TRUE); + tilewidth.setValue(othersize.width()); + tileheight.setValue(othersize.height()); + tileheight.blockSignals(FALSE); + tilewidth.blockSignals(FALSE); + resizeTiles(); + } + othersize = n; +} + +const QFont& NetHackQtSettings::normalFont() +{ + static int size[]={ 18, 14, 12, 10, 8 }; + normal.setPointSize(size[fontsize.currentItem()]); + return normal; +} + +const QFont& NetHackQtSettings::normalFixedFont() +{ + static int size[]={ 18, 14, 13, 10, 8 }; + normalfixed.setPointSize(size[fontsize.currentItem()]); + return normalfixed; +} + +const QFont& NetHackQtSettings::largeFont() +{ + static int size[]={ 24, 18, 14, 12, 10 }; + large.setPointSize(size[fontsize.currentItem()]); + return large; +} + +bool NetHackQtSettings::ynInMessages() +{ + return !qt_compact_mode; +} + + +NetHackQtSettings* qt_settings; + + + +NetHackQtKeyBuffer::NetHackQtKeyBuffer() : + in(0), out(0) +{ +} + +bool NetHackQtKeyBuffer::Empty() const { return in==out; } +bool NetHackQtKeyBuffer::Full() const { return (in+1)%maxkey==out; } + +void NetHackQtKeyBuffer::Put(int k, int a, int state) +{ + if ( Full() ) return; // Safety + key[in]=k; + ascii[in]=a; + in=(in+1)%maxkey; +} + +void NetHackQtKeyBuffer::Put(char a) +{ + Put(0,a,0); +} + +void NetHackQtKeyBuffer::Put(const char* str) +{ + while (*str) Put(*str++); +} + +int NetHackQtKeyBuffer::GetKey() +{ + if ( Empty() ) return 0; + int r=TopKey(); + out=(out+1)%maxkey; + return r; +} + +int NetHackQtKeyBuffer::GetAscii() +{ + if ( Empty() ) return 0; // Safety + int r=TopAscii(); + out=(out+1)%maxkey; + return r; +} + +int NetHackQtKeyBuffer::GetState() +{ + if ( Empty() ) return 0; + int r=TopState(); + out=(out+1)%maxkey; + return r; +} + +int NetHackQtKeyBuffer::TopKey() const +{ + if ( Empty() ) return 0; + return key[out]; +} + +int NetHackQtKeyBuffer::TopAscii() const +{ + if ( Empty() ) return 0; + return ascii[out]; +} + +int NetHackQtKeyBuffer::TopState() const +{ + if ( Empty() ) return 0; + return state[out]; +} + + +NetHackQtClickBuffer::NetHackQtClickBuffer() : + in(0), out(0) +{ +} + +bool NetHackQtClickBuffer::Empty() const { return in==out; } +bool NetHackQtClickBuffer::Full() const { return (in+1)%maxclick==out; } + +void NetHackQtClickBuffer::Put(int x, int y, int mod) +{ + click[in].x=x; + click[in].y=y; + click[in].mod=mod; + in=(in+1)%maxclick; +} + +int NetHackQtClickBuffer::NextX() const { return click[out].x; } +int NetHackQtClickBuffer::NextY() const { return click[out].y; } +int NetHackQtClickBuffer::NextMod() const { return click[out].mod; } + +void NetHackQtClickBuffer::Get() +{ + out=(out+1)%maxclick; +} + +class NhPSListViewItem : public QListViewItem { +public: + NhPSListViewItem( QListView* parent, const QString& name ) : + QListViewItem(parent, name) + { + } + + void setGlyph(int g) + { + NetHackQtGlyphs& glyphs = qt_settings->glyphs(); + int gw = glyphs.width(); + int gh = glyphs.height(); + QPixmap pm(gw,gh); + QPainter p(&pm); + glyphs.drawGlyph(p, g, 0, 0); + p.end(); + setPixmap(0,pm); + setHeight(QMAX(pm.height()+1,height())); + } + + void paintCell( QPainter *p, const QColorGroup &cg, + int column, int width, int alignment ) + { + if ( isSelectable() ) { + QListViewItem::paintCell( p, cg, column, width, alignment ); + } else { + QColorGroup disabled( + cg.foreground().light(), + cg.button().light(), + cg.light(), cg.dark(), cg.mid(), + gray, cg.base() ); + QListViewItem::paintCell( p, disabled, column, width, alignment ); + } + } +}; + +class NhPSListViewRole : public NhPSListViewItem { +public: + NhPSListViewRole( QListView* parent, int id ) : + NhPSListViewItem(parent, +#ifdef QT_CHOOSE_RACE_FIRST // Lowerize - looks better + QString(QChar(roles[id].name.m[0])).lower()+QString(roles[id].name.m+1) +#else + roles[id].name.m +#endif + ) + { + setGlyph(monnum_to_glyph(roles[id].malenum)); + } +}; + +class NhPSListViewRace : public NhPSListViewItem { +public: + NhPSListViewRace( QListView* parent, int id ) : + NhPSListViewItem(parent, +#ifdef QT_CHOOSE_RACE_FIRST // Capitalize - looks better + QString(QChar(races[id].noun[0])).upper()+QString(races[id].noun+1) +#else + QString(QChar(races[id].noun[0])+QString(races[id].noun+1)) +#endif + ) + { + setGlyph(monnum_to_glyph(races[id].malenum)); + } +}; + +class NhPSListView : public QListView { +public: + NhPSListView( QWidget* parent ) : + QListView(parent) + { + setSorting(-1); // order is identity + header()->setClickEnabled(FALSE); + } + + QSizePolicy sizePolicy() const + { + return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); + } + + QSize minimumSizeHint() const + { + return sizeHint(); + } + + QSize sizeHint() const + { + QListView::sizeHint(); + QSize sz = header()->sizeHint(); + int h=0; + QListViewItem* c=firstChild(); + while (c) h+=c->height(),c = c->nextSibling(); + sz += QSize(frameWidth()*2, h+frameWidth()*2); + return sz; + } + + int selectedItemNumber() const + { + int i=0; + QListViewItem* c = firstChild(); + while (c) { + if (c == selectedItem()) { + return i; + } + i++; + c = c->nextSibling(); + } + return -1; + } + + void setSelectedItemNumber(int i) + { + QListViewItem* c=firstChild(); + while (i--) + c = c->nextSibling(); + c->setSelected(TRUE); + } +}; + +NetHackQtPlayerSelector::NetHackQtPlayerSelector(NetHackQtKeyBuffer& ks) : + QDialog(qApp->mainWidget(),"plsel",TRUE), + keysource(ks), + fully_specified_role(TRUE) +{ + /* + 0 1 2 + + Name ------------------------------------+ + 0 | | + + ---- ------------------------------------+ + + Role ---+ + Race ---+ + Gender ------+ + | | | | | * Male | + 1 | | | | | * Female | + | | | | +--------------+ + | | | | + | | | | + Alignment ---+ + 2 | | | | | * Male | + | | | | | * Female | + | | | | +--------------+ + 3 | | | | ...stretch... + | | | | + 4 | | | | [ Play ] + 5 | | | | [ Quit ] + +---------+ +---------+ + */ + + int marg=4; + QGridLayout *l = new QGridLayout(this,6,3,marg,marg); + + QButtonGroup* namebox = new QButtonGroup(1,Horizontal,"Name",this); + QLineEdit* name = new QLineEdit(namebox); + name->setMaxLength(sizeof(g.plname)-1); + if ( strncmp(g.plname,"player",6) && strncmp(g.plname,"games",5) ) + name->setText(g.plname); + connect(name, SIGNAL(textChanged(const QString&)), + this, SLOT(selectName(const QString&)) ); + name->setFocus(); + QButtonGroup* genderbox = new QButtonGroup("Sex",this); + QButtonGroup* alignbox = new QButtonGroup("Alignment",this); + QVBoxLayout* vbgb = new QVBoxLayout(genderbox,3,1); + vbgb->setAutoAdd(TRUE); + vbgb->addSpacing(fontMetrics().height()*3/4); + QVBoxLayout* vbab = new QVBoxLayout(alignbox,3,1); + vbab->setAutoAdd(TRUE); + vbab->addSpacing(fontMetrics().height()); + QLabel* logo = new QLabel(nh_attribution, this); + + l->addMultiCellWidget( namebox, 0,0,0,2 ); +#ifdef QT_CHOOSE_RACE_FIRST + race = new NhPSListView(this); + role = new NhPSListView(this); + l->addMultiCellWidget( race, 1,5,0,0 ); + l->addMultiCellWidget( role, 1,5,1,1 ); +#else + role = new NhPSListView(this); + race = new NhPSListView(this); + l->addMultiCellWidget( role, 1,5,0,0 ); + l->addMultiCellWidget( race, 1,5,1,1 ); +#endif + role->addColumn("Role"); + race->addColumn("Race"); + + l->addWidget( genderbox, 1, 2 ); + l->addWidget( alignbox, 2, 2 ); + l->addWidget( logo, 3, 2, AlignCenter ); + l->setRowStretch( 3, 5 ); + + int i; + int nrole; + + for (nrole=0; roles[nrole].name.m; nrole++) + ; + for (i=nrole-1; i>=0; i--) { // XXX QListView unsorted goes in rev. + new NhPSListViewRole( role, i ); + } + connect( role, SIGNAL(selectionChanged()), this, SLOT(selectRole()) ); + + int nrace; + for (nrace=0; races[nrace].noun; nrace++) + ; + for (i=nrace-1; i>=0; i--) { + new NhPSListViewRace( race, i ); + } + connect( race, SIGNAL(selectionChanged()), this, SLOT(selectRace()) ); + + gender = new QRadioButton*[ROLE_GENDERS]; + for (i=0; iaddWidget( ok, 4, 2 ); + ok->setDefault(TRUE); + connect( ok, SIGNAL(clicked()), this, SLOT(accept()) ); + + QPushButton* cancel = new QPushButton("Quit",this); + l->addWidget( cancel, 5, 2 ); + connect( cancel, SIGNAL(clicked()), this, SLOT(reject()) ); + + // Randomize race and role, unless specified in config + int ro = flags.initrole; + if (ro == ROLE_NONE || ro == ROLE_RANDOM) { + ro = rn2(nrole); + if (flags.initrole != ROLE_RANDOM) { + fully_specified_role = FALSE; + } + } + int ra = flags.initrace; + if (ra == ROLE_NONE || ra == ROLE_RANDOM) { + ra = rn2(nrace); + if (flags.initrace != ROLE_RANDOM) { + fully_specified_role = FALSE; + } + } + + // make sure we have a valid combination, honoring + // the users request if possible. + bool choose_race_first; +#ifdef QT_CHOOSE_RACE_FIRST + choose_race_first = TRUE; + if (flags.initrole >= 0 && flags.initrace < 0) { + choose_race_first = FALSE; + } +#else + choose_race_first = FALSE; + if (flags.initrace >= 0 && flags.initrole < 0) { + choose_race_first = TRUE; + } +#endif + while (!validrace(ro,ra)) { + if (choose_race_first) { + ro = rn2(nrole); + if (flags.initrole != ROLE_RANDOM) { + fully_specified_role = FALSE; + } + } else { + ra = rn2(nrace); + if (flags.initrace != ROLE_RANDOM) { + fully_specified_role = FALSE; + } + } + } + + int g = flags.initgend; + if (g == -1) { + g = rn2(ROLE_GENDERS); + fully_specified_role = FALSE; + } + while (!validgend(ro,ra,g)) { + g = rn2(ROLE_GENDERS); + } + gender[g]->setChecked(TRUE); + selectGender(g); + + int a = flags.initalign; + if (a == -1) { + a = rn2(ROLE_ALIGNS); + fully_specified_role = FALSE; + } + while (!validalign(ro,ra,a)) { + a = rn2(ROLE_ALIGNS); + } + alignment[a]->setChecked(TRUE); + selectAlignment(a); + + QListViewItem* li; + + li = role->firstChild(); + while (ro--) li=li->nextSibling(); + role->setSelected(li,TRUE); + + li = race->firstChild(); + while (ra--) li=li->nextSibling(); + race->setSelected(li,TRUE); + + flags.initrace = race->selectedItemNumber(); + flags.initrole = role->selectedItemNumber(); +} + + +void NetHackQtPlayerSelector::selectName(const QString& n) +{ + strncpy(g.plname,n.latin1(),sizeof(g.plname)-1); +} + +void NetHackQtPlayerSelector::selectRole() +{ + int ra = race->selectedItemNumber(); + int ro = role->selectedItemNumber(); + if (ra == -1 || ro == -1) return; + +#ifdef QT_CHOOSE_RACE_FIRST + selectRace(); +#else + QListViewItem* i=role->currentItem(); + QListViewItem* valid=0; + int j; + NhPSListViewItem* item; + item = (NhPSListViewItem*)role->firstChild(); + for (j=0; roles[j].name.m; j++) { + bool v = validrace(j,ra); + item->setSelectable(TRUE); + if ( !valid && v ) valid = item; + item=(NhPSListViewItem*)item->nextSibling(); + } + if ( !validrace(role->selectedItemNumber(),ra) ) + i = valid; + role->setSelected(i,TRUE); + item = (NhPSListViewItem*)role->firstChild(); + for (j=0; roles[j].name.m; j++) { + bool v = validrace(j,ra); + item->setSelectable(v); + item->repaint(); + item=(NhPSListViewItem*)item->nextSibling(); + } +#endif + + flags.initrole = role->selectedItemNumber(); + setupOthers(); +} + +void NetHackQtPlayerSelector::selectRace() +{ + int ra = race->selectedItemNumber(); + int ro = role->selectedItemNumber(); + if (ra == -1 || ro == -1) return; + +#ifndef QT_CHOOSE_RACE_FIRST + selectRole(); +#else + QListViewItem* i=race->currentItem(); + QListViewItem* valid=0; + int j; + NhPSListViewItem* item; + item = (NhPSListViewItem*)race->firstChild(); + for (j=0; races[j].noun; j++) { + bool v = validrace(ro,j); + item->setSelectable(TRUE); + if ( !valid && v ) valid = item; + item=(NhPSListViewItem*)item->nextSibling(); + } + if ( !validrace(ro,race->selectedItemNumber()) ) + i = valid; + race->setSelected(i,TRUE); + item = (NhPSListViewItem*)race->firstChild(); + for (j=0; races[j].noun; j++) { + bool v = validrace(ro,j); + item->setSelectable(v); + item->repaint(); + item=(NhPSListViewItem*)item->nextSibling(); + } +#endif + + flags.initrace = race->selectedItemNumber(); + setupOthers(); +} + +void NetHackQtPlayerSelector::setupOthers() +{ + int ro = role->selectedItemNumber(); + int ra = race->selectedItemNumber(); + int valid=-1; + int c=0; + int j; + for (j=0; jisChecked() ) + c = j; + gender[j]->setEnabled(v); + if ( valid<0 && v ) valid = j; + } + if ( !validgend(ro,ra,c) ) + c = valid; + int k; + for (k=0; ksetChecked(c==k); + } + selectGender(c); + + valid=-1; + for (j=0; jisChecked() ) + c = j; + alignment[j]->setEnabled(v); + if ( valid<0 && v ) valid = j; + } + if ( !validalign(ro,ra,c) ) + c = valid; + for (k=0; ksetChecked(c==k); + } + selectAlignment(c); +} + +void NetHackQtPlayerSelector::selectGender(int i) +{ + flags.initgend = i; +} + +void NetHackQtPlayerSelector::selectAlignment(int i) +{ + flags.initalign = i; +} + + +void NetHackQtPlayerSelector::done(int i) +{ + setResult(i); + qApp->exit_loop(); +} + +void NetHackQtPlayerSelector::Quit() +{ + done(R_Quit); + qApp->exit_loop(); +} + +void NetHackQtPlayerSelector::Random() +{ + done(R_Rand); + qApp->exit_loop(); +} + +bool NetHackQtPlayerSelector::Choose() +{ + if (fully_specified_role) return TRUE; + +#if defined(QWS) // probably safe with Qt 3, too (where show!=exec in QDialog). + if ( qt_compact_mode ) { + showMaximized(); + } else +#endif + { + adjustSize(); + centerOnMain(this); + } + + if ( exec() ) { + return TRUE; + } else { + return FALSE; + } +} + + +NetHackQtStringRequestor::NetHackQtStringRequestor(NetHackQtKeyBuffer& ks, const char* p, const char* cancelstr) : + QDialog(qApp->mainWidget(),"string",FALSE), + prompt(p,this,"prompt"), + input(this,"input"), + keysource(ks) +{ + cancel=new QPushButton(cancelstr,this); + connect(cancel,SIGNAL(clicked()),this,SLOT(reject())); + + okay=new QPushButton("Okay",this); + connect(okay,SIGNAL(clicked()),this,SLOT(accept())); + connect(&input,SIGNAL(returnPressed()),this,SLOT(accept())); + okay->setDefault(TRUE); + + setFocusPolicy(StrongFocus); +} + +void NetHackQtStringRequestor::resizeEvent(QResizeEvent*) +{ + const int margin=5; + const int gutter=5; + + int h=(height()-margin*2-gutter); + + if (strlen(prompt.text()) > 16) { + h/=3; + prompt.setGeometry(margin,margin,width()-margin*2,h); + input.setGeometry(width()*1/5,margin+h+gutter, + (width()-margin-2-gutter)*4/5,h); + } else { + h/=2; + prompt.setGeometry(margin,margin,(width()-margin*2-gutter)*2/5,h); + input.setGeometry(prompt.geometry().right()+gutter,margin, + (width()-margin-2-gutter)*3/5,h); + } + + cancel->setGeometry(margin,input.geometry().bottom()+gutter, + (width()-margin*2-gutter)/2,h); + okay->setGeometry(cancel->geometry().right()+gutter,cancel->geometry().y(), + cancel->width(),h); +} + +void NetHackQtStringRequestor::SetDefault(const char* d) +{ + input.setText(d); +} + +bool NetHackQtStringRequestor::Get(char* buffer, int maxchar) +{ + input.setMaxLength(maxchar); + if (strlen(prompt.text()) > 16) { + resize(fontMetrics().width(prompt.text())+50,fontMetrics().height()*6); + } else { + resize(fontMetrics().width(prompt.text())*2+50,fontMetrics().height()*4); + } + + centerOnMain(this); + show(); + input.setFocus(); + setResult(-1); + while (result()==-1) { + // Put keys in buffer (eg. from macros, from out-of-focus input) + if (!keysource.Empty()) { + while (!keysource.Empty()) { + int key=keysource.TopKey(); + int ascii=keysource.TopAscii(); + int state=keysource.GetState(); + if (ascii=='\r' || ascii=='\n') { + // CR or LF in buffer causes confirmation + strcpy(buffer,input.text()); + return TRUE; + } else if (ascii=='\033') { + return FALSE; + } else { + input.fakeEvent(key,ascii,state); + } + } + } + qApp->enter_loop(); + } + // XXX Get rid of extra keys, since we couldn't get focus! + while (!keysource.Empty()) keysource.GetKey(); + + if (result()) { + strcpy(buffer,input.text()); + return TRUE; + } else { + return FALSE; + } +} +void NetHackQtStringRequestor::done(int i) +{ + setResult(i); + qApp->exit_loop(); +} + + +NetHackQtWindow::NetHackQtWindow() +{ +} + +NetHackQtWindow::~NetHackQtWindow() +{ +} + +// XXX Use "expected ..." for now, abort or default later. +// +void NetHackQtWindow::Clear() { puts("unexpected Clear"); } +void NetHackQtWindow::Display(bool block) { puts("unexpected Display"); } +bool NetHackQtWindow::Destroy() { return TRUE; } +void NetHackQtWindow::CursorTo(int x,int y) { puts("unexpected CursorTo"); } +void NetHackQtWindow::PutStr(int attr, const char* text) { puts("unexpected PutStr"); } +void NetHackQtWindow::StartMenu() { puts("unexpected StartMenu"); } +void NetHackQtWindow::AddMenu(int glyph, const ANY_P* identifier, char ch, char gch, int attr, + const char* str, bool presel) { puts("unexpected AddMenu"); } +void NetHackQtWindow::EndMenu(const char* prompt) { puts("unexpected EndMenu"); } +int NetHackQtWindow::SelectMenu(int how, MENU_ITEM_P **menu_list) { puts("unexpected SelectMenu"); return 0; } +void NetHackQtWindow::ClipAround(int x,int y) { puts("unexpected ClipAround"); } +void NetHackQtWindow::PrintGlyph(int x,int y,int glyph) { puts("unexpected PrintGlyph"); } +//void NetHackQtWindow::PrintGlyphCompose(int x,int y,int,int) { puts("unexpected PrintGlyphCompose"); } +void NetHackQtWindow::UseRIP(int how, time_t when) { puts("unexpected UseRIP"); } + + + +// XXX Hmmm... crash after saving bones file if Map window is +// XXX deleted. Strange bug somewhere. +bool NetHackQtMapWindow::Destroy() { return FALSE; } + +NetHackQtMapWindow::NetHackQtMapWindow(NetHackQtClickBuffer& click_sink) : + clicksink(click_sink), + change(10), + rogue_font(0) +{ + viewport.addChild(this); + + setBackgroundColor(black); + viewport.setBackgroundColor(black); + + pet_annotation = QPixmap(qt_compact_mode ? pet_mark_small_xpm : pet_mark_xpm); + + cursor.setX(0); + cursor.setY(0); + Clear(); + + connect(qt_settings,SIGNAL(tilesChanged()),this,SLOT(updateTiles())); + connect(&viewport, SIGNAL(contentsMoving(int,int)), this, + SLOT(moveMessages(int,int))); + + updateTiles(); + //setFocusPolicy(StrongFocus); +#ifdef SAFERHANGUP + QTimer* deadman = new QTimer(this); + connect(deadman, SIGNAL(timeout()), SLOT(timeout())); + deadman->start(2000); // deadman timer every 2 seconds +#endif +} + +#ifdef SAFERHANGUP +// The "deadman" timer is received by this slot +void NetHackQtMapWindow::timeout() {} +#endif + +void NetHackQtMapWindow::moveMessages(int x, int y) +{ + QRect u = messages_rect; + messages_rect.moveTopLeft(QPoint(x,y)); + u |= messages_rect; + update(u); +} + +void NetHackQtMapWindow::clearMessages() +{ + messages = ""; + update(messages_rect); + messages_rect = QRect(); +} + +void NetHackQtMapWindow::putMessage(int attr, const char* text) +{ + if ( !messages.isEmpty() ) + messages += "\n"; + messages += text; + QFontMetrics fm = fontMetrics(); + messages_rect = fm.boundingRect(viewport.contentsX(), viewport.contentsY(), + viewport.width(), 0, + WordBreak|AlignTop|AlignLeft|DontClip, + messages); + update(messages_rect); +} + +void NetHackQtMapWindow::updateTiles() +{ + NetHackQtGlyphs& glyphs = qt_settings->glyphs(); + int gw = glyphs.width(); + int gh = glyphs.height(); + // Be exactly the size we want to be - full map... + resize(COLNO*gw,ROWNO*gh); + + viewport.verticalScrollBar()->setSteps(gh,gh); + viewport.horizontalScrollBar()->setSteps(gw,gw); + /* + viewport.setMaximumSize( + gw*COLNO + viewport.verticalScrollBar()->width(), + gh*ROWNO + viewport.horizontalScrollBar()->height() + ); + */ + viewport.updateScrollBars(); + + change.clear(); + change.add(0,0,COLNO,ROWNO); + delete rogue_font; rogue_font = 0; + Display(FALSE); + + emit resized(); +} + +NetHackQtMapWindow::~NetHackQtMapWindow() +{ + // Remove from viewport porthole, since that is a destructible member. + viewport.removeChild(this); + recreate(0,0,QPoint(0,0)); +} + +QWidget* NetHackQtMapWindow::Widget() +{ + return &viewport; +} + +void NetHackQtMapWindow::Scroll(int dx, int dy) +{ + if (viewport.horizontalScrollBar()->isVisible()) { + while (dx<0) { viewport.horizontalScrollBar()->subtractPage(); dx++; } + while (dx>0) { viewport.horizontalScrollBar()->addPage(); dx--; } + } + if (viewport.verticalScrollBar()->isVisible()) { + while (dy<0) { viewport.verticalScrollBar()->subtractPage(); dy++; } + while (dy>0) { viewport.verticalScrollBar()->addPage(); dy--; } + } +} + +void NetHackQtMapWindow::Clear() +{ + unsigned short stone=cmap_to_glyph(S_stone); + + for (int j=0; jexit_loop(); +} + +void NetHackQtMapWindow::mousePressEvent(QMouseEvent* event) +{ + clicksink.Put( + event->pos().x()/qt_settings->glyphs().width(), + event->pos().y()/qt_settings->glyphs().height(), + event->button()==LeftButton ? CLICK_1 : CLICK_2 + ); + qApp->exit_loop(); +} + +#ifdef TEXTCOLOR +static +const QPen& nhcolor_to_pen(int c) +{ + static QPen* pen=0; + if ( !pen ) { + pen = new QPen[17]; + pen[0] = QColor(24,24,24); // "black" on black + pen[1] = Qt::red; + pen[2] = QColor(0,191,0); + pen[3] = QColor(127,127,0); + pen[4] = Qt::blue; + pen[5] = Qt::magenta; + pen[6] = Qt::cyan; + pen[7] = Qt::gray; + pen[8] = Qt::white; // no color + pen[9] = QColor(255,127,0); + pen[10] = QColor(127,255,127); + pen[11] = Qt::yellow; + pen[12] = QColor(127,127,255); + pen[13] = QColor(255,127,255); + pen[14] = QColor(127,255,255); + pen[15] = Qt::white; + pen[16] = QColor(24,24,24); // "black" on black + } + + return pen[c]; +} +#endif + +void NetHackQtMapWindow::paintEvent(QPaintEvent* event) +{ + QRect area=event->rect(); + QRect garea; + garea.setCoords( + QMAX(0,area.left()/qt_settings->glyphs().width()), + QMAX(0,area.top()/qt_settings->glyphs().height()), + QMIN(COLNO-1,area.right()/qt_settings->glyphs().width()), + QMIN(ROWNO-1,area.bottom()/qt_settings->glyphs().height()) + ); + + QPainter painter; + + painter.begin(this); + + if (Is_rogue_level(&u.uz) || iflags.wc_ascii_map) + { + // You enter a VERY primitive world! + + painter.setClipRect( event->rect() ); // (normally we don't clip) + painter.fillRect( event->rect(), black ); + + if ( !rogue_font ) { + // Find font... + int pts = 5; + QString fontfamily = iflags.wc_font_map + ? iflags.wc_font_map : "Courier"; + bool bold = FALSE; + if ( fontfamily.right(5).lower() == "-bold" ) { + fontfamily.truncate(fontfamily.length()-5); + bold = TRUE; + } + while ( pts < 32 ) { + QFont f(fontfamily, pts, bold ? QFont::Bold : QFont::Normal); + painter.setFont(QFont(fontfamily, pts)); + QFontMetrics fm = painter.fontMetrics(); + if ( fm.width("M") > qt_settings->glyphs().width() ) + break; + if ( fm.height() > qt_settings->glyphs().height() ) + break; + pts++; + } + rogue_font = new QFont(fontfamily,pts-1); + } + painter.setFont(*rogue_font); + + for (int j=garea.top(); j<=garea.bottom(); j++) { + for (int i=garea.left(); i<=garea.right(); i++) { + unsigned short g=Glyph(i,j); + uchar ch; + int color, och; + unsigned special; + + painter.setPen( green ); + /* map glyph to character and color */ + (void)mapglyph(g, &och, &color, &special, i, j, 0); + ch = (uchar)och; +#ifdef TEXTCOLOR + painter.setPen( nhcolor_to_pen(color) ); +#endif + painter.drawText( + i*qt_settings->glyphs().width(), + j*qt_settings->glyphs().height(), + qt_settings->glyphs().width(), + qt_settings->glyphs().height(), + AlignCenter, + (const char*)&ch, 1 + ); + if (glyph_is_pet(g) +#ifdef TEXTCOLOR + && ::iflags.hilite_pet +#endif + ) { + painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(), + j*qt_settings->glyphs().height()), + pet_annotation); + } + } + } + + painter.setFont(font()); + } else { + for (int j=garea.top(); j<=garea.bottom(); j++) { + for (int i=garea.left(); i<=garea.right(); i++) { + unsigned short g=Glyph(i,j); + qt_settings->glyphs().drawCell(painter, g, i, j); + if (glyph_is_pet(g) +#ifdef TEXTCOLOR + && ::iflags.hilite_pet +#endif + ) { + painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(), + j*qt_settings->glyphs().height()), + pet_annotation); + } + } + } + } + + if (garea.contains(cursor)) { + if (Is_rogue_level(&u.uz)) { +#ifdef TEXTCOLOR + painter.setPen( white ); +#else + painter.setPen( green ); // REALLY primitive +#endif + } else + { + int hp100; + if (u.mtimedone) { + hp100=u.mhmax ? u.mh*100/u.mhmax : 100; + } else { + hp100=u.uhpmax ? u.uhp*100/u.uhpmax : 100; + } + + if (hp100 > 75) painter.setPen(white); + else if (hp100 > 50) painter.setPen(yellow); + else if (hp100 > 25) painter.setPen(QColor(0xff,0xbf,0x00)); // orange + else if (hp100 > 10) painter.setPen(red); + else painter.setPen(magenta); + } + + painter.drawRect( + cursor.x()*qt_settings->glyphs().width(),cursor.y()*qt_settings->glyphs().height(), + qt_settings->glyphs().width(),qt_settings->glyphs().height()); + } + + if (area.intersects(messages_rect)) { + painter.setPen(black); + painter.drawText(viewport.contentsX()+1,viewport.contentsY()+1, + viewport.width(),0, WordBreak|AlignTop|AlignLeft|DontClip, messages); + painter.setPen(white); + painter.drawText(viewport.contentsX(),viewport.contentsY(), + viewport.width(),0, WordBreak|AlignTop|AlignLeft|DontClip, messages); + } + + painter.end(); +} + +void NetHackQtMapWindow::Display(bool block) +{ + for (int i=0; iglyphs().width(), + ch.y()*qt_settings->glyphs().height(), + ch.width()*qt_settings->glyphs().width(), + ch.height()*qt_settings->glyphs().height(), + FALSE + ); + } + + change.clear(); + + if (block) { + yn_function("Press a key when done viewing",0,'\0'); + } +} + +void NetHackQtMapWindow::CursorTo(int x,int y) +{ + Changed(cursor.x(),cursor.y()); + cursor.setX(x); + cursor.setY(y); + Changed(cursor.x(),cursor.y()); +} + +void NetHackQtMapWindow::PutStr(int attr, const char* text) +{ + puts("unexpected PutStr in MapWindow"); +} + +void NetHackQtMapWindow::ClipAround(int x,int y) +{ + // Convert to pixel of center of tile + x=x*qt_settings->glyphs().width()+qt_settings->glyphs().width()/2; + y=y*qt_settings->glyphs().height()+qt_settings->glyphs().height()/2; + + // Then ensure that pixel is visible + viewport.center(x,y,0.45,0.45); +} + +void NetHackQtMapWindow::PrintGlyph(int x,int y,int glyph) +{ + Glyph(x,y)=glyph; + Changed(x,y); +} + +//void NetHackQtMapWindow::PrintGlyphCompose(int x,int y,int glyph1, int glyph2) +//{ + // TODO: composed graphics +//} + +void NetHackQtMapWindow::Changed(int x, int y) +{ + change.add(x,y); +} + + +class NetHackQtScrollText : public QTableView { + struct UData { + UData() : text(0), attr(0) { } + ~UData() { if (text) free(text); } + + char* text; + int attr; + }; +public: + int uncleared; + + NetHackQtScrollText(int maxlength) : + uncleared(0), + maxitems(maxlength), + first(0), + count(0), + item_cycle(maxlength) + { + setNumCols(1); + setCellWidth(200); + setCellHeight(fontMetrics().height()); + setBackgroundColor(white); + setTableFlags(Tbl_vScrollBar + |Tbl_autoHScrollBar + |Tbl_clipCellPainting + |Tbl_smoothScrolling); + } + + ~NetHackQtScrollText() + { + } + + void Scroll(int dx, int dy) + { + setXOffset(xOffset()+dx*viewWidth()); + setYOffset(yOffset()+dy*viewHeight()); + } + + void insertItem(int attr, const char* text) + { + setTopCell(count); + + setAutoUpdate(FALSE); + + int i; + if (count cellWidth()) { + // Get wider. + setCellWidth(w); + } + setTopCell(count); + + setAutoUpdate(TRUE); + + if (viewHeight() >= totalHeight()-cellHeight()) { + repaint(); + } else { + scroll(0,cellHeight()); + } + } + + virtual void setFont(const QFont& font) + { + QTableView::setFont(font); + setCellHeight(fontMetrics().height()); + } + +protected: + + UData& item(int i) + { + return item_cycle[(first+i)%maxitems]; + } + + const int maxitems; + int first, count; + QArray item_cycle; + + int datumWidth(const UData& uitem) + { + if (uitem.text) { + int width=fontMetrics().width(uitem.text)+3; + if (uitem.attr) { + // XXX Too expensive to do properly, because + // XXX we have to set the font of the widget + // XXX just to get the font metrics information! + // XXX Could hold a fake widget for that + // XXX purpose, but this hack is less ugly. + width+=width/10; + } + return width; + } else { + return 0; + } + } + + virtual void setupPainter(QPainter *p) + { + // XXX This shouldn't be needed - we set the bg in the constructor. + p->setBackgroundColor(white); + } + + virtual void paintCell(QPainter *p, int row, int col) + { + bool sel=FALSE; + UData& uitem=item(row); + + if (!sel && row < count-uncleared) { + p->setPen(darkGray); + } else { + p->setPen(black); + } + + if (uitem.attr) { + // XXX only bold + QFont bold(font().family(),font().pointSize(),QFont::Bold); + p->setFont(bold); + } + + p->drawText(3, 0, cellWidth(), cellHeight(), + AlignLeft|AlignVCenter, uitem.text); + + if (uitem.attr) { + p->setFont(font()); + } + } +}; + +NetHackQtMessageWindow::NetHackQtMessageWindow() : + list(new NetHackQtScrollText(::iflags.msg_history)) +{ + ::iflags.window_inited = 1; + map = 0; + connect(qt_settings,SIGNAL(fontChanged()),this,SLOT(updateFont())); + updateFont(); +} + +NetHackQtMessageWindow::~NetHackQtMessageWindow() +{ + ::iflags.window_inited = 0; + delete list; +} + +QWidget* NetHackQtMessageWindow::Widget() { return list; } + +void NetHackQtMessageWindow::setMap(NetHackQtMapWindow* m) +{ + map = m; + updateFont(); +} + +void NetHackQtMessageWindow::updateFont() +{ + list->setFont(qt_settings->normalFont()); + if ( map ) + map->setFont(qt_settings->normalFont()); +} + +void NetHackQtMessageWindow::Scroll(int dx, int dy) +{ + list->Scroll(dx,dy); +} + +void NetHackQtMessageWindow::Clear() +{ + if ( map ) + map->clearMessages(); + if (list->uncleared) { + list->uncleared=0; + changed=TRUE; + Display(FALSE); + } +} + +void NetHackQtMessageWindow::Display(bool block) +{ + if (changed) { + list->repaint(); + changed=FALSE; + } +} + +void NetHackQtMessageWindow::PutStr(int attr, const char* text) +{ +#ifdef USER_SOUNDS + play_sound_for_message(text); +#endif + + changed=TRUE; + list->uncleared++; + list->insertItem(attr,text); + + // Force scrollbar to bottom + // XXX list->setTopItem(list->count()); + + if ( map ) + map->putMessage(attr, text); +} + + + +NetHackQtLabelledIcon::NetHackQtLabelledIcon(QWidget* parent, const char* l) : + QWidget(parent), + low_is_good(FALSE), + prev_value(-123), + turn_count(-1), + label(new QLabel(l,this)), + icon(0) +{ + initHighlight(); +} +NetHackQtLabelledIcon::NetHackQtLabelledIcon(QWidget* parent, const char* l, const QPixmap& i) : + QWidget(parent), + low_is_good(FALSE), + prev_value(-123), + turn_count(-1), + label(new QLabel(l,this)), + icon(new QLabel(this)) +{ + setIcon(i); + initHighlight(); +} +void NetHackQtLabelledIcon::initHighlight() +{ + const QPalette& pal=palette(); + const QColorGroup& pa=pal.normal(); + //QColorGroup good(white,darkGreen,pa.light(),pa.dark(),pa.mid(),white,pa.base()); + QColorGroup good(black,green,pa.light(),pa.dark(),pa.mid(),black,pa.base()); + QColorGroup bad(white,red,pa.light(),pa.dark(),pa.mid(),white,pa.base()); + hl_good=pal.copy(); + hl_good.setNormal(good); + hl_good.setActive(good); + hl_bad=pal.copy(); + hl_bad.setNormal(bad); + hl_bad.setActive(bad); +} + +void NetHackQtLabelledIcon::setLabel(const char* t, bool lower) +{ + if (!label) { + label=new QLabel(this); + label->setFont(font()); + resizeEvent(0); + } + if (0!=strcmp(label->text(),t)) { + label->setText(t); + highlight(lower==low_is_good ? hl_good : hl_bad); + } +} +void NetHackQtLabelledIcon::setLabel(const char* t, long v, long cv, const char* tail) +{ + char buf[BUFSZ]; + if (v==NoNum) { + Sprintf(buf,"%s%s",t,tail); + } else { + Sprintf(buf,"%s%ld%s",t,v,tail); + } + setLabel(buf,cvsetPixmap(i); + else { icon=new QLabel(this); icon->setPixmap(i); resizeEvent(0); } + icon->resize(i.width(),i.height()); +} +void NetHackQtLabelledIcon::setFont(const QFont& f) +{ + QWidget::setFont(f); + if (label) label->setFont(f); +} +void NetHackQtLabelledIcon::show() +{ +#if QT_VERSION >= 300 + if (isHidden()) +#else + if (!isVisible()) +#endif + highlight(hl_bad); + QWidget::show(); +} +void NetHackQtLabelledIcon::highlightWhenChanging() +{ + turn_count=0; +} +void NetHackQtLabelledIcon::lowIsGood() +{ + low_is_good=TRUE; +} +void NetHackQtLabelledIcon::dissipateHighlight() +{ + if (turn_count>0) { + turn_count--; + if (!turn_count) + unhighlight(); + } +} +void NetHackQtLabelledIcon::highlight(const QPalette& hl) +{ + if (label) { // Surely it is?! + if (turn_count>=0) { + label->setPalette(hl); + turn_count=4; + // `4' includes this turn, so dissipates after + // 3 more keypresses. + } else { + label->setPalette(palette()); + } + } +} +void NetHackQtLabelledIcon::unhighlight() +{ + if (label) { // Surely it is?! + label->setPalette(palette()); + } +} +void NetHackQtLabelledIcon::resizeEvent(QResizeEvent*) +{ + setAlignments(); + + //int labw=label ? label->fontMetrics().width(label->text()) : 0; + int labh=label ? label->fontMetrics().height() : 0; + int icoh=icon ? icon->height() : 0; + int h=icoh+labh; + int icoy=(h>height() ? height()-labh-icoh : height()/2-h/2); + int laby=icoy+icoh; + if (icon) { + icon->setGeometry(0,icoy,width(),icoh); + } + if (label) { + label->setGeometry(0,laby,width(),labh); + } +} + +void NetHackQtLabelledIcon::setAlignments() +{ + if (label) label->setAlignment(AlignHCenter|AlignVCenter); + if (icon) icon->setAlignment(AlignHCenter|AlignVCenter); +} + +static void +tryload(QPixmap& pm, const char* fn) +{ + if (!pm.load(fn)) { + QString msg; + msg.sprintf("Cannot load \"%s\"", fn); + QMessageBox::warning(0, "IO Error", msg); + } +} + +NetHackQtStatusWindow::NetHackQtStatusWindow() : + // Notes: + // Alignment needs -2 init value, because -1 is an alignment. + // Armor Class is an schar, so 256 is out of range. + // Blank value is 0 and should never change. + name(this,"(name)"), + dlevel(this,"(dlevel)"), + str(this,"STR"), + dex(this,"DEX"), + con(this,"CON"), + intel(this,"INT"), + wis(this,"WIS"), + cha(this,"CHA"), + gold(this,"Gold"), + hp(this,"Hit Points"), + power(this,"Power"), + ac(this,"Armour Class"), + level(this,"Level"), + exp(this,"Experience"), + align(this,"Alignment"), + time(this,"Time"), + score(this,"Score"), + hunger(this,""), + confused(this,"Confused"), + sick_fp(this,"Sick"), + sick_il(this,"Ill"), + blind(this,"Blind"), + stunned(this,"Stunned"), + hallu(this,"Hallu"), + encumber(this,""), + hline1(this), + hline2(this), + hline3(this), + first_set(TRUE) +{ + p_str = QPixmap(str_xpm); + p_str = QPixmap(str_xpm); + p_dex = QPixmap(dex_xpm); + p_con = QPixmap(cns_xpm); + p_int = QPixmap(int_xpm); + p_wis = QPixmap(wis_xpm); + p_cha = QPixmap(cha_xpm); + + p_chaotic = QPixmap(chaotic_xpm); + p_neutral = QPixmap(neutral_xpm); + p_lawful = QPixmap(lawful_xpm); + + p_satiated = QPixmap(satiated_xpm); + p_hungry = QPixmap(hungry_xpm); + + p_confused = QPixmap(confused_xpm); + p_sick_fp = QPixmap(sick_fp_xpm); + p_sick_il = QPixmap(sick_il_xpm); + p_blind = QPixmap(blind_xpm); + p_stunned = QPixmap(stunned_xpm); + p_hallu = QPixmap(hallu_xpm); + + p_encumber[0] = QPixmap(slt_enc_xpm); + p_encumber[1] = QPixmap(mod_enc_xpm); + p_encumber[2] = QPixmap(hvy_enc_xpm); + p_encumber[3] = QPixmap(ext_enc_xpm); + p_encumber[4] = QPixmap(ovr_enc_xpm); + + str.setIcon(p_str); + dex.setIcon(p_dex); + con.setIcon(p_con); + intel.setIcon(p_int); + wis.setIcon(p_wis); + cha.setIcon(p_cha); + + align.setIcon(p_neutral); + hunger.setIcon(p_hungry); + + confused.setIcon(p_confused); + sick_fp.setIcon(p_sick_fp); + sick_il.setIcon(p_sick_il); + blind.setIcon(p_blind); + stunned.setIcon(p_stunned); + hallu.setIcon(p_hallu); + + encumber.setIcon(p_encumber[0]); + + hline1.setFrameStyle(QFrame::HLine|QFrame::Sunken); + hline2.setFrameStyle(QFrame::HLine|QFrame::Sunken); + hline3.setFrameStyle(QFrame::HLine|QFrame::Sunken); + hline1.setLineWidth(1); + hline2.setLineWidth(1); + hline3.setLineWidth(1); + + connect(qt_settings,SIGNAL(fontChanged()),this,SLOT(doUpdate())); + doUpdate(); +} + +void NetHackQtStatusWindow::doUpdate() +{ + const QFont& large=qt_settings->largeFont(); + name.setFont(large); + dlevel.setFont(large); + + const QFont& normal=qt_settings->normalFont(); + str.setFont(normal); + dex.setFont(normal); + con.setFont(normal); + intel.setFont(normal); + wis.setFont(normal); + cha.setFont(normal); + gold.setFont(normal); + hp.setFont(normal); + power.setFont(normal); + ac.setFont(normal); + level.setFont(normal); + exp.setFont(normal); + align.setFont(normal); + time.setFont(normal); + score.setFont(normal); + hunger.setFont(normal); + confused.setFont(normal); + sick_fp.setFont(normal); + sick_il.setFont(normal); + blind.setFont(normal); + stunned.setFont(normal); + hallu.setFont(normal); + encumber.setFont(normal); + + updateStats(); +} + +QWidget* NetHackQtStatusWindow::Widget() { return this; } + +void NetHackQtStatusWindow::Clear() +{ +} +void NetHackQtStatusWindow::Display(bool block) +{ +} +void NetHackQtStatusWindow::CursorTo(int,int y) +{ + cursy=y; +} +void NetHackQtStatusWindow::PutStr(int attr, const char* text) +{ + // do a complete update when line 0 is done (as per X11 fancy status) + if (cursy==0) updateStats(); +} + +void NetHackQtStatusWindow::resizeEvent(QResizeEvent*) +{ + const float SP_name=0.13; // the (large) + const float SP_dlev=0.13; // Level 3 in The Dungeons of Doom (large) + const float SP_atr1=0.25; // STR DEX CON INT WIS CHA + const float SP_hln1=0.02; // --- + const float SP_atr2=0.09; // Au HP PW AC LVL EXP + const float SP_hln2=0.02; // --- + const float SP_time=0.09; // time score + const float SP_hln3=0.02; // --- + const float SP_stat=0.25; // Alignment, Poisoned, Hungry, Sick, etc. + + int h=height(); + int x=0,y=0; + + int iw; // Width of an item across line + int lh; // Height of a line of values + + lh=int(h*SP_name); + name.setGeometry(0,0,width(),lh); y+=lh; + lh=int(h*SP_dlev); + dlevel.setGeometry(0,y,width(),lh); y+=lh; + + lh=int(h*SP_hln1); + hline1.setGeometry(0,y,width(),lh); y+=lh; + + lh=int(h*SP_atr1); + iw=width()/6; + str.setGeometry(x,y,iw,lh); x+=iw; + dex.setGeometry(x,y,iw,lh); x+=iw; + con.setGeometry(x,y,iw,lh); x+=iw; + intel.setGeometry(x,y,iw,lh); x+=iw; + wis.setGeometry(x,y,iw,lh); x+=iw; + cha.setGeometry(x,y,iw,lh); x+=iw; + x=0; y+=lh; + + lh=int(h*SP_hln2); + hline2.setGeometry(0,y,width(),lh); y+=lh; + + lh=int(h*SP_atr2); + iw=width()/6; + gold.setGeometry(x,y,iw,lh); x+=iw; + hp.setGeometry(x,y,iw,lh); x+=iw; + power.setGeometry(x,y,iw,lh); x+=iw; + ac.setGeometry(x,y,iw,lh); x+=iw; + level.setGeometry(x,y,iw,lh); x+=iw; + exp.setGeometry(x,y,iw,lh); x+=iw; + x=0; y+=lh; + + lh=int(h*SP_hln3); + hline3.setGeometry(0,y,width(),lh); y+=lh; + + lh=int(h*SP_time); + iw=width()/3; x+=iw/2; + time.setGeometry(x,y,iw,lh); x+=iw; + score.setGeometry(x,y,iw,lh); x+=iw; + x=0; y+=lh; + + lh=int(h*SP_stat); + iw=width()/9; + align.setGeometry(x,y,iw,lh); x+=iw; + hunger.setGeometry(x,y,iw,lh); x+=iw; + confused.setGeometry(x,y,iw,lh); x+=iw; + sick_fp.setGeometry(x,y,iw,lh); x+=iw; + sick_il.setGeometry(x,y,iw,lh); x+=iw; + blind.setGeometry(x,y,iw,lh); x+=iw; + stunned.setGeometry(x,y,iw,lh); x+=iw; + hallu.setGeometry(x,y,iw,lh); x+=iw; + encumber.setGeometry(x,y,iw,lh); x+=iw; + x=0; y+=lh; +} + + +/* + * Set all widget values to a null string. This is used after all spacings + * have been calculated so that when the window is popped up we don't get all + * kinds of funny values being displayed. + */ +void NetHackQtStatusWindow::nullOut() +{ +} + +void NetHackQtStatusWindow::fadeHighlighting() +{ + name.dissipateHighlight(); + dlevel.dissipateHighlight(); + + str.dissipateHighlight(); + dex.dissipateHighlight(); + con.dissipateHighlight(); + intel.dissipateHighlight(); + wis.dissipateHighlight(); + cha.dissipateHighlight(); + + gold.dissipateHighlight(); + hp.dissipateHighlight(); + power.dissipateHighlight(); + ac.dissipateHighlight(); + level.dissipateHighlight(); + exp.dissipateHighlight(); + align.dissipateHighlight(); + + time.dissipateHighlight(); + score.dissipateHighlight(); + + hunger.dissipateHighlight(); + confused.dissipateHighlight(); + sick_fp.dissipateHighlight(); + sick_il.dissipateHighlight(); + blind.dissipateHighlight(); + stunned.dissipateHighlight(); + hallu.dissipateHighlight(); + encumber.dissipateHighlight(); +} + +/* + * Update the displayed status. The current code in botl.c updates + * two lines of information. Both lines are always updated one after + * the other. So only do our update when we update the second line. + * + * Information on the first line: + * name, attributes, alignment, score + * + * Information on the second line: + * dlvl, gold, hp, power, ac, {level & exp or HD **} + * status (hunger, conf, halu, stun, sick, blind), time, encumbrance + * + * [**] HD is shown instead of level and exp if mtimedone is non-zero. + */ +void NetHackQtStatusWindow::updateStats() +{ + if (!parentWidget()) return; + + char buf[BUFSZ]; + + if (cursy != 0) return; /* do a complete update when line 0 is done */ + + if (ACURR(A_STR) > 118) { + Sprintf(buf,"STR:%d",ACURR(A_STR)-100); + } else if (ACURR(A_STR)==118) { + Sprintf(buf,"STR:18/**"); + } else if(ACURR(A_STR) > 18) { + Sprintf(buf,"STR:18/%02d",ACURR(A_STR)-18); + } else { + Sprintf(buf,"STR:%d",ACURR(A_STR)); + } + str.setLabel(buf,NetHackQtLabelledIcon::NoNum,ACURR(A_STR)); + + dex.setLabel("DEX:",(long)ACURR(A_DEX)); + con.setLabel("CON:",(long)ACURR(A_CON)); + intel.setLabel("INT:",(long)ACURR(A_INT)); + wis.setLabel("WIS:",(long)ACURR(A_WIS)); + cha.setLabel("CHA:",(long)ACURR(A_CHA)); + const char* hung=hu_stat[u.uhs]; + if (hung[0]==' ') { + hunger.hide(); + } else { + hunger.setIcon(u.uhs ? p_hungry : p_satiated); + hunger.setLabel(hung); + hunger.show(); + } + if (Confusion) confused.show(); else confused.hide(); + if (Sick) { + if (u.usick_type & SICK_VOMITABLE) { + sick_fp.show(); + } else { + sick_fp.hide(); + } + if (u.usick_type & SICK_NONVOMITABLE) { + sick_il.show(); + } else { + sick_il.hide(); + } + } else { + sick_fp.hide(); + sick_il.hide(); + } + if (Blind) blind.show(); else blind.hide(); + if (Stunned) stunned.show(); else stunned.hide(); + if (Hallucination) hallu.show(); else hallu.hide(); + const char* enc=enc_stat[near_capacity()]; + if (enc[0]==' ' || !enc[0]) { + encumber.hide(); + } else { + encumber.setIcon(p_encumber[near_capacity()-1]); + encumber.setLabel(enc); + encumber.show(); + } + Strcpy(buf, g.plname); + if ('a' <= buf[0] && buf[0] <= 'z') buf[0] += 'A'-'a'; + Strcat(buf, " the "); + if (u.mtimedone) { + char mname[BUFSZ]; + int k = 0; + + Strcpy(mname, mons[u.umonnum].mname); + while(mname[k] != 0) { + if ((k == 0 || (k > 0 && mname[k-1] == ' ')) + && 'a' <= mname[k] && mname[k] <= 'z') + { + mname[k] += 'A' - 'a'; + } + k++; + } + Strcat(buf, mname); + } else { + Strcat(buf, rank_of(u.ulevel, pl_character[0], ::flags.female)); + } + name.setLabel(buf,NetHackQtLabelledIcon::NoNum,u.ulevel); + + if (describe_level(buf)) { + dlevel.setLabel(buf,(bool)TRUE); + } else { + Sprintf(buf, "%s, level ", dungeons[u.uz.dnum].dname); + dlevel.setLabel(buf,(long)depth(&u.uz)); + } + + gold.setLabel("Au:", money_cnt(g.invent)); + if (u.mtimedone) { + // You're a monster! + + Sprintf(buf, "/%d", u.mhmax); + hp.setLabel("HP:",u.mh > 0 ? u.mh : 0,buf); + level.setLabel("HD:",(long)mons[u.umonnum].mlevel); + } else { + // You're normal. + + Sprintf(buf, "/%d", u.uhpmax); + hp.setLabel("HP:",u.uhp > 0 ? u.uhp : 0,buf); + level.setLabel("Level:",(long)u.ulevel); + } + Sprintf(buf, "/%d", u.uenmax); + power.setLabel("Pow:",u.uen,buf); + ac.setLabel("AC:",(long)u.uac); + if (::flags.showexp) { + exp.setLabel("Exp:",(long)u.uexp); + } else + { + exp.setLabel(""); + } + if (u.ualign.type==A_CHAOTIC) { + align.setIcon(p_chaotic); + align.setLabel("Chaotic"); + } else if (u.ualign.type==A_NEUTRAL) { + align.setIcon(p_neutral); + align.setLabel("Neutral"); + } else { + align.setIcon(p_lawful); + align.setLabel("Lawful"); + } + + if (::flags.time) time.setLabel("Time:",(long)g.moves); + else time.setLabel(""); +#ifdef SCORE_ON_BOTL + if (::flags.showscore) { + score.setLabel("Score:",(long)botl_score()); + } else +#endif + { + score.setLabel(""); + } + + if (first_set) + { + first_set=FALSE; + + name.highlightWhenChanging(); + dlevel.highlightWhenChanging(); + + str.highlightWhenChanging(); + dex.highlightWhenChanging(); + con.highlightWhenChanging(); + intel.highlightWhenChanging(); + wis.highlightWhenChanging(); + cha.highlightWhenChanging(); + + gold.highlightWhenChanging(); + hp.highlightWhenChanging(); + power.highlightWhenChanging(); + ac.highlightWhenChanging(); ac.lowIsGood(); + level.highlightWhenChanging(); + exp.highlightWhenChanging(); + align.highlightWhenChanging(); + + //time.highlightWhenChanging(); + score.highlightWhenChanging(); + + hunger.highlightWhenChanging(); + confused.highlightWhenChanging(); + sick_fp.highlightWhenChanging(); + sick_il.highlightWhenChanging(); + blind.highlightWhenChanging(); + stunned.highlightWhenChanging(); + hallu.highlightWhenChanging(); + encumber.highlightWhenChanging(); + } +} + +/* + * Turn off hilighted status values after a certain amount of turns. + */ +void NetHackQtStatusWindow::checkTurnEvents() +{ +} + + + +NetHackQtMenuDialog::NetHackQtMenuDialog() : + QDialog(qApp->mainWidget(),0,FALSE) +{ +} + +void NetHackQtMenuDialog::resizeEvent(QResizeEvent*) +{ + emit Resized(); +} + +void NetHackQtMenuDialog::Accept() +{ + accept(); +} + +void NetHackQtMenuDialog::Reject() +{ + reject(); +} + +void NetHackQtMenuDialog::SetResult(int r) +{ + setResult(r); +} + +void NetHackQtMenuDialog::done(int i) +{ + setResult(i); + qApp->exit_loop(); +} + +// Table view columns: +// +// [pick-count] [accel] [glyph] [string] +// +// Maybe accel should be near string. We'll see. +// pick-count normally blank. +// double-clicking or click-on-count gives pop-up entry +// string is green when selected +// +NetHackQtMenuWindow::NetHackQtMenuWindow(NetHackQtKeyBuffer& ks) : + QTableView(), + keysource(ks), + dialog(new NetHackQtMenuDialog()), + prompt(0), + pressed(-1) +{ + setNumCols(4); + setCellHeight(QMAX(qt_settings->glyphs().height()+1,fontMetrics().height())); + setBackgroundColor(lightGray); + setFrameStyle(Panel|Sunken); + setLineWidth(2); + + ok=new QPushButton("Ok",dialog); + connect(ok,SIGNAL(clicked()),dialog,SLOT(accept())); + + cancel=new QPushButton("Cancel",dialog); + connect(cancel,SIGNAL(clicked()),dialog,SLOT(reject())); + + all=new QPushButton("All",dialog); + connect(all,SIGNAL(clicked()),this,SLOT(All())); + + none=new QPushButton("None",dialog); + connect(none,SIGNAL(clicked()),this,SLOT(ChooseNone())); + + invert=new QPushButton("Invert",dialog); + connect(invert,SIGNAL(clicked()),this,SLOT(Invert())); + + search=new QPushButton("Search",dialog); + connect(search,SIGNAL(clicked()),this,SLOT(Search())); + + QPoint pos(0,ok->height()); + recreate(dialog,0,pos); + prompt.recreate(dialog,0,pos); + + setBackgroundColor(lightGray); + + connect(dialog,SIGNAL(Resized()),this,SLOT(Layout())); + + setTableFlags(Tbl_autoHScrollBar|Tbl_autoVScrollBar + |Tbl_smoothScrolling|Tbl_clipCellPainting); + setFocusPolicy(StrongFocus); +} + +NetHackQtMenuWindow::~NetHackQtMenuWindow() +{ + // Remove from dialog before we destruct it + recreate(0,0,QPoint(0,0)); + delete dialog; +} + +void NetHackQtMenuWindow::focusInEvent(QFocusEvent *) +{ + // Don't repaint at all, since nothing is using the focus colour +} +void NetHackQtMenuWindow::focusOutEvent(QFocusEvent *) +{ + // Don't repaint at all, since nothing is using the focus colour +} + +int NetHackQtMenuWindow::cellWidth(int col) +{ + switch (col) { + case 0: + return fontMetrics().width("All "); + break; case 1: + return fontMetrics().width(" m "); + break; case 2: + return qt_settings->glyphs().width(); + break; case 3: + return str_width; + } + impossible("Extra column (#%d) in MenuWindow",col); + return 0; +} + +QWidget* NetHackQtMenuWindow::Widget() { return dialog; } + +void NetHackQtMenuWindow::StartMenu() +{ + setNumRows((itemcount=0)); + str_width=200; + str_fixed=FALSE; + next_accel=0; + has_glyphs=FALSE; +} + +NetHackQtMenuWindow::MenuItem::MenuItem() : + str(0) +{ +} + +NetHackQtMenuWindow::MenuItem::~MenuItem() +{ + if (str) free((void*)str); +} + +#define STR_MARGIN 4 + +void NetHackQtMenuWindow::AddMenu(int glyph, const ANY_P* identifier, + char ch, char gch, int attr, const char* str, bool presel) +{ + if (!ch && identifier->a_void!=0) { + // Supply a keyboard accelerator. Limited supply. + static char accel[]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + if (accel[next_accel]) { + ch=accel[next_accel++]; + } + } + + if ((int)item.size() < itemcount+1) { + item.resize(itemcount*4+10); + } + item[itemcount].glyph=glyph; + item[itemcount].identifier=*identifier; + item[itemcount].ch=ch; + item[itemcount].attr=attr; + item[itemcount].str=strdup(str); + item[itemcount].selected=presel; + item[itemcount].count=-1; + ++itemcount; + + str_fixed=str_fixed || strstr(str," "); + if (glyph!=NO_GLYPH) has_glyphs=TRUE; +} +void NetHackQtMenuWindow::EndMenu(const char* p) +{ + prompt.setText(p ? p : ""); +} +void NetHackQtMenuWindow::Layout() +{ + int butw=totalWidth()/6; // 6 buttons + int buth=fontMetrics().height()+8; // 8 for spacing & mitres + int prompth=(prompt.text().isNull() ? 0 : buth); + + prompt.setGeometry(6,buth,dialog->width()-6,prompth); + int h=dialog->height()-buth-prompth; + setGeometry(0,buth+prompth, dialog->width(), h); + + // Below, we take care to use up full width + int x=0; + ok->setGeometry(x,0,butw,buth); x+=butw; butw=(dialog->width()-x)/5; + cancel->setGeometry(x,0,butw,buth); x+=butw; butw=(dialog->width()-x)/4; + all->setGeometry(x,0,butw,buth); x+=butw; butw=(dialog->width()-x)/3; + none->setGeometry(x,0,butw,buth); x+=butw; butw=(dialog->width()-x)/2; + invert->setGeometry(x,0,butw,buth); x+=butw; butw=(dialog->width()-x)/1; + search->setGeometry(x,0,butw,buth); +} + +int NetHackQtMenuWindow::SelectMenu(int h, MENU_ITEM_P **menu_list) +{ + setFont(str_fixed ? + qt_settings->normalFixedFont() : qt_settings->normalFont()); + + for (int i=0; iglyphs().height()+1,fontMetrics().height())); + setNumRows(itemcount); + + int buth=fontMetrics().height()+8; // 8 for spacing & mitres + + how=h; + + ok->setEnabled(how!=PICK_ONE);ok->setDefault(how!=PICK_ONE); + cancel->setEnabled(TRUE); + all->setEnabled(how==PICK_ANY); + none->setEnabled(how==PICK_ANY); + invert->setEnabled(how==PICK_ANY); + search->setEnabled(how!=PICK_NONE); + + dialog->SetResult(-1); + + // 20 allows for scrollbar or spacing + // 4 for frame borders + int mh = QApplication::desktop()->height()*3/5; + if ( qt_compact_mode && totalHeight() > mh ) { + // big, so make it fill + dialog->showMaximized(); + } else { + dialog->resize(totalWidth()+20, + QMIN(totalHeight(), mh)+buth+4+(prompt.text().isNull() ? 0 : buth)); + if ( dialog->width() > QApplication::desktop()->width() ) + dialog->resize(QApplication::desktop()->width(),dialog->height()+16); + centerOnMain(dialog); + dialog->show(); + } + + setFocus(); + while (dialog->result()<0) { + // changed the defaults below to the values in wintype.h 000119 - azy + if (!keysource.Empty()) { + char k=keysource.GetAscii(); + k=map_menu_cmd(k); /* added 000119 - azy */ + if (k=='\033') + dialog->Reject(); + else if (k=='\r' || k=='\n' || k==' ') + dialog->Accept(); + else if (k==MENU_SEARCH) + Search(); + else if (k==MENU_SELECT_ALL) + All(); + else if (k==MENU_INVERT_ALL) + Invert(); + else if (k==MENU_UNSELECT_ALL) + ChooseNone(); + else { + for (int i=0; iresult()<0) + qApp->enter_loop(); + } + //if ( (nhid != WIN_INVEN || !iflags.perm_invent) ) // doesn't work yet + { + dialog->hide(); + } + int result=dialog->result(); + + // Consume ^M (which QDialog steals for default button) + while (!keysource.Empty() && + (keysource.TopAscii()=='\n' || keysource.TopAscii()=='\r')) + keysource.GetAscii(); + + *menu_list=0; + if (how==PICK_NONE) + return result==0 ? -1 : 0; + + if (result>0) { + if (how==PICK_ONE) { + int i; + for (i=0; istate()&ShiftButton)) { + if (event->key()==Key_Prior) { + setYOffset(yOffset()-viewHeight()); + } else if (event->key()==Key_Next) { + setYOffset(yOffset()+viewHeight()); + } else { + event->ignore(); + } + } else { + event->ignore(); + } +} + +void NetHackQtMenuWindow::All() +{ + for (int i=0; iAccept(); + } + } +} + + +void NetHackQtMenuWindow::paintCell(QPainter* painter, int row, int col) +{ + // [pick-count] [accel] [glyph] [string] + + MenuItem& i = item[row]; + + painter->setPen(black); + painter->setFont(font()); + + if (i.selected) { + painter->setPen(darkGreen); + } + + switch (col) { + case 0: + if ( i.ch || i.attr!=ATR_INVERSE ) { + QString text; + if ( i.selected && i.count == -1 ) { + if ( i.str[0]>='0' && i.str[0]<='9' ) + text = "All"; + else + text = "*"; + } else if ( i.count<0 ) { + text = "-"; + } else { + text.sprintf("%d",i.count); + } + painter->drawText(0,0,cellWidth(col),cellHeight(), + AlignHCenter|AlignVCenter,text); + } + break; case 1: + if ((signed char)i.ch >= 0) { + char text[2]={i.ch,0}; + painter->drawText(0,0,cellWidth(col),cellHeight(), + AlignHCenter|AlignVCenter,text); + } + break; case 2: + if (i.glyph!=NO_GLYPH) { + // Centered in height + int y=(cellHeight()-qt_settings->glyphs().height())/2; + if (y<0) y=0; + qt_settings->glyphs().drawGlyph(*painter, i.glyph, 0, y); + } + break; case 3: + // XXX should qt_settings have ALL the various fonts + QFont newfont=font(); + + if (i.attr) { + switch(i.attr) { + case ATR_ULINE: + newfont.setUnderline(TRUE); + break; case ATR_BOLD: + painter->setPen(red); + break; case ATR_BLINK: + newfont.setItalic(TRUE); + break; case ATR_INVERSE: + newfont=qt_settings->largeFont(); + newfont.setWeight(QFont::Bold); + + if (i.selected) { + painter->setPen(blue); + } else { + painter->setPen(darkBlue); + } + } + } + painter->setFont(newfont); + + painter->drawText(STR_MARGIN,0,cellWidth(col),cellHeight(), + AlignLeft|AlignVCenter,i.str); + } +} + +void NetHackQtMenuWindow::mousePressEvent(QMouseEvent* event) +{ + int col=findCol(event->pos().x()); + int row=findRow(event->pos().y()); + + if (col<0 || row<0 || !item[row].Selectable()) return; + + if (how!=PICK_NONE) { + if (col==0) { + // Changing count. + NetHackQtStringRequestor requestor(keysource,"Count:"); + char buf[BUFSZ]; + + if (item[row].count>0) + Sprintf(buf,"%d", item[row].count); + else + Strcpy(buf, ""); + + requestor.SetDefault(buf); + if (requestor.Get(buf)) { + item[row].count=atoi(buf); + if (item[row].count==0) { + item[row].count=-1; + if (item[row].selected) ToggleSelect(row); + } else { + if (!item[row].selected) ToggleSelect(row); + } + updateCell(row,0); + } + } else { + pressed=row; + was_sel=item[row].selected; + ToggleSelect(row); + updateCell(row,0); + } + } +} + +void NetHackQtMenuWindow::mouseReleaseEvent(QMouseEvent* event) +{ + if (pressed>=0) { + int p=pressed; + pressed=-1; + updateCell(p,3); + } +} + +void NetHackQtMenuWindow::mouseMoveEvent(QMouseEvent* event) +{ + if (pressed>=0) { + int col=findCol(event->pos().x()); + int row=findRow(event->pos().y()); + + if (row>=0 && col>=0) { + if (pressed!=row) { + // reset to initial state + if (item[pressed].selected!=was_sel) + ToggleSelect(pressed); + } else { + // reset to new state + if (item[pressed].selected==was_sel) + ToggleSelect(pressed); + } + } + } +} + + +class NetHackQtTextListBox : public QListBox { +public: + NetHackQtTextListBox(QWidget* parent) : QListBox(parent) { } + + int TotalWidth() + { + doLayout(); + return contentsWidth(); + } + int TotalHeight() + { + doLayout(); + return contentsHeight(); + } + + virtual void setFont(const QFont &font) + { + QListBox::setFont(font); + } + void keyPressEvent(QKeyEvent* e) + { + QListBox::keyPressEvent(e); + } +}; + + +QPixmap* NetHackQtRIP::pixmap=0; + +NetHackQtRIP::NetHackQtRIP(QWidget* parent) : + QWidget(parent) +{ + if (!pixmap) { + pixmap=new QPixmap; + tryload(*pixmap, "rip.xpm"); + } + riplines=0; + resize(pixmap->width(),pixmap->height()); + setFont(QFont("times",12)); // XXX may need to be configurable +} + +void NetHackQtRIP::setLines(char** l, int n) +{ + line=l; + riplines=n; +} + +QSize NetHackQtRIP::sizeHint() const +{ + return pixmap->size(); +} + +void NetHackQtRIP::paintEvent(QPaintEvent* event) +{ + if ( riplines ) { + int pix_x=(width()-pixmap->width())/2; + int pix_y=(height()-pixmap->height())/2; + + // XXX positions based on RIP image + int rip_text_x=pix_x+156; + int rip_text_y=pix_y+67; + int rip_text_h=94/riplines; + + QPainter painter; + painter.begin(this); + painter.drawPixmap(pix_x,pix_y,*pixmap); + for (int i=0; imainWidget(),0,FALSE), + keysource(ks), + use_rip(FALSE), + str_fixed(FALSE), + ok("Dismiss",this), + search("Search",this), + lines(new NetHackQtTextListBox(this)), + rip(this) +{ + ok.setDefault(TRUE); + connect(&ok,SIGNAL(clicked()),this,SLOT(accept())); + connect(&search,SIGNAL(clicked()),this,SLOT(Search())); + connect(qt_settings,SIGNAL(fontChanged()),this,SLOT(doUpdate())); + + QVBoxLayout* vb = new QVBoxLayout(this); + vb->addWidget(&rip); + QHBoxLayout* hb = new QHBoxLayout(vb); + hb->addWidget(&ok); + hb->addWidget(&search); + vb->addWidget(lines); +} + +void NetHackQtTextWindow::doUpdate() +{ + update(); +} + + +NetHackQtTextWindow::~NetHackQtTextWindow() +{ + +} + +QWidget* NetHackQtTextWindow::Widget() +{ + return this; +} + +bool NetHackQtTextWindow::Destroy() +{ + return !isVisible(); +} + +void NetHackQtTextWindow::UseRIP(int how, time_t when) +{ +// Code from X11 windowport +#define STONE_LINE_LEN 16 /* # chars that fit on one line */ +#define NAME_LINE 0 /* line # for player name */ +#define GOLD_LINE 1 /* line # for amount of gold */ +#define DEATH_LINE 2 /* line # for death description */ +#define YEAR_LINE 6 /* line # for year */ + +static char** rip_line=0; + if (!rip_line) { + rip_line=new char*[YEAR_LINE+1]; + for (int i=0; i STONE_LINE_LEN) { + for(i = STONE_LINE_LEN; + ((i0 > STONE_LINE_LEN) && i); i--) + if(dpx[i] == ' ') i0 = i; + if(!i) i0 = STONE_LINE_LEN; + } + tmpchar = dpx[i0]; + dpx[i0] = 0; + strcpy(rip_line[line], dpx); + if (tmpchar != ' ') { + dpx[i0] = tmpchar; + dpx= &dpx[i0]; + } else dpx= &dpx[i0+1]; + } + + /* Put year on stone */ + year = yyyymmdd(when) / 10000L; + Sprintf(rip_line[YEAR_LINE], "%4ld", year); + + rip.setLines(rip_line,YEAR_LINE+1); + + use_rip=TRUE; +} + +void NetHackQtTextWindow::Clear() +{ + lines->clear(); + use_rip=FALSE; + str_fixed=FALSE; +} + +void NetHackQtTextWindow::Display(bool block) +{ + if (str_fixed) { + lines->setFont(qt_settings->normalFixedFont()); + } else { + lines->setFont(qt_settings->normalFont()); + } + + int h=0; + if (use_rip) { + h+=rip.height(); + ok.hide(); + search.hide(); + rip.show(); + } else { + h+=ok.height()*2; + ok.show(); + search.show(); + rip.hide(); + } + int mh = QApplication::desktop()->height()*3/5; + if ( qt_compact_mode && (lines->TotalHeight() > mh || use_rip) ) { + // big, so make it fill + showMaximized(); + } else { + resize(QMAX(use_rip ? rip.width() : 200, + lines->TotalWidth()+24), + QMIN(mh, lines->TotalHeight()+h)); + centerOnMain(this); + show(); + } + if (block) { + setResult(-1); + while (result()==-1) { + qApp->enter_loop(); + if (result()==-1 && !keysource.Empty()) { + char k=keysource.GetAscii(); + if (k=='\033' || k==' ' || k=='\r' || k=='\n') { + accept(); + } else if (k=='/') { + Search(); + } + } + } + } +} + +void NetHackQtTextWindow::PutStr(int attr, const char* text) +{ + str_fixed=str_fixed || strstr(text," "); + lines->insertItem(text); +} + +void NetHackQtTextWindow::done(int i) +{ + setResult(i+1000); + hide(); + qApp->exit_loop(); +} + +void NetHackQtTextWindow::keyPressEvent(QKeyEvent* e) +{ + if ( e->ascii() != '\r' && e->ascii() != '\n' && e->ascii() != '\033' ) + lines->keyPressEvent(e); + else + QDialog::keyPressEvent(e); +} + +void NetHackQtTextWindow::Search() +{ + NetHackQtStringRequestor requestor(keysource,"Search for:"); + static char line[256]=""; + requestor.SetDefault(line); + if (requestor.Get(line)) { + int current=lines->currentItem(); + for (uint i=1; icount(); i++) { + int lnum=(i+current)%lines->count(); + QString str=lines->text(lnum); + if (str.contains(line)) { + lines->setCurrentItem(lnum); + lines->centerCurrentItem(); + return; + } + } + lines->setCurrentItem(-1); + } +} + + +NetHackQtDelay::NetHackQtDelay(int ms) : + msec(ms) +{ +} + +void NetHackQtDelay::wait() +{ + startTimer(msec); + qApp->enter_loop(); +} + +void NetHackQtDelay::timerEvent(QTimerEvent* timer) +{ + qApp->exit_loop(); + killTimers(); +} + +NetHackQtInvUsageWindow::NetHackQtInvUsageWindow(QWidget* parent) : + QWidget(parent) +{ +} + +void NetHackQtInvUsageWindow::drawWorn(QPainter& painter, obj* nhobj, int x, int y, bool canbe) +{ + short int glyph; + if (nhobj) + glyph=obj_to_glyph(nhobj, rn2_on_display_rng); + else if (canbe) + glyph=cmap_to_glyph(S_room); + else + glyph=cmap_to_glyph(S_stone); + + qt_settings->glyphs().drawCell(painter,glyph,x,y); +} + +void NetHackQtInvUsageWindow::paintEvent(QPaintEvent*) +{ + // 012 + // + //0 WhB + //1 s"w + //2 gCg + //3 =A= + //4 T + //5 S + + QPainter painter; + painter.begin(this); + + // Blanks + drawWorn(painter,0,0,4,FALSE); + drawWorn(painter,0,0,5,FALSE); + drawWorn(painter,0,2,4,FALSE); + drawWorn(painter,0,2,5,FALSE); + + drawWorn(painter,uarm,1,3); // Armour + drawWorn(painter,uarmc,1,2); // Cloak + drawWorn(painter,uarmh,1,0); // Helmet + drawWorn(painter,uarms,0,1); // Shield + drawWorn(painter,uarmg,0,2); // Gloves - repeated + drawWorn(painter,uarmg,2,2); // Gloves - repeated + drawWorn(painter,uarmf,1,5); // Shoes (feet) + drawWorn(painter,uarmu,1,4); // Undershirt + drawWorn(painter,uleft,0,3); // RingL + drawWorn(painter,uright,2,3); // RingR + + drawWorn(painter,uwep,2,1); // Weapon + drawWorn(painter,uswapwep,0,0); // Secondary weapon + drawWorn(painter,uamul,1,1); // Amulet + drawWorn(painter,ublindf,2,0); // Blindfold + + painter.end(); +} + +class SmallToolButton : public QToolButton { +public: + SmallToolButton(const QPixmap & pm, const QString &textLabel, + const QString& grouptext, + QObject * receiver, const char* slot, + QToolBar * parent) : + QToolButton(pm, textLabel, +#if QT_VERSION < 210 + QString::null, +#else + grouptext, +#endif + receiver, slot, parent) + { + } + + QSize sizeHint() const + { + // get just a couple more pixels for the map + return QToolButton::sizeHint()-QSize(0,2); + } +}; + + +NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) : + message(0), map(0), status(0), invusage(0), + keysink(ks), dirkey(0) +{ + QToolBar* toolbar = new QToolBar(this); +#if QT_VERSION >= 210 + setToolBarsMovable(FALSE); + toolbar->setHorizontalStretchable(TRUE); + toolbar->setVerticalStretchable(TRUE); +#endif + addToolBar(toolbar); + menubar = menuBar(); + + setCaption("Qt NetHack"); + if ( qt_compact_mode ) + setIcon(QPixmap(nh_icon_small)); + else + setIcon(QPixmap(nh_icon)); + + QPopupMenu* game=new QPopupMenu; + QPopupMenu* apparel=new QPopupMenu; + QPopupMenu* act1=new QPopupMenu; + QPopupMenu* act2 = qt_compact_mode ? new QPopupMenu : act1; + QPopupMenu* magic=new QPopupMenu; + QPopupMenu* info=new QPopupMenu; + + QPopupMenu *help; + +#ifdef KDE + help = kapp->getHelpMenu( TRUE, "" ); + help->insertSeparator(); +#else + help = qt_compact_mode ? info : new QPopupMenu; +#endif + + enum { OnDesktop=1, OnHandhelds=2 }; + struct Macro { + QPopupMenu* menu; + const char* name; + const char* action; + int flags; + } item[] = { + { game, 0, 0, 3}, + { game, "Version\tv", "v", 3}, + { game, "Compilation\tAlt+V", "\366", 3}, + { game, "History\tShift+V", "V", 3}, + { game, "Redraw\tCtrl+R", "\022", 0}, // useless + { game, "Options\tShift+O", "O", 3}, + { game, "Explore mode\tShift+X", "X", 3}, + { game, 0, 0, 3}, + { game, "Save\tSy", "Sy", 3}, + { game, "Quit\tAlt+Q", "\361", 3}, + + { apparel, "Apparel off\tShift+A", "A", 2}, + { apparel, "Remove many\tShift+A", "A", 1}, + { apparel, 0, 0, 3}, + { apparel, "Wield weapon\tw", "w", 3}, + { apparel, "Exchange weapons\tx", "x", 3}, + { apparel, "Two weapon combat\t#two", "#tw", 3}, + { apparel, "Load quiver\tShift+Q", "Q", 3}, + { apparel, 0, 0, 3}, + { apparel, "Wear armour\tShift+W", "W", 3}, + { apparel, "Take off armour\tShift+T", "T", 3}, + { apparel, 0, 0, 3}, + { apparel, "Put on non-armour\tShift+P", "P", 3}, + { apparel, "Remove non-armour\tShift+R", "R", 3}, + + { act1, "Again\tCtrl+A", "\001", 2}, + { act1, 0, 0, 3}, + { act1, "Apply\ta?", "a?", 3}, + { act1, "Chat\tAlt+C", "\343", 3}, + { act1, "Close door\tc", "c", 3}, + { act1, "Down\t>", ">", 3}, + { act1, "Drop many\tShift+D", "D", 2}, + { act1, "Drop\td?", "d?", 2}, + { act1, "Eat\te?", "e?", 2}, + { act1, "Engrave\tShift+E", "E", 3}, + { act1, "Fight\tShift+F", "F", 3}, + { act1, "Fire from quiver\tf", "f", 2}, + { act1, "Force\tAlt+F", "\346", 3}, + { act1, "Get\t,", ",", 2}, + { act1, "Jump\tAlt+J", "\352", 3}, + { act2, "Kick\tCtrl+D", "\004", 2}, + { act2, "Loot\tAlt+L", "\354", 3}, + { act2, "Open door\to", "o", 3}, + { act2, "Pay\tp", "p", 3}, + { act2, "Rest\t.", ".", 2}, + { act2, "Ride\t#ri", "#ri", 3}, + { act2, "Search\ts", "s", 3}, + { act2, "Sit\tAlt+S", "\363", 3}, + { act2, "Throw\tt", "t", 2}, + { act2, "Untrap\t#u", "#u", 3}, + { act2, "Up\t<", "<", 3}, + { act2, "Wipe face\tAlt+W", "\367", 3}, + + { magic, "Quaff potion\tq?", "q?", 3}, + { magic, "Read scroll/book\tr?", "r?", 3}, + { magic, "Zap wand\tz?", "z?", 3}, + { magic, "Zap spell\tShift+Z", "Z", 3}, + { magic, "Dip\tAlt+D", "\344", 3}, + { magic, "Rub\tAlt+R", "\362", 3}, + { magic, "Invoke\tAlt+I", "\351", 3}, + { magic, 0, 0, 3}, + { magic, "Offer\tAlt+O", "\357", 3}, + { magic, "Pray\tAlt+P", "\360", 3}, + { magic, 0, 0, 3}, + { magic, "Teleport\tCtrl+T", "\024", 3}, + { magic, "Monster action\tAlt+M", "\355", 3}, + { magic, "Turn undead\tAlt+T", "\364", 3}, + + { help, "Help\t?", "?", 3}, + { help, 0, 0, 3}, + { help, "What is here\t:", ":", 3}, + { help, "What is there\t;", ";", 3}, + { help, "What is...\t/y", "/y", 2}, + { help, 0, 0, 1}, + + { info, "Inventory\ti", "i", 3}, +#ifdef SLASHEM + { info, "Angbandish inventory\t*", "*", 3}, +#endif + { info, "Conduct\t#co", "#co", 3}, + { info, "Discoveries\t\\", "\\", 3}, + { info, "List/reorder spells\t+", "+", 3}, + { info, "Adjust letters\tAlt+A", "\341", 2}, + { info, 0, 0, 3}, + { info, "Name object\tAlt+N", "\356y?", 3}, + { info, "Name object type\tAlt+N", "\356n?", 3}, + { info, "Name creature\tShift+C", "C", 3}, + { info, 0, 0, 3}, + { info, "Qualifications\tAlt+E", "\345", 3}, + + { 0, 0, 0, 0 } + }; + + int i; + int count=0; + for (i=0; item[i].menu; i++) + if (item[i].name) count++; + + macro=new const char* [count]; + + game->insertItem("Qt settings...",1000); + help->insertItem("About Qt NetHack...",2000); + //help->insertItem("NetHack Guidebook...",3000); + help->insertSeparator(); + + count=0; + for (i=0; item[i].menu; i++) { + if ( item[i].flags & (qt_compact_mode ? 1 : 2) ) { + if (item[i].name) { + QString name = item[i].name; + if ( qt_compact_mode ) // accelerators aren't + name.replace(QRegExp("\t.*"),""); + item[i].menu->insertItem(name,count); + macro[count++]=item[i].action; + } else { + item[i].menu->insertSeparator(); + } + } + } + + menubar->insertItem("Game",game); + menubar->insertItem("Gear",apparel); + + if ( qt_compact_mode ) { + menubar->insertItem("A-J",act1); + menubar->insertItem("K-Z",act2); + menubar->insertItem("Magic",magic); + menubar->insertItem(QPixmap(info_xpm),info); + menubar->insertItem(QPixmap(map_xpm), this, SLOT(raiseMap())); + menubar->insertItem(QPixmap(msg_xpm), this, SLOT(raiseMessages())); + menubar->insertItem(QPixmap(stat_xpm), this, SLOT(raiseStatus())); + } else { + menubar->insertItem("Action",act1); + menubar->insertItem("Magic",magic); + menubar->insertItem("Info",info); + menubar->insertSeparator(); + menubar->insertItem("Help",help); + } + + QSignalMapper* sm = new QSignalMapper(this); + connect(sm, SIGNAL(mapped(const QString&)), this, SLOT(doKeys(const QString&))); + QToolButton* tb; + tb = new SmallToolButton( QPixmap(again_xpm),"Again","Action", sm, SLOT(map()), toolbar ); + sm->setMapping(tb, "\001" ); + tb = new SmallToolButton( QPixmap(get_xpm),"Get","Action", sm, SLOT(map()), toolbar ); + sm->setMapping(tb, "," ); + tb = new SmallToolButton( QPixmap(kick_xpm),"Kick","Action", sm, SLOT(map()), toolbar ); + sm->setMapping(tb, "\004" ); + tb = new SmallToolButton( QPixmap(throw_xpm),"Throw","Action", sm, SLOT(map()), toolbar ); + sm->setMapping(tb, "t" ); + tb = new SmallToolButton( QPixmap(fire_xpm),"Fire","Action", sm, SLOT(map()), toolbar ); + sm->setMapping(tb, "f" ); + tb = new SmallToolButton( QPixmap(drop_xpm),"Drop","Action", sm, SLOT(map()), toolbar ); + sm->setMapping(tb, "D" ); + tb = new SmallToolButton( QPixmap(eat_xpm),"Eat","Action", sm, SLOT(map()), toolbar ); + sm->setMapping(tb, "e" ); + tb = new SmallToolButton( QPixmap(rest_xpm),"Rest","Action", sm, SLOT(map()), toolbar ); + sm->setMapping(tb, "." ); + tb = new SmallToolButton( QPixmap(cast_a_xpm),"Cast A","Magic", sm, SLOT(map()), toolbar ); + sm->setMapping(tb, "Za" ); + tb = new SmallToolButton( QPixmap(cast_b_xpm),"Cast B","Magic", sm, SLOT(map()), toolbar ); + sm->setMapping(tb, "Zb" ); + tb = new SmallToolButton( QPixmap(cast_c_xpm),"Cast C","Magic", sm, SLOT(map()), toolbar ); + sm->setMapping(tb, "Zc" ); + if ( !qt_compact_mode ) { + QWidget* filler = new QWidget(toolbar); + filler->setBackgroundMode(PaletteButton); + toolbar->setStretchableWidget(filler); + } + + connect(menubar,SIGNAL(activated(int)),this,SLOT(doMenuItem(int))); + +#ifdef KDE + setMenu (menubar); +#endif + + int x=0,y=0; + int w=QApplication::desktop()->width()-10; // XXX arbitrary extra space for frame + int h=QApplication::desktop()->height()-50; + + int maxwn; + int maxhn; + if (qt_tilewidth != NULL) { + maxwn = atoi(qt_tilewidth) * COLNO + 10; + } else { + maxwn = 1400; + } + if (qt_tileheight != NULL) { + maxhn = atoi(qt_tileheight) * ROWNO * 6/4; + } else { + maxhn = 1024; + } + + // Be exactly the size we want to be - full map... + if (w>maxwn) { + x+=(w-maxwn)/2; + w=maxwn; // Doesn't need to be any wider + } + if (h>maxhn) { + y+=(h-maxhn)/2; + h=maxhn; // Doesn't need to be any taller + } + + setGeometry(x,y,w,h); + + if ( qt_compact_mode ) { + stack = new QWidgetStack(this); + setCentralWidget(stack); + } else { + setCentralWidget(new QWidget(this)); + invusage = new NetHackQtInvUsageWindow(centralWidget()); + } +} + +void NetHackQtMainWindow::zoomMap() +{ + qt_settings->toggleGlyphSize(); +} + +void NetHackQtMainWindow::raiseMap() +{ + if ( stack->id(stack->visibleWidget()) == 0 ) { + zoomMap(); + } else { + stack->raiseWidget(0); + } +} + +void NetHackQtMainWindow::raiseMessages() +{ + stack->raiseWidget(1); +} + +void NetHackQtMainWindow::raiseStatus() +{ + stack->raiseWidget(2); +} + +class NetHackMimeSourceFactory : public QMimeSourceFactory { +public: + const QMimeSource* data(const QString& abs_name) const + { + const QMimeSource* r = 0; + if ( (NetHackMimeSourceFactory*)this == QMimeSourceFactory::defaultFactory() ) + r = QMimeSourceFactory::data(abs_name); + else + r = QMimeSourceFactory::defaultFactory()->data(abs_name); + if ( !r ) { + int sl = abs_name.length(); + do { + sl = abs_name.findRev('/',sl-1); + QString name = sl>=0 ? abs_name.mid(sl+1) : abs_name; + int dot = name.findRev('.'); + if ( dot >= 0 ) + name = name.left(dot); + if ( name == "map" ) + r = new QImageDrag(QImage(map_xpm)); + else if ( name == "msg" ) + r = new QImageDrag(QImage(msg_xpm)); + else if ( name == "stat" ) + r = new QImageDrag(QImage(stat_xpm)); + } while (!r && sl>0); + } + return r; + } +}; + +void NetHackQtMainWindow::doMenuItem(int id) +{ + switch (id) { + case 1000: + centerOnMain(qt_settings); + qt_settings->show(); + break; + case 2000: + QMessageBox::about(this, "About Qt NetHack", aboutMsg()); + break; + case 3000: { + QDialog dlg(this,0,TRUE); + (new QVBoxLayout(&dlg))->setAutoAdd(TRUE); + QTextBrowser browser(&dlg); + NetHackMimeSourceFactory ms; + browser.setMimeSourceFactory(&ms); + browser.setSource(QDir::currentDirPath()+"/Guidebook.html"); + if ( qt_compact_mode ) + dlg.showMaximized(); + dlg.exec(); + } + break; + default: + if ( id >= 0 ) + doKeys(macro[id]); + } +} + +void NetHackQtMainWindow::doKeys(const QString& k) +{ + keysink.Put(k); + qApp->exit_loop(); +} + +void NetHackQtMainWindow::AddMessageWindow(NetHackQtMessageWindow* window) +{ + message=window; + ShowIfReady(); +} + +void NetHackQtMainWindow::AddMapWindow(NetHackQtMapWindow* window) +{ + map=window; + ShowIfReady(); + connect(map,SIGNAL(resized()),this,SLOT(layout())); +} + +void NetHackQtMainWindow::AddStatusWindow(NetHackQtStatusWindow* window) +{ + status=window; + ShowIfReady(); +} + +void NetHackQtMainWindow::RemoveWindow(NetHackQtWindow* window) +{ + if (window==status) { + status=0; + ShowIfReady(); + } else if (window==map) { + map=0; + ShowIfReady(); + } else if (window==message) { + message=0; + ShowIfReady(); + } +} + +void NetHackQtMainWindow::updateInventory() +{ + if ( invusage ) + invusage->repaint(FALSE); +} + +void NetHackQtMainWindow::fadeHighlighting() +{ + if (status) { + status->fadeHighlighting(); + } +} + +void NetHackQtMainWindow::layout() +{ + if ( qt_compact_mode ) + return; + if (message && map && status) { + QSize maxs=map->Widget()->maximumSize(); + int maph=QMIN(height()*2/3,maxs.height()); + + QWidget* c = centralWidget(); + int h=c->height(); + int toph=h-maph; + int iuw=3*qt_settings->glyphs().width(); + int topw=(c->width()-iuw)/2; + + message->Widget()->setGeometry(0,0,topw,toph); + invusage->setGeometry(topw,0,iuw,toph); + status->Widget()->setGeometry(topw+iuw,0,topw,toph); + map->Widget()->setGeometry(QMAX(0,(c->width()-maxs.width())/2), + toph,c->width(),maph); + } +} + +void NetHackQtMainWindow::resizeEvent(QResizeEvent*) +{ + layout(); +#ifdef KDE + updateRects(); +#endif +} + +void NetHackQtMainWindow::keyReleaseEvent(QKeyEvent* event) +{ + if ( dirkey ) { + doKeys(QString(QChar(dirkey))); + if ( !event->isAutoRepeat() ) + dirkey = 0; + } +} + +void NetHackQtMainWindow::keyPressEvent(QKeyEvent* event) +{ + // Global key controls + + // For desktop, arrow keys scroll map, since we don't want players + // to think that's the way to move. For handhelds, the normal way is to + // click-to-travel, so we allow the cursor keys for fine movements. + + // 321 + // 4 0 + // 567 + + if ( event->isAutoRepeat() && + event->key() >= Key_Left && event->key() <= Key_Down ) + return; + + const char* d = Cmd.dirchars; + switch (event->key()) { + case Key_Up: + if ( dirkey == d[0] ) + dirkey = d[1]; + else if ( dirkey == d[4] ) + dirkey = d[3]; + else + dirkey = d[2]; + break; case Key_Down: + if ( dirkey == d[0] ) + dirkey = d[7]; + else if ( dirkey == d[4] ) + dirkey = d[5]; + else + dirkey = d[6]; + break; case Key_Left: + if ( dirkey == d[2] ) + dirkey = d[1]; + else if ( dirkey == d[6] ) + dirkey = d[7]; + else + dirkey = d[0]; + break; case Key_Right: + if ( dirkey == d[2] ) + dirkey = d[3]; + else if ( dirkey == d[6] ) + dirkey = d[5]; + else + dirkey = d[4]; + break; case Key_Prior: + dirkey = 0; + if (message) message->Scroll(0,-1); + break; case Key_Next: + dirkey = 0; + if (message) message->Scroll(0,+1); + break; case Key_Space: + if ( flags.rest_on_space ) { + event->ignore(); + return; + } + case Key_Enter: + if ( map ) + map->clickCursor(); + break; default: + dirkey = 0; + event->ignore(); + } +} + +void NetHackQtMainWindow::closeEvent(QCloseEvent* e) +{ + if ( g.program_state.something_worth_saving ) { + switch ( QMessageBox::information( this, "NetHack", + "This will end your NetHack session", + "&Save", "&Cancel", 0, 1 ) ) + { + case 0: + // See dosave() function + if (dosave0()) { + u.uhp = -1; + NetHackQtBind::qt_exit_nhwindows(0); + nh_terminate(EXIT_SUCCESS); + } + break; + case 1: + break; // ignore the event + } + } else { + e->accept(); + } +} + +void NetHackQtMainWindow::ShowIfReady() +{ + if (message && map && status) { + QPoint pos(0,0); + QWidget* p = qt_compact_mode ? stack : centralWidget(); + message->Widget()->recreate(p,0,pos); + map->Widget()->recreate(p,0,pos); + status->Widget()->recreate(p,0,pos); + if ( qt_compact_mode ) { + message->setMap(map); + stack->addWidget(map->Widget(), 0); + stack->addWidget(message->Widget(), 1); + stack->addWidget(status->Widget(), 2); + raiseMap(); + } else { + layout(); + } + showMaximized(); + } else if (isVisible()) { + hide(); + } +} + + +NetHackQtYnDialog::NetHackQtYnDialog(NetHackQtKeyBuffer& keysrc,const char* q,const char* ch,char df) : + QDialog(qApp->mainWidget(),0,FALSE), + question(q), choices(ch), def(df), + keysource(keysrc) +{ + setCaption("NetHack: Question"); +} + +char NetHackQtYnDialog::Exec() +{ + QString ch(choices); + int ch_per_line=6; + QString qlabel; + QString enable; + if ( qt_compact_mode && !choices ) { + // expand choices from prompt + // ##### why isn't choices set properly??? + const char* c=question; + while ( *c && *c != '[' ) + c++; + qlabel = QString(question).left(c-question); + if ( *c ) { + c++; + if ( *c == '-' ) + ch.append(*c++); + char from=0; + while ( *c && *c != ']' && *c != ' ' ) { + if ( *c == '-' ) { + from = c[-1]; + } else if ( from ) { + for (char f=from+1; f<=*c; f++) + ch.append(f); + from = 0; + } else { + ch.append(*c); + from = 0; + } + c++; + } + if ( *c == ' ' ) { + while ( *c && *c != ']' ) { + if ( *c == '*' || *c == '?' ) + ch.append(*c); + c++; + } + } + } + if ( strstr(question, "what direction") ) { + // We replace this regardless, since sometimes you get choices. + const char* d = Cmd.dirchars; + enable=ch; + ch=""; + ch.append(d[1]); + ch.append(d[2]); + ch.append(d[3]); + ch.append(d[0]); + ch.append('.'); + ch.append(d[4]); + ch.append(d[7]); + ch.append(d[6]); + ch.append(d[5]); + ch.append(d[8]); + ch.append(d[9]); + ch_per_line = 3; + def = ' '; + } else { + // Hmm... they'll have to use a virtual keyboard + } + } else { + qlabel = question; + } + if (!ch.isNull()) { + QVBoxLayout vb(this); + vb.setAutoAdd(TRUE); + bool bigq = qlabel.length()>40; + if ( bigq ) { + QLabel* q = new QLabel(qlabel,this); + q->setAlignment(AlignLeft|WordBreak); + q->setMargin(4); + } + QButtonGroup group(ch_per_line, Horizontal, + bigq ? QString::null : qlabel, this); + + int nchoices=ch.length(); + + bool allow_count=ch.contains('#'); + + const int margin=8; + const int gutter=8; + const int extra=fontMetrics().height(); // Extra for group + int x=margin, y=extra+margin; + int butsize=fontMetrics().height()*2+5; + + QPushButton* button; + for (int i=0; isetEnabled(FALSE); + } + button->setFixedSize(butsize,butsize); // Square + if (ch[i]==def) button->setDefault(TRUE); + if (i%10==9) { + // last in row + x=margin; + y+=butsize+gutter; + } else { + x+=butsize+gutter; + } + } + + connect(&group,SIGNAL(clicked(int)),this,SLOT(doneItem(int))); + + QLabel* lb=0; + QLineEdit* le=0; + + if (allow_count) { + QHBox *hb = new QHBox(this); + lb=new QLabel("Count: ",hb); + le=new QLineEdit(hb); + } + + adjustSize(); + centerOnMain(this); + show(); + char choice=0; + char ch_esc=0; + for (uint i=0; i= 1000 ) { + choice = ch[result() - 1000].latin1(); + } + if ( !choice ) + qApp->enter_loop(); + } + hide(); + if (allow_count && !le->text().isEmpty()) { + yn_number=atoi(le->text()); + choice='#'; + } + return choice; + } else { + QLabel label(qlabel,this); + QPushButton cancel("Dismiss",this); + label.setFrameStyle(QFrame::Box|QFrame::Sunken); + label.setAlignment(AlignCenter); + label.resize(fontMetrics().width(qlabel)+60,30+fontMetrics().height()); + cancel.move(width()/2-cancel.width()/2,label.geometry().bottom()+8); + connect(&cancel,SIGNAL(clicked()),this,SLOT(reject())); + centerOnMain(this); + setResult(-1); + show(); + while (result()<0 && keysource.Empty()) { + qApp->enter_loop(); + } + hide(); + if (keysource.Empty()) { + return '\033'; + } else { + return keysource.GetAscii(); + } + } +} +void NetHackQtYnDialog::keyPressEvent(QKeyEvent* event) +{ + // Don't want QDialog's Return/Esc behaviour + event->ignore(); +} + +void NetHackQtYnDialog::doneItem(int i) +{ + done(i+1000); +} + +void NetHackQtYnDialog::done(int i) +{ + setResult(i); + qApp->exit_loop(); +} + +NetHackQtGlyphs::NetHackQtGlyphs() +{ + const char* tile_file = "nhtiles.bmp"; + if ( iflags.wc_tile_file ) + tile_file = iflags.wc_tile_file; + + if (!img.load(tile_file)) { + tile_file = "x11tiles"; + if (!img.load(tile_file)) { + QString msg; + msg.sprintf("Cannot load x11tiles or nhtiles.bmp"); + QMessageBox::warning(0, "IO Error", msg); + } else { + tiles_per_row = TILES_PER_ROW; + if (img.width()%tiles_per_row) { + impossible( + "Tile file \"%s\" has %d columns, not multiple of row count (%d)", + tile_file, img.width(), tiles_per_row); + } + } + } else { + tiles_per_row = 40; + } + + if ( iflags.wc_tile_width ) + tilefile_tile_W = iflags.wc_tile_width; + else + tilefile_tile_W = img.width() / tiles_per_row; + if ( iflags.wc_tile_height ) + tilefile_tile_H = iflags.wc_tile_height; + else + tilefile_tile_H = tilefile_tile_W; + + setSize(tilefile_tile_W, tilefile_tile_H); +} + +void NetHackQtGlyphs::drawGlyph(QPainter& painter, int glyph, int x, int y) +{ + int tile = glyph2tile[glyph]; + int px = (tile%tiles_per_row)*width(); + int py = tile/tiles_per_row*height(); + + painter.drawPixmap( + x, + y, + pm, + px,py, + width(),height() + ); +} +void NetHackQtGlyphs::drawCell(QPainter& painter, int glyph, int cellx, int celly) +{ + drawGlyph(painter,glyph,cellx*width(),celly*height()); +} +void NetHackQtGlyphs::setSize(int w, int h) +{ + if ( size == QSize(w,h) ) + return; + + bool was1 = size == pm1.size(); + size = QSize(w,h); + if (!w || !h) + return; // Still not decided + + if ( size == pm1.size() ) { + pm = pm1; + return; + } + if ( size == pm2.size() ) { + pm = pm2; + return; + } + + if (w==tilefile_tile_W && h==tilefile_tile_H) { + pm.convertFromImage(img); + } else { + QApplication::setOverrideCursor( Qt::waitCursor ); + QImage scaled = img.smoothScale( + w*img.width()/tilefile_tile_W, + h*img.height()/tilefile_tile_H + ); + pm.convertFromImage(scaled,Qt::ThresholdDither|Qt::PreferDither); + QApplication::restoreOverrideCursor(); + } + (was1 ? pm2 : pm1) = pm; +} + + +////////////////////////////////////////////////////////////// +// +// The ugly C binding classes... +// +////////////////////////////////////////////////////////////// + + +NetHackQtMenuOrTextWindow::NetHackQtMenuOrTextWindow(NetHackQtKeyBuffer& ks) : + actual(0), + keysource(ks) +{ +} + +QWidget* NetHackQtMenuOrTextWindow::Widget() +{ + if (!actual) impossible("Widget called before we know if Menu or Text"); + return actual->Widget(); +} + +// Text +void NetHackQtMenuOrTextWindow::Clear() +{ + if (!actual) + impossible("Clear called before we know if Menu or Text"); + else + actual->Clear(); +} + +void NetHackQtMenuOrTextWindow::Display(bool block) +{ + if (!actual) + impossible("Display called before we know if Menu or Text"); + else + actual->Display(block); +} + +bool NetHackQtMenuOrTextWindow::Destroy() +{ + bool res = FALSE; + + if (!actual) + impossible("Destroy called before we know if Menu or Text"); + else + res = actual->Destroy(); + + return res; +} + +void NetHackQtMenuOrTextWindow::PutStr(int attr, const char* text) +{ + if (!actual) actual=new NetHackQtTextWindow(keysource); + actual->PutStr(attr,text); +} + +// Menu +void NetHackQtMenuOrTextWindow::StartMenu() +{ + if (!actual) actual=new NetHackQtMenuWindow(keysource); + actual->StartMenu(); +} + +void NetHackQtMenuOrTextWindow::AddMenu(int glyph, const ANY_P* identifier, char ch, char gch, int attr, + const char* str, bool presel) +{ + if (!actual) impossible("AddMenu called before we know if Menu or Text"); + actual->AddMenu(glyph,identifier,ch,gch,attr,str,presel); +} + +void NetHackQtMenuOrTextWindow::EndMenu(const char* prompt) +{ + if (!actual) impossible("EndMenu called before we know if Menu or Text"); + actual->EndMenu(prompt); +} + +int NetHackQtMenuOrTextWindow::SelectMenu(int how, MENU_ITEM_P **menu_list) +{ + if (!actual) impossible("SelectMenu called before we know if Menu or Text"); + return actual->SelectMenu(how,menu_list); +} + + +// XXX Should be from Options +// +// XXX Hmm. Tricky part is that perhaps some macros should only be active +// XXX when a key is about to be gotten. For example, the user could +// XXX define "-" to do "E-yyyyyyyy\r", but would still need "-" for +// XXX other purposes. Maybe just too bad. +// +struct { + int key; + int state; + const char* macro; +} key_macro[]={ + { Qt::Key_F1, 0, "n100." }, // Rest (x100) + { Qt::Key_F2, 0, "n20s" }, // Search (x20) + { Qt::Key_F3, 0, "o8o4o6o2o8o4o6o2o8o4o6o2" }, // Open all doors (x3) + { Qt::Key_Tab, 0, "\001" }, + { 0, 0, 0 } +}; + + +NetHackQtBind::NetHackQtBind(int& argc, char** argv) : +#ifdef KDE + KApplication(argc,argv) +#elif defined(QWS) // not quite the right condition + QPEApplication(argc,argv) +#else + QApplication(argc,argv) +#endif +{ + QPixmap pm("nhsplash.xpm"); + if ( iflags.wc_splash_screen && !pm.isNull() ) { + QVBox *vb = new QVBox(0,0, + WStyle_Customize | WStyle_NoBorder | nh_WX11BypassWM | WStyle_StaysOnTop ); + splash = vb; + QLabel *lsplash = new QLabel(vb); + lsplash->setAlignment(AlignCenter); + lsplash->setPixmap(pm); + QLabel* capt = new QLabel("Loading...",vb); + capt->setAlignment(AlignCenter); + if ( pm.mask() ) { + lsplash->setFixedSize(pm.size()); + lsplash->setMask(*pm.mask()); + } + splash->move((QApplication::desktop()->width()-pm.width())/2, + (QApplication::desktop()->height()-pm.height())/2); + //splash->setGeometry(0,0,100,100); + if ( qt_compact_mode ) { + splash->showMaximized(); + } else { + vb->setFrameStyle(QFrame::WinPanel|QFrame::Raised); + vb->setMargin(10); + splash->adjustSize(); + splash->show(); + } + + // force content refresh outside event loop + splash->repaint(FALSE); + lsplash->repaint(FALSE); + capt->repaint(FALSE); + qApp->flushX(); + + } else { + splash = 0; + } + main = new NetHackQtMainWindow(keybuffer); +#if defined(QWS) // not quite the right condition + showMainWidget(main); +#else + setMainWidget(main); +#endif + qt_settings=new NetHackQtSettings(main->width(),main->height()); +} + +void NetHackQtBind::qt_init_nhwindows(int* argc, char** argv) +{ +#ifdef UNIX +// Userid control +// +// Michael Hohmuth ... +// +// As the game runs setuid games, it must seteuid(getuid()) before +// calling XOpenDisplay(), and reset the euid afterwards. +// Otherwise, it can't read the $HOME/.Xauthority file and whines about +// not being able to open the X display (if a magic-cookie +// authorization mechanism is being used). + + uid_t gamesuid=geteuid(); + seteuid(getuid()); +#endif + + QApplication::setColorSpec(ManyColor); + instance=new NetHackQtBind(*argc,argv); + +#ifdef UNIX + seteuid(gamesuid); +#endif + +#ifdef _WS_WIN_ + // This nethack engine feature should be moved into windowport API + nt_kbhit = NetHackQtBind::qt_kbhit; +#endif +} + +int NetHackQtBind::qt_kbhit() +{ + return !keybuffer.Empty(); +} + +static bool have_asked = FALSE; + +void NetHackQtBind::qt_player_selection() +{ + if ( !have_asked ) + qt_askname(); +} + +NetHackQtSavedGameSelector::NetHackQtSavedGameSelector(const char** saved) : + QDialog(qApp->mainWidget(),"sgsel",TRUE) +{ + QVBoxLayout *vbl = new QVBoxLayout(this,6); + QHBox* hb; + + QLabel* logo = new QLabel(this); vbl->addWidget(logo); + logo->setAlignment(AlignCenter); + logo->setPixmap(QPixmap("nhsplash.xpm")); + QLabel* attr = new QLabel("by the NetHack DevTeam",this); + attr->setAlignment(AlignCenter); + vbl->addWidget(attr); + vbl->addStretch(2); + /* + QLabel* logo = new QLabel(hb); + hb = new QHBox(this); + vbl->addWidget(hb, AlignCenter); + logo->setPixmap(QPixmap(nh_icon)); + logo->setAlignment(AlignRight|AlignVCenter); + new QLabel(nh_attribution,hb); + */ + + hb = new QHBox(this); + vbl->addWidget(hb, AlignCenter); + QPushButton* q = new QPushButton("Quit",hb); + connect(q, SIGNAL(clicked()), this, SLOT(reject())); + QPushButton* c = new QPushButton("New Game",hb); + connect(c, SIGNAL(clicked()), this, SLOT(accept())); + c->setDefault(TRUE); + + QButtonGroup* bg = new QButtonGroup(3, Horizontal, "Saved Characters",this); + vbl->addWidget(bg); + connect(bg, SIGNAL(clicked(int)), this, SLOT(done(int))); + for (int i=0; saved[i]; i++) { + QPushButton* b = new QPushButton(saved[i],bg); + bg->insert(b, i+2); + } +} + +int NetHackQtSavedGameSelector::choose() +{ +#if defined(QWS) // probably safe with Qt 3, too (where show!=exec in QDialog). + if ( qt_compact_mode ) + showMaximized(); +#endif + return exec()-2; +} + +void NetHackQtBind::qt_askname() +{ + have_asked = TRUE; + + // We do it all here, and nothing in askname + + char** saved = get_saved_games(); + int ch = -1; + if ( saved && *saved ) { + if ( splash ) splash->hide(); + NetHackQtSavedGameSelector sgsel((const char**)saved); + ch = sgsel.choose(); + if ( ch >= 0 ) + strcpy(g.plname,saved[ch]); + } + free_saved_games(saved); + + switch (ch) { + case -1: + if ( splash ) splash->hide(); + if (NetHackQtPlayerSelector(keybuffer).Choose()) + return; + case -2: + break; + default: + return; + } + + // Quit + clearlocks(); + qt_exit_nhwindows(0); + nh_terminate(0); +} + +void NetHackQtBind::qt_get_nh_event() +{ +} + +#if defined(QWS) +// Kludge to access lastWindowClosed() signal. +class TApp : public QApplication { +public: + TApp(int& c, char**v) : QApplication(c,v) {} + void lwc() { emit lastWindowClosed(); } +}; +#endif + +void NetHackQtBind::qt_exit_nhwindows(const char *) +{ +#if defined(QWS) + // Avoids bug in SHARP SL5500 + ((TApp*)qApp)->lwc(); + qApp->quit(); +#endif + + delete instance; // ie. qApp +} + +void NetHackQtBind::qt_suspend_nhwindows(const char *) +{ +} + +void NetHackQtBind::qt_resume_nhwindows() +{ +} + +static QArray id_to_window; + +winid NetHackQtBind::qt_create_nhwindow(int type) +{ + winid id; + for (id = 0; id < (winid) id_to_window.size(); id++) { + if ( !id_to_window[id] ) + break; + } + if ( id == (winid) id_to_window.size() ) + id_to_window.resize(id+1); + + NetHackQtWindow* window=0; + + switch (type) { + case NHW_MAP: { + NetHackQtMapWindow* w=new NetHackQtMapWindow(clickbuffer); + main->AddMapWindow(w); + window=w; + } break; case NHW_MESSAGE: { + NetHackQtMessageWindow* w=new NetHackQtMessageWindow; + main->AddMessageWindow(w); + window=w; + } break; case NHW_STATUS: { + NetHackQtStatusWindow* w=new NetHackQtStatusWindow; + main->AddStatusWindow(w); + window=w; + } break; case NHW_MENU: + window=new NetHackQtMenuOrTextWindow(keybuffer); + break; case NHW_TEXT: + window=new NetHackQtTextWindow(keybuffer); + } + + window->nhid = id; + + // Note: use of isHidden does not work with Qt 2.1 + if ( splash +#if QT_VERSION >= 300 + && !main->isHidden() +#else + && main->isVisible() +#endif + ) + { + delete splash; + splash = 0; + } + + id_to_window[id] = window; + return id; +} + +void NetHackQtBind::qt_clear_nhwindow(winid wid) +{ + NetHackQtWindow* window=id_to_window[wid]; + window->Clear(); +} + +void NetHackQtBind::qt_display_nhwindow(winid wid, BOOLEAN_P block) +{ + NetHackQtWindow* window=id_to_window[wid]; + window->Display(block); +} + +void NetHackQtBind::qt_destroy_nhwindow(winid wid) +{ + NetHackQtWindow* window=id_to_window[wid]; + main->RemoveWindow(window); + if (window->Destroy()) + delete window; + id_to_window[wid] = 0; +} + +void NetHackQtBind::qt_curs(winid wid, int x, int y) +{ + NetHackQtWindow* window=id_to_window[wid]; + window->CursorTo(x,y); +} + +void NetHackQtBind::qt_putstr(winid wid, int attr, const char *text) +{ + NetHackQtWindow* window=id_to_window[wid]; + window->PutStr(attr,text); +} + +void NetHackQtBind::qt_display_file(const char *filename, BOOLEAN_P must_exist) +{ + NetHackQtTextWindow* window=new NetHackQtTextWindow(keybuffer); + bool complain = FALSE; + +#ifdef DLB + { + dlb *f; + char buf[BUFSZ]; + char *cr; + + window->Clear(); + f = dlb_fopen(filename, "r"); + if (!f) { + complain = must_exist; + } else { + while (dlb_fgets(buf, BUFSZ, f)) { + if ((cr = index(buf, '\n')) != 0) *cr = 0; +#ifdef MSDOS + if ((cr = index(buf, '\r')) != 0) *cr = 0; +#endif + if (index(buf, '\t') != 0) (void) tabexpand(buf); + window->PutStr(ATR_NONE, buf); + } + window->Display(FALSE); + (void) dlb_fclose(f); + } + } +#else + QFile file(filename); + + if (file.open(IO_ReadOnly)) { + char line[128]; + while (file.readLine(line,127) >= 0) { + line[strlen(line)-1]=0;// remove newline + window->PutStr(ATR_NONE,line); + } + window->Display(FALSE); + } else { + complain = must_exist; + } +#endif + + if (complain) { + QString message; + message.sprintf("File not found: %s\n",filename); + QMessageBox::message("File Error", (const char*)message, "Ignore"); + } +} + +void NetHackQtBind::qt_start_menu(winid wid) +{ + NetHackQtWindow* window=id_to_window[wid]; + window->StartMenu(); +} + +void NetHackQtBind::qt_add_menu(winid wid, int glyph, + const ANY_P * identifier, CHAR_P ch, CHAR_P gch, int attr, + const char *str, BOOLEAN_P presel) +{ + NetHackQtWindow* window=id_to_window[wid]; + window->AddMenu(glyph, identifier, ch, gch, attr, str, presel); +} + +void NetHackQtBind::qt_end_menu(winid wid, const char *prompt) +{ + NetHackQtWindow* window=id_to_window[wid]; + window->EndMenu(prompt); +} + +int NetHackQtBind::qt_select_menu(winid wid, int how, MENU_ITEM_P **menu_list) +{ + NetHackQtWindow* window=id_to_window[wid]; + return window->SelectMenu(how,menu_list); +} + +void NetHackQtBind::qt_update_inventory() +{ + if (main) + main->updateInventory(); + /* doesn't work yet + if (g.program_state.something_worth_saving && iflags.perm_invent) + display_inventory(NULL, FALSE); + */ +} + +void NetHackQtBind::qt_mark_synch() +{ +} + +void NetHackQtBind::qt_wait_synch() +{ +} + +void NetHackQtBind::qt_cliparound(int x, int y) +{ + // XXXNH - winid should be a parameter! + qt_cliparound_window(WIN_MAP,x,y); +} + +void NetHackQtBind::qt_cliparound_window(winid wid, int x, int y) +{ + NetHackQtWindow* window=id_to_window[wid]; + window->ClipAround(x,y); +} +void NetHackQtBind::qt_print_glyph(winid wid,XCHAR_P x,XCHAR_P y,int glyph, int bkglyph) +{ + NetHackQtWindow* window=id_to_window[wid]; + window->PrintGlyph(x,y,glyph); +} +//void NetHackQtBind::qt_print_glyph_compose(winid wid,XCHAR_P x,XCHAR_P y,int glyph1, int glyph2) +//{ + //NetHackQtWindow* window=id_to_window[wid]; + //window->PrintGlyphCompose(x,y,glyph1,glyph2); +//} + +void NetHackQtBind::qt_raw_print(const char *str) +{ + puts(str); +} + +void NetHackQtBind::qt_raw_print_bold(const char *str) +{ + puts(str); +} + +int NetHackQtBind::qt_nhgetch() +{ + if (main) + main->fadeHighlighting(); + + // Process events until a key arrives. + // + while (keybuffer.Empty() +#ifdef SAFERHANGUP + && !g.program_state.done_hup +#endif + ) { + qApp->enter_loop(); + } + +#ifdef SAFERHANGUP + if (g.program_state.done_hup && keybuffer.Empty()) return '\033'; +#endif + return keybuffer.GetAscii(); +} + +int NetHackQtBind::qt_nh_poskey(int *x, int *y, int *mod) +{ + if (main) + main->fadeHighlighting(); + + // Process events until a key or map-click arrives. + // + while (keybuffer.Empty() && clickbuffer.Empty() +#ifdef SAFERHANGUP + && !g.program_state.done_hup +#endif + ) { + qApp->enter_loop(); + } +#ifdef SAFERHANGUP + if (g.program_state.done_hup && keybuffer.Empty()) return '\033'; +#endif + if (!keybuffer.Empty()) { + return keybuffer.GetAscii(); + } else { + *x=clickbuffer.NextX(); + *y=clickbuffer.NextY(); + *mod=clickbuffer.NextMod(); + clickbuffer.Get(); + return 0; + } +} + +void NetHackQtBind::qt_nhbell() +{ + QApplication::beep(); +} + +int NetHackQtBind::qt_doprev_message() +{ + // Don't need it - uses scrollbar + // XXX but could make this a shortcut + return 0; +} + +char NetHackQtBind::qt_yn_function(const char *question, const char *choices, CHAR_P def) +{ + if (qt_settings->ynInMessages() && WIN_MESSAGE!=WIN_ERR) { + // Similar to X11 windowport `slow' feature. + + char message[BUFSZ]; + char yn_esc_map='\033'; + + if (choices) { + char *cb, choicebuf[QBUFSZ]; + Strcpy(choicebuf, choices); + if ((cb = index(choicebuf, '\033')) != 0) { + // anything beyond is hidden + *cb = '\0'; + } + (void)strncpy(message, question, QBUFSZ-1); + message[QBUFSZ-1] = '\0'; + Sprintf(eos(message), " [%s]", choicebuf); + if (def) Sprintf(eos(message), " (%c)", def); + Strcat(message, " "); + // escape maps to 'q' or 'n' or default, in that order + yn_esc_map = (index(choices, 'q') ? 'q' : + (index(choices, 'n') ? 'n' : def)); + } else { + Strcpy(message, question); + } + +#ifdef USE_POPUPS + // Improve some special-cases (DIRKS 08/02/23) + if (strcmp (choices,"ynq") == 0) { + switch (QMessageBox::information (qApp->mainWidget(),"NetHack",question,"&Yes","&No","&Quit",0,2)) + { + case 0: return 'y'; + case 1: return 'n'; + case 2: return 'q'; + } + } + + if (strcmp (choices,"yn") == 0) { + switch (QMessageBox::information(qApp->mainWidget(),"NetHack",question,"&Yes", "&No",0,1)) + { + case 0: return 'y'; + case 1: return 'n'; + } + } +#endif + + NetHackQtBind::qt_putstr(WIN_MESSAGE, ATR_BOLD, message); + + int result=-1; + while (result<0) { + char ch=NetHackQtBind::qt_nhgetch(); + if (ch=='\033') { + result=yn_esc_map; + } else if (choices && !index(choices,ch)) { + if (def && (ch==' ' || ch=='\r' || ch=='\n')) { + result=def; + } else { + NetHackQtBind::qt_nhbell(); + // and try again... + } + } else { + result=ch; + } + } + + NetHackQtBind::qt_clear_nhwindow(WIN_MESSAGE); + + return result; + } else { + NetHackQtYnDialog dialog(keybuffer,question,choices,def); + return dialog.Exec(); + } +} + +void NetHackQtBind::qt_getlin(const char *prompt, char *line) +{ + NetHackQtStringRequestor requestor(keybuffer,prompt); + if (!requestor.Get(line)) { + line[0]=0; + } +} + +NetHackQtExtCmdRequestor::NetHackQtExtCmdRequestor(NetHackQtKeyBuffer& ks) : + QDialog(qApp->mainWidget(), "ext-cmd", FALSE), + keysource(ks) +{ + int marg=4; + QVBoxLayout *l = new QVBoxLayout(this,marg,marg); + + QPushButton* can = new QPushButton("Cancel", this); + can->setDefault(TRUE); + can->setMinimumSize(can->sizeHint()); + l->addWidget(can); + + QButtonGroup *group=new QButtonGroup("",0); + QGroupBox *grid=new QGroupBox("Extended commands",this); + l->addWidget(grid); + + int i; + int butw=50; + QFontMetrics fm = fontMetrics(); + for (i=0; extcmdlist[i].ef_txt; i++) { + butw = QMAX(butw,30+fm.width(extcmdlist[i].ef_txt)); + } + int ncols=4; + int nrows=(i+ncols-1)/ncols; + + QVBoxLayout* bl = new QVBoxLayout(grid,marg); + bl->addSpacing(fm.height()); + QGridLayout* gl = new QGridLayout(nrows,ncols,marg); + bl->addLayout(gl); + for (i=0; extcmdlist[i].ef_txt; i++) { + QPushButton* pb=new QPushButton(extcmdlist[i].ef_txt, grid); + pb->setMinimumSize(butw,pb->sizeHint().height()); + group->insert(pb); + gl->addWidget(pb,i/ncols,i%ncols); + } + connect(group,SIGNAL(clicked(int)),this,SLOT(done(int))); + + bl->activate(); + l->activate(); + resize(1,1); + + connect(can,SIGNAL(clicked()),this,SLOT(cancel())); +} + +void NetHackQtExtCmdRequestor::cancel() +{ + setResult(-1); + qApp->exit_loop(); +} + +void NetHackQtExtCmdRequestor::done(int i) +{ + setResult(i); + qApp->exit_loop(); +} + +int NetHackQtExtCmdRequestor::get() +{ + const int none = -10; + char str[32]; + int cursor=0; + resize(1,1); // pack + centerOnMain(this); + show(); + setResult(none); + while (result()==none) { + while (result()==none && !keysource.Empty()) { + char k=keysource.GetAscii(); + if (k=='\r' || k=='\n' || k==' ' || k=='\033') { + setResult(-1); + } else { + str[cursor++] = k; + int r=-1; + for (int i=0; extcmdlist[i].ef_txt; i++) { + if (qstrnicmp(str, extcmdlist[i].ef_txt, cursor)==0) { + if ( r == -1 ) + r = i; + else + r = -2; + } + } + if ( r == -1 ) { // no match! + QApplication::beep(); + cursor=0; + } else if ( r != -2 ) { // only one match + setResult(r); + } + } + } + if (result()==none) + qApp->enter_loop(); + } + hide(); + return result(); +} + + +int NetHackQtBind::qt_get_ext_cmd() +{ + NetHackQtExtCmdRequestor requestor(keybuffer); + return requestor.get(); +} + +void NetHackQtBind::qt_number_pad(int) +{ + // Ignore. +} + +void NetHackQtBind::qt_delay_output() +{ + NetHackQtDelay delay(15); + delay.wait(); +} + +void NetHackQtBind::qt_start_screen() +{ + // Ignore. +} + +void NetHackQtBind::qt_end_screen() +{ + // Ignore. +} + +void NetHackQtBind::qt_outrip(winid wid, int how, time_t when) +{ + NetHackQtWindow* window=id_to_window[wid]; + + window->UseRIP(how, when); +} + +bool NetHackQtBind::notify(QObject *receiver, QEvent *event) +{ + // Ignore Alt-key navigation to menubar, it's annoying when you + // use Alt-Direction to move around. + if ( main && event->type()==QEvent::KeyRelease && main==receiver + && ((QKeyEvent*)event)->key() == Key_Alt ) + return TRUE; + + bool result=QApplication::notify(receiver,event); +#ifdef SAFERHANGUP + if (g.program_state.done_hup) { + keybuffer.Put('\033'); + qApp->exit_loop(); + return TRUE; + } +#endif + if (event->type()==QEvent::KeyPress) { + QKeyEvent* key_event=(QKeyEvent*)event; + + if (!key_event->isAccepted()) { + const int k=key_event->key(); + bool macro=FALSE; + for (int i=0; !macro && key_macro[i].key; i++) { + if (key_macro[i].key==k + && ((key_macro[i].state&key_event->state())==key_macro[i].state)) + { + keybuffer.Put(key_macro[i].macro); + macro=TRUE; + } + } + char ch=key_event->ascii(); + if ( !ch && (key_event->state() & Qt::ControlButton) ) { + // On Mac, it aint-ncessarily-control + if ( k>=Qt::Key_A && k<=Qt::Key_Z ) + ch = k - Qt::Key_A + 1; + } + if (!macro && ch) { + bool alt = (key_event->state()&AltButton) || + (k >= Key_0 && k <= Key_9 && (key_event->state()&ControlButton)); + keybuffer.Put(key_event->key(),ch + (alt ? 128 : 0), + key_event->state()); + key_event->accept(); + result=TRUE; + } + + if (ch || macro) { + qApp->exit_loop(); + } + } + } + return result; +} + +NetHackQtBind* NetHackQtBind::instance=0; +NetHackQtKeyBuffer NetHackQtBind::keybuffer; +NetHackQtClickBuffer NetHackQtBind::clickbuffer; +NetHackQtMainWindow* NetHackQtBind::main=0; +QWidget* NetHackQtBind::splash=0; + + +extern "C" struct window_procs Qt_procs; + +struct window_procs Qt_procs = { + "Qt", + WC_COLOR|WC_HILITE_PET| + WC_ASCII_MAP|WC_TILED_MAP| + WC_FONT_MAP|WC_TILE_FILE|WC_TILE_WIDTH|WC_TILE_HEIGHT| + WC_PLAYER_SELECTION|WC_SPLASH_SCREEN, + 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + NetHackQtBind::qt_init_nhwindows, + NetHackQtBind::qt_player_selection, + NetHackQtBind::qt_askname, + NetHackQtBind::qt_get_nh_event, + NetHackQtBind::qt_exit_nhwindows, + NetHackQtBind::qt_suspend_nhwindows, + NetHackQtBind::qt_resume_nhwindows, + NetHackQtBind::qt_create_nhwindow, + NetHackQtBind::qt_clear_nhwindow, + NetHackQtBind::qt_display_nhwindow, + NetHackQtBind::qt_destroy_nhwindow, + NetHackQtBind::qt_curs, + NetHackQtBind::qt_putstr, + genl_putmixed, + NetHackQtBind::qt_display_file, + NetHackQtBind::qt_start_menu, + NetHackQtBind::qt_add_menu, + NetHackQtBind::qt_end_menu, + NetHackQtBind::qt_select_menu, + genl_message_menu, /* no need for X-specific handling */ + NetHackQtBind::qt_update_inventory, + NetHackQtBind::qt_mark_synch, + NetHackQtBind::qt_wait_synch, +#ifdef CLIPPING + NetHackQtBind::qt_cliparound, +#endif +#ifdef POSITIONBAR + donull, +#endif + NetHackQtBind::qt_print_glyph, + //NetHackQtBind::qt_print_glyph_compose, + NetHackQtBind::qt_raw_print, + NetHackQtBind::qt_raw_print_bold, + NetHackQtBind::qt_nhgetch, + NetHackQtBind::qt_nh_poskey, + NetHackQtBind::qt_nhbell, + NetHackQtBind::qt_doprev_message, + NetHackQtBind::qt_yn_function, + NetHackQtBind::qt_getlin, + NetHackQtBind::qt_get_ext_cmd, + NetHackQtBind::qt_number_pad, + NetHackQtBind::qt_delay_output, +#ifdef CHANGE_COLOR /* only a Mac option currently */ + donull, + donull, +#endif + /* other defs that really should go away (they're tty specific) */ + NetHackQtBind::qt_start_screen, + NetHackQtBind::qt_end_screen, +#ifdef GRAPHIC_TOMBSTONE + NetHackQtBind::qt_outrip, +#else + genl_outrip, +#endif + genl_preference_update, + genl_getmsghistory, + genl_putmsghistory, + genl_status_init, + genl_status_finish, + genl_status_enablefield, + genl_status_update, + genl_can_suspend_yes, +}; + +extern "C" void play_usersound(const char* filename, int volume) +{ +#ifdef USER_SOUNDS +#ifndef QT_NO_SOUND + QSound::play(filename); +#endif +#endif +} + +#include "qt_win.moc" +#ifndef KDE +#include "qt_kde0.moc" +#endif +#if QT_VERSION >= 300 +#include "qttableview.moc" +#endif diff --git a/win/Qt/qttableview.cpp b/win/Qt3/qttableview.cpp similarity index 100% rename from win/Qt/qttableview.cpp rename to win/Qt3/qttableview.cpp diff --git a/win/Qt/tileedit.cpp b/win/Qt3/tileedit.cpp similarity index 100% rename from win/Qt/tileedit.cpp rename to win/Qt3/tileedit.cpp diff --git a/win/Qt/tileedit.h b/win/Qt3/tileedit.h similarity index 100% rename from win/Qt/tileedit.h rename to win/Qt3/tileedit.h diff --git a/win/Qt4/.gitattributes b/win/Qt4/.gitattributes deleted file mode 100644 index 68792d904..000000000 --- a/win/Qt4/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* NH_filestag=(file%s_for_the_Qt_4_widget_library_-_X11,_Windows,_Mac_OS_X) diff --git a/win/Qt4/qt4win.cpp b/win/Qt4/qt4win.cpp deleted file mode 100644 index ca0abe57b..000000000 --- a/win/Qt4/qt4win.cpp +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Warwick Allison, 1999. -// Qt4 conversion copyright (c) Ray Chason, 2012-2014. -// NetHack may be freely redistributed. See license for details. - -// Qt Binding for NetHack 3.4 -// -// Copyright (C) 1996-2001 by Warwick W. Allison (warwick@troll.no) -// -// Contributors: -// Michael Hohmuth -// - Userid control -// Svante Gerhard -// - .nethackrc tile and font size settings -// Dirk Schoenberger -// - KDE support -// - SlashEm support -// and many others for bug reports. -// -// Unfortunately, this doesn't use Qt as well as I would like, -// primarily because NetHack is fundamentally a getkey-type program -// rather than being event driven (hence the ugly key and click buffer) -// and also because this is my first major application of Qt. -// -// The problem of NetHack's getkey requirement is solved by intercepting -// key events by overiding QApplicion::notify(...), and putting them in -// a buffer. Mouse clicks on the map window are treated with a similar -// buffer. When the NetHack engine calls for a key, one is taken from -// the buffer, or if that is empty, QApplication::exec() is called. -// Whenever keys or clicks go into the buffer, QApplication::exit() -// is called. -// -// Another problem is that some NetHack players are decade-long players who -// demand complete keyboard control (while Qt and X11 conspire to make this -// difficult by having widget-based focus rather than application based - -// a good thing in general). This problem is solved by again using the key -// event buffer. -// -// Out of all this hackery comes a silver lining however, as macros for -// the super-expert and menus for the ultra-newbie are also made possible -// by the key event buffer. -// - -// This includes all the definitions we need from the NetHack main -// engine. We pretend MSC is a STDC compiler, because C++ is close -// enough, and we undefine NetHack macros which conflict with Qt -// identifiers. - -#define QT_DEPRECATED_WARNINGS -#include "hack.h" -#undef Invisible -#undef Warning -#undef index -#undef msleep -#undef rindex -#undef wizard -#undef yn -#undef min -#undef max - -#include -#if QT_VERSION >= 0x050000 -#include -#endif -#include "qt4win.h" -#include "qt4bind.h" -#include "qt4click.h" -#include "qt4glyph.h" -#include "qt4inv.h" -#include "qt4key.h" -#include "qt4icon.h" -#include "qt4map.h" -#include "qt4menu.h" -#include "qt4msg.h" -#include "qt4set.h" - -#include - -#include "qt4clust.h" - -#include - -#ifdef _WS_X11_ -// For userid control -#include -#endif - -#ifdef USER_SOUNDS -#if QT_VERSION >= 0x050000 -# include -# else -# include -# endif -#endif - - -#ifdef USER_SOUNDS -extern void play_sound_for_message(const std::string& str); -#endif - -namespace nethack_qt4 { - -void -centerOnMain( QWidget* w ) -{ - QWidget* m = NetHackQtBind::mainWidget(); - if (!m) m = qApp->desktop(); - QPoint p = m->mapToGlobal(QPoint(0,0)); - w->move( p.x() + m->width()/2 - w->width()/2, - p.y() + m->height()/2 - w->height()/2 ); -} - -NetHackQtWindow::NetHackQtWindow() -{ -} -NetHackQtWindow::~NetHackQtWindow() -{ -} - -// XXX Use "expected ..." for now, abort or default later. -// -void NetHackQtWindow::Clear() { puts("unexpected Clear"); } -void NetHackQtWindow::Display(bool block) { puts("unexpected Display"); } -bool NetHackQtWindow::Destroy() { return true; } -void NetHackQtWindow::CursorTo(int x,int y) { puts("unexpected CursorTo"); } -void NetHackQtWindow::PutStr(int attr, const QString& text) { puts("unexpected PutStr"); } -void NetHackQtWindow::StartMenu() { puts("unexpected StartMenu"); } -void NetHackQtWindow::AddMenu(int glyph, const ANY_P* identifier, char ch, char gch, int attr, - const QString& str, bool presel) { puts("unexpected AddMenu"); } -void NetHackQtWindow::EndMenu(const QString& prompt) { puts("unexpected EndMenu"); } -int NetHackQtWindow::SelectMenu(int how, MENU_ITEM_P **menu_list) { puts("unexpected SelectMenu"); return 0; } -void NetHackQtWindow::ClipAround(int x,int y) { puts("unexpected ClipAround"); } -void NetHackQtWindow::PrintGlyph(int x,int y,int glyph) { puts("unexpected PrintGlyph"); } -//void NetHackQtWindow::PrintGlyphCompose(int x,int y,int,int) { puts("unexpected PrintGlyphCompose"); } -void NetHackQtWindow::UseRIP(int how, time_t when) { puts("unexpected UseRIP"); } - -} // namespace nethack_qt4 diff --git a/win/Qt/nhicns.uu b/win/share/nhicns.uu similarity index 100% rename from win/Qt/nhicns.uu rename to win/share/nhicns.uu diff --git a/win/Qt/nhsplash.xpm b/win/share/nhsplash.xpm similarity index 100% rename from win/Qt/nhsplash.xpm rename to win/share/nhsplash.xpm From fe9ed530b153ff132d08ede88e7a5bdb311f118c Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 7 Dec 2019 11:50:24 -0500 Subject: [PATCH 445/529] Qt code rearranging fixes entry --- doc/fixes37.0 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index f9f60be61..a96f261e5 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -39,7 +39,7 @@ split off some of the functionality that was in makedefs (compiled-in options build date/time, etc) so that it can be built by a cross-compiler and accessed on the target platform replace quest.txt and associated conversion to quest.dat via makedefs with - lua quest texts loaded at runtime + lua quest texts loaded at runtime Platform- and/or Interface-Specific New Features @@ -55,4 +55,7 @@ Code Cleanup and Reorganization move majority of global variables into instance_globals struct g move zeroobj, zeromonst, zeroany into const_globals struct cg remove STATIC_DCL, STATIC_OVL, STATIC_VAR, STATIC_PTR +old Qt moved from win/Qt to win/Qt3 +more current Qt for Qt version 4 and 5 moved from win/Qt4 to win/Qt; qt4 + moniker changed to qt_ From 17867059b5e309381766873445b32e969fae4b98 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 7 Dec 2019 15:18:44 -0500 Subject: [PATCH 446/529] Qt follow-up bit name collision with 2 existing files adjust Makefile.src to falter on the obsolete version, if at all, not the current --- sys/unix/Makefile.src | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 7f153870b..b4627016d 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -603,10 +603,10 @@ objects.o: @rm -f $(MAKEDEFS) # Qt 3 windowport meta-object-compiler output -qt_kde0.moc: ../include/qt_kde0.h +qt3kde0.moc: ../include/qt_kde0.h $(QTDIR)/bin/moc -o qt_kde0.moc ../include/qt_kde0.h -qt_win.moc: ../include/qt_win.h +qt3win.moc: ../include/qt_win.h $(QTDIR)/bin/moc -o qt_win.moc ../include/qt_win.h qttableview.moc: ../include/qttableview.h @@ -914,12 +914,20 @@ gr_rect.o: ../win/gem/gr_rect.c ../include/gr_rect.h tile.o: tile.c $(HACK_H) cppregex.o: ../sys/share/cppregex.cpp $(CXX) $(CXXFLAGS) -c -o $@ ../sys/share/cppregex.cpp -qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../include/func_tab.h \ +qt3win.o: ../win/Qt3/qt_win.cpp $(HACK_H) ../include/func_tab.h \ ../include/dlb.h ../include/patchlevel.h ../include/tile2x11.h \ ../include/qt_win.h ../include/qt_clust.h ../include/qt_kde0.h \ - ../include/qt_xpms.h qt_win.moc qt_kde0.moc qttableview.moc + ../include/qt_xpms.h qt3win.moc qt3kde0.moc qttableview.moc + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt3/qt_win.cpp +qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../win/Qt/qt_win.h \ + ../win/Qt/qt_bind.h ../win/Qt/qt_click.h \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_inv.h ../win/Qt/qt_key.h \ + ../win/Qt/qt_icon.h ../win/Qt/qt_map.h ../win/Qt/qt_menu.h \ + ../win/Qt/qt_msg.h ../win/Qt/qt_set.h ../win/Qt/qt_clust.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_win.cpp -qt_clust.o: ../win/Qt/qt_clust.cpp ../include/qt_clust.h +qt3clust.o: ../win/Qt3/qt_clust.cpp ../include/qt_clust.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt3/qt_clust.cpp +qt_clust.o: ../win/Qt/qt_clust.cpp ../win/Qt/qt_clust.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_clust.cpp qttableview.o: ../win/Qt/qttableview.cpp ../include/qttableview.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qttableview.cpp @@ -933,8 +941,6 @@ qt_bind.o: ../win/Qt/qt_bind.cpp $(HACK_H) ../win/Qt/qt_bind.h \ $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_bind.cpp qt_click.o: ../win/Qt/qt_click.cpp $(HACK_H) ../win/Qt/qt_click.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_click.cpp -qt_clust.o: ../win/Qt/qt_clust.cpp ../win/Qt/qt_clust.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_clust.cpp qt_delay.o: ../win/Qt/qt_delay.cpp $(HACK_H) ../win/Qt/qt_delay.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_delay.cpp qt_glyph.o: ../win/Qt/qt_glyph.cpp $(HACK_H) ../include/tile2x11.h \ @@ -987,12 +993,6 @@ qt_streq.o: ../win/Qt/qt_streq.cpp $(HACK_H) ../win/Qt/qt_streq.h \ qt_svsel.o: ../win/Qt/qt_svsel.cpp $(HACK_H) ../win/Qt/qt_svsel.h \ ../win/Qt/qt_bind.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_svsel.cpp -qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../win/Qt/qt_win.h \ - ../win/Qt/qt_bind.h ../win/Qt/qt_click.h \ - ../win/Qt/qt_glyph.h ../win/Qt/qt_inv.h ../win/Qt/qt_key.h \ - ../win/Qt/qt_icon.h ../win/Qt/qt_map.h ../win/Qt/qt_menu.h \ - ../win/Qt/qt_msg.h ../win/Qt/qt_set.h ../win/Qt/qt_clust.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_win.cpp qt_xcmd.o: ../win/Qt/qt_xcmd.cpp $(HACK_H) ../include/func_tab.h \ ../win/Qt/qt_xcmd.h qt_xcmd.moc ../win/Qt/qt_bind.h \ ../win/Qt/qt_set.h ../win/Qt/qt_str.h From f2dd00f86b2582902d6a6a36d73760605e619ee4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 7 Dec 2019 15:27:57 -0500 Subject: [PATCH 447/529] more Qt follow-up --- sys/unix/Makefile.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index b4627016d..184ef57f9 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -604,10 +604,10 @@ objects.o: # Qt 3 windowport meta-object-compiler output qt3kde0.moc: ../include/qt_kde0.h - $(QTDIR)/bin/moc -o qt_kde0.moc ../include/qt_kde0.h + $(QTDIR)/bin/moc -o qt3kde0.moc ../include/qt_kde0.h qt3win.moc: ../include/qt_win.h - $(QTDIR)/bin/moc -o qt_win.moc ../include/qt_win.h + $(QTDIR)/bin/moc -o qt3win.moc ../include/qt_win.h qttableview.moc: ../include/qttableview.h $(QTDIR)/bin/moc -o qttableview.moc ../include/qttableview.h From 708773c514030af93d192622be3cc2cab0626761 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 7 Dec 2019 13:44:46 -0800 Subject: [PATCH 448/529] color altars Something I noticed in the hardfought diff what looked interesting. Unfortunately the most interesting bit turns out to be unuseable. Display high altars (Moloch's Sanctum and the Astral Plane) in bright-magenta and unaligned altars (aside from the Sanctum one) in red. Hardfought's code also uses white for lawful, gray for neutral, and black for chaotic, matching the unicorn colors associated with the alignments. But those colors don't render in a reliable fashion (see the comment in mapglyph.c) and become confusing about why they're used for altars of particular alignments. --- doc/fixes37.0 | 3 ++- src/mapglyph.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- src/pray.c | 16 +++++++++------- 3 files changed, 57 insertions(+), 10 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index a96f261e5..2921d7b88 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.17 $ $NHDT-Date: 1575542023 2019/12/05 10:33:43 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.19 $ $NHDT-Date: 1575755075 2019/12/07 21:44:35 $ General Fixes and Modified Features ----------------------------------- @@ -40,6 +40,7 @@ split off some of the functionality that was in makedefs (compiled-in options and accessed on the target platform replace quest.txt and associated conversion to quest.dat via makedefs with lua quest texts loaded at runtime +some altars are displayed in different colors (for tty and curses at least) Platform- and/or Interface-Specific New Features diff --git a/src/mapglyph.c b/src/mapglyph.c index 082186df6..bc7e4f727 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mapglyph.c $NHDT-Date: 1573943501 2019/11/16 22:31:41 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.51 $ */ +/* NetHack 3.6 mapglyph.c $NHDT-Date: 1575755075 2019/12/07 21:44:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.58 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -138,8 +138,52 @@ unsigned mgflags; if they use the same symbol and color is disabled */ } else if (!iflags.use_color && offset == S_lava && (g.showsyms[idx] == g.showsyms[S_pool + SYM_OFF_P] - || g.showsyms[idx] == g.showsyms[S_water + SYM_OFF_P])) { + || g.showsyms[idx] + == g.showsyms[S_water + SYM_OFF_P])) { special |= MG_BW_LAVA; + } else if (offset == S_altar && iflags.use_color) { + if ((Is_astralevel(&u.uz) || Is_sanctum(&u.uz)) + && (levl[x][y].altarmask & AM_SHRINE)) { + /* high altar */ + color = CLR_BRIGHT_MAGENTA; + } else { + switch (levl[x][y].altarmask & AM_MASK) { +#if 0 /* + * On OSX with XTERM=xterm-color256 these render as + * white -> tty: gray, curses: ok + * gray -> both tty and curses: black + * black -> both tty and curses: blue + * red -> both tty and curses: ok. + * Since the colors have specific associations (mainly with + * the unicorns matched with each alignment), we shouldn't use + * scrambled colors and we don't have sufficient information + * to handle platform-specific variations. + */ + case AM_LAWFUL: /* 4 */ + color = CLR_WHITE; + break; + case AM_NEUTRAL: /* 2 */ + color = CLR_GRAY; + break; + case AM_CHAOTIC: /* 1 */ + color = CLR_BLACK; + break; +#else /* !0: TEMP? */ + case AM_LAWFUL: /* 4 */ + case AM_NEUTRAL: /* 2 */ + case AM_CHAOTIC: /* 1 */ + cmap_color(S_altar); /* gray */ + break; +#endif /* 0 */ + case AM_NONE: /* 0 */ + color = CLR_RED; + break; + default: /* 3, 5..7 -- shouldn't happen but 3 was possible + * prior to 3.6.3 (due to faulty sink polymorph) */ + color = NO_COLOR; + break; + } + } } else { cmap_color(offset); } diff --git a/src/pray.c b/src/pray.c index a2f667a29..0da0c2a23 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pray.c $NHDT-Date: 1573346192 2019/11/10 00:36:32 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.118 $ */ +/* NetHack 3.6 pray.c $NHDT-Date: 1575755077 2019/12/07 21:44:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.133 $ */ /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1384,6 +1384,7 @@ dosacrifice() /* curse the lawful/neutral altar */ pline_The("altar is stained with %s blood.", g.urace.adj); levl[u.ux][u.uy].altarmask = AM_CHAOTIC; + newsym(u.ux, u.uy); /* in case Invisible to self */ angry_priest(); } else { struct monst *dmon; @@ -1640,15 +1641,16 @@ dosacrifice() a_gname()); if (rn2(8 + u.ulevel) > 5) { struct monst *pri; + boolean shrine; + You_feel("the power of %s increase.", u_gname()); exercise(A_WIS, TRUE); change_luck(1); - /* Yes, this is supposed to be &=, not |= */ - levl[u.ux][u.uy].altarmask &= AM_SHRINE; - /* the following accommodates stupid compilers */ - levl[u.ux][u.uy].altarmask = - levl[u.ux][u.uy].altarmask - | (Align2amask(u.ualign.type)); + shrine = on_shrine(); + levl[u.ux][u.uy].altarmask = Align2amask(u.ualign.type); + if (shrine) + levl[u.ux][u.uy].altarmask |= AM_SHRINE; + newsym(u.ux, u.uy); /* in case Invisible to self */ if (!Blind) pline_The("altar glows %s.", hcolor((u.ualign.type == A_LAWFUL) From 9318bb816bad3ee744bcd7eae28847a13c66663d Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 7 Dec 2019 17:06:07 -0800 Subject: [PATCH 449/529] 'make depend' update for sys/unix/Makefile.src I deleted three lines ../include/../lib/lua-5.3.5/src/lua.h \ ../include/../lib/lua-5.3.5/src/lualib.h \ ../include/../lib/lua-5.3.5/src/lauxlib.h \ from $(CONFIG_H) but other than that, this is as-is with unmodified 'make depend'. depend.awk will need to be taught about suppressing those lua headers. --- sys/unix/Makefile.src | 242 +++++++++++++++++++++++------------------- 1 file changed, 132 insertions(+), 110 deletions(-) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 184ef57f9..521fc0bc7 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -1,5 +1,5 @@ # NetHack Makefile. -# NetHack 3.6 Makefile.src $NHDT-Date: 1575076770 2019/11/30 01:19:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.79 $ +# NetHack 3.6 Makefile.src $NHDT-Date: 1575767152 2019/12/08 01:05:52 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.83 $ # Copyright (c) 2018 by Pasi Kallinen # NetHack may be freely redistributed. See license for details. @@ -750,11 +750,11 @@ depend: ../sys/unix/depend.awk \ # config.h timestamp $(CONFIG_H): ../include/config.h ../include/config1.h ../include/tradstdc.h \ ../include/global.h ../include/coord.h ../include/vmsconf.h \ - ../include/system.h ../include/unixconf.h ../include/os2conf.h \ - ../include/micro.h ../include/pcconf.h ../include/tosconf.h \ - ../include/amiconf.h ../include/macconf.h ../include/beconf.h \ - ../include/wceconf.h ../include/ntconf.h \ - ../include/nhlua.h + ../include/system.h ../include/nhlua.h \ + ../include/unixconf.h ../include/os2conf.h ../include/micro.h \ + ../include/pcconf.h ../include/tosconf.h ../include/amiconf.h \ + ../include/macconf.h ../include/beconf.h ../include/wceconf.h \ + ../include/ntconf.h touch $(CONFIG_H) # hack.h timestamp $(HACK_H): ../include/hack.h $(CONFIG_H) ../include/lint.h ../include/align.h \ @@ -762,20 +762,22 @@ $(HACK_H): ../include/hack.h $(CONFIG_H) ../include/lint.h ../include/align.h \ ../include/objclass.h ../include/youprop.h ../include/prop.h \ ../include/permonst.h ../include/monattk.h \ ../include/monflag.h ../include/mondata.h ../include/pm.h \ - ../include/wintype.h ../include/context.h ../include/decl.h \ - ../include/quest.h ../include/spell.h ../include/color.h \ - ../include/obj.h ../include/you.h ../include/attrib.h \ - ../include/monst.h ../include/mextra.h ../include/skills.h \ - ../include/onames.h ../include/timeout.h ../include/trap.h \ - ../include/flag.h ../include/rm.h ../include/vision.h \ - ../include/display.h ../include/engrave.h ../include/rect.h \ - ../include/region.h ../include/winprocs.h ../include/botl.h \ - ../include/sys.h ../include/wintty.h ../include/trampoli.h + ../include/wintype.h ../include/context.h ../include/rm.h \ + ../include/botl.h ../include/qtext.h ../include/rect.h \ + ../include/region.h ../include/decl.h ../include/quest.h \ + ../include/spell.h ../include/color.h ../include/obj.h \ + ../include/you.h ../include/attrib.h ../include/monst.h \ + ../include/mextra.h ../include/skills.h ../include/onames.h \ + ../include/timeout.h ../include/trap.h ../include/flag.h \ + ../include/vision.h ../include/display.h ../include/engrave.h \ + ../include/winprocs.h ../include/sys.h ../include/wintty.h \ + ../include/trampoli.h touch $(HACK_H) # tos.o: ../sys/atari/tos.c $(HACK_H) ../include/tcap.h $(CC) $(CFLAGS) -c -o $@ ../sys/atari/tos.c -pcmain.o: ../sys/share/pcmain.c $(HACK_H) ../include/dlb.h +pcmain.o: ../sys/share/pcmain.c $(HACK_H) ../include/dlb.h \ + ../include/sfproto.h ../include/integer.h $(CC) $(CFLAGS) -c -o $@ ../sys/share/pcmain.c pcsys.o: ../sys/share/pcsys.c $(HACK_H) $(CC) $(CFLAGS) -c -o $@ ../sys/share/pcsys.c @@ -914,91 +916,83 @@ gr_rect.o: ../win/gem/gr_rect.c ../include/gr_rect.h tile.o: tile.c $(HACK_H) cppregex.o: ../sys/share/cppregex.cpp $(CXX) $(CXXFLAGS) -c -o $@ ../sys/share/cppregex.cpp -qt3win.o: ../win/Qt3/qt_win.cpp $(HACK_H) ../include/func_tab.h \ - ../include/dlb.h ../include/patchlevel.h ../include/tile2x11.h \ - ../include/qt_win.h ../include/qt_clust.h ../include/qt_kde0.h \ - ../include/qt_xpms.h qt3win.moc qt3kde0.moc qttableview.moc - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt3/qt_win.cpp -qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../win/Qt/qt_win.h \ - ../win/Qt/qt_bind.h ../win/Qt/qt_click.h \ - ../win/Qt/qt_glyph.h ../win/Qt/qt_inv.h ../win/Qt/qt_key.h \ - ../win/Qt/qt_icon.h ../win/Qt/qt_map.h ../win/Qt/qt_menu.h \ - ../win/Qt/qt_msg.h ../win/Qt/qt_set.h ../win/Qt/qt_clust.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_win.cpp -qt3clust.o: ../win/Qt3/qt_clust.cpp ../include/qt_clust.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt3/qt_clust.cpp -qt_clust.o: ../win/Qt/qt_clust.cpp ../win/Qt/qt_clust.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_clust.cpp -qttableview.o: ../win/Qt/qttableview.cpp ../include/qttableview.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qttableview.cpp -qt_bind.o: ../win/Qt/qt_bind.cpp $(HACK_H) ../win/Qt/qt_bind.h \ - ../win/Qt/qt_click.h ../win/Qt/qt_delay.h \ - ../win/Qt/qt_xcmd.h ../win/Qt/qt_key.h ../win/Qt/qt_map.h \ - ../win/Qt/qt_menu.h ../win/Qt/qt_msg.h ../win/Qt/qt_plsel.h \ - ../win/Qt/qt_svsel.h ../win/Qt/qt_set.h ../win/Qt/qt_stat.h \ - ../win/Qt/qt_streq.h ../win/Qt/qt_yndlg.h \ - ../win/Qt/qt_str.h ../include/dlb.h +qt_bind.o: ../win/Qt/qt_bind.cpp $(HACK_H) ../include/qt_bind.h \ + ../include/qt_click.h ../include/qt_delay.h \ + ../include/qt_xcmd.h ../include/qt_key.h ../include/qt_map.h \ + ../include/qt_menu.h ../include/qt_msg.h ../include/qt_plsel.h \ + ../include/qt_svsel.h ../include/qt_set.h ../include/qt_stat.h \ + ../include/qt_streq.h ../include/qt_yndlg.h \ + ../include/qt_str.h ../include/dlb.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_bind.cpp -qt_click.o: ../win/Qt/qt_click.cpp $(HACK_H) ../win/Qt/qt_click.h +qt_click.o: ../win/Qt/qt_click.cpp $(HACK_H) ../include/qt_click.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_click.cpp -qt_delay.o: ../win/Qt/qt_delay.cpp $(HACK_H) ../win/Qt/qt_delay.h +qt_clust.o: ../win/Qt/qt_clust.cpp ../include/qt_clust.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_clust.cpp +qt_delay.o: ../win/Qt/qt_delay.cpp $(HACK_H) ../include/qt_delay.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_delay.cpp qt_glyph.o: ../win/Qt/qt_glyph.cpp $(HACK_H) ../include/tile2x11.h \ - ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h + ../include/qt_glyph.h ../include/qt_set.h ../include/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_glyph.cpp -qt_icon.o: ../win/Qt/qt_icon.cpp $(HACK_H) ../win/Qt/qt_icon.h +qt_icon.o: ../win/Qt/qt_icon.cpp $(HACK_H) ../include/qt_icon.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_icon.cpp -qt_inv.o: ../win/Qt/qt_inv.cpp $(HACK_H) ../win/Qt/qt_inv.h \ - ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h +qt_inv.o: ../win/Qt/qt_inv.cpp $(HACK_H) ../include/qt_inv.h \ + ../include/qt_glyph.h ../include/qt_set.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_inv.cpp -qt_key.o: ../win/Qt/qt_key.cpp $(HACK_H) ../win/Qt/qt_key.h +qt_key.o: ../win/Qt/qt_key.cpp $(HACK_H) ../include/qt_key.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_key.cpp -qt_line.o: ../win/Qt/qt_line.cpp $(HACK_H) ../win/Qt/qt_line.h +qt_line.o: ../win/Qt/qt_line.cpp $(HACK_H) ../include/qt_line.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_line.cpp qt_main.o: ../win/Qt/qt_main.cpp $(HACK_H) ../include/patchlevel.h \ - ../win/Qt/qt_main.h qt_main.moc ../win/Qt/qt_bind.h \ - ../win/Qt/qt_glyph.h ../win/Qt/qt_inv.h ../win/Qt/qt_key.h \ - ../win/Qt/qt_map.h ../win/Qt/qt_msg.h ../win/Qt/qt_set.h \ - ../win/Qt/qt_stat.h ../win/Qt/qt_str.h qt_kde0.moc + ../include/qt_main.h qt_main.moc ../include/qt_bind.h \ + ../include/qt_glyph.h ../include/qt_inv.h ../include/qt_key.h \ + ../include/qt_map.h ../include/qt_msg.h ../include/qt_set.h \ + ../include/qt_stat.h ../include/qt_str.h qt_kde0.moc $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_main.cpp -qt_map.o: ../win/Qt/qt_map.cpp $(HACK_H) ../win/Qt/qt_map.h qt_map.moc \ - ../win/Qt/qt_click.h ../win/Qt/qt_glyph.h \ - ../include/qt_xpms.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h +qt_map.o: ../win/Qt/qt_map.cpp $(HACK_H) ../include/qt_map.h qt_map.moc \ + ../include/qt_click.h ../include/qt_glyph.h \ + ../include/qt_xpms.h ../include/qt_set.h ../include/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_map.cpp -qt_menu.o: ../win/Qt/qt_menu.cpp $(HACK_H) ../win/Qt/qt_menu.h qt_menu.moc \ - ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h \ - ../win/Qt/qt_streq.h ../win/Qt/qt_str.h +qt_menu.o: ../win/Qt/qt_menu.cpp $(HACK_H) ../include/qt_menu.h qt_menu.moc \ + ../include/qt_glyph.h ../include/qt_set.h \ + ../include/qt_streq.h ../include/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_menu.cpp -qt_msg.o: ../win/Qt/qt_msg.cpp $(HACK_H) ../win/Qt/qt_msg.h qt_msg.moc \ - ../win/Qt/qt_map.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h +qt_msg.o: ../win/Qt/qt_msg.cpp $(HACK_H) ../include/qt_msg.h qt_msg.moc \ + ../include/qt_map.h ../include/qt_set.h ../include/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_msg.cpp -qt_plsel.o: ../win/Qt/qt_plsel.cpp $(HACK_H) ../win/Qt/qt_plsel.h \ - qt_plsel.moc ../win/Qt/qt_bind.h ../win/Qt/qt_glyph.h \ - ../win/Qt/qt_set.h ../win/Qt/qt_str.h +qt_plsel.o: ../win/Qt/qt_plsel.cpp $(HACK_H) ../include/qt_plsel.h \ + qt_plsel.moc ../include/qt_bind.h ../include/qt_glyph.h \ + ../include/qt_set.h ../include/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_plsel.cpp -qt_rip.o: ../win/Qt/qt_rip.cpp $(HACK_H) ../win/Qt/qt_rip.h \ - ../win/Qt/qt_bind.h ../win/Qt/qt_str.h +qt_rip.o: ../win/Qt/qt_rip.cpp $(HACK_H) ../include/qt_rip.h \ + ../include/qt_bind.h ../include/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_rip.cpp -qt_set.o: ../win/Qt/qt_set.cpp $(HACK_H) ../win/Qt/qt_set.h qt_set.moc \ - ../win/Qt/qt_glyph.h ../win/Qt/qt_str.h +qt_set.o: ../win/Qt/qt_set.cpp $(HACK_H) ../include/qt_set.h qt_set.moc \ + ../include/qt_glyph.h ../include/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_set.cpp -qt_stat.o: ../win/Qt/qt_stat.cpp $(HACK_H) ../win/Qt/qt_stat.h qt_stat.moc \ - ../win/Qt/qt_set.h ../win/Qt/qt_str.h ../include/qt_xpms.h +qt_stat.o: ../win/Qt/qt_stat.cpp $(HACK_H) ../include/qt_stat.h qt_stat.moc \ + ../include/qt_set.h ../include/qt_str.h ../include/qt_xpms.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_stat.cpp -qt_str.o: ../win/Qt/qt_str.cpp ../win/Qt/qt_str.h +qt_str.o: ../win/Qt/qt_str.cpp ../include/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_str.cpp -qt_streq.o: ../win/Qt/qt_streq.cpp $(HACK_H) ../win/Qt/qt_streq.h \ - ../win/Qt/qt_str.h +qt_streq.o: ../win/Qt/qt_streq.cpp $(HACK_H) ../include/qt_streq.h \ + ../include/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_streq.cpp -qt_svsel.o: ../win/Qt/qt_svsel.cpp $(HACK_H) ../win/Qt/qt_svsel.h \ - ../win/Qt/qt_bind.h ../win/Qt/qt_str.h +qt_svsel.o: ../win/Qt/qt_svsel.cpp $(HACK_H) ../include/qt_svsel.h \ + ../include/qt_bind.h ../include/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_svsel.cpp +qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../include/qt_win.h \ + ../include/qt_clust.h ../include/qt_kde0.h \ + ../include/qt_bind.h ../include/qt_click.h \ + ../include/qt_glyph.h ../include/qt_inv.h ../include/qt_key.h \ + ../include/qt_icon.h ../include/qt_map.h ../include/qt_menu.h \ + ../include/qt_msg.h ../include/qt_set.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_win.cpp qt_xcmd.o: ../win/Qt/qt_xcmd.cpp $(HACK_H) ../include/func_tab.h \ - ../win/Qt/qt_xcmd.h qt_xcmd.moc ../win/Qt/qt_bind.h \ - ../win/Qt/qt_set.h ../win/Qt/qt_str.h + ../include/qt_xcmd.h qt_xcmd.moc ../include/qt_bind.h \ + ../include/qt_set.h ../include/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_xcmd.cpp -qt_yndlg.o: ../win/Qt/qt_yndlg.cpp $(HACK_H) ../win/Qt/qt_yndlg.h \ - qt_yndlg.moc ../win/Qt/qt_str.h +qt_yndlg.o: ../win/Qt/qt_yndlg.cpp $(HACK_H) ../include/qt_yndlg.h \ + qt_yndlg.moc ../include/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_yndlg.cpp wc_chainin.o: ../win/chain/wc_chainin.c $(HACK_H) $(CC) $(CFLAGS) -c -o $@ ../win/chain/wc_chainin.c @@ -1007,13 +1001,17 @@ wc_chainout.o: ../win/chain/wc_chainout.c $(HACK_H) wc_trace.o: ../win/chain/wc_trace.c $(HACK_H) ../include/func_tab.h $(CC) $(CFLAGS) -c -o $@ ../win/chain/wc_trace.c vis_tab.o: vis_tab.c $(CONFIG_H) ../include/vis_tab.h +sfdata.o: sfdata.c $(HACK_H) ../include/artifact.h ../include/func_tab.h \ + ../include/lev.h ../include/integer.h ../include/sfproto.h allmain.o: allmain.c $(HACK_H) alloc.o: alloc.c $(CONFIG_H) apply.o: apply.c $(HACK_H) -artifact.o: artifact.c $(HACK_H) ../include/artifact.h ../include/artilist.h +artifact.o: artifact.c $(HACK_H) ../include/artifact.h ../include/artilist.h \ + ../include/sfproto.h ../include/integer.h attrib.o: attrib.c $(HACK_H) ball.o: ball.c $(HACK_H) -bones.o: bones.c $(HACK_H) ../include/lev.h +bones.o: bones.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ + ../include/integer.h botl.o: botl.c $(HACK_H) cmd.o: cmd.c $(HACK_H) ../include/lev.h ../include/func_tab.h dbridge.o: dbridge.c $(HACK_H) @@ -1021,7 +1019,7 @@ decl.o: decl.c $(HACK_H) detect.o: detect.c $(HACK_H) ../include/artifact.h dig.o: dig.c $(HACK_H) display.o: display.c $(HACK_H) -dlb.o: dlb.c $(CONFIG_H) ../include/dlb.h +dlb.o: dlb.c $(CONFIG_H) ../include/dlb.h ../include/patchlevel.h do.o: do.c $(HACK_H) ../include/lev.h do_name.o: do_name.c $(HACK_H) do_wear.o: do_wear.c $(HACK_H) @@ -1031,38 +1029,47 @@ dokick.o: dokick.c $(HACK_H) dothrow.o: dothrow.c $(HACK_H) drawing.o: drawing.c $(HACK_H) ../include/tcap.h dungeon.o: dungeon.c $(HACK_H) ../include/dgn_file.h ../include/dlb.h \ - ../include/lev.h + ../include/lev.h ../include/sfproto.h ../include/integer.h eat.o: eat.c $(HACK_H) -end.o: end.c $(HACK_H) ../include/lev.h ../include/dlb.h -engrave.o: engrave.c $(HACK_H) ../include/lev.h +end.o: end.c $(HACK_H) ../include/lev.h ../include/dlb.h ../include/sfproto.h \ + ../include/integer.h +engrave.o: engrave.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ + ../include/integer.h exper.o: exper.c $(HACK_H) explode.o: explode.c $(HACK_H) extralev.o: extralev.c $(HACK_H) -files.o: files.c $(HACK_H) ../include/dlb.h #zlib.h +files.o: files.c $(HACK_H) ../include/dlb.h ../include/sfproto.h \ + ../include/integer.h ../include/sfprocs.h ../include/lev.h \ + #zlib.h fountain.o: fountain.c $(HACK_H) hack.o: hack.c $(HACK_H) hacklib.o: hacklib.c $(HACK_H) invent.o: invent.c $(HACK_H) -isaac64.o: isaac64.c $(CONFIG_H) ../include/isaac64.h ../include/integer.h -light.o: light.c $(HACK_H) ../include/lev.h +isaac64.o: isaac64.c $(CONFIG_H) ../include/isaac64.h +light.o: light.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ + ../include/integer.h lock.o: lock.c $(HACK_H) mail.o: mail.c $(HACK_H) ../include/mail.h makemon.o: makemon.c $(HACK_H) mapglyph.o: mapglyph.c $(HACK_H) mcastu.o: mcastu.c $(HACK_H) -mdlib.o: mdlib.c $(CONFIG_H) ../include/permonst.h ../include/objclass.h \ - ../include/monsym.h ../include/artilist.h \ - ../include/dungeon.h ../include/obj.h ../include/monst.h \ - ../include/you.h ../include/context.h ../include/flag.h \ - ../include/dlb.h ../include/patchlevel.h +mdlib.o: mdlib.c $(CONFIG_H) ../include/permonst.h ../include/align.h \ + ../include/monattk.h ../include/monflag.h \ + ../include/objclass.h ../include/monsym.h \ + ../include/artilist.h ../include/dungeon.h ../include/obj.h \ + ../include/monst.h ../include/mextra.h ../include/you.h \ + ../include/attrib.h ../include/prop.h ../include/skills.h \ + ../include/context.h ../include/flag.h ../include/dlb.h \ + ../include/patchlevel.h mhitm.o: mhitm.c $(HACK_H) ../include/artifact.h mhitu.o: mhitu.c $(HACK_H) ../include/artifact.h minion.o: minion.c $(HACK_H) mklev.o: mklev.c $(HACK_H) mkmap.o: mkmap.c $(HACK_H) ../include/sp_lev.h -mkmaze.o: mkmaze.c $(HACK_H) ../include/sp_lev.h ../include/lev.h +mkmaze.o: mkmaze.c $(HACK_H) ../include/sp_lev.h ../include/lev.h \ + ../include/sfproto.h ../include/integer.h mkobj.o: mkobj.c $(HACK_H) -mkroom.o: mkroom.c $(HACK_H) +mkroom.o: mkroom.c $(HACK_H) ../include/sfproto.h ../include/integer.h mon.o: mon.c $(HACK_H) ../include/mfndpos.h mondata.o: mondata.c $(HACK_H) monmove.o: monmove.c $(HACK_H) ../include/mfndpos.h ../include/artifact.h @@ -1072,15 +1079,17 @@ monst.o: monst.c $(CONFIG_H) ../include/permonst.h ../include/align.h \ mplayer.o: mplayer.c $(HACK_H) mthrowu.o: mthrowu.c $(HACK_H) muse.o: muse.c $(HACK_H) -music.o: music.c $(HACK_H) #interp.c -nhlua.o: nhlua.c $(HACK_H) -nhlsel.o: nhlsel.c $(HACK_H) -o_init.o: o_init.c $(HACK_H) ../include/lev.h +music.o: music.c $(HACK_H) +nhlua.o: nhlua.c $(HACK_H) ../include/dlb.h +nhlsel.o: nhlsel.c $(HACK_H) ../include/sp_lev.h +o_init.o: o_init.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ + ../include/integer.h objects.o: objects.c $(CONFIG_H) ../include/obj.h ../include/objclass.h \ ../include/prop.h ../include/skills.h ../include/color.h objnam.o: objnam.c $(HACK_H) options.o: options.c $(CONFIG_H) ../include/objclass.h ../include/flag.h \ - $(HACK_H) ../include/tcap.h + $(HACK_H) ../include/tcap.h ../include/sfprocs.h \ + ../include/integer.h pager.o: pager.c $(HACK_H) ../include/dlb.h pickup.o: pickup.c $(HACK_H) pline.o: pline.c $(HACK_H) @@ -1088,28 +1097,39 @@ polyself.o: polyself.c $(HACK_H) potion.o: potion.c $(HACK_H) pray.o: pray.c $(HACK_H) priest.o: priest.c $(HACK_H) ../include/mfndpos.h -quest.o: quest.c $(HACK_H) ../include/qtext.h -questpgr.o: questpgr.c $(HACK_H) ../include/dlb.h ../include/qtext.h +quest.o: quest.c $(HACK_H) +questpgr.o: questpgr.c $(HACK_H) ../include/dlb.h read.o: read.c $(HACK_H) rect.o: rect.c $(HACK_H) -region.o: region.c $(HACK_H) ../include/lev.h -restore.o: restore.c $(HACK_H) ../include/lev.h ../include/tcap.h +region.o: region.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ + ../include/integer.h +restore.o: restore.c $(HACK_H) ../include/lev.h ../include/tcap.h \ + ../include/sfproto.h ../include/integer.h rip.o: rip.c $(HACK_H) -rnd.o: rnd.c $(HACK_H) +rnd.o: rnd.c $(HACK_H) ../include/isaac64.h role.o: role.c $(HACK_H) -rumors.o: rumors.c $(HACK_H) ../include/lev.h ../include/dlb.h -save.o: save.c $(HACK_H) ../include/lev.h +rumors.o: rumors.c $(HACK_H) ../include/lev.h ../include/dlb.h \ + ../include/sfproto.h ../include/integer.h +save.o: save.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ + ../include/integer.h +sfstruct.o: sfstruct.c $(HACK_H) +sfbase.o: sfbase.c $(HACK_H) ../include/integer.h ../include/sfprocs.h +sfdata.o: sfdata.c $(HACK_H) ../include/artifact.h ../include/func_tab.h \ + ../include/lev.h ../include/integer.h ../include/sfproto.h +sfascii.o: sfascii.c $(HACK_H) ../include/integer.h ../include/sfprocs.h +sflendian.o: sflendian.c $(HACK_H) ../include/integer.h ../include/sfprocs.h shk.o: shk.c $(HACK_H) shknam.o: shknam.c $(HACK_H) sit.o: sit.c $(HACK_H) ../include/artifact.h sounds.o: sounds.c $(HACK_H) -sp_lev.o: sp_lev.c $(HACK_H) ../include/dlb.h ../include/sp_lev.h +sp_lev.o: sp_lev.c $(HACK_H) ../include/sp_lev.h spell.o: spell.c $(HACK_H) steal.o: steal.c $(HACK_H) steed.o: steed.c $(HACK_H) sys.o: sys.c $(HACK_H) teleport.o: teleport.c $(HACK_H) -timeout.o: timeout.c $(HACK_H) ../include/lev.h +timeout.o: timeout.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ + ../include/integer.h topten.o: topten.c $(HACK_H) ../include/dlb.h ../include/patchlevel.h track.o: track.c $(HACK_H) trap.o: trap.c $(HACK_H) @@ -1117,14 +1137,16 @@ u_init.o: u_init.c $(HACK_H) uhitm.o: uhitm.c $(HACK_H) vault.o: vault.c $(HACK_H) version.o: version.c $(HACK_H) ../include/dlb.h ../include/date.h \ + ../include/lev.h ../include/sfproto.h ../include/integer.h \ ../include/patchlevel.h vision.o: vision.c $(HACK_H) ../include/vis_tab.h weapon.o: weapon.c $(HACK_H) were.o: were.c $(HACK_H) wield.o: wield.c $(HACK_H) windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h -wizard.o: wizard.c $(HACK_H) ../include/qtext.h -worm.o: worm.c $(HACK_H) ../include/lev.h +wizard.o: wizard.c $(HACK_H) +worm.o: worm.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ + ../include/integer.h worn.o: worn.c $(HACK_H) write.o: write.c $(HACK_H) zap.o: zap.c $(HACK_H) From bb72823d7b100aefee0673d15bfd92c41e0bcd44 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 7 Dec 2019 17:26:58 -0800 Subject: [PATCH 450/529] redo the #H9479 fix - worn dented pot Handle recently changed armoroff() differently. There should be no change in behavior. boots_simple_name(), shield_simple_name(), and shirt_simple_name() are for no-delay armor types so won't be called by armoroff(). But they'll undoubtedly get some use in the future. --- include/extern.h | 5 ++- src/do_wear.c | 108 +++++++++++++++++++++++++---------------------- src/objnam.c | 61 +++++++++++++++++++++++++- 3 files changed, 121 insertions(+), 53 deletions(-) diff --git a/include/extern.h b/include/extern.h index c0016274e..eaa7d5f3d 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1574648937 2019/11/25 02:28:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.760 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1575768406 2019/12/08 01:26:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.766 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1796,6 +1796,9 @@ E const char *FDECL(suit_simple_name, (struct obj *)); E const char *FDECL(cloak_simple_name, (struct obj *)); E const char *FDECL(helm_simple_name, (struct obj *)); E const char *FDECL(gloves_simple_name, (struct obj *)); +E const char *FDECL(boots_simple_name, (struct obj *)); +E const char *FDECL(shield_simple_name, (struct obj *)); +E const char *FDECL(shirt_simple_name, (struct obj *)); E const char *FDECL(mimic_obj_name, (struct monst *)); E char *FDECL(safe_qbuf, (char *, const char *, const char *, struct obj *, char *(*)(OBJ_P), char *(*)(OBJ_P), const char *)); diff --git a/src/do_wear.c b/src/do_wear.c index a591a9bd5..584d9fb7c 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_wear.c $NHDT-Date: 1575214670 2019/12/01 15:37:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.116 $ */ +/* NetHack 3.6 do_wear.c $NHDT-Date: 1575768410 2019/12/08 01:26:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.126 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1464,11 +1464,11 @@ struct obj *obj; return 0; } - reset_remarm(); /* clear g.context.takeoff.mask and g.context.takeoff.what */ + reset_remarm(); /* clear context.takeoff.mask and context.takeoff.what */ (void) select_off(obj); if (!g.context.takeoff.mask) return 0; - /* none of armoroff()/Ring_/Amulet/Blindf_off() use g.context.takeoff.mask */ + /* none of armoroff()/Ring_/Amulet/Blindf_off() use context.takeoff.mask */ reset_remarm(); if (obj->owornmask & W_ARMOR) { @@ -1584,70 +1584,76 @@ struct obj *otmp; if (delay) { nomul(delay); g.multi_reason = "disrobing"; - if (is_helmet(otmp)) { - what = helm_simple_name(otmp); - g.afternmv = Helmet_off; - } else if (is_gloves(otmp)) { - what = gloves_simple_name(otmp); - g.afternmv = Gloves_off; - } else if (is_boots(otmp)) { - what = c_boots; - g.afternmv = Boots_off; - } else if (is_suit(otmp)) { + switch (objects[otmp->otyp].oc_armcat) { + case ARM_SUIT: what = suit_simple_name(otmp); g.afternmv = Armor_off; - } else if (is_cloak(otmp)) { + break; + case ARM_SHIELD: + what = shield_simple_name(otmp); + g.afternmv = Shield_off; + break; + case ARM_HELM: + what = helm_simple_name(otmp); + g.afternmv = Helmet_off; + break; + case ARM_GLOVES: + what = gloves_simple_name(otmp); + g.afternmv = Gloves_off; + break; + case ARM_BOOTS: + what = boots_simple_name(otmp); + g.afternmv = Boots_off; + break; + case ARM_CLOAK: what = cloak_simple_name(otmp); g.afternmv = Cloak_off; - } else if (is_shield(otmp)) { - what = c_shield; - g.afternmv = Shield_off; - } else if (is_shirt(otmp)) { - what = c_shirt; + break; + case ARM_SHIRT: + what = shirt_simple_name(otmp); g.afternmv = Shirt_off; - } else { + break; + default: impossible("Taking off unknown armor (%d: %d), delay %d", otmp->otyp, objects[otmp->otyp].oc_armcat, delay); + break; } if (what) { + /* sizeof offdelaybuf == 60; increase it if this becomes longer */ Sprintf(offdelaybuf, "You finish taking off your %s.", what); g.nomovemsg = offdelaybuf; } } else { - /* Be warned! We want off_msg after removing the item to - * avoid "You were wearing ____ (being worn)." However, an - * item which grants fire resistance might cause some trouble - * if removed in Hell and lifesaving puts it back on; in this - * case the message will be printed at the wrong time (after - * the messages saying you died and were lifesaved). Luckily, - * no cloak, shield, or fast-removable armor grants fire - * resistance, so we can safely do the off_msg afterwards. - * Rings do grant fire resistance, but for rings we want the - * off_msg before removal anyway so there's no problem. Take - * care in adding armors granting fire resistance; this code - * might need modification. - * 3.2 (actually 3.1 even): that comment is obsolete since - * fire resistance is not required for Gehennom so setworn() - * doesn't force the resistance granting item to be re-worn - * after being lifesaved anymore. - */ - if (is_cloak(otmp)) - (void) Cloak_off(); - else if (is_shield(otmp)) - (void) Shield_off(); - else if (is_helmet(otmp)) - (void) Helmet_off(); - else if (is_gloves(otmp)) - (void) Gloves_off(); - else if (is_boots(otmp)) - (void) Boots_off(); - else if (is_shirt(otmp)) - (void) Shirt_off(); - else if (is_suit(otmp)) + /* no delay so no '(*afternmv)()' or 'nomovemsg' */ + switch (objects[otmp->otyp].oc_armcat) { + case ARM_SUIT: (void) Armor_off(); - else + break; + case ARM_SHIELD: + (void) Shield_off(); + break; + case ARM_HELM: + (void) Helmet_off(); + break; + case ARM_GLOVES: + (void) Gloves_off(); + break; + case ARM_BOOTS: + (void) Boots_off(); + break; + case ARM_CLOAK: + (void) Cloak_off(); + break; + case ARM_SHIRT: + (void) Shirt_off(); + break; + default: impossible("Taking off unknown armor (%d: %d), no delay", otmp->otyp, objects[otmp->otyp].oc_armcat); + break; + } + /* We want off_msg() after removing the item to + avoid "You were wearing ____ (being worn)." */ off_msg(otmp); } g.context.takeoff.mask = g.context.takeoff.what = 0L; diff --git a/src/objnam.c b/src/objnam.c index fe19f9a3c..16b41cb73 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 objnam.c $NHDT-Date: 1575245076 2019/12/02 00:04:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.255 $ */ +/* NetHack 3.7 objnam.c $NHDT-Date: 1575768412 2019/12/08 01:26:52 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.273 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -4241,6 +4241,65 @@ struct obj *gloves; return "gloves"; } +/* boots vs shoes; depends upon discovery state */ +const char * +boots_simple_name(boots) +struct obj *boots; +{ + static const char shoes[] = "shoes"; + + if (boots && boots->dknown) { + int otyp = boots->otyp; + struct objclass *ocl = &objects[otyp]; + const char *actualn = OBJ_NAME(*ocl), + *descrpn = OBJ_DESCR(*ocl); + + if (strstri(descrpn, shoes) + || (objects[otyp].oc_name_known && strstri(actualn, shoes))) + return shoes; + } + return "boots"; +} + +/* simplified shield for messages */ +const char * +shield_simple_name(shield) +struct obj *shield; +{ + if (shield) { + /* xname() describes unknown (unseen) reflection as smooth */ + if (shield->otyp == SHIELD_OF_REFLECTION) + return shield->dknown ? "silver shield" : "smooth shield"; + /* + * We might distinguish between wooden vs metallic or + * light vs heavy to give small benefit to spell casters. + * Fighter types probably care more about the former for + * vulnerability to fire or rust. + * + * We could do that both ways: light wooden shield, light + * metallic shield (there aren't any), heavy wooden shield, + * and heavy metallic shield but that's getting away from + * "simple name" which is intended to be shorter as well + * as less detailed than xname(). + */ +#if 0 + /* spellcasting uses a division like this */ + return (weight(shield) > (int) objects[SMALL_SHIELD].oc_weight) + ? "heavy shield" + : "light shield"; +#endif + } + return "shield"; +} + +/* for completness */ +const char * +shirt_simple_name(shirt) +struct obj *shirt UNUSED; +{ + return "shirt"; +} + const char * mimic_obj_name(mtmp) struct monst *mtmp; From 2bf55a6ec727b916ca272d7e50fc7a45865dec86 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 7 Dec 2019 22:03:43 -0500 Subject: [PATCH 451/529] mapglyph level-related function calls are done once per level --- doc/fixes37.0 | 2 ++ include/decl.h | 3 +++ src/decl.c | 3 +++ src/do.c | 1 + src/mapglyph.c | 36 ++++++++++++++++++++++++++++++------ 5 files changed, 39 insertions(+), 6 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 2921d7b88..af0bdfaaa 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -13,6 +13,8 @@ improvements to pronoun usage when hallucinating message "your knapsack can't accomodate any more items" when picking stuff up or removing such from container was inaccurate if there was some gold pending; vary the message rather than add more convoluted pickup code +function calls made from mapglyph based on dungeon level are now called once + per level Fixes to Pre-3.7.0 Problems that Were Exposed Via git Repository diff --git a/include/decl.h b/include/decl.h index ce0ecabe8..d6100e241 100644 --- a/include/decl.h +++ b/include/decl.h @@ -1260,6 +1260,9 @@ struct instance_globals { char lua_ver[LUA_VER_BUFSIZ]; char lua_copyright[LUA_COPYRIGHT_BUFSIZ]; + /* per-level glyph mapping flags */ + long glyphmap_perlevel_flags; + unsigned long magic; /* validate that structure layout is preserved */ }; diff --git a/src/decl.c b/src/decl.c index a0c3a9d4a..8ae9aa6c7 100644 --- a/src/decl.c +++ b/src/decl.c @@ -695,6 +695,9 @@ const struct instance_globals g_init = { DUMMY, /* lua_ver[LUA_VER_BUFSIZ] */ DUMMY, /* lua_copyright[LUA_COPYRIGHT_BUFSIZ] */ + /* per-level glyph mapping flags */ + 0L, /* glyphmap_perlevel_flags */ + IVMAGIC /* used to validate that structure layout has been preserved */ }; diff --git a/src/do.c b/src/do.c index 9cf5669ad..9b5cbd965 100644 --- a/src/do.c +++ b/src/do.c @@ -1578,6 +1578,7 @@ boolean at_stairs, falling, portal; /* Reset the screen. */ vision_reset(); /* reset the blockages */ + g.glyphmap_perlevel_flags = 0L; /* force per-level mapglyph() changes */ docrt(); /* does a full vision recalc */ flush_screen(-1); diff --git a/src/mapglyph.c b/src/mapglyph.c index bc7e4f727..7a28091d9 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -9,9 +9,11 @@ #include "color.h" #define HI_DOMESTIC CLR_WHITE /* monst.c */ +#if 0 #if !defined(TTY_GRAPHICS) #define has_color(n) TRUE #endif +#endif #ifdef TEXTCOLOR static const int explcolors[] = { @@ -57,6 +59,10 @@ static const int explcolors[] = { #define is_objpile(x,y) (!Hallucination && g.level.objects[(x)][(y)] \ && g.level.objects[(x)][(y)]->nexthere) +#define GMAP_SET 0x00000001 +#define GMAP_ROGUELEVEL 0x00000002 +#define GMAP_ALTARCOLOR 0x00000004 + /*ARGSUSED*/ int mapglyph(glyph, ochar, ocolor, ospecial, x, y, mgflags) @@ -75,6 +81,21 @@ unsigned mgflags; has_rogue_color = (has_rogue_ibm_graphics && g.symset[g.currentgraphics].nocolor == 0); + if (!g.glyphmap_perlevel_flags) { + /* + * GMAP_SET 0x00000001 + * GMAP_ROGUELEVEL 0x00000002 + * GMAP_ALTARCOLOR 0x00000004 + */ + g.glyphmap_perlevel_flags |= GMAP_SET; + + if (Is_rogue_level(&u.uz)) { + g.glyphmap_perlevel_flags |= GMAP_ROGUELEVEL; + } else if ((Is_astralevel(&u.uz) || Is_sanctum(&u.uz))) { + g.glyphmap_perlevel_flags |= GMAP_ALTARCOLOR; + } + } + /* * Map the glyph back to a character and color. * @@ -142,7 +163,7 @@ unsigned mgflags; == g.showsyms[S_water + SYM_OFF_P])) { special |= MG_BW_LAVA; } else if (offset == S_altar && iflags.use_color) { - if ((Is_astralevel(&u.uz) || Is_sanctum(&u.uz)) + if ((g.glyphmap_perlevel_flags & GMAP_ALTARCOLOR) && (levl[x][y].altarmask & AM_SHRINE)) { /* high altar */ color = CLR_BRIGHT_MAGENTA; @@ -273,14 +294,16 @@ unsigned mgflags; if ((special & MG_PET) != 0) { ovidx = SYM_PET_OVERRIDE + SYM_OFF_X; - if (Is_rogue_level(&u.uz) ? g.ov_rogue_syms[ovidx] - : g.ov_primary_syms[ovidx]) + if ((g.glyphmap_perlevel_flags & GMAP_ROGUELEVEL) + ? g.ov_rogue_syms[ovidx] + : g.ov_primary_syms[ovidx]) idx = ovidx; } if (is_you) { ovidx = SYM_HERO_OVERRIDE + SYM_OFF_X; - if (Is_rogue_level(&u.uz) ? g.ov_rogue_syms[ovidx] - : g.ov_primary_syms[ovidx]) + if ((g.glyphmap_perlevel_flags & GMAP_ROGUELEVEL) + ? g.ov_rogue_syms[ovidx] + : g.ov_primary_syms[ovidx]) idx = ovidx; } } @@ -288,7 +311,8 @@ unsigned mgflags; ch = g.showsyms[idx]; #ifdef TEXTCOLOR /* Turn off color if no color defined, or rogue level w/o PC graphics. */ - if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_color)) + if (!has_color(color) || + ((g.glyphmap_perlevel_flags & GMAP_ROGUELEVEL) && !has_rogue_color)) #endif color = NO_COLOR; *ochar = (int) ch; From ba36e7107ff15a7a88c6cd2578f85bdaf953a259 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Sat, 7 Dec 2019 21:23:35 -0500 Subject: [PATCH 452/529] This is cron-daily v1-Dec-2-2019. files updated: Files --- Files | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/Files b/Files index b7448e53c..b04f5f544 100644 --- a/Files +++ b/Files @@ -307,25 +307,24 @@ dlb_main.c makedefs.c mdgrep.h mdgrep.pl panic.c readtags.c recover.c win/Qt: +(files for the Qt 4 or 5 widget library - X11, Windows, Mac OS X) +qt_bind.cpp qt_bind.h qt_click.cpp qt_click.h qt_clust.cpp +qt_clust.h qt_delay.cpp qt_delay.h qt_glyph.cpp qt_glyph.h +qt_icon.cpp qt_icon.h qt_inv.cpp qt_inv.h qt_kde0.h +qt_key.cpp qt_key.h qt_line.cpp qt_line.h qt_main.cpp +qt_main.h qt_map.cpp qt_map.h qt_menu.cpp qt_menu.h +qt_msg.cpp qt_msg.h qt_plsel.cpp qt_plsel.h qt_rip.cpp +qt_rip.h qt_set.cpp qt_set.h qt_stat.cpp qt_stat.h +qt_str.cpp qt_str.h qt_streq.cpp qt_streq.h qt_svsel.cpp +qt_svsel.h qt_win.cpp qt_win.h qt_xcmd.cpp qt_xcmd.h +qt_yndlg.cpp qt_yndlg.h + +win/Qt3: (files for the Qt 3 widget library - X11, Windows, Mac OS X, or Qtopia) Info.plist Install.Qt knethack.lnk -knh-mini.xpm knh.xpm nhicns.uu -nhsplash.xpm qpe-nethack.control qt_clust.cpp -qt_win.cpp qttableview.cpp tileedit.cpp -tileedit.h - -win/Qt4: -(files for the Qt 4 widget library - X11, Windows, Mac OS X) -qt4bind.cpp qt4bind.h qt4click.cpp qt4click.h qt4clust.cpp -qt4clust.h qt4delay.cpp qt4delay.h qt4glyph.cpp qt4glyph.h -qt4icon.cpp qt4icon.h qt4inv.cpp qt4inv.h qt4kde0.h -qt4key.cpp qt4key.h qt4line.cpp qt4line.h qt4main.cpp -qt4main.h qt4map.cpp qt4map.h qt4menu.cpp qt4menu.h -qt4msg.cpp qt4msg.h qt4plsel.cpp qt4plsel.h qt4rip.cpp -qt4rip.h qt4set.cpp qt4set.h qt4stat.cpp qt4stat.h -qt4str.cpp qt4str.h qt4streq.cpp qt4streq.h qt4svsel.cpp -qt4svsel.h qt4win.cpp qt4win.h qt4xcmd.cpp qt4xcmd.h -qt4yndlg.cpp qt4yndlg.h +knh-mini.xpm knh.xpm qpe-nethack.control +qt_clust.cpp qt_win.cpp qttableview.cpp +tileedit.cpp tileedit.h win/X11: (files for X versions) @@ -366,10 +365,10 @@ NetHackTerm.applescript recover.pl win/share: (files for versions using optional tiles) -bmptiles.c gifread.c giftiles.c monsters.txt objects.txt -other.txt ppmwrite.c renumtiles.pl safeproc.c thintile.c -tile.doc tile.h tile2bmp.c tilemap.c tileset.c -tiletext.c +bmptiles.c gifread.c giftiles.c monsters.txt nhicns.uu +nhsplash.xpm objects.txt other.txt ppmwrite.c renumtiles.pl +safeproc.c thintile.c tile.doc tile.h tile2bmp.c +tilemap.c tileset.c tiletext.c win/tty: (files for tty versions) From e9fab48aeba4a89f568ae3953d0b7b9dccad9537 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 7 Dec 2019 19:26:47 -0800 Subject: [PATCH 453/529] weakening the mysterious force effect Izchak implemented the mysterious force and as far as I'm concerned, it's here to stay. But it can be fine tuned. This is an experimental attempt to make it happen less. Each time it happens, the chance for it happening again later will usually go down by an amount proportional to how far it sent the hero back. So chaotics will be sent back--or "side to side"--less often than in 3.6.x but the tapering off of such occurrences will be slower for them. Lawfuls will also be sent back less often--still potentially farther down than others--but tapering off of send backs for them will be quicker. I'll let somebody else figure out the before and after values for number of attempts to climb up it takes to finally get out of Gehennom. The numbers might need tuning. --- include/context.h | 3 ++- include/patchlevel.h | 4 ++-- src/do.c | 26 +++++++++++++++++++------- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/include/context.h b/include/context.h index 6209a5e82..4e20f3bdc 100644 --- a/include/context.h +++ b/include/context.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 context.h $NHDT-Date: 1455907260 2016/02/19 18:41:00 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.30 $ */ +/* NetHack 3.6 context.h $NHDT-Date: 1575775592 2019/12/08 03:26:32 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.35 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -115,6 +115,7 @@ struct context_info { int current_fruit; /* fruit->fid corresponding to g.pl_fruit[] */ int warnlevel; int rndencode; /* randomized escape sequence introducer */ + int mysteryforce; long next_attrib_check; /* next attribute check */ long stethoscope_move; short stethoscope_movement; diff --git a/include/patchlevel.h b/include/patchlevel.h index 0c8bd7c7a..94fac6a63 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -1,4 +1,4 @@ -/* NetHack 3.7 patchlevel.h $NHDT-Date: 1574982020 2019/11/28 23:00:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.134 $ */ +/* NetHack 3.7 patchlevel.h $NHDT-Date: 1575775596 2019/12/08 03:26:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.136 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -14,7 +14,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 1 +#define EDITLEVEL 2 #define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2019" #define COPYRIGHT_BANNER_B \ diff --git a/src/do.c b/src/do.c index 9b5cbd965..4dcc8ca07 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do.c $NHDT-Date: 1575245055 2019/12/02 00:04:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.196 $ */ +/* NetHack 3.6 do.c $NHDT-Date: 1575775597 2019/12/08 03:26:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.216 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1279,15 +1279,22 @@ boolean at_stairs, falling, portal; * -1 11.46 12.50 12.5 * -2 5.21 4.17 0.0 * -3 2.08 0.0 0.0 + * + * 3.7.0: the chance for the "mysterious force" to kick in goes down + * as it kicks in, starting at 25% per climb attempt and dropping off + * gradually but substantially. The drop off is greater when hero is + * sent down farther so benefits lawfuls more than chaotics this time. */ if (Inhell && up && u.uhave.amulet && !newdungeon && !portal && (dunlev(&u.uz) < dunlevs_in_dungeon(&u.uz) - 3)) { - if (!rn2(4)) { + if (!rn2(4 + g.context.mysteryforce)) { int odds = 3 + (int) u.ualign.type, /* 2..4 */ - diff = odds <= 1 ? 0 : rn2(odds); /* paranoia */ + diff = (odds <= 1) ? 0 : rn2(odds); /* paranoia */ if (diff != 0) { assign_rnd_level(newlevel, &u.uz, diff); + /* assign_rnd_level() may have used a value less than diff */ + diff = u.uz.dlevel - newlevel->dlevel; /* actual descent */ /* if inside the tower, stay inside */ if (was_in_W_tower && !On_W_tower_level(newlevel)) diff = 0; @@ -1295,15 +1302,20 @@ boolean at_stairs, falling, portal; if (diff == 0) assign_level(newlevel, &u.uz); - new_ledger = ledger_no(newlevel); - pline("A mysterious force momentarily surrounds you..."); + /* each time it kicks in, the chance of doing so again may drop; + that drops faster, on average, when being sent down farther so + while the impact is reduced for everybody compared to earlier + versions, it is reduced least for chaotics, most for lawfuls */ + g.context.mysteryforce += rn2(diff + 2); /* L:0-4, N:0-3, C:0-2 */ + if (on_level(newlevel, &u.uz)) { (void) safe_teleds(FALSE); (void) next_to_u(); return; - } else - at_stairs = g.at_ladder = FALSE; + } + new_ledger = ledger_no(newlevel); + at_stairs = g.at_ladder = FALSE; } } From b6e773487730372a336127eb5d939fc69ad1e889 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 7 Dec 2019 22:57:31 -0500 Subject: [PATCH 454/529] fix game save/restore --- src/sfdata.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sfdata.c b/src/sfdata.c index b8e29d445..54c456eb4 100644 --- a/src/sfdata.c +++ b/src/sfdata.c @@ -215,6 +215,7 @@ int cnt; sfo_int(nhfp, &d_context_info->current_fruit, parent, "current_fruit", 1);/* (int) */ sfo_int(nhfp, &d_context_info->warnlevel, parent, "warnlevel", 1);/* (int) */ sfo_int(nhfp, &d_context_info->rndencode, parent, "rndencode", 1);/* (int) */ + sfo_int(nhfp, &d_context_info->mysteryforce, parent, "mysteryforce", 1);/* (int) */ sfo_long(nhfp, &d_context_info->next_attrib_check, parent, "next_attrib_check", 1);/* (long) */ sfo_long(nhfp, &d_context_info->stethoscope_move, parent, "stethoscope_move", 1);/* (long) */ sfo_short(nhfp, &d_context_info->stethoscope_movement, parent, "stethoscope_movement", 1);/* (short) */ @@ -2585,6 +2586,7 @@ int cnt; sfi_int(nhfp, &d_context_info->current_fruit, parent, "current_fruit", 1); sfi_int(nhfp, &d_context_info->warnlevel, parent, "warnlevel", 1); sfi_int(nhfp, &d_context_info->rndencode, parent, "rndencode", 1); + sfi_int(nhfp, &d_context_info->mysteryforce, parent, "mysteryforce", 1); sfi_long(nhfp, &d_context_info->next_attrib_check, parent, "next_attrib_check", 1); sfi_long(nhfp, &d_context_info->stethoscope_move, parent, "stethoscope_move", 1); sfi_short(nhfp, &d_context_info->stethoscope_movement, parent, "stethoscope_movement", 1); @@ -5305,6 +5307,7 @@ const char *critical_members[] = { "struct context_info:current_fruit:int", "struct context_info:warnlevel:int", "struct context_info:rndencode:int", + "struct context_info:mysteryforce:int", "struct context_info:next_attrib_check:long", "struct context_info:stethoscope_move:long", "struct context_info:stethoscope_movement:short", From 2cb46c4153083b1eb5eb25f6ff75acbc2e5478f6 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 8 Dec 2019 11:52:58 +0200 Subject: [PATCH 455/529] Initialize object containment field This is 3.7 bug caused by the lua implementation, so no fixes entry. --- src/sp_lev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sp_lev.c b/src/sp_lev.c index 94a829938..5f0fcda92 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -2655,6 +2655,7 @@ lua_State *L; tmpobj.recharged = 0; tmpobj.greased = 0; tmpobj.broken = 0; + tmpobj.containment = 0; if (argc == 1 && lua_type(L, 1) == LUA_TSTRING) { const char *paramstr = luaL_checkstring(L, 1); From bc8c1f8f56b90e1731e6f205a3bf589655f915b4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 8 Dec 2019 07:27:01 -0500 Subject: [PATCH 456/529] remove field-level savefile code --- Cross-compiling | 3 +- include/sfprocs.h | 192 - include/sfproto.h | 201 - src/artifact.c | 20 - src/bones.c | 15 - src/dungeon.c | 75 - src/end.c | 5 - src/engrave.c | 16 - src/files.c | 165 +- src/light.c | 13 - src/mkmaze.c | 20 - src/mkroom.c | 10 - src/o_init.c | 31 - src/options.c | 3 - src/region.c | 92 +- src/restore.c | 184 - src/rumors.c | 14 - src/save.c | 182 - src/sfascii.c | 1233 ---- src/sfbase.c | 646 --- src/sfdata.c | 6055 -------------------- src/sflendian.c | 1339 ----- src/timeout.c | 22 - src/version.c | 40 +- src/worm.c | 22 - sys/msdos/Makefile.GCC | 3 +- sys/msdos/Makefile2.cross | 3 +- sys/share/pcmain.c | 3 - sys/unix/Makefile.src | 70 +- sys/unix/Makefile.utl | 70 - sys/unix/NetHack.xcodeproj/project.pbxproj | 20 - sys/vms/vmsbuild.com | 2 +- sys/winnt/Makefile.gcc | 3 +- sys/winnt/Makefile.msc | 85 +- util/readtags.c | 1677 ------ win/win32/vs2017/NetHack.vcxproj | 4 - win/win32/vs2017/NetHackW.vcxproj | 4 - 37 files changed, 38 insertions(+), 12504 deletions(-) delete mode 100644 include/sfprocs.h delete mode 100644 include/sfproto.h delete mode 100644 src/sfascii.c delete mode 100644 src/sfbase.c delete mode 100644 src/sfdata.c delete mode 100644 src/sflendian.c delete mode 100644 util/readtags.c diff --git a/Cross-compiling b/Cross-compiling index bccd5bce6..b3dbba6f6 100644 --- a/Cross-compiling +++ b/Cross-compiling @@ -378,8 +378,7 @@ Using the cross-compiler, build the following targets: src/priest.c, src/quest.c, src/questpgr.c, src/random.c, src/read.c, src/rect.c, src/region.c, src/restore.c, src/rip.c, src/rnd.c, src/role.c, - src/rumors.c, src/save.c, src/sfbase.c, - src/sfdata.c, src/sflendian.c, src/sfstruct.c, + src/rumors.c, src/save.c, src/sfstruct.c, src/shk.c, src/shknam.c, src/sit.c, src/sounds.c, src/sp_lev.c, src/spell.c, src/steal.c, src/steed.c, src/sys.c, src/teleport.c, src/tile.c, diff --git a/include/sfprocs.h b/include/sfprocs.h deleted file mode 100644 index a3b3f5dd3..000000000 --- a/include/sfprocs.h +++ /dev/null @@ -1,192 +0,0 @@ -/* NetHack 3.6 sfprocs.h Tue Nov 6 19:38:48 2018 */ -/* Copyright (c) NetHack Development Team 2018. */ -/* NetHack may be freely redistributed. See license for details. */ - -#ifndef SFPROCS_H -#define SFPROCS_H - -#include "hack.h" -#include "integer.h" -#include "wintype.h" - -#define E extern - -/* output routines */ -E void FDECL(ascii_sfo_aligntyp, (NHFILE *, aligntyp *, const char *, const char *, int)); -E void FDECL(ascii_sfo_any, (NHFILE *, union any *d_any, const char *, const char *, int)); -E void FDECL(ascii_sfo_bitfield, (NHFILE *, uint8_t *, const char *, const char *, int)); -E void FDECL(ascii_sfo_boolean, (NHFILE *, boolean *, const char *, const char *, int)); -E void FDECL(ascii_sfo_char, (NHFILE *, char *, const char *, const char *, int)); -E void FDECL(ascii_sfo_genericptr, (NHFILE *, genericptr_t *, const char *, const char *, int)); -E void FDECL(ascii_sfo_int, (NHFILE *, int *, const char *, const char *, int)); -E void FDECL(ascii_sfo_long, (NHFILE *, long *, const char *, const char *, int)); -E void FDECL(ascii_sfo_schar, (NHFILE *, schar *, const char *, const char *, int)); -E void FDECL(ascii_sfo_short, (NHFILE *, short *, const char *, const char *, int)); -E void FDECL(ascii_sfo_size_t, (NHFILE *, size_t *, const char *, const char *, int)); -E void FDECL(ascii_sfo_time_t, (NHFILE *, time_t *, const char *, const char *, int)); -E void FDECL(ascii_sfo_unsigned, (NHFILE *, unsigned *, const char *, const char *, int)); -E void FDECL(ascii_sfo_uchar, (NHFILE *, unsigned char *, const char *, const char *, int)); -E void FDECL(ascii_sfo_uint, (NHFILE *, unsigned int *, const char *, const char *, int)); -E void FDECL(ascii_sfo_ulong, (NHFILE *, unsigned long *, const char *, const char *, int)); -E void FDECL(ascii_sfo_ushort, (NHFILE *, unsigned short *, const char *, const char *, int)); -E void FDECL(ascii_sfo_xchar, (NHFILE *, xchar *, const char *, const char *, int)); -E void FDECL(ascii_sfo_str, (NHFILE *, char *, const char *, const char *, int)); -E void FDECL(ascii_sfo_addinfo, (NHFILE *, const char *, const char *, const char *, int)); - -/* input routines */ -E void FDECL(ascii_sfi_aligntyp, (NHFILE *, aligntyp *, const char *, const char *, int)); -E void FDECL(ascii_sfi_any, (NHFILE *, union any *d_any, const char *, const char *, int)); -E void FDECL(ascii_sfi_bitfield, (NHFILE *, uint8_t *, const char *, const char *, int)); -E void FDECL(ascii_sfi_boolean, (NHFILE *, boolean *, const char *, const char *, int)); -E void FDECL(ascii_sfi_char, (NHFILE *, char *, const char *, const char *, int)); -E void FDECL(ascii_sfi_genericptr, (NHFILE *, genericptr_t *, const char *, const char *, int)); -E void FDECL(ascii_sfi_int, (NHFILE *, int *, const char *, const char *, int)); -E void FDECL(ascii_sfi_long, (NHFILE *, long *, const char *, const char *, int)); -E void FDECL(ascii_sfi_schar, (NHFILE *, schar *, const char *, const char *, int)); -E void FDECL(ascii_sfi_short, (NHFILE *, short *, const char *, const char *, int)); -E void FDECL(ascii_sfi_size_t, (NHFILE *, size_t *, const char *, const char *, int)); -E void FDECL(ascii_sfi_time_t, (NHFILE *, time_t *, const char *, const char *, int)); -E void FDECL(ascii_sfi_unsigned, (NHFILE *, unsigned *, const char *, const char *, int)); -E void FDECL(ascii_sfi_uchar, (NHFILE *, unsigned char *, const char *, const char *, int)); -E void FDECL(ascii_sfi_uint, (NHFILE *, unsigned int *, const char *, const char *, int)); -E void FDECL(ascii_sfi_ulong, (NHFILE *, unsigned long *, const char *, const char *, int)); -E void FDECL(ascii_sfi_ushort, (NHFILE *, unsigned short *, const char *, const char *, int)); -E void FDECL(ascii_sfi_xchar, (NHFILE *, xchar *, const char *, const char *, int)); -E void FDECL(ascii_sfi_str, (NHFILE *, char *, const char *, const char *, int)); -E void FDECL(ascii_sfi_addinfo, (NHFILE *, const char *, const char *, const char *, int)); - -/* output routines */ -E void FDECL(lendian_sfo_aligntyp, (NHFILE *, aligntyp *, const char *, const char *, int)); -E void FDECL(lendian_sfo_any, (NHFILE *, union any *d_any, const char *, const char *, int)); -E void FDECL(lendian_sfo_bitfield, (NHFILE *, uint8_t *, const char *, const char *, int)); -E void FDECL(lendian_sfo_boolean, (NHFILE *, boolean *, const char *, const char *, int)); -E void FDECL(lendian_sfo_char, (NHFILE *, char *, const char *, const char *, int)); -E void FDECL(lendian_sfo_genericptr, (NHFILE *, genericptr_t *, const char *, const char *, int)); -E void FDECL(lendian_sfo_int, (NHFILE *, int *, const char *, const char *, int)); -E void FDECL(lendian_sfo_long, (NHFILE *, long *, const char *, const char *, int)); -E void FDECL(lendian_sfo_schar, (NHFILE *, schar *, const char *, const char *, int)); -E void FDECL(lendian_sfo_short, (NHFILE *, short *, const char *, const char *, int)); -E void FDECL(lendian_sfo_size_t, (NHFILE *, size_t *, const char *, const char *, int)); -E void FDECL(lendian_sfo_time_t, (NHFILE *, time_t *, const char *, const char *, int)); -E void FDECL(lendian_sfo_unsigned, (NHFILE *, unsigned *, const char *, const char *, int)); -E void FDECL(lendian_sfo_uchar, (NHFILE *, unsigned char *, const char *, const char *, int)); -E void FDECL(lendian_sfo_uint, (NHFILE *, unsigned int *, const char *, const char *, int)); -E void FDECL(lendian_sfo_ulong, (NHFILE *, unsigned long *, const char *, const char *, int)); -E void FDECL(lendian_sfo_ushort, (NHFILE *, unsigned short *, const char *, const char *, int)); -E void FDECL(lendian_sfo_xchar, (NHFILE *, xchar *, const char *, const char *, int)); -E void FDECL(lendian_sfo_str, (NHFILE *, char *, const char *, const char *, int)); -E void FDECL(lendian_sfo_addinfo, (NHFILE *, const char *, const char *, const char *, int)); - -/* input routines */ -E void FDECL(lendian_sfi_aligntyp, (NHFILE *, aligntyp *, const char *, const char *, int)); -E void FDECL(lendian_sfi_any, (NHFILE *, union any *d_any, const char *, const char *, int)); -E void FDECL(lendian_sfi_bitfield, (NHFILE *, uint8_t *, const char *, const char *, int)); -E void FDECL(lendian_sfi_boolean, (NHFILE *, boolean *, const char *, const char *, int)); -E void FDECL(lendian_sfi_char, (NHFILE *, char *, const char *, const char *, int)); -E void FDECL(lendian_sfi_genericptr, (NHFILE *, genericptr_t *, const char *, const char *, int)); -E void FDECL(lendian_sfi_int, (NHFILE *, int *, const char *, const char *, int)); -E void FDECL(lendian_sfi_long, (NHFILE *, long *, const char *, const char *, int)); -E void FDECL(lendian_sfi_schar, (NHFILE *, schar *, const char *, const char *, int)); -E void FDECL(lendian_sfi_short, (NHFILE *, short *, const char *, const char *, int)); -E void FDECL(lendian_sfi_size_t, (NHFILE *, size_t *, const char *, const char *, int)); -E void FDECL(lendian_sfi_time_t, (NHFILE *, time_t *, const char *, const char *, int)); -E void FDECL(lendian_sfi_unsigned, (NHFILE *, unsigned *, const char *, const char *, int)); -E void FDECL(lendian_sfi_uchar, (NHFILE *, unsigned char *, const char *, const char *, int)); -E void FDECL(lendian_sfi_uint, (NHFILE *, unsigned int *, const char *, const char *, int)); -E void FDECL(lendian_sfi_ulong, (NHFILE *, unsigned long *, const char *, const char *, int)); -E void FDECL(lendian_sfi_ushort, (NHFILE *, unsigned short *, const char *, const char *, int)); -E void FDECL(lendian_sfi_xchar, (NHFILE *, xchar *, const char *, const char *, int)); -E void FDECL(lendian_sfi_str, (NHFILE *, char *, const char *, const char *, int)); -E void FDECL(lendian_sfi_addinfo, (NHFILE *, const char *, const char *, const char *, int)); - -#ifdef JSON_SUPPORT -/* output routines */ -E void FDECL(json_sfo_aligntyp, (NHFILE *, aligntype *, const char *, const char *, int)); -E void FDECL(json_sfo_any, (NHFILE *, union any *d_any, const char *, const char *, int)); -E void FDECL(json_sfo_bitfield, (NHFILE *, uint8_t *, const char *, const char *, int)); -E void FDECL(json_sfo_boolean, (NHFILE *, boolean *, const char *, const char *, int)); -E void FDECL(json_sfo_char, (NHFILE *, char *, const char *, const char *, int)); -E void FDECL(json_sfo_genericptr, (NHFILE *, genericptr_t *, const char *, const char *, int)); -E void FDECL(json_sfo_int, (NHFILE *, int *, const char *, const char *, int)); -E void FDECL(json_sfo_long, (NHFILE *, long *, const char *, const char *, int)); -E void FDECL(json_sfo_schar, (NHFILE *, schar *, const char *, const char *, int)); -E void FDECL(json_sfo_short, (NHFILE *, short *, const char *, const char *, int)); -E void FDECL(json_sfo_size_t, (NHFILE *, size_t *, const char *, const char *, int)); -E void FDECL(json_sfo_time_t, (NHFILE *, time_t *, const char *, const char *, int)); -E void FDECL(json_sfo_unsigned, (NHFILE *, unsigned *, const char *, const char *, int)); -E void FDECL(json_sfo_uchar, (NHFILE *, unsigned char *, const char *, const char *, int)); -E void FDECL(json_sfo_uint, (NHFILE *, unsigned int *, const char *, const char *, int)); -E void FDECL(json_sfo_ulong, (NHFILE *, unsigned long *, const char *, const char *, int)); -E void FDECL(json_sfo_ushort, (NHFILE *, unsigned short *, const char *, const char *, int)); -E void FDECL(json_sfo_xchar, (NHFILE *, xchar *, const char *, const char *, int)); -E void FDECL(json_sfo_str, (NHFILE *, char *, const char *, const char *, int)); -E void FDECL(json_sfo_addinfo), (NHFILE *, const char *, const char *, const char *, int)); - -/* input routines */ -E void FDECL(json_sfi_aligntyp, (NHFILE *, aligntype *, const char *, const char *, int)); -E void FDECL(json_sfi_any, (NHFILE *, union any *d_any, const char *, const char *, int)); -E void FDECL(json_sfi_bitfield, (NHFILE *, uint8_t *, const char *, const char *, int)); -E void FDECL(json_sfi_boolean, (NHFILE *, boolean *, const char *, const char *, int)); -E void FDECL(json_sfi_char, (NHFILE *, char *, const char *, const char *, int)); -E void FDECL(json_sfi_genericptr, (NHFILE *, genericptr_t *, const char *, const char *, int)); -E void FDECL(json_sfi_int, (NHFILE *, int *, const char *, const char *, int)); -E void FDECL(json_sfi_long, (NHFILE *, long *, const char *, const char *, int)); -E void FDECL(json_sfi_schar, (NHFILE *, schar *, const char *, const char *, int)); -E void FDECL(json_sfi_short, (NHFILE *, short *, const char *, const char *, int)); -E void FDECL(json_sfi_size_t, (NHFILE *, size_t *, const char *, const char *, int)); -E void FDECL(json_sfi_time_t, (NHFILE *, time_t *, const char *, const char *, int)); -E void FDECL(json_sfi_unsigned, (NHFILE *, unsigned *, const char *, const char *, int)); -E void FDECL(json_sfi_uchar, (NHFILE *, unsigned char *, const char *, const char *, int)); -E void FDECL(json_sfi_uint, (NHFILE *, unsigned int *, const char *, const char *, int)); -E void FDECL(json_sfi_ulong, (NHFILE *, unsigned long *, const char *, const char *, int)); -E void FDECL(json_sfi_ushort, (NHFILE *, unsigned short *, const char *, const char *, int)); -E void FDECL(json_sfi_xchar, (NHFILE *, xchar *, const char *, const char *, int)); -E void FDECL(json_sfi_str, (NHFILE *, char *, const char *, const char *, int)); -E void FDECL(json_sfi_addinfo), (NHFILE *, const char *, const char *, const char *, int)); -#endif /* JSON_SUPPORT */ - -struct fieldlevel_procs { - void FDECL((*sf_aligntyp), (NHFILE *, aligntyp *, const char *, const char *, int)); - void FDECL((*sf_any), (NHFILE *, union any *d_any, const char *, const char *, int)); - void FDECL((*sf_bitfield), (NHFILE *, uint8_t *, const char *, const char *, int)); - void FDECL((*sf_boolean), (NHFILE *, boolean *, const char *, const char *, int)); - void FDECL((*sf_char), (NHFILE *, char *, const char *, const char *, int)); - void FDECL((*sf_genericptr), (NHFILE *, genericptr_t *, const char *, const char *, int)); - void FDECL((*sf_int), (NHFILE *, int *, const char *, const char *, int)); - void FDECL((*sf_long), (NHFILE *, long *, const char *, const char *, int)); - void FDECL((*sf_schar), (NHFILE *, schar *, const char *, const char *, int)); - void FDECL((*sf_short), (NHFILE *, short *, const char *, const char *, int)); - void FDECL((*sf_size_t), (NHFILE *, size_t *, const char *, const char *, int)); - void FDECL((*sf_time_t), (NHFILE *, time_t *, const char *, const char *, int)); - void FDECL((*sf_unsigned), (NHFILE *, unsigned *, const char *, const char *, int)); - void FDECL((*sf_uchar), (NHFILE *, unsigned char *, const char *, const char *, int)); - void FDECL((*sf_uint), (NHFILE *, unsigned int *, const char *, const char *, int)); - void FDECL((*sf_ulong), (NHFILE *, unsigned long *, const char *, const char *, int)); - void FDECL((*sf_ushort), (NHFILE *, unsigned short *, const char *, const char *, int)); - void FDECL((*sf_xchar), (NHFILE *, xchar *, const char *, const char *, int)); - void FDECL((*sf_str), (NHFILE *, char *, const char *, const char *, int)); - void FDECL((*sf_addinfo), (NHFILE *, const char *, const char *, const char *, int)); -}; - -struct sf_procs { - const char *ext; - struct fieldlevel_procs fn; -}; - -E void NDECL(sf_init); -E struct sf_procs sfoprocs[4], sfiprocs[4]; - -E struct sf_procs ascii_sfo_procs; -E struct sf_procs ascii_sfi_procs; -E struct sf_procs lendian_sfo_procs; -E struct sf_procs lendian_sfi_procs; -E struct sf_procs stub_sfo_procs; -E struct sf_procs stub_sfi_procs; - -#ifdef JSON_SUPPORT -E struct sf_procs json_sfo_procs; -E struct sf_procs json_sfi_procs; -#endif - -#undef E -#endif /* SFPROCS_H */ diff --git a/include/sfproto.h b/include/sfproto.h deleted file mode 100644 index bb30ac4f2..000000000 --- a/include/sfproto.h +++ /dev/null @@ -1,201 +0,0 @@ -/* NetHack 3.7 sfproto.h */ -/* Copyright (c) NetHack Development Team 2019. */ -/* NetHack may be freely redistributed. See license for details. */ - -/* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE! */ - -#ifndef SFPROTO_H -#define SFPROTO_H - -#include "hack.h" -#include "integer.h" -#include "wintype.h" - -#define E extern - -E int NDECL(critical_members_count); -/* sfbase.c output functions */ -E void FDECL(sfo_addinfo, (NHFILE *, const char *, const char *, const char *, int)); -E void FDECL(sfo_aligntyp, (NHFILE *, aligntyp *, const char *, const char *, int)); -E void FDECL(sfo_any, (NHFILE *, anything *, const char *, const char *, int)); -E void FDECL(sfo_bitfield, (NHFILE *, uint8_t *, const char *, const char *, int)); -E void FDECL(sfo_boolean, (NHFILE *, boolean *, const char *, const char *, int)); -E void FDECL(sfo_char, (NHFILE *, const char *, const char *, const char *, int)); -E void FDECL(sfo_genericptr, (NHFILE *, genericptr_t *, const char *, const char *, int)); -E void FDECL(sfo_int, (NHFILE *, int *, const char *, const char *, int)); -E void FDECL(sfo_long, (NHFILE *, long *, const char *, const char *, int)); -E void FDECL(sfo_schar, (NHFILE *, schar *, const char *, const char *, int)); -E void FDECL(sfo_short, (NHFILE *, short *, const char *, const char *, int)); -E void FDECL(sfo_size_t, (NHFILE *, size_t *, const char *, const char *, int)); -E void FDECL(sfo_time_t, (NHFILE *, time_t *, const char *, const char *, int)); -E void FDECL(sfo_uchar, (NHFILE *, uchar *, const char *, const char *, int)); -E void FDECL(sfo_unsigned, (NHFILE *, unsigned *, const char *, const char *, int)); -E void FDECL(sfo_uchar, (NHFILE *, unsigned char *, const char *, const char *, int)); -E void FDECL(sfo_uint, (NHFILE *, unsigned int *, const char *, const char *, int)); -E void FDECL(sfo_ulong, (NHFILE *, unsigned long *, const char *, const char *, int)); -E void FDECL(sfo_ushort, (NHFILE *, unsigned short *, const char *, const char *, int)); -E void FDECL(sfo_xchar, (NHFILE *, xchar *, const char *, const char *, int)); -E void FDECL(sfo_str, (NHFILE *, const char *, const char *, const char *, int)); -/* sfbase.c input functions */ -E void FDECL(sfi_addinfo, (NHFILE *, const char *, const char *, const char *, int)); -E void FDECL(sfi_aligntyp, (NHFILE *, aligntyp *, const char *, const char *, int)); -E void FDECL(sfi_any, (NHFILE *, anything *, const char *, const char *, int)); -E void FDECL(sfi_bitfield, (NHFILE *, uint8_t *, const char *, const char *, int)); -E void FDECL(sfi_boolean, (NHFILE *, boolean *, const char *, const char *, int)); -E void FDECL(sfi_char, (NHFILE *, const char *, const char *, const char *, int)); -E void FDECL(sfi_genericptr, (NHFILE *, genericptr_t *, const char *, const char *, int)); -E void FDECL(sfi_int, (NHFILE *, int *, const char *, const char *, int)); -E void FDECL(sfi_long, (NHFILE *, long *, const char *, const char *, int)); -E void FDECL(sfi_schar, (NHFILE *, schar *, const char *, const char *, int)); -E void FDECL(sfi_short, (NHFILE *, short *, const char *, const char *, int)); -E void FDECL(sfi_size_t, (NHFILE *, size_t *, const char *, const char *, int)); -E void FDECL(sfi_time_t, (NHFILE *, time_t *, const char *, const char *, int)); -E void FDECL(sfi_uchar, (NHFILE *, uchar *, const char *, const char *, int)); -E void FDECL(sfi_unsigned, (NHFILE *, unsigned *, const char *, const char *, int)); -E void FDECL(sfi_uchar, (NHFILE *, unsigned char *, const char *, const char *, int)); -E void FDECL(sfi_uint, (NHFILE *, unsigned int *, const char *, const char *, int)); -E void FDECL(sfi_ulong, (NHFILE *, unsigned long *, const char *, const char *, int)); -E void FDECL(sfi_ushort, (NHFILE *, unsigned short *, const char *, const char *, int)); -E void FDECL(sfi_xchar, (NHFILE *, xchar *, const char *, const char *, int)); -E void FDECL(sfi_str, (NHFILE *, const char *, const char *, const char *, int)); -/* generated output functions */ -E void FDECL(sfo_align, (NHFILE *, struct align *, const char *, const char *, int)); -E void FDECL(sfo_attribs, (NHFILE *, struct attribs *, const char *, const char *, int)); -E void FDECL(sfo_bill_x, (NHFILE *, struct bill_x *, const char *, const char *, int)); -E void FDECL(sfo_book_info, (NHFILE *, struct book_info *, const char *, const char *, int)); -E void FDECL(sfo_branch, (NHFILE *, struct branch *, const char *, const char *, int)); -E void FDECL(sfo_bubble, (NHFILE *, struct bubble *, const char *, const char *, int)); -E void FDECL(sfo_cemetery, (NHFILE *, struct cemetery *, const char *, const char *, int)); -E void FDECL(sfo_context_info, (NHFILE *, struct context_info *, const char *, const char *, int)); -E void FDECL(sfo_d_flags, (NHFILE *, struct d_flags *, const char *, const char *, int)); -E void FDECL(sfo_d_level, (NHFILE *, struct d_level *, const char *, const char *, int)); -E void FDECL(sfo_damage, (NHFILE *, struct damage *, const char *, const char *, int)); -E void FDECL(sfo_dest_area, (NHFILE *, struct dest_area *, const char *, const char *, int)); -E void FDECL(sfo_dgn_topology, (NHFILE *, struct dgn_topology *, const char *, const char *, int)); -E void FDECL(sfo_dig_info, (NHFILE *, struct dig_info *, const char *, const char *, int)); -E void FDECL(sfo_dungeon, (NHFILE *, struct dungeon *, const char *, const char *, int)); -E void FDECL(sfo_edog, (NHFILE *, struct edog *, const char *, const char *, int)); -E void FDECL(sfo_egd, (NHFILE *, struct egd *, const char *, const char *, int)); -E void FDECL(sfo_emin, (NHFILE *, struct emin *, const char *, const char *, int)); -E void FDECL(sfo_engr, (NHFILE *, struct engr *, const char *, const char *, int)); -E void FDECL(sfo_epri, (NHFILE *, struct epri *, const char *, const char *, int)); -E void FDECL(sfo_eshk, (NHFILE *, struct eshk *, const char *, const char *, int)); -E void FDECL(sfo_fakecorridor, (NHFILE *, struct fakecorridor *, const char *, const char *, int)); -E void FDECL(sfo_fe, (NHFILE *, struct fe *, const char *, const char *, int)); -E void FDECL(sfo_flag, (NHFILE *, struct flag *, const char *, const char *, int)); -E void FDECL(sfo_fruit, (NHFILE *, struct fruit *, const char *, const char *, int)); -E void FDECL(sfo_kinfo, (NHFILE *, struct kinfo *, const char *, const char *, int)); -E void FDECL(sfo_levelflags, (NHFILE *, struct levelflags *, const char *, const char *, int)); -E void FDECL(sfo_linfo, (NHFILE *, struct linfo *, const char *, const char *, int)); -E void FDECL(sfo_ls_t, (NHFILE *, struct ls_t *, const char *, const char *, int)); -E void FDECL(sfo_mapseen_feat, (NHFILE *, struct mapseen_feat *, const char *, const char *, int)); -E void FDECL(sfo_mapseen_flags, (NHFILE *, struct mapseen_flags *, const char *, const char *, int)); -E void FDECL(sfo_mapseen_rooms, (NHFILE *, struct mapseen_rooms *, const char *, const char *, int)); -E void FDECL(sfo_mapseen, (NHFILE *, struct mapseen *, const char *, const char *, int)); -E void FDECL(sfo_mextra, (NHFILE *, struct mextra *, const char *, const char *, int)); -E void FDECL(sfo_mkroom, (NHFILE *, struct mkroom *, const char *, const char *, int)); -E void FDECL(sfo_monst, (NHFILE *, struct monst *, const char *, const char *, int)); -E void FDECL(sfo_mvitals, (NHFILE *, struct mvitals *, const char *, const char *, int)); -E void FDECL(sfo_nhcoord, (NHFILE *, struct nhcoord *, const char *, const char *, int)); -E void FDECL(sfo_nhrect, (NHFILE *, struct nhrect *, const char *, const char *, int)); -E void FDECL(sfo_novel_tracking, (NHFILE *, struct novel_tracking *, const char *, const char *, int)); -E void FDECL(sfo_obj, (NHFILE *, struct obj *, const char *, const char *, int)); -E void FDECL(sfo_objclass, (NHFILE *, struct objclass *, const char *, const char *, int)); -E void FDECL(sfo_obj_split, (NHFILE *, struct obj_split *, const char *, const char *, int)); -E void FDECL(sfo_oextra, (NHFILE *, struct oextra *, const char *, const char *, int)); -E void FDECL(sfo_polearm_info, (NHFILE *, struct polearm_info *, const char *, const char *, int)); -E void FDECL(sfo_prop, (NHFILE *, struct prop *, const char *, const char *, int)); -E void FDECL(sfo_q_score, (NHFILE *, struct q_score *, const char *, const char *, int)); -E void FDECL(sfo_rm, (NHFILE *, struct rm *, const char *, const char *, int)); -E void FDECL(sfo_s_level, (NHFILE *, struct s_level *, const char *, const char *, int)); -E void FDECL(sfo_savefile_info, (NHFILE *, struct savefile_info *, const char *, const char *, int)); -E void FDECL(sfo_skills, (NHFILE *, struct skills *, const char *, const char *, int)); -E void FDECL(sfo_spell, (NHFILE *, struct spell *, const char *, const char *, int)); -E void FDECL(sfo_stairway, (NHFILE *, struct stairway *, const char *, const char *, int)); -E void FDECL(sfo_takeoff_info, (NHFILE *, struct takeoff_info *, const char *, const char *, int)); -E void FDECL(sfo_tin_info, (NHFILE *, struct tin_info *, const char *, const char *, int)); -E void FDECL(sfo_trap, (NHFILE *, struct trap *, const char *, const char *, int)); -E void FDECL(sfo_tribute_info, (NHFILE *, struct tribute_info *, const char *, const char *, int)); -E void FDECL(sfo_u_achieve, (NHFILE *, struct u_achieve *, const char *, const char *, int)); -E void FDECL(sfo_u_conduct, (NHFILE *, struct u_conduct *, const char *, const char *, int)); -E void FDECL(sfo_u_event, (NHFILE *, struct u_event *, const char *, const char *, int)); -E void FDECL(sfo_u_have, (NHFILE *, struct u_have *, const char *, const char *, int)); -E void FDECL(sfo_u_realtime, (NHFILE *, struct u_realtime *, const char *, const char *, int)); -E void FDECL(sfo_u_roleplay, (NHFILE *, struct u_roleplay *, const char *, const char *, int)); -E void FDECL(sfo_version_info, (NHFILE *, struct version_info *, const char *, const char *, int)); -E void FDECL(sfo_victual_info, (NHFILE *, struct victual_info *, const char *, const char *, int)); -E void FDECL(sfo_vlaunchinfo, (NHFILE *, union vlaunchinfo *, const char *, const char *, int)); -E void FDECL(sfo_vptrs, (NHFILE *, union vptrs *, const char *, const char *, int)); -E void FDECL(sfo_warntype_info, (NHFILE *, struct warntype_info *, const char *, const char *, int)); -E void FDECL(sfo_you, (NHFILE *, struct you *, const char *, const char *, int)); -/* generated input functions */ -E void FDECL(sfi_align, (NHFILE *, struct align *, const char *, const char *, int)); -E void FDECL(sfi_attribs, (NHFILE *, struct attribs *, const char *, const char *, int)); -E void FDECL(sfi_bill_x, (NHFILE *, struct bill_x *, const char *, const char *, int)); -E void FDECL(sfi_book_info, (NHFILE *, struct book_info *, const char *, const char *, int)); -E void FDECL(sfi_branch, (NHFILE *, struct branch *, const char *, const char *, int)); -E void FDECL(sfi_bubble, (NHFILE *, struct bubble *, const char *, const char *, int)); -E void FDECL(sfi_cemetery, (NHFILE *, struct cemetery *, const char *, const char *, int)); -E void FDECL(sfi_context_info, (NHFILE *, struct context_info *, const char *, const char *, int)); -E void FDECL(sfi_d_flags, (NHFILE *, struct d_flags *, const char *, const char *, int)); -E void FDECL(sfi_d_level, (NHFILE *, struct d_level *, const char *, const char *, int)); -E void FDECL(sfi_damage, (NHFILE *, struct damage *, const char *, const char *, int)); -E void FDECL(sfi_dest_area, (NHFILE *, struct dest_area *, const char *, const char *, int)); -E void FDECL(sfi_dgn_topology, (NHFILE *, struct dgn_topology *, const char *, const char *, int)); -E void FDECL(sfi_dig_info, (NHFILE *, struct dig_info *, const char *, const char *, int)); -E void FDECL(sfi_dungeon, (NHFILE *, struct dungeon *, const char *, const char *, int)); -E void FDECL(sfi_edog, (NHFILE *, struct edog *, const char *, const char *, int)); -E void FDECL(sfi_egd, (NHFILE *, struct egd *, const char *, const char *, int)); -E void FDECL(sfi_emin, (NHFILE *, struct emin *, const char *, const char *, int)); -E void FDECL(sfi_engr, (NHFILE *, struct engr *, const char *, const char *, int)); -E void FDECL(sfi_epri, (NHFILE *, struct epri *, const char *, const char *, int)); -E void FDECL(sfi_eshk, (NHFILE *, struct eshk *, const char *, const char *, int)); -E void FDECL(sfi_fakecorridor, (NHFILE *, struct fakecorridor *, const char *, const char *, int)); -E void FDECL(sfi_fe, (NHFILE *, struct fe *, const char *, const char *, int)); -E void FDECL(sfi_flag, (NHFILE *, struct flag *, const char *, const char *, int)); -E void FDECL(sfi_fruit, (NHFILE *, struct fruit *, const char *, const char *, int)); -E void FDECL(sfi_kinfo, (NHFILE *, struct kinfo *, const char *, const char *, int)); -E void FDECL(sfi_levelflags, (NHFILE *, struct levelflags *, const char *, const char *, int)); -E void FDECL(sfi_linfo, (NHFILE *, struct linfo *, const char *, const char *, int)); -E void FDECL(sfi_ls_t, (NHFILE *, struct ls_t *, const char *, const char *, int)); -E void FDECL(sfi_mapseen_feat, (NHFILE *, struct mapseen_feat *, const char *, const char *, int)); -E void FDECL(sfi_mapseen_flags, (NHFILE *, struct mapseen_flags *, const char *, const char *, int)); -E void FDECL(sfi_mapseen_rooms, (NHFILE *, struct mapseen_rooms *, const char *, const char *, int)); -E void FDECL(sfi_mapseen, (NHFILE *, struct mapseen *, const char *, const char *, int)); -E void FDECL(sfi_mextra, (NHFILE *, struct mextra *, const char *, const char *, int)); -E void FDECL(sfi_mkroom, (NHFILE *, struct mkroom *, const char *, const char *, int)); -E void FDECL(sfi_monst, (NHFILE *, struct monst *, const char *, const char *, int)); -E void FDECL(sfi_mvitals, (NHFILE *, struct mvitals *, const char *, const char *, int)); -E void FDECL(sfi_nhcoord, (NHFILE *, struct nhcoord *, const char *, const char *, int)); -E void FDECL(sfi_nhrect, (NHFILE *, struct nhrect *, const char *, const char *, int)); -E void FDECL(sfi_novel_tracking, (NHFILE *, struct novel_tracking *, const char *, const char *, int)); -E void FDECL(sfi_obj, (NHFILE *, struct obj *, const char *, const char *, int)); -E void FDECL(sfi_objclass, (NHFILE *, struct objclass *, const char *, const char *, int)); -E void FDECL(sfi_obj_split, (NHFILE *, struct obj_split *, const char *, const char *, int)); -E void FDECL(sfi_oextra, (NHFILE *, struct oextra *, const char *, const char *, int)); -E void FDECL(sfi_polearm_info, (NHFILE *, struct polearm_info *, const char *, const char *, int)); -E void FDECL(sfi_prop, (NHFILE *, struct prop *, const char *, const char *, int)); -E void FDECL(sfi_q_score, (NHFILE *, struct q_score *, const char *, const char *, int)); -E void FDECL(sfi_rm, (NHFILE *, struct rm *, const char *, const char *, int)); -E void FDECL(sfi_s_level, (NHFILE *, struct s_level *, const char *, const char *, int)); -E void FDECL(sfi_savefile_info, (NHFILE *, struct savefile_info *, const char *, const char *, int)); -E void FDECL(sfi_skills, (NHFILE *, struct skills *, const char *, const char *, int)); -E void FDECL(sfi_spell, (NHFILE *, struct spell *, const char *, const char *, int)); -E void FDECL(sfi_stairway, (NHFILE *, struct stairway *, const char *, const char *, int)); -E void FDECL(sfi_takeoff_info, (NHFILE *, struct takeoff_info *, const char *, const char *, int)); -E void FDECL(sfi_tin_info, (NHFILE *, struct tin_info *, const char *, const char *, int)); -E void FDECL(sfi_trap, (NHFILE *, struct trap *, const char *, const char *, int)); -E void FDECL(sfi_tribute_info, (NHFILE *, struct tribute_info *, const char *, const char *, int)); -E void FDECL(sfi_u_achieve, (NHFILE *, struct u_achieve *, const char *, const char *, int)); -E void FDECL(sfi_u_conduct, (NHFILE *, struct u_conduct *, const char *, const char *, int)); -E void FDECL(sfi_u_event, (NHFILE *, struct u_event *, const char *, const char *, int)); -E void FDECL(sfi_u_have, (NHFILE *, struct u_have *, const char *, const char *, int)); -E void FDECL(sfi_u_realtime, (NHFILE *, struct u_realtime *, const char *, const char *, int)); -E void FDECL(sfi_u_roleplay, (NHFILE *, struct u_roleplay *, const char *, const char *, int)); -E void FDECL(sfi_version_info, (NHFILE *, struct version_info *, const char *, const char *, int)); -E void FDECL(sfi_victual_info, (NHFILE *, struct victual_info *, const char *, const char *, int)); -E void FDECL(sfi_vlaunchinfo, (NHFILE *, union vlaunchinfo *, const char *, const char *, int)); -E void FDECL(sfi_vptrs, (NHFILE *, union vptrs *, const char *, const char *, int)); -E void FDECL(sfi_warntype_info, (NHFILE *, struct warntype_info *, const char *, const char *, int)); -E void FDECL(sfi_you, (NHFILE *, struct you *, const char *, const char *, int)); -#endif /* SFPROTO_H */ diff --git a/src/artifact.c b/src/artifact.c index f6ab3065f..e25fedb24 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -6,8 +6,6 @@ #include "hack.h" #include "artifact.h" #include "artilist.h" -#include "sfproto.h" - /* * Note: both artilist[] and artiexist[] have a dummy element #0, @@ -85,15 +83,6 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t) g.artiexist, sizeof g.artiexist); bwrite(nhfp->fd, (genericptr_t) g.artidisco, sizeof g.artidisco); } - if (nhfp->fieldlevel) { - int i; - - for (i = 0; i < (1 + NROFARTIFACTS + 1); ++i) - sfo_boolean(nhfp, &g.artiexist[i], "artifacts", "g.artiexist", 1); - - for (i = 0; i < NROFARTIFACTS; ++i) - sfo_xchar(nhfp, &g.artidisco[i], "artifacts", "g.artidisco", 1); - } } void @@ -104,15 +93,6 @@ NHFILE *nhfp; mread(nhfp->fd, (genericptr_t) g.artiexist, sizeof g.artiexist); mread(nhfp->fd, (genericptr_t) g.artidisco, sizeof g.artidisco); } - if (nhfp->fieldlevel) { - int i; - - for (i = 0; i < (1 + NROFARTIFACTS + 1); ++i) - sfi_boolean(nhfp, &g.artiexist[i], "artifacts", "g.artiexist", 1); - - for (i = 0; i < NROFARTIFACTS; ++i) - sfi_xchar(nhfp, &g.artidisco[i], "artifacts", "g.artidisco", 1); - } hack_artifacts(); /* redo non-saved special cases */ } diff --git a/src/bones.c b/src/bones.c index f1ec5a8a3..a9822df61 100644 --- a/src/bones.c +++ b/src/bones.c @@ -5,7 +5,6 @@ #include "hack.h" #include "lev.h" -#include "sfproto.h" #ifdef MFLOPPY @@ -555,10 +554,6 @@ struct obj *corpse; bwrite(nhfp->fd, (genericptr_t) &c, sizeof c); bwrite(nhfp->fd, (genericptr_t) bonesid, (unsigned) c); /* DD.nnn */ } - if (nhfp->fieldlevel) { - sfo_char(nhfp, &c, "bones", "bones_count", 1); - sfo_char(nhfp, bonesid, "bones", "bonesid", (int) c); - } savefruitchn(nhfp); if (nhfp->structlevel) bflush(nhfp->fd); @@ -582,11 +577,6 @@ struct obj *corpse; bwrite(nhfp->fd, (genericptr_t) bonesid, (unsigned) c); /* DD.nnn */ savefruitchn(nhfp); } - if (nhfp->fieldlevel) { - sfo_char(nhfp, &c, "bones", "bones_count", 1); - sfo_char(nhfp, bonesid, "bones", "bonesid", (int) c); /* DD.nnn */ - savefruitchn(nhfp); - } update_mlstmv(); /* update monsters for eventual restoration */ savelev(nhfp, ledger_no(&u.uz)); close_nhfile(nhfp); @@ -640,11 +630,6 @@ getbones() mread(nhfp->fd, (genericptr_t) &c, sizeof c); /* length incl. '\0' */ mread(nhfp->fd, (genericptr_t) oldbonesid, (unsigned) c); /* DD.nnn */ } - if (nhfp->fieldlevel) { - sfi_char(nhfp, &c, "bones", "bones_count", 1); /* length incl. '\0' */ - for (i = 0; i < (int) c; ++i) - sfi_char(nhfp, &oldbonesid[i], "bones", "bonesid", 1); - } if (strcmp(bonesid, oldbonesid) != 0 /* from 3.3.0 through 3.6.0, bones in the quest branch stored a bogus bonesid in the file; 3.6.1 fixed that, but for diff --git a/src/dungeon.c b/src/dungeon.c index 93486b6b4..58d52227a 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -7,8 +7,6 @@ #include "dgn_file.h" #include "dlb.h" #include "lev.h" -#include "sfproto.h" - #define DUNGEON_FILE "dungeon.lua" @@ -149,26 +147,14 @@ boolean perform_write, free_data; bwrite(nhfp->fd, (genericptr_t) &g.dungeon_topology, sizeof g.dungeon_topology); bwrite(nhfp->fd, (genericptr_t) g.tune, sizeof tune); } - if (nhfp->fieldlevel) { - sfo_int(nhfp, &g.n_dgns, "dungeon", "dungeon_count", 1); - for (i = 0; i < g.n_dgns; ++i) - sfo_dungeon(nhfp, &g.dungeons[i], "dungeon", "dungeon", 1); - sfo_dgn_topology(nhfp, &g.dungeon_topology, "dungeon", "g.dungeon_topology", 1); - for (i = 0; i < (int) sizeof tune; ++i) - sfo_char(nhfp, &g.tune[i], "dungeon", "tune", 1); - } for (count = 0, curr = g.branches; curr; curr = curr->next) count++; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &count, sizeof(count)); - if (nhfp->fieldlevel) - sfo_int(nhfp, &count, "dungeon", "branch_count", 1); for (curr = g.branches; curr; curr = curr->next) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) curr, sizeof(branch)); - if (nhfp->fieldlevel) - sfo_branch(nhfp, curr, "dungeon", "branch", 1); } count = maxledgerno(); if (nhfp->structlevel) { @@ -177,20 +163,12 @@ boolean perform_write, free_data; (unsigned) count * sizeof(struct linfo)); bwrite(nhfp->fd, (genericptr_t) &g.inv_pos, sizeof g.inv_pos); } - if (nhfp->fieldlevel) { - sfo_int(nhfp, &count, "dungeon", "level_info_count", 1); - for (i = 0; i < count; ++i) - sfo_linfo(nhfp, &g.level_info[i], "dungeon", "g.level_info", 1); - sfo_nhcoord(nhfp, &g.inv_pos, "dungeon", "g.inv_pos", 1); - } for (count = 0, curr_ms = g.mapseenchn; curr_ms; curr_ms = curr_ms->next) count++; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &count, sizeof(count)); - if (nhfp->fieldlevel) - sfo_int(nhfp, &count, "dungeon", "mapseen_count", 1); for (curr_ms = g.mapseenchn; curr_ms; curr_ms = curr_ms->next) { save_mapseen(nhfp, curr_ms); @@ -230,27 +208,15 @@ NHFILE *nhfp; mread(nhfp->fd, (genericptr_t) &g.dungeon_topology, sizeof g.dungeon_topology); mread(nhfp->fd, (genericptr_t) g.tune, sizeof tune); } - if (nhfp->fieldlevel) { - sfi_int(nhfp, &g.n_dgns, "dungeon", "dungeon_count", 1); - for (i = 0; i < g.n_dgns; ++i) - sfi_dungeon(nhfp, &g.dungeons[i], "dungeon", "dungeon", 1); - sfi_dgn_topology(nhfp, &g.dungeon_topology, "dungeon", "g.dungeon_topology", 1); - for (i = 0; i < (int) sizeof tune; ++i) - sfi_char(nhfp, &g.tune[i], "dungeon", "tune", 1); - } last = g.branches = (branch *) 0; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &count, sizeof(count)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &count, "dungeon", "branch_count", 1); for (i = 0; i < count; i++) { curr = (branch *) alloc(sizeof(branch)); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) curr, sizeof(branch)); - if (nhfp->fieldlevel) - sfi_branch(nhfp, curr, "dungeon", "branch", 1); curr->next = (branch *) 0; if (last) last->next = curr; @@ -261,8 +227,6 @@ NHFILE *nhfp; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &count, sizeof(count)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &count, "dungeon", "level_info_count", 1); if (count >= MAXLINFO) panic("level information count larger (%d) than allocated size", @@ -270,18 +234,11 @@ NHFILE *nhfp; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) g.level_info, (unsigned) count * sizeof(struct linfo)); - if (nhfp->fieldlevel) - for (i = 0; i < count; ++i) - sfi_linfo(nhfp, &g.level_info[i], "dungeon", "g.level_info", 1); if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) &g.inv_pos, sizeof g.inv_pos); mread(nhfp->fd, (genericptr_t) &count, sizeof(count)); } - if (nhfp->fieldlevel) { - sfi_nhcoord(nhfp, &g.inv_pos, "dungeon", "inv_pos", 1); - sfi_int(nhfp, &count, "dungeon", "mapseen_count", 1); - } last_ms = (mapseen *) 0; for (i = 0; i < count; i++) { @@ -2446,8 +2403,6 @@ mapseen *mptr; break; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &brindx, sizeof brindx); - if (nhfp->fieldlevel) - sfo_int(nhfp, &brindx, "mapseen", "branch_index", 1); if (nhfp->structlevel) { bwrite(nhfp->fd, (genericptr_t) &mptr->lev, sizeof mptr->lev); @@ -2455,29 +2410,15 @@ mapseen *mptr; bwrite(nhfp->fd, (genericptr_t) &mptr->flags, sizeof mptr->flags); bwrite(nhfp->fd, (genericptr_t) &mptr->custom_lth, sizeof mptr->custom_lth); } - if (nhfp->fieldlevel) { - sfo_d_level(nhfp, &mptr->lev, "mapseen", "d_level", 1); - sfo_mapseen_feat(nhfp, &mptr->feat, "mapseen", "feat", 1); - sfo_mapseen_flags(nhfp, &mptr->flags, "mapseen", "flags", 1); - sfo_unsigned(nhfp, &mptr->custom_lth, "mapseen", "custom_lth", 1); - } if (mptr->custom_lth) { if (nhfp->structlevel) { bwrite(nhfp->fd, (genericptr_t) mptr->custom, mptr->custom_lth); } - if (nhfp->fieldlevel) { - for (i = 0; i < (int) mptr->custom_lth; ++i) - sfo_char(nhfp, &mptr->custom[i], "mapseen", "custom", 1); - } } if (nhfp->structlevel) { bwrite(nhfp->fd, (genericptr_t) &mptr->msrooms, sizeof mptr->msrooms); } - if (nhfp->fieldlevel) { - for (i = 0; i < ((MAXNROFROOMS + 1) * 2); ++i) - sfo_mapseen_rooms(nhfp, &mptr->msrooms[i], "mapseen", "msrooms", 1); - } savecemetery(nhfp, &mptr->final_resting_place); } @@ -2493,8 +2434,6 @@ NHFILE *nhfp; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &branchnum, sizeof branchnum); - if (nhfp->fieldlevel) - sfi_int(nhfp, &branchnum, "mapseen", "branch_index", 1); for (brindx = 0, curr = g.branches; curr; curr = curr->next, ++brindx) if (brindx == branchnum) break; @@ -2506,12 +2445,6 @@ NHFILE *nhfp; mread(nhfp->fd, (genericptr_t) &load->flags, sizeof load->flags); mread(nhfp->fd, (genericptr_t) &load->custom_lth, sizeof load->custom_lth); } - if (nhfp->fieldlevel) { - sfi_d_level(nhfp, &load->lev, "mapseen", "d_level", 1); - sfi_mapseen_feat(nhfp, &load->feat, "mapseen", "feat", 1); - sfi_mapseen_flags(nhfp, &load->flags, "mapseen", "flags", 1); - sfi_unsigned(nhfp, &load->custom_lth, "mapseen", "custom_lth", 1); - } if (load->custom_lth) { /* length doesn't include terminator (which isn't saved & restored) */ @@ -2519,20 +2452,12 @@ NHFILE *nhfp; if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) load->custom, load->custom_lth); } - if (nhfp->fieldlevel) { - for (i = 0; i < (int) load->custom_lth; ++i) - sfi_char(nhfp, &load->custom[i], "mapseen", "custom", 1); - } load->custom[load->custom_lth] = '\0'; } else load->custom = 0; if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) &load->msrooms, sizeof load->msrooms); } - if (nhfp->fieldlevel) { - for (i = 0; i < ((MAXNROFROOMS + 1) * 2); ++i) - sfi_mapseen_rooms(nhfp, &load->msrooms[i], "mapseen", "msrooms", 1); - } restcemetery(nhfp, &load->final_resting_place); return load; } diff --git a/src/end.c b/src/end.c index 381063da4..bc8cc7ead 100644 --- a/src/end.c +++ b/src/end.c @@ -15,7 +15,6 @@ #include #endif #include "dlb.h" -#include "sfproto.h" /* add b to long a, convert wraparound to max value */ @@ -2153,8 +2152,6 @@ NHFILE *nhfp; for (kptr = &g.killer; kptr != (struct kinfo *) 0; kptr = kptr->next) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t)kptr, sizeof(struct kinfo)); - if (nhfp->fieldlevel) - sfo_kinfo(nhfp, kptr, "killers", "kinfo", 1); } } if (release_data(nhfp)) { @@ -2175,8 +2172,6 @@ NHFILE *nhfp; for (kptr = &g.killer; kptr != (struct kinfo *) 0; kptr = kptr->next) { if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t)kptr, sizeof(struct kinfo)); - if (nhfp->fieldlevel) - sfi_kinfo(nhfp, kptr, "killers", "kinfo", 1); if (kptr->next) { kptr->next = (struct kinfo *) alloc(sizeof (struct kinfo)); } diff --git a/src/engrave.c b/src/engrave.c index ca8a1bc1b..35dcb5896 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -5,8 +5,6 @@ #include "hack.h" #include "lev.h" -#include "sfproto.h" - static NEARDATA struct engr *head_engr; static const char *NDECL(blengr); @@ -1194,11 +1192,6 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t)&(ep->engr_lth), sizeof(ep->engr_lth)); bwrite(nhfp->fd, (genericptr_t)ep, sizeof(struct engr) + ep->engr_lth); } - if (nhfp->fieldlevel) { - sfo_unsigned(nhfp, &(ep->engr_lth), "engravings", "engr_lth", 1); - sfo_engr(nhfp, ep, "engravings", "engr", 1); - sfo_str(nhfp, ep->engr_txt, "engravings", "engr_txt", ep->engr_lth); - } } if (release_data(nhfp)) dealloc_engr(ep); @@ -1206,8 +1199,6 @@ NHFILE *nhfp; if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t)&no_more_engr, sizeof no_more_engr); - if (nhfp->fieldlevel) - sfo_unsigned(nhfp, &no_more_engr, "engravings", "engr_lth", 1); } if (release_data(nhfp)) head_engr = 0; @@ -1224,8 +1215,6 @@ NHFILE *nhfp; while (1) { if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) <h, sizeof(unsigned)); - if (nhfp->fieldlevel) - sfi_unsigned(nhfp, <h, "engravings", "engr_lth", 1); if (lth == 0) return; @@ -1233,11 +1222,6 @@ NHFILE *nhfp; if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) ep, sizeof(struct engr) + lth); } - if (nhfp->fieldlevel) { - sfi_engr(nhfp, ep, "engravings", "engr", 1); - ep->engr_txt = (char *) (ep + 1); - sfi_str(nhfp, ep->engr_txt, "engravings", "engr_txt", lth); - } ep->nxt_engr = head_engr; head_engr = ep; ep->engr_txt = (char *) (ep + 1); /* Andreas Bormann */ diff --git a/src/files.c b/src/files.c index eb8f09756..b24719361 100644 --- a/src/files.c +++ b/src/files.c @@ -8,8 +8,6 @@ #include "hack.h" #include "dlb.h" #include -#include "sfproto.h" -#include "sfprocs.h" #include "lev.h" #ifdef TTY_GRAPHICS @@ -451,18 +449,6 @@ NHFILE *nhfp; if (nhfp) { if (nhfp->structlevel && nhfp->fd != -1) (void) nhclose(nhfp->fd), nhfp->fd = -1; - if (nhfp->fieldlevel) { - if (nhfp->fpdef) { - (void) fclose(nhfp->fpdef); - nhfp->fpdef = (FILE *) 0; - } - } - if (nhfp->fplog) - (void) fprintf(nhfp->fplog, "# closing\n"); - if (nhfp->fplog) - (void) fclose(nhfp->fplog); - if (nhfp->fpdebug) - (void) fclose(nhfp->fpdebug); zero_nhfile(nhfp); free_nhfile(nhfp); } @@ -479,13 +465,6 @@ NHFILE *nhfp; (void) lseek(nhfp->fd, (off_t) 0, 0); #endif } - if (nhfp->fieldlevel) { - if (nhfp->fpdef) { - rewind(nhfp->fpdef); - nhfp->count = 0L; - nhfp->eof = FALSE; - } - } } static @@ -497,25 +476,10 @@ NHFILE *nhfp; the pointer to the nethack file descriptor */ if (nhfp) { /* check for no open file at all, - * not a structlevel legacy file, - * nor a fieldlevel file. + * not a structlevel legacy file */ - if (((nhfp->fd == -1) && !nhfp->fpdef) - || (nhfp->structlevel && nhfp->fd < 0) - || (nhfp->fieldlevel && !nhfp->fpdef)) { + if (nhfp->structlevel && nhfp->fd < 0) { /* not viable, start the cleanup */ - if (nhfp->fieldlevel) { - if (nhfp->fpdef) { - (void) fclose(nhfp->fpdef); - nhfp->fpdef = (FILE *) 0; - } - if (nhfp->fplog) { - (void) fprintf(nhfp->fplog, "# closing, not viable\n"); - (void) fclose(nhfp->fplog); - } - if (nhfp->fpdebug) - (void) fclose(nhfp->fpdebug); - } zero_nhfile(nhfp); free_nhfile(nhfp); nhfp = (NHFILE *) 0; @@ -847,26 +811,6 @@ char errbuf[]; nhfp->fieldlevel = FALSE; nhfp->ftype = NHF_BONESFILE; nhfp->mode = WRITING; -#ifdef SYSCF - if (sysopt.bonesformat[0] > historical && - sysopt.bonesformat[0] <= ascii) { - nhfp->structlevel = FALSE; - nhfp->fieldlevel = TRUE; - nhfp->addinfo = TRUE; - nhfp->style.deflt = TRUE; - nhfp->style.binary = (sysopt.bonesformat[0] != ascii); - nhfp->fnidx = sysopt.bonesformat[0]; - nhfp->fd = -1; - nhfp->fpdef = fopen(file, nhfp->style.binary ? WRBMODE : WRTMODE); - if (nhfp->fpdef) { -#ifdef SAVEFILE_DEBUGGING - nhfp->fpdebug = fopen("create_bonesfile-debug.log", "a"); -#endif - } else { - failed = errno; - } - } -#endif /* SYSCF */ if (nhfp->structlevel) { #if defined(MICRO) || defined(WIN32) /* Use O_TRUNC to force the file to be shortened if it already @@ -962,26 +906,6 @@ char **bonesid; nhfp->fieldlevel = FALSE; nhfp->ftype = NHF_BONESFILE; nhfp->mode = READING; -#ifdef SYSCF - if (sysopt.bonesformat[0] > historical && - sysopt.bonesformat[0] <= ascii) { - nhfp->structlevel = FALSE; - nhfp->fieldlevel = TRUE; - nhfp->addinfo = TRUE; - nhfp->style.deflt = TRUE; - nhfp->style.binary = (sysopt.bonesformat[0] != ascii); - nhfp->fnidx = sysopt.bonesformat[0]; - nhfp->fd = -1; - nhfp->fpdef = fopen(fq_bones, nhfp->style.binary ? RDBMODE : RDTMODE); - if (nhfp->fpdef) { -#ifdef SAVEFILE_DEBUGGING - nhfp->fpdebug = fopen("open_bonesfile-debug.log", "a"); -#endif - } else { - failed = errno; - } - } -#endif /* SYSCF */ if (nhfp->structlevel) { #ifdef MAC nhfp->fd = macopen(fq_bones, O_RDONLY | O_BINARY, BONE_TYPE); @@ -1152,8 +1076,6 @@ NHFILE *nhfp; { if (nhfp->structlevel) (void) write(nhfp->fd, (genericptr_t) g.SAVEF, sizeof(g.SAVEF)); - if (nhfp->fieldlevel) - sfo_str(nhfp, g.SAVEF, "savefile_name", "g.savef", sizeof(g.SAVEF)); } #endif @@ -1212,23 +1134,6 @@ create_savefile() nhfp->fd = -1; nhfp->fpdef = (FILE *) 0; } - if (!do_historical) { - nhfp->structlevel = FALSE; - nhfp->fieldlevel = TRUE; - nhfp->addinfo = TRUE; - nhfp->style.deflt = TRUE; - nhfp->style.binary = (sysopt.saveformat[0] != ascii); - nhfp->fnidx = sysopt.saveformat[0]; - nhfp->fd = -1; - nhfp->fpdef = fopen(fq_save, nhfp->style.binary ? WRBMODE : WRTMODE); - if (nhfp->fpdef) { -#ifdef SAVEFILE_DEBUGGING - nhfp->fpdebug = fopen("create_savefile-debug.log", "a"); -#endif - } else { - failed = errno; - } - } if (nhfp->structlevel) { #if defined(MICRO) || defined(WIN32) nhfp->fd = open(fq_save, O_WRONLY | O_BINARY | O_CREAT | O_TRUNC, FCMASK); @@ -1274,11 +1179,6 @@ open_savefile() nhfp->fieldlevel = FALSE; nhfp->ftype = NHF_SAVEFILE; nhfp->mode = READING; -#ifdef SYSCF - if (sysopt.saveformat[0] > historical && - sysopt.saveformat[0] <= ascii) - do_historical = FALSE; -#endif /* SYSCF */ if (g.program_state.in_self_recover) { do_historical = TRUE; /* force it */ nhfp->structlevel = TRUE; @@ -1290,23 +1190,6 @@ open_savefile() nhfp->fd = -1; nhfp->fpdef = (FILE *) 0; } - if (!do_historical) { - nhfp->structlevel = FALSE; - nhfp->fieldlevel = TRUE; - nhfp->addinfo = TRUE; - nhfp->style.deflt = TRUE; - nhfp->style.binary = (sysopt.saveformat[0] < ascii); - nhfp->fnidx = sysopt.saveformat[0]; - nhfp->fd = -1; - nhfp->fpdef = fopen(fq_save, nhfp->style.binary ? RDBMODE : RDTMODE); - if (nhfp->fpdef) { -#ifdef SAVEFILE_DEBUGGING - nhfp->fpdebug = fopen("open_savefile-debug.log", "a"); -#endif - } else { - failed = errno; - } - } if (nhfp->structlevel) { #ifdef MAC nhfp->fd = macopen(fq_save, O_RDONLY | O_BINARY, SAVE_TYPE); @@ -1345,10 +1228,6 @@ restore_saved_game() nh_uncompress(fq_save); if ((nhfp = open_savefile()) != 0) { - if (nhfp && nhfp->fieldlevel && nhfp->fplog) - (void) fprintf(nhfp->fplog, "# just opened\n"); - if (nhfp->fieldlevel && nhfp->addinfo) - sfi_addinfo(nhfp, "NetHack", "start", "savefile", 0); if (validate(nhfp, fq_save) != 0) { close_nhfile(nhfp); nhfp = (NHFILE *)0; @@ -4051,15 +3930,6 @@ recover_savefile() */ /* - * Things are different now. We could be in a situation - * where the default save file format is not structlevel. - * self-recover is currently written to use copy_bytes() - * to move content from the level files into the savefile. - * Until the code is updated to use something other than - * copy_bytes, what we need to do is force the recovery - * save to be structlevel, finish creating it, then read - * it back in. The save after that can be fieldlevel again. - * * Set a flag for the savefile routines to know the * circumstances and act accordingly: * g.program_state.in_self_recover @@ -4088,29 +3958,11 @@ recover_savefile() */ /*store_formatindicator(snhfp); */ store_version(snhfp); -#if 0 - if (snhfp->structlevel) { - if (write(snhfp->fd, (genericptr_t) &version_data, sizeof version_data) - != sizeof version_data) - savewrite_failure = "version_info"; - } - if (snhfp->fieldlevel) { - sfo_version_info(snhfp, (struct version_info *) &version_data, - "version", "version_info", 1); - savewrite_failure = (const char *) 0; - } - if (savewrite_failure) - goto cleanup; -#endif if (snhfp->structlevel) { if (write(snhfp->fd, (genericptr_t) &sfi, sizeof sfi) != sizeof sfi) savewrite_failure = "savefileinfo"; } - if (snhfp->fieldlevel) { - sfo_savefile_info(snhfp, &sfsaveinfo, "savefileinfo", "savefile_info", 1); - savewrite_failure = (const char *) 0; - } if (savewrite_failure) goto cleanup; @@ -4119,10 +3971,6 @@ recover_savefile() != sizeof pltmpsiz) savewrite_failure = "player name size"; } - if (snhfp->fieldlevel) { - sfo_int(snhfp, &pltmpsiz, "plname", "plname_size", 1); - savewrite_failure = (const char *) 0; - } if (savewrite_failure) goto cleanup; @@ -4130,18 +3978,9 @@ recover_savefile() if (write(snhfp->fd, (genericptr_t) &tmpplbuf, pltmpsiz) != pltmpsiz) savewrite_failure = "player name"; } - if (snhfp->fieldlevel) { - sfo_str(snhfp, tmpplbuf, "plname", "tmpplbuf", pltmpsiz); - savewrite_failure = (const char *) 0; - } if (savewrite_failure) goto cleanup; - /* - * copy_bytes isn't good enough anymore. - * We could be reading from a structlevel file but - * writing into a fieldlevel save file. Yikes! - */ if (!copy_bytes(lnhfp->fd, snhfp->fd)) { close_nhfile(gnhfp); close_nhfile(snhfp); diff --git a/src/light.c b/src/light.c index 4a7551c05..f1341a78d 100644 --- a/src/light.c +++ b/src/light.c @@ -4,8 +4,6 @@ #include "hack.h" #include "lev.h" /* for checking save modes */ -#include "sfproto.h" - /* * Mobile light sources. @@ -326,9 +324,6 @@ int range; if (nhfp->structlevel) { bwrite(nhfp->fd, (genericptr_t) &count, sizeof count); } - if (nhfp->fieldlevel) { - sfo_int(nhfp, &count, "lightsources", "lightsource_count", 1); - } actual = maybe_write_ls(nhfp, range, TRUE); if (actual != count) panic("counted %d light sources, wrote %d! [range=%d]", count, @@ -379,15 +374,11 @@ NHFILE *nhfp; /* restore elements */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &count, sizeof count); - if (nhfp->fieldlevel) - sfi_int(nhfp, &count, "lightsources", "lightsource_count", 1); while (count-- > 0) { ls = (light_source *) alloc(sizeof(light_source)); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) ls, sizeof(light_source)); - if (nhfp->fieldlevel) - sfi_ls_t(nhfp, ls, "lightsources", "lightsource", 1); ls->next = g.light_base; g.light_base = ls; } @@ -529,8 +520,6 @@ light_source *ls; if (ls->flags & LSF_NEEDS_FIXUP) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) ls, sizeof(light_source)); - if (nhfp->fieldlevel) - sfo_ls_t(nhfp, ls, "lightsources", "lightsource", 1); } else { /* replace object pointer with id for write, then put back */ arg_save = ls->id; @@ -552,8 +541,6 @@ light_source *ls; ls->flags |= LSF_NEEDS_FIXUP; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) ls, sizeof(light_source)); - if (nhfp->fieldlevel) - sfo_ls_t(nhfp, ls, "lightsources", "lightsource", 1); ls->id = arg_save; ls->flags &= ~LSF_NEEDS_FIXUP; } diff --git a/src/mkmaze.c b/src/mkmaze.c index e32bb245f..275836466 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -6,8 +6,6 @@ #include "hack.h" #include "sp_lev.h" #include "lev.h" /* save & restore info */ -#include "sfproto.h" - static int FDECL(iswall, (int, int)); static int FDECL(iswall_or_stone, (int, int)); @@ -1579,18 +1577,9 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t) &g.xmax, sizeof(int)); bwrite(nhfp->fd, (genericptr_t) &g.ymax, sizeof(int)); } - if (nhfp->fieldlevel) { - sfo_int(nhfp, &n, "waterlevel", "bubble_count", 1); - sfo_int(nhfp, &g.xmin, "waterlevel", "g.xmin", 1); - sfo_int(nhfp, &g.ymin, "waterlevel", "g.ymin", 1); - sfo_int(nhfp, &g.xmax, "waterlevel", "g.xmax", 1); - sfo_int(nhfp, &g.ymax, "waterlevel", "g.ymax", 1); - } for (b = g.bbubbles; b; b = b->next) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) b, sizeof(struct bubble)); - if (nhfp->fieldlevel) - sfo_bubble(nhfp, b, "waterlevel", "bubble", 1); } } if (release_data(nhfp)) @@ -1623,20 +1612,11 @@ NHFILE *nhfp; mread(nhfp->fd,(genericptr_t)&g.xmax,sizeof(int)); mread(nhfp->fd,(genericptr_t)&g.ymax,sizeof(int)); } - if (nhfp->fieldlevel) { - sfi_int(nhfp, &n, "waterlevel", "bubble_count", 1); - sfi_int(nhfp, &g.xmin, "waterlevel", "g.xmin", 1); - sfi_int(nhfp, &g.ymin, "waterlevel", "g.ymin", 1); - sfi_int(nhfp, &g.xmax, "waterlevel", "g.xmax", 1); - sfi_int(nhfp, &g.ymax, "waterlevel", "g.ymax", 1); - } for (i = 0; i < n; i++) { btmp = b; b = (struct bubble *) alloc(sizeof(struct bubble)); if (nhfp->structlevel) mread(nhfp->fd,(genericptr_t) b, sizeof(struct bubble)); - if (nhfp->fieldlevel) - sfi_bubble(nhfp, b, "waterlevel", "bubble", 1); if (g.bbubbles) { btmp->next = b; b->prev = btmp; diff --git a/src/mkroom.c b/src/mkroom.c index de87a14e2..0a3319289 100644 --- a/src/mkroom.c +++ b/src/mkroom.c @@ -16,8 +16,6 @@ */ #include "hack.h" -#include "sfproto.h" - static boolean FDECL(isbig, (struct mkroom *)); static struct mkroom *FDECL(pick_room, (BOOLEAN_P)); @@ -811,8 +809,6 @@ struct mkroom *r; */ if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) r, sizeof (struct mkroom)); - if (nhfp->fieldlevel) - sfo_mkroom(nhfp, r, "room", "mkroom", 1); for (i = 0; i < r->nsubrooms; i++) { save_room(nhfp, r->sbrooms[i]); } @@ -830,8 +826,6 @@ NHFILE *nhfp; /* First, write the number of rooms */ if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &g.nroom, sizeof(g.nroom)); - if (nhfp->fieldlevel) - sfo_int(nhfp, &g.nroom, "room", "g.nroom", 1); for (i = 0; i < g.nroom; i++) save_room(nhfp, &g.rooms[i]); } @@ -845,8 +839,6 @@ struct mkroom *r; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) r, sizeof(struct mkroom)); - if (nhfp->fieldlevel) - sfi_mkroom(nhfp, r, "room", "mkroom", 1); for (i = 0; i < r->nsubrooms; i++) { r->sbrooms[i] = &g.subrooms[g.nsubroom]; @@ -867,8 +859,6 @@ NHFILE *nhfp; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &g.nroom, sizeof(g.nroom)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &g.nroom, "room", "g.nroom", 1); g.nsubroom = 0; for (i = 0; i < g.nroom; i++) { diff --git a/src/o_init.c b/src/o_init.c index 85b39daf9..cc63fd7cc 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -5,8 +5,6 @@ #include "hack.h" #include "lev.h" /* save & restore info */ -#include "sfproto.h" - static void FDECL(setgemprobs, (d_level *)); static void FDECL(shuffle, (int, int, BOOLEAN_P)); @@ -301,14 +299,6 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t)objects, sizeof(struct objclass) * NUM_OBJECTS); } - if (nhfp->fieldlevel) { - for (i = 0; i < MAXOCLASSES; ++i) - sfo_int(nhfp, &g.bases[i], "names", "g.bases", 1); - for (i = 0; i < NUM_OBJECTS; ++i) - sfo_short(nhfp, &g.disco[i], "names", "g.disco", 1); - for (i = 0; i < NUM_OBJECTS; ++i) - sfo_objclass(nhfp, &objects[i], "names", "objclass", 1); - } } /* as long as we use only one version of Hack we need not save oc_name and oc_descr, but we must save @@ -321,11 +311,6 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t)&len, sizeof len); bwrite(nhfp->fd, (genericptr_t)objects[i].oc_uname, len); } - if (nhfp->fieldlevel) { - sfo_unsigned(nhfp, &len, "names", "len", 1); - for (j = 0; (unsigned) j < len; ++j) - sfo_char(nhfp, &objects[i].oc_uname[j], "names", "oc_uname", 1); - } } if (release_data(nhfp)) { free((genericptr_t) objects[i].oc_uname); @@ -347,31 +332,15 @@ NHFILE *nhfp; mread(nhfp->fd, (genericptr_t) objects, sizeof(struct objclass) * NUM_OBJECTS); } - if (nhfp->fieldlevel) { - for (i = 0; i < MAXOCLASSES; ++i) - sfi_int(nhfp, &g.bases[i], "names", "g.bases", 1); - for (i = 0; i < NUM_OBJECTS; ++i) - sfi_short(nhfp, &g.disco[i], "names", "g.disco", 1); - for (i = 0; i < NUM_OBJECTS; ++i) - sfi_objclass(nhfp, &objects[i], "names", "objclass", 1); - } for (i = 0; i < NUM_OBJECTS; i++) { if (objects[i].oc_uname) { if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) &len, sizeof len); } - if (nhfp->fieldlevel) { - sfi_unsigned(nhfp, &len, "names", "len", 1); - } objects[i].oc_uname = (char *) alloc(len); if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t)objects[i].oc_uname, len); } - if (nhfp->fieldlevel) { - for (j = 0; (unsigned) j < len; ++j) - sfi_char(nhfp, &objects[i].oc_uname[j], - "names", "oc_uname", 1); - } } } #ifdef USE_TILES diff --git a/src/options.c b/src/options.c index 5cfbc84fd..7281a2aef 100644 --- a/src/options.c +++ b/src/options.c @@ -18,7 +18,6 @@ NEARDATA struct instance_flags iflags; /* provide linkage */ #include "tcap.h" #include #endif -#include "sfprocs.h" #define BACKWARD_COMPAT @@ -698,8 +697,6 @@ initoptions_init() if (boolopt[i].addr) *(boolopt[i].addr) = boolopt[i].initvalue; } - /* initialize the function pointers for fieldlevel saves */ - sf_init(); #ifdef SYSFLAGS Strcpy(sysflags.sysflagsid, "sysflags"); diff --git a/src/region.c b/src/region.c index 548486d82..0432b5d13 100644 --- a/src/region.c +++ b/src/region.c @@ -4,8 +4,6 @@ #include "hack.h" #include "lev.h" -#include "sfproto.h" - /* * This should really go into the level structure, but @@ -641,64 +639,40 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t) &g.moves, sizeof (g.moves)); /* timestamp */ bwrite(nhfp->fd, (genericptr_t) &g.n_regions, sizeof (g.n_regions)); } - if (nhfp->fieldlevel) { - sfo_long(nhfp, &g.moves, "regions", "tmstamp", 1); - sfo_int(nhfp, &g.n_regions, "regions", "region_count", 1); - } for (i = 0; i < g.n_regions; i++) { if (nhfp->structlevel) { bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->bounding_box, sizeof (NhRect)); bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->nrects, sizeof (short)); } - if (nhfp->fieldlevel) { - sfo_nhrect(nhfp, &g.regions[i]->bounding_box, "g.regions", "bounding_box", 1); - sfo_short(nhfp, &g.regions[i]->nrects, "g.regions", "nrects", 1); - } for (j = 0; j < g.regions[i]->nrects; j++) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->rects[j], sizeof (NhRect)); - if (nhfp->fieldlevel) - sfo_nhrect(nhfp, &g.regions[i]->rects[j], "g.regions", "rect", 1); } if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->attach_2_u, sizeof (boolean)); - if (nhfp->fieldlevel) - sfo_boolean(nhfp, &g.regions[i]->attach_2_u, "g.regions", "attach_2_u", 1); n = 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->attach_2_m, sizeof (unsigned)); - if (nhfp->fieldlevel) - sfo_unsigned(nhfp, &g.regions[i]->attach_2_m, "g.regions", "attach_2_m", 1); n = g.regions[i]->enter_msg != (const char *)0 ? strlen(g.regions[i]->enter_msg) : 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &n, sizeof n); - if (nhfp->fieldlevel) - sfo_unsigned(nhfp, &n, "g.regions", "enter_msg_length", 1); if (n > 0) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) g.regions[i]->enter_msg, n); - if (nhfp->fieldlevel) - sfo_char(nhfp, g.regions[i]->enter_msg, "g.regions", "enter_msg", 1); } n = g.regions[i]->leave_msg != (const char *)0 ? strlen(g.regions[i]->leave_msg) : 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &n, sizeof n); - if (nhfp->fieldlevel) - sfo_unsigned(nhfp, &n, "g.regions", "leave_msg_length", 1); if (n > 0) { if (nhfp->structlevel) { bwrite(nhfp->fd, (genericptr_t) g.regions[i]->leave_msg, n); } - if (nhfp->fieldlevel) { - for (j = 0; j < (int) n; ++j) - sfo_char(nhfp, &g.regions[i]->leave_msg[j], "g.regions", "leave_msg", 1); - } } if (nhfp->structlevel) { bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->ttl, sizeof (long)); @@ -711,34 +685,16 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->player_flags, sizeof (unsigned int)); bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->n_monst, sizeof (short)); } - if (nhfp->fieldlevel) { - sfo_long(nhfp, &g.regions[i]->ttl, "g.regions", "ttl", 1); - sfo_short(nhfp, &g.regions[i]->expire_f, "g.regions", "expire_f", 1); - sfo_short(nhfp, &g.regions[i]->can_enter_f, "g.regions", "can_enter_f", 1); - sfo_short(nhfp, &g.regions[i]->enter_f, "g.regions", "enter_f", 1); - sfo_short(nhfp, &g.regions[i]->can_leave_f, "g.regions", "can_leave_f", 1); - sfo_short(nhfp, &g.regions[i]->leave_f, "g.regions", "leave_f", 1); - sfo_short(nhfp, &g.regions[i]->inside_f, "g.regions", "inside_f", 1); - sfo_unsigned(nhfp, &g.regions[i]->player_flags, "g.regions", "player_flags", 1); - sfo_short(nhfp, &g.regions[i]->n_monst, "g.regions", "monster_count", 1); - } for (j = 0; j < g.regions[i]->n_monst; j++) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->monsters[j], sizeof (unsigned)); - if (nhfp->fieldlevel) - sfo_unsigned(nhfp, &g.regions[i]->monsters[j], "g.regions", "monster", 1); } if (nhfp->structlevel) { bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->visible, sizeof (boolean)); bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->glyph, sizeof (int)); bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->arg, sizeof (anything)); } - if (nhfp->fieldlevel) { - sfo_boolean(nhfp, &g.regions[i]->visible, "g.regions", "visible", 1); - sfo_int(nhfp, &g.regions[i]->glyph, "g.regions", "glyph", 1); - sfo_any(nhfp, &g.regions[i]->arg, "g.regions", "arg", 1); - } } skip_lots: @@ -759,8 +715,6 @@ boolean ghostly; /* If a bones file restore */ clear_regions(); /* Just for security */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &tmstamp, sizeof (tmstamp)); - if (nhfp->fieldlevel) - sfi_long(nhfp, &tmstamp, "regions", "tmstamp", 1); if (ghostly) tmstamp = 0; else @@ -768,8 +722,6 @@ boolean ghostly; /* If a bones file restore */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &g.n_regions, sizeof (g.n_regions)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &g.n_regions, "regions", "region_count", 1); g.max_regions = g.n_regions; if (g.n_regions > 0) @@ -780,41 +732,25 @@ boolean ghostly; /* If a bones file restore */ mread(nhfp->fd, (genericptr_t) &g.regions[i]->bounding_box, sizeof (NhRect)); mread(nhfp->fd, (genericptr_t) &g.regions[i]->nrects, sizeof (short)); } - if (nhfp->fieldlevel) { - sfi_nhrect(nhfp, &g.regions[i]->bounding_box, "g.regions", "bounding box", 1); - sfi_short(nhfp, &g.regions[i]->nrects, "g.regions", "nrects", 1); - } if (g.regions[i]->nrects > 0) g.regions[i]->rects = (NhRect *) alloc(sizeof (NhRect) * g.regions[i]->nrects); for (j = 0; j < g.regions[i]->nrects; j++) { if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &g.regions[i]->rects[j], sizeof (NhRect)); - if (nhfp->fieldlevel) - sfi_nhrect(nhfp, &g.regions[i]->rects[j], "g.regions", "rect", 1); } if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) &g.regions[i]->attach_2_u, sizeof (boolean)); mread(nhfp->fd, (genericptr_t) &g.regions[i]->attach_2_m, sizeof (unsigned)); } - if (nhfp->fieldlevel) { - sfi_boolean(nhfp, &g.regions[i]->attach_2_u, "g.regions", "attach_2_u", 1); - sfi_unsigned(nhfp, &g.regions[i]->attach_2_m, "g.regions", "attach_2_m", 1); - } if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &n, sizeof n); - if (nhfp->fieldlevel) - sfi_unsigned(nhfp, &n, "g.regions", "enter_msg_length", 1); if (n > 0) { msg_buf = (char *) alloc(n + 1); if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) msg_buf, n); } - if (nhfp->fieldlevel) { - for (j = 0; (unsigned) j < n; ++j) - sfi_char(nhfp, &msg_buf[j], "g.regions", "enter_msg", 1); - } msg_buf[n] = '\0'; g.regions[i]->enter_msg = (const char *) msg_buf; } else @@ -822,17 +758,11 @@ boolean ghostly; /* If a bones file restore */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &n, sizeof n); - if (nhfp->fieldlevel) - sfi_unsigned(nhfp, &n, "g.regions", "leave_msg_length", 1); - if (n > 0) { + if (n > 0) { msg_buf = (char *) alloc(n + 1); if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) msg_buf, n); } - if (nhfp->fieldlevel) { - for (j = 0; (unsigned) j < n; ++j) - sfi_char(nhfp, &msg_buf[j], "g.regions", "leave_msg", 1); - } msg_buf[n] = '\0'; g.regions[i]->leave_msg = (const char *) msg_buf; } else @@ -840,8 +770,6 @@ boolean ghostly; /* If a bones file restore */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &g.regions[i]->ttl, sizeof (long)); - if (nhfp->fieldlevel) - sfi_long(nhfp, &g.regions[i]->ttl, "g.regions", "ttl", 1); /* check for expired region */ if (g.regions[i]->ttl >= 0L) g.regions[i]->ttl = @@ -862,23 +790,12 @@ boolean ghostly; /* If a bones file restore */ mread(nhfp->fd, (genericptr_t) &g.regions[i]->player_flags, sizeof (unsigned int)); } - if (nhfp->fieldlevel) { - sfi_short(nhfp, &g.regions[i]->expire_f, "g.regions", "expire_f", 1); - sfi_short(nhfp, &g.regions[i]->can_enter_f, "g.regions", "can_enter_f", 1); - sfi_short(nhfp, &g.regions[i]->enter_f, "g.regions", "enter_f", 1); - sfi_short(nhfp, &g.regions[i]->can_leave_f, "g.regions", "can_leave_f", 1); - sfi_short(nhfp, &g.regions[i]->leave_f, "g.regions", "leave_f", 1); - sfi_short(nhfp, &g.regions[i]->inside_f, "g.regions", "inside_f", 1); - sfi_unsigned(nhfp, &g.regions[i]->player_flags, "g.regions", "player_flags", 1); - } if (ghostly) { /* settings pertained to old player */ clear_hero_inside(g.regions[i]); clear_heros_fault(g.regions[i]); } if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &g.regions[i]->n_monst, sizeof (short)); - if (nhfp->fieldlevel) - sfi_short(nhfp, &g.regions[i]->n_monst, "g.regions", "monster_count", 1); if (g.regions[i]->n_monst > 0) g.regions[i]->monsters = (unsigned *) alloc(sizeof (unsigned) * g.regions[i]->n_monst); @@ -889,19 +806,12 @@ boolean ghostly; /* If a bones file restore */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &g.regions[i]->monsters[j], sizeof (unsigned)); - if (nhfp->fieldlevel) - sfi_unsigned(nhfp, &g.regions[i]->monsters[j], "g.regions", "monster", 1); } if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) &g.regions[i]->visible, sizeof (boolean)); mread(nhfp->fd, (genericptr_t) &g.regions[i]->glyph, sizeof (int)); mread(nhfp->fd, (genericptr_t) &g.regions[i]->arg, sizeof (anything)); } - if (nhfp->fieldlevel) { - sfi_boolean(nhfp, &g.regions[i]->visible, "g.regions", "visible", 1); - sfi_int(nhfp, &g.regions[i]->glyph, "g.regions", "glyph", 1); - sfi_any(nhfp, &g.regions[i]->arg, "g.regions", "arg", 1); - } } /* remove expired regions, do not trigger the expire_f callback (yet!); also update monster lists if this data is coming from a bones file */ diff --git a/src/restore.c b/src/restore.c index 1cab78c8c..84eef5ee1 100644 --- a/src/restore.c +++ b/src/restore.c @@ -6,9 +6,6 @@ #include "hack.h" #include "lev.h" #include "tcap.h" /* for TERMLIB and ASCIIGRAPH */ -#include "sfproto.h" - - #if defined(MICRO) extern int dotcnt; /* shared with save */ @@ -128,15 +125,11 @@ NHFILE *nhfp; g.sp_levchn = (s_level *) 0; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &cnt, sizeof(int)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &cnt, "levchn", "lev_count", 1); for (; cnt > 0; cnt--) { tmplev = (s_level *) alloc(sizeof(s_level)); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) tmplev, sizeof(s_level)); - if (nhfp->fieldlevel) - sfi_s_level(nhfp, tmplev, "levchn", "s_level", 1); if (!g.sp_levchn) g.sp_levchn = tmplev; @@ -160,8 +153,6 @@ boolean ghostly; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &dmgcount, sizeof(dmgcount)); - if (nhfp->fieldlevel) - sfi_unsigned(nhfp, &dmgcount, "damage", "damage_count", 1); counter = (int) dmgcount; if (!counter) @@ -172,8 +163,6 @@ boolean ghostly; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) tmp_dam, sizeof(*tmp_dam)); - if (nhfp->fieldlevel) - sfi_damage(nhfp, tmp_dam, "damage", "damage", 1); if (ghostly) tmp_dam->when += (g.monstermoves - g.omoves); @@ -212,8 +201,6 @@ struct obj *otmp; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) otmp, sizeof(struct obj)); - if (nhfp->fieldlevel) - sfi_obj(nhfp, otmp, "obj", "obj", 1); /* next object pointers are invalid; otmp->cobj needs to be left as is--being non-null is key to restoring container contents */ @@ -225,22 +212,16 @@ struct obj *otmp; /* oname - object's name */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof(buflen)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "obj", "oname_length", 1); if (buflen > 0) { /* includes terminating '\0' */ new_oname(otmp, buflen); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) ONAME(otmp), buflen); - if (nhfp->fieldlevel) - sfi_str(nhfp, ONAME(otmp), "obj", "oname", buflen); } /* omonst - corpse or statue might retain full monster details */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof(buflen)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "obj", "omonst_length", 1); if (buflen > 0) { newomonst(otmp); /* this is actually a monst struct, so we @@ -251,42 +232,30 @@ struct obj *otmp; /* omid - monster id number, connecting corpse to ghost */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof(buflen)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "obj", "omid_length", 1); if (buflen > 0) { newomid(otmp); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) OMID(otmp), buflen); - if (nhfp->fieldlevel) - sfi_unsigned(nhfp, OMID(otmp), "obj", "omid", 1); } /* olong - temporary gold */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof(buflen)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "obj", "olong_length", 1); if (buflen > 0) { newolong(otmp); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) OLONG(otmp), buflen); - if (nhfp->fieldlevel) - sfi_long(nhfp, OLONG(otmp), "obj", "olong", 1); } /* omailcmd - feedback mechanism for scroll of mail */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof(buflen)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "obj", "omailcmd_length", 1); if (buflen > 0) { char *omailcmd = (char *) alloc(buflen); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) omailcmd, buflen); - if (nhfp->fieldlevel) - sfi_str(nhfp, omailcmd, "obj", "omailcmd", buflen); new_omailcmd(otmp, omailcmd); free((genericptr_t) omailcmd); } @@ -305,8 +274,6 @@ boolean ghostly, frozen; while (1) { if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof buflen); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "obj", "obj_length", 1); if (buflen == -1) break; @@ -393,8 +360,6 @@ struct monst *mtmp; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) mtmp, sizeof(struct monst)); - if (nhfp->fieldlevel) - sfi_monst(nhfp, mtmp, "mon", "monst_length", 1); /* next monster pointer is invalid */ mtmp->nmon = (struct monst *) 0; @@ -405,82 +370,56 @@ struct monst *mtmp; /* mname - monster's name */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof(buflen)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "mon", "mname_length", 1); if (buflen > 0) { /* includes terminating '\0' */ new_mname(mtmp, buflen); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) MNAME(mtmp), buflen); - if (nhfp->fieldlevel) - sfi_str(nhfp, MNAME(mtmp), "mon", "mname", buflen); } /* egd - vault guard */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof(buflen)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "mon", "egd_length", 1); if (buflen > 0) { newegd(mtmp); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) EGD(mtmp), sizeof(struct egd)); - if (nhfp->fieldlevel) - sfi_egd(nhfp, EGD(mtmp), "mon", "egd", 1); } /* epri - temple priest */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof(buflen)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "mon", "epri_length", 1); if (buflen > 0) { newepri(mtmp); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) EPRI(mtmp), sizeof(struct epri)); - if (nhfp->fieldlevel) - sfi_epri(nhfp, EPRI(mtmp), "mon", "epri", 1); } /* eshk - shopkeeper */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof(buflen)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "mon", "eshk_length", 1); if (buflen > 0) { neweshk(mtmp); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) ESHK(mtmp), sizeof(struct eshk)); - if (nhfp->fieldlevel) - sfi_eshk(nhfp, ESHK(mtmp), "mon", "eshk", 1); } /* emin - minion */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof(buflen)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "mon", "emin_length", 1); if (buflen > 0) { newemin(mtmp); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) EMIN(mtmp), sizeof(struct emin)); - if (nhfp->fieldlevel) - sfi_emin(nhfp, EMIN(mtmp), "mon", "emin", 1); } /* edog - pet */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof(buflen)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "mon", "edog_length", 1); if (buflen > 0) { newedog(mtmp); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) EDOG(mtmp), sizeof(struct edog)); - if (nhfp->fieldlevel) - sfi_edog(nhfp, EDOG(mtmp), "mon", "edog", 1); } /* mcorpsenm - obj->corpsenm for mimic posing as corpse or statue (inline int rather than pointer to something) */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &MCORPSENM(mtmp), sizeof MCORPSENM(mtmp)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &MCORPSENM(mtmp), "mon", "mcorpsenm", 1); } /* mextra */ } @@ -496,8 +435,6 @@ boolean ghostly; while (1) { if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &buflen, sizeof(buflen)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &buflen, "mon", "monst_length", 1); if (buflen == -1) break; @@ -572,8 +509,6 @@ NHFILE *nhfp; fnext = newfruit(); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t)fnext, sizeof *fnext); - if (nhfp->fieldlevel) - sfi_fruit(nhfp, fnext, "fruit", "fruit", 1); if (fnext->fid != 0) { fnext->nextf = flist; flist = fnext; @@ -636,13 +571,8 @@ unsigned int *stuckid, *steedid; unsigned long uid = 0; boolean defer_perm_invent; - if (nhfp->fieldlevel && nhfp->addinfo) - sfi_addinfo(nhfp, "gamestate", "start", "", 0); - if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &uid, sizeof uid); - if (nhfp->fieldlevel) - sfi_ulong(nhfp, &uid, "gamestate", "uid", 1); if (SYSOPT_CHECK_SAVE_UID && uid != (unsigned long) getuid()) { /* strange ... */ @@ -656,8 +586,6 @@ unsigned int *stuckid, *steedid; newgamecontext = g.context; /* copy statically init'd context */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &g.context, sizeof (struct context_info)); - if (nhfp->fieldlevel) - sfi_context_info(nhfp, &g.context, "gamestate", "g.context", 1); g.context.warntype.species = (g.context.warntype.speciesidx >= LOW_PM) ? &mons[g.context.warntype.speciesidx] : (struct permonst *) 0; @@ -671,8 +599,6 @@ unsigned int *stuckid, *steedid; newgameflags = flags; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &flags, sizeof (struct flag)); - if (nhfp->fieldlevel) - sfi_flag(nhfp, &flags, "gamestate", "flags", 1); /* avoid keeping permanent inventory window up to date during restore (setworn() calls update_inventory); attempting to include the cost @@ -699,9 +625,6 @@ unsigned int *stuckid, *steedid; newgamesysflags = sysflags; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &sysflags, sizeof(struct sysflag)); - if (nhfp->fieldlevel) - sfi_sysflag(nhfp, &sysflags, "gamestate", "sysflags", 1); - mread(fd, (genericptr_t) &sysflags, sizeof(struct sysflag)); #endif role_init(); /* Reset the initial role, race, gender, and alignment */ @@ -710,25 +633,17 @@ unsigned int *stuckid, *steedid; #endif if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &u, sizeof(struct you)); - if (nhfp->fieldlevel) - sfi_you(nhfp, &u, "gamestate", "you", 1); g.youmonst.cham = u.mcham; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) timebuf, 14); - if (nhfp->fieldlevel) - sfi_str(nhfp, timebuf, "gamestate", "ubirthday", 14); timebuf[14] = '\0'; ubirthday = time_from_yyyymmddhhmmss(timebuf); if (nhfp->structlevel) mread(nhfp->fd, &urealtime.realtime, sizeof urealtime.realtime); - if (nhfp->fieldlevel) - sfi_long(nhfp, &urealtime.realtime, "gamestate", "realtime", 1); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) timebuf, 14); - if (nhfp->fieldlevel) - sfi_str(nhfp, timebuf, "gamestate", "start_timing", 14); timebuf[14] = '\0'; urealtime.start_timing = time_from_yyyymmddhhmmss(timebuf); @@ -767,8 +682,6 @@ unsigned int *stuckid, *steedid; restore_timers(nhfp, RANGE_GLOBAL, FALSE, 0L); restore_light_sources(nhfp); - if (nhfp->fieldlevel && nhfp->addinfo) - sfi_addinfo(nhfp, "objchain", "start", "invent", 0); g.invent = restobjchn(nhfp, FALSE, FALSE); /* restore dangling (not on floor or in inventory) ball and/or chain */ @@ -787,12 +700,6 @@ unsigned int *stuckid, *steedid; if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) g.mvitals, sizeof g.mvitals); } - if (nhfp->fieldlevel) { - int i; - - for (i = 0; i < NUMMONS; ++i) - sfi_mvitals(nhfp, &g.mvitals[i], "gamestate", "g.mvitals", 1); - } /* * There are some things after this that can have unintended display @@ -824,41 +731,20 @@ unsigned int *stuckid, *steedid; mread(nhfp->fd, (genericptr_t) &g.quest_status, sizeof (struct q_score)); mread(nhfp->fd, (genericptr_t) g.spl_book, (MAXSPELL + 1) * sizeof (struct spell)); } - if (nhfp->fieldlevel) { - int i; - struct spell *sptmp; - - sfi_long(nhfp, &g.moves, "gamestate", "g.moves", 1); - sfi_long(nhfp, &g.monstermoves, "gamestate", "g.monstermoves", 1); - sfi_q_score(nhfp, &g.quest_status, "gamestate", "g.quest_status", 1); - sptmp = g.spl_book; - for (i = 0; i < (MAXSPELL + 1); ++i) - sfi_spell(nhfp, sptmp++, "gamestate", "g.spl_book", 1); - } restore_artifacts(nhfp); restore_oracles(nhfp); if (u.ustuck) { if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) stuckid, sizeof *stuckid); - if (nhfp->fieldlevel) - sfi_unsigned(nhfp, stuckid, "gamestate", "ustuck_id", 1); } if (u.usteed) { if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) steedid, sizeof *steedid); - if (nhfp->fieldlevel) - sfi_unsigned(nhfp, steedid, "gamestate", "usteed_id", 1); } if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) g.pl_character, sizeof g.pl_character); mread(nhfp->fd, (genericptr_t) g.pl_fruit, sizeof g.pl_fruit); } - if (nhfp->fieldlevel) { - sfi_char(nhfp, g.pl_character, "gamestate", "g.pl_character", - sizeof g.pl_character); - sfi_char(nhfp, g.pl_fruit, "gamestate", "g.pl_fruit", - sizeof g.pl_fruit); - } freefruitchn(g.ffruit); /* clean up fruit(s) made by initoptions() */ g.ffruit = loadfruitchn(nhfp); @@ -1039,11 +925,6 @@ NHFILE *nhfp; if (restoreinfo.mread_flags == -1) break; } - if (nhfp->fieldlevel) { - sfi_xchar(nhfp, <mp, "gamestate", "level_number", 1); - if (nhfp->eof) - break; - } getlev(nhfp, 0, ltmp, FALSE); #ifdef MICRO curs(WIN_MAP, 1 + dotcnt++, dotrow); @@ -1061,9 +942,6 @@ NHFILE *nhfp; return rtmp; /* dorecover called recursively */ } restoreinfo.mread_flags = 0; - if (nhfp->fieldlevel && nhfp->addinfo) - sfi_addinfo(nhfp, "NetHack", "end", "savefile", 0); - rewind_nhfile(nhfp); /* return to beginning of file */ (void) validate(nhfp, (char *) 0); get_plname_from_file(nhfp, g.plname); @@ -1130,16 +1008,12 @@ struct cemetery **cemeteryaddr; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &cflag, sizeof cflag); - if (nhfp->fieldlevel) - sfi_int(nhfp, &cflag, "cemetery", "cemetery_flag", 1); if (cflag == 0) { bonesaddr = cemeteryaddr; do { bonesinfo = (struct cemetery *) alloc(sizeof *bonesinfo); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) bonesinfo, sizeof *bonesinfo); - if (nhfp->fieldlevel) - sfi_cemetery(nhfp, bonesinfo, "bones", "bonesinfo", 1); *bonesaddr = bonesinfo; bonesaddr = &(*bonesaddr)->next; } while (*bonesaddr); @@ -1175,10 +1049,6 @@ boolean rlecomp; mread(nhfp->fd, (genericptr_t) &len, sizeof(uchar)); mread(nhfp->fd, (genericptr_t) &r, sizeof(struct rm)); } - if (nhfp->fieldlevel) { - sfi_uchar(nhfp, &len, "room", "levl", 1); - sfi_rm(nhfp, &r, "room", "rm", 1); - } } } j = 0; @@ -1192,13 +1062,6 @@ boolean rlecomp; if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) levl, sizeof levl); } - if (nhfp->fieldlevel) { - int c, r; - - for (c = 0; c < COLNO; ++c) - for (r = 0; r < ROWNO; ++r) - sfi_rm(nhfp, &levl[c][r], "room", "levl", 1); - } } void @@ -1246,21 +1109,15 @@ boolean ghostly; /* First some sanity checks */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &hpid, sizeof(hpid)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &hpid, "gamestate", "g.hackpid", 1); /* CHECK: This may prevent restoration */ #ifdef TOS if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &tlev, sizeof(tlev)); - if (nhfp->fieldlevel) - sfi_short(nhfp, &tlev, "gamestate", "tlev", 1); dlvl = tlev & 0x00ff; #else if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &dlvl, sizeof(dlvl)); - if (nhfp->fieldlevel) - sfi_xchar(nhfp, &dlvl, "gamestate", "dlvl", 1); #endif if ((pid && pid != hpid) || (lev && dlvl != lev)) { char trickbuf[BUFSZ]; @@ -1281,16 +1138,6 @@ boolean ghostly; mread(nhfp->fd, (genericptr_t) g.lastseentyp, sizeof(g.lastseentyp)); mread(nhfp->fd, (genericptr_t) &g.omoves, sizeof(g.omoves)); } - if (nhfp->fieldlevel) { - int c, r; - - for (c = 0; c < COLNO; ++c) - for (r = 0; r < ROWNO; ++r) - sfi_schar(nhfp, &g.lastseentyp[c][r], - "lev", "g.lastseentyp", 1); - - sfi_long(nhfp, &g.omoves, "lev", "timestmp", 1); - } elapsed = g.monstermoves - g.omoves; if (nhfp->structlevel) { @@ -1304,20 +1151,6 @@ boolean ghostly; mread(nhfp->fd, (genericptr_t)&g.level.flags, sizeof(g.level.flags)); mread(nhfp->fd, (genericptr_t)g.doors, sizeof(g.doors)); } - if (nhfp->fieldlevel) { - int i; - - sfi_stairway(nhfp, &g.upstair, "lev", "g.upstair", 1); - sfi_stairway(nhfp, &g.dnstair, "lev", "g.dnstair", 1); - sfi_stairway(nhfp, &g.upladder, "lev", "g.upladder", 1); - sfi_stairway(nhfp, &g.dnladder, "lev", "g.dnladder", 1); - sfi_stairway(nhfp, &g.sstairs, "lev", "g.sstairs", 1); - sfi_dest_area(nhfp, &g.updest, "lev", "g.updest", 1); - sfi_dest_area(nhfp, &g.dndest, "lev", "g.dndest", 1); - sfi_levelflags(nhfp, &g.level.flags, "lev", "g.level.flags", 1); - for (i = 0; i < DOORMAX; ++i) - sfi_nhcoord(nhfp, &g.doors[i], "lev", "g.doors", 1); - } rest_rooms(nhfp); /* No joke :-) */ if (g.nroom) g.doorindex = g.rooms[g.nroom - 1].fdoor + g.rooms[g.nroom - 1].doorct; @@ -1336,8 +1169,6 @@ boolean ghostly; trap = newtrap(); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t)trap, sizeof(struct trap)); - if (nhfp->fieldlevel) - sfi_trap(nhfp, trap, "trap", "trap", 1); if (trap->tx != 0) { trap->ntrap = g.ftrap; g.ftrap = trap; @@ -1461,10 +1292,6 @@ char *plbuf; (void) read(nhfp->fd, (genericptr_t) &pltmpsiz, sizeof(pltmpsiz)); (void) read(nhfp->fd, (genericptr_t) plbuf, pltmpsiz); } - if (nhfp->fieldlevel) { - sfi_int(nhfp, &pltmpsiz, "plname", "plname_size", 1); - sfi_str(nhfp, plbuf, "plname", "g.plname", pltmpsiz); - } return; } @@ -1478,16 +1305,12 @@ NHFILE *nhfp; while (1) { if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &msgsize, sizeof(msgsize)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &msgsize, "msghistory", "msghistory_length", 1); if (msgsize == -1) break; if (msgsize > (BUFSZ - 1)) panic("restore_msghistory: msg too big (%d)", msgsize); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) msg, msgsize); - if (nhfp->fieldlevel) - sfi_str(nhfp, msg, "msghistory", "msg", msgsize); msg[msgsize] = '\0'; putmsghistory(msg, TRUE); ++msgcount; @@ -1671,21 +1494,14 @@ const char *name; if (nhfp->structlevel) utdflags |= UTD_CHECKSIZES; - if (nhfp->fieldlevel) - utdflags |= UTD_CHECKFIELDCOUNTS | - UTD_SKIP_SANITY1 | UTD_SKIP_SAVEFILEINFO; if (!(reslt = uptodate(nhfp, name, utdflags))) return 1; if ((nhfp->mode & WRITING) == 0) { if (nhfp->structlevel) rlen = read(nhfp->fd, (genericptr_t) &sfi, sizeof sfi); - if (nhfp->fieldlevel) - sfi_savefile_info(nhfp, &sfi, "savefileinfo", "savefile_info", 1); } else { if (nhfp->structlevel) rlen = read(nhfp->fd, (genericptr_t) &sfi, sizeof sfi); - if (nhfp->fieldlevel) - sfi_savefile_info(nhfp, &sfi, "savefileinfo", "savefile_info", 1); minit(); /* ZEROCOMP */ if (rlen == 0) { if (verbose) { diff --git a/src/rumors.c b/src/rumors.c index b5be74ff4..4b4e7236f 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -6,8 +6,6 @@ #include "hack.h" #include "lev.h" #include "dlb.h" -#include "sfproto.h" - /* [note: this comment is fairly old, but still accurate for 3.1] * Rumors have been entirely rewritten to speed up the access. This is @@ -393,16 +391,10 @@ NHFILE *nhfp; if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &g.oracle_cnt, sizeof g.oracle_cnt); - if (nhfp->fieldlevel) - sfo_unsigned(nhfp, &g.oracle_cnt, "oracles", "g.oracle_cnt", 1); if (g.oracle_cnt) { if (nhfp->structlevel) { bwrite(nhfp->fd, (genericptr_t)g.oracle_loc, g.oracle_cnt * sizeof (long)); } - if (nhfp->fieldlevel) { - for (i = 0; (unsigned) i < g.oracle_cnt; ++i) - sfo_ulong(nhfp, &g.oracle_loc[i], "oracles", "oracle loc", 1); - } } } if (release_data(nhfp)) { @@ -420,18 +412,12 @@ NHFILE *nhfp; int i; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &g.oracle_cnt, sizeof g.oracle_cnt); - if (nhfp->fieldlevel) - sfi_unsigned(nhfp, &g.oracle_cnt, "oracles", "g.oracle_cnt", 1); if (g.oracle_cnt) { g.oracle_loc = (unsigned long *) alloc(g.oracle_cnt * sizeof(long)); if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) g.oracle_loc, g.oracle_cnt * sizeof (long)); } - if (nhfp->fieldlevel) { - for (i = 0; (unsigned) i < g.oracle_cnt; ++i) - sfi_ulong(nhfp, &g.oracle_loc[i], "oracles", "g.oracle_loc", 1); - } g.oracle_flg = 1; /* no need to call init_oracles() */ } } diff --git a/src/save.c b/src/save.c index 6f6c8c1fc..3cb7e1a8d 100644 --- a/src/save.c +++ b/src/save.c @@ -5,8 +5,6 @@ #include "hack.h" #include "lev.h" -#include "sfproto.h" - #ifndef NO_SIGNAL #include @@ -149,10 +147,6 @@ dosave0() (void) delete_savefile(); /* ab@unido */ return 0; } -#ifdef SAVEFILE_DEBUGGING - if (nhfp && nhfp->fieldlevel && nhfp->fplog) - (void) fprintf(nhfp->fplog, "# just opened\n"); -#endif vision_recalc(2); /* shut down vision to prevent problems in the event of an impossible() call */ @@ -202,9 +196,6 @@ dosave0() } #endif /* MFLOPPY */ - if (nhfp->fieldlevel && nhfp->addinfo && (nhfp->mode & WRITING)) - sfo_addinfo(nhfp, "NetHack", "start", "savefile", 0); - nhfp->mode = WRITING | FREEING; store_version(nhfp); store_savefileinfo(nhfp); @@ -259,8 +250,6 @@ dosave0() close_nhfile(onhfp); if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) <mp, sizeof ltmp); /* level number*/ - if (nhfp->fieldlevel) - sfo_xchar(nhfp, <mp, "gamestate", "level_number", 1); /* xchar */ savelev(nhfp, ltmp); /* actual level*/ delete_levelfile(ltmp); } @@ -294,14 +283,6 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t) &flags, sizeof flags); #ifdef SYSFLAGS bwrite(nhfp->fd, (genericptr_t) &sysflags, sysflags); -#endif - } - if (nhfp->fieldlevel) { - sfo_ulong(nhfp, &uid, "gamestate", "uid", 1); - sfo_context_info(nhfp, &g.context, "gamestate", "g.context", 1); - sfo_flag(nhfp, &flags, "gamestate" , "flags", 1); -#ifdef SYSFLAGS - sfo_flag(nhfp, &sysflags, "gamestate" , "sysflags", 1); #endif } urealtime.finish_time = getnow(); @@ -318,12 +299,6 @@ NHFILE *nhfp; sizeof urealtime.realtime); bwrite(nhfp->fd, yyyymmddhhmmss(urealtime.start_timing), 14); } - if (nhfp->fieldlevel) { - sfo_you(nhfp, &u, "gamestate", "you", 1); - sfo_str(nhfp, yyyymmddhhmmss(ubirthday), "gamestate", "ubirthday", 14); - sfo_long(nhfp, &urealtime.realtime, "gamestate", "realtime", 1); - sfo_str(nhfp, yyyymmddhhmmss(urealtime.start_timing), "gamestate", "start_timing", 14); - } /* this is the value to use for the next update of urealtime.realtime */ urealtime.start_timing = urealtime.finish_time; save_killers(nhfp); @@ -355,12 +330,6 @@ NHFILE *nhfp; } if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) g.mvitals, sizeof g.mvitals); - if (nhfp->fieldlevel) { - int i; - - for (i = 0; i < NUMMONS; ++i) - sfo_mvitals(nhfp, &g.mvitals[i], "gamestate", "g.mvitals", 1); - } save_dungeon(nhfp, (boolean) !!perform_bwrite(nhfp), (boolean) !!release_data(nhfp)); savelevchn(nhfp); @@ -371,39 +340,20 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t) g.spl_book, sizeof (struct spell) * (MAXSPELL + 1)); } - if (nhfp->fieldlevel) { - int i; - struct spell *sptmp; - - sfo_long(nhfp, &g.moves, "gamestate", "g.moves", 1); - sfo_long(nhfp, &g.monstermoves, "gamestate", "g.monstermoves", 1); - sfo_q_score(nhfp, &g.quest_status, "gamestate", "g.quest_status", 1); - sptmp = g.spl_book; - for (i = 0; i < (MAXSPELL + 1); ++i) - sfo_spell(nhfp, sptmp++, "gamestate", "g.spl_book", 1); - } save_artifacts(nhfp); save_oracles(nhfp); if (g.ustuck_id) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &g.ustuck_id, sizeof g.ustuck_id); - if (nhfp->fieldlevel) - sfo_unsigned(nhfp, &g.ustuck_id, "gamestate", "g.ustuck_id", 1); } if (g.usteed_id) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &g.usteed_id, sizeof g.usteed_id); - if (nhfp->fieldlevel) - sfo_unsigned(nhfp, &g.usteed_id, "gamestate", "g.usteed_id", 1); } if (nhfp->structlevel) { bwrite(nhfp->fd, (genericptr_t) g.pl_character, sizeof g.pl_character); bwrite(nhfp->fd, (genericptr_t) g.pl_fruit, sizeof g.pl_fruit); } - if (nhfp->fieldlevel) { - sfo_char(nhfp, g.pl_character, "gamestate", "g.pl_character", sizeof g.pl_character); - sfo_char(nhfp, g.pl_fruit, "gamestate", "g.pl_fruit", sizeof g.pl_fruit); - } savefruitchn(nhfp); savenames(nhfp); save_waterlevel(nhfp); @@ -478,15 +428,11 @@ savestateinlock() nhfp->mode = WRITING; if (nhfp->structlevel) (void) write(nhfp->fd, (genericptr_t) &g.hackpid, sizeof g.hackpid); - if (nhfp->fieldlevel) - sfo_int(nhfp, &g.hackpid, "gamestate", "g.hackpid", 1); if (flags.ins_chkpt) { int currlev = ledger_no(&u.uz); if (nhfp->structlevel) (void) write(nhfp->fd, (genericptr_t) &currlev, sizeof currlev); - if (nhfp->fieldlevel) - sfo_int(nhfp, &currlev, "gamestate", "savestateinlock", 1); save_savefile_name(nhfp); store_version(nhfp); store_savefileinfo(nhfp); @@ -582,20 +528,14 @@ xchar lev; g.level_info[lev].flags |= VISITED; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &g.hackpid, sizeof g.hackpid); - if (nhfp->fieldlevel) - sfo_int(nhfp, &g.hackpid, "gamestate", "g.hackpid", 1); #ifdef TOS tlev = lev; tlev &= 0x00ff; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &tlev, sizeof tlev); - if (nhfp->fieldlevel) - sfo_short(nhfp, &tlev, "gamestate", "tlev", 1); #else if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &lev, sizeof lev); - if (nhfp->fieldlevel) - sfo_xchar(nhfp, &lev, "gamestate", "dlvl", 1); #endif } @@ -623,24 +563,6 @@ xchar lev; bwrite(nhfp->fd, (genericptr_t) &g.level.flags, sizeof g.level.flags); bwrite(nhfp->fd, (genericptr_t) g.doors, sizeof g.doors); } - if (nhfp->fieldlevel) { - int i, c, r; - - for (c = 0; c < COLNO; ++c) - for (r = 0; r < ROWNO; ++r) - sfo_schar(nhfp, &g.lastseentyp[c][r], "lev", "g.lastseentyp", 1); - sfo_long(nhfp, &g.monstermoves, "lev", "timestmp", 1); - sfo_stairway(nhfp, &g.upstair, "lev", "g.upstair", 1); - sfo_stairway(nhfp, &g.dnstair, "lev", "g.dnstair", 1); - sfo_stairway(nhfp, &g.upladder, "lev", "g.upladder", 1); - sfo_stairway(nhfp, &g.dnladder, "lev", "g.dnladder", 1); - sfo_stairway(nhfp, &g.sstairs, "lev", "g.sstairs", 1); - sfo_dest_area(nhfp, &g.updest, "lev", "g.updest", 1); - sfo_dest_area(nhfp, &g.dndest, "lev", "g.dndest", 1); - sfo_levelflags(nhfp, &g.level.flags, "lev", "g.level.flags", 1); - for (i = 0; i < DOORMAX; ++i) - sfo_nhcoord(nhfp, &g.doors[i], "lev", "door", 1); - } save_rooms(nhfp); /* no dynamic memory to reclaim */ /* from here on out, saving also involves allocated memory cleanup */ @@ -719,10 +641,6 @@ boolean rlecomp; bwrite(nhfp->fd, (genericptr_t) &match, sizeof (uchar)); bwrite(nhfp->fd, (genericptr_t) rgrm, sizeof (struct rm)); } - if (nhfp->fieldlevel) { - sfo_uchar(nhfp, &match, "levl", "match", 1); - sfo_rm(nhfp, rgrm, "levl", "rgrm", 1); - } /* start encoding again. we have at least 1 rm in the next run, viz. this one. */ match = 1; @@ -735,10 +653,6 @@ boolean rlecomp; bwrite(nhfp->fd, (genericptr_t) &match, sizeof (uchar)); bwrite(nhfp->fd, (genericptr_t) rgrm, sizeof (struct rm)); } - if (nhfp->fieldlevel) { - sfo_uchar(nhfp, &match, "levl", "match", 1); - sfo_rm(nhfp, rgrm, "levl", "rgrm", 1); - } } return; } @@ -748,13 +662,6 @@ boolean rlecomp; if (nhfp->structlevel) { bwrite(nhfp->fd, (genericptr_t) levl, sizeof levl); } - if (nhfp->fieldlevel) { - int c, r; - - for (c = 0; c < COLNO; ++c) - for (r = 0; r < ROWNO; ++r) - sfo_rm(nhfp, &g.level.locations[c][r], "room", "levl", 1); - } } /* used when saving a level and also when saving dungeon overview data */ @@ -770,8 +677,6 @@ struct cemetery **cemeteryaddr; if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &flag, sizeof flag); - if (nhfp->fieldlevel) - sfo_int(nhfp, &flag, "cemetery", "cemetery_flag", 1); } nextbones = *cemeteryaddr; while ((thisbones = nextbones) != 0) { @@ -779,8 +684,6 @@ struct cemetery **cemeteryaddr; if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) thisbones, sizeof *thisbones); - if (nhfp->fieldlevel) - sfo_cemetery(nhfp, thisbones, "cemetery", "cemetery", 1); } if (release_data(nhfp)) free((genericptr_t) thisbones); @@ -802,15 +705,11 @@ NHFILE *nhfp; if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &xl, sizeof xl); - if (nhfp->fieldlevel) - sfo_unsigned(nhfp, &xl, "damage", "damage_count", 1); } while (xl--) { if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) damageptr, sizeof *damageptr); - if (nhfp->fieldlevel) - sfo_damage(nhfp, damageptr, "damage", "damage", 1); } tmp_dam = damageptr; damageptr = damageptr->next; @@ -833,22 +732,14 @@ struct obj *otmp; bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof buflen); bwrite(nhfp->fd, (genericptr_t) otmp, buflen); } - if (nhfp->fieldlevel) { - sfo_int(nhfp, &buflen, "obj", "obj_length", 1); - sfo_obj(nhfp, otmp, "obj", "obj", 1); - } if (otmp->oextra) { buflen = ONAME(otmp) ? (int) strlen(ONAME(otmp)) + 1 : 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof buflen); - if (nhfp->fieldlevel) - sfo_int(nhfp, &buflen, "obj", "oname_length", 1); if (buflen > 0) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) ONAME(otmp), buflen); - if (nhfp->fieldlevel) - sfo_str(nhfp, ONAME(otmp), "obj", "oname", buflen); } /* defer to savemon() for this one */ if (OMONST(otmp)) { @@ -856,43 +747,29 @@ struct obj *otmp; } else { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &zerobuf, sizeof zerobuf); - if (nhfp->fieldlevel) - sfo_int(nhfp, &zerobuf, "obj", "omonst_length", 1); } buflen = OMID(otmp) ? (int) sizeof (unsigned) : 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof buflen); - if (nhfp->fieldlevel) - sfo_int(nhfp, &buflen, "obj", "omid_length", 1); if (buflen > 0) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) OMID(otmp), buflen); - if (nhfp->fieldlevel) - sfo_int(nhfp, &buflen, "obj", "omid_length", 1); } /* TODO: post 3.6.x, get rid of this */ buflen = OLONG(otmp) ? (int) sizeof (long) : 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof buflen); - if (nhfp->fieldlevel) - sfo_int(nhfp, &buflen, "obj", "olong_length", 1); if (buflen > 0) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) OLONG(otmp), buflen); - if (nhfp->fieldlevel) - sfo_long(nhfp, OLONG(otmp), "obj", "olong", 1); } buflen = OMAILCMD(otmp) ? (int) strlen(OMAILCMD(otmp)) + 1 : 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof buflen); - if (nhfp->fieldlevel) - sfo_int(nhfp, &buflen, "obj", "omailcmd_length", 1); if (buflen > 0) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) OMAILCMD(otmp), buflen); - if (nhfp->fieldlevel) - sfo_str(nhfp, OMAILCMD(otmp), "obj", "omailcmd", buflen); } } } @@ -943,8 +820,6 @@ register struct obj *otmp; if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &minusone, sizeof (int)); - if (nhfp->fieldlevel) - sfo_int(nhfp, &minusone, "obj", "obj_length", 1); } } @@ -962,83 +837,53 @@ struct monst *mtmp; bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof buflen); bwrite(nhfp->fd, (genericptr_t) mtmp, buflen); } - if (nhfp->fieldlevel) { - sfo_int(nhfp, &buflen, "mon", "monst_length", 1); - sfo_monst(nhfp, mtmp, "mon", "monst", 1); - } if (mtmp->mextra) { buflen = MNAME(mtmp) ? (int) strlen(MNAME(mtmp)) + 1 : 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof buflen); - if (nhfp->fieldlevel) - sfo_int(nhfp, &buflen, "mon", "mname_length", 1); if (buflen > 0) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) MNAME(mtmp), buflen); - if (nhfp->fieldlevel) - sfo_str(nhfp, MNAME(mtmp), "mon", "mname", buflen); } buflen = EGD(mtmp) ? (int) sizeof (struct egd) : 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof buflen); - if (nhfp->fieldlevel) - sfo_int(nhfp, &buflen, "mon", "egd_length", 1); if (buflen > 0) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) EGD(mtmp), buflen); - if (nhfp->fieldlevel) - sfo_egd(nhfp, EGD(mtmp), "mon", "egd", 1); } buflen = EPRI(mtmp) ? (int) sizeof (struct epri) : 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof buflen); - if (nhfp->fieldlevel) - sfo_int(nhfp, &buflen, "mon", "epri_length", 1); if (buflen > 0) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) EPRI(mtmp), buflen); - if (nhfp->fieldlevel) - sfo_epri(nhfp, EPRI(mtmp), "mon", "epri", 1); } buflen = ESHK(mtmp) ? (int) sizeof (struct eshk) : 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof (int)); - if (nhfp->fieldlevel) - sfo_int(nhfp, &buflen, "mon", "eshk_length", 1); if (buflen > 0) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) ESHK(mtmp), buflen); - if (nhfp->fieldlevel) - sfo_eshk(nhfp, ESHK(mtmp), "mon", "eshk", 1); } buflen = EMIN(mtmp) ? (int) sizeof (struct emin) : 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof (int)); - if (nhfp->fieldlevel) - sfo_int(nhfp, &buflen, "mon", "emin_length", 1); if (buflen > 0) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) EMIN(mtmp), buflen); - if (nhfp->fieldlevel) - sfo_emin(nhfp, EMIN(mtmp), "mon", "emin", 1); } buflen = EDOG(mtmp) ? (int) sizeof (struct edog) : 0; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof (int)); - if (nhfp->fieldlevel) - sfo_int(nhfp, &buflen, "mon", "edog_length", 1); if (buflen > 0) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) EDOG(mtmp), buflen); - if (nhfp->fieldlevel) - sfo_edog(nhfp, EDOG(mtmp), "mon", "edog", 1); } /* mcorpsenm is inline int rather than pointer to something, so doesn't need to be preceded by a length field */ if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &MCORPSENM(mtmp), sizeof MCORPSENM(mtmp)); - if (nhfp->fieldlevel) - sfo_int(nhfp, &MCORPSENM(mtmp), "mon", "mcorpsenm", 1); } } @@ -1073,8 +918,6 @@ register struct monst *mtmp; if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &minusone, sizeof (int)); - if (nhfp->fieldlevel) - sfo_int(nhfp, &minusone, "mon", "monst_length", 1); } } @@ -1092,8 +935,6 @@ register struct trap *trap; if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) trap, sizeof *trap); - if (nhfp->fieldlevel) - sfo_trap(nhfp, trap, "trap", "trap", 1); } if (release_data(nhfp)) dealloc_trap(trap); @@ -1102,8 +943,6 @@ register struct trap *trap; if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &zerotrap, sizeof zerotrap); - if (nhfp->fieldlevel) - sfo_trap(nhfp, &zerotrap, "trap", "trap", 1); } } @@ -1125,8 +964,6 @@ NHFILE *nhfp; if (f1->fid >= 0 && perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) f1, sizeof *f1); - if (nhfp->fieldlevel) - sfo_fruit(nhfp, f1, "fruit", "fruit", 1); } if (release_data(nhfp)) dealloc_fruit(f1); @@ -1135,8 +972,6 @@ NHFILE *nhfp; if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &zerofruit, sizeof zerofruit); - if (nhfp->fieldlevel) - sfo_fruit(nhfp, &zerofruit, "fruit", "terminator", 1); } if (release_data(nhfp)) g.ffruit = 0; @@ -1156,16 +991,12 @@ NHFILE *nhfp; if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &cnt, sizeof cnt); - if (nhfp->fieldlevel) - sfo_int(nhfp, &cnt, "levchn", "lev_count", 1); } for (tmplev = g.sp_levchn; tmplev; tmplev = tmplev2) { tmplev2 = tmplev->next; if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) tmplev, sizeof *tmplev); - if (nhfp->fieldlevel) - sfo_s_level(nhfp, tmplev, "levchn", "s_level", 1); } if (release_data(nhfp)) free((genericptr_t) tmplev); @@ -1187,10 +1018,6 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t) g.plname, plsiztmp); bufon(nhfp->fd); } - if (nhfp->fieldlevel) { - sfo_int(nhfp, &plsiztmp, "plname", "plname_size", 1); - sfo_str(nhfp, g.plname, "plname", "g.plname", plsiztmp); - } return; } @@ -1218,16 +1045,10 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t) &msglen, sizeof msglen); bwrite(nhfp->fd, (genericptr_t) msg, msglen); } - if (nhfp->fieldlevel) { - sfo_int(nhfp, &msglen, "msghistory", "msghistory_length", 1); - sfo_str(nhfp, msg, "msghistory", "msg", msglen); - } ++msgcount; } if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &minusone, sizeof (int)); - if (nhfp->fieldlevel) - sfo_int(nhfp, &minusone, "msghistory", "msghistory_length", 1); } debugpline1("Stored %d messages into savefile.", msgcount); /* note: we don't attempt to handle release_data() here */ @@ -1254,9 +1075,6 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t) &sfsaveinfo, (unsigned) sizeof sfsaveinfo); bufon(nhfp->fd); } - if (nhfp->fieldlevel) { - sfo_savefile_info(nhfp, &sfsaveinfo, "savefileinfo", "savefile_info", 1); - } return; } diff --git a/src/sfascii.c b/src/sfascii.c deleted file mode 100644 index 673d47342..000000000 --- a/src/sfascii.c +++ /dev/null @@ -1,1233 +0,0 @@ -/* NetHack 3.7 sfascii.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ -/* Copyright (c) Michael Allison, 2019. */ -/* NetHack may be freely redistributed. See license for details. */ - -/* - * this is a proof-of-concept alternative output format. It doesn't - * offer value over the sflendian approach and is mostly used to test - * and confirm that alternative saveformat operates correctly. - */ - -#include "hack.h" -#include "integer.h" -#include "sfprocs.h" - -#if defined(MACOSX) || defined(VMS) -extern long long FDECL(atoll, (const char *)); -#endif - -static void FDECL(put_savefield, (NHFILE *, char *, size_t)); -char *FDECL(get_savefield, (NHFILE *, char *, size_t)); -#ifdef SAVEFILE_DEBUGGING -void FDECL(report_problem_ascii, (NHFILE *, const char *, const char *, const char *)); -#endif - -struct sf_procs ascii_sfo_procs = { - ".tx", - { - ascii_sfo_aligntyp, - ascii_sfo_any, - ascii_sfo_bitfield, - ascii_sfo_boolean, - ascii_sfo_char, - ascii_sfo_genericptr, - ascii_sfo_int, - ascii_sfo_long, - ascii_sfo_schar, - ascii_sfo_short, - ascii_sfo_size_t, - ascii_sfo_time_t, - ascii_sfo_unsigned, - ascii_sfo_uchar, - ascii_sfo_uint, - ascii_sfo_ulong, - ascii_sfo_ushort, - ascii_sfo_xchar, - ascii_sfo_str, - ascii_sfo_addinfo, - } -}; - -struct sf_procs ascii_sfi_procs = -{ - ".tx", - { - ascii_sfi_aligntyp, - ascii_sfi_any, - ascii_sfi_bitfield, - ascii_sfi_boolean, - ascii_sfi_char, - ascii_sfi_genericptr, - ascii_sfi_int, - ascii_sfi_long, - ascii_sfi_schar, - ascii_sfi_short, - ascii_sfi_size_t, - ascii_sfi_time_t, - ascii_sfi_unsigned, - ascii_sfi_uchar, - ascii_sfi_uint, - ascii_sfi_ulong, - ascii_sfi_ushort, - ascii_sfi_xchar, - ascii_sfi_str, - ascii_sfi_addinfo, - } -}; - -static char linebuf[BUFSZ]; -static char outbuf[BUFSZ]; - -/* - *---------------------------------------------------------------------------- - * sfo_def_ routines - * - * Default output routines. - * - *---------------------------------------------------------------------------- - */ - -void -ascii_sfo_any(nhfp, d_any, myparent, myname, cnt) -NHFILE *nhfp; -union any *d_any; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt UNUSED; -{ - /* const char *parent = "any"; */ - - /* nhUse(parent); */ - Sprintf(outbuf, "%llx", (unsigned long long) d_any->a_void); - put_savefield(nhfp, outbuf, BUFSZ); - - Sprintf(outbuf, "%lu", d_any->a_ulong); - put_savefield(nhfp, outbuf, BUFSZ); - - Sprintf(outbuf, "%ld", d_any->a_long); - put_savefield(nhfp, outbuf, BUFSZ); - - Sprintf(outbuf, "%d", d_any->a_uint); - put_savefield(nhfp, outbuf, BUFSZ); - - Sprintf(outbuf, "%d", d_any->a_int);; - put_savefield(nhfp, outbuf, BUFSZ); - - Sprintf(outbuf, "%hd", (short) d_any->a_char); - put_savefield(nhfp, outbuf, BUFSZ); - -#if 0 - sfo_genericptr(nhfp, d_any->a_void, parent, "a_void", 1); /* (genericptr_t) */ - sfo_genericptr(nhfp, d_any->a_obj, parent, "a_obj", 1); /* (struct obj *) */ - sfo_genericptr(nhfp, d_any->a_monst, parent, "a_monst", 1); /* (struct monst *) */ - sfo_int(nhfp, &d_any->a_int, parent, "a_int", 1); /* (int) */ - sfo_char(nhfp, &d_any->a_char, parent, "a_char", 1); /* (char) */ - sfo_schar(nhfp, &d_any->a_schar, parent, "a_schar", 1); /* (schar) */ - sfo_uchar(nhfp, &d_any->a_uchar, parent, "a_uchar", 1); /* (uchar) */ - sfo_uint(nhfp, &d_any->a_uint, parent, "a_uint", 1); /* (unsigned int) */ - sfo_long(nhfp, &d_any->a_long, parent, "a_long", 1); /* (long) */ - sfo_ulong(nhfp, &d_any->a_ulong, parent, "a_ulong", 1); /* (unsigned long) */ - sfo_genericptr(nhfp, d_any->a_iptr, parent, "a_iptr", 1); /* (int *) */ - sfo_genericptr(nhfp, d_any->a_lptr, parent, "a_lptr", 1); /* (long *) */ - sfo_genericptr(nhfp, d_any->a_ulptr, parent, "a_ulptr", 1); /* (unsigned long *) */ - sfo_genericptr(nhfp, d_any->a_uptr, parent, "a_uptr", 1); /* (unsigned *) */my - sfo_genericptr(nhfp, d_any->a_string, parent, "a_string", 1); /* (const char *) */ - sfo_ulong(nhfp, &d_any->a_mask32, parent, "a_mask32", 1); /* (unsigned long) */ -#endif -} - -void -ascii_sfo_aligntyp(nhfp, d_aligntyp, myparent, myname, cnt) -NHFILE *nhfp; -aligntyp *d_aligntyp; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt UNUSED; -{ - int itmp; -#if 0 - const char *parent = "aligntyp"; - - nhUse(parent); -#endif - itmp = (int) *d_aligntyp; - Sprintf(outbuf, "%d", (short) itmp); - put_savefield(nhfp, outbuf, BUFSZ); -} - -void -ascii_sfo_bitfield(nhfp, d_bitfield, myparent, myname, cnt) -NHFILE *nhfp; -uint8_t *d_bitfield; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt UNUSED; -{ -#if 0 - const char *parent = "bitfield"; - - nhUse(parent); -#endif - /* for bitfields, cnt is the number of bits, not an array */ - Sprintf(outbuf, "%hu", (unsigned short) *d_bitfield); - put_savefield(nhfp, outbuf, BUFSZ); -} - -void -ascii_sfo_boolean(nhfp, d_boolean, myparent, myname, cnt) -NHFILE *nhfp; -boolean *d_boolean; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -#if 0 - const char *parent = "boolean"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%s)\n", (*d_boolean) ? "TRUE" : "FALSE"); - Sprintf(outbuf, "%s", *d_boolean ? "true" : "false"); - put_savefield(nhfp, outbuf, BUFSZ); - d_boolean++; - } -} - -void -ascii_sfo_char(nhfp, d_char, myparent, myname, cnt) -NHFILE *nhfp; -char *d_char; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i = cnt; -#if 0 - const char *parent = "char"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%s)\n", d_char ? d_char : ""); - Sprintf(outbuf, "%hd", (short) *d_char); - put_savefield(nhfp, outbuf, BUFSZ); - d_char++; - } -} - -void -ascii_sfo_genericptr(nhfp, d_genericptr, myparent, myname, cnt) -NHFILE *nhfp; -genericptr_t *d_genericptr; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - unsigned long tmp; - char *byteptr = (char *) d_genericptr; -#if 0 - const char *parent = "genericptr"; - - nhUse(parent); -#endif - /* - * sbrooms is an array of pointers to mkroom. - * That array dimension is MAX_SUBROOMS. - * Even though the pointers themselves won't - * be valid, we need to account for the existence - * of that array and perhaps zero or non-zero. - */ - for (i = 0; i < cnt; ++i) { - tmp = (*d_genericptr) ? 1UL : 0UL; - Sprintf(outbuf, "%08lu", tmp); - put_savefield(nhfp, outbuf, BUFSZ); - if (cnt > 1) { - byteptr += sizeof(void *); - d_genericptr = (genericptr_t) byteptr; - } - } -} - -void -ascii_sfo_int(nhfp, d_int, myparent, myname, cnt) -NHFILE *nhfp; -int *d_int; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -#if 0 - const char *parent = "int"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - Sprintf(outbuf, "%d", *d_int); - put_savefield(nhfp, outbuf, BUFSZ); - d_int++; - } -} - -void -ascii_sfo_long(nhfp, d_long, myparent, myname, cnt) -NHFILE *nhfp; -long *d_long; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -#if 0 - const char *parent = "long"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - Sprintf(outbuf, "%ld", *d_long); - put_savefield(nhfp, outbuf, BUFSZ); - d_long++; - } -} - -void -ascii_sfo_schar(nhfp, d_schar, myparent, myname, cnt) -NHFILE *nhfp; -schar *d_schar; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i, itmp; -#if 0 - const char *parent = "schar"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - itmp = (int) *d_schar; - Sprintf(outbuf, "%d", itmp); - put_savefield(nhfp, outbuf, BUFSZ); - d_schar++; - } -} - -void -ascii_sfo_short(nhfp, d_short, myparent, myname, cnt) -NHFILE *nhfp; -short *d_short; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -#if 0 - const char *parent = "short"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - Sprintf(outbuf, "%hd", *d_short); - put_savefield(nhfp, outbuf, BUFSZ); - d_short++; - } -} - -void -ascii_sfo_size_t(nhfp, d_size_t, myparent, myname, cnt) -NHFILE *nhfp; -size_t *d_size_t; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -#if 0 - const char *parent = "size_t"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - unsigned long ul = (unsigned long) *d_size_t; - - Sprintf(outbuf, "%lu", ul); - put_savefield(nhfp, outbuf, BUFSZ); - d_size_t++; - } -} - -void -ascii_sfo_time_t(nhfp, d_time_t, myparent, myname, cnt) -NHFILE *nhfp; -time_t *d_time_t; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt UNUSED; -{ -#if 0 - const char *parent = "time_t"; - - nhUse(parent); -#endif - Sprintf(outbuf, "%s", yyyymmddhhmmss(*d_time_t)); - put_savefield(nhfp, outbuf, BUFSZ); -} - -void -ascii_sfo_unsigned(nhfp, d_unsigned, myparent, myname, cnt) -NHFILE *nhfp; -unsigned *d_unsigned; -const char *myparent; -const char *myname; -int cnt; -{ - ascii_sfo_uint(nhfp, d_unsigned, myparent, myname, cnt); -} - -void -ascii_sfo_uchar(nhfp, d_uchar, myparent, myname, cnt) -NHFILE *nhfp; -unsigned char *d_uchar; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -#if 0 - const char *parent = "uchar"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - unsigned short us = (unsigned short) *d_uchar; - - Sprintf(outbuf, "%hu", us); - put_savefield(nhfp, outbuf, BUFSZ); - d_uchar++; - } -} - -void -ascii_sfo_uint(nhfp, d_uint, myparent, myname, cnt) -NHFILE *nhfp; -unsigned int *d_uint; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -#if 0 - const char *parent = "uint"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - Sprintf(outbuf, "%u", *d_uint); - put_savefield(nhfp, outbuf, BUFSZ); - d_uint++; - } -} - -void -ascii_sfo_ulong(nhfp, d_ulong, myparent, myname, cnt) -NHFILE *nhfp; -unsigned long *d_ulong; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -#if 0 - const char *parent = "ulong"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - Sprintf(outbuf, "%lu", *d_ulong); - put_savefield(nhfp, outbuf, BUFSZ); - d_ulong++; - } -} - -void -ascii_sfo_ushort(nhfp, d_ushort, myparent, myname, cnt) -NHFILE *nhfp; -unsigned short *d_ushort; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -#if 0 - const char *parent = "ushort"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - Sprintf(outbuf, "%hu", *d_ushort); - put_savefield(nhfp, outbuf, BUFSZ); - d_ushort++; - } -} - -void -ascii_sfo_xchar(nhfp, d_xchar, myparent, myname, cnt) -NHFILE *nhfp; -xchar *d_xchar; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -#if 0 - const char *parent = "xchar"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - short tmp; - - tmp = (short) *d_xchar; - Sprintf(outbuf, "%hu", tmp); - put_savefield(nhfp, outbuf, BUFSZ); - d_xchar++; - } -} - -static char strbuf[BUFSZ * 4]; - -void -ascii_sfo_str(nhfp, d_str, myparent, myname, cnt) -NHFILE *nhfp; -char *d_str; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i, j, intval; -#if 0 - const char *parent = "str"; -#endif - char sval[QBUFSZ], *src = d_str, *dest = strbuf; - -#if 0 - nhUse(parent); -#endif - /* cnt is the number of characters */ - for (i = 0; i < cnt; ++i) { - if ((*src < 32) || (*src == '\\') || (*src > 127)) { - *dest++ = '\\'; - intval = (int) *src++; - Sprintf(sval, "%03d", intval); - for (j = 0; j < 3; ++j) - *dest++ = sval[j]; - } else { - *dest++ = *src++; - } - } - put_savefield(nhfp, strbuf, BUFSZ * 4); -} - -void -ascii_sfo_addinfo(nhfp, parent, action, myname, indx) -NHFILE *nhfp UNUSED; -const char *parent UNUSED, *action UNUSED, *myname UNUSED; -int indx UNUSED; -{ - /* ignored */ -} - - -static void -put_savefield(nhfp, obuf, outbufsz) -NHFILE *nhfp; -char *obuf; -size_t outbufsz UNUSED; -{ - nhfp->count++; - fprintf(nhfp->fpdef, "%07ld|%s\n", nhfp->count, obuf); -} - -/* - *---------------------------------------------------------------------------- - * ascii_sfi_ routines called from functions in sfi_base.c - *---------------------------------------------------------------------------- - */ - -void -ascii_sfi_any(nhfp, d_any, myparent, myname, cnt) -NHFILE *nhfp; -union any *d_any; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt UNUSED; -{ - char *rstr; - long long tmp; -#if 0 - const char *parent = "any"; - - nhUse(parent); -#endif - rstr = get_savefield(nhfp, linebuf, BUFSZ); - tmp = atoll(rstr); - d_any->a_void = (void *) tmp; - - rstr = get_savefield(nhfp, linebuf, BUFSZ); - tmp = atoll(rstr); - d_any->a_ulong = (unsigned long) tmp; - - rstr = get_savefield(nhfp, linebuf, BUFSZ); - d_any->a_long = atol(rstr); - - rstr = get_savefield(nhfp, linebuf, BUFSZ); - tmp = atoll(rstr); - d_any->a_uint = (unsigned int) tmp; - - rstr = get_savefield(nhfp, linebuf, BUFSZ); - d_any->a_int = atoi(rstr); - - rstr = get_savefield(nhfp, linebuf, BUFSZ); - d_any->a_char = (char) atoi(rstr); - -#if 0 - sfi_genericptr(nhfp, d_any->a_void, parent, "a_void", 1); - sfi_genericptr(nhfp, d_any->a_obj, parent, "a_obj", 1); - sfi_genericptr(nhfp, d_any->a_monst, parent, "a_monst", 1); - sfi_int(nhfp, &d_any->a_int, parent, "a_int", 1); - sfi_char(nhfp, &d_any->a_char, parent, "a_char", 1); - sfi_schar(nhfp, &d_any->a_schar, parent, "a_schar", 1); - sfi_uchar(nhfp, &d_any->a_uchar, parent, "a_uchar", 1); - sfi_uint(nhfp, &d_any->a_uint, parent, "a_uint", 1); - sfi_long(nhfp, &d_any->a_long, parent, "a_long", 1); - sfi_ulong(nhfp, &d_any->a_ulong, parent, "a_ulong", 1); - sfi_genericptr(nhfp, d_any->a_iptr, parent, "a_iptr", 1); - sfi_genericptr(nhfp, d_any->a_lptr, parent, "a_lptr", 1); - sfi_genericptr(nhfp, d_any->a_ulptr, parent, "a_ulptr", 1); - sfi_genericptr(nhfp, d_any->a_uptr, parent, "a_uptr", 1); - sfi_genericptr(nhfp, d_any->a_string, parent, "a_string", 1); - sfi_ulong(nhfp, &d_any->a_mask32, parent, "a_mask32", 1); -#endif -} - -void -ascii_sfi_aligntyp(nhfp, d_aligntyp, myparent, myname, cnt) -NHFILE *nhfp; -aligntyp *d_aligntyp; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt UNUSED; -{ - char *rstr; - aligntyp tmp; - long long lltmp; -#if 0 - const char *parent = "aligntyp"; - - nhUse(parent); -#endif - rstr = get_savefield(nhfp, linebuf, BUFSZ); - lltmp = atoll(rstr); - tmp = (aligntyp) lltmp; -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_aligntyp) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_aligntyp = tmp; -} - -void -ascii_sfi_bitfield(nhfp, d_bitfield, myparent, myname, cnt) -NHFILE *nhfp; -uint8_t *d_bitfield; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt UNUSED; -{ - char *rstr; - uint8_t tmp; -#if 0 - const char *parent = "bitfield"; - - nhUse(parent); -#endif - /* cnt is the number of bits in the bitfield, not an array dimension */ - rstr = get_savefield(nhfp, linebuf, BUFSZ); - tmp = (uint8_t) atoi(rstr); -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_bitfield) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_bitfield = tmp; -} - -void -ascii_sfi_boolean(nhfp, d_boolean, myparent, myname, cnt) -NHFILE *nhfp; -boolean *d_boolean; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - char *rstr; - int i; -#if 0 - const char *parent = "boolean"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); -#ifdef SAVEFILE_DEBUGGING - if (!strcmpi(rstr, "false") && - !strcmpi(rstr, "true")) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - if (!strcmpi(rstr, "false")) - *d_boolean = FALSE; - else - *d_boolean = TRUE; - d_boolean++; - } -} - -void -ascii_sfi_char(nhfp, d_char, myparent, myname, cnt) -NHFILE *nhfp; -char *d_char; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - char *rstr; - int i; - char tmp; -#if 0 - const char *parent = "char"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); - tmp = (char) atoi(rstr); -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_char) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_char = tmp; - d_char++; - } -} - -void -ascii_sfi_genericptr(nhfp, d_genericptr, myparent, myname, cnt) -NHFILE *nhfp; -genericptr_t *d_genericptr; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - long long lltmp; - char *rstr; -#if 0 - const char *parent = "genericptr"; -#endif - static const char *glorkum = "glorkum"; - char *byteptr = (char *) d_genericptr; - -#if 0 - nhUse(parent); -#endif - /* - * sbrooms is an array of pointers to mkroom. - * That array dimension is MAX_SUBROOMS. - * Even though the pointers themselves won't - * be valid, we need to account for the existence - * of that array. - */ - for (i = 0; i < cnt; ++i) { - /* these pointers can't actually be valid */ - byteptr = (char *) d_genericptr; - rstr = get_savefield(nhfp, linebuf, BUFSZ); - lltmp = atoll(rstr); - *d_genericptr = lltmp ? (genericptr_t) glorkum : (genericptr_t) 0; - if (cnt > 1) { - byteptr += sizeof(void *); - d_genericptr = (genericptr_t) byteptr; - } - } -} - -void -ascii_sfi_int(nhfp, d_int, myparent, myname, cnt) -NHFILE *nhfp; -int *d_int; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i, tmp; - char *rstr; - long long lltmp; -#if 0 - const char *parent = "int"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); - lltmp = atoll(rstr); - tmp = (int) lltmp; -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_int) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_int = tmp; - d_int++; - } -} - -void -ascii_sfi_long(nhfp, d_long, myparent, myname, cnt) -NHFILE *nhfp; -long *d_long; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - long tmp; - long long lltmp; - char *rstr; -#if 0 - const char *parent = "long"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); - lltmp = atoll(rstr); - tmp = (long) lltmp; -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_long) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_long = tmp; - d_long++; - } -} - -void -ascii_sfi_schar(nhfp, d_schar, myparent, myname, cnt) -NHFILE *nhfp; -schar *d_schar; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - schar tmp; - char *rstr; -#if 0 - const char *parent = "schar"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); - tmp = (schar) atoi(rstr); -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_schar) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_schar = tmp; - d_schar++; - } -} - -void -ascii_sfi_short(nhfp, d_short, myparent, myname, cnt) -NHFILE *nhfp; -short *d_short; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - short tmp; - char *rstr; -#if 0 - const char *parent = "short"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); - tmp = (short) atoi(rstr); -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_short) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_short = tmp; - d_short++; - } -} - -void -ascii_sfi_size_t(nhfp, d_size_t, myparent, myname, cnt) -NHFILE *nhfp; -size_t *d_size_t; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - size_t tmp; - char *rstr; -#if 0 - const char *parent = "size_t"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); - tmp = (size_t) atol(rstr); -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_size_t) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_size_t = tmp; - d_size_t++; - } -} - -void -ascii_sfi_time_t(nhfp, d_time_t, myparent, myname, cnt) -NHFILE *nhfp; -time_t *d_time_t; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt UNUSED; -{ - int i; - time_t tmp; - char *rstr; -#if 0 - const char *parent = "time_t"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); - tmp = time_from_yyyymmddhhmmss(rstr); -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_time_t) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_time_t = tmp; - d_time_t++; - } -} - -void -ascii_sfi_unsigned(nhfp, d_unsigned, myparent, myname, cnt) -NHFILE *nhfp; -unsigned *d_unsigned; -const char *myparent; -const char *myname; -int cnt; -{ - /* deferal */ - ascii_sfi_uint(nhfp, d_unsigned, myparent, myname, cnt); -} - -void -ascii_sfi_uchar(nhfp, d_uchar, myparent, myname, cnt) -NHFILE *nhfp; -unsigned char *d_uchar; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - uchar tmp; - int i, itmp; - char *rstr; -#if 0 - const char *parent = "uchar"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); - itmp = atoi(rstr); - tmp = (char ) itmp; -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_uchar) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_uchar = tmp; - d_uchar++; - } -} - -void -ascii_sfi_uint(nhfp, d_uint, myparent, myname, cnt) -NHFILE *nhfp; -unsigned int *d_uint; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - char *rstr; - unsigned int tmp; - long long lltmp; -#if 0 - const char *parent = "uint"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); - lltmp = atoll(rstr); - tmp = (unsigned int) lltmp; -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_uint) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_uint = tmp; - d_uint++; - } -} - -void -ascii_sfi_ulong(nhfp, d_ulong, myparent, myname, cnt) -NHFILE *nhfp; -unsigned long *d_ulong; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - unsigned long tmp; - long long lltmp; - char *rstr; -#if 0 - const char *parent = "ulong"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); - lltmp = atoll(rstr); - tmp = (unsigned long) lltmp; -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_ulong) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_ulong = tmp; - d_ulong++; - } -} - -void -ascii_sfi_ushort(nhfp, d_ushort, myparent, myname, cnt) -NHFILE *nhfp; -unsigned short *d_ushort; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - short tmp; - long long lltmp; - char *rstr; -#if 0 - const char *parent = "ushort"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); - lltmp = atoll(rstr); - tmp = (unsigned short) lltmp; -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_ushort) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_ushort = tmp; - d_ushort++; - } -} - -void -ascii_sfi_xchar(nhfp, d_xchar, myparent, myname, cnt) -NHFILE *nhfp; -xchar *d_xchar; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - xchar tmp; - int i, itmp; - char *rstr; -#if 0 - const char *parent = "xchar"; - - nhUse(parent); -#endif - for (i = 0; i < cnt; ++i) { - rstr = get_savefield(nhfp, linebuf, BUFSZ); - itmp = atoi(rstr); - tmp = (xchar) itmp; -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel && tmp != *d_xchar) - report_problem_ascii(nhfp, myparent, myname, parent); - else -#endif - *d_xchar = tmp; - d_xchar++; - } -} - -static char strbuf[BUFSZ * 4]; - -void -ascii_sfi_str(nhfp, d_str, myparent, myname, cnt) -NHFILE *nhfp; -char *d_str; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i, j, sval; - char n[4], *rstr; -#if 0 - const char *parent = "str"; -#endif - char *src, *dest; -#ifdef SAVEFILE_DEBUGGING - boolean match; - char testbuf[BUFSZ]; -#endif - -#if 0 - nhUse(parent); -#endif - /* cnt is the length of the string */ - rstr = get_savefield(nhfp, strbuf, BUFSZ * 4); - src = rstr; - dest = -#ifdef SAVEFILE_DEBUGGING - testbuf; -#else - d_str; -#endif - - for (i = 0; i < cnt; ++i) { - if (*src == '\\') { - src++; - for (j = 0; j < 4; ++j) { - if (j < 3) - n[j] = *src++; - else - n[j] = '\0'; - } - sval = atoi(n); - *dest++ = (char) sval; - } else - *dest++ = *src++; - } -#ifdef SAVEFILE_DEBUGGING - if (nhfp->structlevel) { - src = testbuf; - dest = d_str; - match = TRUE; - for (i = 0; i < cnt; ++i) { - if (*src++ != *dest++) - match = FALSE; - } - if (!match) - report_problem_ascii(nhfp, myparent, myname, parent); - else { - src = testbuf; - dest = d_str; - for (i = 0; i < cnt; ++i) - *dest++ = *src++; - } - } -#endif -} - -void -ascii_sfi_addinfo(nhfp, myparent, action, myname, indx) -NHFILE *nhfp UNUSED; -const char *myparent UNUSED, *action UNUSED, *myname UNUSED; -int indx UNUSED; -{ - /* not doing anything here */ -} - -char * -get_savefield(nhfp, inbuf, inbufsz) -NHFILE *nhfp; -char *inbuf; -size_t inbufsz; -{ - char *ep, *sep; - - if (fgets(inbuf, (int) inbufsz, nhfp->fpdef)) { - nhfp->count++; - ep = index(inbuf, '\n'); - if (!ep) { /* newline missing */ - if (strlen(inbuf) < (inbufsz - 2)) { - /* likely the last line of file is just - missing a newline; process it anyway */ - ep = eos(inbuf); - } - } - if (ep) - *ep = '\0'; /* remove newline */ - sep = index(inbuf, '|'); - if (sep) - sep++; - - return sep; - } - inbuf[0] = '\0'; - nhfp->eof = TRUE; - return inbuf; -} - -#ifdef SAVEFILE_DEBUGGING -void -report_problem_ascii(nhfp, s1, s2, s3) -NHFILE *nhfp; -const char *s1, *s2, *s3; -{ - fprintf(nhfp->fpdebug, "faulty value preservation " - "(%ld, %s, %s, %s)\n", nhfp->count, s1, s2, s3); -} -#endif - - diff --git a/src/sfbase.c b/src/sfbase.c deleted file mode 100644 index 396bdd03c..000000000 --- a/src/sfbase.c +++ /dev/null @@ -1,646 +0,0 @@ -/* NetHack 3.7 sf_base.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ -/* Copyright (c) Michael Allison, 2019. */ -/* NetHack may be freely redistributed. See license for details. */ - -#include "hack.h" -#include "integer.h" -#include "sfprocs.h" - -struct sf_procs sfoprocs[4], sfiprocs[4], - zerosfoprocs = {0}, zerosfiprocs = {0}; - -void FDECL(sfi_log, (NHFILE *, const char *, const char *, const char *, int)); - -/* - *---------------------------------------------------------------------------- - * initialize the function pointers. These are called from initoptions_init(). - *---------------------------------------------------------------------------- - */ - -void -sf_init() -{ - sfoprocs[invalid] = zerosfoprocs; - sfiprocs[invalid] = zerosfiprocs; - sfoprocs[historical] = zerosfoprocs; - sfiprocs[historical] = zerosfiprocs; - sfoprocs[lendian] = lendian_sfo_procs; - sfiprocs[lendian] = lendian_sfi_procs; - sfoprocs[ascii] = ascii_sfo_procs; - sfiprocs[ascii] = ascii_sfi_procs; -} - -/* - *---------------------------------------- - * routines called from engine core and - * from functions in generated sfdata.c - *---------------------------------------- - */ - -void -sfo_any(nhfp, d_any, myparent, myname, cnt) - NHFILE *nhfp; -union any *d_any; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_any)(nhfp, d_any, myparent, myname, cnt); -} - -void -sfo_aligntyp(nhfp, d_aligntyp, myparent, myname, cnt) -NHFILE *nhfp; -aligntyp *d_aligntyp; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_aligntyp)(nhfp, d_aligntyp, myparent, myname, cnt); -} - -void -sfo_bitfield(nhfp, d_bitfield, myparent, myname, cnt) -NHFILE *nhfp; -uint8_t *d_bitfield; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_bitfield)(nhfp, d_bitfield, myparent, myname, cnt); -} - -void -sfo_boolean(nhfp, d_boolean, myparent, myname, cnt) -NHFILE *nhfp; -boolean *d_boolean; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_boolean)(nhfp, d_boolean, myparent, myname, cnt); -} - -void -sfo_char(nhfp, d_char, myparent, myname, cnt) -NHFILE *nhfp; -char *d_char; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_char)(nhfp, d_char, myparent, myname, cnt); -} - -void -sfo_genericptr(nhfp, d_genericptr, myparent, myname, cnt) -NHFILE *nhfp; -genericptr_t d_genericptr; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_genericptr)(nhfp, d_genericptr, myparent, myname, cnt); -} - -void -sfo_int(nhfp, d_int, myparent, myname, cnt) -NHFILE *nhfp; -int *d_int; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_int)(nhfp, d_int, myparent, myname, cnt); -} - -void -sfo_long(nhfp, d_long, myparent, myname, cnt) -NHFILE *nhfp; -long *d_long; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_long)(nhfp, d_long, myparent, myname, cnt); -} - -void -sfo_schar(nhfp, d_schar, myparent, myname, cnt) -NHFILE *nhfp; -schar *d_schar; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_schar)(nhfp, d_schar, myparent, myname, cnt); -} - -void -sfo_short(nhfp, d_short, myparent, myname, cnt) -NHFILE *nhfp; -short *d_short; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_short)(nhfp, d_short, myparent, myname, cnt); -} - -void -sfo_size_t(nhfp, d_size_t, myparent, myname, cnt) -NHFILE *nhfp; -size_t *d_size_t; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_size_t)(nhfp, d_size_t, myparent, myname, cnt); -} - -void -sfo_time_t(nhfp, d_time_t, myparent, myname, cnt) -NHFILE *nhfp; -time_t *d_time_t; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_time_t)(nhfp, d_time_t, myparent, myname, cnt); -} - -void -sfo_unsigned(nhfp, d_unsigned, myparent, myname, cnt) -NHFILE *nhfp; -unsigned *d_unsigned; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_unsigned)(nhfp, d_unsigned, myparent, myname, cnt); -} - -void -sfo_uchar(nhfp, d_uchar, myparent, myname, cnt) -NHFILE *nhfp; -unsigned char *d_uchar; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_uchar)(nhfp, d_uchar, myparent, myname, cnt); -} - -void -sfo_uint(nhfp, d_uint, myparent, myname, cnt) -NHFILE *nhfp; -unsigned int *d_uint; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_uint)(nhfp, d_uint, myparent, myname, cnt); -} - -void -sfo_ulong(nhfp, d_ulong, myparent, myname, cnt) -NHFILE *nhfp; -unsigned long *d_ulong; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_ulong)(nhfp, d_ulong, myparent, myname, cnt); -} - -void -sfo_ushort(nhfp, d_ushort, myparent, myname, cnt) -NHFILE *nhfp; -unsigned short *d_ushort; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_ushort)(nhfp, d_ushort, myparent, myname, cnt); -} - -void -sfo_xchar(nhfp, d_xchar, myparent, myname, cnt) -NHFILE *nhfp; -xchar *d_xchar; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_xchar)(nhfp, d_xchar, myparent, myname, cnt); -} - -void -sfo_str(nhfp, d_str, myparent, myname, cnt) -NHFILE *nhfp; -char *d_str; -const char *myparent; -const char *myname; -int cnt; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_str)(nhfp, d_str, myparent, myname, cnt); -} - -void -sfo_addinfo(nhfp, parent, action, myname, index) -NHFILE *nhfp; -const char *parent, *action, *myname; -int index; -{ - (*sfoprocs[nhfp->fnidx].fn.sf_addinfo)(nhfp, parent, action, myname, index); -} - -/* - *---------------------------------------------------------------------------- - * routines called from core and from functions in generated sfi_data.c - *---------------------------------------------------------------------------- - */ - -void -sfi_any(nhfp, d_any, myparent, myname, cnt) -NHFILE *nhfp; -union any *d_any; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "any"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_any)(nhfp, d_any, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%ld)\n", d_any->a_long); -#endif -} - -void -sfi_aligntyp(nhfp, d_aligntyp, myparent, myname, cnt) -NHFILE *nhfp; -aligntyp *d_aligntyp; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "aligntyp"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_aligntyp)(nhfp, d_aligntyp, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%d)\n", *d_aligntyp); -#endif -} - -void -sfi_bitfield(nhfp, d_bitfield, myparent, myname, cnt) -NHFILE *nhfp; -uint8_t *d_bitfield; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "bitfield"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_bitfield)(nhfp, d_bitfield, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%hd)\n", *d_bitfield); -#endif -} - -void -sfi_boolean(nhfp, d_boolean, myparent, myname, cnt) -NHFILE *nhfp; -boolean *d_boolean; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "boolean"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_boolean)(nhfp, d_boolean, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%s)\n", (*d_boolean) ? "true" : "false"); -#endif -} - -void -sfi_char(nhfp, d_char, myparent, myname, cnt) -NHFILE *nhfp; -char *d_char; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "char"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_char)(nhfp, d_char, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%s)\n", d_char ? d_char : ""); -#endif -} - -void -sfi_genericptr(nhfp, d_genericptr, myparent, myname, cnt) -NHFILE *nhfp; -genericptr_t d_genericptr; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "genericptr"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_genericptr)(nhfp, d_genericptr, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%s)\n", (d_genericptr) ? "set" : "null"); -#endif -} - -void -sfi_int(nhfp, d_int, myparent, myname, cnt) -NHFILE *nhfp; -int *d_int; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "int"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_int)(nhfp, d_int, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%d)\n", *d_int); -#endif -} - -void -sfi_long(nhfp, d_long, myparent, myname, cnt) -NHFILE *nhfp; -long *d_long; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "long"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_long)(nhfp, d_long, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%ld)\n", *d_long); -#endif -} - -void -sfi_schar(nhfp, d_schar, myparent, myname, cnt) -NHFILE *nhfp; -schar *d_schar; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "schar"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_schar)(nhfp, d_schar, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%hd)\n", (short) *d_schar); -#endif -} - -void -sfi_short(nhfp, d_short, myparent, myname, cnt) -NHFILE *nhfp; -short *d_short; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "short"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_short)(nhfp, d_short, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%hd)\n", *d_short); -#endif -} - -void -sfi_size_t(nhfp, d_size_t, myparent, myname, cnt) -NHFILE *nhfp; -size_t *d_size_t; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "size_t"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_size_t)(nhfp, d_size_t, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%lu)\n", (unsigned long) *d_size_t); -#endif -} - -void -sfi_time_t(nhfp, d_time_t, myparent, myname, cnt) -NHFILE *nhfp; -time_t *d_time_t; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "time_t"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_time_t)(nhfp, d_time_t, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%s)\n", yyyymmddhhmmss(*d_time_t)); -#endif -} - -void -sfi_unsigned(nhfp, d_unsigned, myparent, myname, cnt) -NHFILE *nhfp; -unsigned *d_unsigned; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "unsigned"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_unsigned)(nhfp, d_unsigned, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%u)\n", *d_unsigned); -#endif -} - -void -sfi_uchar(nhfp, d_uchar, myparent, myname, cnt) -NHFILE *nhfp; -unsigned char *d_uchar; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "uchar"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_uchar)(nhfp, d_uchar, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%hu)\n", (unsigned short) *d_uchar); -#endif -} - -void -sfi_uint(nhfp, d_uint, myparent, myname, cnt) -NHFILE *nhfp; -unsigned int *d_uint; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "uint"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_uint)(nhfp, d_uint, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%u)\n", *d_uint); -#endif -} - -void -sfi_ulong(nhfp, d_ulong, myparent, myname, cnt) -NHFILE *nhfp; -unsigned long *d_ulong; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "ulong"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_ulong)(nhfp, d_ulong, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%lu)\n", *d_ulong); -#endif -} - -void -sfi_ushort(nhfp, d_ushort, myparent, myname, cnt) -NHFILE *nhfp; -unsigned short *d_ushort; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "ushort"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_ushort)(nhfp, d_ushort, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%hu)\n", *d_ushort); -#endif -} - -void -sfi_xchar(nhfp, d_xchar, myparent, myname, cnt) -NHFILE *nhfp; -xchar *d_xchar; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "xchar"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_xchar)(nhfp, d_xchar, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(%hd)\n", (short) *d_xchar); -#endif -} - -void -sfi_str(nhfp, d_str, myparent, myname, cnt) -NHFILE *nhfp; -char *d_str; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "str"; - - sfi_log(nhfp, myparent, myname, parent, cnt); - (*sfiprocs[nhfp->fnidx].fn.sf_str)(nhfp, d_str, myparent, myname, cnt); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - fprintf(nhfp->fpdebug, "(\"%s\")\n", d_str); -#endif -} - -void -sfi_addinfo(nhfp, myparent, action, myname, index) -NHFILE *nhfp; -const char *myparent, *action, *myname; -int index; -{ - if (nhfp) { - if (nhfp->fplog) - (void) fprintf(nhfp->fplog, "# %s %s %s %d\n", myparent, action, myname, index); -#ifdef DO_DEBUG - if (nhfp->fpdebug) - (void) fprintf(nhfp->fpdebug, "# %s %s %s %d\n", myparent, action, myname, index); -#endif - } - (*sfiprocs[nhfp->fnidx].fn.sf_addinfo)(nhfp, myparent, action, myname, index); -} - -void -sfi_log(nhfp, t1, t2, t3, cnt) -NHFILE *nhfp; -const char *t1, *t2, *t3; -int cnt; -{ -#ifdef DO_DEBUG -#ifdef SAVEFILE_DEBUGGING - if (nhfp) { - if (nhfp->fplog) - (void) fprintf(nhfp->fplog, "%s %s %s cnt=%d\n", t1, t2, t3, cnt); - if (nhfp->fpdebug) - (void) fprintf(nhfp->fpdebug, "%s %s %s cnt=%d ", t1, t2, t3, cnt); - } -#endif -#else - nhUse(nhfp); - nhUse(t1); - nhUse(t2); - nhUse(t3); - nhUse(cnt); -#endif -} - diff --git a/src/sfdata.c b/src/sfdata.c deleted file mode 100644 index 54c456eb4..000000000 --- a/src/sfdata.c +++ /dev/null @@ -1,6055 +0,0 @@ -/* NetHack 3.7 sfdata.c */ -/* Copyright (c) NetHack Development Team 2019. */ -/* NetHack may be freely redistributed. See license for details. */ - -/* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE! */ - -#include "hack.h" -#include "artifact.h" -#include "func_tab.h" -#include "lev.h" -#include "integer.h" -#include "wintype.h" -#include "sfproto.h" - -#define NHTYPE_SIMPLE 1 -#define NHTYPE_COMPLEX 2 -struct nhdatatypes_t { - unsigned int dtclass; - char *dtype; - size_t dtsize; -}; - -static uint8_t bitfield = 0; - -void -sfo_align(nhfp, d_align, myparent, myname, cnt) -NHFILE *nhfp; -struct align *d_align; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "align"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "align", 1); - - sfo_aligntyp(nhfp, &d_align->type, parent, "type", 1); /* (aligntyp) */ - sfo_int(nhfp, &d_align->record, parent, "record", 1); /* (int) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "align", 1); -} - -void -sfo_attribs(nhfp, d_attribs, myparent, myname, cnt) -NHFILE *nhfp; -struct attribs *d_attribs; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "attribs"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "attribs", 1); - - sfo_schar(nhfp, d_attribs->a, parent, "a", A_MAX); /* (schar) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "attribs", 1); -} - -void -sfo_bill_x(nhfp, d_bill_x, myparent, myname, cnt) -NHFILE *nhfp; -struct bill_x *d_bill_x; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "bill_x"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "bill_x", 1); - - sfo_unsigned(nhfp, &d_bill_x->bo_id, parent, "bo_id", 1); /* (unsigned) */ - sfo_boolean(nhfp, &d_bill_x->useup, parent, "useup", 1); /* (boolean) */ - sfo_long(nhfp, &d_bill_x->price, parent, "price", 1); /* (long) */ - sfo_long(nhfp, &d_bill_x->bquan, parent, "bquan", 1); /* (long) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "bill_x", 1); -} - -void -sfo_book_info(nhfp, d_book_info, myparent, myname, cnt) -NHFILE *nhfp; -struct book_info *d_book_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "book_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "book_info", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_book_info->book, parent, "book", 1);/* (struct obj *) */ - sfo_unsigned(nhfp, &d_book_info->o_id, parent, "o_id", 1); /* (unsigned) */ - sfo_schar(nhfp, &d_book_info->delay, parent, "delay", 1); /* (schar) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "book_info", 1); -} - -void -sfo_branch(nhfp, d_branch, myparent, myname, cnt) -NHFILE *nhfp; -struct branch *d_branch; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "branch"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "branch", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_branch->next, parent, "next", 1);/* (struct branch *) */ - sfo_int(nhfp, &d_branch->id, parent, "id", 1); /* (int) */ - sfo_int(nhfp, &d_branch->type, parent, "type", 1); /* (int) */ - sfo_d_level(nhfp, &d_branch->end1, parent, "end1", 1); /* (d_level) */ - sfo_d_level(nhfp, &d_branch->end2, parent, "end2", 1); /* (d_level) */ - sfo_boolean(nhfp, &d_branch->end1_up, parent, "end1_up", 1); /* (boolean) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "branch", 1); -} - -void -sfo_bubble(nhfp, d_bubble, myparent, myname, cnt) -NHFILE *nhfp; -struct bubble *d_bubble; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "bubble"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "bubble", 1); - - sfo_xchar(nhfp, &d_bubble->x, parent, "x", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_bubble->y, parent, "y", 1); /* (xchar) */ - sfo_schar(nhfp, &d_bubble->dx, parent, "dx", 1); /* (schar) */ - sfo_schar(nhfp, &d_bubble->dy, parent, "dy", 1); /* (schar) */ - sfo_uchar(nhfp, d_bubble->bm, parent, "bm", MAX_BMASK + 2); /* (uchar) */ - sfo_genericptr(nhfp, (genericptr_t) &d_bubble->prev, parent, "prev", 1);/* (struct bubble *) */ - sfo_genericptr(nhfp, (genericptr_t) &d_bubble->next, parent, "next", 1);/* (struct bubble *) */ - sfo_genericptr(nhfp, (genericptr_t) &d_bubble->cons, parent, "cons", 1);/* (struct container *) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "bubble", 1); -} - -void -sfo_cemetery(nhfp, d_cemetery, myparent, myname, cnt) -NHFILE *nhfp; -struct cemetery *d_cemetery; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "cemetery"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "cemetery", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_cemetery->next, parent, "next", 1);/* (struct cemetery *) */ - sfo_char(nhfp, d_cemetery->who, parent, "who", PL_NSIZ + 4 * (1 + 3) + 1);/* (char) */ - sfo_char(nhfp, d_cemetery->how, parent, "how", 100 + 1); /* (char) */ - sfo_char(nhfp, d_cemetery->when, parent, "when", 4 + 2 + 2 + 2 + 2 + 2 + 1);/* (char) */ - sfo_schar(nhfp, &d_cemetery->frpx, parent, "frpx", 1); /* (schar) */ - sfo_schar(nhfp, &d_cemetery->frpy, parent, "frpy", 1); /* (schar) */ - sfo_boolean(nhfp, &d_cemetery->bonesknown, parent, "bonesknown", 1);/* (boolean) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "cemetery", 1); -} - -void -sfo_context_info(nhfp, d_context_info, myparent, myname, cnt) -NHFILE *nhfp; -struct context_info *d_context_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "context_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "context_info", 1); - - sfo_unsigned(nhfp, &d_context_info->ident, parent, "ident", 1);/* (unsigned) */ - sfo_unsigned(nhfp, &d_context_info->no_of_wizards, parent, "no_of_wizards", 1);/* (unsigned) */ - sfo_unsigned(nhfp, &d_context_info->run, parent, "run", 1); /* (unsigned) */ - sfo_unsigned(nhfp, &d_context_info->startingpet_mid, parent, "startingpet_mid", 1);/* (unsigned) */ - sfo_int(nhfp, &d_context_info->current_fruit, parent, "current_fruit", 1);/* (int) */ - sfo_int(nhfp, &d_context_info->warnlevel, parent, "warnlevel", 1);/* (int) */ - sfo_int(nhfp, &d_context_info->rndencode, parent, "rndencode", 1);/* (int) */ - sfo_int(nhfp, &d_context_info->mysteryforce, parent, "mysteryforce", 1);/* (int) */ - sfo_long(nhfp, &d_context_info->next_attrib_check, parent, "next_attrib_check", 1);/* (long) */ - sfo_long(nhfp, &d_context_info->stethoscope_move, parent, "stethoscope_move", 1);/* (long) */ - sfo_short(nhfp, &d_context_info->stethoscope_movement, parent, "stethoscope_movement", 1);/* (short) */ - sfo_boolean(nhfp, &d_context_info->travel, parent, "travel", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_context_info->travel1, parent, "travel1", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_context_info->forcefight, parent, "forcefight", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_context_info->nopick, parent, "nopick", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_context_info->made_amulet, parent, "made_amulet", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_context_info->mon_moving, parent, "mon_moving", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_context_info->move, parent, "move", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_context_info->mv, parent, "mv", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_context_info->bypasses, parent, "bypasses", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_context_info->botl, parent, "botl", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_context_info->botlx, parent, "botlx", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_context_info->door_opened, parent, "door_opened", 1);/* (boolean) */ - sfo_dig_info(nhfp, &d_context_info->digging, parent, "digging", 1);/* (dig_info) */ - sfo_victual_info(nhfp, &d_context_info->victual, parent, "victual", 1);/* (victual_info) */ - sfo_tin_info(nhfp, &d_context_info->tin, parent, "tin", 1); /* (tin_info) */ - sfo_book_info(nhfp, &d_context_info->spbook, parent, "spbook", 1);/* (book_info) */ - sfo_takeoff_info(nhfp, &d_context_info->takeoff, parent, "takeoff", 1);/* (takeoff_info) */ - sfo_warntype_info(nhfp, &d_context_info->warntype, parent, "warntype", 1);/* (warntype_info) */ - sfo_polearm_info(nhfp, &d_context_info->polearm, parent, "polearm", 1);/* (polearm_info) */ - sfo_obj_split(nhfp, &d_context_info->objsplit, parent, "objsplit", 1);/* (obj_split) */ - sfo_tribute_info(nhfp, &d_context_info->tribute, parent, "tribute", 1);/* (tribute_info) */ - sfo_novel_tracking(nhfp, &d_context_info->novel, parent, "novel", 1);/* (novel_tracking) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "context_info", 1); -} - -void -sfo_d_flags(nhfp, d_d_flags, myparent, myname, cnt) -NHFILE *nhfp; -struct d_flags *d_d_flags; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "d_flags"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "d_flags", 1); - - bitfield = d_d_flags->town; /* (Bitfield(town, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "town", 1); - bitfield = d_d_flags->hellish; /* (Bitfield(hellish, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "hellish", 1); - bitfield = d_d_flags->maze_like; /* (Bitfield(maze_like, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "maze_like", 1); - bitfield = d_d_flags->rogue_like; /* (Bitfield(rogue_like, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "rogue_like", 1); - bitfield = d_d_flags->align; /* (Bitfield(align, 3)) */ - sfo_bitfield(nhfp, &bitfield, parent, "align", 3); - bitfield = d_d_flags->unused; /* (Bitfield(unused, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "unused", 1); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "d_flags", 1); -} - -void -sfo_d_level(nhfp, d_d_level, myparent, myname, cnt) -NHFILE *nhfp; -struct d_level *d_d_level; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "d_level"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "d_level", 1); - - sfo_xchar(nhfp, &d_d_level->dnum, parent, "dnum", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_d_level->dlevel, parent, "dlevel", 1); /* (xchar) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "d_level", 1); -} - -void -sfo_damage(nhfp, d_damage, myparent, myname, cnt) -NHFILE *nhfp; -struct damage *d_damage; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "damage"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "damage", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_damage->next, parent, "next", 1);/* (struct damage *) */ - sfo_long(nhfp, &d_damage->when, parent, "when", 1); /* (long) */ - sfo_long(nhfp, &d_damage->cost, parent, "cost", 1); /* (long) */ - sfo_nhcoord(nhfp, &d_damage->place, parent, "place", 1); /* (nhcoord) */ - sfo_schar(nhfp, &d_damage->typ, parent, "typ", 1); /* (schar) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "damage", 1); -} - -void -sfo_dest_area(nhfp, d_dest_area, myparent, myname, cnt) -NHFILE *nhfp; -struct dest_area *d_dest_area; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "dest_area"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "dest_area", 1); - - sfo_xchar(nhfp, &d_dest_area->lx, parent, "lx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_dest_area->ly, parent, "ly", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_dest_area->hx, parent, "hx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_dest_area->hy, parent, "hy", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_dest_area->nlx, parent, "nlx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_dest_area->nly, parent, "nly", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_dest_area->nhx, parent, "nhx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_dest_area->nhy, parent, "nhy", 1); /* (xchar) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "dest_area", 1); -} - -void -sfo_dgn_topology(nhfp, d_dgn_topology, myparent, myname, cnt) -NHFILE *nhfp; -struct dgn_topology *d_dgn_topology; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "dgn_topology"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "dgn_topology", 1); - - sfo_d_level(nhfp, &d_dgn_topology->d_oracle_level, parent, "d_oracle_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_bigroom_level, parent, "d_bigroom_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_rogue_level, parent, "d_rogue_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_medusa_level, parent, "d_medusa_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_stronghold_level, parent, "d_stronghold_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_valley_level, parent, "d_valley_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_wiz1_level, parent, "d_wiz1_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_wiz2_level, parent, "d_wiz2_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_wiz3_level, parent, "d_wiz3_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_juiblex_level, parent, "d_juiblex_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_orcus_level, parent, "d_orcus_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_baalzebub_level, parent, "d_baalzebub_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_asmodeus_level, parent, "d_asmodeus_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_portal_level, parent, "d_portal_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_sanctum_level, parent, "d_sanctum_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_earth_level, parent, "d_earth_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_water_level, parent, "d_water_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_fire_level, parent, "d_fire_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_air_level, parent, "d_air_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_astral_level, parent, "d_astral_level", 1);/* (d_level) */ - sfo_xchar(nhfp, &d_dgn_topology->d_tower_dnum, parent, "d_tower_dnum", 1);/* (xchar) */ - sfo_xchar(nhfp, &d_dgn_topology->d_sokoban_dnum, parent, "d_sokoban_dnum", 1);/* (xchar) */ - sfo_xchar(nhfp, &d_dgn_topology->d_mines_dnum, parent, "d_mines_dnum", 1);/* (xchar) */ - sfo_xchar(nhfp, &d_dgn_topology->d_quest_dnum, parent, "d_quest_dnum", 1);/* (xchar) */ - sfo_d_level(nhfp, &d_dgn_topology->d_qstart_level, parent, "d_qstart_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_qlocate_level, parent, "d_qlocate_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_nemesis_level, parent, "d_nemesis_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_knox_level, parent, "d_knox_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_mineend_level, parent, "d_mineend_level", 1);/* (d_level) */ - sfo_d_level(nhfp, &d_dgn_topology->d_sokoend_level, parent, "d_sokoend_level", 1);/* (d_level) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "dgn_topology", 1); -} - -void -sfo_dig_info(nhfp, d_dig_info, myparent, myname, cnt) -NHFILE *nhfp; -struct dig_info *d_dig_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "dig_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "dig_info", 1); - - sfo_int(nhfp, &d_dig_info->effort, parent, "effort", 1); /* (int) */ - sfo_d_level(nhfp, &d_dig_info->level, parent, "level", 1); /* (d_level) */ - sfo_nhcoord(nhfp, &d_dig_info->pos, parent, "pos", 1); /* (nhcoord) */ - sfo_long(nhfp, &d_dig_info->lastdigtime, parent, "lastdigtime", 1);/* (long) */ - sfo_boolean(nhfp, &d_dig_info->down, parent, "down", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_dig_info->chew, parent, "chew", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_dig_info->warned, parent, "warned", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_dig_info->quiet, parent, "quiet", 1); /* (boolean) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "dig_info", 1); -} - -void -sfo_dungeon(nhfp, d_dungeon, myparent, myname, cnt) -NHFILE *nhfp; -struct dungeon *d_dungeon; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "dungeon"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "dungeon", 1); - - sfo_char(nhfp, d_dungeon->dname, parent, "dname", 24); /* (char) */ - sfo_char(nhfp, d_dungeon->proto, parent, "proto", 15); /* (char) */ - sfo_char(nhfp, &d_dungeon->boneid, parent, "boneid", 1); /* (char) */ - sfo_d_flags(nhfp, &d_dungeon->flags, parent, "flags", 1); /* (d_flags) */ - sfo_xchar(nhfp, &d_dungeon->entry_lev, parent, "entry_lev", 1);/* (xchar) */ - sfo_xchar(nhfp, &d_dungeon->num_dunlevs, parent, "num_dunlevs", 1);/* (xchar) */ - sfo_xchar(nhfp, &d_dungeon->dunlev_ureached, parent, "dunlev_ureached", 1);/* (xchar) */ - sfo_int(nhfp, &d_dungeon->ledger_start, parent, "ledger_start", 1);/* (int) */ - sfo_int(nhfp, &d_dungeon->depth_start, parent, "depth_start", 1);/* (int) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "dungeon", 1); -} - -void -sfo_edog(nhfp, d_edog, myparent, myname, cnt) -NHFILE *nhfp; -struct edog *d_edog; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "edog"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "edog", 1); - - sfo_long(nhfp, &d_edog->droptime, parent, "droptime", 1); /* (long) */ - sfo_unsigned(nhfp, &d_edog->dropdist, parent, "dropdist", 1);/* (unsigned) */ - sfo_int(nhfp, &d_edog->apport, parent, "apport", 1); /* (int) */ - sfo_long(nhfp, &d_edog->whistletime, parent, "whistletime", 1);/* (long) */ - sfo_long(nhfp, &d_edog->hungrytime, parent, "hungrytime", 1);/* (long) */ - sfo_nhcoord(nhfp, &d_edog->ogoal, parent, "ogoal", 1); /* (nhcoord) */ - sfo_int(nhfp, &d_edog->abuse, parent, "abuse", 1); /* (int) */ - sfo_int(nhfp, &d_edog->revivals, parent, "revivals", 1); /* (int) */ - sfo_int(nhfp, &d_edog->mhpmax_penalty, parent, "mhpmax_penalty", 1);/* (int) */ - bitfield = d_edog->killed_by_u; /* (Bitfield(killed_by_u, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "killed_by_u", 1); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "edog", 1); -} - -void -sfo_egd(nhfp, d_egd, myparent, myname, cnt) -NHFILE *nhfp; -struct egd *d_egd; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "egd"; - int i; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "egd", 1); - - sfo_int(nhfp, &d_egd->fcbeg, parent, "fcbeg", 1); /* (int) */ - sfo_int(nhfp, &d_egd->fcend, parent, "fcend", 1); /* (int) */ - sfo_int(nhfp, &d_egd->vroom, parent, "vroom", 1); /* (int) */ - sfo_xchar(nhfp, &d_egd->gdx, parent, "gdx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_egd->gdy, parent, "gdy", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_egd->ogx, parent, "ogx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_egd->ogy, parent, "ogy", 1); /* (xchar) */ - sfo_d_level(nhfp, &d_egd->gdlevel, parent, "gdlevel", 1); /* (d_level) */ - sfo_xchar(nhfp, &d_egd->warncnt, parent, "warncnt", 1); /* (xchar) */ - bitfield = d_egd->gddone; /* (Bitfield(gddone, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "gddone", 1); - bitfield = d_egd->witness; /* (Bitfield(witness, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "witness", 2); - bitfield = d_egd->unused; /* (Bitfield(unused, 5)) */ - sfo_bitfield(nhfp, &bitfield, parent, "unused", 5); - for (i = 0; i < FCSIZ; ++i) - sfo_fakecorridor(nhfp, &d_egd->fakecorr[i], parent, "fakecorr", 1);/* (fakecorridor) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "egd", 1); -} - -void -sfo_emin(nhfp, d_emin, myparent, myname, cnt) -NHFILE *nhfp; -struct emin *d_emin; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "emin"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "emin", 1); - - sfo_aligntyp(nhfp, &d_emin->min_align, parent, "min_align", 1);/* (aligntyp) */ - sfo_boolean(nhfp, &d_emin->renegade, parent, "renegade", 1); /* (boolean) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "emin", 1); -} - -void -sfo_engr(nhfp, d_engr, myparent, myname, cnt) -NHFILE *nhfp; -struct engr *d_engr; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "engr"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "engr", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_engr->nxt_engr, parent, "nxt_engr", 1);/* (struct engr *) */ - sfo_genericptr(nhfp, (genericptr_t) &d_engr->engr_txt, parent, "engr_txt", 1);/* (char *) */ - sfo_xchar(nhfp, &d_engr->engr_x, parent, "engr_x", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_engr->engr_y, parent, "engr_y", 1); /* (xchar) */ - sfo_unsigned(nhfp, &d_engr->engr_lth, parent, "engr_lth", 1);/* (unsigned) */ - sfo_long(nhfp, &d_engr->engr_time, parent, "engr_time", 1); /* (long) */ - sfo_xchar(nhfp, &d_engr->engr_type, parent, "engr_type", 1); /* (xchar) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "engr", 1); -} - -void -sfo_epri(nhfp, d_epri, myparent, myname, cnt) -NHFILE *nhfp; -struct epri *d_epri; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "epri"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "epri", 1); - - sfo_aligntyp(nhfp, &d_epri->shralign, parent, "shralign", 1);/* (aligntyp) */ - sfo_schar(nhfp, &d_epri->shroom, parent, "shroom", 1); /* (schar) */ - sfo_nhcoord(nhfp, &d_epri->shrpos, parent, "shrpos", 1); /* (nhcoord) */ - sfo_d_level(nhfp, &d_epri->shrlevel, parent, "shrlevel", 1); /* (d_level) */ - sfo_long(nhfp, &d_epri->intone_time, parent, "intone_time", 1);/* (long) */ - sfo_long(nhfp, &d_epri->enter_time, parent, "enter_time", 1);/* (long) */ - sfo_long(nhfp, &d_epri->hostile_time, parent, "hostile_time", 1);/* (long) */ - sfo_long(nhfp, &d_epri->peaceful_time, parent, "peaceful_time", 1);/* (long) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "epri", 1); -} - -void -sfo_eshk(nhfp, d_eshk, myparent, myname, cnt) -NHFILE *nhfp; -struct eshk *d_eshk; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "eshk"; - int i; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "eshk", 1); - - sfo_long(nhfp, &d_eshk->robbed, parent, "robbed", 1); /* (long) */ - sfo_long(nhfp, &d_eshk->credit, parent, "credit", 1); /* (long) */ - sfo_long(nhfp, &d_eshk->debit, parent, "debit", 1); /* (long) */ - sfo_long(nhfp, &d_eshk->loan, parent, "loan", 1); /* (long) */ - sfo_int(nhfp, &d_eshk->shoptype, parent, "shoptype", 1); /* (int) */ - sfo_schar(nhfp, &d_eshk->shoproom, parent, "shoproom", 1); /* (schar) */ - sfo_schar(nhfp, &d_eshk->unused, parent, "unused", 1); /* (schar) */ - sfo_boolean(nhfp, &d_eshk->following, parent, "following", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_eshk->surcharge, parent, "surcharge", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_eshk->dismiss_kops, parent, "dismiss_kops", 1);/* (boolean) */ - sfo_nhcoord(nhfp, &d_eshk->shk, parent, "shk", 1); /* (nhcoord) */ - sfo_nhcoord(nhfp, &d_eshk->shd, parent, "shd", 1); /* (nhcoord) */ - sfo_d_level(nhfp, &d_eshk->shoplevel, parent, "shoplevel", 1);/* (d_level) */ - sfo_int(nhfp, &d_eshk->billct, parent, "billct", 1); /* (int) */ - for (i = 0; i < BILLSZ; ++i) - sfo_bill_x(nhfp, &d_eshk->bill[i], parent, "bill", 1); /* (bill_x) */ - sfo_genericptr(nhfp, (genericptr_t) &d_eshk->bill_p, parent, "bill_p", 1);/* (struct bill_x *) */ - sfo_int(nhfp, &d_eshk->visitct, parent, "visitct", 1); /* (int) */ - sfo_char(nhfp, d_eshk->customer, parent, "customer", PL_NSIZ);/* (char) */ - sfo_char(nhfp, d_eshk->shknam, parent, "shknam", PL_NSIZ); /* (char) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "eshk", 1); -} - -void -sfo_fakecorridor(nhfp, d_fakecorridor, myparent, myname, cnt) -NHFILE *nhfp; -struct fakecorridor *d_fakecorridor; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "fakecorridor"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "fakecorridor", 1); - - sfo_xchar(nhfp, &d_fakecorridor->fx, parent, "fx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_fakecorridor->fy, parent, "fy", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_fakecorridor->ftyp, parent, "ftyp", 1); /* (xchar) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "fakecorridor", 1); -} - -void -sfo_fe(nhfp, d_fe, myparent, myname, cnt) -NHFILE *nhfp; -struct fe *d_fe; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "fe"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "fe", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_fe->next, parent, "next", 1);/* (struct fe *) */ - sfo_long(nhfp, &d_fe->timeout, parent, "timeout", 1); /* (long) */ - sfo_ulong(nhfp, &d_fe->tid, parent, "tid", 1); /* (unsigned long) */ - sfo_short(nhfp, &d_fe->kind, parent, "kind", 1); /* (short) */ - sfo_short(nhfp, &d_fe->func_index, parent, "func_index", 1); /* (short) */ - sfo_any(nhfp, &d_fe->arg, parent, "arg", 1); /* (any) */ - bitfield = d_fe->needs_fixup; /* (Bitfield(needs_fixup, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "needs_fixup", 1); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "fe", 1); -} - -void -sfo_flag(nhfp, d_flag, myparent, myname, cnt) -NHFILE *nhfp; -struct flag *d_flag; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "flag"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "flag", 1); - - sfo_boolean(nhfp, &d_flag->acoustics, parent, "acoustics", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_flag->autodig, parent, "autodig", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->autoquiver, parent, "autoquiver", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_flag->autoopen, parent, "autoopen", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->beginner, parent, "beginner", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->biff, parent, "biff", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->bones, parent, "bones", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->confirm, parent, "confirm", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->dark_room, parent, "dark_room", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_flag->debug, parent, "debug", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->end_own, parent, "end_own", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->explore, parent, "explore", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->female, parent, "female", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->friday13, parent, "friday13", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->goldX, parent, "goldX", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->help, parent, "help", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->ignintr, parent, "ignintr", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->ins_chkpt, parent, "ins_chkpt", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_flag->invlet_constant, parent, "invlet_constant", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_flag->legacy, parent, "legacy", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->lit_corridor, parent, "lit_corridor", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_flag->nap, parent, "nap", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->null, parent, "null", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->pickup, parent, "pickup", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->pickup_thrown, parent, "pickup_thrown", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_flag->pushweapon, parent, "pushweapon", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_flag->rest_on_space, parent, "rest_on_space", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_flag->safe_dog, parent, "safe_dog", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->showexp, parent, "showexp", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->showscore, parent, "showscore", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_flag->silent, parent, "silent", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->sortpack, parent, "sortpack", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->sparkle, parent, "sparkle", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->standout, parent, "standout", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->time, parent, "time", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->tombstone, parent, "tombstone", 1);/* (boolean) */ - sfo_boolean(nhfp, &d_flag->verbose, parent, "verbose", 1); /* (boolean) */ - sfo_int(nhfp, &d_flag->end_top, parent, "end_top", 1); /* (int) */ - sfo_int(nhfp, &d_flag->end_around, parent, "end_around", 1); /* (int) */ - sfo_unsigned(nhfp, &d_flag->moonphase, parent, "moonphase", 1);/* (unsigned) */ - sfo_ulong(nhfp, &d_flag->suppress_alert, parent, "suppress_alert", 1);/* (unsigned long) */ - sfo_unsigned(nhfp, &d_flag->paranoia_bits, parent, "paranoia_bits", 1);/* (unsigned) */ - sfo_int(nhfp, &d_flag->pickup_burden, parent, "pickup_burden", 1);/* (int) */ - sfo_int(nhfp, &d_flag->pile_limit, parent, "pile_limit", 1); /* (int) */ - sfo_char(nhfp, &d_flag->sortloot, parent, "sortloot", 1); /* (char) */ - sfo_char(nhfp, d_flag->inv_order, parent, "inv_order", MAXOCLASSES);/* (char) */ - sfo_char(nhfp, d_flag->pickup_types, parent, "pickup_types", MAXOCLASSES);/* (char) */ - sfo_char(nhfp, d_flag->end_disclose, parent, "end_disclose", NUM_DISCLOSURE_OPTIONS + 1);/* (char) */ - sfo_char(nhfp, &d_flag->menu_style, parent, "menu_style", 1);/* (char) */ - sfo_boolean(nhfp, &d_flag->made_fruit, parent, "made_fruit", 1);/* (boolean) */ - sfo_int(nhfp, &d_flag->initrole, parent, "initrole", 1); /* (int) */ - sfo_int(nhfp, &d_flag->initrace, parent, "initrace", 1); /* (int) */ - sfo_int(nhfp, &d_flag->initgend, parent, "initgend", 1); /* (int) */ - sfo_int(nhfp, &d_flag->initalign, parent, "initalign", 1); /* (int) */ - sfo_int(nhfp, &d_flag->randomall, parent, "randomall", 1); /* (int) */ - sfo_int(nhfp, &d_flag->pantheon, parent, "pantheon", 1); /* (int) */ - sfo_boolean(nhfp, &d_flag->lootabc, parent, "lootabc", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->showrace, parent, "showrace", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_flag->travelcmd, parent, "travelcmd", 1);/* (boolean) */ - sfo_int(nhfp, &d_flag->runmode, parent, "runmode", 1); /* (int) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "flag", 1); -} - -void -sfo_fruit(nhfp, d_fruit, myparent, myname, cnt) -NHFILE *nhfp; -struct fruit *d_fruit; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "fruit"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "fruit", 1); - - sfo_char(nhfp, d_fruit->fname, parent, "fname", PL_FSIZ); /* (char) */ - sfo_int(nhfp, &d_fruit->fid, parent, "fid", 1); /* (int) */ - sfo_genericptr(nhfp, (genericptr_t) &d_fruit->nextf, parent, "nextf", 1);/* (struct fruit *) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "fruit", 1); -} - -void -sfo_kinfo(nhfp, d_kinfo, myparent, myname, cnt) -NHFILE *nhfp; -struct kinfo *d_kinfo; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "kinfo"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "kinfo", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_kinfo->next, parent, "next", 1);/* (struct kinfo *) */ - sfo_int(nhfp, &d_kinfo->id, parent, "id", 1); /* (int) */ - sfo_int(nhfp, &d_kinfo->format, parent, "format", 1); /* (int) */ - sfo_char(nhfp, d_kinfo->name, parent, "name", BUFSZ); /* (char) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "kinfo", 1); -} - -void -sfo_levelflags(nhfp, d_levelflags, myparent, myname, cnt) -NHFILE *nhfp; -struct levelflags *d_levelflags; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "levelflags"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "levelflags", 1); - - sfo_uchar(nhfp, &d_levelflags->nfountains, parent, "nfountains", 1);/* (uchar) */ - sfo_uchar(nhfp, &d_levelflags->nsinks, parent, "nsinks", 1); /* (uchar) */ - bitfield = d_levelflags->has_shop; /* (Bitfield(has_shop, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "has_shop", 1); - bitfield = d_levelflags->has_vault; /* (Bitfield(has_vault, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "has_vault", 1); - bitfield = d_levelflags->has_zoo; /* (Bitfield(has_zoo, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "has_zoo", 1); - bitfield = d_levelflags->has_court; /* (Bitfield(has_court, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "has_court", 1); - bitfield = d_levelflags->has_morgue; /* (Bitfield(has_morgue, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "has_morgue", 1); - bitfield = d_levelflags->has_beehive; /* (Bitfield(has_beehive, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "has_beehive", 1); - bitfield = d_levelflags->has_barracks; /* (Bitfield(has_barracks, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "has_barracks", 1); - bitfield = d_levelflags->has_temple; /* (Bitfield(has_temple, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "has_temple", 1); - bitfield = d_levelflags->has_swamp; /* (Bitfield(has_swamp, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "has_swamp", 1); - bitfield = d_levelflags->noteleport; /* (Bitfield(noteleport, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "noteleport", 1); - bitfield = d_levelflags->hardfloor; /* (Bitfield(hardfloor, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "hardfloor", 1); - bitfield = d_levelflags->nommap; /* (Bitfield(nommap, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "nommap", 1); - bitfield = d_levelflags->hero_memory; /* (Bitfield(hero_memory, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "hero_memory", 1); - bitfield = d_levelflags->shortsighted; /* (Bitfield(shortsighted, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "shortsighted", 1); - bitfield = d_levelflags->graveyard; /* (Bitfield(graveyard, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "graveyard", 1); - bitfield = d_levelflags->sokoban_rules; /* (Bitfield(sokoban_rules, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "sokoban_rules", 1); - bitfield = d_levelflags->is_maze_lev; /* (Bitfield(is_maze_lev, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "is_maze_lev", 1); - bitfield = d_levelflags->is_cavernous_lev; /* (Bitfield(is_cavernous_lev, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "is_cavernous_lev", 1); - bitfield = d_levelflags->arboreal; /* (Bitfield(arboreal, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "arboreal", 1); - bitfield = d_levelflags->wizard_bones; /* (Bitfield(wizard_bones, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "wizard_bones", 1); - bitfield = d_levelflags->corrmaze; /* (Bitfield(corrmaze, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "corrmaze", 1); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "levelflags", 1); -} - -void -sfo_linfo(nhfp, d_linfo, myparent, myname, cnt) -NHFILE *nhfp; -struct linfo *d_linfo; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "linfo"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "linfo", 1); - - sfo_uchar(nhfp, &d_linfo->flags, parent, "flags", 1); /* (unsigned char) */ -#ifdef MFLOPPY - sfo_int(nhfp, &d_linfo->where, parent, "where", 1); /* (int) */ - sfo_long(nhfp, &d_linfo->time, parent, "time", 1); /* (long) */ - sfo_long(nhfp, &d_linfo->size, parent, "size", 1); /* (long) */ -#endif /*MFLOPPY*/ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "linfo", 1); -} - -void -sfo_ls_t(nhfp, d_ls_t, myparent, myname, cnt) -NHFILE *nhfp; -struct ls_t *d_ls_t; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "ls_t"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "ls_t", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_ls_t->next, parent, "next", 1);/* (struct ls_t *) */ - sfo_xchar(nhfp, &d_ls_t->x, parent, "x", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_ls_t->y, parent, "y", 1); /* (xchar) */ - sfo_short(nhfp, &d_ls_t->range, parent, "range", 1); /* (short) */ - sfo_short(nhfp, &d_ls_t->flags, parent, "flags", 1); /* (short) */ - sfo_short(nhfp, &d_ls_t->type, parent, "type", 1); /* (short) */ - sfo_any(nhfp, &d_ls_t->id, parent, "id", 1); /* (any) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "ls_t", 1); -} - -void -sfo_mapseen_feat(nhfp, d_mapseen_feat, myparent, myname, cnt) -NHFILE *nhfp; -struct mapseen_feat *d_mapseen_feat; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mapseen_feat"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "mapseen_feat", 1); - - bitfield = d_mapseen_feat->nfount; /* (Bitfield(nfount, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "nfount", 2); - bitfield = d_mapseen_feat->nsink; /* (Bitfield(nsink, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "nsink", 2); - bitfield = d_mapseen_feat->naltar; /* (Bitfield(naltar, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "naltar", 2); - bitfield = d_mapseen_feat->nthrone; /* (Bitfield(nthrone, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "nthrone", 2); - bitfield = d_mapseen_feat->ngrave; /* (Bitfield(ngrave, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "ngrave", 2); - bitfield = d_mapseen_feat->ntree; /* (Bitfield(ntree, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "ntree", 2); - bitfield = d_mapseen_feat->water; /* (Bitfield(water, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "water", 2); - bitfield = d_mapseen_feat->lava; /* (Bitfield(lava, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "lava", 2); - bitfield = d_mapseen_feat->ice; /* (Bitfield(ice, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "ice", 2); - bitfield = d_mapseen_feat->nshop; /* (Bitfield(nshop, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "nshop", 2); - bitfield = d_mapseen_feat->ntemple; /* (Bitfield(ntemple, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "ntemple", 2); - bitfield = d_mapseen_feat->msalign; /* (Bitfield(msalign, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "msalign", 2); - bitfield = d_mapseen_feat->shoptype; /* (Bitfield(shoptype, 5)) */ - sfo_bitfield(nhfp, &bitfield, parent, "shoptype", 5); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "mapseen_feat", 1); -} - -void -sfo_mapseen_flags(nhfp, d_mapseen_flags, myparent, myname, cnt) -NHFILE *nhfp; -struct mapseen_flags *d_mapseen_flags; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mapseen_flags"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "mapseen_flags", 1); - - bitfield = d_mapseen_flags->unreachable; /* (Bitfield(unreachable, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "unreachable", 1); - bitfield = d_mapseen_flags->forgot; /* (Bitfield(forgot, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "forgot", 1); - bitfield = d_mapseen_flags->knownbones; /* (Bitfield(knownbones, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "knownbones", 1); - bitfield = d_mapseen_flags->oracle; /* (Bitfield(oracle, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oracle", 1); - bitfield = d_mapseen_flags->sokosolved; /* (Bitfield(sokosolved, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "sokosolved", 1); - bitfield = d_mapseen_flags->bigroom; /* (Bitfield(bigroom, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "bigroom", 1); - bitfield = d_mapseen_flags->castle; /* (Bitfield(castle, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "castle", 1); - bitfield = d_mapseen_flags->castletune; /* (Bitfield(castletune, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "castletune", 1); - bitfield = d_mapseen_flags->valley; /* (Bitfield(valley, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "valley", 1); - bitfield = d_mapseen_flags->msanctum; /* (Bitfield(msanctum, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "msanctum", 1); - bitfield = d_mapseen_flags->ludios; /* (Bitfield(ludios, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "ludios", 1); - bitfield = d_mapseen_flags->roguelevel; /* (Bitfield(roguelevel, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "roguelevel", 1); - bitfield = d_mapseen_flags->quest_summons; /* (Bitfield(quest_summons, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "quest_summons", 1); - bitfield = d_mapseen_flags->questing; /* (Bitfield(questing, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "questing", 1); - bitfield = d_mapseen_flags->vibrating_square; /* (Bitfield(vibrating_square, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "vibrating_square", 1); - bitfield = d_mapseen_flags->spare1; /* (Bitfield(spare1, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "spare1", 1); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "mapseen_flags", 1); -} - -void -sfo_mapseen_rooms(nhfp, d_mapseen_rooms, myparent, myname, cnt) -NHFILE *nhfp; -struct mapseen_rooms *d_mapseen_rooms; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mapseen_rooms"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "mapseen_rooms", 1); - - bitfield = d_mapseen_rooms->seen; /* (Bitfield(seen, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "seen", 1); - bitfield = d_mapseen_rooms->untended; /* (Bitfield(untended, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "untended", 1); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "mapseen_rooms", 1); -} - -void -sfo_mapseen(nhfp, d_mapseen, myparent, myname, cnt) -NHFILE *nhfp; -struct mapseen *d_mapseen; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mapseen"; - int i; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "mapseen", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_mapseen->next, parent, "next", 1);/* (struct mapseen *) */ - sfo_branch(nhfp, d_mapseen->br, parent, "br", 1); /* (branch *) */ - sfo_d_level(nhfp, &d_mapseen->lev, parent, "lev", 1); /* (d_level) */ - sfo_mapseen_feat(nhfp, &d_mapseen->feat, parent, "feat", 1); /* (}) */ - sfo_mapseen_flags(nhfp, &d_mapseen->flags, parent, "flags", 1);/* (}) */ - sfo_char(nhfp, d_mapseen->custom, parent, "custom", 1); /* (char *) */ - sfo_unsigned(nhfp, &d_mapseen->custom_lth, parent, "custom_lth", 1);/* (unsigned) */ - for (i = 0; i < (MAXNROFROOMS + 1) * 2; ++i) - sfo_mapseen_rooms(nhfp, &d_mapseen->msrooms[i], parent, "msrooms", 1);/* (}) */ - sfo_genericptr(nhfp, (genericptr_t) &d_mapseen->final_resting_place, parent, "final_resting_place", 1);/* (struct cemetery *) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "mapseen", 1); -} - -void -sfo_mextra(nhfp, d_mextra, myparent, myname, cnt) -NHFILE *nhfp; -struct mextra *d_mextra; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mextra"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "mextra", 1); - - sfo_char(nhfp, d_mextra->mname, parent, "mname", 1); /* (char *) */ - sfo_egd(nhfp, d_mextra->egd, parent, "egd", 1); /* (struct egd *) */ - sfo_epri(nhfp, d_mextra->epri, parent, "epri", 1); /* (struct epri *) */ - sfo_eshk(nhfp, d_mextra->eshk, parent, "eshk", 1); /* (struct eshk *) */ - sfo_emin(nhfp, d_mextra->emin, parent, "emin", 1); /* (struct emin *) */ - sfo_edog(nhfp, d_mextra->edog, parent, "edog", 1); /* (struct edog *) */ - sfo_int(nhfp, &d_mextra->mcorpsenm, parent, "mcorpsenm", 1); /* (int) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "mextra", 1); -} - -void -sfo_mkroom(nhfp, d_mkroom, myparent, myname, cnt) -NHFILE *nhfp; -struct mkroom *d_mkroom; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mkroom"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "mkroom", 1); - - sfo_schar(nhfp, &d_mkroom->lx, parent, "lx", 1); /* (schar) */ - sfo_schar(nhfp, &d_mkroom->hx, parent, "hx", 1); /* (schar) */ - sfo_schar(nhfp, &d_mkroom->ly, parent, "ly", 1); /* (schar) */ - sfo_schar(nhfp, &d_mkroom->hy, parent, "hy", 1); /* (schar) */ - sfo_schar(nhfp, &d_mkroom->rtype, parent, "rtype", 1); /* (schar) */ - sfo_schar(nhfp, &d_mkroom->orig_rtype, parent, "orig_rtype", 1);/* (schar) */ - sfo_schar(nhfp, &d_mkroom->rlit, parent, "rlit", 1); /* (schar) */ - sfo_schar(nhfp, &d_mkroom->needfill, parent, "needfill", 1); /* (schar) */ - sfo_schar(nhfp, &d_mkroom->needjoining, parent, "needjoining", 1);/* (schar) */ - sfo_schar(nhfp, &d_mkroom->doorct, parent, "doorct", 1); /* (schar) */ - sfo_schar(nhfp, &d_mkroom->fdoor, parent, "fdoor", 1); /* (schar) */ - sfo_schar(nhfp, &d_mkroom->nsubrooms, parent, "nsubrooms", 1);/* (schar) */ - sfo_boolean(nhfp, &d_mkroom->irregular, parent, "irregular", 1);/* (boolean) */ - sfo_genericptr(nhfp, (genericptr_t) &d_mkroom->sbrooms[0], parent, "sbrooms", MAX_SUBROOMS);/* (struct mkroom *) */ - sfo_genericptr(nhfp, (genericptr_t) &d_mkroom->resident, parent, "resident", 1);/* (struct monst *) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "mkroom", 1); -} - -void -sfo_monst(nhfp, d_monst, myparent, myname, cnt) -NHFILE *nhfp; -struct monst *d_monst; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "monst"; - int i; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "monst", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_monst->nmon, parent, "nmon", 1);/* (struct monst *) */ - sfo_genericptr(nhfp, (genericptr_t) &d_monst->data, parent, "data", 1);/* (struct permonst *) */ - sfo_unsigned(nhfp, &d_monst->m_id, parent, "m_id", 1); /* (unsigned) */ - sfo_short(nhfp, &d_monst->mnum, parent, "mnum", 1); /* (short) */ - sfo_short(nhfp, &d_monst->cham, parent, "cham", 1); /* (short) */ - sfo_short(nhfp, &d_monst->movement, parent, "movement", 1); /* (short) */ - sfo_uchar(nhfp, &d_monst->m_lev, parent, "m_lev", 1); /* (uchar) */ - sfo_aligntyp(nhfp, &d_monst->malign, parent, "malign", 1); /* (aligntyp) */ - sfo_xchar(nhfp, &d_monst->mx, parent, "mx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_monst->my, parent, "my", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_monst->mux, parent, "mux", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_monst->muy, parent, "muy", 1); /* (xchar) */ - for (i = 0; i < MTSZ; ++i) - sfo_nhcoord(nhfp, &d_monst->mtrack[i], parent, "mtrack", 1);/* (nhcoord) */ - sfo_int(nhfp, &d_monst->mhp, parent, "mhp", 1); /* (int) */ - sfo_int(nhfp, &d_monst->mhpmax, parent, "mhpmax", 1); /* (int) */ - sfo_unsigned(nhfp, &d_monst->mappearance, parent, "mappearance", 1);/* (unsigned) */ - sfo_uchar(nhfp, &d_monst->m_ap_type, parent, "m_ap_type", 1);/* (uchar) */ - sfo_schar(nhfp, &d_monst->mtame, parent, "mtame", 1); /* (schar) */ - sfo_ushort(nhfp, &d_monst->mextrinsics, parent, "mextrinsics", 1);/* (unsigned short) */ - sfo_int(nhfp, &d_monst->mspec_used, parent, "mspec_used", 1);/* (int) */ - bitfield = d_monst->female; /* (Bitfield(female, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "female", 1); - bitfield = d_monst->minvis; /* (Bitfield(minvis, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "minvis", 1); - bitfield = d_monst->invis_blkd; /* (Bitfield(invis_blkd, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "invis_blkd", 1); - bitfield = d_monst->perminvis; /* (Bitfield(perminvis, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "perminvis", 1); - bitfield = d_monst->mcan; /* (Bitfield(mcan, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mcan", 1); - bitfield = d_monst->mburied; /* (Bitfield(mburied, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mburied", 1); - bitfield = d_monst->mundetected; /* (Bitfield(mundetected, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mundetected", 1); - bitfield = d_monst->mcansee; /* (Bitfield(mcansee, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mcansee", 1); - bitfield = d_monst->mspeed; /* (Bitfield(mspeed, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mspeed", 2); - bitfield = d_monst->permspeed; /* (Bitfield(permspeed, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "permspeed", 2); - bitfield = d_monst->mrevived; /* (Bitfield(mrevived, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mrevived", 1); - bitfield = d_monst->mcloned; /* (Bitfield(mcloned, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mcloned", 1); - bitfield = d_monst->mavenge; /* (Bitfield(mavenge, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mavenge", 1); - bitfield = d_monst->mflee; /* (Bitfield(mflee, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mflee", 1); - bitfield = d_monst->mfleetim; /* (Bitfield(mfleetim, 7)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mfleetim", 7); - bitfield = d_monst->msleeping; /* (Bitfield(msleeping, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "msleeping", 1); - bitfield = d_monst->mblinded; /* (Bitfield(mblinded, 7)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mblinded", 7); - bitfield = d_monst->mstun; /* (Bitfield(mstun, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mstun", 1); - bitfield = d_monst->mfrozen; /* (Bitfield(mfrozen, 7)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mfrozen", 7); - bitfield = d_monst->mcanmove; /* (Bitfield(mcanmove, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mcanmove", 1); - bitfield = d_monst->mconf; /* (Bitfield(mconf, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mconf", 1); - bitfield = d_monst->mpeaceful; /* (Bitfield(mpeaceful, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mpeaceful", 1); - bitfield = d_monst->mtrapped; /* (Bitfield(mtrapped, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mtrapped", 1); - bitfield = d_monst->mleashed; /* (Bitfield(mleashed, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mleashed", 1); - bitfield = d_monst->isshk; /* (Bitfield(isshk, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "isshk", 1); - bitfield = d_monst->isminion; /* (Bitfield(isminion, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "isminion", 1); - bitfield = d_monst->isgd; /* (Bitfield(isgd, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "isgd", 1); - bitfield = d_monst->ispriest; /* (Bitfield(ispriest, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "ispriest", 1); - bitfield = d_monst->iswiz; /* (Bitfield(iswiz, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "iswiz", 1); - bitfield = d_monst->wormno; /* (Bitfield(wormno, 5)) */ - sfo_bitfield(nhfp, &bitfield, parent, "wormno", 5); - bitfield = d_monst->mtemplit; /* (Bitfield(mtemplit, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mtemplit", 1); - sfo_ulong(nhfp, &d_monst->mstrategy, parent, "mstrategy", 1);/* (unsigned long) */ - sfo_long(nhfp, &d_monst->mtrapseen, parent, "mtrapseen", 1); /* (long) */ - sfo_long(nhfp, &d_monst->mlstmv, parent, "mlstmv", 1); /* (long) */ - sfo_long(nhfp, &d_monst->mstate, parent, "mstate", 1); /* (long) */ - sfo_long(nhfp, &d_monst->migflags, parent, "migflags", 1); /* (long) */ - sfo_long(nhfp, &d_monst->mspare1, parent, "mspare1", 1); /* (long) */ - sfo_genericptr(nhfp, (genericptr_t) &d_monst->minvent, parent, "minvent", 1);/* (struct obj *) */ - sfo_genericptr(nhfp, (genericptr_t) &d_monst->mw, parent, "mw", 1);/* (struct obj *) */ - sfo_long(nhfp, &d_monst->misc_worn_check, parent, "misc_worn_check", 1);/* (long) */ - sfo_xchar(nhfp, &d_monst->weapon_check, parent, "weapon_check", 1);/* (xchar) */ - sfo_int(nhfp, &d_monst->meating, parent, "meating", 1); /* (int) */ - sfo_genericptr(nhfp, (genericptr_t) &d_monst->mextra, parent, "mextra", 1);/* (struct mextra *) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "monst", 1); -} - -void -sfo_mvitals(nhfp, d_mvitals, myparent, myname, cnt) -NHFILE *nhfp; -struct mvitals *d_mvitals; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mvitals"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "mvitals", 1); - - sfo_uchar(nhfp, &d_mvitals->born, parent, "born", 1); /* (uchar) */ - sfo_uchar(nhfp, &d_mvitals->died, parent, "died", 1); /* (uchar) */ - sfo_uchar(nhfp, &d_mvitals->mvflags, parent, "mvflags", 1); /* (uchar) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "mvitals", 1); -} - -void -sfo_nhcoord(nhfp, d_nhcoord, myparent, myname, cnt) -NHFILE *nhfp; -struct nhcoord *d_nhcoord; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "nhcoord"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "nhcoord", 1); - - sfo_xchar(nhfp, &d_nhcoord->x, parent, "x", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_nhcoord->y, parent, "y", 1); /* (xchar) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "nhcoord", 1); -} - -void -sfo_nhrect(nhfp, d_nhrect, myparent, myname, cnt) -NHFILE *nhfp; -struct nhrect *d_nhrect; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "nhrect"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "nhrect", 1); - - sfo_xchar(nhfp, &d_nhrect->lx, parent, "lx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_nhrect->ly, parent, "ly", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_nhrect->hx, parent, "hx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_nhrect->hy, parent, "hy", 1); /* (xchar) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "nhrect", 1); -} - -void -sfo_novel_tracking(nhfp, d_novel_tracking, myparent, myname, cnt) -NHFILE *nhfp; -struct novel_tracking *d_novel_tracking; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "novel_tracking"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "novel_tracking", 1); - - sfo_unsigned(nhfp, &d_novel_tracking->id, parent, "id", 1); /* (unsigned) */ - sfo_int(nhfp, &d_novel_tracking->count, parent, "count", 1); /* (int) */ - sfo_xchar(nhfp, d_novel_tracking->pasg, parent, "pasg", 30); /* (xchar) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "novel_tracking", 1); -} - -void -sfo_obj(nhfp, d_obj, myparent, myname, cnt) -NHFILE *nhfp; -struct obj *d_obj; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "obj"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "obj", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_obj->nobj, parent, "nobj", 1);/* (struct obj *) */ - sfo_vptrs(nhfp, &d_obj->v, parent, "v", 1); /* (vptrs) */ - sfo_genericptr(nhfp, (genericptr_t) &d_obj->cobj, parent, "cobj", 1);/* (struct obj *) */ - sfo_unsigned(nhfp, &d_obj->o_id, parent, "o_id", 1); /* (unsigned) */ - sfo_xchar(nhfp, &d_obj->ox, parent, "ox", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_obj->oy, parent, "oy", 1); /* (xchar) */ - sfo_short(nhfp, &d_obj->otyp, parent, "otyp", 1); /* (short) */ - sfo_unsigned(nhfp, &d_obj->owt, parent, "owt", 1); /* (unsigned) */ - sfo_long(nhfp, &d_obj->quan, parent, "quan", 1); /* (long) */ - sfo_schar(nhfp, &d_obj->spe, parent, "spe", 1); /* (schar) */ - sfo_char(nhfp, &d_obj->oclass, parent, "oclass", 1); /* (char) */ - sfo_char(nhfp, &d_obj->invlet, parent, "invlet", 1); /* (char) */ - sfo_char(nhfp, &d_obj->oartifact, parent, "oartifact", 1); /* (char) */ - sfo_xchar(nhfp, &d_obj->where, parent, "where", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_obj->timed, parent, "timed", 1); /* (xchar) */ - bitfield = d_obj->cursed; /* (Bitfield(cursed, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "cursed", 1); - bitfield = d_obj->blessed; /* (Bitfield(blessed, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "blessed", 1); - bitfield = d_obj->unpaid; /* (Bitfield(unpaid, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "unpaid", 1); - bitfield = d_obj->no_charge; /* (Bitfield(no_charge, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "no_charge", 1); - bitfield = d_obj->known; /* (Bitfield(known, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "known", 1); - bitfield = d_obj->dknown; /* (Bitfield(dknown, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "dknown", 1); - bitfield = d_obj->bknown; /* (Bitfield(bknown, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "bknown", 1); - bitfield = d_obj->rknown; /* (Bitfield(rknown, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "rknown", 1); - bitfield = d_obj->oeroded; /* (Bitfield(oeroded, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oeroded", 2); - bitfield = d_obj->oeroded2; /* (Bitfield(oeroded2, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oeroded2", 2); - bitfield = d_obj->oerodeproof; /* (Bitfield(oerodeproof, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oerodeproof", 1); - bitfield = d_obj->olocked; /* (Bitfield(olocked, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "olocked", 1); - bitfield = d_obj->obroken; /* (Bitfield(obroken, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "obroken", 1); - bitfield = d_obj->otrapped; /* (Bitfield(otrapped, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "otrapped", 1); - bitfield = d_obj->recharged; /* (Bitfield(recharged, 3)) */ - sfo_bitfield(nhfp, &bitfield, parent, "recharged", 3); - bitfield = d_obj->lamplit; /* (Bitfield(lamplit, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "lamplit", 1); - bitfield = d_obj->globby; /* (Bitfield(globby, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "globby", 1); - bitfield = d_obj->greased; /* (Bitfield(greased, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "greased", 1); - bitfield = d_obj->nomerge; /* (Bitfield(nomerge, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "nomerge", 1); - bitfield = d_obj->was_thrown; /* (Bitfield(was_thrown, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "was_thrown", 1); - bitfield = d_obj->in_use; /* (Bitfield(in_use, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "in_use", 1); - bitfield = d_obj->bypass; /* (Bitfield(bypass, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "bypass", 1); - bitfield = d_obj->cknown; /* (Bitfield(cknown, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "cknown", 1); - bitfield = d_obj->lknown; /* (Bitfield(lknown, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "lknown", 1); - sfo_int(nhfp, &d_obj->corpsenm, parent, "corpsenm", 1); /* (int) */ - sfo_int(nhfp, &d_obj->usecount, parent, "usecount", 1); /* (int) */ - sfo_unsigned(nhfp, &d_obj->oeaten, parent, "oeaten", 1); /* (unsigned) */ - sfo_long(nhfp, &d_obj->age, parent, "age", 1); /* (long) */ - sfo_long(nhfp, &d_obj->owornmask, parent, "owornmask", 1); /* (long) */ - sfo_genericptr(nhfp, (genericptr_t) &d_obj->oextra, parent, "oextra", 1);/* (struct oextra *) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "obj", 1); -} - -void -sfo_objclass(nhfp, d_objclass, myparent, myname, cnt) -NHFILE *nhfp; -struct objclass *d_objclass; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "objclass"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "objclass", 1); - - sfo_short(nhfp, &d_objclass->oc_name_idx, parent, "oc_name_idx", 1);/* (short) */ - sfo_short(nhfp, &d_objclass->oc_descr_idx, parent, "oc_descr_idx", 1);/* (short) */ - sfo_genericptr(nhfp, (genericptr_t) &d_objclass->oc_uname, parent, "oc_uname", 1);/* (char *) */ - bitfield = d_objclass->oc_name_known; /* (Bitfield(oc_name_known, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oc_name_known", 1); - bitfield = d_objclass->oc_merge; /* (Bitfield(oc_merge, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oc_merge", 1); - bitfield = d_objclass->oc_uses_known; /* (Bitfield(oc_uses_known, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oc_uses_known", 1); - bitfield = d_objclass->oc_pre_discovered; /* (Bitfield(oc_pre_discovered, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oc_pre_discovered", 1); - bitfield = d_objclass->oc_magic; /* (Bitfield(oc_magic, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oc_magic", 1); - bitfield = d_objclass->oc_charged; /* (Bitfield(oc_charged, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oc_charged", 1); - bitfield = d_objclass->oc_unique; /* (Bitfield(oc_unique, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oc_unique", 1); - bitfield = d_objclass->oc_nowish; /* (Bitfield(oc_nowish, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oc_nowish", 1); - bitfield = d_objclass->oc_big; /* (Bitfield(oc_big, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oc_big", 1); - bitfield = d_objclass->oc_tough; /* (Bitfield(oc_tough, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oc_tough", 1); - bitfield = d_objclass->oc_dir; /* (Bitfield(oc_dir, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oc_dir", 2); - bitfield = d_objclass->oc_material; /* (Bitfield(oc_material, 5)) */ - sfo_bitfield(nhfp, &bitfield, parent, "oc_material", 5); - sfo_schar(nhfp, &d_objclass->oc_subtyp, parent, "oc_subtyp", 1);/* (schar) */ - sfo_uchar(nhfp, &d_objclass->oc_oprop, parent, "oc_oprop", 1);/* (uchar) */ - sfo_char(nhfp, &d_objclass->oc_class, parent, "oc_class", 1);/* (char) */ - sfo_schar(nhfp, &d_objclass->oc_delay, parent, "oc_delay", 1);/* (schar) */ - sfo_uchar(nhfp, &d_objclass->oc_color, parent, "oc_color", 1);/* (uchar) */ - sfo_short(nhfp, &d_objclass->oc_prob, parent, "oc_prob", 1); /* (short) */ - sfo_ushort(nhfp, &d_objclass->oc_weight, parent, "oc_weight", 1);/* (unsigned short) */ - sfo_short(nhfp, &d_objclass->oc_cost, parent, "oc_cost", 1); /* (short) */ - sfo_schar(nhfp, &d_objclass->oc_wsdam, parent, "oc_wsdam", 1);/* (schar) */ - sfo_schar(nhfp, &d_objclass->oc_wldam, parent, "oc_wldam", 1);/* (schar) */ - sfo_schar(nhfp, &d_objclass->oc_oc1, parent, "oc_oc1", 1); /* (schar) */ - sfo_schar(nhfp, &d_objclass->oc_oc2, parent, "oc_oc2", 1); /* (schar) */ - sfo_ushort(nhfp, &d_objclass->oc_nutrition, parent, "oc_nutrition", 1);/* (unsigned short) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "objclass", 1); -} - -void -sfo_obj_split(nhfp, d_obj_split, myparent, myname, cnt) -NHFILE *nhfp; -struct obj_split *d_obj_split; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "obj_split"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "obj_split", 1); - - sfo_unsigned(nhfp, &d_obj_split->parent_oid, parent, "parent_oid", 1);/* (unsigned) */ - sfo_unsigned(nhfp, &d_obj_split->child_oid, parent, "child_oid", 1);/* (unsigned) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "obj_split", 1); -} - -void -sfo_oextra(nhfp, d_oextra, myparent, myname, cnt) -NHFILE *nhfp; -struct oextra *d_oextra; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "oextra"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "oextra", 1); - - sfo_char(nhfp, d_oextra->oname, parent, "oname", 1); /* (char *) */ - sfo_genericptr(nhfp, (genericptr_t) &d_oextra->omonst, parent, "omonst", 1);/* (struct monst *) */ - sfo_unsigned(nhfp, d_oextra->omid, parent, "omid", 1); /* (unsigned *) */ - sfo_long(nhfp, d_oextra->olong, parent, "olong", 1); /* (long *) */ - sfo_char(nhfp, d_oextra->omailcmd, parent, "omailcmd", 1); /* (char *) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "oextra", 1); -} - -void -sfo_polearm_info(nhfp, d_polearm_info, myparent, myname, cnt) -NHFILE *nhfp; -struct polearm_info *d_polearm_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "polearm_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "polearm_info", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_polearm_info->hitmon, parent, "hitmon", 1);/* (struct monst *) */ - sfo_unsigned(nhfp, &d_polearm_info->m_id, parent, "m_id", 1);/* (unsigned) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "polearm_info", 1); -} - -void -sfo_prop(nhfp, d_prop, myparent, myname, cnt) -NHFILE *nhfp; -struct prop *d_prop; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "prop"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "prop", 1); - - sfo_long(nhfp, &d_prop->extrinsic, parent, "extrinsic", 1); /* (long) */ - sfo_long(nhfp, &d_prop->blocked, parent, "blocked", 1); /* (long) */ - sfo_long(nhfp, &d_prop->intrinsic, parent, "intrinsic", 1); /* (long) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "prop", 1); -} - -void -sfo_q_score(nhfp, d_q_score, myparent, myname, cnt) -NHFILE *nhfp; -struct q_score *d_q_score; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "q_score"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "q_score", 1); - - bitfield = d_q_score->first_start; /* (Bitfield(first_start, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "first_start", 1); - bitfield = d_q_score->met_leader; /* (Bitfield(met_leader, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "met_leader", 1); - bitfield = d_q_score->not_ready; /* (Bitfield(not_ready, 3)) */ - sfo_bitfield(nhfp, &bitfield, parent, "not_ready", 3); - bitfield = d_q_score->pissed_off; /* (Bitfield(pissed_off, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "pissed_off", 1); - bitfield = d_q_score->got_quest; /* (Bitfield(got_quest, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "got_quest", 1); - bitfield = d_q_score->first_locate; /* (Bitfield(first_locate, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "first_locate", 1); - bitfield = d_q_score->met_intermed; /* (Bitfield(met_intermed, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "met_intermed", 1); - bitfield = d_q_score->got_final; /* (Bitfield(got_final, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "got_final", 1); - bitfield = d_q_score->made_goal; /* (Bitfield(made_goal, 3)) */ - sfo_bitfield(nhfp, &bitfield, parent, "made_goal", 3); - bitfield = d_q_score->met_nemesis; /* (Bitfield(met_nemesis, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "met_nemesis", 1); - bitfield = d_q_score->killed_nemesis; /* (Bitfield(killed_nemesis, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "killed_nemesis", 1); - bitfield = d_q_score->in_battle; /* (Bitfield(in_battle, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "in_battle", 1); - bitfield = d_q_score->cheater; /* (Bitfield(cheater, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "cheater", 1); - bitfield = d_q_score->touched_artifact; /* (Bitfield(touched_artifact, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "touched_artifact", 1); - bitfield = d_q_score->offered_artifact; /* (Bitfield(offered_artifact, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "offered_artifact", 1); - bitfield = d_q_score->got_thanks; /* (Bitfield(got_thanks, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "got_thanks", 1); - bitfield = d_q_score->ldrgend; /* (Bitfield(ldrgend, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "ldrgend", 2); - bitfield = d_q_score->nemgend; /* (Bitfield(nemgend, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "nemgend", 2); - bitfield = d_q_score->godgend; /* (Bitfield(godgend, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "godgend", 2); - bitfield = d_q_score->leader_is_dead; /* (Bitfield(leader_is_dead, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "leader_is_dead", 1); - sfo_unsigned(nhfp, &d_q_score->leader_m_id, parent, "leader_m_id", 1);/* (unsigned) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "q_score", 1); -} - -void -sfo_rm(nhfp, d_rm, myparent, myname, cnt) -NHFILE *nhfp; -struct rm *d_rm; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "rm"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "rm", 1); - - sfo_int(nhfp, &d_rm->glyph, parent, "glyph", 1); /* (int) */ - sfo_schar(nhfp, &d_rm->typ, parent, "typ", 1); /* (schar) */ - sfo_uchar(nhfp, &d_rm->seenv, parent, "seenv", 1); /* (uchar) */ - bitfield = d_rm->flags; /* (Bitfield(flags, 5)) */ - sfo_bitfield(nhfp, &bitfield, parent, "flags", 5); - bitfield = d_rm->horizontal; /* (Bitfield(horizontal, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "horizontal", 1); - bitfield = d_rm->lit; /* (Bitfield(lit, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "lit", 1); - bitfield = d_rm->waslit; /* (Bitfield(waslit, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "waslit", 1); - bitfield = d_rm->roomno; /* (Bitfield(roomno, 6)) */ - sfo_bitfield(nhfp, &bitfield, parent, "roomno", 6); - bitfield = d_rm->edge; /* (Bitfield(edge, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "edge", 1); - bitfield = d_rm->candig; /* (Bitfield(candig, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "candig", 1); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "rm", 1); -} - -void -sfo_s_level(nhfp, d_s_level, myparent, myname, cnt) -NHFILE *nhfp; -struct s_level *d_s_level; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "s_level"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "s_level", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_s_level->next, parent, "next", 1);/* (struct s_level *) */ - sfo_d_level(nhfp, &d_s_level->dlevel, parent, "dlevel", 1); /* (d_level) */ - sfo_char(nhfp, d_s_level->proto, parent, "proto", 15); /* (char) */ - sfo_char(nhfp, &d_s_level->boneid, parent, "boneid", 1); /* (char) */ - sfo_uchar(nhfp, &d_s_level->rndlevs, parent, "rndlevs", 1); /* (uchar) */ - sfo_d_flags(nhfp, &d_s_level->flags, parent, "flags", 1); /* (d_flags) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "s_level", 1); -} - -void -sfo_savefile_info(nhfp, d_savefile_info, myparent, myname, cnt) -NHFILE *nhfp; -struct savefile_info *d_savefile_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "savefile_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "savefile_info", 1); - - sfo_ulong(nhfp, &d_savefile_info->sfi1, parent, "sfi1", 1); /* (unsigned long) */ - sfo_ulong(nhfp, &d_savefile_info->sfi2, parent, "sfi2", 1); /* (unsigned long) */ - sfo_ulong(nhfp, &d_savefile_info->sfi3, parent, "sfi3", 1); /* (unsigned long) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "savefile_info", 1); -} - -void -sfo_skills(nhfp, d_skills, myparent, myname, cnt) -NHFILE *nhfp; -struct skills *d_skills; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "skills"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "skills", 1); - - sfo_xchar(nhfp, &d_skills->skill, parent, "skill", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_skills->max_skill, parent, "max_skill", 1);/* (xchar) */ - sfo_ushort(nhfp, &d_skills->advance, parent, "advance", 1); /* (unsigned short) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "skills", 1); -} - -void -sfo_spell(nhfp, d_spell, myparent, myname, cnt) -NHFILE *nhfp; -struct spell *d_spell; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "spell"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "spell", 1); - - sfo_short(nhfp, &d_spell->sp_id, parent, "sp_id", 1); /* (short) */ - sfo_xchar(nhfp, &d_spell->sp_lev, parent, "sp_lev", 1); /* (xchar) */ - sfo_int(nhfp, &d_spell->sp_know, parent, "sp_know", 1); /* (int) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "spell", 1); -} - -void -sfo_stairway(nhfp, d_stairway, myparent, myname, cnt) -NHFILE *nhfp; -struct stairway *d_stairway; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "stairway"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "stairway", 1); - - sfo_xchar(nhfp, &d_stairway->sx, parent, "sx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_stairway->sy, parent, "sy", 1); /* (xchar) */ - sfo_d_level(nhfp, &d_stairway->tolev, parent, "tolev", 1); /* (d_level) */ - sfo_char(nhfp, &d_stairway->up, parent, "up", 1); /* (char) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "stairway", 1); -} - -void -sfo_takeoff_info(nhfp, d_takeoff_info, myparent, myname, cnt) -NHFILE *nhfp; -struct takeoff_info *d_takeoff_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "takeoff_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "takeoff_info", 1); - - sfo_long(nhfp, &d_takeoff_info->mask, parent, "mask", 1); /* (long) */ - sfo_long(nhfp, &d_takeoff_info->what, parent, "what", 1); /* (long) */ - sfo_int(nhfp, &d_takeoff_info->delay, parent, "delay", 1); /* (int) */ - sfo_boolean(nhfp, &d_takeoff_info->cancelled_don, parent, "cancelled_don", 1);/* (boolean) */ - sfo_char(nhfp, d_takeoff_info->disrobing, parent, "disrobing", CONTEXTVERBSZ + 1);/* (char) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "takeoff_info", 1); -} - -void -sfo_tin_info(nhfp, d_tin_info, myparent, myname, cnt) -NHFILE *nhfp; -struct tin_info *d_tin_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "tin_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "tin_info", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_tin_info->tin, parent, "tin", 1);/* (struct obj *) */ - sfo_unsigned(nhfp, &d_tin_info->o_id, parent, "o_id", 1); /* (unsigned) */ - sfo_int(nhfp, &d_tin_info->usedtime, parent, "usedtime", 1); /* (int) */ - sfo_int(nhfp, &d_tin_info->reqtime, parent, "reqtime", 1); /* (int) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "tin_info", 1); -} - -void -sfo_trap(nhfp, d_trap, myparent, myname, cnt) -NHFILE *nhfp; -struct trap *d_trap; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "trap"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "trap", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_trap->ntrap, parent, "ntrap", 1);/* (struct trap *) */ - sfo_xchar(nhfp, &d_trap->tx, parent, "tx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_trap->ty, parent, "ty", 1); /* (xchar) */ - sfo_d_level(nhfp, &d_trap->dst, parent, "dst", 1); /* (d_level) */ - sfo_nhcoord(nhfp, &d_trap->launch, parent, "launch", 1); /* (nhcoord) */ - bitfield = d_trap->ttyp; /* (Bitfield(ttyp, 5)) */ - sfo_bitfield(nhfp, &bitfield, parent, "ttyp", 5); - bitfield = d_trap->tseen; /* (Bitfield(tseen, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "tseen", 1); - bitfield = d_trap->once; /* (Bitfield(once, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "once", 1); - bitfield = d_trap->madeby_u; /* (Bitfield(madeby_u, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "madeby_u", 1); - sfo_vlaunchinfo(nhfp, &d_trap->vl, parent, "vl", 1); /* (vlaunchinfo) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "trap", 1); -} - -void -sfo_tribute_info(nhfp, d_tribute_info, myparent, myname, cnt) -NHFILE *nhfp; -struct tribute_info *d_tribute_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "tribute_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "tribute_info", 1); - - sfo_size_t(nhfp, &d_tribute_info->tributesz, parent, "tributesz", 1);/* (size_t) */ - sfo_boolean(nhfp, &d_tribute_info->enabled, parent, "enabled", 1);/* (boolean) */ - bitfield = d_tribute_info->bookstock; /* (Bitfield(bookstock, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "bookstock", 1); - bitfield = d_tribute_info->Deathnotice; /* (Bitfield(Deathnotice,1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "Deathnotice", 1); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "tribute_info", 1); -} - -void -sfo_u_achieve(nhfp, d_u_achieve, myparent, myname, cnt) -NHFILE *nhfp; -struct u_achieve *d_u_achieve; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "u_achieve"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "u_achieve", 1); - - bitfield = d_u_achieve->amulet; /* (Bitfield(amulet, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "amulet", 1); - bitfield = d_u_achieve->bell; /* (Bitfield(bell, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "bell", 1); - bitfield = d_u_achieve->book; /* (Bitfield(book, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "book", 1); - bitfield = d_u_achieve->menorah; /* (Bitfield(menorah, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "menorah", 1); - bitfield = d_u_achieve->enter_gehennom; /* (Bitfield(enter_gehennom,1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "enter_gehennom", 1); - bitfield = d_u_achieve->ascended; /* (Bitfield(ascended, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "ascended", 1); - bitfield = d_u_achieve->mines_luckstone; /* (Bitfield(mines_luckstone, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mines_luckstone", 1); - bitfield = d_u_achieve->finish_sokoban; /* (Bitfield(finish_sokoban, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "finish_sokoban", 1); - bitfield = d_u_achieve->killed_medusa; /* (Bitfield(killed_medusa, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "killed_medusa", 1); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "u_achieve", 1); -} - -void -sfo_u_conduct(nhfp, d_u_conduct, myparent, myname, cnt) -NHFILE *nhfp; -struct u_conduct *d_u_conduct; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "u_conduct"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "u_conduct", 1); - - sfo_long(nhfp, &d_u_conduct->unvegetarian, parent, "unvegetarian", 1);/* (long) */ - sfo_long(nhfp, &d_u_conduct->unvegan, parent, "unvegan", 1); /* (long) */ - sfo_long(nhfp, &d_u_conduct->food, parent, "food", 1); /* (long) */ - sfo_long(nhfp, &d_u_conduct->gnostic, parent, "gnostic", 1); /* (long) */ - sfo_long(nhfp, &d_u_conduct->weaphit, parent, "weaphit", 1); /* (long) */ - sfo_long(nhfp, &d_u_conduct->killer, parent, "killer", 1); /* (long) */ - sfo_long(nhfp, &d_u_conduct->literate, parent, "literate", 1);/* (long) */ - sfo_long(nhfp, &d_u_conduct->polypiles, parent, "polypiles", 1);/* (long) */ - sfo_long(nhfp, &d_u_conduct->polyselfs, parent, "polyselfs", 1);/* (long) */ - sfo_long(nhfp, &d_u_conduct->wishes, parent, "wishes", 1); /* (long) */ - sfo_long(nhfp, &d_u_conduct->wisharti, parent, "wisharti", 1);/* (long) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "u_conduct", 1); -} - -void -sfo_u_event(nhfp, d_u_event, myparent, myname, cnt) -NHFILE *nhfp; -struct u_event *d_u_event; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "u_event"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "u_event", 1); - - bitfield = d_u_event->minor_oracle; /* (Bitfield(minor_oracle, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "minor_oracle", 1); - bitfield = d_u_event->major_oracle; /* (Bitfield(major_oracle, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "major_oracle", 1); - bitfield = d_u_event->read_tribute; /* (Bitfield(read_tribute, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "read_tribute", 1); - bitfield = d_u_event->qcalled; /* (Bitfield(qcalled, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "qcalled", 1); - bitfield = d_u_event->qexpelled; /* (Bitfield(qexpelled, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "qexpelled", 1); - bitfield = d_u_event->qcompleted; /* (Bitfield(qcompleted, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "qcompleted", 1); - bitfield = d_u_event->uheard_tune; /* (Bitfield(uheard_tune, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "uheard_tune", 2); - bitfield = d_u_event->uopened_dbridge; /* (Bitfield(uopened_dbridge, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "uopened_dbridge", 1); - bitfield = d_u_event->invoked; /* (Bitfield(invoked, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "invoked", 1); - bitfield = d_u_event->gehennom_entered; /* (Bitfield(gehennom_entered, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "gehennom_entered", 1); - bitfield = d_u_event->uhand_of_elbereth; /* (Bitfield(uhand_of_elbereth, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "uhand_of_elbereth", 2); - bitfield = d_u_event->udemigod; /* (Bitfield(udemigod, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "udemigod", 1); - bitfield = d_u_event->uvibrated; /* (Bitfield(uvibrated, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "uvibrated", 1); - bitfield = d_u_event->ascended; /* (Bitfield(ascended, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "ascended", 1); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "u_event", 1); -} - -void -sfo_u_have(nhfp, d_u_have, myparent, myname, cnt) -NHFILE *nhfp; -struct u_have *d_u_have; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "u_have"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "u_have", 1); - - bitfield = d_u_have->amulet; /* (Bitfield(amulet, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "amulet", 1); - bitfield = d_u_have->bell; /* (Bitfield(bell, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "bell", 1); - bitfield = d_u_have->book; /* (Bitfield(book, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "book", 1); - bitfield = d_u_have->menorah; /* (Bitfield(menorah, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "menorah", 1); - bitfield = d_u_have->questart; /* (Bitfield(questart, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "questart", 1); - bitfield = d_u_have->unused; /* (Bitfield(unused, 3)) */ - sfo_bitfield(nhfp, &bitfield, parent, "unused", 3); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "u_have", 1); -} - -void -sfo_u_realtime(nhfp, d_u_realtime, myparent, myname, cnt) -NHFILE *nhfp; -struct u_realtime *d_u_realtime; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "u_realtime"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "u_realtime", 1); - - sfo_long(nhfp, &d_u_realtime->realtime, parent, "realtime", 1);/* (long) */ - sfo_time_t(nhfp, &d_u_realtime->start_timing, parent, "start_timing", 1);/* (time_t) */ - sfo_time_t(nhfp, &d_u_realtime->finish_time, parent, "finish_time", 1);/* (time_t) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "u_realtime", 1); -} - -void -sfo_u_roleplay(nhfp, d_u_roleplay, myparent, myname, cnt) -NHFILE *nhfp; -struct u_roleplay *d_u_roleplay; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "u_roleplay"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "u_roleplay", 1); - - sfo_boolean(nhfp, &d_u_roleplay->blind, parent, "blind", 1); /* (boolean) */ - sfo_boolean(nhfp, &d_u_roleplay->nudist, parent, "nudist", 1);/* (boolean) */ - sfo_long(nhfp, &d_u_roleplay->numbones, parent, "numbones", 1);/* (long) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "u_roleplay", 1); -} - -void -sfo_version_info(nhfp, d_version_info, myparent, myname, cnt) -NHFILE *nhfp; -struct version_info *d_version_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "version_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "version_info", 1); - - sfo_ulong(nhfp, &d_version_info->incarnation, parent, "incarnation", 1);/* (unsigned long) */ - sfo_ulong(nhfp, &d_version_info->feature_set, parent, "feature_set", 1);/* (unsigned long) */ - sfo_ulong(nhfp, &d_version_info->entity_count, parent, "entity_count", 1);/* (unsigned long) */ - sfo_ulong(nhfp, &d_version_info->struct_sizes1, parent, "struct_sizes1", 1);/* (unsigned long) */ - sfo_ulong(nhfp, &d_version_info->struct_sizes2, parent, "struct_sizes2", 1);/* (unsigned long) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "version_info", 1); -} - -void -sfo_victual_info(nhfp, d_victual_info, myparent, myname, cnt) -NHFILE *nhfp; -struct victual_info *d_victual_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "victual_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "victual_info", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_victual_info->piece, parent, "piece", 1);/* (struct obj *) */ - sfo_unsigned(nhfp, &d_victual_info->o_id, parent, "o_id", 1);/* (unsigned) */ - sfo_int(nhfp, &d_victual_info->usedtime, parent, "usedtime", 1);/* (int) */ - sfo_int(nhfp, &d_victual_info->reqtime, parent, "reqtime", 1);/* (int) */ - sfo_int(nhfp, &d_victual_info->nmod, parent, "nmod", 1); /* (int) */ - bitfield = d_victual_info->canchoke; /* (Bitfield(canchoke, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "canchoke", 1); - bitfield = d_victual_info->fullwarn; /* (Bitfield(fullwarn, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "fullwarn", 1); - bitfield = d_victual_info->eating; /* (Bitfield(eating, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "eating", 1); - bitfield = d_victual_info->doreset; /* (Bitfield(doreset, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "doreset", 1); - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "victual_info", 1); -} - -void -sfo_vlaunchinfo(nhfp, d_vlaunchinfo, myparent, myname, cnt) -NHFILE *nhfp; -union vlaunchinfo *d_vlaunchinfo; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "vlaunchinfo"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "vlaunchinfo", 1); - - sfo_short(nhfp, &d_vlaunchinfo->v_launch_otyp, parent, "v_launch_otyp", 1);/* (short) */ - sfo_nhcoord(nhfp, &d_vlaunchinfo->v_launch2, parent, "v_launch2", 1);/* (nhcoord) */ - sfo_uchar(nhfp, &d_vlaunchinfo->v_conjoined, parent, "v_conjoined", 1);/* (uchar) */ - sfo_short(nhfp, &d_vlaunchinfo->v_tnote, parent, "v_tnote", 1);/* (short) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "vlaunchinfo", 1); -} - -void -sfo_vptrs(nhfp, d_vptrs, myparent, myname, cnt) -NHFILE *nhfp; -union vptrs *d_vptrs; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "vptrs"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "vptrs", 1); - - sfo_genericptr(nhfp, (genericptr_t) &d_vptrs->v_nexthere, parent, "v_nexthere", 1);/* (struct obj *) */ - sfo_genericptr(nhfp, (genericptr_t) &d_vptrs->v_ocontainer, parent, "v_ocontainer", 1);/* (struct obj *) */ - sfo_genericptr(nhfp, (genericptr_t) &d_vptrs->v_ocarry, parent, "v_ocarry", 1);/* (struct monst *) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "vptrs", 1); -} - -void -sfo_warntype_info(nhfp, d_warntype_info, myparent, myname, cnt) -NHFILE *nhfp; -struct warntype_info *d_warntype_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "warntype_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "warntype_info", 1); - - sfo_ulong(nhfp, &d_warntype_info->obj, parent, "obj", 1); /* (unsigned long) */ - sfo_ulong(nhfp, &d_warntype_info->polyd, parent, "polyd", 1);/* (unsigned long) */ - sfo_genericptr(nhfp, (genericptr_t) &d_warntype_info->species, parent, "species", 1);/* (struct permonst *) */ - sfo_short(nhfp, &d_warntype_info->speciesidx, parent, "speciesidx", 1);/* (short) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "warntype_info", 1); -} - -void -sfo_you(nhfp, d_you, myparent, myname, cnt) -NHFILE *nhfp; -struct you *d_you; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "you"; - int i; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "start", "you", 1); - - sfo_xchar(nhfp, &d_you->ux, parent, "ux", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_you->uy, parent, "uy", 1); /* (xchar) */ - sfo_schar(nhfp, &d_you->dx, parent, "dx", 1); /* (schar) */ - sfo_schar(nhfp, &d_you->dy, parent, "dy", 1); /* (schar) */ - sfo_schar(nhfp, &d_you->dz, parent, "dz", 1); /* (schar) */ - sfo_schar(nhfp, &d_you->di, parent, "di", 1); /* (schar) */ - sfo_xchar(nhfp, &d_you->tx, parent, "tx", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_you->ty, parent, "ty", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_you->ux0, parent, "ux0", 1); /* (xchar) */ - sfo_xchar(nhfp, &d_you->uy0, parent, "uy0", 1); /* (xchar) */ - sfo_d_level(nhfp, &d_you->uz, parent, "uz", 1); /* (d_level) */ - sfo_d_level(nhfp, &d_you->uz0, parent, "uz0", 1); /* (d_level) */ - sfo_d_level(nhfp, &d_you->utolev, parent, "utolev", 1); /* (d_level) */ - sfo_uchar(nhfp, &d_you->utotype, parent, "utotype", 1); /* (uchar) */ - sfo_boolean(nhfp, &d_you->umoved, parent, "umoved", 1); /* (boolean) */ - sfo_int(nhfp, &d_you->last_str_turn, parent, "last_str_turn", 1);/* (int) */ - sfo_int(nhfp, &d_you->ulevel, parent, "ulevel", 1); /* (int) */ - sfo_int(nhfp, &d_you->ulevelmax, parent, "ulevelmax", 1); /* (int) */ - sfo_unsigned(nhfp, &d_you->utrap, parent, "utrap", 1); /* (unsigned) */ - sfo_unsigned(nhfp, &d_you->utraptype, parent, "utraptype", 1);/* (unsigned) */ - sfo_char(nhfp, d_you->urooms, parent, "urooms", 5); /* (char) */ - sfo_char(nhfp, d_you->urooms0, parent, "urooms0", 5); /* (char) */ - sfo_char(nhfp, d_you->uentered, parent, "uentered", 5); /* (char) */ - sfo_char(nhfp, d_you->ushops, parent, "ushops", 5); /* (char) */ - sfo_char(nhfp, d_you->ushops0, parent, "ushops0", 5); /* (char) */ - sfo_char(nhfp, d_you->ushops_entered, parent, "ushops_entered", 5);/* (char) */ - sfo_char(nhfp, d_you->ushops_left, parent, "ushops_left", 5);/* (char) */ - sfo_int(nhfp, &d_you->uhunger, parent, "uhunger", 1); /* (int) */ - sfo_unsigned(nhfp, &d_you->uhs, parent, "uhs", 1); /* (unsigned) */ - sfo_prop(nhfp, d_you->uprops, parent, "uprops", LAST_PROP + 1);/* (prop) */ - sfo_unsigned(nhfp, &d_you->umconf, parent, "umconf", 1); /* (unsigned) */ - bitfield = d_you->usick_type; /* (Bitfield(usick_type, 2)) */ - sfo_bitfield(nhfp, &bitfield, parent, "usick_type", 2); - sfo_int(nhfp, &d_you->nv_range, parent, "nv_range", 1); /* (int) */ - sfo_int(nhfp, &d_you->xray_range, parent, "xray_range", 1); /* (int) */ - sfo_int(nhfp, &d_you->bglyph, parent, "bglyph", 1); /* (int) */ - sfo_int(nhfp, &d_you->cglyph, parent, "cglyph", 1); /* (int) */ - sfo_int(nhfp, &d_you->bc_order, parent, "bc_order", 1); /* (int) */ - sfo_int(nhfp, &d_you->bc_felt, parent, "bc_felt", 1); /* (int) */ - sfo_int(nhfp, &d_you->umonster, parent, "umonster", 1); /* (int) */ - sfo_int(nhfp, &d_you->umonnum, parent, "umonnum", 1); /* (int) */ - sfo_int(nhfp, &d_you->mh, parent, "mh", 1); /* (int) */ - sfo_int(nhfp, &d_you->mhmax, parent, "mhmax", 1); /* (int) */ - sfo_int(nhfp, &d_you->mtimedone, parent, "mtimedone", 1); /* (int) */ - sfo_attribs(nhfp, &d_you->macurr, parent, "macurr", 1); /* (attribs) */ - sfo_attribs(nhfp, &d_you->mamax, parent, "mamax", 1); /* (attribs) */ - sfo_int(nhfp, &d_you->ulycn, parent, "ulycn", 1); /* (int) */ - sfo_unsigned(nhfp, &d_you->ucreamed, parent, "ucreamed", 1); /* (unsigned) */ - sfo_unsigned(nhfp, &d_you->uswldtim, parent, "uswldtim", 1); /* (unsigned) */ - bitfield = d_you->uswallow; /* (Bitfield(uswallow, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "uswallow", 1); - bitfield = d_you->uinwater; /* (Bitfield(uinwater, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "uinwater", 1); - bitfield = d_you->uundetected; /* (Bitfield(uundetected, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "uundetected", 1); - bitfield = d_you->mfemale; /* (Bitfield(mfemale, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "mfemale", 1); - bitfield = d_you->uinvulnerable; /* (Bitfield(uinvulnerable, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "uinvulnerable", 1); - bitfield = d_you->uburied; /* (Bitfield(uburied, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "uburied", 1); - bitfield = d_you->uedibility; /* (Bitfield(uedibility, 1)) */ - sfo_bitfield(nhfp, &bitfield, parent, "uedibility", 1); - sfo_unsigned(nhfp, &d_you->udg_cnt, parent, "udg_cnt", 1); /* (unsigned) */ - sfo_u_achieve(nhfp, &d_you->uachieve, parent, "uachieve", 1);/* (u_achieve) */ - sfo_u_event(nhfp, &d_you->uevent, parent, "uevent", 1); /* (u_event) */ - sfo_u_have(nhfp, &d_you->uhave, parent, "uhave", 1); /* (u_have) */ - sfo_u_conduct(nhfp, &d_you->uconduct, parent, "uconduct", 1);/* (u_conduct) */ - sfo_u_roleplay(nhfp, &d_you->uroleplay, parent, "uroleplay", 1);/* (u_roleplay) */ - sfo_attribs(nhfp, &d_you->acurr, parent, "acurr", 1); /* (attribs) */ - sfo_attribs(nhfp, &d_you->aexe, parent, "aexe", 1); /* (attribs) */ - sfo_attribs(nhfp, &d_you->abon, parent, "abon", 1); /* (attribs) */ - sfo_attribs(nhfp, &d_you->amax, parent, "amax", 1); /* (attribs) */ - sfo_attribs(nhfp, &d_you->atemp, parent, "atemp", 1); /* (attribs) */ - sfo_attribs(nhfp, &d_you->atime, parent, "atime", 1); /* (attribs) */ - sfo_align(nhfp, &d_you->ualign, parent, "ualign", 1); /* (align) */ - for (i = 0; i < CONVERT; ++i) - sfo_aligntyp(nhfp, &d_you->ualignbase[i], parent, "ualignbase", 1);/* (aligntyp) */ - sfo_schar(nhfp, &d_you->uluck, parent, "uluck", 1); /* (schar) */ - sfo_schar(nhfp, &d_you->moreluck, parent, "moreluck", 1); /* (schar) */ - sfo_schar(nhfp, &d_you->uhitinc, parent, "uhitinc", 1); /* (schar) */ - sfo_schar(nhfp, &d_you->udaminc, parent, "udaminc", 1); /* (schar) */ - sfo_schar(nhfp, &d_you->uac, parent, "uac", 1); /* (schar) */ - sfo_uchar(nhfp, &d_you->uspellprot, parent, "uspellprot", 1);/* (uchar) */ - sfo_uchar(nhfp, &d_you->usptime, parent, "usptime", 1); /* (uchar) */ - sfo_uchar(nhfp, &d_you->uspmtime, parent, "uspmtime", 1); /* (uchar) */ - sfo_int(nhfp, &d_you->uhp, parent, "uhp", 1); /* (int) */ - sfo_int(nhfp, &d_you->uhpmax, parent, "uhpmax", 1); /* (int) */ - sfo_int(nhfp, &d_you->uen, parent, "uen", 1); /* (int) */ - sfo_int(nhfp, &d_you->uenmax, parent, "uenmax", 1); /* (int) */ - sfo_xchar(nhfp, d_you->uhpinc, parent, "uhpinc", MAXULEV); /* (xchar) */ - sfo_xchar(nhfp, d_you->ueninc, parent, "ueninc", MAXULEV); /* (xchar) */ - sfo_int(nhfp, &d_you->ugangr, parent, "ugangr", 1); /* (int) */ - sfo_int(nhfp, &d_you->ugifts, parent, "ugifts", 1); /* (int) */ - sfo_int(nhfp, &d_you->ublessed, parent, "ublessed", 1); /* (int) */ - sfo_int(nhfp, &d_you->ublesscnt, parent, "ublesscnt", 1); /* (int) */ - sfo_long(nhfp, &d_you->umoney0, parent, "umoney0", 1); /* (long) */ - sfo_long(nhfp, &d_you->uspare1, parent, "uspare1", 1); /* (long) */ - sfo_long(nhfp, &d_you->uexp, parent, "uexp", 1); /* (long) */ - sfo_long(nhfp, &d_you->urexp, parent, "urexp", 1); /* (long) */ - sfo_long(nhfp, &d_you->ucleansed, parent, "ucleansed", 1); /* (long) */ - sfo_long(nhfp, &d_you->usleep, parent, "usleep", 1); /* (long) */ - sfo_int(nhfp, &d_you->uinvault, parent, "uinvault", 1); /* (int) */ - sfo_genericptr(nhfp, (genericptr_t) &d_you->ustuck, parent, "ustuck", 1);/* (struct monst *) */ - sfo_genericptr(nhfp, (genericptr_t) &d_you->usteed, parent, "usteed", 1);/* (struct monst *) */ - sfo_long(nhfp, &d_you->ugallop, parent, "ugallop", 1); /* (long) */ - sfo_int(nhfp, &d_you->urideturns, parent, "urideturns", 1); /* (int) */ - sfo_int(nhfp, &d_you->umortality, parent, "umortality", 1); /* (int) */ - sfo_int(nhfp, &d_you->ugrave_arise, parent, "ugrave_arise", 1);/* (int) */ - sfo_int(nhfp, &d_you->weapon_slots, parent, "weapon_slots", 1);/* (int) */ - sfo_int(nhfp, &d_you->skills_advanced, parent, "skills_advanced", 1);/* (int) */ - sfo_xchar(nhfp, d_you->skill_record, parent, "skill_record", P_SKILL_LIMIT);/* (xchar) */ - for (i = 0; i < P_NUM_SKILLS; ++i) - sfo_skills(nhfp, &d_you->weapon_skills[i], parent, "weapon_skills", 1);/* (skills) */ - sfo_boolean(nhfp, &d_you->twoweap, parent, "twoweap", 1); /* (boolean) */ - sfo_short(nhfp, &d_you->mcham, parent, "mcham", 1); /* (short) */ - - if (nhfp->addinfo) - sfo_addinfo(nhfp, myparent, "end", "you", 1); -} - -void -sfi_align(nhfp, d_align, myparent, myname, cnt) -NHFILE *nhfp; -struct align *d_align; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "align"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "align", 1); - - sfi_aligntyp(nhfp, &d_align->type, parent, "type", 1); - sfi_int(nhfp, &d_align->record, parent, "record", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "align", 1); -} - -void -sfi_attribs(nhfp, d_attribs, myparent, myname, cnt) -NHFILE *nhfp; -struct attribs *d_attribs; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "attribs"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "attribs", 1); - - sfi_schar(nhfp, d_attribs->a, parent, "a", A_MAX); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "attribs", 1); -} - -void -sfi_bill_x(nhfp, d_bill_x, myparent, myname, cnt) -NHFILE *nhfp; -struct bill_x *d_bill_x; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "bill_x"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "bill_x", 1); - - sfi_unsigned(nhfp, &d_bill_x->bo_id, parent, "bo_id", 1); - sfi_boolean(nhfp, &d_bill_x->useup, parent, "useup", 1); - sfi_long(nhfp, &d_bill_x->price, parent, "price", 1); - sfi_long(nhfp, &d_bill_x->bquan, parent, "bquan", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "bill_x", 1); -} - -void -sfi_book_info(nhfp, d_book_info, myparent, myname, cnt) -NHFILE *nhfp; -struct book_info *d_book_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "book_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "book_info", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_book_info->book, parent, "book", 1); - sfi_unsigned(nhfp, &d_book_info->o_id, parent, "o_id", 1); - sfi_schar(nhfp, &d_book_info->delay, parent, "delay", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "book_info", 1); -} - -void -sfi_branch(nhfp, d_branch, myparent, myname, cnt) -NHFILE *nhfp; -struct branch *d_branch; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "branch"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "branch", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_branch->next, parent, "next", 1); - sfi_int(nhfp, &d_branch->id, parent, "id", 1); - sfi_int(nhfp, &d_branch->type, parent, "type", 1); - sfi_d_level(nhfp, &d_branch->end1, parent, "end1", 1); - sfi_d_level(nhfp, &d_branch->end2, parent, "end2", 1); - sfi_boolean(nhfp, &d_branch->end1_up, parent, "end1_up", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "branch", 1); -} - -void -sfi_bubble(nhfp, d_bubble, myparent, myname, cnt) -NHFILE *nhfp; -struct bubble *d_bubble; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "bubble"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "bubble", 1); - - sfi_xchar(nhfp, &d_bubble->x, parent, "x", 1); - sfi_xchar(nhfp, &d_bubble->y, parent, "y", 1); - sfi_schar(nhfp, &d_bubble->dx, parent, "dx", 1); - sfi_schar(nhfp, &d_bubble->dy, parent, "dy", 1); - sfi_uchar(nhfp, d_bubble->bm, parent, "bm", MAX_BMASK + 2); - sfi_genericptr(nhfp, (genericptr_t) &d_bubble->prev, parent, "prev", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_bubble->next, parent, "next", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_bubble->cons, parent, "cons", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "bubble", 1); -} - -void -sfi_cemetery(nhfp, d_cemetery, myparent, myname, cnt) -NHFILE *nhfp; -struct cemetery *d_cemetery; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "cemetery"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "cemetery", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_cemetery->next, parent, "next", 1); - sfi_char(nhfp, d_cemetery->who, parent, "who", PL_NSIZ + 4 * (1 + 3) + 1); - sfi_char(nhfp, d_cemetery->how, parent, "how", 100 + 1); - sfi_char(nhfp, d_cemetery->when, parent, "when", 4 + 2 + 2 + 2 + 2 + 2 + 1); - sfi_schar(nhfp, &d_cemetery->frpx, parent, "frpx", 1); - sfi_schar(nhfp, &d_cemetery->frpy, parent, "frpy", 1); - sfi_boolean(nhfp, &d_cemetery->bonesknown, parent, "bonesknown", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "cemetery", 1); -} - -void -sfi_context_info(nhfp, d_context_info, myparent, myname, cnt) -NHFILE *nhfp; -struct context_info *d_context_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "context_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "context_info", 1); - - sfi_unsigned(nhfp, &d_context_info->ident, parent, "ident", 1); - sfi_unsigned(nhfp, &d_context_info->no_of_wizards, parent, "no_of_wizards", 1); - sfi_unsigned(nhfp, &d_context_info->run, parent, "run", 1); - sfi_unsigned(nhfp, &d_context_info->startingpet_mid, parent, "startingpet_mid", 1); - sfi_int(nhfp, &d_context_info->current_fruit, parent, "current_fruit", 1); - sfi_int(nhfp, &d_context_info->warnlevel, parent, "warnlevel", 1); - sfi_int(nhfp, &d_context_info->rndencode, parent, "rndencode", 1); - sfi_int(nhfp, &d_context_info->mysteryforce, parent, "mysteryforce", 1); - sfi_long(nhfp, &d_context_info->next_attrib_check, parent, "next_attrib_check", 1); - sfi_long(nhfp, &d_context_info->stethoscope_move, parent, "stethoscope_move", 1); - sfi_short(nhfp, &d_context_info->stethoscope_movement, parent, "stethoscope_movement", 1); - sfi_boolean(nhfp, &d_context_info->travel, parent, "travel", 1); - sfi_boolean(nhfp, &d_context_info->travel1, parent, "travel1", 1); - sfi_boolean(nhfp, &d_context_info->forcefight, parent, "forcefight", 1); - sfi_boolean(nhfp, &d_context_info->nopick, parent, "nopick", 1); - sfi_boolean(nhfp, &d_context_info->made_amulet, parent, "made_amulet", 1); - sfi_boolean(nhfp, &d_context_info->mon_moving, parent, "mon_moving", 1); - sfi_boolean(nhfp, &d_context_info->move, parent, "move", 1); - sfi_boolean(nhfp, &d_context_info->mv, parent, "mv", 1); - sfi_boolean(nhfp, &d_context_info->bypasses, parent, "bypasses", 1); - sfi_boolean(nhfp, &d_context_info->botl, parent, "botl", 1); - sfi_boolean(nhfp, &d_context_info->botlx, parent, "botlx", 1); - sfi_boolean(nhfp, &d_context_info->door_opened, parent, "door_opened", 1); - sfi_dig_info(nhfp, &d_context_info->digging, parent, "digging", 1); - sfi_victual_info(nhfp, &d_context_info->victual, parent, "victual", 1); - sfi_tin_info(nhfp, &d_context_info->tin, parent, "tin", 1); - sfi_book_info(nhfp, &d_context_info->spbook, parent, "spbook", 1); - sfi_takeoff_info(nhfp, &d_context_info->takeoff, parent, "takeoff", 1); - sfi_warntype_info(nhfp, &d_context_info->warntype, parent, "warntype", 1); - sfi_polearm_info(nhfp, &d_context_info->polearm, parent, "polearm", 1); - sfi_obj_split(nhfp, &d_context_info->objsplit, parent, "objsplit", 1); - sfi_tribute_info(nhfp, &d_context_info->tribute, parent, "tribute", 1); - sfi_novel_tracking(nhfp, &d_context_info->novel, parent, "novel", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "context_info", 1); -} - -void -sfi_d_flags(nhfp, d_d_flags, myparent, myname, cnt) -NHFILE *nhfp; -struct d_flags *d_d_flags; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "d_flags"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "d_flags", 1); - - bitfield = d_d_flags->town; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "town", 1); - d_d_flags->town = bitfield; - - bitfield = d_d_flags->hellish; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "hellish", 1); - d_d_flags->hellish = bitfield; - - bitfield = d_d_flags->maze_like; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "maze_like", 1); - d_d_flags->maze_like = bitfield; - - bitfield = d_d_flags->rogue_like; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "rogue_like", 1); - d_d_flags->rogue_like = bitfield; - - bitfield = d_d_flags->align; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "align", 3); - d_d_flags->align = bitfield; - - bitfield = d_d_flags->unused; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "unused", 1); - d_d_flags->unused = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "d_flags", 1); -} - -void -sfi_d_level(nhfp, d_d_level, myparent, myname, cnt) -NHFILE *nhfp; -struct d_level *d_d_level; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "d_level"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "d_level", 1); - - sfi_xchar(nhfp, &d_d_level->dnum, parent, "dnum", 1); - sfi_xchar(nhfp, &d_d_level->dlevel, parent, "dlevel", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "d_level", 1); -} - -void -sfi_damage(nhfp, d_damage, myparent, myname, cnt) -NHFILE *nhfp; -struct damage *d_damage; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "damage"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "damage", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_damage->next, parent, "next", 1); - sfi_long(nhfp, &d_damage->when, parent, "when", 1); - sfi_long(nhfp, &d_damage->cost, parent, "cost", 1); - sfi_nhcoord(nhfp, &d_damage->place, parent, "place", 1); - sfi_schar(nhfp, &d_damage->typ, parent, "typ", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "damage", 1); -} - -void -sfi_dest_area(nhfp, d_dest_area, myparent, myname, cnt) -NHFILE *nhfp; -struct dest_area *d_dest_area; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "dest_area"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "dest_area", 1); - - sfi_xchar(nhfp, &d_dest_area->lx, parent, "lx", 1); - sfi_xchar(nhfp, &d_dest_area->ly, parent, "ly", 1); - sfi_xchar(nhfp, &d_dest_area->hx, parent, "hx", 1); - sfi_xchar(nhfp, &d_dest_area->hy, parent, "hy", 1); - sfi_xchar(nhfp, &d_dest_area->nlx, parent, "nlx", 1); - sfi_xchar(nhfp, &d_dest_area->nly, parent, "nly", 1); - sfi_xchar(nhfp, &d_dest_area->nhx, parent, "nhx", 1); - sfi_xchar(nhfp, &d_dest_area->nhy, parent, "nhy", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "dest_area", 1); -} - -void -sfi_dgn_topology(nhfp, d_dgn_topology, myparent, myname, cnt) -NHFILE *nhfp; -struct dgn_topology *d_dgn_topology; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "dgn_topology"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "dgn_topology", 1); - - sfi_d_level(nhfp, &d_dgn_topology->d_oracle_level, parent, "d_oracle_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_bigroom_level, parent, "d_bigroom_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_rogue_level, parent, "d_rogue_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_medusa_level, parent, "d_medusa_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_stronghold_level, parent, "d_stronghold_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_valley_level, parent, "d_valley_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_wiz1_level, parent, "d_wiz1_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_wiz2_level, parent, "d_wiz2_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_wiz3_level, parent, "d_wiz3_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_juiblex_level, parent, "d_juiblex_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_orcus_level, parent, "d_orcus_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_baalzebub_level, parent, "d_baalzebub_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_asmodeus_level, parent, "d_asmodeus_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_portal_level, parent, "d_portal_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_sanctum_level, parent, "d_sanctum_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_earth_level, parent, "d_earth_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_water_level, parent, "d_water_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_fire_level, parent, "d_fire_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_air_level, parent, "d_air_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_astral_level, parent, "d_astral_level", 1); - sfi_xchar(nhfp, &d_dgn_topology->d_tower_dnum, parent, "d_tower_dnum", 1); - sfi_xchar(nhfp, &d_dgn_topology->d_sokoban_dnum, parent, "d_sokoban_dnum", 1); - sfi_xchar(nhfp, &d_dgn_topology->d_mines_dnum, parent, "d_mines_dnum", 1); - sfi_xchar(nhfp, &d_dgn_topology->d_quest_dnum, parent, "d_quest_dnum", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_qstart_level, parent, "d_qstart_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_qlocate_level, parent, "d_qlocate_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_nemesis_level, parent, "d_nemesis_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_knox_level, parent, "d_knox_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_mineend_level, parent, "d_mineend_level", 1); - sfi_d_level(nhfp, &d_dgn_topology->d_sokoend_level, parent, "d_sokoend_level", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "dgn_topology", 1); -} - -void -sfi_dig_info(nhfp, d_dig_info, myparent, myname, cnt) -NHFILE *nhfp; -struct dig_info *d_dig_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "dig_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "dig_info", 1); - - sfi_int(nhfp, &d_dig_info->effort, parent, "effort", 1); - sfi_d_level(nhfp, &d_dig_info->level, parent, "level", 1); - sfi_nhcoord(nhfp, &d_dig_info->pos, parent, "pos", 1); - sfi_long(nhfp, &d_dig_info->lastdigtime, parent, "lastdigtime", 1); - sfi_boolean(nhfp, &d_dig_info->down, parent, "down", 1); - sfi_boolean(nhfp, &d_dig_info->chew, parent, "chew", 1); - sfi_boolean(nhfp, &d_dig_info->warned, parent, "warned", 1); - sfi_boolean(nhfp, &d_dig_info->quiet, parent, "quiet", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "dig_info", 1); -} - -void -sfi_dungeon(nhfp, d_dungeon, myparent, myname, cnt) -NHFILE *nhfp; -struct dungeon *d_dungeon; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "dungeon"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "dungeon", 1); - - sfi_char(nhfp, d_dungeon->dname, parent, "dname", 24); - sfi_char(nhfp, d_dungeon->proto, parent, "proto", 15); - sfi_char(nhfp, &d_dungeon->boneid, parent, "boneid", 1); - sfi_d_flags(nhfp, &d_dungeon->flags, parent, "flags", 1); - sfi_xchar(nhfp, &d_dungeon->entry_lev, parent, "entry_lev", 1); - sfi_xchar(nhfp, &d_dungeon->num_dunlevs, parent, "num_dunlevs", 1); - sfi_xchar(nhfp, &d_dungeon->dunlev_ureached, parent, "dunlev_ureached", 1); - sfi_int(nhfp, &d_dungeon->ledger_start, parent, "ledger_start", 1); - sfi_int(nhfp, &d_dungeon->depth_start, parent, "depth_start", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "dungeon", 1); -} - -void -sfi_edog(nhfp, d_edog, myparent, myname, cnt) -NHFILE *nhfp; -struct edog *d_edog; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "edog"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "edog", 1); - - sfi_long(nhfp, &d_edog->droptime, parent, "droptime", 1); - sfi_unsigned(nhfp, &d_edog->dropdist, parent, "dropdist", 1); - sfi_int(nhfp, &d_edog->apport, parent, "apport", 1); - sfi_long(nhfp, &d_edog->whistletime, parent, "whistletime", 1); - sfi_long(nhfp, &d_edog->hungrytime, parent, "hungrytime", 1); - sfi_nhcoord(nhfp, &d_edog->ogoal, parent, "ogoal", 1); - sfi_int(nhfp, &d_edog->abuse, parent, "abuse", 1); - sfi_int(nhfp, &d_edog->revivals, parent, "revivals", 1); - sfi_int(nhfp, &d_edog->mhpmax_penalty, parent, "mhpmax_penalty", 1); - bitfield = d_edog->killed_by_u; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "killed_by_u", 1); - d_edog->killed_by_u = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "edog", 1); -} - -void -sfi_egd(nhfp, d_egd, myparent, myname, cnt) -NHFILE *nhfp; -struct egd *d_egd; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "egd"; - int i; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "egd", 1); - - sfi_int(nhfp, &d_egd->fcbeg, parent, "fcbeg", 1); - sfi_int(nhfp, &d_egd->fcend, parent, "fcend", 1); - sfi_int(nhfp, &d_egd->vroom, parent, "vroom", 1); - sfi_xchar(nhfp, &d_egd->gdx, parent, "gdx", 1); - sfi_xchar(nhfp, &d_egd->gdy, parent, "gdy", 1); - sfi_xchar(nhfp, &d_egd->ogx, parent, "ogx", 1); - sfi_xchar(nhfp, &d_egd->ogy, parent, "ogy", 1); - sfi_d_level(nhfp, &d_egd->gdlevel, parent, "gdlevel", 1); - sfi_xchar(nhfp, &d_egd->warncnt, parent, "warncnt", 1); - bitfield = d_egd->gddone; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "gddone", 1); - d_egd->gddone = bitfield; - - bitfield = d_egd->witness; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "witness", 2); - d_egd->witness = bitfield; - - bitfield = d_egd->unused; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "unused", 5); - d_egd->unused = bitfield; - - for (i = 0; i < FCSIZ; ++i) - sfi_fakecorridor(nhfp, &d_egd->fakecorr[i], parent, "fakecorr", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "egd", 1); -} - -void -sfi_emin(nhfp, d_emin, myparent, myname, cnt) -NHFILE *nhfp; -struct emin *d_emin; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "emin"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "emin", 1); - - sfi_aligntyp(nhfp, &d_emin->min_align, parent, "min_align", 1); - sfi_boolean(nhfp, &d_emin->renegade, parent, "renegade", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "emin", 1); -} - -void -sfi_engr(nhfp, d_engr, myparent, myname, cnt) -NHFILE *nhfp; -struct engr *d_engr; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "engr"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "engr", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_engr->nxt_engr, parent, "nxt_engr", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_engr->engr_txt, parent, "engr_txt", 1); - sfi_xchar(nhfp, &d_engr->engr_x, parent, "engr_x", 1); - sfi_xchar(nhfp, &d_engr->engr_y, parent, "engr_y", 1); - sfi_unsigned(nhfp, &d_engr->engr_lth, parent, "engr_lth", 1); - sfi_long(nhfp, &d_engr->engr_time, parent, "engr_time", 1); - sfi_xchar(nhfp, &d_engr->engr_type, parent, "engr_type", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "engr", 1); -} - -void -sfi_epri(nhfp, d_epri, myparent, myname, cnt) -NHFILE *nhfp; -struct epri *d_epri; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "epri"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "epri", 1); - - sfi_aligntyp(nhfp, &d_epri->shralign, parent, "shralign", 1); - sfi_schar(nhfp, &d_epri->shroom, parent, "shroom", 1); - sfi_nhcoord(nhfp, &d_epri->shrpos, parent, "shrpos", 1); - sfi_d_level(nhfp, &d_epri->shrlevel, parent, "shrlevel", 1); - sfi_long(nhfp, &d_epri->intone_time, parent, "intone_time", 1); - sfi_long(nhfp, &d_epri->enter_time, parent, "enter_time", 1); - sfi_long(nhfp, &d_epri->hostile_time, parent, "hostile_time", 1); - sfi_long(nhfp, &d_epri->peaceful_time, parent, "peaceful_time", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "epri", 1); -} - -void -sfi_eshk(nhfp, d_eshk, myparent, myname, cnt) -NHFILE *nhfp; -struct eshk *d_eshk; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "eshk"; - int i; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "eshk", 1); - - sfi_long(nhfp, &d_eshk->robbed, parent, "robbed", 1); - sfi_long(nhfp, &d_eshk->credit, parent, "credit", 1); - sfi_long(nhfp, &d_eshk->debit, parent, "debit", 1); - sfi_long(nhfp, &d_eshk->loan, parent, "loan", 1); - sfi_int(nhfp, &d_eshk->shoptype, parent, "shoptype", 1); - sfi_schar(nhfp, &d_eshk->shoproom, parent, "shoproom", 1); - sfi_schar(nhfp, &d_eshk->unused, parent, "unused", 1); - sfi_boolean(nhfp, &d_eshk->following, parent, "following", 1); - sfi_boolean(nhfp, &d_eshk->surcharge, parent, "surcharge", 1); - sfi_boolean(nhfp, &d_eshk->dismiss_kops, parent, "dismiss_kops", 1); - sfi_nhcoord(nhfp, &d_eshk->shk, parent, "shk", 1); - sfi_nhcoord(nhfp, &d_eshk->shd, parent, "shd", 1); - sfi_d_level(nhfp, &d_eshk->shoplevel, parent, "shoplevel", 1); - sfi_int(nhfp, &d_eshk->billct, parent, "billct", 1); - for (i = 0; i < BILLSZ; ++i) - sfi_bill_x(nhfp, &d_eshk->bill[i], parent, "bill", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_eshk->bill_p, parent, "bill_p", 1); - sfi_int(nhfp, &d_eshk->visitct, parent, "visitct", 1); - sfi_char(nhfp, d_eshk->customer, parent, "customer", PL_NSIZ); - sfi_char(nhfp, d_eshk->shknam, parent, "shknam", PL_NSIZ); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "eshk", 1); -} - -void -sfi_fakecorridor(nhfp, d_fakecorridor, myparent, myname, cnt) -NHFILE *nhfp; -struct fakecorridor *d_fakecorridor; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "fakecorridor"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "fakecorridor", 1); - - sfi_xchar(nhfp, &d_fakecorridor->fx, parent, "fx", 1); - sfi_xchar(nhfp, &d_fakecorridor->fy, parent, "fy", 1); - sfi_xchar(nhfp, &d_fakecorridor->ftyp, parent, "ftyp", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "fakecorridor", 1); -} - -void -sfi_fe(nhfp, d_fe, myparent, myname, cnt) -NHFILE *nhfp; -struct fe *d_fe; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "fe"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "fe", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_fe->next, parent, "next", 1); - sfi_long(nhfp, &d_fe->timeout, parent, "timeout", 1); - sfi_ulong(nhfp, &d_fe->tid, parent, "tid", 1); - sfi_short(nhfp, &d_fe->kind, parent, "kind", 1); - sfi_short(nhfp, &d_fe->func_index, parent, "func_index", 1); - sfi_any(nhfp, &d_fe->arg, parent, "arg", 1); - bitfield = d_fe->needs_fixup; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "needs_fixup", 1); - d_fe->needs_fixup = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "fe", 1); -} - -void -sfi_flag(nhfp, d_flag, myparent, myname, cnt) -NHFILE *nhfp; -struct flag *d_flag; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "flag"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "flag", 1); - - sfi_boolean(nhfp, &d_flag->acoustics, parent, "acoustics", 1); - sfi_boolean(nhfp, &d_flag->autodig, parent, "autodig", 1); - sfi_boolean(nhfp, &d_flag->autoquiver, parent, "autoquiver", 1); - sfi_boolean(nhfp, &d_flag->autoopen, parent, "autoopen", 1); - sfi_boolean(nhfp, &d_flag->beginner, parent, "beginner", 1); - sfi_boolean(nhfp, &d_flag->biff, parent, "biff", 1); - sfi_boolean(nhfp, &d_flag->bones, parent, "bones", 1); - sfi_boolean(nhfp, &d_flag->confirm, parent, "confirm", 1); - sfi_boolean(nhfp, &d_flag->dark_room, parent, "dark_room", 1); - sfi_boolean(nhfp, &d_flag->debug, parent, "debug", 1); - sfi_boolean(nhfp, &d_flag->end_own, parent, "end_own", 1); - sfi_boolean(nhfp, &d_flag->explore, parent, "explore", 1); - sfi_boolean(nhfp, &d_flag->female, parent, "female", 1); - sfi_boolean(nhfp, &d_flag->friday13, parent, "friday13", 1); - sfi_boolean(nhfp, &d_flag->goldX, parent, "goldX", 1); - sfi_boolean(nhfp, &d_flag->help, parent, "help", 1); - sfi_boolean(nhfp, &d_flag->ignintr, parent, "ignintr", 1); - sfi_boolean(nhfp, &d_flag->ins_chkpt, parent, "ins_chkpt", 1); - sfi_boolean(nhfp, &d_flag->invlet_constant, parent, "invlet_constant", 1); - sfi_boolean(nhfp, &d_flag->legacy, parent, "legacy", 1); - sfi_boolean(nhfp, &d_flag->lit_corridor, parent, "lit_corridor", 1); - sfi_boolean(nhfp, &d_flag->nap, parent, "nap", 1); - sfi_boolean(nhfp, &d_flag->null, parent, "null", 1); - sfi_boolean(nhfp, &d_flag->pickup, parent, "pickup", 1); - sfi_boolean(nhfp, &d_flag->pickup_thrown, parent, "pickup_thrown", 1); - sfi_boolean(nhfp, &d_flag->pushweapon, parent, "pushweapon", 1); - sfi_boolean(nhfp, &d_flag->rest_on_space, parent, "rest_on_space", 1); - sfi_boolean(nhfp, &d_flag->safe_dog, parent, "safe_dog", 1); - sfi_boolean(nhfp, &d_flag->showexp, parent, "showexp", 1); - sfi_boolean(nhfp, &d_flag->showscore, parent, "showscore", 1); - sfi_boolean(nhfp, &d_flag->silent, parent, "silent", 1); - sfi_boolean(nhfp, &d_flag->sortpack, parent, "sortpack", 1); - sfi_boolean(nhfp, &d_flag->sparkle, parent, "sparkle", 1); - sfi_boolean(nhfp, &d_flag->standout, parent, "standout", 1); - sfi_boolean(nhfp, &d_flag->time, parent, "time", 1); - sfi_boolean(nhfp, &d_flag->tombstone, parent, "tombstone", 1); - sfi_boolean(nhfp, &d_flag->verbose, parent, "verbose", 1); - sfi_int(nhfp, &d_flag->end_top, parent, "end_top", 1); - sfi_int(nhfp, &d_flag->end_around, parent, "end_around", 1); - sfi_unsigned(nhfp, &d_flag->moonphase, parent, "moonphase", 1); - sfi_ulong(nhfp, &d_flag->suppress_alert, parent, "suppress_alert", 1); - sfi_unsigned(nhfp, &d_flag->paranoia_bits, parent, "paranoia_bits", 1); - sfi_int(nhfp, &d_flag->pickup_burden, parent, "pickup_burden", 1); - sfi_int(nhfp, &d_flag->pile_limit, parent, "pile_limit", 1); - sfi_char(nhfp, &d_flag->sortloot, parent, "sortloot", 1); - sfi_char(nhfp, d_flag->inv_order, parent, "inv_order", MAXOCLASSES); - sfi_char(nhfp, d_flag->pickup_types, parent, "pickup_types", MAXOCLASSES); - sfi_char(nhfp, d_flag->end_disclose, parent, "end_disclose", NUM_DISCLOSURE_OPTIONS + 1); - sfi_char(nhfp, &d_flag->menu_style, parent, "menu_style", 1); - sfi_boolean(nhfp, &d_flag->made_fruit, parent, "made_fruit", 1); - sfi_int(nhfp, &d_flag->initrole, parent, "initrole", 1); - sfi_int(nhfp, &d_flag->initrace, parent, "initrace", 1); - sfi_int(nhfp, &d_flag->initgend, parent, "initgend", 1); - sfi_int(nhfp, &d_flag->initalign, parent, "initalign", 1); - sfi_int(nhfp, &d_flag->randomall, parent, "randomall", 1); - sfi_int(nhfp, &d_flag->pantheon, parent, "pantheon", 1); - sfi_boolean(nhfp, &d_flag->lootabc, parent, "lootabc", 1); - sfi_boolean(nhfp, &d_flag->showrace, parent, "showrace", 1); - sfi_boolean(nhfp, &d_flag->travelcmd, parent, "travelcmd", 1); - sfi_int(nhfp, &d_flag->runmode, parent, "runmode", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "flag", 1); -} - -void -sfi_fruit(nhfp, d_fruit, myparent, myname, cnt) -NHFILE *nhfp; -struct fruit *d_fruit; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "fruit"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "fruit", 1); - - sfi_char(nhfp, d_fruit->fname, parent, "fname", PL_FSIZ); - sfi_int(nhfp, &d_fruit->fid, parent, "fid", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_fruit->nextf, parent, "nextf", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "fruit", 1); -} - -void -sfi_kinfo(nhfp, d_kinfo, myparent, myname, cnt) -NHFILE *nhfp; -struct kinfo *d_kinfo; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "kinfo"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "kinfo", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_kinfo->next, parent, "next", 1); - sfi_int(nhfp, &d_kinfo->id, parent, "id", 1); - sfi_int(nhfp, &d_kinfo->format, parent, "format", 1); - sfi_char(nhfp, d_kinfo->name, parent, "name", BUFSZ); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "kinfo", 1); -} - -void -sfi_levelflags(nhfp, d_levelflags, myparent, myname, cnt) -NHFILE *nhfp; -struct levelflags *d_levelflags; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "levelflags"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "levelflags", 1); - - sfi_uchar(nhfp, &d_levelflags->nfountains, parent, "nfountains", 1); - sfi_uchar(nhfp, &d_levelflags->nsinks, parent, "nsinks", 1); - bitfield = d_levelflags->has_shop; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "has_shop", 1); - d_levelflags->has_shop = bitfield; - - bitfield = d_levelflags->has_vault; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "has_vault", 1); - d_levelflags->has_vault = bitfield; - - bitfield = d_levelflags->has_zoo; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "has_zoo", 1); - d_levelflags->has_zoo = bitfield; - - bitfield = d_levelflags->has_court; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "has_court", 1); - d_levelflags->has_court = bitfield; - - bitfield = d_levelflags->has_morgue; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "has_morgue", 1); - d_levelflags->has_morgue = bitfield; - - bitfield = d_levelflags->has_beehive; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "has_beehive", 1); - d_levelflags->has_beehive = bitfield; - - bitfield = d_levelflags->has_barracks; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "has_barracks", 1); - d_levelflags->has_barracks = bitfield; - - bitfield = d_levelflags->has_temple; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "has_temple", 1); - d_levelflags->has_temple = bitfield; - - bitfield = d_levelflags->has_swamp; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "has_swamp", 1); - d_levelflags->has_swamp = bitfield; - - bitfield = d_levelflags->noteleport; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "noteleport", 1); - d_levelflags->noteleport = bitfield; - - bitfield = d_levelflags->hardfloor; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "hardfloor", 1); - d_levelflags->hardfloor = bitfield; - - bitfield = d_levelflags->nommap; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "nommap", 1); - d_levelflags->nommap = bitfield; - - bitfield = d_levelflags->hero_memory; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "hero_memory", 1); - d_levelflags->hero_memory = bitfield; - - bitfield = d_levelflags->shortsighted; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "shortsighted", 1); - d_levelflags->shortsighted = bitfield; - - bitfield = d_levelflags->graveyard; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "graveyard", 1); - d_levelflags->graveyard = bitfield; - - bitfield = d_levelflags->sokoban_rules; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "sokoban_rules", 1); - d_levelflags->sokoban_rules = bitfield; - - bitfield = d_levelflags->is_maze_lev; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "is_maze_lev", 1); - d_levelflags->is_maze_lev = bitfield; - - bitfield = d_levelflags->is_cavernous_lev; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "is_cavernous_lev", 1); - d_levelflags->is_cavernous_lev = bitfield; - - bitfield = d_levelflags->arboreal; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "arboreal", 1); - d_levelflags->arboreal = bitfield; - - bitfield = d_levelflags->wizard_bones; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "wizard_bones", 1); - d_levelflags->wizard_bones = bitfield; - - bitfield = d_levelflags->corrmaze; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "corrmaze", 1); - d_levelflags->corrmaze = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "levelflags", 1); -} - -void -sfi_linfo(nhfp, d_linfo, myparent, myname, cnt) -NHFILE *nhfp; -struct linfo *d_linfo; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "linfo"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "linfo", 1); - - sfi_uchar(nhfp, &d_linfo->flags, parent, "flags", 1); -#ifdef MFLOPPY - sfi_int(nhfp, &d_linfo->where, parent, "where", 1); - sfi_long(nhfp, &d_linfo->time, parent, "time", 1); - sfi_long(nhfp, &d_linfo->size, parent, "size", 1); -#endif /*MFLOPPY*/ - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "linfo", 1); -} - -void -sfi_ls_t(nhfp, d_ls_t, myparent, myname, cnt) -NHFILE *nhfp; -struct ls_t *d_ls_t; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "ls_t"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "ls_t", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_ls_t->next, parent, "next", 1); - sfi_xchar(nhfp, &d_ls_t->x, parent, "x", 1); - sfi_xchar(nhfp, &d_ls_t->y, parent, "y", 1); - sfi_short(nhfp, &d_ls_t->range, parent, "range", 1); - sfi_short(nhfp, &d_ls_t->flags, parent, "flags", 1); - sfi_short(nhfp, &d_ls_t->type, parent, "type", 1); - sfi_any(nhfp, &d_ls_t->id, parent, "id", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "ls_t", 1); -} - -void -sfi_mapseen_feat(nhfp, d_mapseen_feat, myparent, myname, cnt) -NHFILE *nhfp; -struct mapseen_feat *d_mapseen_feat; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mapseen_feat"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "mapseen_feat", 1); - - bitfield = d_mapseen_feat->nfount; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "nfount", 2); - d_mapseen_feat->nfount = bitfield; - - bitfield = d_mapseen_feat->nsink; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "nsink", 2); - d_mapseen_feat->nsink = bitfield; - - bitfield = d_mapseen_feat->naltar; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "naltar", 2); - d_mapseen_feat->naltar = bitfield; - - bitfield = d_mapseen_feat->nthrone; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "nthrone", 2); - d_mapseen_feat->nthrone = bitfield; - - bitfield = d_mapseen_feat->ngrave; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "ngrave", 2); - d_mapseen_feat->ngrave = bitfield; - - bitfield = d_mapseen_feat->ntree; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "ntree", 2); - d_mapseen_feat->ntree = bitfield; - - bitfield = d_mapseen_feat->water; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "water", 2); - d_mapseen_feat->water = bitfield; - - bitfield = d_mapseen_feat->lava; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "lava", 2); - d_mapseen_feat->lava = bitfield; - - bitfield = d_mapseen_feat->ice; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "ice", 2); - d_mapseen_feat->ice = bitfield; - - bitfield = d_mapseen_feat->nshop; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "nshop", 2); - d_mapseen_feat->nshop = bitfield; - - bitfield = d_mapseen_feat->ntemple; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "ntemple", 2); - d_mapseen_feat->ntemple = bitfield; - - bitfield = d_mapseen_feat->msalign; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "msalign", 2); - d_mapseen_feat->msalign = bitfield; - - bitfield = d_mapseen_feat->shoptype; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "shoptype", 5); - d_mapseen_feat->shoptype = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "mapseen_feat", 1); -} - -void -sfi_mapseen_flags(nhfp, d_mapseen_flags, myparent, myname, cnt) -NHFILE *nhfp; -struct mapseen_flags *d_mapseen_flags; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mapseen_flags"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "mapseen_flags", 1); - - bitfield = d_mapseen_flags->unreachable; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "unreachable", 1); - d_mapseen_flags->unreachable = bitfield; - - bitfield = d_mapseen_flags->forgot; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "forgot", 1); - d_mapseen_flags->forgot = bitfield; - - bitfield = d_mapseen_flags->knownbones; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "knownbones", 1); - d_mapseen_flags->knownbones = bitfield; - - bitfield = d_mapseen_flags->oracle; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oracle", 1); - d_mapseen_flags->oracle = bitfield; - - bitfield = d_mapseen_flags->sokosolved; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "sokosolved", 1); - d_mapseen_flags->sokosolved = bitfield; - - bitfield = d_mapseen_flags->bigroom; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "bigroom", 1); - d_mapseen_flags->bigroom = bitfield; - - bitfield = d_mapseen_flags->castle; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "castle", 1); - d_mapseen_flags->castle = bitfield; - - bitfield = d_mapseen_flags->castletune; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "castletune", 1); - d_mapseen_flags->castletune = bitfield; - - bitfield = d_mapseen_flags->valley; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "valley", 1); - d_mapseen_flags->valley = bitfield; - - bitfield = d_mapseen_flags->msanctum; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "msanctum", 1); - d_mapseen_flags->msanctum = bitfield; - - bitfield = d_mapseen_flags->ludios; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "ludios", 1); - d_mapseen_flags->ludios = bitfield; - - bitfield = d_mapseen_flags->roguelevel; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "roguelevel", 1); - d_mapseen_flags->roguelevel = bitfield; - - bitfield = d_mapseen_flags->quest_summons; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "quest_summons", 1); - d_mapseen_flags->quest_summons = bitfield; - - bitfield = d_mapseen_flags->questing; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "questing", 1); - d_mapseen_flags->questing = bitfield; - - bitfield = d_mapseen_flags->vibrating_square; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "vibrating_square", 1); - d_mapseen_flags->vibrating_square = bitfield; - - bitfield = d_mapseen_flags->spare1; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "spare1", 1); - d_mapseen_flags->spare1 = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "mapseen_flags", 1); -} - -void -sfi_mapseen_rooms(nhfp, d_mapseen_rooms, myparent, myname, cnt) -NHFILE *nhfp; -struct mapseen_rooms *d_mapseen_rooms; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mapseen_rooms"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "mapseen_rooms", 1); - - bitfield = d_mapseen_rooms->seen; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "seen", 1); - d_mapseen_rooms->seen = bitfield; - - bitfield = d_mapseen_rooms->untended; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "untended", 1); - d_mapseen_rooms->untended = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "mapseen_rooms", 1); -} - -void -sfi_mapseen(nhfp, d_mapseen, myparent, myname, cnt) -NHFILE *nhfp; -struct mapseen *d_mapseen; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mapseen"; - int i; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "mapseen", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_mapseen->next, parent, "next", 1); - sfi_branch(nhfp, d_mapseen->br, parent, "br", 1); - sfi_d_level(nhfp, &d_mapseen->lev, parent, "lev", 1); - sfi_mapseen_feat(nhfp, &d_mapseen->feat, parent, "feat", 1); - sfi_mapseen_flags(nhfp, &d_mapseen->flags, parent, "flags", 1); - sfi_char(nhfp, d_mapseen->custom, parent, "custom", 1); - sfi_unsigned(nhfp, &d_mapseen->custom_lth, parent, "custom_lth", 1); - for (i = 0; i < (MAXNROFROOMS + 1) * 2; ++i) - sfi_mapseen_rooms(nhfp, &d_mapseen->msrooms[i], parent, "msrooms", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_mapseen->final_resting_place, parent, "final_resting_place", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "mapseen", 1); -} - -void -sfi_mextra(nhfp, d_mextra, myparent, myname, cnt) -NHFILE *nhfp; -struct mextra *d_mextra; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mextra"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "mextra", 1); - - sfi_char(nhfp, d_mextra->mname, parent, "mname", 1); - sfi_egd(nhfp, d_mextra->egd, parent, "egd", 1); - sfi_epri(nhfp, d_mextra->epri, parent, "epri", 1); - sfi_eshk(nhfp, d_mextra->eshk, parent, "eshk", 1); - sfi_emin(nhfp, d_mextra->emin, parent, "emin", 1); - sfi_edog(nhfp, d_mextra->edog, parent, "edog", 1); - sfi_int(nhfp, &d_mextra->mcorpsenm, parent, "mcorpsenm", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "mextra", 1); -} - -void -sfi_mkroom(nhfp, d_mkroom, myparent, myname, cnt) -NHFILE *nhfp; -struct mkroom *d_mkroom; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mkroom"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "mkroom", 1); - - sfi_schar(nhfp, &d_mkroom->lx, parent, "lx", 1); - sfi_schar(nhfp, &d_mkroom->hx, parent, "hx", 1); - sfi_schar(nhfp, &d_mkroom->ly, parent, "ly", 1); - sfi_schar(nhfp, &d_mkroom->hy, parent, "hy", 1); - sfi_schar(nhfp, &d_mkroom->rtype, parent, "rtype", 1); - sfi_schar(nhfp, &d_mkroom->orig_rtype, parent, "orig_rtype", 1); - sfi_schar(nhfp, &d_mkroom->rlit, parent, "rlit", 1); - sfi_schar(nhfp, &d_mkroom->needfill, parent, "needfill", 1); - sfi_schar(nhfp, &d_mkroom->needjoining, parent, "needjoining", 1); - sfi_schar(nhfp, &d_mkroom->doorct, parent, "doorct", 1); - sfi_schar(nhfp, &d_mkroom->fdoor, parent, "fdoor", 1); - sfi_schar(nhfp, &d_mkroom->nsubrooms, parent, "nsubrooms", 1); - sfi_boolean(nhfp, &d_mkroom->irregular, parent, "irregular", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_mkroom->sbrooms[0], parent, "sbrooms", MAX_SUBROOMS); - sfi_genericptr(nhfp, (genericptr_t) &d_mkroom->resident, parent, "resident", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "mkroom", 1); -} - -void -sfi_monst(nhfp, d_monst, myparent, myname, cnt) -NHFILE *nhfp; -struct monst *d_monst; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "monst"; - int i; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "monst", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_monst->nmon, parent, "nmon", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_monst->data, parent, "data", 1); - sfi_unsigned(nhfp, &d_monst->m_id, parent, "m_id", 1); - sfi_short(nhfp, &d_monst->mnum, parent, "mnum", 1); - sfi_short(nhfp, &d_monst->cham, parent, "cham", 1); - sfi_short(nhfp, &d_monst->movement, parent, "movement", 1); - sfi_uchar(nhfp, &d_monst->m_lev, parent, "m_lev", 1); - sfi_aligntyp(nhfp, &d_monst->malign, parent, "malign", 1); - sfi_xchar(nhfp, &d_monst->mx, parent, "mx", 1); - sfi_xchar(nhfp, &d_monst->my, parent, "my", 1); - sfi_xchar(nhfp, &d_monst->mux, parent, "mux", 1); - sfi_xchar(nhfp, &d_monst->muy, parent, "muy", 1); - for (i = 0; i < MTSZ; ++i) - sfi_nhcoord(nhfp, &d_monst->mtrack[i], parent, "mtrack", 1); - sfi_int(nhfp, &d_monst->mhp, parent, "mhp", 1); - sfi_int(nhfp, &d_monst->mhpmax, parent, "mhpmax", 1); - sfi_unsigned(nhfp, &d_monst->mappearance, parent, "mappearance", 1); - sfi_uchar(nhfp, &d_monst->m_ap_type, parent, "m_ap_type", 1); - sfi_schar(nhfp, &d_monst->mtame, parent, "mtame", 1); - sfi_ushort(nhfp, &d_monst->mextrinsics, parent, "mextrinsics", 1); - sfi_int(nhfp, &d_monst->mspec_used, parent, "mspec_used", 1); - bitfield = d_monst->female; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "female", 1); - d_monst->female = bitfield; - - bitfield = d_monst->minvis; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "minvis", 1); - d_monst->minvis = bitfield; - - bitfield = d_monst->invis_blkd; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "invis_blkd", 1); - d_monst->invis_blkd = bitfield; - - bitfield = d_monst->perminvis; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "perminvis", 1); - d_monst->perminvis = bitfield; - - bitfield = d_monst->mcan; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mcan", 1); - d_monst->mcan = bitfield; - - bitfield = d_monst->mburied; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mburied", 1); - d_monst->mburied = bitfield; - - bitfield = d_monst->mundetected; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mundetected", 1); - d_monst->mundetected = bitfield; - - bitfield = d_monst->mcansee; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mcansee", 1); - d_monst->mcansee = bitfield; - - bitfield = d_monst->mspeed; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mspeed", 2); - d_monst->mspeed = bitfield; - - bitfield = d_monst->permspeed; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "permspeed", 2); - d_monst->permspeed = bitfield; - - bitfield = d_monst->mrevived; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mrevived", 1); - d_monst->mrevived = bitfield; - - bitfield = d_monst->mcloned; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mcloned", 1); - d_monst->mcloned = bitfield; - - bitfield = d_monst->mavenge; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mavenge", 1); - d_monst->mavenge = bitfield; - - bitfield = d_monst->mflee; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mflee", 1); - d_monst->mflee = bitfield; - - bitfield = d_monst->mfleetim; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mfleetim", 7); - d_monst->mfleetim = bitfield; - - bitfield = d_monst->msleeping; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "msleeping", 1); - d_monst->msleeping = bitfield; - - bitfield = d_monst->mblinded; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mblinded", 7); - d_monst->mblinded = bitfield; - - bitfield = d_monst->mstun; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mstun", 1); - d_monst->mstun = bitfield; - - bitfield = d_monst->mfrozen; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mfrozen", 7); - d_monst->mfrozen = bitfield; - - bitfield = d_monst->mcanmove; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mcanmove", 1); - d_monst->mcanmove = bitfield; - - bitfield = d_monst->mconf; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mconf", 1); - d_monst->mconf = bitfield; - - bitfield = d_monst->mpeaceful; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mpeaceful", 1); - d_monst->mpeaceful = bitfield; - - bitfield = d_monst->mtrapped; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mtrapped", 1); - d_monst->mtrapped = bitfield; - - bitfield = d_monst->mleashed; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mleashed", 1); - d_monst->mleashed = bitfield; - - bitfield = d_monst->isshk; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "isshk", 1); - d_monst->isshk = bitfield; - - bitfield = d_monst->isminion; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "isminion", 1); - d_monst->isminion = bitfield; - - bitfield = d_monst->isgd; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "isgd", 1); - d_monst->isgd = bitfield; - - bitfield = d_monst->ispriest; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "ispriest", 1); - d_monst->ispriest = bitfield; - - bitfield = d_monst->iswiz; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "iswiz", 1); - d_monst->iswiz = bitfield; - - bitfield = d_monst->wormno; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "wormno", 5); - d_monst->wormno = bitfield; - - bitfield = d_monst->mtemplit; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mtemplit", 1); - d_monst->mtemplit = bitfield; - - sfi_ulong(nhfp, &d_monst->mstrategy, parent, "mstrategy", 1); - sfi_long(nhfp, &d_monst->mtrapseen, parent, "mtrapseen", 1); - sfi_long(nhfp, &d_monst->mlstmv, parent, "mlstmv", 1); - sfi_long(nhfp, &d_monst->mstate, parent, "mstate", 1); - sfi_long(nhfp, &d_monst->migflags, parent, "migflags", 1); - sfi_long(nhfp, &d_monst->mspare1, parent, "mspare1", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_monst->minvent, parent, "minvent", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_monst->mw, parent, "mw", 1); - sfi_long(nhfp, &d_monst->misc_worn_check, parent, "misc_worn_check", 1); - sfi_xchar(nhfp, &d_monst->weapon_check, parent, "weapon_check", 1); - sfi_int(nhfp, &d_monst->meating, parent, "meating", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_monst->mextra, parent, "mextra", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "monst", 1); -} - -void -sfi_mvitals(nhfp, d_mvitals, myparent, myname, cnt) -NHFILE *nhfp; -struct mvitals *d_mvitals; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "mvitals"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "mvitals", 1); - - sfi_uchar(nhfp, &d_mvitals->born, parent, "born", 1); - sfi_uchar(nhfp, &d_mvitals->died, parent, "died", 1); - sfi_uchar(nhfp, &d_mvitals->mvflags, parent, "mvflags", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "mvitals", 1); -} - -void -sfi_nhcoord(nhfp, d_nhcoord, myparent, myname, cnt) -NHFILE *nhfp; -struct nhcoord *d_nhcoord; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "nhcoord"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "nhcoord", 1); - - sfi_xchar(nhfp, &d_nhcoord->x, parent, "x", 1); - sfi_xchar(nhfp, &d_nhcoord->y, parent, "y", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "nhcoord", 1); -} - -void -sfi_nhrect(nhfp, d_nhrect, myparent, myname, cnt) -NHFILE *nhfp; -struct nhrect *d_nhrect; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "nhrect"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "nhrect", 1); - - sfi_xchar(nhfp, &d_nhrect->lx, parent, "lx", 1); - sfi_xchar(nhfp, &d_nhrect->ly, parent, "ly", 1); - sfi_xchar(nhfp, &d_nhrect->hx, parent, "hx", 1); - sfi_xchar(nhfp, &d_nhrect->hy, parent, "hy", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "nhrect", 1); -} - -void -sfi_novel_tracking(nhfp, d_novel_tracking, myparent, myname, cnt) -NHFILE *nhfp; -struct novel_tracking *d_novel_tracking; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "novel_tracking"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "novel_tracking", 1); - - sfi_unsigned(nhfp, &d_novel_tracking->id, parent, "id", 1); - sfi_int(nhfp, &d_novel_tracking->count, parent, "count", 1); - sfi_xchar(nhfp, d_novel_tracking->pasg, parent, "pasg", 30); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "novel_tracking", 1); -} - -void -sfi_obj(nhfp, d_obj, myparent, myname, cnt) -NHFILE *nhfp; -struct obj *d_obj; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "obj"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "obj", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_obj->nobj, parent, "nobj", 1); - sfi_vptrs(nhfp, &d_obj->v, parent, "v", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_obj->cobj, parent, "cobj", 1); - sfi_unsigned(nhfp, &d_obj->o_id, parent, "o_id", 1); - sfi_xchar(nhfp, &d_obj->ox, parent, "ox", 1); - sfi_xchar(nhfp, &d_obj->oy, parent, "oy", 1); - sfi_short(nhfp, &d_obj->otyp, parent, "otyp", 1); - sfi_unsigned(nhfp, &d_obj->owt, parent, "owt", 1); - sfi_long(nhfp, &d_obj->quan, parent, "quan", 1); - sfi_schar(nhfp, &d_obj->spe, parent, "spe", 1); - sfi_char(nhfp, &d_obj->oclass, parent, "oclass", 1); - sfi_char(nhfp, &d_obj->invlet, parent, "invlet", 1); - sfi_char(nhfp, &d_obj->oartifact, parent, "oartifact", 1); - sfi_xchar(nhfp, &d_obj->where, parent, "where", 1); - sfi_xchar(nhfp, &d_obj->timed, parent, "timed", 1); - bitfield = d_obj->cursed; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "cursed", 1); - d_obj->cursed = bitfield; - - bitfield = d_obj->blessed; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "blessed", 1); - d_obj->blessed = bitfield; - - bitfield = d_obj->unpaid; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "unpaid", 1); - d_obj->unpaid = bitfield; - - bitfield = d_obj->no_charge; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "no_charge", 1); - d_obj->no_charge = bitfield; - - bitfield = d_obj->known; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "known", 1); - d_obj->known = bitfield; - - bitfield = d_obj->dknown; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "dknown", 1); - d_obj->dknown = bitfield; - - bitfield = d_obj->bknown; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "bknown", 1); - d_obj->bknown = bitfield; - - bitfield = d_obj->rknown; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "rknown", 1); - d_obj->rknown = bitfield; - - bitfield = d_obj->oeroded; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oeroded", 2); - d_obj->oeroded = bitfield; - - bitfield = d_obj->oeroded2; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oeroded2", 2); - d_obj->oeroded2 = bitfield; - - bitfield = d_obj->oerodeproof; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oerodeproof", 1); - d_obj->oerodeproof = bitfield; - - bitfield = d_obj->olocked; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "olocked", 1); - d_obj->olocked = bitfield; - - bitfield = d_obj->obroken; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "obroken", 1); - d_obj->obroken = bitfield; - - bitfield = d_obj->otrapped; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "otrapped", 1); - d_obj->otrapped = bitfield; - - bitfield = d_obj->recharged; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "recharged", 3); - d_obj->recharged = bitfield; - - bitfield = d_obj->lamplit; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "lamplit", 1); - d_obj->lamplit = bitfield; - - bitfield = d_obj->globby; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "globby", 1); - d_obj->globby = bitfield; - - bitfield = d_obj->greased; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "greased", 1); - d_obj->greased = bitfield; - - bitfield = d_obj->nomerge; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "nomerge", 1); - d_obj->nomerge = bitfield; - - bitfield = d_obj->was_thrown; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "was_thrown", 1); - d_obj->was_thrown = bitfield; - - bitfield = d_obj->in_use; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "in_use", 1); - d_obj->in_use = bitfield; - - bitfield = d_obj->bypass; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "bypass", 1); - d_obj->bypass = bitfield; - - bitfield = d_obj->cknown; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "cknown", 1); - d_obj->cknown = bitfield; - - bitfield = d_obj->lknown; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "lknown", 1); - d_obj->lknown = bitfield; - - sfi_int(nhfp, &d_obj->corpsenm, parent, "corpsenm", 1); - sfi_int(nhfp, &d_obj->usecount, parent, "usecount", 1); - sfi_unsigned(nhfp, &d_obj->oeaten, parent, "oeaten", 1); - sfi_long(nhfp, &d_obj->age, parent, "age", 1); - sfi_long(nhfp, &d_obj->owornmask, parent, "owornmask", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_obj->oextra, parent, "oextra", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "obj", 1); -} - -void -sfi_objclass(nhfp, d_objclass, myparent, myname, cnt) -NHFILE *nhfp; -struct objclass *d_objclass; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "objclass"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "objclass", 1); - - sfi_short(nhfp, &d_objclass->oc_name_idx, parent, "oc_name_idx", 1); - sfi_short(nhfp, &d_objclass->oc_descr_idx, parent, "oc_descr_idx", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_objclass->oc_uname, parent, "oc_uname", 1); - bitfield = d_objclass->oc_name_known; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oc_name_known", 1); - d_objclass->oc_name_known = bitfield; - - bitfield = d_objclass->oc_merge; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oc_merge", 1); - d_objclass->oc_merge = bitfield; - - bitfield = d_objclass->oc_uses_known; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oc_uses_known", 1); - d_objclass->oc_uses_known = bitfield; - - bitfield = d_objclass->oc_pre_discovered; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oc_pre_discovered", 1); - d_objclass->oc_pre_discovered = bitfield; - - bitfield = d_objclass->oc_magic; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oc_magic", 1); - d_objclass->oc_magic = bitfield; - - bitfield = d_objclass->oc_charged; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oc_charged", 1); - d_objclass->oc_charged = bitfield; - - bitfield = d_objclass->oc_unique; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oc_unique", 1); - d_objclass->oc_unique = bitfield; - - bitfield = d_objclass->oc_nowish; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oc_nowish", 1); - d_objclass->oc_nowish = bitfield; - - bitfield = d_objclass->oc_big; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oc_big", 1); - d_objclass->oc_big = bitfield; - - bitfield = d_objclass->oc_tough; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oc_tough", 1); - d_objclass->oc_tough = bitfield; - - bitfield = d_objclass->oc_dir; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oc_dir", 2); - d_objclass->oc_dir = bitfield; - - bitfield = d_objclass->oc_material; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "oc_material", 5); - d_objclass->oc_material = bitfield; - - sfi_schar(nhfp, &d_objclass->oc_subtyp, parent, "oc_subtyp", 1); - sfi_uchar(nhfp, &d_objclass->oc_oprop, parent, "oc_oprop", 1); - sfi_char(nhfp, &d_objclass->oc_class, parent, "oc_class", 1); - sfi_schar(nhfp, &d_objclass->oc_delay, parent, "oc_delay", 1); - sfi_uchar(nhfp, &d_objclass->oc_color, parent, "oc_color", 1); - sfi_short(nhfp, &d_objclass->oc_prob, parent, "oc_prob", 1); - sfi_ushort(nhfp, &d_objclass->oc_weight, parent, "oc_weight", 1); - sfi_short(nhfp, &d_objclass->oc_cost, parent, "oc_cost", 1); - sfi_schar(nhfp, &d_objclass->oc_wsdam, parent, "oc_wsdam", 1); - sfi_schar(nhfp, &d_objclass->oc_wldam, parent, "oc_wldam", 1); - sfi_schar(nhfp, &d_objclass->oc_oc1, parent, "oc_oc1", 1); - sfi_schar(nhfp, &d_objclass->oc_oc2, parent, "oc_oc2", 1); - sfi_ushort(nhfp, &d_objclass->oc_nutrition, parent, "oc_nutrition", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "objclass", 1); -} - -void -sfi_obj_split(nhfp, d_obj_split, myparent, myname, cnt) -NHFILE *nhfp; -struct obj_split *d_obj_split; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "obj_split"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "obj_split", 1); - - sfi_unsigned(nhfp, &d_obj_split->parent_oid, parent, "parent_oid", 1); - sfi_unsigned(nhfp, &d_obj_split->child_oid, parent, "child_oid", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "obj_split", 1); -} - -void -sfi_oextra(nhfp, d_oextra, myparent, myname, cnt) -NHFILE *nhfp; -struct oextra *d_oextra; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "oextra"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "oextra", 1); - - sfi_char(nhfp, d_oextra->oname, parent, "oname", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_oextra->omonst, parent, "omonst", 1); - sfi_unsigned(nhfp, d_oextra->omid, parent, "omid", 1); - sfi_long(nhfp, d_oextra->olong, parent, "olong", 1); - sfi_char(nhfp, d_oextra->omailcmd, parent, "omailcmd", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "oextra", 1); -} - -void -sfi_polearm_info(nhfp, d_polearm_info, myparent, myname, cnt) -NHFILE *nhfp; -struct polearm_info *d_polearm_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "polearm_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "polearm_info", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_polearm_info->hitmon, parent, "hitmon", 1); - sfi_unsigned(nhfp, &d_polearm_info->m_id, parent, "m_id", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "polearm_info", 1); -} - -void -sfi_prop(nhfp, d_prop, myparent, myname, cnt) -NHFILE *nhfp; -struct prop *d_prop; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "prop"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "prop", 1); - - sfi_long(nhfp, &d_prop->extrinsic, parent, "extrinsic", 1); - sfi_long(nhfp, &d_prop->blocked, parent, "blocked", 1); - sfi_long(nhfp, &d_prop->intrinsic, parent, "intrinsic", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "prop", 1); -} - -void -sfi_q_score(nhfp, d_q_score, myparent, myname, cnt) -NHFILE *nhfp; -struct q_score *d_q_score; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "q_score"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "q_score", 1); - - bitfield = d_q_score->first_start; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "first_start", 1); - d_q_score->first_start = bitfield; - - bitfield = d_q_score->met_leader; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "met_leader", 1); - d_q_score->met_leader = bitfield; - - bitfield = d_q_score->not_ready; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "not_ready", 3); - d_q_score->not_ready = bitfield; - - bitfield = d_q_score->pissed_off; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "pissed_off", 1); - d_q_score->pissed_off = bitfield; - - bitfield = d_q_score->got_quest; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "got_quest", 1); - d_q_score->got_quest = bitfield; - - bitfield = d_q_score->first_locate; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "first_locate", 1); - d_q_score->first_locate = bitfield; - - bitfield = d_q_score->met_intermed; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "met_intermed", 1); - d_q_score->met_intermed = bitfield; - - bitfield = d_q_score->got_final; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "got_final", 1); - d_q_score->got_final = bitfield; - - bitfield = d_q_score->made_goal; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "made_goal", 3); - d_q_score->made_goal = bitfield; - - bitfield = d_q_score->met_nemesis; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "met_nemesis", 1); - d_q_score->met_nemesis = bitfield; - - bitfield = d_q_score->killed_nemesis; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "killed_nemesis", 1); - d_q_score->killed_nemesis = bitfield; - - bitfield = d_q_score->in_battle; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "in_battle", 1); - d_q_score->in_battle = bitfield; - - bitfield = d_q_score->cheater; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "cheater", 1); - d_q_score->cheater = bitfield; - - bitfield = d_q_score->touched_artifact; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "touched_artifact", 1); - d_q_score->touched_artifact = bitfield; - - bitfield = d_q_score->offered_artifact; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "offered_artifact", 1); - d_q_score->offered_artifact = bitfield; - - bitfield = d_q_score->got_thanks; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "got_thanks", 1); - d_q_score->got_thanks = bitfield; - - bitfield = d_q_score->ldrgend; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "ldrgend", 2); - d_q_score->ldrgend = bitfield; - - bitfield = d_q_score->nemgend; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "nemgend", 2); - d_q_score->nemgend = bitfield; - - bitfield = d_q_score->godgend; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "godgend", 2); - d_q_score->godgend = bitfield; - - bitfield = d_q_score->leader_is_dead; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "leader_is_dead", 1); - d_q_score->leader_is_dead = bitfield; - - sfi_unsigned(nhfp, &d_q_score->leader_m_id, parent, "leader_m_id", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "q_score", 1); -} - -void -sfi_rm(nhfp, d_rm, myparent, myname, cnt) -NHFILE *nhfp; -struct rm *d_rm; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "rm"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "rm", 1); - - sfi_int(nhfp, &d_rm->glyph, parent, "glyph", 1); - sfi_schar(nhfp, &d_rm->typ, parent, "typ", 1); - sfi_uchar(nhfp, &d_rm->seenv, parent, "seenv", 1); - bitfield = d_rm->flags; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "flags", 5); - d_rm->flags = bitfield; - - bitfield = d_rm->horizontal; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "horizontal", 1); - d_rm->horizontal = bitfield; - - bitfield = d_rm->lit; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "lit", 1); - d_rm->lit = bitfield; - - bitfield = d_rm->waslit; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "waslit", 1); - d_rm->waslit = bitfield; - - bitfield = d_rm->roomno; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "roomno", 6); - d_rm->roomno = bitfield; - - bitfield = d_rm->edge; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "edge", 1); - d_rm->edge = bitfield; - - bitfield = d_rm->candig; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "candig", 1); - d_rm->candig = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "rm", 1); -} - -void -sfi_s_level(nhfp, d_s_level, myparent, myname, cnt) -NHFILE *nhfp; -struct s_level *d_s_level; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "s_level"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "s_level", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_s_level->next, parent, "next", 1); - sfi_d_level(nhfp, &d_s_level->dlevel, parent, "dlevel", 1); - sfi_char(nhfp, d_s_level->proto, parent, "proto", 15); - sfi_char(nhfp, &d_s_level->boneid, parent, "boneid", 1); - sfi_uchar(nhfp, &d_s_level->rndlevs, parent, "rndlevs", 1); - sfi_d_flags(nhfp, &d_s_level->flags, parent, "flags", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "s_level", 1); -} - -void -sfi_savefile_info(nhfp, d_savefile_info, myparent, myname, cnt) -NHFILE *nhfp; -struct savefile_info *d_savefile_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "savefile_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "savefile_info", 1); - - sfi_ulong(nhfp, &d_savefile_info->sfi1, parent, "sfi1", 1); - sfi_ulong(nhfp, &d_savefile_info->sfi2, parent, "sfi2", 1); - sfi_ulong(nhfp, &d_savefile_info->sfi3, parent, "sfi3", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "savefile_info", 1); -} - -void -sfi_skills(nhfp, d_skills, myparent, myname, cnt) -NHFILE *nhfp; -struct skills *d_skills; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "skills"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "skills", 1); - - sfi_xchar(nhfp, &d_skills->skill, parent, "skill", 1); - sfi_xchar(nhfp, &d_skills->max_skill, parent, "max_skill", 1); - sfi_ushort(nhfp, &d_skills->advance, parent, "advance", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "skills", 1); -} - -void -sfi_spell(nhfp, d_spell, myparent, myname, cnt) -NHFILE *nhfp; -struct spell *d_spell; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "spell"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "spell", 1); - - sfi_short(nhfp, &d_spell->sp_id, parent, "sp_id", 1); - sfi_xchar(nhfp, &d_spell->sp_lev, parent, "sp_lev", 1); - sfi_int(nhfp, &d_spell->sp_know, parent, "sp_know", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "spell", 1); -} - -void -sfi_stairway(nhfp, d_stairway, myparent, myname, cnt) -NHFILE *nhfp; -struct stairway *d_stairway; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "stairway"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "stairway", 1); - - sfi_xchar(nhfp, &d_stairway->sx, parent, "sx", 1); - sfi_xchar(nhfp, &d_stairway->sy, parent, "sy", 1); - sfi_d_level(nhfp, &d_stairway->tolev, parent, "tolev", 1); - sfi_char(nhfp, &d_stairway->up, parent, "up", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "stairway", 1); -} - -void -sfi_takeoff_info(nhfp, d_takeoff_info, myparent, myname, cnt) -NHFILE *nhfp; -struct takeoff_info *d_takeoff_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "takeoff_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "takeoff_info", 1); - - sfi_long(nhfp, &d_takeoff_info->mask, parent, "mask", 1); - sfi_long(nhfp, &d_takeoff_info->what, parent, "what", 1); - sfi_int(nhfp, &d_takeoff_info->delay, parent, "delay", 1); - sfi_boolean(nhfp, &d_takeoff_info->cancelled_don, parent, "cancelled_don", 1); - sfi_char(nhfp, d_takeoff_info->disrobing, parent, "disrobing", CONTEXTVERBSZ + 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "takeoff_info", 1); -} - -void -sfi_tin_info(nhfp, d_tin_info, myparent, myname, cnt) -NHFILE *nhfp; -struct tin_info *d_tin_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "tin_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "tin_info", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_tin_info->tin, parent, "tin", 1); - sfi_unsigned(nhfp, &d_tin_info->o_id, parent, "o_id", 1); - sfi_int(nhfp, &d_tin_info->usedtime, parent, "usedtime", 1); - sfi_int(nhfp, &d_tin_info->reqtime, parent, "reqtime", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "tin_info", 1); -} - -void -sfi_trap(nhfp, d_trap, myparent, myname, cnt) -NHFILE *nhfp; -struct trap *d_trap; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "trap"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "trap", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_trap->ntrap, parent, "ntrap", 1); - sfi_xchar(nhfp, &d_trap->tx, parent, "tx", 1); - sfi_xchar(nhfp, &d_trap->ty, parent, "ty", 1); - sfi_d_level(nhfp, &d_trap->dst, parent, "dst", 1); - sfi_nhcoord(nhfp, &d_trap->launch, parent, "launch", 1); - bitfield = d_trap->ttyp; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "ttyp", 5); - d_trap->ttyp = bitfield; - - bitfield = d_trap->tseen; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "tseen", 1); - d_trap->tseen = bitfield; - - bitfield = d_trap->once; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "once", 1); - d_trap->once = bitfield; - - bitfield = d_trap->madeby_u; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "madeby_u", 1); - d_trap->madeby_u = bitfield; - - sfi_vlaunchinfo(nhfp, &d_trap->vl, parent, "vl", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "trap", 1); -} - -void -sfi_tribute_info(nhfp, d_tribute_info, myparent, myname, cnt) -NHFILE *nhfp; -struct tribute_info *d_tribute_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "tribute_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "tribute_info", 1); - - sfi_size_t(nhfp, &d_tribute_info->tributesz, parent, "tributesz", 1); - sfi_boolean(nhfp, &d_tribute_info->enabled, parent, "enabled", 1); - bitfield = d_tribute_info->bookstock; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "bookstock", 1); - d_tribute_info->bookstock = bitfield; - - bitfield = d_tribute_info->Deathnotice; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "Deathnotice", 1); - d_tribute_info->Deathnotice = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "tribute_info", 1); -} - -void -sfi_u_achieve(nhfp, d_u_achieve, myparent, myname, cnt) -NHFILE *nhfp; -struct u_achieve *d_u_achieve; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "u_achieve"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "u_achieve", 1); - - bitfield = d_u_achieve->amulet; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "amulet", 1); - d_u_achieve->amulet = bitfield; - - bitfield = d_u_achieve->bell; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "bell", 1); - d_u_achieve->bell = bitfield; - - bitfield = d_u_achieve->book; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "book", 1); - d_u_achieve->book = bitfield; - - bitfield = d_u_achieve->menorah; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "menorah", 1); - d_u_achieve->menorah = bitfield; - - bitfield = d_u_achieve->enter_gehennom; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "enter_gehennom", 1); - d_u_achieve->enter_gehennom = bitfield; - - bitfield = d_u_achieve->ascended; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "ascended", 1); - d_u_achieve->ascended = bitfield; - - bitfield = d_u_achieve->mines_luckstone; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mines_luckstone", 1); - d_u_achieve->mines_luckstone = bitfield; - - bitfield = d_u_achieve->finish_sokoban; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "finish_sokoban", 1); - d_u_achieve->finish_sokoban = bitfield; - - bitfield = d_u_achieve->killed_medusa; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "killed_medusa", 1); - d_u_achieve->killed_medusa = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "u_achieve", 1); -} - -void -sfi_u_conduct(nhfp, d_u_conduct, myparent, myname, cnt) -NHFILE *nhfp; -struct u_conduct *d_u_conduct; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "u_conduct"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "u_conduct", 1); - - sfi_long(nhfp, &d_u_conduct->unvegetarian, parent, "unvegetarian", 1); - sfi_long(nhfp, &d_u_conduct->unvegan, parent, "unvegan", 1); - sfi_long(nhfp, &d_u_conduct->food, parent, "food", 1); - sfi_long(nhfp, &d_u_conduct->gnostic, parent, "gnostic", 1); - sfi_long(nhfp, &d_u_conduct->weaphit, parent, "weaphit", 1); - sfi_long(nhfp, &d_u_conduct->killer, parent, "killer", 1); - sfi_long(nhfp, &d_u_conduct->literate, parent, "literate", 1); - sfi_long(nhfp, &d_u_conduct->polypiles, parent, "polypiles", 1); - sfi_long(nhfp, &d_u_conduct->polyselfs, parent, "polyselfs", 1); - sfi_long(nhfp, &d_u_conduct->wishes, parent, "wishes", 1); - sfi_long(nhfp, &d_u_conduct->wisharti, parent, "wisharti", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "u_conduct", 1); -} - -void -sfi_u_event(nhfp, d_u_event, myparent, myname, cnt) -NHFILE *nhfp; -struct u_event *d_u_event; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "u_event"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "u_event", 1); - - bitfield = d_u_event->minor_oracle; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "minor_oracle", 1); - d_u_event->minor_oracle = bitfield; - - bitfield = d_u_event->major_oracle; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "major_oracle", 1); - d_u_event->major_oracle = bitfield; - - bitfield = d_u_event->read_tribute; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "read_tribute", 1); - d_u_event->read_tribute = bitfield; - - bitfield = d_u_event->qcalled; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "qcalled", 1); - d_u_event->qcalled = bitfield; - - bitfield = d_u_event->qexpelled; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "qexpelled", 1); - d_u_event->qexpelled = bitfield; - - bitfield = d_u_event->qcompleted; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "qcompleted", 1); - d_u_event->qcompleted = bitfield; - - bitfield = d_u_event->uheard_tune; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "uheard_tune", 2); - d_u_event->uheard_tune = bitfield; - - bitfield = d_u_event->uopened_dbridge; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "uopened_dbridge", 1); - d_u_event->uopened_dbridge = bitfield; - - bitfield = d_u_event->invoked; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "invoked", 1); - d_u_event->invoked = bitfield; - - bitfield = d_u_event->gehennom_entered; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "gehennom_entered", 1); - d_u_event->gehennom_entered = bitfield; - - bitfield = d_u_event->uhand_of_elbereth; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "uhand_of_elbereth", 2); - d_u_event->uhand_of_elbereth = bitfield; - - bitfield = d_u_event->udemigod; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "udemigod", 1); - d_u_event->udemigod = bitfield; - - bitfield = d_u_event->uvibrated; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "uvibrated", 1); - d_u_event->uvibrated = bitfield; - - bitfield = d_u_event->ascended; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "ascended", 1); - d_u_event->ascended = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "u_event", 1); -} - -void -sfi_u_have(nhfp, d_u_have, myparent, myname, cnt) -NHFILE *nhfp; -struct u_have *d_u_have; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "u_have"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "u_have", 1); - - bitfield = d_u_have->amulet; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "amulet", 1); - d_u_have->amulet = bitfield; - - bitfield = d_u_have->bell; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "bell", 1); - d_u_have->bell = bitfield; - - bitfield = d_u_have->book; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "book", 1); - d_u_have->book = bitfield; - - bitfield = d_u_have->menorah; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "menorah", 1); - d_u_have->menorah = bitfield; - - bitfield = d_u_have->questart; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "questart", 1); - d_u_have->questart = bitfield; - - bitfield = d_u_have->unused; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "unused", 3); - d_u_have->unused = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "u_have", 1); -} - -void -sfi_u_realtime(nhfp, d_u_realtime, myparent, myname, cnt) -NHFILE *nhfp; -struct u_realtime *d_u_realtime; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "u_realtime"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "u_realtime", 1); - - sfi_long(nhfp, &d_u_realtime->realtime, parent, "realtime", 1); - sfi_time_t(nhfp, &d_u_realtime->start_timing, parent, "start_timing", 1); - sfi_time_t(nhfp, &d_u_realtime->finish_time, parent, "finish_time", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "u_realtime", 1); -} - -void -sfi_u_roleplay(nhfp, d_u_roleplay, myparent, myname, cnt) -NHFILE *nhfp; -struct u_roleplay *d_u_roleplay; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "u_roleplay"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "u_roleplay", 1); - - sfi_boolean(nhfp, &d_u_roleplay->blind, parent, "blind", 1); - sfi_boolean(nhfp, &d_u_roleplay->nudist, parent, "nudist", 1); - sfi_long(nhfp, &d_u_roleplay->numbones, parent, "numbones", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "u_roleplay", 1); -} - -void -sfi_version_info(nhfp, d_version_info, myparent, myname, cnt) -NHFILE *nhfp; -struct version_info *d_version_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "version_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "version_info", 1); - - sfi_ulong(nhfp, &d_version_info->incarnation, parent, "incarnation", 1); - sfi_ulong(nhfp, &d_version_info->feature_set, parent, "feature_set", 1); - sfi_ulong(nhfp, &d_version_info->entity_count, parent, "entity_count", 1); - sfi_ulong(nhfp, &d_version_info->struct_sizes1, parent, "struct_sizes1", 1); - sfi_ulong(nhfp, &d_version_info->struct_sizes2, parent, "struct_sizes2", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "version_info", 1); -} - -void -sfi_victual_info(nhfp, d_victual_info, myparent, myname, cnt) -NHFILE *nhfp; -struct victual_info *d_victual_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "victual_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "victual_info", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_victual_info->piece, parent, "piece", 1); - sfi_unsigned(nhfp, &d_victual_info->o_id, parent, "o_id", 1); - sfi_int(nhfp, &d_victual_info->usedtime, parent, "usedtime", 1); - sfi_int(nhfp, &d_victual_info->reqtime, parent, "reqtime", 1); - sfi_int(nhfp, &d_victual_info->nmod, parent, "nmod", 1); - bitfield = d_victual_info->canchoke; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "canchoke", 1); - d_victual_info->canchoke = bitfield; - - bitfield = d_victual_info->fullwarn; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "fullwarn", 1); - d_victual_info->fullwarn = bitfield; - - bitfield = d_victual_info->eating; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "eating", 1); - d_victual_info->eating = bitfield; - - bitfield = d_victual_info->doreset; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "doreset", 1); - d_victual_info->doreset = bitfield; - - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "victual_info", 1); -} - -void -sfi_vlaunchinfo(nhfp, d_vlaunchinfo, myparent, myname, cnt) -NHFILE *nhfp; -union vlaunchinfo *d_vlaunchinfo; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "vlaunchinfo"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "vlaunchinfo", 1); - - sfi_short(nhfp, &d_vlaunchinfo->v_launch_otyp, parent, "v_launch_otyp", 1); - sfi_nhcoord(nhfp, &d_vlaunchinfo->v_launch2, parent, "v_launch2", 1); - sfi_uchar(nhfp, &d_vlaunchinfo->v_conjoined, parent, "v_conjoined", 1); - sfi_short(nhfp, &d_vlaunchinfo->v_tnote, parent, "v_tnote", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "vlaunchinfo", 1); -} - -void -sfi_vptrs(nhfp, d_vptrs, myparent, myname, cnt) -NHFILE *nhfp; -union vptrs *d_vptrs; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "vptrs"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "vptrs", 1); - - sfi_genericptr(nhfp, (genericptr_t) &d_vptrs->v_nexthere, parent, "v_nexthere", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_vptrs->v_ocontainer, parent, "v_ocontainer", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_vptrs->v_ocarry, parent, "v_ocarry", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "vptrs", 1); -} - -void -sfi_warntype_info(nhfp, d_warntype_info, myparent, myname, cnt) -NHFILE *nhfp; -struct warntype_info *d_warntype_info; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "warntype_info"; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "warntype_info", 1); - - sfi_ulong(nhfp, &d_warntype_info->obj, parent, "obj", 1); - sfi_ulong(nhfp, &d_warntype_info->polyd, parent, "polyd", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_warntype_info->species, parent, "species", 1); - sfi_short(nhfp, &d_warntype_info->speciesidx, parent, "speciesidx", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "warntype_info", 1); -} - -void -sfi_you(nhfp, d_you, myparent, myname, cnt) -NHFILE *nhfp; -struct you *d_you; -const char *myparent; -const char *myname; -int cnt; -{ - const char *parent = "you"; - int i; - - nhUse(myname); - nhUse(cnt); - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "start", "you", 1); - - sfi_xchar(nhfp, &d_you->ux, parent, "ux", 1); - sfi_xchar(nhfp, &d_you->uy, parent, "uy", 1); - sfi_schar(nhfp, &d_you->dx, parent, "dx", 1); - sfi_schar(nhfp, &d_you->dy, parent, "dy", 1); - sfi_schar(nhfp, &d_you->dz, parent, "dz", 1); - sfi_schar(nhfp, &d_you->di, parent, "di", 1); - sfi_xchar(nhfp, &d_you->tx, parent, "tx", 1); - sfi_xchar(nhfp, &d_you->ty, parent, "ty", 1); - sfi_xchar(nhfp, &d_you->ux0, parent, "ux0", 1); - sfi_xchar(nhfp, &d_you->uy0, parent, "uy0", 1); - sfi_d_level(nhfp, &d_you->uz, parent, "uz", 1); - sfi_d_level(nhfp, &d_you->uz0, parent, "uz0", 1); - sfi_d_level(nhfp, &d_you->utolev, parent, "utolev", 1); - sfi_uchar(nhfp, &d_you->utotype, parent, "utotype", 1); - sfi_boolean(nhfp, &d_you->umoved, parent, "umoved", 1); - sfi_int(nhfp, &d_you->last_str_turn, parent, "last_str_turn", 1); - sfi_int(nhfp, &d_you->ulevel, parent, "ulevel", 1); - sfi_int(nhfp, &d_you->ulevelmax, parent, "ulevelmax", 1); - sfi_unsigned(nhfp, &d_you->utrap, parent, "utrap", 1); - sfi_unsigned(nhfp, &d_you->utraptype, parent, "utraptype", 1); - sfi_char(nhfp, d_you->urooms, parent, "urooms", 5); - sfi_char(nhfp, d_you->urooms0, parent, "urooms0", 5); - sfi_char(nhfp, d_you->uentered, parent, "uentered", 5); - sfi_char(nhfp, d_you->ushops, parent, "ushops", 5); - sfi_char(nhfp, d_you->ushops0, parent, "ushops0", 5); - sfi_char(nhfp, d_you->ushops_entered, parent, "ushops_entered", 5); - sfi_char(nhfp, d_you->ushops_left, parent, "ushops_left", 5); - sfi_int(nhfp, &d_you->uhunger, parent, "uhunger", 1); - sfi_unsigned(nhfp, &d_you->uhs, parent, "uhs", 1); - sfi_prop(nhfp, d_you->uprops, parent, "uprops", LAST_PROP + 1); - sfi_unsigned(nhfp, &d_you->umconf, parent, "umconf", 1); - bitfield = d_you->usick_type; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "usick_type", 2); - d_you->usick_type = bitfield; - - sfi_int(nhfp, &d_you->nv_range, parent, "nv_range", 1); - sfi_int(nhfp, &d_you->xray_range, parent, "xray_range", 1); - sfi_int(nhfp, &d_you->bglyph, parent, "bglyph", 1); - sfi_int(nhfp, &d_you->cglyph, parent, "cglyph", 1); - sfi_int(nhfp, &d_you->bc_order, parent, "bc_order", 1); - sfi_int(nhfp, &d_you->bc_felt, parent, "bc_felt", 1); - sfi_int(nhfp, &d_you->umonster, parent, "umonster", 1); - sfi_int(nhfp, &d_you->umonnum, parent, "umonnum", 1); - sfi_int(nhfp, &d_you->mh, parent, "mh", 1); - sfi_int(nhfp, &d_you->mhmax, parent, "mhmax", 1); - sfi_int(nhfp, &d_you->mtimedone, parent, "mtimedone", 1); - sfi_attribs(nhfp, &d_you->macurr, parent, "macurr", 1); - sfi_attribs(nhfp, &d_you->mamax, parent, "mamax", 1); - sfi_int(nhfp, &d_you->ulycn, parent, "ulycn", 1); - sfi_unsigned(nhfp, &d_you->ucreamed, parent, "ucreamed", 1); - sfi_unsigned(nhfp, &d_you->uswldtim, parent, "uswldtim", 1); - bitfield = d_you->uswallow; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "uswallow", 1); - d_you->uswallow = bitfield; - - bitfield = d_you->uinwater; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "uinwater", 1); - d_you->uinwater = bitfield; - - bitfield = d_you->uundetected; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "uundetected", 1); - d_you->uundetected = bitfield; - - bitfield = d_you->mfemale; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "mfemale", 1); - d_you->mfemale = bitfield; - - bitfield = d_you->uinvulnerable; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "uinvulnerable", 1); - d_you->uinvulnerable = bitfield; - - bitfield = d_you->uburied; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "uburied", 1); - d_you->uburied = bitfield; - - bitfield = d_you->uedibility; /* set it to current value for testing */ - sfi_bitfield(nhfp, &bitfield, parent, "uedibility", 1); - d_you->uedibility = bitfield; - - sfi_unsigned(nhfp, &d_you->udg_cnt, parent, "udg_cnt", 1); - sfi_u_achieve(nhfp, &d_you->uachieve, parent, "uachieve", 1); - sfi_u_event(nhfp, &d_you->uevent, parent, "uevent", 1); - sfi_u_have(nhfp, &d_you->uhave, parent, "uhave", 1); - sfi_u_conduct(nhfp, &d_you->uconduct, parent, "uconduct", 1); - sfi_u_roleplay(nhfp, &d_you->uroleplay, parent, "uroleplay", 1); - sfi_attribs(nhfp, &d_you->acurr, parent, "acurr", 1); - sfi_attribs(nhfp, &d_you->aexe, parent, "aexe", 1); - sfi_attribs(nhfp, &d_you->abon, parent, "abon", 1); - sfi_attribs(nhfp, &d_you->amax, parent, "amax", 1); - sfi_attribs(nhfp, &d_you->atemp, parent, "atemp", 1); - sfi_attribs(nhfp, &d_you->atime, parent, "atime", 1); - sfi_align(nhfp, &d_you->ualign, parent, "ualign", 1); - for (i = 0; i < CONVERT; ++i) - sfi_aligntyp(nhfp, &d_you->ualignbase[i], parent, "ualignbase", 1); - sfi_schar(nhfp, &d_you->uluck, parent, "uluck", 1); - sfi_schar(nhfp, &d_you->moreluck, parent, "moreluck", 1); - sfi_schar(nhfp, &d_you->uhitinc, parent, "uhitinc", 1); - sfi_schar(nhfp, &d_you->udaminc, parent, "udaminc", 1); - sfi_schar(nhfp, &d_you->uac, parent, "uac", 1); - sfi_uchar(nhfp, &d_you->uspellprot, parent, "uspellprot", 1); - sfi_uchar(nhfp, &d_you->usptime, parent, "usptime", 1); - sfi_uchar(nhfp, &d_you->uspmtime, parent, "uspmtime", 1); - sfi_int(nhfp, &d_you->uhp, parent, "uhp", 1); - sfi_int(nhfp, &d_you->uhpmax, parent, "uhpmax", 1); - sfi_int(nhfp, &d_you->uen, parent, "uen", 1); - sfi_int(nhfp, &d_you->uenmax, parent, "uenmax", 1); - sfi_xchar(nhfp, d_you->uhpinc, parent, "uhpinc", MAXULEV); - sfi_xchar(nhfp, d_you->ueninc, parent, "ueninc", MAXULEV); - sfi_int(nhfp, &d_you->ugangr, parent, "ugangr", 1); - sfi_int(nhfp, &d_you->ugifts, parent, "ugifts", 1); - sfi_int(nhfp, &d_you->ublessed, parent, "ublessed", 1); - sfi_int(nhfp, &d_you->ublesscnt, parent, "ublesscnt", 1); - sfi_long(nhfp, &d_you->umoney0, parent, "umoney0", 1); - sfi_long(nhfp, &d_you->uspare1, parent, "uspare1", 1); - sfi_long(nhfp, &d_you->uexp, parent, "uexp", 1); - sfi_long(nhfp, &d_you->urexp, parent, "urexp", 1); - sfi_long(nhfp, &d_you->ucleansed, parent, "ucleansed", 1); - sfi_long(nhfp, &d_you->usleep, parent, "usleep", 1); - sfi_int(nhfp, &d_you->uinvault, parent, "uinvault", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_you->ustuck, parent, "ustuck", 1); - sfi_genericptr(nhfp, (genericptr_t) &d_you->usteed, parent, "usteed", 1); - sfi_long(nhfp, &d_you->ugallop, parent, "ugallop", 1); - sfi_int(nhfp, &d_you->urideturns, parent, "urideturns", 1); - sfi_int(nhfp, &d_you->umortality, parent, "umortality", 1); - sfi_int(nhfp, &d_you->ugrave_arise, parent, "ugrave_arise", 1); - sfi_int(nhfp, &d_you->weapon_slots, parent, "weapon_slots", 1); - sfi_int(nhfp, &d_you->skills_advanced, parent, "skills_advanced", 1); - sfi_xchar(nhfp, d_you->skill_record, parent, "skill_record", P_SKILL_LIMIT); - for (i = 0; i < P_NUM_SKILLS; ++i) - sfi_skills(nhfp, &d_you->weapon_skills[i], parent, "weapon_skills", 1); - sfi_boolean(nhfp, &d_you->twoweap, parent, "twoweap", 1); - sfi_short(nhfp, &d_you->mcham, parent, "mcham", 1); - - if (nhfp->addinfo) - sfi_addinfo(nhfp, myparent, "end", "you", 1); -} -struct nhdatatypes_t nhdatatypes[] = { - {NHTYPE_SIMPLE, (char *) "any", sizeof(anything)}, - {NHTYPE_SIMPLE, (char *) "genericptr_t", sizeof(genericptr_t)}, - {NHTYPE_SIMPLE, (char *) "aligntyp", sizeof(aligntyp)}, - {NHTYPE_SIMPLE, (char *) "Bitfield", sizeof(uint8_t)}, - {NHTYPE_SIMPLE, (char *) "boolean", sizeof(boolean)}, - {NHTYPE_SIMPLE, (char *) "char", sizeof(char)}, - {NHTYPE_SIMPLE, (char *) "int", sizeof(int)}, - {NHTYPE_SIMPLE, (char *) "long", sizeof(long)}, - {NHTYPE_SIMPLE, (char *) "schar", sizeof(schar)}, - {NHTYPE_SIMPLE, (char *) "short", sizeof(short)}, - {NHTYPE_SIMPLE, (char *) "size_t", sizeof(size_t)}, - {NHTYPE_SIMPLE, (char *) "string", sizeof(uchar)}, - {NHTYPE_SIMPLE, (char *) "time_t", sizeof(time_t)}, - {NHTYPE_SIMPLE, (char *) "uchar", sizeof(uchar)}, - {NHTYPE_SIMPLE, (char *) "unsigned char", sizeof(unsigned char)}, - {NHTYPE_SIMPLE, (char *) "unsigned int", sizeof(unsigned int)}, - {NHTYPE_SIMPLE, (char *) "unsigned long", sizeof(unsigned long)}, - {NHTYPE_SIMPLE, (char *) "unsigned short", sizeof(unsigned short)}, - {NHTYPE_SIMPLE, (char *) "unsigned", sizeof(unsigned)}, - {NHTYPE_SIMPLE, (char *) "xchar", sizeof(xchar)}, - {NHTYPE_COMPLEX, (char *) "align", sizeof(struct align)}, - {NHTYPE_COMPLEX, (char *) "attribs", sizeof(struct attribs)}, - {NHTYPE_COMPLEX, (char *) "dig_info", sizeof(struct dig_info)}, - {NHTYPE_COMPLEX, (char *) "tin_info", sizeof(struct tin_info)}, - {NHTYPE_COMPLEX, (char *) "book_info", sizeof(struct book_info)}, - {NHTYPE_COMPLEX, (char *) "takeoff_info", sizeof(struct takeoff_info)}, - {NHTYPE_COMPLEX, (char *) "victual_info", sizeof(struct victual_info)}, - {NHTYPE_COMPLEX, (char *) "warntype_info", sizeof(struct warntype_info)}, - {NHTYPE_COMPLEX, (char *) "polearm_info", sizeof(struct polearm_info)}, - {NHTYPE_COMPLEX, (char *) "obj_split", sizeof(struct obj_split)}, - {NHTYPE_COMPLEX, (char *) "tribute_info", sizeof(struct tribute_info)}, - {NHTYPE_COMPLEX, (char *) "novel_tracking", sizeof(struct novel_tracking)}, - {NHTYPE_COMPLEX, (char *) "context_info", sizeof(struct context_info)}, - {NHTYPE_COMPLEX, (char *) "nhcoord", sizeof(struct nhcoord)}, - {NHTYPE_COMPLEX, (char *) "dgn_topology", sizeof(struct dgn_topology)}, - {NHTYPE_COMPLEX, (char *) "kinfo", sizeof(struct kinfo)}, - {NHTYPE_COMPLEX, (char *) "mvitals", sizeof(struct mvitals)}, - {NHTYPE_COMPLEX, (char *) "ls_t", sizeof(struct ls_t)}, - {NHTYPE_COMPLEX, (char *) "bubble", sizeof(struct bubble)}, - {NHTYPE_COMPLEX, (char *) "d_flags", sizeof(struct d_flags)}, - {NHTYPE_COMPLEX, (char *) "d_level", sizeof(struct d_level)}, - {NHTYPE_COMPLEX, (char *) "s_level", sizeof(struct s_level)}, - {NHTYPE_COMPLEX, (char *) "stairway", sizeof(struct stairway)}, - {NHTYPE_COMPLEX, (char *) "dest_area", sizeof(struct dest_area)}, - {NHTYPE_COMPLEX, (char *) "dungeon", sizeof(struct dungeon)}, - {NHTYPE_COMPLEX, (char *) "branch", sizeof(struct branch)}, - {NHTYPE_COMPLEX, (char *) "linfo", sizeof(struct linfo)}, - {NHTYPE_COMPLEX, (char *) "mapseen", sizeof(struct mapseen)}, - {NHTYPE_COMPLEX, (char *) "mapseen_feat", sizeof(struct mapseen_feat)}, - {NHTYPE_COMPLEX, (char *) "mapseen_flags", sizeof(struct mapseen_flags)}, - {NHTYPE_COMPLEX, (char *) "mapseen_rooms", sizeof(struct mapseen_rooms)}, - {NHTYPE_COMPLEX, (char *) "engr", sizeof(struct engr)}, - {NHTYPE_COMPLEX, (char *) "flag", sizeof(struct flag)}, - {NHTYPE_COMPLEX, (char *) "version_info", sizeof(struct version_info)}, - {NHTYPE_COMPLEX, (char *) "savefile_info", sizeof(struct savefile_info)}, - {NHTYPE_COMPLEX, (char *) "fakecorridor", sizeof(struct fakecorridor)}, - {NHTYPE_COMPLEX, (char *) "egd", sizeof(struct egd)}, - {NHTYPE_COMPLEX, (char *) "epri", sizeof(struct epri)}, - {NHTYPE_COMPLEX, (char *) "bill_x", sizeof(struct bill_x)}, - {NHTYPE_COMPLEX, (char *) "eshk", sizeof(struct eshk)}, - {NHTYPE_COMPLEX, (char *) "emin", sizeof(struct emin)}, - {NHTYPE_COMPLEX, (char *) "edog", sizeof(struct edog)}, - {NHTYPE_COMPLEX, (char *) "mextra", sizeof(struct mextra)}, - {NHTYPE_COMPLEX, (char *) "mkroom", sizeof(struct mkroom)}, - {NHTYPE_COMPLEX, (char *) "monst", sizeof(struct monst)}, - {NHTYPE_COMPLEX, (char *) "vptrs", sizeof(union vptrs)}, - {NHTYPE_COMPLEX, (char *) "oextra", sizeof(struct oextra)}, - {NHTYPE_COMPLEX, (char *) "obj", sizeof(struct obj)}, - {NHTYPE_COMPLEX, (char *) "objclass", sizeof(struct objclass)}, - {NHTYPE_COMPLEX, (char *) "fruit", sizeof(struct fruit)}, - {NHTYPE_COMPLEX, (char *) "prop", sizeof(struct prop)}, - {NHTYPE_COMPLEX, (char *) "q_score", sizeof(struct q_score)}, - {NHTYPE_COMPLEX, (char *) "nhrect", sizeof(struct nhrect)}, - {NHTYPE_COMPLEX, (char *) "rm", sizeof(struct rm)}, - {NHTYPE_COMPLEX, (char *) "damage", sizeof(struct damage)}, - {NHTYPE_COMPLEX, (char *) "cemetery", sizeof(struct cemetery)}, - {NHTYPE_COMPLEX, (char *) "levelflags", sizeof(struct levelflags)}, - {NHTYPE_COMPLEX, (char *) "skills", sizeof(struct skills)}, - {NHTYPE_COMPLEX, (char *) "spell", sizeof(struct spell)}, - {NHTYPE_COMPLEX, (char *) "fe", sizeof(struct fe)}, - {NHTYPE_COMPLEX, (char *) "vlaunchinfo", sizeof(union vlaunchinfo)}, - {NHTYPE_COMPLEX, (char *) "trap", sizeof(struct trap)}, - {NHTYPE_COMPLEX, (char *) "u_have", sizeof(struct u_have)}, - {NHTYPE_COMPLEX, (char *) "u_event", sizeof(struct u_event)}, - {NHTYPE_COMPLEX, (char *) "u_achieve", sizeof(struct u_achieve)}, - {NHTYPE_COMPLEX, (char *) "u_realtime", sizeof(struct u_realtime)}, - {NHTYPE_COMPLEX, (char *) "u_conduct", sizeof(struct u_conduct)}, - {NHTYPE_COMPLEX, (char *) "u_roleplay", sizeof(struct u_roleplay)}, - {NHTYPE_COMPLEX, (char *) "you", sizeof(struct you)} -}; - -int nhdatatypes_size() -{ - return SIZE(nhdatatypes); -} - -const char *critical_members[] = { - "struct align:type:aligntyp", - "struct align:record:int", - "struct attribs:a:schar", - "struct bill_x:bo_id:unsigned", - "struct bill_x:useup:boolean", - "struct bill_x:price:long", - "struct bill_x:bquan:long", - "struct book_info:book:struct obj *", - "struct book_info:o_id:unsigned", - "struct book_info:delay:schar", - "struct branch:next:struct branch *", - "struct branch:id:int", - "struct branch:type:int", - "struct branch:end1:d_level", - "struct branch:end2:d_level", - "struct branch:end1_up:boolean", - "struct bubble:x:xchar", - "struct bubble:y:xchar", - "struct bubble:dx:schar", - "struct bubble:dy:schar", - "struct bubble:bm:uchar", - "struct bubble:prev:struct bubble *", - "struct bubble:next:struct bubble *", - "struct bubble:cons:struct container *", - "struct cemetery:next:struct cemetery *", - "struct cemetery:who:char", - "struct cemetery:how:char", - "struct cemetery:when:char", - "struct cemetery:frpx:schar", - "struct cemetery:frpy:schar", - "struct cemetery:bonesknown:boolean", - "struct context_info:ident:unsigned", - "struct context_info:no_of_wizards:unsigned", - "struct context_info:run:unsigned", - "struct context_info:startingpet_mid:unsigned", - "struct context_info:current_fruit:int", - "struct context_info:warnlevel:int", - "struct context_info:rndencode:int", - "struct context_info:mysteryforce:int", - "struct context_info:next_attrib_check:long", - "struct context_info:stethoscope_move:long", - "struct context_info:stethoscope_movement:short", - "struct context_info:travel:boolean", - "struct context_info:travel1:boolean", - "struct context_info:forcefight:boolean", - "struct context_info:nopick:boolean", - "struct context_info:made_amulet:boolean", - "struct context_info:mon_moving:boolean", - "struct context_info:move:boolean", - "struct context_info:mv:boolean", - "struct context_info:bypasses:boolean", - "struct context_info:botl:boolean", - "struct context_info:botlx:boolean", - "struct context_info:door_opened:boolean", - "struct context_info:digging:dig_info", - "struct context_info:victual:victual_info", - "struct context_info:tin:tin_info", - "struct context_info:spbook:book_info", - "struct context_info:takeoff:takeoff_info", - "struct context_info:warntype:warntype_info", - "struct context_info:polearm:polearm_info", - "struct context_info:objsplit:obj_split", - "struct context_info:tribute:tribute_info", - "struct context_info:novel:novel_tracking", - "struct d_flags:town:Bitfield(town, 1)", - "struct d_flags:hellish:Bitfield(hellish, 1)", - "struct d_flags:maze_like:Bitfield(maze_like, 1)", - "struct d_flags:rogue_like:Bitfield(rogue_like, 1)", - "struct d_flags:align:Bitfield(align, 3)", - "struct d_flags:unused:Bitfield(unused, 1)", - "struct d_level:dnum:xchar", - "struct d_level:dlevel:xchar", - "struct damage:next:struct damage *", - "struct damage:when:long", - "struct damage:cost:long", - "struct damage:place:nhcoord", - "struct damage:typ:schar", - "struct dest_area:lx:xchar", - "struct dest_area:ly:xchar", - "struct dest_area:hx:xchar", - "struct dest_area:hy:xchar", - "struct dest_area:nlx:xchar", - "struct dest_area:nly:xchar", - "struct dest_area:nhx:xchar", - "struct dest_area:nhy:xchar", - "struct dgn_topology:d_oracle_level:d_level", - "struct dgn_topology:d_bigroom_level:d_level", - "struct dgn_topology:d_rogue_level:d_level", - "struct dgn_topology:d_medusa_level:d_level", - "struct dgn_topology:d_stronghold_level:d_level", - "struct dgn_topology:d_valley_level:d_level", - "struct dgn_topology:d_wiz1_level:d_level", - "struct dgn_topology:d_wiz2_level:d_level", - "struct dgn_topology:d_wiz3_level:d_level", - "struct dgn_topology:d_juiblex_level:d_level", - "struct dgn_topology:d_orcus_level:d_level", - "struct dgn_topology:d_baalzebub_level:d_level", - "struct dgn_topology:d_asmodeus_level:d_level", - "struct dgn_topology:d_portal_level:d_level", - "struct dgn_topology:d_sanctum_level:d_level", - "struct dgn_topology:d_earth_level:d_level", - "struct dgn_topology:d_water_level:d_level", - "struct dgn_topology:d_fire_level:d_level", - "struct dgn_topology:d_air_level:d_level", - "struct dgn_topology:d_astral_level:d_level", - "struct dgn_topology:d_tower_dnum:xchar", - "struct dgn_topology:d_sokoban_dnum:xchar", - "struct dgn_topology:d_mines_dnum:xchar", - "struct dgn_topology:d_quest_dnum:xchar", - "struct dgn_topology:d_qstart_level:d_level", - "struct dgn_topology:d_qlocate_level:d_level", - "struct dgn_topology:d_nemesis_level:d_level", - "struct dgn_topology:d_knox_level:d_level", - "struct dgn_topology:d_mineend_level:d_level", - "struct dgn_topology:d_sokoend_level:d_level", - "struct dig_info:effort:int", - "struct dig_info:level:d_level", - "struct dig_info:pos:nhcoord", - "struct dig_info:lastdigtime:long", - "struct dig_info:down:boolean", - "struct dig_info:chew:boolean", - "struct dig_info:warned:boolean", - "struct dig_info:quiet:boolean", - "struct dungeon:dname:char", - "struct dungeon:proto:char", - "struct dungeon:boneid:char", - "struct dungeon:flags:d_flags", - "struct dungeon:entry_lev:xchar", - "struct dungeon:num_dunlevs:xchar", - "struct dungeon:dunlev_ureached:xchar", - "struct dungeon:ledger_start:int", - "struct dungeon:depth_start:int", - "struct edog:droptime:long", - "struct edog:dropdist:unsigned", - "struct edog:apport:int", - "struct edog:whistletime:long", - "struct edog:hungrytime:long", - "struct edog:ogoal:nhcoord", - "struct edog:abuse:int", - "struct edog:revivals:int", - "struct edog:mhpmax_penalty:int", - "struct edog:killed_by_u:Bitfield(killed_by_u, 1)", - "struct egd:fcbeg:int", - "struct egd:fcend:int", - "struct egd:vroom:int", - "struct egd:gdx:xchar", - "struct egd:gdy:xchar", - "struct egd:ogx:xchar", - "struct egd:ogy:xchar", - "struct egd:gdlevel:d_level", - "struct egd:warncnt:xchar", - "struct egd:gddone:Bitfield(gddone, 1)", - "struct egd:witness:Bitfield(witness, 2)", - "struct egd:unused:Bitfield(unused, 5)", - "struct egd:fakecorr:fakecorridor", - "struct emin:min_align:aligntyp", - "struct emin:renegade:boolean", - "struct engr:nxt_engr:struct engr *", - "struct engr:engr_txt:char *", - "struct engr:engr_x:xchar", - "struct engr:engr_y:xchar", - "struct engr:engr_lth:unsigned", - "struct engr:engr_time:long", - "struct engr:engr_type:xchar", - "struct epri:shralign:aligntyp", - "struct epri:shroom:schar", - "struct epri:shrpos:nhcoord", - "struct epri:shrlevel:d_level", - "struct epri:intone_time:long", - "struct epri:enter_time:long", - "struct epri:hostile_time:long", - "struct epri:peaceful_time:long", - "struct eshk:robbed:long", - "struct eshk:credit:long", - "struct eshk:debit:long", - "struct eshk:loan:long", - "struct eshk:shoptype:int", - "struct eshk:shoproom:schar", - "struct eshk:unused:schar", - "struct eshk:following:boolean", - "struct eshk:surcharge:boolean", - "struct eshk:dismiss_kops:boolean", - "struct eshk:shk:nhcoord", - "struct eshk:shd:nhcoord", - "struct eshk:shoplevel:d_level", - "struct eshk:billct:int", - "struct eshk:bill:bill_x", - "struct eshk:bill_p:struct bill_x *", - "struct eshk:visitct:int", - "struct eshk:customer:char", - "struct eshk:shknam:char", - "struct fakecorridor:fx:xchar", - "struct fakecorridor:fy:xchar", - "struct fakecorridor:ftyp:xchar", - "struct fe:next:struct fe *", - "struct fe:timeout:long", - "struct fe:tid:unsigned long", - "struct fe:kind:short", - "struct fe:func_index:short", - "struct fe:arg:any", - "struct fe:needs_fixup:Bitfield(needs_fixup, 1)", - "struct flag:acoustics:boolean", - "struct flag:autodig:boolean", - "struct flag:autoquiver:boolean", - "struct flag:autoopen:boolean", - "struct flag:beginner:boolean", - "struct flag:biff:boolean", - "struct flag:bones:boolean", - "struct flag:confirm:boolean", - "struct flag:dark_room:boolean", - "struct flag:debug:boolean", - "struct flag:end_own:boolean", - "struct flag:explore:boolean", - "struct flag:female:boolean", - "struct flag:friday13:boolean", - "struct flag:goldX:boolean", - "struct flag:help:boolean", - "struct flag:ignintr:boolean", - "struct flag:ins_chkpt:boolean", - "struct flag:invlet_constant:boolean", - "struct flag:legacy:boolean", - "struct flag:lit_corridor:boolean", - "struct flag:nap:boolean", - "struct flag:null:boolean", - "struct flag:pickup:boolean", - "struct flag:pickup_thrown:boolean", - "struct flag:pushweapon:boolean", - "struct flag:rest_on_space:boolean", - "struct flag:safe_dog:boolean", - "struct flag:showexp:boolean", - "struct flag:showscore:boolean", - "struct flag:silent:boolean", - "struct flag:sortpack:boolean", - "struct flag:sparkle:boolean", - "struct flag:standout:boolean", - "struct flag:time:boolean", - "struct flag:tombstone:boolean", - "struct flag:verbose:boolean", - "struct flag:end_top:int", - "struct flag:end_around:int", - "struct flag:moonphase:unsigned", - "struct flag:suppress_alert:unsigned long", - "struct flag:paranoia_bits:unsigned", - "struct flag:pickup_burden:int", - "struct flag:pile_limit:int", - "struct flag:sortloot:char", - "struct flag:inv_order:char", - "struct flag:pickup_types:char", - "struct flag:end_disclose:char", - "struct flag:menu_style:char", - "struct flag:made_fruit:boolean", - "struct flag:initrole:int", - "struct flag:initrace:int", - "struct flag:initgend:int", - "struct flag:initalign:int", - "struct flag:randomall:int", - "struct flag:pantheon:int", - "struct flag:lootabc:boolean", - "struct flag:showrace:boolean", - "struct flag:travelcmd:boolean", - "struct flag:runmode:int", - "struct fruit:fname:char", - "struct fruit:fid:int", - "struct fruit:nextf:struct fruit *", - "struct kinfo:next:struct kinfo *", - "struct kinfo:id:int", - "struct kinfo:format:int", - "struct kinfo:name:char", - "struct levelflags:nfountains:uchar", - "struct levelflags:nsinks:uchar", - "struct levelflags:has_shop:Bitfield(has_shop, 1)", - "struct levelflags:has_vault:Bitfield(has_vault, 1)", - "struct levelflags:has_zoo:Bitfield(has_zoo, 1)", - "struct levelflags:has_court:Bitfield(has_court, 1)", - "struct levelflags:has_morgue:Bitfield(has_morgue, 1)", - "struct levelflags:has_beehive:Bitfield(has_beehive, 1)", - "struct levelflags:has_barracks:Bitfield(has_barracks, 1)", - "struct levelflags:has_temple:Bitfield(has_temple, 1)", - "struct levelflags:has_swamp:Bitfield(has_swamp, 1)", - "struct levelflags:noteleport:Bitfield(noteleport, 1)", - "struct levelflags:hardfloor:Bitfield(hardfloor, 1)", - "struct levelflags:nommap:Bitfield(nommap, 1)", - "struct levelflags:hero_memory:Bitfield(hero_memory, 1)", - "struct levelflags:shortsighted:Bitfield(shortsighted, 1)", - "struct levelflags:graveyard:Bitfield(graveyard, 1)", - "struct levelflags:sokoban_rules:Bitfield(sokoban_rules, 1)", - "struct levelflags:is_maze_lev:Bitfield(is_maze_lev, 1)", - "struct levelflags:is_cavernous_lev:Bitfield(is_cavernous_lev, 1)", - "struct levelflags:arboreal:Bitfield(arboreal, 1)", - "struct levelflags:wizard_bones:Bitfield(wizard_bones, 1)", - "struct levelflags:corrmaze:Bitfield(corrmaze, 1)", - "struct linfo:flags:unsigned char", -#ifdef MFLOPPY - "struct linfo:where:int", - "struct linfo:time:long", - "struct linfo:size:long", -#endif /*MFLOPPY*/ - "struct ls_t:next:struct ls_t *", - "struct ls_t:x:xchar", - "struct ls_t:y:xchar", - "struct ls_t:range:short", - "struct ls_t:flags:short", - "struct ls_t:type:short", - "struct ls_t:id:any", - "struct mapseen_feat:nfount:Bitfield(nfount, 2)", - "struct mapseen_feat:nsink:Bitfield(nsink, 2)", - "struct mapseen_feat:naltar:Bitfield(naltar, 2)", - "struct mapseen_feat:nthrone:Bitfield(nthrone, 2)", - "struct mapseen_feat:ngrave:Bitfield(ngrave, 2)", - "struct mapseen_feat:ntree:Bitfield(ntree, 2)", - "struct mapseen_feat:water:Bitfield(water, 2)", - "struct mapseen_feat:lava:Bitfield(lava, 2)", - "struct mapseen_feat:ice:Bitfield(ice, 2)", - "struct mapseen_feat:nshop:Bitfield(nshop, 2)", - "struct mapseen_feat:ntemple:Bitfield(ntemple, 2)", - "struct mapseen_feat:msalign:Bitfield(msalign, 2)", - "struct mapseen_feat:shoptype:Bitfield(shoptype, 5)", - "struct mapseen_flags:unreachable:Bitfield(unreachable, 1)", - "struct mapseen_flags:forgot:Bitfield(forgot, 1)", - "struct mapseen_flags:knownbones:Bitfield(knownbones, 1)", - "struct mapseen_flags:oracle:Bitfield(oracle, 1)", - "struct mapseen_flags:sokosolved:Bitfield(sokosolved, 1)", - "struct mapseen_flags:bigroom:Bitfield(bigroom, 1)", - "struct mapseen_flags:castle:Bitfield(castle, 1)", - "struct mapseen_flags:castletune:Bitfield(castletune, 1)", - "struct mapseen_flags:valley:Bitfield(valley, 1)", - "struct mapseen_flags:msanctum:Bitfield(msanctum, 1)", - "struct mapseen_flags:ludios:Bitfield(ludios, 1)", - "struct mapseen_flags:roguelevel:Bitfield(roguelevel, 1)", - "struct mapseen_flags:quest_summons:Bitfield(quest_summons, 1)", - "struct mapseen_flags:questing:Bitfield(questing, 1)", - "struct mapseen_flags:vibrating_square:Bitfield(vibrating_square, 1)", - "struct mapseen_flags:spare1:Bitfield(spare1, 1)", - "struct mapseen_rooms:seen:Bitfield(seen, 1)", - "struct mapseen_rooms:untended:Bitfield(untended, 1)", - "struct mapseen:next:struct mapseen *", - "struct mapseen:br:branch *", - "struct mapseen:lev:d_level", - "struct mapseen:feat:mapseen_feat", - "struct mapseen:flags:mapseen_flags", - "struct mapseen:custom:char *", - "struct mapseen:custom_lth:unsigned", - "struct mapseen:msrooms:mapseen_rooms", - "struct mapseen:final_resting_place:struct cemetery *", - "struct mextra:mname:char *", - "struct mextra:egd:struct egd *", - "struct mextra:epri:struct epri *", - "struct mextra:eshk:struct eshk *", - "struct mextra:emin:struct emin *", - "struct mextra:edog:struct edog *", - "struct mextra:mcorpsenm:int", - "struct mkroom:lx:schar", - "struct mkroom:hx:schar", - "struct mkroom:ly:schar", - "struct mkroom:hy:schar", - "struct mkroom:rtype:schar", - "struct mkroom:orig_rtype:schar", - "struct mkroom:rlit:schar", - "struct mkroom:needfill:schar", - "struct mkroom:needjoining:schar", - "struct mkroom:doorct:schar", - "struct mkroom:fdoor:schar", - "struct mkroom:nsubrooms:schar", - "struct mkroom:irregular:boolean", - "struct mkroom:sbrooms:struct mkroom *", - "struct mkroom:resident:struct monst *", - "struct monst:nmon:struct monst *", - "struct monst:data:struct permonst *", - "struct monst:m_id:unsigned", - "struct monst:mnum:short", - "struct monst:cham:short", - "struct monst:movement:short", - "struct monst:m_lev:uchar", - "struct monst:malign:aligntyp", - "struct monst:mx:xchar", - "struct monst:my:xchar", - "struct monst:mux:xchar", - "struct monst:muy:xchar", - "struct monst:mtrack:nhcoord", - "struct monst:mhp:int", - "struct monst:mhpmax:int", - "struct monst:mappearance:unsigned", - "struct monst:m_ap_type:uchar", - "struct monst:mtame:schar", - "struct monst:mextrinsics:unsigned short", - "struct monst:mspec_used:int", - "struct monst:female:Bitfield(female, 1)", - "struct monst:minvis:Bitfield(minvis, 1)", - "struct monst:invis_blkd:Bitfield(invis_blkd, 1)", - "struct monst:perminvis:Bitfield(perminvis, 1)", - "struct monst:mcan:Bitfield(mcan, 1)", - "struct monst:mburied:Bitfield(mburied, 1)", - "struct monst:mundetected:Bitfield(mundetected, 1)", - "struct monst:mcansee:Bitfield(mcansee, 1)", - "struct monst:mspeed:Bitfield(mspeed, 2)", - "struct monst:permspeed:Bitfield(permspeed, 2)", - "struct monst:mrevived:Bitfield(mrevived, 1)", - "struct monst:mcloned:Bitfield(mcloned, 1)", - "struct monst:mavenge:Bitfield(mavenge, 1)", - "struct monst:mflee:Bitfield(mflee, 1)", - "struct monst:mfleetim:Bitfield(mfleetim, 7)", - "struct monst:msleeping:Bitfield(msleeping, 1)", - "struct monst:mblinded:Bitfield(mblinded, 7)", - "struct monst:mstun:Bitfield(mstun, 1)", - "struct monst:mfrozen:Bitfield(mfrozen, 7)", - "struct monst:mcanmove:Bitfield(mcanmove, 1)", - "struct monst:mconf:Bitfield(mconf, 1)", - "struct monst:mpeaceful:Bitfield(mpeaceful, 1)", - "struct monst:mtrapped:Bitfield(mtrapped, 1)", - "struct monst:mleashed:Bitfield(mleashed, 1)", - "struct monst:isshk:Bitfield(isshk, 1)", - "struct monst:isminion:Bitfield(isminion, 1)", - "struct monst:isgd:Bitfield(isgd, 1)", - "struct monst:ispriest:Bitfield(ispriest, 1)", - "struct monst:iswiz:Bitfield(iswiz, 1)", - "struct monst:wormno:Bitfield(wormno, 5)", - "struct monst:mtemplit:Bitfield(mtemplit, 1)", - "struct monst:mstrategy:unsigned long", - "struct monst:mtrapseen:long", - "struct monst:mlstmv:long", - "struct monst:mstate:long", - "struct monst:migflags:long", - "struct monst:mspare1:long", - "struct monst:minvent:struct obj *", - "struct monst:mw:struct obj *", - "struct monst:misc_worn_check:long", - "struct monst:weapon_check:xchar", - "struct monst:meating:int", - "struct monst:mextra:struct mextra *", - "struct mvitals:born:uchar", - "struct mvitals:died:uchar", - "struct mvitals:mvflags:uchar", - "struct nhcoord:x:xchar", - "struct nhcoord:y:xchar", - "struct nhrect:lx:xchar", - "struct nhrect:ly:xchar", - "struct nhrect:hx:xchar", - "struct nhrect:hy:xchar", - "struct novel_tracking:id:unsigned", - "struct novel_tracking:count:int", - "struct novel_tracking:pasg:xchar", - "struct obj:nobj:struct obj *", - "struct obj:v:vptrs", - "struct obj:cobj:struct obj *", - "struct obj:o_id:unsigned", - "struct obj:ox:xchar", - "struct obj:oy:xchar", - "struct obj:otyp:short", - "struct obj:owt:unsigned", - "struct obj:quan:long", - "struct obj:spe:schar", - "struct obj:oclass:char", - "struct obj:invlet:char", - "struct obj:oartifact:char", - "struct obj:where:xchar", - "struct obj:timed:xchar", - "struct obj:cursed:Bitfield(cursed, 1)", - "struct obj:blessed:Bitfield(blessed, 1)", - "struct obj:unpaid:Bitfield(unpaid, 1)", - "struct obj:no_charge:Bitfield(no_charge, 1)", - "struct obj:known:Bitfield(known, 1)", - "struct obj:dknown:Bitfield(dknown, 1)", - "struct obj:bknown:Bitfield(bknown, 1)", - "struct obj:rknown:Bitfield(rknown, 1)", - "struct obj:oeroded:Bitfield(oeroded, 2)", - "struct obj:oeroded2:Bitfield(oeroded2, 2)", - "struct obj:oerodeproof:Bitfield(oerodeproof, 1)", - "struct obj:olocked:Bitfield(olocked, 1)", - "struct obj:obroken:Bitfield(obroken, 1)", - "struct obj:otrapped:Bitfield(otrapped, 1)", - "struct obj:recharged:Bitfield(recharged, 3)", - "struct obj:lamplit:Bitfield(lamplit, 1)", - "struct obj:globby:Bitfield(globby, 1)", - "struct obj:greased:Bitfield(greased, 1)", - "struct obj:nomerge:Bitfield(nomerge, 1)", - "struct obj:was_thrown:Bitfield(was_thrown, 1)", - "struct obj:in_use:Bitfield(in_use, 1)", - "struct obj:bypass:Bitfield(bypass, 1)", - "struct obj:cknown:Bitfield(cknown, 1)", - "struct obj:lknown:Bitfield(lknown, 1)", - "struct obj:corpsenm:int", - "struct obj:usecount:int", - "struct obj:oeaten:unsigned", - "struct obj:age:long", - "struct obj:owornmask:long", - "struct obj:oextra:struct oextra *", - "struct objclass:oc_name_idx:short", - "struct objclass:oc_descr_idx:short", - "struct objclass:oc_uname:char *", - "struct objclass:oc_name_known:Bitfield(oc_name_known, 1)", - "struct objclass:oc_merge:Bitfield(oc_merge, 1)", - "struct objclass:oc_uses_known:Bitfield(oc_uses_known, 1)", - "struct objclass:oc_pre_discovered:Bitfield(oc_pre_discovered, 1)", - "struct objclass:oc_magic:Bitfield(oc_magic, 1)", - "struct objclass:oc_charged:Bitfield(oc_charged, 1)", - "struct objclass:oc_unique:Bitfield(oc_unique, 1)", - "struct objclass:oc_nowish:Bitfield(oc_nowish, 1)", - "struct objclass:oc_big:Bitfield(oc_big, 1)", - "struct objclass:oc_tough:Bitfield(oc_tough, 1)", - "struct objclass:oc_dir:Bitfield(oc_dir, 2)", - "struct objclass:oc_material:Bitfield(oc_material, 5)", - "struct objclass:oc_subtyp:schar", - "struct objclass:oc_oprop:uchar", - "struct objclass:oc_class:char", - "struct objclass:oc_delay:schar", - "struct objclass:oc_color:uchar", - "struct objclass:oc_prob:short", - "struct objclass:oc_weight:unsigned short", - "struct objclass:oc_cost:short", - "struct objclass:oc_wsdam:schar", - "struct objclass:oc_wldam:schar", - "struct objclass:oc_oc1:schar", - "struct objclass:oc_oc2:schar", - "struct objclass:oc_nutrition:unsigned short", - "struct obj_split:parent_oid:unsigned", - "struct obj_split:child_oid:unsigned", - "struct oextra:oname:char *", - "struct oextra:omonst:struct monst *", - "struct oextra:omid:unsigned *", - "struct oextra:olong:long *", - "struct oextra:omailcmd:char *", - "struct polearm_info:hitmon:struct monst *", - "struct polearm_info:m_id:unsigned", - "struct prop:extrinsic:long", - "struct prop:blocked:long", - "struct prop:intrinsic:long", - "struct q_score:first_start:Bitfield(first_start, 1)", - "struct q_score:met_leader:Bitfield(met_leader, 1)", - "struct q_score:not_ready:Bitfield(not_ready, 3)", - "struct q_score:pissed_off:Bitfield(pissed_off, 1)", - "struct q_score:got_quest:Bitfield(got_quest, 1)", - "struct q_score:first_locate:Bitfield(first_locate, 1)", - "struct q_score:met_intermed:Bitfield(met_intermed, 1)", - "struct q_score:got_final:Bitfield(got_final, 1)", - "struct q_score:made_goal:Bitfield(made_goal, 3)", - "struct q_score:met_nemesis:Bitfield(met_nemesis, 1)", - "struct q_score:killed_nemesis:Bitfield(killed_nemesis, 1)", - "struct q_score:in_battle:Bitfield(in_battle, 1)", - "struct q_score:cheater:Bitfield(cheater, 1)", - "struct q_score:touched_artifact:Bitfield(touched_artifact, 1)", - "struct q_score:offered_artifact:Bitfield(offered_artifact, 1)", - "struct q_score:got_thanks:Bitfield(got_thanks, 1)", - "struct q_score:ldrgend:Bitfield(ldrgend, 2)", - "struct q_score:nemgend:Bitfield(nemgend, 2)", - "struct q_score:godgend:Bitfield(godgend, 2)", - "struct q_score:leader_is_dead:Bitfield(leader_is_dead, 1)", - "struct q_score:leader_m_id:unsigned", - "struct rm:glyph:int", - "struct rm:typ:schar", - "struct rm:seenv:uchar", - "struct rm:flags:Bitfield(flags, 5)", - "struct rm:horizontal:Bitfield(horizontal, 1)", - "struct rm:lit:Bitfield(lit, 1)", - "struct rm:waslit:Bitfield(waslit, 1)", - "struct rm:roomno:Bitfield(roomno, 6)", - "struct rm:edge:Bitfield(edge, 1)", - "struct rm:candig:Bitfield(candig, 1)", - "struct s_level:next:struct s_level *", - "struct s_level:dlevel:d_level", - "struct s_level:proto:char", - "struct s_level:boneid:char", - "struct s_level:rndlevs:uchar", - "struct s_level:flags:d_flags", - "struct savefile_info:sfi1:unsigned long", - "struct savefile_info:sfi2:unsigned long", - "struct savefile_info:sfi3:unsigned long", - "struct skills:skill:xchar", - "struct skills:max_skill:xchar", - "struct skills:advance:unsigned short", - "struct spell:sp_id:short", - "struct spell:sp_lev:xchar", - "struct spell:sp_know:int", - "struct stairway:sx:xchar", - "struct stairway:sy:xchar", - "struct stairway:tolev:d_level", - "struct stairway:up:char", - "struct takeoff_info:mask:long", - "struct takeoff_info:what:long", - "struct takeoff_info:delay:int", - "struct takeoff_info:cancelled_don:boolean", - "struct takeoff_info:disrobing:char", - "struct tin_info:tin:struct obj *", - "struct tin_info:o_id:unsigned", - "struct tin_info:usedtime:int", - "struct tin_info:reqtime:int", - "struct trap:ntrap:struct trap *", - "struct trap:tx:xchar", - "struct trap:ty:xchar", - "struct trap:dst:d_level", - "struct trap:launch:nhcoord", - "struct trap:ttyp:Bitfield(ttyp, 5)", - "struct trap:tseen:Bitfield(tseen, 1)", - "struct trap:once:Bitfield(once, 1)", - "struct trap:madeby_u:Bitfield(madeby_u, 1)", - "struct trap:vl:vlaunchinfo", - "struct tribute_info:tributesz:size_t", - "struct tribute_info:enabled:boolean", - "struct tribute_info:bookstock:Bitfield(bookstock, 1)", - "struct tribute_info:Deathnotice:Bitfield(Deathnotice,1)", - "struct u_achieve:amulet:Bitfield(amulet, 1)", - "struct u_achieve:bell:Bitfield(bell, 1)", - "struct u_achieve:book:Bitfield(book, 1)", - "struct u_achieve:menorah:Bitfield(menorah, 1)", - "struct u_achieve:enter_gehennom:Bitfield(enter_gehennom,1)", - "struct u_achieve:ascended:Bitfield(ascended, 1)", - "struct u_achieve:mines_luckstone:Bitfield(mines_luckstone, 1)", - "struct u_achieve:finish_sokoban:Bitfield(finish_sokoban, 1)", - "struct u_achieve:killed_medusa:Bitfield(killed_medusa, 1)", - "struct u_conduct:unvegetarian:long", - "struct u_conduct:unvegan:long", - "struct u_conduct:food:long", - "struct u_conduct:gnostic:long", - "struct u_conduct:weaphit:long", - "struct u_conduct:killer:long", - "struct u_conduct:literate:long", - "struct u_conduct:polypiles:long", - "struct u_conduct:polyselfs:long", - "struct u_conduct:wishes:long", - "struct u_conduct:wisharti:long", - "struct u_event:minor_oracle:Bitfield(minor_oracle, 1)", - "struct u_event:major_oracle:Bitfield(major_oracle, 1)", - "struct u_event:read_tribute:Bitfield(read_tribute, 1)", - "struct u_event:qcalled:Bitfield(qcalled, 1)", - "struct u_event:qexpelled:Bitfield(qexpelled, 1)", - "struct u_event:qcompleted:Bitfield(qcompleted, 1)", - "struct u_event:uheard_tune:Bitfield(uheard_tune, 2)", - "struct u_event:uopened_dbridge:Bitfield(uopened_dbridge, 1)", - "struct u_event:invoked:Bitfield(invoked, 1)", - "struct u_event:gehennom_entered:Bitfield(gehennom_entered, 1)", - "struct u_event:uhand_of_elbereth:Bitfield(uhand_of_elbereth, 2)", - "struct u_event:udemigod:Bitfield(udemigod, 1)", - "struct u_event:uvibrated:Bitfield(uvibrated, 1)", - "struct u_event:ascended:Bitfield(ascended, 1)", - "struct u_have:amulet:Bitfield(amulet, 1)", - "struct u_have:bell:Bitfield(bell, 1)", - "struct u_have:book:Bitfield(book, 1)", - "struct u_have:menorah:Bitfield(menorah, 1)", - "struct u_have:questart:Bitfield(questart, 1)", - "struct u_have:unused:Bitfield(unused, 3)", - "struct u_realtime:realtime:long", - "struct u_realtime:start_timing:time_t", - "struct u_realtime:finish_time:time_t", - "struct u_roleplay:blind:boolean", - "struct u_roleplay:nudist:boolean", - "struct u_roleplay:numbones:long", - "struct version_info:incarnation:unsigned long", - "struct version_info:feature_set:unsigned long", - "struct version_info:entity_count:unsigned long", - "struct version_info:struct_sizes1:unsigned long", - "struct version_info:struct_sizes2:unsigned long", - "struct victual_info:piece:struct obj *", - "struct victual_info:o_id:unsigned", - "struct victual_info:usedtime:int", - "struct victual_info:reqtime:int", - "struct victual_info:nmod:int", - "struct victual_info:canchoke:Bitfield(canchoke, 1)", - "struct victual_info:fullwarn:Bitfield(fullwarn, 1)", - "struct victual_info:eating:Bitfield(eating, 1)", - "struct victual_info:doreset:Bitfield(doreset, 1)", - "union vlaunchinfo:v_launch_otyp:short", - "union vlaunchinfo:v_launch2:nhcoord", - "union vlaunchinfo:v_conjoined:uchar", - "union vlaunchinfo:v_tnote:short", - "union vptrs:v_nexthere:struct obj *", - "union vptrs:v_ocontainer:struct obj *", - "union vptrs:v_ocarry:struct monst *", - "struct warntype_info:obj:unsigned long", - "struct warntype_info:polyd:unsigned long", - "struct warntype_info:species:struct permonst *", - "struct warntype_info:speciesidx:short", - "struct you:ux:xchar", - "struct you:uy:xchar", - "struct you:dx:schar", - "struct you:dy:schar", - "struct you:dz:schar", - "struct you:di:schar", - "struct you:tx:xchar", - "struct you:ty:xchar", - "struct you:ux0:xchar", - "struct you:uy0:xchar", - "struct you:uz:d_level", - "struct you:uz0:d_level", - "struct you:utolev:d_level", - "struct you:utotype:uchar", - "struct you:umoved:boolean", - "struct you:last_str_turn:int", - "struct you:ulevel:int", - "struct you:ulevelmax:int", - "struct you:utrap:unsigned", - "struct you:utraptype:unsigned", - "struct you:urooms:char", - "struct you:urooms0:char", - "struct you:uentered:char", - "struct you:ushops:char", - "struct you:ushops0:char", - "struct you:ushops_entered:char", - "struct you:ushops_left:char", - "struct you:uhunger:int", - "struct you:uhs:unsigned", - "struct you:uprops:prop", - "struct you:umconf:unsigned", - "struct you:usick_type:Bitfield(usick_type, 2)", - "struct you:nv_range:int", - "struct you:xray_range:int", - "struct you:bglyph:int", - "struct you:cglyph:int", - "struct you:bc_order:int", - "struct you:bc_felt:int", - "struct you:umonster:int", - "struct you:umonnum:int", - "struct you:mh:int", - "struct you:mhmax:int", - "struct you:mtimedone:int", - "struct you:macurr:attribs", - "struct you:mamax:attribs", - "struct you:ulycn:int", - "struct you:ucreamed:unsigned", - "struct you:uswldtim:unsigned", - "struct you:uswallow:Bitfield(uswallow, 1)", - "struct you:uinwater:Bitfield(uinwater, 1)", - "struct you:uundetected:Bitfield(uundetected, 1)", - "struct you:mfemale:Bitfield(mfemale, 1)", - "struct you:uinvulnerable:Bitfield(uinvulnerable, 1)", - "struct you:uburied:Bitfield(uburied, 1)", - "struct you:uedibility:Bitfield(uedibility, 1)", - "struct you:udg_cnt:unsigned", - "struct you:uachieve:u_achieve", - "struct you:uevent:u_event", - "struct you:uhave:u_have", - "struct you:uconduct:u_conduct", - "struct you:uroleplay:u_roleplay", - "struct you:acurr:attribs", - "struct you:aexe:attribs", - "struct you:abon:attribs", - "struct you:amax:attribs", - "struct you:atemp:attribs", - "struct you:atime:attribs", - "struct you:ualign:align", - "struct you:ualignbase:aligntyp", - "struct you:uluck:schar", - "struct you:moreluck:schar", - "struct you:uhitinc:schar", - "struct you:udaminc:schar", - "struct you:uac:schar", - "struct you:uspellprot:uchar", - "struct you:usptime:uchar", - "struct you:uspmtime:uchar", - "struct you:uhp:int", - "struct you:uhpmax:int", - "struct you:uen:int", - "struct you:uenmax:int", - "struct you:uhpinc:xchar", - "struct you:ueninc:xchar", - "struct you:ugangr:int", - "struct you:ugifts:int", - "struct you:ublessed:int", - "struct you:ublesscnt:int", - "struct you:umoney0:long", - "struct you:uspare1:long", - "struct you:uexp:long", - "struct you:urexp:long", - "struct you:ucleansed:long", - "struct you:usleep:long", - "struct you:uinvault:int", - "struct you:ustuck:struct monst *", - "struct you:usteed:struct monst *", - "struct you:ugallop:long", - "struct you:urideturns:int", - "struct you:umortality:int", - "struct you:ugrave_arise:int", - "struct you:weapon_slots:int", - "struct you:skills_advanced:int", - "struct you:skill_record:xchar", - "struct you:weapon_skills:skills", - "struct you:twoweap:boolean", - "struct you:mcham:short", -}; - -int critical_members_count() -{ - return SIZE(critical_members); -} - -/*sfdata.c*/ diff --git a/src/sflendian.c b/src/sflendian.c deleted file mode 100644 index 3953a371e..000000000 --- a/src/sflendian.c +++ /dev/null @@ -1,1339 +0,0 @@ -/* NetHack 3.7 sflendian.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ -/* Copyright (c) M. Allison, 2019. */ -/* NetHack may be freely redistributed. See license for details. */ - -/* fieldlevel little-endian binary file */ - -#include "hack.h" -#include "integer.h" -#include "sfprocs.h" - -/* -+------------+--------+------+-------+-----------+--------+-----------+ -| Data model | short | int | long | long long | pointer| OS | -+------------+--------+------+-------+-----------+--------+-----------+ -| LLP64 | 16 | 32 | 32 | 64 | 64 | Windows | -+------------+--------+------+-------+-----------+--------+-----------+ -| LP64 | 16 | 32 | 64 | 64 | 64 | Most Unix | -+------------+--------+------+-------+-----------+--------+-----------+ -| ILP64 | 16 | 64 | 64 | 64 | 64 |HAL,SPARC64| -+------------+--------+------+-------+-----------+--------+-----------+ - - We're using this for NetHack's little-endian binary fieldlevel format - because it involves the fewest compromises (sorry SPARC64, - you'll have to use one of the text file formats instead): - - Data model | short | int | long | long long | pointer| OS | - LP64 | 16 | 32 | 64 | 64 | 64 | Most Unix | -*/ - -#if defined(_MSC_VER) -#include -#define bswap16(x) _byteswap_ushort(x) -#define bswap32(x) _byteswap_ulong(x) -#define bswap64(x) _byteswap_uint64(x) -#elif defined(__GNUC__) -#define bswap16(x) __builtin_bswap16(x) -#define bswap32(x) __builtin_bswap32(x) -#define bswap64(x) __builtin_bswap64(x) -#else -/* else use ais523 approach */ -# define bswap16(x) ((((x) & 0x00ffU) << 8) | \ - (((x) & 0xff00U) >> 8)) - -# define bswap32(x) ((((x) & 0x000000ffLU) << 24) | \ - (((x) & 0x0000ff00LU) << 8) | \ - (((x) & 0x00ff0000LU) >> 8) | \ - (((x) & 0xff000000LU) >> 24)) - -# define bswap64(x) ((((x) & 0x00000000000000ffLLU) << 56) | \ - (((x) & 0x000000000000ff00LLU) << 40) | \ - (((x) & 0x0000000000ff0000LLU) << 24) | \ - (((x) & 0x00000000ff000000LLU) << 8) | \ - (((x) & 0x000000ff00000000LLU) << 8) | \ - (((x) & 0x0000ff0000000000LLU) << 24) | \ - (((x) & 0x00ff000000000000LLU) << 40) | \ - (((x) & 0xff00000000000000LLU) << 56)) -#endif - -#ifdef SAVEFILE_DEBUGGING -#if defined(__GNUC__) -#define DEBUGFORMATSTR64 "%s %s %ld %ld %d\n" -#elif defined(_MSC_VER) -#define DEBUGFORMATSTR64 "%s %s %lld %ld %d\n" -#endif -#endif - -struct sf_procs lendian_sfo_procs = { - ".le", - { - lendian_sfo_aligntyp, - lendian_sfo_any, - lendian_sfo_bitfield, - lendian_sfo_boolean, - lendian_sfo_char, - lendian_sfo_genericptr, - lendian_sfo_int, - lendian_sfo_long, - lendian_sfo_schar, - lendian_sfo_short, - lendian_sfo_size_t, - lendian_sfo_time_t, - lendian_sfo_unsigned, - lendian_sfo_uchar, - lendian_sfo_uint, - lendian_sfo_ulong, - lendian_sfo_ushort, - lendian_sfo_xchar, - lendian_sfo_str, - lendian_sfo_addinfo, - } -}; - -struct sf_procs lendian_sfi_procs = -{ - ".le", - { - lendian_sfi_aligntyp, - lendian_sfi_any, - lendian_sfi_bitfield, - lendian_sfi_boolean, - lendian_sfi_char, - lendian_sfi_genericptr, - lendian_sfi_int, - lendian_sfi_long, - lendian_sfi_schar, - lendian_sfi_short, - lendian_sfi_size_t, - lendian_sfi_time_t, - lendian_sfi_unsigned, - lendian_sfi_uchar, - lendian_sfi_uint, - lendian_sfi_ulong, - lendian_sfi_ushort, - lendian_sfi_xchar, - lendian_sfi_str, - lendian_sfi_addinfo, - } -}; - -#ifdef SAVEFILE_DEBUGGING -static long floc = 0L; -#endif - -/* - *---------------------------------------------------------------------------- - * sfo_lendian_ routines - * - * Default output routines. - * - *---------------------------------------------------------------------------- - */ - -void -lendian_sfo_any(nhfp, d_any, myparent, myname, cnt) -NHFILE *nhfp; -union any *d_any; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ -/* const char *parent = "any"; */ - int i; - uint64_t ui64; - int64_t i64; - uint32_t ui32; - int32_t i32; - int8_t i8; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - ui64 = (uint64_t) d_any->a_void; - fwrite(&ui64, sizeof ui64, 1, nhfp->fpdef); - i64 = (int64_t) d_any->a_ulong; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %ld %ld %d\n", myname, - "any", - d_any->a_ulong, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&i64, sizeof i64, 1, nhfp->fpdef); - ui32 = (uint32_t) d_any->a_uint; - fwrite(&ui32, sizeof ui32, 1, nhfp->fpdef); - i32 = (int32_t) d_any->a_int; - fwrite(&i32, sizeof i32, 1, nhfp->fpdef); - i8 = (int8_t) d_any->a_char; - fwrite(&i8, sizeof i8, 1, nhfp->fpdef); - d_any++; - } -#if 0 - sfo_genericptr(nhfp, d_any->a_void, parent, "a_void", 1); /* (genericptr_t) */ - sfo_genericptr(nhfp, d_any->a_obj, parent, "a_obj", 1); /* (struct obj *) */ - sfo_genericptr(nhfp, d_any->a_monst, parent, "a_monst", 1); /* (struct monst *) */ - sfo_int(nhfp, &d_any->a_int, parent, "a_int", 1); /* (int) */ - sfo_char(nhfp, &d_any->a_char, parent, "a_char", 1); /* (char) */ - sfo_schar(nhfp, &d_any->a_schar, parent, "a_schar", 1); /* (schar) */ - sfo_uchar(nhfp, &d_any->a_uchar, parent, "a_uchar", 1); /* (uchar) */ - sfo_uint(nhfp, &d_any->a_uint, parent, "a_uint", 1); /* (unsigned int) */ - sfo_long(nhfp, &d_any->a_long, parent, "a_long", 1); /* (long) */ - sfo_ulong(nhfp, &d_any->a_ulong, parent, "a_ulong", 1); /* (unsigned long) */ - sfo_genericptr(nhfp, d_any->a_iptr, parent, "a_iptr", 1); /* (int *) */ - sfo_genericptr(nhfp, d_any->a_lptr, parent, "a_lptr", 1); /* (long *) */ - sfo_genericptr(nhfp, d_any->a_ulptr, parent, "a_ulptr", 1); /* (unsigned long *) */ - sfo_genericptr(nhfp, d_any->a_uptr, parent, "a_uptr", 1); /* (unsigned *) */my - sfo_genericptr(nhfp, d_any->a_string, parent, "a_string", 1); /* (const char *) */ - sfo_ulong(nhfp, &d_any->a_mask32, parent, "a_mask32", 1); /* (unsigned long) */ -#endif -} - -void -lendian_sfo_aligntyp(nhfp, d_aligntyp, myparent, myname, cnt) -NHFILE *nhfp; -aligntyp *d_aligntyp; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ -/* const char *parent = "aligntyp"; */ - int i; - int16_t val; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - val = nhfp->bendian ? bswap16(*d_aligntyp) : *d_aligntyp; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %hd %ld %d\n", myname, - "aligntyp", - val, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&val, sizeof val, 1, nhfp->fpdef); - d_aligntyp++; - } -} - -void -lendian_sfo_bitfield(nhfp, d_bitfield, myparent, myname, cnt) -NHFILE *nhfp; -uint8_t *d_bitfield; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt UNUSED; -{ -/* const char *parent = "bitfield"; */ - - /* nhUse(parent); */ - /* for bitfields, cnt is the number of bits, not an array */ -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, - "bitfield", - (int) *d_bitfield, ftell(nhfp->fpdef), cnt); -#endif - fwrite(d_bitfield, sizeof *d_bitfield, 1, nhfp->fpdef); -} - -void -lendian_sfo_boolean(nhfp, d_boolean, myparent, myname, cnt) -NHFILE *nhfp; -boolean *d_boolean; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ -/* const char *parent = "boolean"; */ - int i; - int8_t val; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - val = *d_boolean; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, - "boolean", - (int) val, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&val, sizeof val, 1, nhfp->fpdef); - d_boolean++; - } -} - -void -lendian_sfo_char(nhfp, d_char, myparent, myname, cnt) -NHFILE *nhfp; -char *d_char; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -/* const char *parent = "char"; */ - int8_t val; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - val = *d_char; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, - "char", - (int) val, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&val, sizeof val, 1, nhfp->fpdef); - d_char++; - } -} - -void -lendian_sfo_genericptr(nhfp, d_genericptr, myparent, myname, cnt) -NHFILE *nhfp; -genericptr_t *d_genericptr; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - int8_t p; - - /* - * sbrooms is an array of pointers to mkroom. - * That array dimension is MAX_SUBROOMS. - * Even though the pointers themselves won't - * be valid, we need to account for the existence - * of the elements of that array, and whether each - * is zero or non-zero. - * - * We only consume a single byte in the file for that - * and we expand it back to pointer size later when - * we read it back in, again preserving zero or non-zero. - */ - - for (i = 0; i < cnt; ++i) { - p = (*d_genericptr) ? 1 : 0; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, - "genericptr", - (int) p, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&p, sizeof p, 1, nhfp->fpdef); - d_genericptr++; - } -} - -void -lendian_sfo_int(nhfp, d_int, myparent, myname, cnt) -NHFILE *nhfp; -int *d_int; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -/* const char *parent = "int"; */ - int32_t i32, val; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - i32 = (int32_t) *d_int; - val = nhfp->bendian ? bswap32(i32) : i32; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, - "int", - val, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&val, sizeof val, 1, nhfp->fpdef); - d_int++; - } -} - -void -lendian_sfo_long(nhfp, d_long, myparent, myname, cnt) -NHFILE *nhfp; -long *d_long; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -/* const char *parent = "long"; */ - int64_t i64, val64; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - i64 = (int64_t) *d_long; - val64 = nhfp->bendian ? bswap64(i64) : i64; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug, DEBUGFORMATSTR64, myname, - "long", - val64, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&val64, sizeof val64, 1, nhfp->fpdef); - d_long++; - } -} - -void -lendian_sfo_schar(nhfp, d_schar, myparent, myname, cnt) -NHFILE *nhfp; -schar *d_schar; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - int8_t itmp; -/* const char *parent = "schar"; */ - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - itmp = (int8_t) *d_schar; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, - "schar", - (int) itmp, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&itmp, sizeof itmp, 1, nhfp->fpdef); - d_schar++; - } -} - -void -lendian_sfo_short(nhfp, d_short, myparent, myname, cnt) -NHFILE *nhfp; -short *d_short; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - int16_t itmp; -/* const char *parent = "short"; */ - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - itmp = (int16_t) *d_short; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %hd %ld %d\n", myname, - "short", - itmp, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&itmp, sizeof itmp, 1, nhfp->fpdef); - d_short++; - } -} - -void -lendian_sfo_size_t(nhfp, d_size_t, myparent, myname, cnt) -NHFILE *nhfp; -size_t *d_size_t; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - uint64_t ui64, val; -/* const char *parent = "size_t"; */ - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - ui64 = (uint64_t) *d_size_t; - val = nhfp->bendian ? bswap64(ui64) : ui64; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug, DEBUGFORMATSTR64, myname, - "size_t", - val, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&val, sizeof val, 1, nhfp->fpdef); - d_size_t++; - } -} - -void -lendian_sfo_time_t(nhfp, d_time_t, myparent, myname, cnt) -NHFILE *nhfp; -time_t *d_time_t; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt UNUSED; -{ - char buf[BUFSZ]; -/* const char *parent = "time_t"; */ - - /* nhUse(parent); */ - Sprintf(buf, "%s", yyyymmddhhmmss(*d_time_t)); -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %s %ld %d\n", myname, - "time", - buf, ftell(nhfp->fpdef), cnt); -#endif - fwrite(buf, sizeof (char), 15, nhfp->fpdef); -} - -void -lendian_sfo_unsigned(nhfp, d_unsigned, myparent, myname, cnt) -NHFILE *nhfp; -unsigned *d_unsigned; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - lendian_sfo_uint(nhfp, d_unsigned, myparent, myname, cnt); -} - -void -lendian_sfo_uchar(nhfp, d_uchar, myparent, myname, cnt) -NHFILE *nhfp; -unsigned char *d_uchar; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -/* const char *parent = "uchar"; */ - uint8_t ui8; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - ui8 = (uint8_t) *d_uchar; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %u %ld %d\n", myname, - "uchar", - (unsigned int) ui8, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&ui8, sizeof ui8, 1, nhfp->fpdef); - d_uchar++; - } -} - -void -lendian_sfo_uint(nhfp, d_uint, myparent, myname, cnt) -NHFILE *nhfp; -unsigned int *d_uint; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -/* const char *parent = "uint"; */ - uint32_t ui32, val; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - ui32 = (uint32_t) *d_uint; - val = nhfp->bendian ? bswap32(ui32) : ui32; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %u %ld %d\n", myname, - "uint", - val, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&val, sizeof val, 1, nhfp->fpdef); - d_uint++; - } -} - -void -lendian_sfo_ulong(nhfp, d_ulong, myparent, myname, cnt) -NHFILE *nhfp; -unsigned long *d_ulong; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -/* const char *parent = "ulong"; */ - uint64_t ul64, val64; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - ul64 = (uint64_t) *d_ulong; - val64 = nhfp->bendian ? bswap64(ul64) : ul64; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug, DEBUGFORMATSTR64, myname, - "ulong", - val64, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&val64, sizeof val64, 1, nhfp->fpdef); - d_ulong++; - } -} - -void -lendian_sfo_ushort(nhfp, d_ushort, myparent, myname, cnt) -NHFILE *nhfp; -unsigned short *d_ushort; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -/* const char *parent = "ushort"; */ - uint16_t ui16, val16; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - ui16 = (uint16_t) *d_ushort; - val16 = nhfp->bendian ? bswap16(ui16) : ui16; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %hd %ld %d\n", myname, - "ushort", - val16, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&val16, sizeof val16, 1, nhfp->fpdef); - d_ushort++; - } -} - -void -lendian_sfo_xchar(nhfp, d_xchar, myparent, myname, cnt) -NHFILE *nhfp; -xchar *d_xchar; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -/* const char *parent = "xchar"; */ - int16_t i16, val16; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - i16 = (int16_t) *d_xchar; - val16 = nhfp->bendian ? bswap16(i16) : i16; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %hd %ld %d\n", myname, - "xchar", - val16, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&val16, sizeof val16, 1, nhfp->fpdef); - d_xchar++; - } -} - -static char strbuf[BUFSZ * 4]; - -void -lendian_sfo_str(nhfp, d_str, myparent, myname, cnt) -NHFILE *nhfp; -char *d_str; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i, j, intval; - int16_t i16, outcount = 0; -/* const char *parent = "str"; */ - char sval[QBUFSZ], *src = d_str, *dest = strbuf; - - /* nhUse(parent); */ - /* cnt is the number of characters */ - for (i = 0; i < cnt; ++i) { - if ((*src < 32) || (*src == '\\') || (*src > 127)) { - *dest++ = '\\'; - outcount++; - intval = (int) *src++; - Sprintf(sval, "%03d", intval); - for (j = 0; j < 3; ++j) { - *dest++ = sval[j]; - outcount++; - } - } else { - *dest++ = *src++; - outcount++; - } - } - *dest = '\0'; - i16 = nhfp->bendian ? bswap16(outcount) : outcount; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %hd %ld %d\n", myname, - "str-count", - i16, ftell(nhfp->fpdef), cnt); -#endif - fwrite(&i16, sizeof i16, 1, nhfp->fpdef); -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %s %ld %d\n", myname, - "str", - strbuf, ftell(nhfp->fpdef), cnt); -#endif - fwrite(strbuf, sizeof (char), outcount, nhfp->fpdef); -} - -void -lendian_sfo_addinfo(nhfp, parent, action, myname, indx) -NHFILE *nhfp UNUSED; -const char *parent UNUSED, *action UNUSED, *myname UNUSED; -int indx UNUSED; -{ - /* ignored */ -} - - -/* - *---------------------------------------------------------------------------- - * lendian_sfi_ routines called from functions in sfi_base.c - *---------------------------------------------------------------------------- - */ - -void -lendian_sfi_any(nhfp, d_any, myparent, myname, cnt) -NHFILE *nhfp; -union any *d_any; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ -/* const char *parent = "any"; */ - int i; - uint64_t ui64; - int64_t i64; - uint32_t ui32; - int32_t i32; - int8_t i8; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { - fread(&ui64, sizeof ui64, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&i64, sizeof i64, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug, DEBUGFORMATSTR64, myname, - "any", - ui64, floc, cnt); -#endif - fread(&ui32, sizeof ui32, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - fread(&i32, sizeof i32, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - fread(&i8, sizeof i8, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - d_any->a_void = (genericptr_t) ui64; - d_any->a_ulong = (unsigned long) i64; - d_any->a_uint = (unsigned int) ui32; - d_any->a_int = (int) i32; - d_any->a_char = (char) i8; - d_any++; - } -#if 0 - sfi_genericptr(nhfp, d_any->a_void, parent, "a_void", 1); - sfi_genericptr(nhfp, d_any->a_obj, parent, "a_obj", 1); - sfi_genericptr(nhfp, d_any->a_monst, parent, "a_monst", 1); - sfi_int(nhfp, &d_any->a_int, parent, "a_int", 1); - sfi_char(nhfp, &d_any->a_char, parent, "a_char", 1); - sfi_schar(nhfp, &d_any->a_schar, parent, "a_schar", 1); - sfi_uchar(nhfp, &d_any->a_uchar, parent, "a_uchar", 1); - sfi_uint(nhfp, &d_any->a_uint, parent, "a_uint", 1); - sfi_long(nhfp, &d_any->a_long, parent, "a_long", 1); - sfi_ulong(nhfp, &d_any->a_ulong, parent, "a_ulong", 1); - sfi_genericptr(nhfp, d_any->a_iptr, parent, "a_iptr", 1); - sfi_genericptr(nhfp, d_any->a_lptr, parent, "a_lptr", 1); - sfi_genericptr(nhfp, d_any->a_ulptr, parent, "a_ulptr", 1); - sfi_genericptr(nhfp, d_any->a_uptr, parent, "a_uptr", 1); - sfi_genericptr(nhfp, d_any->a_string, parent, "a_string", 1); - sfi_ulong(nhfp, &d_any->a_mask32, parent, "a_mask32", 1); -#endif -} - -void -lendian_sfi_aligntyp(nhfp, d_aligntyp, myparent, myname, cnt) -NHFILE *nhfp; -aligntyp *d_aligntyp; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ -/* const char *parent = "aligntyp"; */ - int i; - int16_t val, i16; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&val, sizeof val, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - i16 = nhfp->bendian ? bswap16(val) : val; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %hd %ld %d\n", myname, - "aligntyp", - i16, floc, cnt); -#endif - *d_aligntyp = (aligntyp) i16; - d_aligntyp++; - } -} - -void -lendian_sfi_bitfield(nhfp, d_bitfield, myparent, myname, cnt) -NHFILE *nhfp; -uint8_t *d_bitfield; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt UNUSED; -{ -/* const char *parent = "bitfield"; */ - - /* nhUse(parent); */ -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(d_bitfield, sizeof *d_bitfield, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, - "bitfield", - (int) *d_bitfield, floc, cnt); -#endif -} - -void -lendian_sfi_boolean(nhfp, d_boolean, myparent, myname, cnt) -NHFILE *nhfp; -boolean *d_boolean; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; -/* const char *parent = "boolean"; */ - int8_t i8; - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&i8, sizeof i8, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, - "boolean", - (int) i8, floc, cnt); -#endif - *d_boolean = (boolean) i8; - d_boolean++; - } -} - -void -lendian_sfi_char(nhfp, d_char, myparent, myname, cnt) -NHFILE *nhfp; -char *d_char; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - int8_t i8; - - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&i8, sizeof i8, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, - "char", - (int) i8, floc, cnt); -#endif - *d_char = (char) i8; - d_char++; - } -} - -void -lendian_sfi_genericptr(nhfp, d_genericptr, myparent, myname, cnt) -NHFILE *nhfp; -genericptr_t *d_genericptr; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - static const char *glorkum = "glorkum"; - int8_t p; - - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&p, sizeof p, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, - "genericptr", - (int) p, floc, cnt); -#endif - *d_genericptr = p ? (genericptr_t) glorkum : (genericptr_t) 0; - d_genericptr++; - } -} - -void -lendian_sfi_int(nhfp, d_int, myparent, myname, cnt) -NHFILE *nhfp; -int *d_int; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - int32_t val, i32; - - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&val, sizeof val, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - i32 = nhfp->bendian ? bswap32(val) : val; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, - "int", - i32, floc, cnt); -#endif - *d_int = (int) i32; - d_int++; - } -} - -void -lendian_sfi_long(nhfp, d_long, myparent, myname, cnt) -NHFILE *nhfp; -long *d_long; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - int64_t val64, i64; - - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&val64, sizeof val64, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - i64 = nhfp->bendian ? bswap64(val64) : val64; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug, DEBUGFORMATSTR64, myname, - "long", - i64, floc, cnt); -#endif - *d_long = (long) i64; - d_long++; - } -} - -void -lendian_sfi_schar(nhfp, d_schar, myparent, myname, cnt) -NHFILE *nhfp; -schar *d_schar; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - int8_t i8; - - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&i8, sizeof i8, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %d %ld %d\n", myname, - "schar", - (int) i8, floc, cnt); -#endif - *d_schar = (schar) i8; - d_schar++; - } -} - -void -lendian_sfi_short(nhfp, d_short, myparent, myname, cnt) -NHFILE *nhfp; -short *d_short; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - int16_t val16, i16; - - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&val16, sizeof val16, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - i16 = nhfp->bendian ? bswap16(val16) : val16; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %hd %ld %d\n", myname, - "short", - i16, floc, cnt); -#endif - *d_short = (short) i16; - d_short++; - } -} - -void -lendian_sfi_size_t(nhfp, d_size_t, myparent, myname, cnt) -NHFILE *nhfp; -size_t *d_size_t; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - uint64_t ui64, val; -/* const char *parent = "size_t"; */ - - /* nhUse(parent); */ - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&val, sizeof val, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - ui64 = nhfp->bendian ? bswap64(val) : val; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug, DEBUGFORMATSTR64, myname, - "size_t", - ui64, floc, cnt); -#endif - *d_size_t = (size_t) ui64; - d_size_t++; - } -} - -void -lendian_sfi_time_t(nhfp, d_time_t, myparent, myname, cnt) -NHFILE *nhfp; -time_t *d_time_t; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt UNUSED; -{ - time_t tmp; - char buf[BUFSZ]; -/* const char *parent = "time_t"; */ - - /* nhUse(parent); */ -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(buf, 1, 15, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %s %ld %d\n", myname, - "time", - buf, floc, cnt); -#endif - tmp = time_from_yyyymmddhhmmss(buf); - *d_time_t = tmp; -} - -void -lendian_sfi_unsigned(nhfp, d_unsigned, myparent, myname, cnt) -NHFILE *nhfp; -unsigned *d_unsigned; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - /* deferal */ - lendian_sfi_uint(nhfp, d_unsigned, myparent, myname, cnt); -} - -void -lendian_sfi_uchar(nhfp, d_uchar, myparent, myname, cnt) -NHFILE *nhfp; -unsigned char *d_uchar; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - uint8_t ui8; - - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&ui8, sizeof ui8, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %hu %ld %d\n", myname, - "uchar", - (unsigned short) ui8, floc, cnt); -#endif - *d_uchar = (uchar) ui8; - d_uchar++; - } -} - -void -lendian_sfi_uint(nhfp, d_uint, myparent, myname, cnt) -NHFILE *nhfp; -unsigned int *d_uint; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - uint32_t val, ui32; - - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&val, sizeof val, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - ui32 = nhfp->bendian ? bswap32(val) : val; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %u %ld %d\n", myname, - "uint", - ui32, floc, cnt); -#endif - *d_uint = (unsigned int) ui32; - d_uint++; - } -} - -void -lendian_sfi_ulong(nhfp, d_ulong, myparent, myname, cnt) -NHFILE *nhfp; -unsigned long *d_ulong; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - uint64_t val64, ui64; - - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&val64, sizeof val64, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - ui64 = nhfp->bendian ? bswap64(val64) : val64; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug, DEBUGFORMATSTR64, myname, - "ulong", - ui64, floc, cnt); -#endif - *d_ulong = (unsigned long) ui64; - d_ulong++; - } -} - -void -lendian_sfi_ushort(nhfp, d_ushort, myparent, myname, cnt) -NHFILE *nhfp; -unsigned short *d_ushort; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - uint16_t val16, ui16; - - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&val16, sizeof val16, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - ui16 = nhfp->bendian ? bswap16(val16) : val16; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %hu %ld %d\n", myname, - "ushort", - ui16, floc, cnt); -#endif - *d_ushort = (unsigned short) ui16; - d_ushort++; - } -} - -void -lendian_sfi_xchar(nhfp, d_xchar, myparent, myname, cnt) -NHFILE *nhfp; -xchar *d_xchar; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ - int i; - int16_t val16, i16; - - for (i = 0; i < cnt; ++i) { -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&val16, sizeof val16, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - i16 = nhfp->bendian ? bswap16(val16) : val16; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %hd %ld %d\n", myname, - "xchar", - i16, floc, cnt); -#endif - *d_xchar = (xchar) i16; - d_xchar++; - } -} - -static char strbuf[BUFSZ * 4]; - -void -lendian_sfi_str(nhfp, d_str, myparent, myname, cnt) -NHFILE *nhfp; -char *d_str; -const char *myparent UNUSED; -const char *myname UNUSED; -int cnt; -{ -#ifdef SAVEFILE_DEBUGGING - char testbuf[BUFSZ]; -#endif - int i, j, sval; -/* const char *parent = "str"; */ - char n[4]; - char *src, *dest; - int16_t i16, incount = 0; - - /* nhUse(parent); */ -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(&i16, sizeof i16, 1, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - incount = nhfp->bendian ? bswap16(i16) : i16; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %hd %ld %d\n", myname, - "str-count", - incount, floc, cnt); -#endif - if (incount >= (BUFSZ * 4) - 1) - panic("overflow on sflendian string read %d %d", - incount, cnt); -#ifdef SAVEFILE_DEBUGGING - floc = ftell(nhfp->fpdef); -#endif - fread(strbuf, sizeof (char), incount, nhfp->fpdef); - if (feof(nhfp->fpdef)) { - nhfp->eof = TRUE; - return; - } - strbuf[incount] = '\0'; -#ifdef SAVEFILE_DEBUGGING - fprintf(nhfp->fpdebug,"%s %s %s %ld %d\n", myname, - "str", - strbuf, floc, cnt); -#endif - src = strbuf; - dest = -#ifdef SAVEFILE_DEBUGGING - testbuf; -#else - d_str; -#endif - - for (i = 0; i < cnt; ++i) { - if (*src == '\\') { - src++; - for (j = 0; j < 4; ++j) { - if (j < 3) - n[j] = *src++; - else - n[j] = '\0'; - } - sval = atoi(n); - *dest++ = (char) sval; - } else - *dest++ = *src++; - } -} - -void -lendian_sfi_addinfo(nhfp, myparent, action, myname, indx) -NHFILE *nhfp UNUSED; -const char *myparent UNUSED, *action UNUSED, *myname UNUSED; -int indx UNUSED; -{ - /* not doing anything here */ -} - - - diff --git a/src/timeout.c b/src/timeout.c index 894167da1..82c44330e 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -5,8 +5,6 @@ #include "hack.h" #include "lev.h" /* for checking save modes */ -#include "sfproto.h" - static void NDECL(stoned_dialogue); static void NDECL(vomiting_dialogue); @@ -2165,16 +2163,12 @@ timer_element *timer; /* assume no pointers in arg */ if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) timer, sizeof(timer_element)); - if (nhfp->fieldlevel) - sfo_fe(nhfp, timer, "timers", "timer", 1); break; case TIMER_OBJECT: if (timer->needs_fixup) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t)timer, sizeof(timer_element)); - if (nhfp->fieldlevel) - sfo_fe(nhfp, timer, "timers", "timer", 1); } else { /* replace object pointer with id */ arg_save.a_obj = timer->arg.a_obj; @@ -2183,8 +2177,6 @@ timer_element *timer; timer->needs_fixup = 1; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t)timer, sizeof(timer_element)); - if (nhfp->fieldlevel) - sfo_fe(nhfp, timer, "timers", "timer", 1); timer->arg.a_obj = arg_save.a_obj; timer->needs_fixup = 0; } @@ -2194,8 +2186,6 @@ timer_element *timer; if (timer->needs_fixup) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t)timer, sizeof(timer_element)); - if (nhfp->fieldlevel) - sfo_fe(nhfp, timer, "timers", "timer", 1); } else { /* replace monster pointer with id */ arg_save.a_monst = timer->arg.a_monst; @@ -2204,8 +2194,6 @@ timer_element *timer; timer->needs_fixup = 1; if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t)timer, sizeof(timer_element)); - if (nhfp->fieldlevel) - sfo_fe(nhfp, timer, "timers", "timer", 1); timer->arg.a_monst = arg_save.a_monst; timer->needs_fixup = 0; } @@ -2343,14 +2331,10 @@ int range; if (range == RANGE_GLOBAL) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &g.timer_id, sizeof(g.timer_id)); - if (nhfp->fieldlevel) - sfo_ulong(nhfp, &g.timer_id, "timers", "g.timer_id", 1); } count = maybe_write_timer(nhfp, range, FALSE); if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &count, sizeof count); - if (nhfp->fieldlevel) - sfo_int(nhfp, &count, "timers", "timer_count", 1); (void) maybe_write_timer(nhfp, range, TRUE); } @@ -2389,22 +2373,16 @@ long adjust; /* how much to adjust timeout */ if (range == RANGE_GLOBAL) { if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &g.timer_id, sizeof g.timer_id); - if (nhfp->fieldlevel) - sfi_ulong(nhfp, &g.timer_id, "timers", "g.timer_id", 1); } /* restore elements */ if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &count, sizeof count); - if (nhfp->fieldlevel) - sfi_int(nhfp, &count, "timers", "timer_count", 1); while (count-- > 0) { curr = (timer_element *) alloc(sizeof(timer_element)); if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) curr, sizeof(timer_element)); - if (nhfp->fieldlevel) - sfi_fe(nhfp, curr, "timers", "timer", 1); if (ghostly) curr->timeout += adjust; insert_timer(curr); diff --git a/src/version.c b/src/version.c index 03ebbb60d..8af580ec4 100644 --- a/src/version.c +++ b/src/version.c @@ -7,7 +7,6 @@ #include "dlb.h" #include "date.h" #include "lev.h" -#include "sfproto.h" /* * All the references to the contents of patchlevel.h have been moved @@ -399,26 +398,17 @@ unsigned long utdflags; if (rlen == 0) return FALSE; } - if (nhfp->fieldlevel) { - sfi_char(nhfp, &indicator, "indicate", "format", 1); - sfi_int(nhfp, &filecmc, "validate", "critical_members_count", 1); - cmc = critical_members_count(); - } if (cmc != filecmc) return FALSE; - if (nhfp->fieldlevel && (nhfp->fnidx > historical)) { - sfi_version_info(nhfp, &vers_info, "version", "version_info", 1); - } else { - rlen = read(nhfp->fd, (genericptr_t) &vers_info, sizeof vers_info); - minit(); /* ZEROCOMP */ - if (rlen == 0) { - if (verbose) { - pline("File \"%s\" is empty?", name); - wait_synch(); - } - return FALSE; + rlen = read(nhfp->fd, (genericptr_t) &vers_info, sizeof vers_info); + minit(); /* ZEROCOMP */ + if (rlen == 0) { + if (verbose) { + pline("File \"%s\" is empty?", name); + wait_synch(); } + return FALSE; } if (!check_version(&vers_info, name, verbose, utdflags)) { @@ -437,17 +427,6 @@ NHFILE *nhfp; int cmc = 0; if (nhfp->mode & WRITING) { - if (nhfp->fieldlevel) { - indicate = (nhfp->fnidx == ascii) ? 'a' : 'l'; - sfo_char(nhfp, &indicate, "indicate", "format", 1); - cmc = critical_members_count(); - { -#if 0 - pline("critical-members=%d.", cmc); -#endif - } - sfo_int(nhfp, &cmc, "validate", "critical_members_count", 1); - } if (nhfp->structlevel) { indicate = 'h'; /* historical */ bwrite(nhfp->fd, (genericptr_t) &indicate, sizeof indicate); @@ -485,11 +464,6 @@ NHFILE *nhfp; (unsigned) (sizeof version_data)); bufon(nhfp->fd); } - if (nhfp->fieldlevel) { - store_formatindicator(nhfp); - sfo_version_info(nhfp, (struct version_info *) &version_data, - "version", "version_info", 1); - } return; } diff --git a/src/worm.c b/src/worm.c index 7c338bb43..6c139581f 100644 --- a/src/worm.c +++ b/src/worm.c @@ -5,8 +5,6 @@ #include "hack.h" #include "lev.h" -#include "sfproto.h" - #define newseg() (struct wseg *) alloc(sizeof (struct wseg)) #define dealloc_seg(wseg) free((genericptr_t) (wseg)) @@ -493,8 +491,6 @@ NHFILE *nhfp; /* Save number of segments */ if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &count, sizeof(int)); - if (nhfp->fieldlevel) - sfo_int(nhfp, &count, "worm", "segment_count", 1); /* Save segment locations of the monster. */ if (count) { for (curr = wtails[i]; curr; curr = curr->nseg) { @@ -502,20 +498,12 @@ NHFILE *nhfp; bwrite(nhfp->fd, (genericptr_t) &(curr->wx), sizeof(xchar)); bwrite(nhfp->fd, (genericptr_t) &(curr->wy), sizeof(xchar)); } - if (nhfp->fieldlevel) { - sfo_xchar(nhfp, &(curr->wx), "worm", "wx", 1); - sfo_xchar(nhfp, &(curr->wy), "worm", "wy", 1); - } } } } if (nhfp->structlevel) { bwrite(nhfp->fd, (genericptr_t) wgrowtime, sizeof(wgrowtime)); } - if (nhfp->fieldlevel) { - for (i = 0; i < MAX_NUM_WORMS; ++i) - sfo_long(nhfp, &wgrowtime[i], "worm", "wgrowtime", 1); - } } if (release_data(nhfp)) { @@ -550,8 +538,6 @@ NHFILE *nhfp; for (i = 1; i < MAX_NUM_WORMS; i++) { if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &count, sizeof(int)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &count, "worm", "segment_count", 1); /* Get the segments. */ for (curr = (struct wseg *) 0, j = 0; j < count; j++) { @@ -561,10 +547,6 @@ NHFILE *nhfp; mread(nhfp->fd, (genericptr_t) &(temp->wx), sizeof(xchar)); mread(nhfp->fd, (genericptr_t) &(temp->wy), sizeof(xchar)); } - if (nhfp->fieldlevel) { - sfi_xchar(nhfp, &(temp->wx), "worm", "wx", 1); - sfi_xchar(nhfp, &(temp->wy), "worm", "wy", 1); - } if (curr) curr->nseg = temp; else @@ -576,10 +558,6 @@ NHFILE *nhfp; if (nhfp->structlevel) { mread(nhfp->fd, (genericptr_t) wgrowtime, sizeof(wgrowtime)); } - if (nhfp->fieldlevel) { - for (i = 0; i < MAX_NUM_WORMS; ++i) - sfi_long(nhfp, &wgrowtime[i], "worm", "wgrowtime", 1); - } } /* diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index 3d0a4a729..253f05490 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -308,8 +308,7 @@ VOBJ20 = $(O)vis_tab.o $(O)weapon.o $(O)were.o $(O)wield.o $(O)windows. VOBJ21 = $(O)wintty.o $(O)wizard.o $(O)worm.o $(O)worn.o $(O)write.o VOBJ22 = $(O)zap.o $(O)light.o $(O)dlb.o $(O)dig.o $(O)teleport.o VOBJ23 = $(O)region.o $(O)sys.o $(REGEX) $(O)isaac64.o -VOBJ24 = $(O)sfbase.o $(O)sfdata.o -VOBJ25 = $(O)sfstruct.o $(O)sfascii.o $(O)sflendian.o +VOBJ24 = $(O)sfstruct.o SOBJ = $(O)msdos.o $(O)pcsys.o $(O)tty.o $(O)unix.o \ $(O)video.o $(O)vidtxt.o $(O)pckeys.o diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 9a88c16f9..530cefe42 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -310,8 +310,7 @@ VOBJ20 = $(O)vis_tab.o $(O)weapon.o $(O)were.o $(O)wield.o $(O)windows. VOBJ21 = $(O)wintty.o $(O)wizard.o $(O)worm.o $(O)worn.o $(O)write.o VOBJ22 = $(O)zap.o $(O)light.o $(O)dlb.o $(O)dig.o $(O)teleport.o VOBJ23 = $(O)region.o $(O)sys.o $(REGEX) $(O)isaac64.o $(VIDEO_OBJ) -VOBJ24 = $(O)sfbase.o $(O)sfdata.o -VOBJ25 = $(O)sfstruct.o $(O)sfascii.o $(O)sflendian.o +VOBJ24 = $(O)sfstruct.o SOBJ = $(O)msdos.o $(O)pcsys.o $(O)tty.o $(O)unix.o \ $(O)video.o $(O)vidtxt.o $(O)pckeys.o diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index 477ce34a3..55ca1cc98 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -7,7 +7,6 @@ #include "hack.h" #include "dlb.h" -#include "sfproto.h" #ifndef NO_SIGNAL #include @@ -450,8 +449,6 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ g.hackpid = 1; if (nhfp->structlevel) write(nhfp->fd, (genericptr_t) &g.hackpid, sizeof(g.hackpid)); - if (nhfp->fieldlevel) - sfi_int(nhfp, &g.hackpid, "locking", "g.hackpid", 1); close_nhfile(nhfp); } #ifdef MFLOPPY diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 521fc0bc7..3d54976ea 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -452,7 +452,6 @@ HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c ball.c bones.c \ options.c pager.c pickup.c pline.c polyself.c potion.c pray.c \ priest.c quest.c questpgr.c read.c rect.c region.c restore.c \ rip.c rnd.c role.c rumors.c save.c sfstruct.c \ - sfbase.c sfdata.c sfascii.c sflendian.c \ shk.c shknam.c sit.c sounds.c \ sp_lev.c spell.c steal.c steed.c sys.c teleport.c timeout.c \ topten.c track.c trap.c u_init.c \ @@ -469,7 +468,7 @@ SYSCSRC = ../sys/atari/tos.c ../sys/share/pcmain.c ../sys/share/pcsys.c \ SYSCXXSRC = ../sys/share/cppregex.cpp # generated source files (tile.c is handled separately via WINxxxSRC) -GENCSRC = vis_tab.c sfdata.c #tile.c +GENCSRC = vis_tab.c #tile.c # all windowing-system-dependent .c (for dependencies and such) WINCSRC = $(WINTTYSRC) $(WINCURSESSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) @@ -520,7 +519,6 @@ HOBJ = $(FIRSTOBJ) allmain.o alloc.o apply.o artifact.o attrib.o ball.o \ pager.o pickup.o pline.o polyself.o potion.o pray.o priest.o \ quest.o questpgr.o read.o rect.o region.o restore.o rip.o rnd.o \ role.o rumors.o save.o sfstruct.o \ - sfbase.o sfdata.o sfascii.o sflendian.o \ shk.o shknam.o sit.o sounds.o sp_lev.o spell.o sys.o \ steal.o steed.o teleport.o timeout.o topten.o track.o trap.o u_init.o \ uhitm.o vault.o vision.o vis_tab.o weapon.o were.o wield.o windows.o \ @@ -666,26 +664,7 @@ tile.c: ../win/share/tilemap.c $(HACK_H) ../win/gnome/gn_rip.h: ../win/X11/rip.xpm cp ../win/X11/rip.xpm ../win/gnome/gn_rip.h -# readtags dependencies -# -# sfstruct.o: sfstruct.c $(HACK_H) -sfbase.o: sfbase.c $(HACK_H) ../include/sfproto.h ../include/sfprocs.h -sfascii.o: sfascii.c $(HACK_H) ../include/sfprocs.h -sflendian.o: sflendian.c $(HACK_H) ../include/sfprocs.h -sfdata.o: sfdata.c $(HACK_H) ../include/sfprocs.h - -#../util/readtags: -# @( cd ../util ; $(MAKE) readtags ) -# -#../util/nethack.tags: -# @( cd ../util ; $(MAKE) nethack.tags ) -# -#sfdata.c: ../util/readtags ../util/nethack.tags -# @( cd ../util ; ./readtags ) -# -#../include/sfproto.h: ../util/readtags ../util/nethack.tags -# @( cd ../util ; ./readtags ) # date.h should be remade any time any of the source or include code # is modified. Unfortunately, this would make the contents of this @@ -777,7 +756,7 @@ $(HACK_H): ../include/hack.h $(CONFIG_H) ../include/lint.h ../include/align.h \ tos.o: ../sys/atari/tos.c $(HACK_H) ../include/tcap.h $(CC) $(CFLAGS) -c -o $@ ../sys/atari/tos.c pcmain.o: ../sys/share/pcmain.c $(HACK_H) ../include/dlb.h \ - ../include/sfproto.h ../include/integer.h + ../include/integer.h $(CC) $(CFLAGS) -c -o $@ ../sys/share/pcmain.c pcsys.o: ../sys/share/pcsys.c $(HACK_H) $(CC) $(CFLAGS) -c -o $@ ../sys/share/pcsys.c @@ -1001,16 +980,14 @@ wc_chainout.o: ../win/chain/wc_chainout.c $(HACK_H) wc_trace.o: ../win/chain/wc_trace.c $(HACK_H) ../include/func_tab.h $(CC) $(CFLAGS) -c -o $@ ../win/chain/wc_trace.c vis_tab.o: vis_tab.c $(CONFIG_H) ../include/vis_tab.h -sfdata.o: sfdata.c $(HACK_H) ../include/artifact.h ../include/func_tab.h \ - ../include/lev.h ../include/integer.h ../include/sfproto.h allmain.o: allmain.c $(HACK_H) alloc.o: alloc.c $(CONFIG_H) apply.o: apply.c $(HACK_H) artifact.o: artifact.c $(HACK_H) ../include/artifact.h ../include/artilist.h \ - ../include/sfproto.h ../include/integer.h + ../include/integer.h attrib.o: attrib.c $(HACK_H) ball.o: ball.c $(HACK_H) -bones.o: bones.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ +bones.o: bones.c $(HACK_H) ../include/lev.h \ ../include/integer.h botl.o: botl.c $(HACK_H) cmd.o: cmd.c $(HACK_H) ../include/lev.h ../include/func_tab.h @@ -1029,24 +1006,24 @@ dokick.o: dokick.c $(HACK_H) dothrow.o: dothrow.c $(HACK_H) drawing.o: drawing.c $(HACK_H) ../include/tcap.h dungeon.o: dungeon.c $(HACK_H) ../include/dgn_file.h ../include/dlb.h \ - ../include/lev.h ../include/sfproto.h ../include/integer.h + ../include/lev.h ../include/integer.h eat.o: eat.c $(HACK_H) -end.o: end.c $(HACK_H) ../include/lev.h ../include/dlb.h ../include/sfproto.h \ +end.o: end.c $(HACK_H) ../include/lev.h ../include/dlb.h \ ../include/integer.h -engrave.o: engrave.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ +engrave.o: engrave.c $(HACK_H) ../include/lev.h \ ../include/integer.h exper.o: exper.c $(HACK_H) explode.o: explode.c $(HACK_H) extralev.o: extralev.c $(HACK_H) -files.o: files.c $(HACK_H) ../include/dlb.h ../include/sfproto.h \ - ../include/integer.h ../include/sfprocs.h ../include/lev.h \ +files.o: files.c $(HACK_H) ../include/dlb.h \ + ../include/integer.h ../include/lev.h \ #zlib.h fountain.o: fountain.c $(HACK_H) hack.o: hack.c $(HACK_H) hacklib.o: hacklib.c $(HACK_H) invent.o: invent.c $(HACK_H) isaac64.o: isaac64.c $(CONFIG_H) ../include/isaac64.h -light.o: light.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ +light.o: light.c $(HACK_H) ../include/lev.h \ ../include/integer.h lock.o: lock.c $(HACK_H) mail.o: mail.c $(HACK_H) ../include/mail.h @@ -1067,9 +1044,9 @@ minion.o: minion.c $(HACK_H) mklev.o: mklev.c $(HACK_H) mkmap.o: mkmap.c $(HACK_H) ../include/sp_lev.h mkmaze.o: mkmaze.c $(HACK_H) ../include/sp_lev.h ../include/lev.h \ - ../include/sfproto.h ../include/integer.h + ../include/integer.h mkobj.o: mkobj.c $(HACK_H) -mkroom.o: mkroom.c $(HACK_H) ../include/sfproto.h ../include/integer.h +mkroom.o: mkroom.c $(HACK_H) ../include/integer.h mon.o: mon.c $(HACK_H) ../include/mfndpos.h mondata.o: mondata.c $(HACK_H) monmove.o: monmove.c $(HACK_H) ../include/mfndpos.h ../include/artifact.h @@ -1082,13 +1059,13 @@ muse.o: muse.c $(HACK_H) music.o: music.c $(HACK_H) nhlua.o: nhlua.c $(HACK_H) ../include/dlb.h nhlsel.o: nhlsel.c $(HACK_H) ../include/sp_lev.h -o_init.o: o_init.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ +o_init.o: o_init.c $(HACK_H) ../include/lev.h \ ../include/integer.h objects.o: objects.c $(CONFIG_H) ../include/obj.h ../include/objclass.h \ ../include/prop.h ../include/skills.h ../include/color.h objnam.o: objnam.c $(HACK_H) options.o: options.c $(CONFIG_H) ../include/objclass.h ../include/flag.h \ - $(HACK_H) ../include/tcap.h ../include/sfprocs.h \ + $(HACK_H) ../include/tcap.h \ ../include/integer.h pager.o: pager.c $(HACK_H) ../include/dlb.h pickup.o: pickup.c $(HACK_H) @@ -1101,23 +1078,18 @@ quest.o: quest.c $(HACK_H) questpgr.o: questpgr.c $(HACK_H) ../include/dlb.h read.o: read.c $(HACK_H) rect.o: rect.c $(HACK_H) -region.o: region.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ +region.o: region.c $(HACK_H) ../include/lev.h \ ../include/integer.h restore.o: restore.c $(HACK_H) ../include/lev.h ../include/tcap.h \ - ../include/sfproto.h ../include/integer.h + ../include/integer.h rip.o: rip.c $(HACK_H) rnd.o: rnd.c $(HACK_H) ../include/isaac64.h role.o: role.c $(HACK_H) rumors.o: rumors.c $(HACK_H) ../include/lev.h ../include/dlb.h \ - ../include/sfproto.h ../include/integer.h -save.o: save.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ + ../include/integer.h +save.o: save.c $(HACK_H) ../include/lev.h \ ../include/integer.h sfstruct.o: sfstruct.c $(HACK_H) -sfbase.o: sfbase.c $(HACK_H) ../include/integer.h ../include/sfprocs.h -sfdata.o: sfdata.c $(HACK_H) ../include/artifact.h ../include/func_tab.h \ - ../include/lev.h ../include/integer.h ../include/sfproto.h -sfascii.o: sfascii.c $(HACK_H) ../include/integer.h ../include/sfprocs.h -sflendian.o: sflendian.c $(HACK_H) ../include/integer.h ../include/sfprocs.h shk.o: shk.c $(HACK_H) shknam.o: shknam.c $(HACK_H) sit.o: sit.c $(HACK_H) ../include/artifact.h @@ -1128,7 +1100,7 @@ steal.o: steal.c $(HACK_H) steed.o: steed.c $(HACK_H) sys.o: sys.c $(HACK_H) teleport.o: teleport.c $(HACK_H) -timeout.o: timeout.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ +timeout.o: timeout.c $(HACK_H) ../include/lev.h \ ../include/integer.h topten.o: topten.c $(HACK_H) ../include/dlb.h ../include/patchlevel.h track.o: track.c $(HACK_H) @@ -1137,7 +1109,7 @@ u_init.o: u_init.c $(HACK_H) uhitm.o: uhitm.c $(HACK_H) vault.o: vault.c $(HACK_H) version.o: version.c $(HACK_H) ../include/dlb.h ../include/date.h \ - ../include/lev.h ../include/sfproto.h ../include/integer.h \ + ../include/lev.h ../include/integer.h \ ../include/patchlevel.h vision.o: vision.c $(HACK_H) ../include/vis_tab.h weapon.o: weapon.c $(HACK_H) @@ -1145,7 +1117,7 @@ were.o: were.c $(HACK_H) wield.o: wield.c $(HACK_H) windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h wizard.o: wizard.c $(HACK_H) -worm.o: worm.c $(HACK_H) ../include/lev.h ../include/sfproto.h \ +worm.o: worm.c $(HACK_H) ../include/lev.h \ ../include/integer.h worn.o: worn.c $(HACK_H) write.o: write.c $(HACK_H) diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl index be6299298..b27e91ded 100644 --- a/sys/unix/Makefile.utl +++ b/sys/unix/Makefile.utl @@ -129,11 +129,6 @@ LEXYYC = lex.yy.c # YTABH = y_tab.h # LEXYYC = lexyy.c -# This is the universal ctags utility which produces the tags in the -# format that util/readtags requires. -# https://github.com/universal-ctags/ctags.git -CTAGSCMD = universal-ctags - # if you change this to 1, feedback while building will omit -Dthis -Wthat # -Isomewhere so that each file being compiled is listed on one short line; # it requires support for '$<' in rules with more than one prerequisite @@ -189,7 +184,6 @@ MAKESRC = makedefs.c ../src/mdlib.c RECOVSRC = recover.c DLBSRC = dlb_main.c UTILSRCS = $(MAKESRC) panic.c $(DGNCOMPSRC) $(RECOVSRC) $(DLBSRC) -READTAGSSRC = readtags.c # files that define all monsters and objects CMONOBJ = ../src/monst.c ../src/objects.c @@ -210,9 +204,6 @@ RECOVOBJS = recover.o # object files for the data librarian DLBOBJS = dlb_main.o $(OBJDIR)/dlb.o $(OALLOC) -# object files for readtags -READTAGSOBJS = readtags.o - # flags for creating distribution versions of sys/share/*_lex.c, using # a more portable flex skeleton, which is not included in the distribution. # hopefully keeping this out of the section to be edited will keep too @@ -369,67 +360,6 @@ tileedit: tileedit.cpp $(TEXT_IO) $(CC) -o tileedit -I../include -I$(QTDIR)/include -L$(QTDIR)/lib \ tileedit.cpp $(TEXT_IO) -lqt -# dependencies for readtags -# -CTAGDEP = ../include/align.h ../include/artifact.h ../include/artilist.h \ - ../include/attrib.h ../include/context.h ../include/coord.h \ - ../include/decl.h ../include/dungeon.h ../include/engrave.h \ - ../include/flag.h ../include/func_tab.h ../include/global.h \ - ../include/hack.h ../include/lev.h ../include/mextra.h \ - ../include/mkroom.h ../include/monst.h ../include/monsym.h \ - ../include/obj.h ../include/objclass.h ../include/prop.h \ - ../include/quest.h ../include/rect.h ../include/region.h \ - ../include/rm.h ../include/skills.h ../include/spell.h \ - ../include/sys.h ../include/timeout.h ../include/trap.h \ - ../include/you.h ../include/onames.h ../include/wintype.h -# ../include/permonst.h -CTAGSOPT = --language-force=c --sort=no -D"Bitfield(x,n)=unsigned x : n" --excmd=pattern - -readtags: $(READTAGSOBJS) - $(CC) $(LFLAGS) -o readtags $(READTAGSOBJS) $(LIBS) - -readtags.o: readtags.c $(HACK_H) - $(CC) $(CFLAGS) -c readtags.c - -nethack.tags: $(CTAGDEP) -# -# tested with universal ctags from https://github.com/universal-ctags/ctags.git -# - $(CTAGSCMD) $(CTAGSOPT) -f nethack.tags ../include/align.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/artifact.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/artilist.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/attrib.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/context.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/coord.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/decl.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/dungeon.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/engrave.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/flag.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/func_tab.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/global.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/hack.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/lev.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/mextra.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/mkroom.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/monst.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/monsym.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/obj.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/objclass.h -# $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/permonst.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/prop.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/quest.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/rect.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/region.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/rm.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/skills.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/spell.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/sys.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/timeout.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/trap.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/you.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/onames.h - $(CTAGSCMD) $(CTAGSOPT) -a -f nethack.tags ../include/wintype.h - # using dependencies like # ../src/foo:: # @( cd ../src ; $(MAKE) foo ) diff --git a/sys/unix/NetHack.xcodeproj/project.pbxproj b/sys/unix/NetHack.xcodeproj/project.pbxproj index bd3b7cbbf..ee85f2590 100644 --- a/sys/unix/NetHack.xcodeproj/project.pbxproj +++ b/sys/unix/NetHack.xcodeproj/project.pbxproj @@ -142,10 +142,6 @@ 31B8A46021A26AE70055BD01 /* dlb_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A45F21A26AE70055BD01 /* dlb_main.c */; }; 31B8A46121A26AF60055BD01 /* panic.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A42721A267E60055BD01 /* panic.c */; }; 31B8A46221A26B020055BD01 /* alloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A36521A238040055BD01 /* alloc.c */; }; - 544768A323994965004B9739 /* sfascii.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768A223994965004B9739 /* sfascii.c */; }; - 544768A5239949A8004B9739 /* sfbase.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768A4239949A8004B9739 /* sfbase.c */; }; - 544768A9239949FA004B9739 /* sfdata.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768A6239949FA004B9739 /* sfdata.c */; }; - 544768AA239949FA004B9739 /* sflendian.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768A7239949FA004B9739 /* sflendian.c */; }; 544768AB239949FA004B9739 /* sfstruct.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768A8239949FA004B9739 /* sfstruct.c */; }; 544768AE23994A17004B9739 /* nhlsel.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768AC23994A17004B9739 /* nhlsel.c */; }; 544768AF23994A17004B9739 /* nhlua.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768AD23994A17004B9739 /* nhlua.c */; }; @@ -486,18 +482,12 @@ 31B8A45F21A26AE70055BD01 /* dlb_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dlb_main.c; path = ../../util/dlb_main.c; sourceTree = ""; }; 31B8A46421A278AC0055BD01 /* dgn_comp.y */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; name = dgn_comp.y; path = ../../util/dgn_comp.y; sourceTree = ""; }; 31B8A46821A288770055BD01 /* dgn_comp.l */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; name = dgn_comp.l; path = ../../util/dgn_comp.l; sourceTree = ""; }; - 544768A223994965004B9739 /* sfascii.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sfascii.c; path = ../../src/sfascii.c; sourceTree = ""; }; - 544768A4239949A8004B9739 /* sfbase.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sfbase.c; path = ../../src/sfbase.c; sourceTree = ""; }; - 544768A6239949FA004B9739 /* sfdata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sfdata.c; path = ../../src/sfdata.c; sourceTree = ""; }; - 544768A7239949FA004B9739 /* sflendian.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sflendian.c; path = ../../src/sflendian.c; sourceTree = ""; }; 544768A8239949FA004B9739 /* sfstruct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sfstruct.c; path = ../../src/sfstruct.c; sourceTree = ""; }; 544768AC23994A17004B9739 /* nhlsel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nhlsel.c; path = ../../src/nhlsel.c; sourceTree = ""; }; 544768AD23994A17004B9739 /* nhlua.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nhlua.c; path = ../../src/nhlua.c; sourceTree = ""; }; 544768B023994A2C004B9739 /* mdlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mdlib.c; path = ../../src/mdlib.c; sourceTree = ""; }; 544768B423995447004B9739 /* isaac64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = isaac64.h; path = ../../include/isaac64.h; sourceTree = ""; }; 544768B523995488004B9739 /* nhlua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = nhlua.h; path = ../../include/nhlua.h; sourceTree = ""; }; - 544768B623995488004B9739 /* sfprocs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sfprocs.h; path = ../../include/sfprocs.h; sourceTree = ""; }; - 544768B723995488004B9739 /* sfproto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sfproto.h; path = ../../include/sfproto.h; sourceTree = ""; }; 544768B923995BB7004B9739 /* liblua.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblua.a; path = ../../lib/lua/liblua.a; sourceTree = ""; }; 54FCE8282223261F00F393C8 /* isaac64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = isaac64.c; path = ../../src/isaac64.c; sourceTree = ""; }; /* End PBXFileReference section */ @@ -567,11 +557,7 @@ 544768B023994A2C004B9739 /* mdlib.c */, 544768AC23994A17004B9739 /* nhlsel.c */, 544768AD23994A17004B9739 /* nhlua.c */, - 544768A6239949FA004B9739 /* sfdata.c */, - 544768A7239949FA004B9739 /* sflendian.c */, 544768A8239949FA004B9739 /* sfstruct.c */, - 544768A4239949A8004B9739 /* sfbase.c */, - 544768A223994965004B9739 /* sfascii.c */, 31B8A35521A238030055BD01 /* allmain.c */, 31B8A36521A238040055BD01 /* alloc.c */, 31B8A35E21A238040055BD01 /* apply.c */, @@ -710,8 +696,6 @@ isa = PBXGroup; children = ( 544768B523995488004B9739 /* nhlua.h */, - 544768B623995488004B9739 /* sfprocs.h */, - 544768B723995488004B9739 /* sfproto.h */, 544768B423995447004B9739 /* isaac64.h */, 3186A3B721A4B0FD0052BF02 /* align.h */, 3186A38021A4B0FB0052BF02 /* amiconf.h */, @@ -1460,7 +1444,6 @@ files = ( 31B8A3BC21A238060055BD01 /* eat.c in Sources */, 31B8A3A921A238060055BD01 /* music.c in Sources */, - 544768A9239949FA004B9739 /* sfdata.c in Sources */, 544768B123994A2C004B9739 /* mdlib.c in Sources */, 31B8A3D221A238060055BD01 /* engrave.c in Sources */, 31B8A3A021A238060055BD01 /* exper.c in Sources */, @@ -1479,7 +1462,6 @@ 31B8A41921A244940055BD01 /* objects.c in Sources */, 31B8A3AA21A238060055BD01 /* wizard.c in Sources */, 31B8A3D021A238060055BD01 /* explode.c in Sources */, - 544768A5239949A8004B9739 /* sfbase.c in Sources */, 31B8A3DE21A238060055BD01 /* sys.c in Sources */, 31B8A38021A238060055BD01 /* sit.c in Sources */, 31B8A3AF21A238060055BD01 /* lock.c in Sources */, @@ -1580,7 +1562,6 @@ 31B8A38E21A238060055BD01 /* quest.c in Sources */, 31B8A3D621A238060055BD01 /* region.c in Sources */, 31B8A3D421A238060055BD01 /* worm.c in Sources */, - 544768AA239949FA004B9739 /* sflendian.c in Sources */, 31B8A3C921A238060055BD01 /* sounds.c in Sources */, 31B8A37C21A238060055BD01 /* pager.c in Sources */, 31B8A39F21A238060055BD01 /* fountain.c in Sources */, @@ -1589,7 +1570,6 @@ 31B8A3D321A238060055BD01 /* cmd.c in Sources */, 31B8A3AB21A238060055BD01 /* mplayer.c in Sources */, 31B8A3CC21A238060055BD01 /* pickup.c in Sources */, - 544768A323994965004B9739 /* sfascii.c in Sources */, 31B8A39721A238060055BD01 /* invent.c in Sources */, 31B8A40021A23E6E0055BD01 /* getline.c in Sources */, 31B8A3B521A238060055BD01 /* rect.c in Sources */, diff --git a/sys/vms/vmsbuild.com b/sys/vms/vmsbuild.com index cacf60126..0ab402d1a 100755 --- a/sys/vms/vmsbuild.com +++ b/sys/vms/vmsbuild.com @@ -320,7 +320,7 @@ $ gosub compile_list $! $! Files added in 3.7 $! -$ c_list = "sfbase,sfdata,sfstruct,sflendian,sfascii,nhlua,nhlsel" +$ c_list = "sfstruct,nhlua,nhlsel" $ gosub compile_list $! $! 3.7 runtime LUA level parser/loader diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 58cf34eb6..9b292d737 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -323,8 +323,7 @@ VOBJ24 = $(O)track.o $(O)trap.o $(O)u_init.o $(O)uhitm.o VOBJ25 = $(O)vault.o $(O)vis_tab.o $(O)vision.o $(O)weapon.o VOBJ26 = $(O)were.o $(O)wield.o $(O)windows.o $(O)wizard.o VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o -VOBJ28 = $(O)sfbase.o $(O)sfdata.o -VOBJ29 = $(O)sfstruct.o $(O)sfascii.o $(O)sflendian.o +VOBJ28 = $(O)sfstruct.o #VOBJ31 = $(O)win10.o ifeq "$(ADD_LUA)" "Y" diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 614b32533..08aa27ff5 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -325,8 +325,7 @@ VOBJ24 = $(O)track.o $(O)trap.o $(O)u_init.o $(O)uhitm.o VOBJ25 = $(O)vault.o $(O)vis_tab.o $(O)vision.o $(O)weapon.o VOBJ26 = $(O)were.o $(O)wield.o $(O)windows.o $(O)wizard.o VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o -VOBJ28 = $(O)sfbase.o $(O)sfdata.o -VOBJ29 = $(O)sfstruct.o $(O)sfascii.o $(O)sflendian.o +VOBJ28 = $(O)sfstruct.o LUAOBJ = $(O)nhlua.o $(O)nhlsel.o LUA_QTEXT_FILE = "quest.lua" @@ -1604,92 +1603,12 @@ $(O)ttystub.o: $(HACK_H) $(MSWSYS)\stubs.c # #============================================ -# fieldlevel save dependencies +# save dependencies #============================================ -$(O)sfbase.o: $(HACK_H) $(INCL)\sfproto.h $(INCL)\sfprocs.h \ - $(SRC)\sfbase.c -# @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfbase.c - -$(O)sfdata.o: $(HACK_H) $(INCL)\sfprocs.h $(SRC)\sfdata.c -# @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfdata.c - $(O)sfstruct.o: $(HACK_H) $(SRC)\sfstruct.c # @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfstruct.c -$(O)sfascii.o: $(HACK_H) $(INCL)\sfprocs.h $(SRC)\sfascii.c -# @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfascii.c - -$(O)sflendian.o: $(HACK_H) $(INCL)\sfprocs.h $(SRC)\sflendian.c -# @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sflendian.c - -$(SRC)\sfdata.c: $(U)readtags.exe $(U)nethack.tags - $(U)readtags.exe - -$(INCL)\sfproto.h: $(U)readtags.exe $(U)nethack.tags - $(U)readtags.exe - -$(U)readtags.exe: $(O)readtags$(HOST).o - @$(link) $(lflagsBuild) -out:$@ $(O)readtags$(HOST).o - -$(O)readtags$(HOST).o: $(U)readtags.c $(U)nethack.tags $(CONFIG_H) $(PATCHLEVEL_H) - @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) $(TEMPL) -Fo$@ $(U)readtags.c - -# -#tested only with exuberant ctags from http://ctags.sourceforge.net -# -CTAGDEP = ..\include\align.h ..\include\artifact.h ..\include\artilist.h \ - ..\include\attrib.h ..\include\context.h ..\include\coord.h \ - ..\include\decl.h ..\include\dungeon.h ..\include\engrave.h \ - ..\include\flag.h ..\include\func_tab.h ..\include\global.h \ - ..\include\hack.h ..\include\lev.h ..\include\mextra.h \ - ..\include\mkroom.h ..\include\monst.h ..\include\monsym.h \ - ..\include\obj.h ..\include\objclass.h ..\include\prop.h \ - ..\include\quest.h ..\include\rect.h ..\include\region.h \ - ..\include\rm.h ..\include\skills.h ..\include\spell.h \ - ..\include\sys.h ..\include\timeout.h ..\include\trap.h \ - ..\include\you.h ..\include\onames.h ..\include\wintype.h - -$(U)nethack.tags: $(CTAGDEP) - $(CTAGSCMD) $(CTAGSOPT) -f $(U)nethack.tags $(TINC)/align.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/artifact.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TSRC)/artifact.c - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/artilist.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/attrib.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TSRC)/bones.c - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/context.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/coord.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/decl.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TSRC)/decl.c - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/dungeon.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/engrave.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TSRC)/engrave.c - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/flag.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/func_tab.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/global.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/hack.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/lev.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/mextra.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/mkroom.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/monst.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/monsym.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/obj.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/objclass.h -# $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/permonst.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/prop.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/quest.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/rect.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/region.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/rm.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/skills.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/spell.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/sys.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/timeout.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/trap.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/you.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/onames.h - $(CTAGSCMD) $(CTAGSOPT) -a -f $(U)nethack.tags $(TINC)/wintype.h - # # util dependencies # These have dual-roles and need to be build for host and targt platforms. diff --git a/util/readtags.c b/util/readtags.c deleted file mode 100644 index d74298303..000000000 --- a/util/readtags.c +++ /dev/null @@ -1,1677 +0,0 @@ -/* NetHack 3.6 readtags.c $Date$ $Revision$ */ -/* Copyright (c) Michael Allison, 2018 */ -/* NetHack may be freely redistributed. See license for details. */ - -/* - * Read the given ctags file and generate: - * Intermediate temp files: - * include/sfo_proto.tmp - * include/sfi_proto.tmp - * src/sfi_data.tmp - * src/sfo_data.tmp - * Final files: - * sfdata.c - * sfproto.h - * - */ - -#include "hack.h" -#include "lev.h" -#include "integer.h" -#include "wintype.h" -#include -#include -#include - -#ifdef __GNUC__ -#define strncmpi strncasecmp -#endif - -/* version information */ -#ifdef SHORT_FILENAMES -#include "patchlev.h" -#else -#include "patchlevel.h" -#endif - -#define NHTYPE_SIMPLE 1 -#define NHTYPE_COMPLEX 2 -struct nhdatatypes_t { - unsigned int dtclass; - char *dtype; - size_t dtsize; -}; - -struct tagstruct { - int linenum; - char ptr[128]; - char tag[100]; - char filename[128]; - char searchtext[255]; - char tagtype; - char parent[100]; - char parenttype[100]; - char arraysize1[100]; - char arraysize2[100]; - struct tagstruct *next; -}; - -struct needs_array_handling { - const char *nm; - const char *parent; -}; - -#define SFO_DATA c_sfodata -#define SFI_DATA c_sfidata -#define SFDATATMP c_sfdatatmp -#define SFO_PROTO c_sfoproto -#define SFI_PROTO c_sfiproto -#define SFDATA c_sfdata -#define SFPROTO c_sfproto -#define SFPROTO_NAME "../include/sfproto.h" -#define SFDATA_NAME "../src/sfdata.c" - -static char *fgetline(FILE*); -static void quit(void); -static void out_of_memory(void); -static void doline(char *); -static void chain(struct tagstruct *); -#if 0 -static void showthem(void); -static char *stripspecial(char *); -#endif -static char *deblank(char *); -static char *deeol(char *); -static void generate_c_files(); -static char *findtype(char *, char *); -#if 0 -static boolean FDECL(is_prim, (char *)); -#endif -static void taglineparse(char *, struct tagstruct *); -static void parseExtensionFields(struct tagstruct *, char *); -static void set_member_array_size(struct tagstruct *); -#if 0 -static char *member_array_dims(struct tagstruct *, char *); -static char *member_array_size(struct tagstruct *, char *); -#endif -static void output_types(FILE *); -#if 0 -static char *FDECL(dtmacro,(const char *,int)); -#endif -static char *FDECL(dtfn,(const char *,int, boolean *)); -static char *FDECL(bfsize,(const char *)); -static char *FDECL(fieldfix,(char *,char *)); - -#ifdef VMS -static FILE *vms_fopen(name, mode) const char *name, *mode; -{ - return fopen(name, mode, "mbc=64", "shr=nil"); -} -# define fopen(f,m) vms_fopen(f,m) -#endif - -#define Fprintf (void) fprintf -#ifndef __GO32__ -#define DEFAULTTAGNAME "../util/nethack.tags" -#else -#define DEFAULTTAGNAME "../util/nhtags.tag" -#endif -#ifndef _MAX_PATH -#define _MAX_PATH 120 -#endif - -#define TAB '\t' -#define SPACE ' ' - -struct tagstruct *first; -struct tagstruct zerotag; - -static int tagcount; -static const char *infilenm; -static FILE *infile; -static char line[255]; -static long lineno; -static char ssdef[BUFSZ]; -static char fieldfixbuf[BUFSZ]; - -#define NHTYPE_SIMPLE 1 -#define NHTYPE_COMPLEX 2 - -struct nhdatatypes_t readtagstypes[] = { - {NHTYPE_SIMPLE, (char *) "any", sizeof(anything)}, - {NHTYPE_SIMPLE, (char *) "genericptr_t", sizeof(genericptr_t)}, - {NHTYPE_SIMPLE, (char *) "aligntyp", sizeof(aligntyp)}, - {NHTYPE_SIMPLE, (char *) "Bitfield", sizeof(uint8_t)}, - {NHTYPE_SIMPLE, (char *) "boolean", sizeof(boolean)}, - {NHTYPE_SIMPLE, (char *) "char", sizeof(char)}, - {NHTYPE_SIMPLE, (char *) "int", sizeof(int)}, - {NHTYPE_SIMPLE, (char *) "long", sizeof(long)}, - {NHTYPE_SIMPLE, (char *) "schar", sizeof(schar)}, - {NHTYPE_SIMPLE, (char *) "short", sizeof(short)}, - {NHTYPE_SIMPLE, (char *) "size_t", sizeof(size_t)}, - {NHTYPE_SIMPLE, (char *) "string", 1}, - {NHTYPE_SIMPLE, (char *) "time_t", sizeof(time_t)}, - {NHTYPE_SIMPLE, (char *) "uchar", sizeof(uchar)}, - {NHTYPE_SIMPLE, (char *) "unsigned char", sizeof(unsigned char)}, - {NHTYPE_SIMPLE, (char *) "unsigned int", sizeof(unsigned int)}, - {NHTYPE_SIMPLE, (char *) "unsigned long", sizeof(unsigned long)}, - {NHTYPE_SIMPLE, (char *) "unsigned short", sizeof(unsigned short)}, - {NHTYPE_SIMPLE, (char *) "unsigned", sizeof(unsigned)}, - {NHTYPE_SIMPLE, (char *) "xchar", sizeof(xchar)}, - {NHTYPE_COMPLEX, (char *) "align", sizeof(struct align)}, -/* {NHTYPE_COMPLEX, (char *) "attack", sizeof(struct attack)}, */ /* permonst affil */ - {NHTYPE_COMPLEX, (char *) "attribs", sizeof(struct attribs)}, - {NHTYPE_COMPLEX, (char *) "bill_x", sizeof(struct bill_x)}, - {NHTYPE_COMPLEX, (char *) "book_info", sizeof(struct book_info)}, - {NHTYPE_COMPLEX, (char *) "branch", sizeof(struct branch)}, - {NHTYPE_COMPLEX, (char *) "bubble", sizeof(struct bubble)}, - {NHTYPE_COMPLEX, (char *) "cemetery", sizeof(struct cemetery)}, -/* {NHTYPE_COMPLEX, (char *) "container", sizeof(struct container)}, */ - {NHTYPE_COMPLEX, (char *) "context_info", sizeof(struct context_info)}, - {NHTYPE_COMPLEX, (char *) "d_flags", sizeof(struct d_flags)}, - {NHTYPE_COMPLEX, (char *) "d_level", sizeof(struct d_level)}, - {NHTYPE_COMPLEX, (char *) "damage", sizeof(struct damage)}, - {NHTYPE_COMPLEX, (char *) "dest_area", sizeof(struct dest_area)}, - {NHTYPE_COMPLEX, (char *) "dgn_topology", sizeof(struct dgn_topology)}, - {NHTYPE_COMPLEX, (char *) "dig_info", sizeof(struct dig_info)}, - {NHTYPE_COMPLEX, (char *) "dungeon", sizeof(struct dungeon)}, - {NHTYPE_COMPLEX, (char *) "edog", sizeof(struct edog)}, - {NHTYPE_COMPLEX, (char *) "egd", sizeof(struct egd)}, - {NHTYPE_COMPLEX, (char *) "emin", sizeof(struct emin)}, - {NHTYPE_COMPLEX, (char *) "engr", sizeof(struct engr)}, - {NHTYPE_COMPLEX, (char *) "epri", sizeof(struct epri)}, - {NHTYPE_COMPLEX, (char *) "eshk", sizeof(struct eshk)}, - {NHTYPE_COMPLEX, (char *) "fakecorridor", sizeof(struct fakecorridor)}, - {NHTYPE_COMPLEX, (char *) "fe", sizeof(struct fe)}, - {NHTYPE_COMPLEX, (char *) "flag", sizeof(struct flag)}, - {NHTYPE_COMPLEX, (char *) "fruit", sizeof(struct fruit)}, - {NHTYPE_COMPLEX, (char *) "kinfo", sizeof(struct kinfo)}, - {NHTYPE_COMPLEX, (char *) "levelflags", sizeof(struct levelflags)}, - {NHTYPE_COMPLEX, (char *) "linfo", sizeof(struct linfo)}, - {NHTYPE_COMPLEX, (char *) "ls_t", sizeof(struct ls_t)}, - {NHTYPE_COMPLEX, (char *) "mapseen_feat", sizeof(struct mapseen_feat)}, - {NHTYPE_COMPLEX, (char *) "mapseen_flags", sizeof(struct mapseen_flags)}, - {NHTYPE_COMPLEX, (char *) "mapseen_rooms", sizeof(struct mapseen_rooms)}, - {NHTYPE_COMPLEX, (char *) "mapseen", sizeof(struct mapseen)}, - {NHTYPE_COMPLEX, (char *) "mextra", sizeof(struct mextra)}, - {NHTYPE_COMPLEX, (char *) "mkroom", sizeof(struct mkroom)}, - {NHTYPE_COMPLEX, (char *) "monst", sizeof(struct monst)}, - {NHTYPE_COMPLEX, (char *) "mvitals", sizeof(struct mvitals)}, - {NHTYPE_COMPLEX, (char *) "nhcoord", sizeof(struct nhcoord)}, - {NHTYPE_COMPLEX, (char *) "nhrect", sizeof(struct nhrect)}, - {NHTYPE_COMPLEX, (char *) "novel_tracking", sizeof(struct novel_tracking)}, - {NHTYPE_COMPLEX, (char *) "obj", sizeof(struct obj)}, - {NHTYPE_COMPLEX, (char *) "objclass", sizeof(struct objclass)}, - {NHTYPE_COMPLEX, (char *) "obj_split", sizeof(struct obj_split)}, - {NHTYPE_COMPLEX, (char *) "oextra", sizeof(struct oextra)}, -/* {NHTYPE_COMPLEX, (char *) "permonst", sizeof(struct permonst)}, */ - {NHTYPE_COMPLEX, (char *) "polearm_info", sizeof(struct polearm_info)}, - {NHTYPE_COMPLEX, (char *) "prop", sizeof(struct prop)}, - {NHTYPE_COMPLEX, (char *) "q_score", sizeof(struct q_score)}, - {NHTYPE_COMPLEX, (char *) "rm", sizeof(struct rm)}, - {NHTYPE_COMPLEX, (char *) "s_level", sizeof(struct s_level)}, - {NHTYPE_COMPLEX, (char *) "savefile_info", sizeof(struct savefile_info)}, - {NHTYPE_COMPLEX, (char *) "skills", sizeof(struct skills)}, - {NHTYPE_COMPLEX, (char *) "spell", sizeof(struct spell)}, - {NHTYPE_COMPLEX, (char *) "stairway", sizeof(struct stairway)}, -#ifdef SYSFLAGS - {NHTYPE_COMPLEX, (char *) "sysflag", sizeof(struct sysflag)}, -#endif - {NHTYPE_COMPLEX, (char *) "takeoff_info", sizeof(struct takeoff_info)}, - {NHTYPE_COMPLEX, (char *) "tin_info", sizeof(struct tin_info)}, - {NHTYPE_COMPLEX, (char *) "trap", sizeof(struct trap)}, - {NHTYPE_COMPLEX, (char *) "tribute_info", sizeof(struct tribute_info)}, - {NHTYPE_COMPLEX, (char *) "u_achieve", sizeof(struct u_achieve)}, - {NHTYPE_COMPLEX, (char *) "u_conduct", sizeof(struct u_conduct)}, - {NHTYPE_COMPLEX, (char *) "u_event", sizeof(struct u_event)}, - {NHTYPE_COMPLEX, (char *) "u_have", sizeof(struct u_have)}, - {NHTYPE_COMPLEX, (char *) "u_realtime", sizeof(struct u_realtime)}, - {NHTYPE_COMPLEX, (char *) "u_roleplay", sizeof(struct u_roleplay)}, - {NHTYPE_COMPLEX, (char *) "version_info", sizeof(struct version_info)}, - {NHTYPE_COMPLEX, (char *) "victual_info", sizeof(struct victual_info)}, - {NHTYPE_COMPLEX, (char *) "vlaunchinfo", sizeof(union vlaunchinfo)}, - {NHTYPE_COMPLEX, (char *) "vptrs", sizeof(union vptrs)}, - {NHTYPE_COMPLEX, (char *) "warntype_info", sizeof(struct warntype_info)}, - {NHTYPE_COMPLEX, (char *) "you", sizeof(struct you)} -}; - -/* - * These have arrays of other structs, not just arrays of - * simple types. We need to put array handling right into - * the code for these ones. - */ -struct needs_array_handling nah[] = { - {"fakecorr", (char *) "egd"}, - {"bill", "eshk"}, - {"msrooms", "mapseen"}, - {"mtrack", "monst"}, - {"ualignbase", "you"}, - {"weapon_skills", "you"}, -}; - -/* conditional code tags - eecch */ -const char *condtag[] = { -#ifdef SYSFLAGS - "sysflag","altmeta","#ifdef AMIFLUSH", "", - "sysflag","amiflush","","#endif /*AMIFLUSH*/", - "sysflag","numcols", "#ifdef AMII_GRAPHICS", "", - "sysflag","amii_dripens","","", - "sysflag","amii_curmap","","#endif", - "sysflag","fast_map", "#ifdef OPT_DISMAP", "#endif", - "sysflag","asksavedisk","#ifdef MFLOPPY","#endif", - "sysflag","page_wait", "#ifdef MAC", "#endif", -#endif - "linfo","where","#ifdef MFLOPPY","", - "linfo","time","","", - "linfo","size","","#endif /*MFLOPPY*/", - "obj","oinvis","#ifdef INVISIBLE_OBJECTS", "#endif", - (char *)0,(char *)0,(char *)0, (char *)0 -}; - - - -int main(argc, argv) -int argc; -char *argv[]; -{ - tagcount = 0; - - if (argc > 1) infilenm = argv[1]; - if (!infilenm || !*infilenm) infilenm = DEFAULTTAGNAME; - - infile = fopen(infilenm,"r"); - if (!infile) { - printf("%s not found or unavailable\n",infilenm); - quit(); - } - - while (fgets(line, sizeof line, infile)) { - ++lineno; -/* if (lineno == 868) DebugBreak(); */ - doline(line); - } - - fclose(infile); - printf("\nRead in %ld lines and stored %d tags.\n", lineno, tagcount); -#if 0 - showthem(); -#endif - generate_c_files(); - printf("Created %s\n", SFDATA_NAME); - printf("Created %s\n", SFPROTO_NAME); - exit(EXIT_SUCCESS); - /*NOTREACHED*/ - return 0; -} - -static void doline(aline) -char *aline; -{ - char buf[255]; - struct tagstruct *tmptag = malloc(sizeof(struct tagstruct)); - - if (!tmptag) { - out_of_memory(); - } - *tmptag = zerotag; - - if (!aline || (aline && *aline == '!')) { - free(tmptag); - return; - } - - strncpy(buf, deeol(aline), 254); - taglineparse(buf,tmptag); - chain(tmptag); - return; -} - -static void chain(tag) -struct tagstruct *tag; -{ - static struct tagstruct *prev = (struct tagstruct *)0; - if (!first) { - tag->next = (struct tagstruct *)0; - first = tag; - } else { - tag->next = (struct tagstruct *)0; - if (prev) { - prev->next = tag; - } else { - printf("Error - No previous tag at %s\n", tag->tag); - } - } - prev = tag; - ++tagcount; -} -static void quit() -{ - exit(EXIT_FAILURE); -} - -static void out_of_memory() -{ - printf("maketags: out of memory at line %ld of %s\n", - lineno, infilenm); - quit(); -} - -#if 0 -static char empt[] = {0, 0, 0, 0, 0, 0, 0, 0}; -#endif - -#if 0 -static char *member_array_dims(struct tagstruct *tmptag, char *buf) -{ - if (buf && tmptag) { - if (tmptag->arraysize1[0]) - Sprintf(buf, "[%s]", tmptag->arraysize1); - if (tmptag->arraysize2[0]) - Sprintf(eos(buf), "[%s]", tmptag->arraysize2); - return buf; - } - return empt; -} - -static char *member_array_size(struct tagstruct *tmptag, char *buf) -{ - if (buf && tmptag) { - if (tmptag->arraysize1[0]) - strcpy(buf, tmptag->arraysize1); - if (tmptag->arraysize2[0]) - Sprintf(eos(buf), " * %s", tmptag->arraysize2); - return buf; - } - return empt; -} -#endif - -void set_member_array_size(struct tagstruct *tmptag) -{ - char buf[BUFSZ]; - /* static char result[49]; */ - char *arr1 = (char *)0, *arr2 = (char *)0, *tmp; - int cnt = 0; - - if (!tmptag) return; - strcpy(buf, tmptag->searchtext); - - tmptag->arraysize1[0] = '\0'; - tmptag->arraysize2[0] = '\0'; - - /* find left-open square bracket */ - tmp = strchr(buf, '['); - if (tmp) { - arr1 = tmp; - *tmp = '\0'; - --tmp; - /* backup and make sure the [] are on the right tag */ - while (!(*tmp == SPACE || *tmp == TAB || *tmp ==',' || cnt > 50)) { - --tmp; - cnt++; - } - if (cnt > 50) return; - tmp++; - if (strcmp(tmp, tmptag->tag) == 0) { - ++arr1; - tmp = strchr(arr1, ']'); - if (tmp) { - arr2 = tmp; - ++arr2; - *tmp = '\0'; - if (*arr2 == '[') { /* two-dimensional array */ - ++arr2; - tmp = strchr(arr2, ']'); - if (tmp) *tmp = '\0'; - } else { - arr2 = (char *)0; - } - } - } else { - arr1 = (char *)0; - } - } - if (arr1) (void)strcpy(tmptag->arraysize1, arr1); - if (arr2) (void)strcpy(tmptag->arraysize2, arr2); -} - -static void parseExtensionFields (tmptag, buf) -struct tagstruct *tmptag; -char *buf; -{ - char *p = buf; - while (p != (char *)0 && *p != '\0') { - while (*p == TAB) - *p++ = '\0'; - if (*p != '\0') { - char *colon; - char *field = p; - - p = strchr (p, TAB); - if (p != (char *)0) - *p++ = '\0'; - colon = strchr (field, ':'); - if (colon == (char *)0) { - tmptag->tagtype = *field; - } else { - const char *key = field; - const char *value = colon + 1; - *colon = '\0'; - if ((strcmp (key, "struct") == 0) || - (strcmp (key, "union") == 0)) { - colon = strstr(value,"::"); - if (colon) - value = colon +2; - strcpy(tmptag->parenttype, key); - strcpy(tmptag->parent, value); - } - } - } - } -} - -void -taglineparse(p,tmptag) -char *p; -struct tagstruct *tmptag; -{ - int fieldsPresent = 0; - char *filenm = 0, *pattern = 0, *tmp1 = 0; - int linenumber = 0; - char *tab = strchr (p, TAB); - - if (tab != NULL) { - *tab = '\0'; - strcpy(tmptag->tag,p); - p = tab + 1; - filenm = p; - tab = strchr (p, TAB); - if (tab != NULL) { - *tab = '\0'; - p = tab + 1; - if (*p == '/' || *p == '?') { - /* parse pattern */ - int delimiter = *(unsigned char *) p; - linenumber = 0; - pattern = p; - do { - p = strchr (p + 1, delimiter); - } while (p != (char *)0 && *(p - 1) == '\\'); - - if (p == (char *)0) { - /* invalid pattern */ - } else - ++p; - } else if (isdigit ((int) *(unsigned char *) p)) { - /* parse line number */ - pattern = p; - linenumber = atol(p); - while (isdigit((int) *(unsigned char *) p)) - ++p; - } else { - /* invalid pattern */ - } - fieldsPresent = (strncmp (p, ";\"", 2) == 0); - *p = '\0'; - - if (fieldsPresent) - parseExtensionFields (tmptag, p + 2); - } - } - - strcpy(tmptag->searchtext, pattern); - tmptag->linenum = linenumber; - - /* add the array dimensions */ - set_member_array_size(tmptag); - - /* determine if this is a pointer and mark it as such */ - if (tmptag->searchtext[0] && - (tmptag->tagtype == 'm' || tmptag->tagtype == 's')) { - char ptrbuf[BUFSZ], searchbuf[BUFSZ]; - - (void) strcpy(ptrbuf, tmptag->searchtext); - Sprintf(searchbuf,"*%s", tmptag->tag); - tmp1 = strstr(ptrbuf, searchbuf); - if (!tmp1) { - Sprintf(searchbuf,"* %s", tmptag->tag); - tmp1 = strstr(ptrbuf, searchbuf); - } - if (tmp1) { - while ((tmp1 > ptrbuf) && (*tmp1 != SPACE) && - (*tmp1 != TAB) && (*tmp1 != ',')) - tmp1--; - tmp1++; - while (*tmp1 == '*') - tmp1++; - *tmp1 = '\0'; - /* now find the first * before this in case multiple things - are declared on this line */ - tmp1 = strchr(ptrbuf+2, '*'); - if (tmp1) { - tmp1++; - *tmp1 = '\0'; - tmp1 = ptrbuf + 2; - while (*tmp1 == SPACE || *tmp1 == TAB || *tmp1 == ',') - ++tmp1; - (void)strcpy(tmptag->ptr, tmp1); - } - } - } -} - -/* eos() is copied from hacklib.c */ -/* return the end of a string (pointing at '\0') */ -char * -eos(s) -char *s; -{ - while (*s) s++; /* s += strlen(s); */ - return s; -} - -static char stripbuf[255]; - -#if 0 -static char *stripspecial(char *st) -{ - char *out = stripbuf; - *out = '\0'; - if (!st) return st; - while(*st) { - if (*st >= SPACE) - *out++ = *st++; - else - st++; - } - *out = '\0'; - return stripbuf; -} -#endif - -static char *deblank(char *st) -{ - char *out = stripbuf; - *out = '\0'; - if (!st) return st; - while(*st) { - if (*st == SPACE) { - *out++ = '_'; - st++; - } else - *out++ = *st++; - } - *out = '\0'; - return stripbuf; -} - -static char *deeol(char *st) -{ - char *out = stripbuf; - *out = '\0'; - if (!st) return st; - while(*st) { - if ((*st == '\r') || (*st == '\n')) { - st++; - } else - *out++ = *st++; - } - *out = '\0'; - return stripbuf; -} - -#if 0 -static void showthem() -{ - char buf[BUFSZ], *tmp; - struct tagstruct *t = first; - while(t) { - printf("%-28s %c, %-16s %-10s", t->tag, t->tagtype, - t->parent, t->parenttype); -#if 0 - t->parent[0] ? t->searchtext : ""); -#endif - buf[0] = '\0'; - tmp = member_array_dims(t,buf); - if (tmp) printf("%s", tmp); - printf("%s","\n"); - t = t->next; - } -} -#endif - -#if 0 -static boolean -is_prim(sdt) -char *sdt; -{ - int k = 0; - if (sdt) { - /* special case where we don't match entire thing */ - if (!strncmpi(sdt, "Bitfield",8)) - return TRUE; - for (k = 0; k < SIZE(readtagstypes); ++k) { - if (!strcmpi(readtagstypes[k].dtype, sdt)) { - if (readtagstypes[k].dtclass == NHTYPE_SIMPLE) - return TRUE; - else - return FALSE; - } - } - } - return FALSE; -} -#endif - -char * -findtype(st, tag) -char *st; -char *tag; -{ - static char ftbuf[512]; - static char prevbuf[512]; - char *tmp1, *tmp2, *tmp3, *tmp4; - const char *r; - - if (!st) return (char *)0; - if (st[0] == '/' && st[1] == '^') { - tmp2 = tmp3 = tmp4 = (char *)0; - tmp1 = &st[3]; - while (*tmp1) { - if (isspace(*tmp1)) - ; /* skip it */ - else - break; - ++tmp1; - } - if (!strncmp(tmp1, tag, strlen(tag))) { - if(strlen(tag) == 1) { - char *sc = tmp1; - /* Kludge: single char match is too iffy, - check to make sure its a complete - token that we're comparing to. */ - ++sc; - if (!(*sc == '_' || (*sc > 'a' && *sc < 'z') || - (*sc > 'A' && *sc < 'Z') || (*sc > '0' && *sc < '9'))) - return (char *)0; - } else { - return (char *)0; - } - } - if (*tmp1) { - if (!strncmp(tmp1, "Bitfield", 8)) { - strcpy(ftbuf, tmp1); - tmp1 = ftbuf; - tmp3 = strchr(tmp1, ')'); - if (tmp3) { - tmp3++; - *tmp3 = '\0'; - return ftbuf; - } - return (char *)0; - } - } - if (*tmp1) { - int prevchar = 0; - strcpy(ftbuf, tmp1); - tmp1 = ftbuf; - /* find space separating first word with second */ - while (!isspace(*tmp1)) { - prevchar = *tmp1; - ++tmp1; - } - - /* some oddball cases */ - if (prevchar == ',' || prevchar == ';') { - tmp3 = strchr(ftbuf, ','); - tmp2 = strstr(ftbuf, tag); - return prevbuf; - } else { - /* a comma means that more than one thing declared on ine */ - tmp3 = strchr(tmp1, ','); - tmp2 = strstr(tmp1, tag); - } - /* make sure we're matching a complete token */ - if (tmp2) { - tmp4 = tmp2 + strlen(tag); - if ((*tmp4 == '_') || (*tmp4 >= 'a' && *tmp4 <= 'z') || - (*tmp4 >= 'A' && *tmp4 <= 'Z') || (*tmp4 >= '0' && *tmp4 <= '9')) - /* jump to next occurence then */ - tmp2 = strstr(tmp4, tag); - } - /* tag w/o comma OR tag found w comma and tag before comma */ - if ((tmp2 && !tmp3) || ((tmp2 && tmp3) && (tmp2 < tmp3))) { - *tmp2 = '\0'; - --tmp2; - while (isspace(*tmp2)) - --tmp2; - tmp2++; - *tmp2 = '\0'; - } - /* comma and no tag OR tag w comma and comma before tag */ - else if ((tmp3 && !tmp2) || ((tmp2 && tmp3) && (tmp3 < tmp2))) { - --tmp3; - if (isspace(*tmp3)) { - while (isspace(*tmp3)) - --tmp3; - } - while (!isspace(*tmp3) && (*tmp3 != '*')) - --tmp3; - while (isspace(*tmp3)) - --tmp3; - tmp3++; - *tmp3 = '\0'; - } - /* comma or semicolon immediately following tag */ - else { - volatile int y; - y = 1; - } - if (strncmpi(ftbuf, "struct ", 7) == 0) - r = (const char *) (ftbuf + 7); - else if (strncmpi(ftbuf, "union ", 6) == 0) - r = (const char *) (ftbuf + 6); - /* a couple of kludges follow unfortunately */ - else if (strncmpi(ftbuf, "coord", 5) == 0) - r = "nhcoord"; - else if (strncmpi(ftbuf, "anything", 8) == 0) - r = "any"; - else if (strncmpi(ftbuf, "const char", 10) == 0) - r = "char"; - else - r = (const char *) ftbuf; - strcpy(prevbuf, r); - return prevbuf; - } - } - prevbuf[0] = '\0'; - return (char *)0; -} - -boolean -listed(t) -struct tagstruct *t; -{ - int k; - - if ((strncmpi(t->tag, "Bitfield", 8) == 0) || - (strcmpi(t->tag, "string") == 0)) - return TRUE; - for (k = 0; k < SIZE(readtagstypes); ++k) { - /* This needs to be case-sensitive to avoid generating collision - * between 'align' and 'Align'. - */ - if (strcmp(readtagstypes[k].dtype, t->tag) == 0) - return TRUE; - } - return FALSE; -} - -/* TIME_type: type of the argument to time(); we actually use &(time_t) */ -#if defined(BSD) && !defined(POSIX_TYPES) -#define TIME_type long * -#else -#define TIME_type time_t * -#endif -/* LOCALTIME_type: type of the argument to localtime() */ -#if (defined(ULTRIX) && !(defined(ULTRIX_PROTO) || defined(NHSTDC))) \ - || (defined(BSD) && !defined(POSIX_TYPES)) -#define LOCALTIME_type long * -#else -#define LOCALTIME_type time_t * -#endif - -const char *preamble[] = { - "/* Copyright (c) NetHack Development Team %d. */\n", - "/* NetHack may be freely redistributed. See license for details. */\n\n", - "/* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE! */\n\n", - "#include \"hack.h\"\n", - "#include \"artifact.h\"\n", - "#include \"func_tab.h\"\n", - "#include \"lev.h\"\n", - "#include \"integer.h\"\n", - "#include \"wintype.h\"\n", - (char *)0 -}; -char crbuf[BUFSZ]; - -static const char *get_preamble(n) -int n; -{ - const char *r = preamble[n]; - - if (!n) { - time_t datetime = 0; - struct tm *lt; - - (void) time((TIME_type) &datetime); - lt = localtime((LOCALTIME_type) &datetime); - Sprintf(crbuf, preamble[0], (1900 + lt->tm_year)); - r = crbuf; - } - return r; -} - -static void output_types(fp1) -FILE *fp1; -{ - int k, cnt /*, hcnt = 1 */; - struct tagstruct *t = first; - - Fprintf(fp1, "%s", - "struct nhdatatypes_t nhdatatypes[] = {\n"); - - for (k = 0; k < SIZE(readtagstypes); ++k) { - if (readtagstypes[k].dtclass == NHTYPE_SIMPLE) { - Fprintf(fp1,"\t{NHTYPE_SIMPLE, (char *) \"%s\", sizeof(%s)},\n", - readtagstypes[k].dtype, - (strncmpi(readtagstypes[k].dtype, "Bitfield", 8) == 0) ? - "uint8_t" : - (strcmpi(readtagstypes[k].dtype, "string") == 0) ? - "uchar" : - (strcmpi(readtagstypes[k].dtype, "any") == 0) ? - "anything" : readtagstypes[k].dtype); -/* dtmacro(readtagstypes[k].dtype,0)); */ -#if 0 - Fprintf(fp2, "#define %s\t%s%d\n", dtmacro(readtagstypes[k].dtype,1), - (strlen(readtagstypes[k].dtype) > 12) ? "" : - (strlen(readtagstypes[k].dtype) < 5) ? "\t\t" : - "\t", hcnt++); -#endif - } - } - cnt = 0; - while(t) { - if (listed(t) && ((t->tagtype == 's') || (t->tagtype == 'u'))) { - if (!strcmp(t->tag, "any")) { - t = t->next; - continue; - } - if (cnt > 0) - Fprintf(fp1, "%s", ",\n"); - Fprintf(fp1, "\t{NHTYPE_COMPLEX, (char *) \"%s\", sizeof(%s %s)}", - t->tag, - (t->tagtype == 's') ? "struct" : "union", t->tag); - cnt += 1; - } - t = t->next; - } - Fprintf(fp1, "%s", "\n};\n\n"); - Fprintf(fp1, "int nhdatatypes_size()\n{\n\treturn SIZE(nhdatatypes);\n}\n\n"); -} - -static void generate_c_files() -{ - struct tagstruct *t = first; -#ifdef KR1ED - long clocktim = 0; -#else - time_t clocktim = 0; -#endif - char *c, cbuf[60], sfparent[BUFSZ], *substruct, *gline; - FILE *SFO_DATA, *SFI_DATA, *SFDATATMP, *SFO_PROTO, *SFI_PROTO, - *SFDATA, *SFPROTO; - int k = 0, j, opening /*, closetag = 0 */; - const char *pt; - char *ft, *layout, *last_ft = (char *)0; - int okeydokey, x, a; - boolean did_i; - - SFDATA = fopen(SFDATA_NAME, "w"); - if (!SFDATA) return; - - SFPROTO = fopen(SFPROTO_NAME, "w"); - if (!SFPROTO) return; - - SFO_DATA = fopen("../src/sfo_data.tmp", "w"); - if (!SFO_DATA) return; - - SFO_PROTO = fopen("../include/sfo_proto.tmp", "w"); - if (!SFO_PROTO) return; - - SFI_PROTO = fopen("../include/sfi_proto.tmp", "w"); - if (!SFI_PROTO) return; - - SFI_DATA = fopen("../src/sfi_data.tmp", "w"); - if (!SFI_DATA) return; - - SFDATATMP = fopen("../src/sfdata.tmp", "w"); - if (!SFDATATMP) return; - - (void) time(&clocktim); - Strcpy(cbuf, ctime(&clocktim)); - - for (c = cbuf; *c; c++) - if (*c == '\n') - break; - *c = '\0'; /* strip off the '\n' */ - - /* begin sfproto.h */ - Fprintf(SFPROTO,"/* NetHack %d.%d sfproto.h */\n", - VERSION_MAJOR, VERSION_MINOR); - for (j = 0; j < 3; ++j) - Fprintf(SFPROTO, "%s", get_preamble(j)); - Fprintf(SFPROTO, "#ifndef SFPROTO_H\n#define SFPROTO_H\n\n"); - Fprintf(SFPROTO, "#include \"hack.h\"\n#include \"integer.h\"\n#include \"wintype.h\"\n\n" - "#define E extern\n\n"); - - /* sfbase.c function prototypes */ - Fprintf(SFPROTO,"%s\n", "E int NDECL(critical_members_count);"); - Fprintf(SFPROTO,"/* sfbase.c output functions */\n"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_addinfo, (NHFILE *, const char *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_aligntyp, (NHFILE *, aligntyp *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_any, (NHFILE *, anything *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_bitfield, (NHFILE *, uint8_t *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_boolean, (NHFILE *, boolean *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_char, (NHFILE *, const char *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_genericptr, (NHFILE *, genericptr_t *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_int, (NHFILE *, int *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_long, (NHFILE *, long *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_schar, (NHFILE *, schar *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_short, (NHFILE *, short *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_size_t, (NHFILE *, size_t *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_time_t, (NHFILE *, time_t *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_uchar, (NHFILE *, uchar *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_unsigned, (NHFILE *, unsigned *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_uchar, (NHFILE *, unsigned char *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_uint, (NHFILE *, unsigned int *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_ulong, (NHFILE *, unsigned long *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_ushort, (NHFILE *, unsigned short *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_xchar, (NHFILE *, xchar *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfo_str, (NHFILE *, const char *, const char *, const char *, int));"); - Fprintf(SFPROTO,"/* sfbase.c input functions */\n"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_addinfo, (NHFILE *, const char *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_aligntyp, (NHFILE *, aligntyp *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_any, (NHFILE *, anything *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_bitfield, (NHFILE *, uint8_t *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_boolean, (NHFILE *, boolean *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_char, (NHFILE *, const char *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_genericptr, (NHFILE *, genericptr_t *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_int, (NHFILE *, int *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_long, (NHFILE *, long *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_schar, (NHFILE *, schar *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_short, (NHFILE *, short *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_size_t, (NHFILE *, size_t *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_time_t, (NHFILE *, time_t *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_uchar, (NHFILE *, uchar *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_unsigned, (NHFILE *, unsigned *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_uchar, (NHFILE *, unsigned char *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_uint, (NHFILE *, unsigned int *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_ulong, (NHFILE *, unsigned long *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_ushort, (NHFILE *, unsigned short *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_xchar, (NHFILE *, xchar *, const char *, const char *, int));"); - Fprintf(SFPROTO,"%s\n", "E void FDECL(sfi_str, (NHFILE *, const char *, const char *, const char *, int));"); - Fprintf(SFO_PROTO, "/* generated output functions */\n"); - Fprintf(SFI_PROTO, "/* generated input functions */\n"); - - /* begin sfdata.c */ - Fprintf(SFDATA,"/* NetHack %d.%d sfdata.c */\n", - VERSION_MAJOR, VERSION_MINOR); - for (j = 0; preamble[j]; ++j) - Fprintf(SFDATA, "%s", get_preamble(j)); - Fprintf(SFDATA, "#include \"sfproto.h\"\n\n"); - Fprintf(SFDATA, "#define NHTYPE_SIMPLE 1\n"); - Fprintf(SFDATA, "#define NHTYPE_COMPLEX 2\n"); - Fprintf(SFDATA, "struct nhdatatypes_t {\n"); - Fprintf(SFDATA, " unsigned int dtclass;\n"); - Fprintf(SFDATA, " char *dtype;\n"); - Fprintf(SFDATA, " size_t dtsize;\n};\n\n"); - Fprintf(SFDATA,"static uint8_t bitfield = 0;\n"); - - output_types(SFDATATMP); - Fprintf(SFDATATMP,"const char *critical_members[] = {\n"); - - k = 0; - opening = 1; - did_i = FALSE; - while(k < SIZE(readtagstypes)) { - boolean insert_const = FALSE; - - if (readtagstypes[k].dtclass == NHTYPE_COMPLEX) { - - if (!strncmpi(readtagstypes[k].dtype,"Bitfield",8)) { - Fprintf(SFO_DATA, - "\nvoid\nsfo_bitfield(nhfp, d_bitfield, myparent, myname, cnt)\n" - "NHFILE *nhfp;\n" - "uint8_t *d_bitfield;\n" - "const char *myparent;\n" - "const char *myname;\n" - "int cnt;\n" - "{\n"); - - Fprintf(SFI_DATA, - "\nvoid\nsfi_bitfield(nhfp, d_bitfield, myparent, myname, cnt)\n" - "NHFILE *nhfp;\n" - "uint8_t *d_bitfield;\n" - "const char *myparent;\n" - "const char *myname;\n" - "int cnt;\n" - "{\n"); - } - -#if 0 - if (!strncmpi(readtagstypes[k].dtype,"version_info",8)) - insert_const = TRUE; -#endif - - pt = (const char *) 0; - layout = (char *) 0; - t = first; - while(t) { - if (t->tagtype == 'u' && !strcmp(t->tag, readtagstypes[k].dtype)) { - pt = "union"; - break; - } - t = t->next; - } - - if (!pt) { - pt = "struct"; - } - Fprintf(SFO_PROTO, - "E void FDECL(sfo_%s, (NHFILE *, %s%s %s *, const char *, const char *, int));\n", - readtagstypes[k].dtype, - insert_const ? "const " : "", - pt, readtagstypes[k].dtype); - - Fprintf(SFO_DATA, - "\nvoid\nsfo_%s(nhfp, d_%s, myparent, myname, cnt)\n" - "NHFILE *nhfp;\n" - "%s%s %s *d_%s;\n" - "const char *myparent;\n" - "const char *myname;\n" - "int cnt;\n" - "{\n", - readtagstypes[k].dtype, - deblank(readtagstypes[k].dtype), - insert_const ? "const " : "", - pt, readtagstypes[k].dtype, - deblank(readtagstypes[k].dtype)); - - Fprintf(SFO_DATA, - " const char *parent = \"%s\";\n", - readtagstypes[k].dtype); - - Fprintf(SFI_PROTO, - "E void FDECL(sfi_%s, (NHFILE *, %s%s %s *, const char *, const char *, int));\n", - readtagstypes[k].dtype, - insert_const ? "const " : "", - pt, readtagstypes[k].dtype); - - Fprintf(SFI_DATA, - "\nvoid\nsfi_%s(nhfp, d_%s, myparent, myname, cnt)\n" - "NHFILE *nhfp;\n" - "%s%s %s *d_%s;\n" - "const char *myparent;\n" - "const char *myname;\n" - "int cnt;\n" - "{\n", - readtagstypes[k].dtype, - deblank(readtagstypes[k].dtype), - insert_const ? "const " : "", - pt, readtagstypes[k].dtype, - deblank(readtagstypes[k].dtype)); - - Fprintf(SFI_DATA, - " const char *parent = \"%s\";\n", - readtagstypes[k].dtype); - - Sprintf(sfparent, "%s %s", pt, readtagstypes[k].dtype); - - for (a = 0; a < SIZE(nah); ++a) { - if (!strcmp(nah[a].parent, readtagstypes[k].dtype)) { - if (!did_i) { - Fprintf(SFO_DATA, " int i;\n"); - Fprintf(SFI_DATA, " int i;\n"); - did_i = TRUE; - } - } - } - - Fprintf(SFO_DATA, "\n"); - Fprintf(SFI_DATA, "\n"); - - Fprintf(SFO_DATA, " nhUse(myname);\n nhUse(cnt);\n"); - Fprintf(SFO_DATA, - " if (nhfp->addinfo)\n" - " sfo_addinfo(nhfp, myparent, \"start\", \"%s\", 1);\n", - readtagstypes[k].dtype); - - Fprintf(SFI_DATA, " nhUse(myname);\n nhUse(cnt);\n"); - Fprintf(SFI_DATA, - " if (nhfp->addinfo)\n" - " sfi_addinfo(nhfp, myparent, \"start\", \"%s\", 1);\n", - readtagstypes[k].dtype); - - Fprintf(SFO_DATA, "\n"); - Fprintf(SFI_DATA, "\n"); - - /******************************************************** - * cycle through all the tags and find every tag with * - * a parent matching readtagstypes[k].dtype * - ********************************************************/ - - t = first; - - while(t) { - x = 0; - okeydokey = 0; - - if (t->tagtype == 's') { - char *ss = strstr(t->searchtext,"{$/"); - - if (ss) { - strcpy(ssdef, t->tag); - } - t = t->next; - continue; - } - - /************insert opening conditional if needed ********/ - while(condtag[x]) { - if (!strcmp(condtag[x],readtagstypes[k].dtype) && - !strcmp(condtag[x+1],t->tag)) { - okeydokey = 1; - break; - } - x = x + 4; - } - - /* some structs are entirely defined within another struct declaration. - * Legal, but unfortunate for us here. - */ - substruct = strstr(t->parent, "::"); - if (substruct) { - substruct += 2; - } - - if ((strcmp(readtagstypes[k].dtype, t->parent) == 0) || - (substruct && strcmp(readtagstypes[k].dtype, substruct) == 0)) { - ft = (char *)0; - if (t->ptr[0]) - ft = &t->ptr[0]; - else - ft = findtype(t->searchtext, t->tag); - if (ft) { - last_ft = ft; - if (okeydokey && condtag[x+2] && strlen(condtag[x+2]) > 0) { - Fprintf(SFO_DATA,"%s\n", condtag[x+2]); - Fprintf(SFI_DATA,"%s\n", condtag[x+2]); - Fprintf(SFDATATMP,"%s\n", condtag[x+2]); - } - } else { - /* use the last found one as last resort then */ - ft = last_ft; - } - - /***************** Bitfield *******************/ - if (!strncmpi(ft, "Bitfield", 8)) { - char lbuf[BUFSZ]; - int j2, z; - - Sprintf(lbuf, - " " - "bitfield = d_%s->%s;", - readtagstypes[k].dtype, t->tag); - z = (int) strlen(lbuf); - for (j2 = 0; j2 < (65 - z); ++j2) - Strcat(lbuf, " "); - Sprintf(eos(lbuf), "/* (%s) */\n", ft); - Fprintf(SFO_DATA, "%s", lbuf); - Fprintf(SFO_DATA, - " " - "sfo_bitfield(nhfp, &bitfield, parent, \"%s\", %s);\n", - t->tag, bfsize(ft)); -#if 0 - Fprintf(SFI_DATA, - " " - "bitfield = 0;\n"); -#else - Fprintf(SFI_DATA, - " " - "bitfield = d_%s->%s; /* set it to current value for testing */\n", - readtagstypes[k].dtype, t->tag); -#endif - Fprintf(SFI_DATA, - " " - "sfi_bitfield(nhfp, &bitfield, parent, \"%s\", %s);\n", - t->tag, bfsize(ft)); - - Fprintf(SFI_DATA, - " " - "d_%s->%s = bitfield;\n\n", - readtagstypes[k].dtype, t->tag); - Fprintf(SFDATATMP, - "\t\"%s:%s:%s\",\n", - sfparent, t->tag, ft); - } else { - /**************** not a bitfield ****************/ - char arrbuf[BUFSZ]; - char lbuf[BUFSZ * 2]; /* sprintf target for others, gcc complaint */ - char fnbuf[BUFSZ]; - char altbuf[BUFSZ]; - boolean isptr = FALSE, kludge_sbrooms = FALSE; - boolean insert_loop = FALSE; - int j2, z; - - /*************** kludge for sbrooms *************/ - if (!strcmp(t->tag, "sbrooms")) { - kludge_sbrooms = TRUE; - (void) strcpy(t->arraysize1,"MAX_SUBROOMS"); - } - - if (t->arraysize2[0]) { - Sprintf(arrbuf, "(%s * %s)", - t->arraysize1, t->arraysize2); - isptr = TRUE; /* suppress the & in function args */ - } else if (t->arraysize1[0]) { - Sprintf(arrbuf, "%s", t->arraysize1); - isptr = TRUE; /* suppress the & in function args */ - } else { - Strcpy(arrbuf, "1"); - } - Strcpy(fnbuf, dtfn(ft,0,&isptr)); - /* - * determine if this is one of the special cases - * where there's an array of structs instead of - * an array of simple types. We need to insert - * a for loop in those cases. - */ - for (a = 0; a < SIZE(nah); ++a) { - if (!strcmp(nah[a].parent, t->parent)) - if (!strcmp(nah[a].nm, t->tag)) - insert_loop = TRUE; - } - - if (isptr && !strcmp(fnbuf, readtagstypes[k].dtype)) { - Strcpy(altbuf, "genericptr"); - } else if (isptr && - (!strcmp(t->ptr, "struct permonst *") || - !strcmp(t->ptr, "struct monst *") || - !strcmp(t->ptr, "struct obj *") || - !strcmp(t->ptr, "struct cemetery *") || - !strcmp(t->ptr, "struct container *") || - !strcmp(t->ptr, "struct mextra *") || - !strcmp(t->ptr, "struct oextra *") || - !strcmp(t->ptr, "struct s_level *") || - !strcmp(t->ptr, "struct bill_x *") || - !strcmp(t->ptr, "struct trap *"))) { - Strcpy(altbuf, "genericptr"); - } else if (isptr && - (!strcmp(t->parent, "engr") && - !strcmp(t->tag, "engr_txt"))) { - Strcpy(altbuf, "genericptr"); - } else if (isptr && !strcmp(t->tag, "oc_uname")) { - Strcpy(altbuf, "genericptr"); - } else { - Strcpy(altbuf, fnbuf); - } - - if (insert_loop) { - Fprintf(SFO_DATA, - " for (i = 0; i < %s; ++i)\n", - arrbuf); - Fprintf(SFI_DATA, - " for (i = 0; i < %s; ++i)\n", - arrbuf); - arrbuf[0] = '1'; - arrbuf[1] = '\0'; - } - - Sprintf(lbuf, - " " - "%ssfo_%s(nhfp, %s%sd_%s->%s%s, parent, \"%s\", %s);", - insert_loop ? " " : "", - altbuf, - (isptr && !strcmp(altbuf, "genericptr")) ? "(genericptr_t) " : "", - (isptr && !insert_loop && !kludge_sbrooms - && strcmp(altbuf, "genericptr")) ? "" : "&", - readtagstypes[k].dtype, - t->tag, - kludge_sbrooms ? "[0]" : insert_loop ? "[i]" : "", - t->tag, - arrbuf); - /* align comments */ - z = (int) strlen(lbuf); - for (j2 = 0; j2 < (65 - z); ++j2) - Strcat(lbuf, " "); - Sprintf(eos(lbuf), "/* (%s) */\n", ft); - Fprintf(SFO_DATA, "%s", lbuf); - - Sprintf(lbuf, - " " - "%ssfi_%s(nhfp, %s%sd_%s->%s%s, parent, \"%s\", %s);\n", - insert_loop ? " " : "", - altbuf, - (isptr && !strcmp(altbuf, "genericptr")) ? "(genericptr_t) " : "", - (isptr && !insert_loop && !kludge_sbrooms - && strcmp(altbuf, "genericptr")) ? "" : "&", - readtagstypes[k].dtype, - t->tag, - kludge_sbrooms ? "[0]" : insert_loop ? "[i]" : "", - t->tag, - arrbuf); - Fprintf(SFI_DATA, "%s", lbuf); - Fprintf(SFDATATMP, - "\t\"%s:%s:%s\",\n", - sfparent, t->tag,fieldfix(ft,ssdef)); - kludge_sbrooms = FALSE; - } - - /************insert closing conditional if needed ********/ - if (okeydokey && condtag[x+3] && strlen(condtag[x+3]) > 0) { - Fprintf(SFO_DATA,"%s\n", condtag[x+3]); - Fprintf(SFI_DATA,"%s\n", condtag[x+3]); - Fprintf(SFDATATMP,"%s\n", condtag[x+3]); - } - } - t = t->next; - } - - Fprintf(SFO_DATA, "\n"); - Fprintf(SFI_DATA, "\n"); - - Fprintf(SFO_DATA, - " if (nhfp->addinfo)\n" - " sfo_addinfo(nhfp, myparent, \"end\", \"%s\", 1);\n", - readtagstypes[k].dtype); - - Fprintf(SFI_DATA, - " if (nhfp->addinfo)\n" - " sfi_addinfo(nhfp, myparent, \"end\", \"%s\", 1);\n", - readtagstypes[k].dtype); - - Fprintf(SFO_DATA, "}\n"); - Fprintf(SFI_DATA, "}\n"); - opening = 0; - } - ++k; - did_i = FALSE; - } - - Fprintf(SFDATATMP,"};\n\n"); - Fprintf(SFDATATMP, "int critical_members_count()\n{\n\treturn SIZE(critical_members);\n}\n\n"); - - fclose(SFO_DATA); - fclose(SFI_DATA); - fclose(SFO_PROTO); - fclose(SFI_PROTO); - fclose(SFDATATMP); - - /* Consolidate SFO_* and SFI_* into single files */ - - SFO_DATA = fopen("../src/sfo_data.tmp", "r"); - if (!SFO_DATA) return; - while ((gline = fgetline(SFO_DATA)) != 0) { - (void) fputs(gline, SFDATA); - free(gline); - } - (void) fclose(SFO_DATA); - (void) remove("../src/sfo_data.tmp"); - - SFI_DATA = fopen("../src/sfi_data.tmp", "r"); - if (!SFI_DATA) return; - while ((gline = fgetline(SFI_DATA)) != 0) { - (void) fputs(gline, SFDATA); - free(gline); - } - (void) fclose(SFI_DATA); - (void) remove("../src/sfi_data.tmp"); - - SFO_PROTO = fopen("../include/sfo_proto.tmp", "r"); - if (!SFO_PROTO) return; - while ((gline = fgetline(SFO_PROTO)) != 0) { - (void) fputs(gline, SFPROTO); - free(gline); - } - (void) fclose(SFO_PROTO); - (void) remove("../include/sfo_proto.tmp"); - - SFI_PROTO = fopen("../include/sfi_proto.tmp", "r"); - if (!SFI_PROTO) return; - while ((gline = fgetline(SFI_PROTO)) != 0) { - (void) fputs(gline, SFPROTO); - free(gline); - } - (void) fclose(SFI_PROTO); - (void) remove("../include/sfi_proto.tmp"); - - SFDATATMP = fopen("../src/sfdata.tmp", "r"); - if (!SFDATATMP) return; - while ((gline = fgetline(SFDATATMP)) != 0) { - (void) fputs(gline, SFDATA); - free(gline); - } - (void) fclose(SFDATATMP); - (void) remove("../src/sfdata.tmp"); - - Fprintf(SFDATA, "/*sfdata.c*/\n"); - Fprintf(SFPROTO,"#endif /* SFPROTO_H */\n"); - (void) fclose(SFDATA); - (void) fclose(SFPROTO); -} - -#if 0 -static char * -dtmacro(str,n) -const char *str; -int n; /* 1 = supress appending |SF_PTRMASK */ -{ - static char buf[128], buf2[128]; - char *nam, *c; - int ispointer = 0; - - if (!str) - return (char *)0; - (void)strncpy(buf, str, 127); - - c = buf; - while (*c) - c++; /* eos */ - - c--; - if (*c == '*') { - ispointer = 1; - *c = '\0'; - c--; - } - while(isspace(*c)) { - c--; - } - *(c+1) = '\0'; - c = buf; - - if (strncmpi(c, "Bitfield", 8) == 0) { - *(c+8) = '\0'; - } else if (strcmpi(c, "genericptr_t") == 0) { - ispointer = 1; - } else if (strncmpi(c, "const ", 6) == 0) { - c = buf + 6; - } else if ((strncmpi(c, "struct ", 7) == 0) || - (strncmpi(c, "struct\t", 7) == 0)) { - c = buf + 7; - } else if (strncmpi(c, "union ", 6) == 0) { - c = buf + 6; - } - - /* end of substruct within struct definition */ - if (strcmp(buf,"}") == 0 && strlen(ssdef) > 0) { - strcpy(buf,ssdef); - c = buf; - } - - for (nam = c; *c; c++) { - if (*c >= 'a' && *c <= 'z') - *c -= (char)('a' - 'A'); - else if (*c < 'A' || *c > 'Z') - *c = '_'; - } - (void)sprintf(buf2, "SF_%s%s", nam, - (ispointer && (n == 0)) ? " | SF_PTRMASK" : ""); - return buf2; -} -#endif - -static char * -dtfn(str,n, isptr) -const char *str; -int n; /* 1 = supress appending |SF_PTRMASK */ -boolean *isptr; -{ - static char buf[128], buf2[128]; - const char *nam; - char *c; - int ispointer = 0; - - if (!str) - return (char *)0; - (void)strncpy(buf, str, 127); - - c = buf; - while (*c) c++; /* eos */ - - c--; - if (*c == '*') { - ispointer = 1; - *c = '\0'; - c--; - } - while(isspace(*c)) { - c--; - } - *(c+1) = '\0'; - c = buf; - - if (strncmpi(c, "Bitfield", 8) == 0) { - *(c+8) = '\0'; - } else if (strcmpi(c, "genericptr_t") == 0) { - ispointer = 1; - } else if (strncmpi(c, "const ", 6) == 0) { - c = buf + 6; - } else if ((strncmpi(c, "struct ", 7) == 0) || - (strncmpi(c, "struct\t", 7) == 0)) { - c = buf + 7; - } else if (strncmpi(c, "union ", 6) == 0) { - c = buf + 6; - } - - /* end of substruct within struct definition */ - if (strcmp(buf,"}") == 0 && strlen(ssdef) > 0) { - strcpy(buf,ssdef); - c = buf; - } - - for (nam = (const char *) c; *c; c++) { - if (*c >= 'A' && *c <= 'Z') - *c = tolower(*c); - else if (*c == ' ') - *c = '_'; - } - /* some fix-ups */ - if (!strcmp(nam, "genericptr_t")) - nam = "genericptr"; - else if (!strcmp(nam, "unsigned_int")) - nam = "uint"; - else if (!strcmp(nam, "unsigned_long")) - nam = "ulong"; - else if (!strcmp(nam, "unsigned_char")) - nam = "uchar"; - else if (!strcmp(nam, "unsigned_short")) - nam = "ushort"; - - if (ispointer && isptr && n == 0) - *isptr = TRUE; - (void)sprintf(buf2, "%s%s", nam, ""); - return buf2; -} - -static char * -fieldfix(f,ss) -char *f, *ss; -{ - char *c /*, *dest = fieldfixbuf */; - - if (strcmp(f,"}") == 0 && strlen(ss) > 0 && strlen(ss) < BUFSZ - 1) { - /* (void)sprintf(fieldfixbuf,"struct %s", ss); */ - strcpy(fieldfixbuf,ss); - } else { - if (strlen(f) < BUFSZ - 1) strcpy(fieldfixbuf,f); - } - - /* converting any tabs to space */ - for (c = fieldfixbuf; *c; c++) - if (*c == TAB) *c = SPACE; - - return fieldfixbuf; -} - -static char * -bfsize(str) -const char *str; -{ - static char buf[128]; - const char *c1; - char *c2, *subst; - - if (!str) - return (char *)0; - - /* kludge */ - subst = strstr(str, ",$/"); - if (subst != 0) { - subst++; - *subst++ = ' '; - *subst++ = '1'; - } - - c2 = buf; - c1 = str; - while (*c1) { - if (*c1 == ',') - break; - c1++; - } - - if (*c1 == ',') { - c1++; - while (*c1 && *c1 != ')') { - *c2++ = *c1++; - } - *c2 = '\0'; - } else { - return (char *)0; - } - return buf; -} - -/* Read one line from input, up to and including the next newline - * character. Returns a pointer to the heap-allocated string, or a - * null pointer if no characters were read. - */ -static char * -fgetline(fd) -FILE *fd; -{ - static const int inc = 256; - int len = inc; - char *c = malloc(len), *ret; - - for (;;) { - ret = fgets(c + len - inc, inc, fd); - if (!ret) { - free(c); - c = NULL; - break; - } else if (index(c, '\n')) { - /* normal case: we have a full line */ - break; - } - len += inc; - c = realloc(c, len); - } - return c; -} - -/*readtags2.c*/ - - diff --git a/win/win32/vs2017/NetHack.vcxproj b/win/win32/vs2017/NetHack.vcxproj index 565e21794..5f539114f 100644 --- a/win/win32/vs2017/NetHack.vcxproj +++ b/win/win32/vs2017/NetHack.vcxproj @@ -169,10 +169,6 @@ - - - - diff --git a/win/win32/vs2017/NetHackW.vcxproj b/win/win32/vs2017/NetHackW.vcxproj index 12b4dbd62..1ea3ce9e5 100644 --- a/win/win32/vs2017/NetHackW.vcxproj +++ b/win/win32/vs2017/NetHackW.vcxproj @@ -163,10 +163,6 @@ - - - - From f78b4db7f0174a772932a6736484de9407cec93f Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 8 Dec 2019 07:32:58 -0500 Subject: [PATCH 457/529] more files --- src/files.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/files.c b/src/files.c index b24719361..33f7928b8 100644 --- a/src/files.c +++ b/src/files.c @@ -759,8 +759,6 @@ d_level *lev; Sprintf(eos(dptr), ".%d", lev->dlevel); #ifdef SYSCF idx = sysopt.bonesformat[0]; - if (idx > historical && idx <= ascii) - Strcat(dptr, sfoprocs[idx].ext); #endif #ifdef VMS Strcat(dptr, ";1"); @@ -951,11 +949,6 @@ boolean regularize_it; const char *postappend = (const char *) 0, *sfindicator = (const char *) 0; -#ifdef SYSCF - idx = sysopt.saveformat[0]; - if (idx > historical && idx <= ascii) - sfindicator = sfoprocs[idx].ext; -#endif if (g.program_state.in_self_recover) { /* self_recover needs to be done as historical structlevel content until that process is @@ -1036,15 +1029,7 @@ boolean regularize_it; if (strlen(g.SAVEF) + strlen(SAVE_EXTENSION) < (SAVESIZE - 1)) { Strcat(g.SAVEF, SAVE_EXTENSION); #ifdef MSDOS -#ifdef SYSCF - if (idx >= historical && idx <= ascii) { - /* we did leave room for the extra char in SAVE_EXTENSION */ - g.SAVEF[strlen(g.SAVEF)-1] = - (idx == lendian) ? 'l' : - (idx == ascii) ? 'a' : '\0'; - } - sfindicator = (g.program_state.in_self_recover) ? "" : sfoprocs[idx].ext; -#endif + sfindicator = ""; #endif } else overflow = 3; From 8a47f13935ab61c2464fd83f8e2c674d16c26ae2 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 8 Dec 2019 07:35:43 -0500 Subject: [PATCH 458/529] more files --- src/files.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/files.c b/src/files.c index 33f7928b8..429195480 100644 --- a/src/files.c +++ b/src/files.c @@ -944,7 +944,7 @@ void set_savefile_name(regularize_it) boolean regularize_it; { - int idx = 0, regoffset = 0, overflow = 0, + int idx = historical, regoffset = 0, overflow = 0, indicator_spot = 0; /* 0=no indicator, 1=before ext, 2=after ext */ const char *postappend = (const char *) 0, *sfindicator = (const char *) 0; @@ -958,7 +958,6 @@ boolean regularize_it; place it into the save file. */ idx = historical; - sfindicator = sfoprocs[idx].ext; } #ifdef VMS Sprintf(g.SAVEF, "[.save]%d%s", getuid(), g.plname); From e81f761969b4fbb649932a63499ea6ced0d25b7f Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 8 Dec 2019 08:02:39 -0500 Subject: [PATCH 459/529] patchlevel --- include/patchlevel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/patchlevel.h b/include/patchlevel.h index 94fac6a63..0b100538d 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -14,7 +14,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 2 +#define EDITLEVEL 3 #define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2019" #define COPYRIGHT_BANNER_B \ From b9f3a33ec9d9b0c7625dc6ffb98eaf2b373d37f1 Mon Sep 17 00:00:00 2001 From: Patric Mueller Date: Sun, 8 Dec 2019 14:41:54 +0100 Subject: [PATCH 460/529] Update depend.awk for the new Qt location and lua headers --- sys/unix/Makefile.src | 171 ++++++++++++++++++------------------------ sys/unix/depend.awk | 12 ++- 2 files changed, 85 insertions(+), 98 deletions(-) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 3d54976ea..3efc6fa7b 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -171,7 +171,7 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome # CFLAGS = -g -I../include #CFLAGS = -O -I../include -#LFLAGS = +#LFLAGS = # -lm required by lua LIBS += -lm @@ -319,7 +319,7 @@ WINGNOMELIB = -lgnomeui -lgnome -lart_lgpl -lgtk -lgdk -lpopt # libraries for Gem port WINGEMLIB = -le_gem -lgem # -# libraries for BeOS +# libraries for BeOS WINBELIB = -lbe # # libraries for curses port @@ -729,11 +729,10 @@ depend: ../sys/unix/depend.awk \ # config.h timestamp $(CONFIG_H): ../include/config.h ../include/config1.h ../include/tradstdc.h \ ../include/global.h ../include/coord.h ../include/vmsconf.h \ - ../include/system.h ../include/nhlua.h \ - ../include/unixconf.h ../include/os2conf.h ../include/micro.h \ - ../include/pcconf.h ../include/tosconf.h ../include/amiconf.h \ - ../include/macconf.h ../include/beconf.h ../include/wceconf.h \ - ../include/ntconf.h + ../include/system.h ../include/nhlua.h ../include/unixconf.h \ + ../include/os2conf.h ../include/micro.h ../include/pcconf.h \ + ../include/tosconf.h ../include/amiconf.h ../include/macconf.h \ + ../include/beconf.h ../include/wceconf.h ../include/ntconf.h touch $(CONFIG_H) # hack.h timestamp $(HACK_H): ../include/hack.h $(CONFIG_H) ../include/lint.h ../include/align.h \ @@ -755,8 +754,7 @@ $(HACK_H): ../include/hack.h $(CONFIG_H) ../include/lint.h ../include/align.h \ # tos.o: ../sys/atari/tos.c $(HACK_H) ../include/tcap.h $(CC) $(CFLAGS) -c -o $@ ../sys/atari/tos.c -pcmain.o: ../sys/share/pcmain.c $(HACK_H) ../include/dlb.h \ - ../include/integer.h +pcmain.o: ../sys/share/pcmain.c $(HACK_H) ../include/dlb.h $(CC) $(CFLAGS) -c -o $@ ../sys/share/pcmain.c pcsys.o: ../sys/share/pcsys.c $(HACK_H) $(CC) $(CFLAGS) -c -o $@ ../sys/share/pcsys.c @@ -895,83 +893,81 @@ gr_rect.o: ../win/gem/gr_rect.c ../include/gr_rect.h tile.o: tile.c $(HACK_H) cppregex.o: ../sys/share/cppregex.cpp $(CXX) $(CXXFLAGS) -c -o $@ ../sys/share/cppregex.cpp -qt_bind.o: ../win/Qt/qt_bind.cpp $(HACK_H) ../include/qt_bind.h \ - ../include/qt_click.h ../include/qt_delay.h \ - ../include/qt_xcmd.h ../include/qt_key.h ../include/qt_map.h \ - ../include/qt_menu.h ../include/qt_msg.h ../include/qt_plsel.h \ - ../include/qt_svsel.h ../include/qt_set.h ../include/qt_stat.h \ - ../include/qt_streq.h ../include/qt_yndlg.h \ - ../include/qt_str.h ../include/dlb.h +qt_bind.o: ../win/Qt/qt_bind.cpp $(HACK_H) ../win/Qt/qt_bind.h \ + ../win/Qt/qt_click.h ../win/Qt/qt_delay.h ../win/Qt/qt_xcmd.h \ + ../win/Qt/qt_key.h ../win/Qt/qt_map.h ../win/Qt/qt_menu.h \ + ../win/Qt/qt_msg.h ../win/Qt/qt_plsel.h ../win/Qt/qt_svsel.h \ + ../win/Qt/qt_set.h ../win/Qt/qt_stat.h ../win/Qt/qt_streq.h \ + ../win/Qt/qt_yndlg.h ../win/Qt/qt_str.h ../include/dlb.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_bind.cpp -qt_click.o: ../win/Qt/qt_click.cpp $(HACK_H) ../include/qt_click.h +qt_click.o: ../win/Qt/qt_click.cpp $(HACK_H) ../win/Qt/qt_click.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_click.cpp -qt_clust.o: ../win/Qt/qt_clust.cpp ../include/qt_clust.h +qt_clust.o: ../win/Qt/qt_clust.cpp ../win/Qt/qt_clust.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_clust.cpp -qt_delay.o: ../win/Qt/qt_delay.cpp $(HACK_H) ../include/qt_delay.h +qt_delay.o: ../win/Qt/qt_delay.cpp $(HACK_H) ../win/Qt/qt_delay.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_delay.cpp qt_glyph.o: ../win/Qt/qt_glyph.cpp $(HACK_H) ../include/tile2x11.h \ - ../include/qt_glyph.h ../include/qt_set.h ../include/qt_str.h + ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_glyph.cpp -qt_icon.o: ../win/Qt/qt_icon.cpp $(HACK_H) ../include/qt_icon.h +qt_icon.o: ../win/Qt/qt_icon.cpp $(HACK_H) ../win/Qt/qt_icon.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_icon.cpp -qt_inv.o: ../win/Qt/qt_inv.cpp $(HACK_H) ../include/qt_inv.h \ - ../include/qt_glyph.h ../include/qt_set.h +qt_inv.o: ../win/Qt/qt_inv.cpp $(HACK_H) ../win/Qt/qt_inv.h \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_inv.cpp -qt_key.o: ../win/Qt/qt_key.cpp $(HACK_H) ../include/qt_key.h +qt_key.o: ../win/Qt/qt_key.cpp $(HACK_H) ../win/Qt/qt_key.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_key.cpp -qt_line.o: ../win/Qt/qt_line.cpp $(HACK_H) ../include/qt_line.h +qt_line.o: ../win/Qt/qt_line.cpp $(HACK_H) ../win/Qt/qt_line.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_line.cpp qt_main.o: ../win/Qt/qt_main.cpp $(HACK_H) ../include/patchlevel.h \ - ../include/qt_main.h qt_main.moc ../include/qt_bind.h \ - ../include/qt_glyph.h ../include/qt_inv.h ../include/qt_key.h \ - ../include/qt_map.h ../include/qt_msg.h ../include/qt_set.h \ - ../include/qt_stat.h ../include/qt_str.h qt_kde0.moc + ../win/Qt/qt_main.h qt_main.moc ../win/Qt/qt_bind.h \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_inv.h ../win/Qt/qt_key.h \ + ../win/Qt/qt_map.h ../win/Qt/qt_msg.h ../win/Qt/qt_set.h \ + ../win/Qt/qt_stat.h ../win/Qt/qt_str.h qt_kde0.moc $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_main.cpp -qt_map.o: ../win/Qt/qt_map.cpp $(HACK_H) ../include/qt_map.h qt_map.moc \ - ../include/qt_click.h ../include/qt_glyph.h \ - ../include/qt_xpms.h ../include/qt_set.h ../include/qt_str.h +qt_map.o: ../win/Qt/qt_map.cpp $(HACK_H) ../win/Qt/qt_map.h qt_map.moc \ + ../win/Qt/qt_click.h ../win/Qt/qt_glyph.h ../include/qt_xpms.h \ + ../win/Qt/qt_set.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_map.cpp -qt_menu.o: ../win/Qt/qt_menu.cpp $(HACK_H) ../include/qt_menu.h qt_menu.moc \ - ../include/qt_glyph.h ../include/qt_set.h \ - ../include/qt_streq.h ../include/qt_str.h +qt_menu.o: ../win/Qt/qt_menu.cpp $(HACK_H) ../win/Qt/qt_menu.h qt_menu.moc \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h ../win/Qt/qt_streq.h \ + ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_menu.cpp -qt_msg.o: ../win/Qt/qt_msg.cpp $(HACK_H) ../include/qt_msg.h qt_msg.moc \ - ../include/qt_map.h ../include/qt_set.h ../include/qt_str.h +qt_msg.o: ../win/Qt/qt_msg.cpp $(HACK_H) ../win/Qt/qt_msg.h qt_msg.moc \ + ../win/Qt/qt_map.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_msg.cpp -qt_plsel.o: ../win/Qt/qt_plsel.cpp $(HACK_H) ../include/qt_plsel.h \ - qt_plsel.moc ../include/qt_bind.h ../include/qt_glyph.h \ - ../include/qt_set.h ../include/qt_str.h +qt_plsel.o: ../win/Qt/qt_plsel.cpp $(HACK_H) ../win/Qt/qt_plsel.h qt_plsel.moc \ + ../win/Qt/qt_bind.h ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h \ + ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_plsel.cpp -qt_rip.o: ../win/Qt/qt_rip.cpp $(HACK_H) ../include/qt_rip.h \ - ../include/qt_bind.h ../include/qt_str.h +qt_rip.o: ../win/Qt/qt_rip.cpp $(HACK_H) ../win/Qt/qt_rip.h \ + ../win/Qt/qt_bind.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_rip.cpp -qt_set.o: ../win/Qt/qt_set.cpp $(HACK_H) ../include/qt_set.h qt_set.moc \ - ../include/qt_glyph.h ../include/qt_str.h +qt_set.o: ../win/Qt/qt_set.cpp $(HACK_H) ../win/Qt/qt_set.h qt_set.moc \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_set.cpp -qt_stat.o: ../win/Qt/qt_stat.cpp $(HACK_H) ../include/qt_stat.h qt_stat.moc \ - ../include/qt_set.h ../include/qt_str.h ../include/qt_xpms.h +qt_stat.o: ../win/Qt/qt_stat.cpp $(HACK_H) ../win/Qt/qt_stat.h qt_stat.moc \ + ../win/Qt/qt_set.h ../win/Qt/qt_str.h ../include/qt_xpms.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_stat.cpp -qt_str.o: ../win/Qt/qt_str.cpp ../include/qt_str.h +qt_str.o: ../win/Qt/qt_str.cpp ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_str.cpp -qt_streq.o: ../win/Qt/qt_streq.cpp $(HACK_H) ../include/qt_streq.h \ - ../include/qt_str.h +qt_streq.o: ../win/Qt/qt_streq.cpp $(HACK_H) ../win/Qt/qt_streq.h \ + ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_streq.cpp -qt_svsel.o: ../win/Qt/qt_svsel.cpp $(HACK_H) ../include/qt_svsel.h \ - ../include/qt_bind.h ../include/qt_str.h +qt_svsel.o: ../win/Qt/qt_svsel.cpp $(HACK_H) ../win/Qt/qt_svsel.h \ + ../win/Qt/qt_bind.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_svsel.cpp -qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../include/qt_win.h \ - ../include/qt_clust.h ../include/qt_kde0.h \ - ../include/qt_bind.h ../include/qt_click.h \ - ../include/qt_glyph.h ../include/qt_inv.h ../include/qt_key.h \ - ../include/qt_icon.h ../include/qt_map.h ../include/qt_menu.h \ - ../include/qt_msg.h ../include/qt_set.h +qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../win/Qt/qt_win.h \ + ../win/Qt/qt_bind.h ../win/Qt/qt_click.h ../win/Qt/qt_glyph.h \ + ../win/Qt/qt_inv.h ../win/Qt/qt_key.h ../win/Qt/qt_icon.h \ + ../win/Qt/qt_map.h ../win/Qt/qt_menu.h ../win/Qt/qt_msg.h \ + ../win/Qt/qt_set.h ../win/Qt/qt_clust.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_win.cpp qt_xcmd.o: ../win/Qt/qt_xcmd.cpp $(HACK_H) ../include/func_tab.h \ - ../include/qt_xcmd.h qt_xcmd.moc ../include/qt_bind.h \ - ../include/qt_set.h ../include/qt_str.h + ../win/Qt/qt_xcmd.h qt_xcmd.moc ../win/Qt/qt_bind.h \ + ../win/Qt/qt_set.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_xcmd.cpp -qt_yndlg.o: ../win/Qt/qt_yndlg.cpp $(HACK_H) ../include/qt_yndlg.h \ - qt_yndlg.moc ../include/qt_str.h +qt_yndlg.o: ../win/Qt/qt_yndlg.cpp $(HACK_H) ../win/Qt/qt_yndlg.h qt_yndlg.moc \ + ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_yndlg.cpp wc_chainin.o: ../win/chain/wc_chainin.c $(HACK_H) $(CC) $(CFLAGS) -c -o $@ ../win/chain/wc_chainin.c @@ -983,12 +979,10 @@ vis_tab.o: vis_tab.c $(CONFIG_H) ../include/vis_tab.h allmain.o: allmain.c $(HACK_H) alloc.o: alloc.c $(CONFIG_H) apply.o: apply.c $(HACK_H) -artifact.o: artifact.c $(HACK_H) ../include/artifact.h ../include/artilist.h \ - ../include/integer.h +artifact.o: artifact.c $(HACK_H) ../include/artifact.h ../include/artilist.h attrib.o: attrib.c $(HACK_H) ball.o: ball.c $(HACK_H) -bones.o: bones.c $(HACK_H) ../include/lev.h \ - ../include/integer.h +bones.o: bones.c $(HACK_H) ../include/lev.h botl.o: botl.c $(HACK_H) cmd.o: cmd.c $(HACK_H) ../include/lev.h ../include/func_tab.h dbridge.o: dbridge.c $(HACK_H) @@ -1006,25 +1000,20 @@ dokick.o: dokick.c $(HACK_H) dothrow.o: dothrow.c $(HACK_H) drawing.o: drawing.c $(HACK_H) ../include/tcap.h dungeon.o: dungeon.c $(HACK_H) ../include/dgn_file.h ../include/dlb.h \ - ../include/lev.h ../include/integer.h + ../include/lev.h eat.o: eat.c $(HACK_H) -end.o: end.c $(HACK_H) ../include/lev.h ../include/dlb.h \ - ../include/integer.h -engrave.o: engrave.c $(HACK_H) ../include/lev.h \ - ../include/integer.h +end.o: end.c $(HACK_H) ../include/lev.h ../include/dlb.h +engrave.o: engrave.c $(HACK_H) ../include/lev.h exper.o: exper.c $(HACK_H) explode.o: explode.c $(HACK_H) extralev.o: extralev.c $(HACK_H) -files.o: files.c $(HACK_H) ../include/dlb.h \ - ../include/integer.h ../include/lev.h \ - #zlib.h +files.o: files.c $(HACK_H) ../include/dlb.h ../include/lev.h #zlib.h fountain.o: fountain.c $(HACK_H) hack.o: hack.c $(HACK_H) hacklib.o: hacklib.c $(HACK_H) invent.o: invent.c $(HACK_H) isaac64.o: isaac64.c $(CONFIG_H) ../include/isaac64.h -light.o: light.c $(HACK_H) ../include/lev.h \ - ../include/integer.h +light.o: light.c $(HACK_H) ../include/lev.h lock.o: lock.c $(HACK_H) mail.o: mail.c $(HACK_H) ../include/mail.h makemon.o: makemon.c $(HACK_H) @@ -1043,10 +1032,9 @@ mhitu.o: mhitu.c $(HACK_H) ../include/artifact.h minion.o: minion.c $(HACK_H) mklev.o: mklev.c $(HACK_H) mkmap.o: mkmap.c $(HACK_H) ../include/sp_lev.h -mkmaze.o: mkmaze.c $(HACK_H) ../include/sp_lev.h ../include/lev.h \ - ../include/integer.h +mkmaze.o: mkmaze.c $(HACK_H) ../include/sp_lev.h ../include/lev.h mkobj.o: mkobj.c $(HACK_H) -mkroom.o: mkroom.c $(HACK_H) ../include/integer.h +mkroom.o: mkroom.c $(HACK_H) mon.o: mon.c $(HACK_H) ../include/mfndpos.h mondata.o: mondata.c $(HACK_H) monmove.o: monmove.c $(HACK_H) ../include/mfndpos.h ../include/artifact.h @@ -1059,14 +1047,12 @@ muse.o: muse.c $(HACK_H) music.o: music.c $(HACK_H) nhlua.o: nhlua.c $(HACK_H) ../include/dlb.h nhlsel.o: nhlsel.c $(HACK_H) ../include/sp_lev.h -o_init.o: o_init.c $(HACK_H) ../include/lev.h \ - ../include/integer.h +o_init.o: o_init.c $(HACK_H) ../include/lev.h objects.o: objects.c $(CONFIG_H) ../include/obj.h ../include/objclass.h \ ../include/prop.h ../include/skills.h ../include/color.h objnam.o: objnam.c $(HACK_H) options.o: options.c $(CONFIG_H) ../include/objclass.h ../include/flag.h \ - $(HACK_H) ../include/tcap.h \ - ../include/integer.h + $(HACK_H) ../include/tcap.h pager.o: pager.c $(HACK_H) ../include/dlb.h pickup.o: pickup.c $(HACK_H) pline.o: pline.c $(HACK_H) @@ -1078,17 +1064,13 @@ quest.o: quest.c $(HACK_H) questpgr.o: questpgr.c $(HACK_H) ../include/dlb.h read.o: read.c $(HACK_H) rect.o: rect.c $(HACK_H) -region.o: region.c $(HACK_H) ../include/lev.h \ - ../include/integer.h -restore.o: restore.c $(HACK_H) ../include/lev.h ../include/tcap.h \ - ../include/integer.h +region.o: region.c $(HACK_H) ../include/lev.h +restore.o: restore.c $(HACK_H) ../include/lev.h ../include/tcap.h rip.o: rip.c $(HACK_H) rnd.o: rnd.c $(HACK_H) ../include/isaac64.h role.o: role.c $(HACK_H) -rumors.o: rumors.c $(HACK_H) ../include/lev.h ../include/dlb.h \ - ../include/integer.h -save.o: save.c $(HACK_H) ../include/lev.h \ - ../include/integer.h +rumors.o: rumors.c $(HACK_H) ../include/lev.h ../include/dlb.h +save.o: save.c $(HACK_H) ../include/lev.h sfstruct.o: sfstruct.c $(HACK_H) shk.o: shk.c $(HACK_H) shknam.o: shknam.c $(HACK_H) @@ -1100,8 +1082,7 @@ steal.o: steal.c $(HACK_H) steed.o: steed.c $(HACK_H) sys.o: sys.c $(HACK_H) teleport.o: teleport.c $(HACK_H) -timeout.o: timeout.c $(HACK_H) ../include/lev.h \ - ../include/integer.h +timeout.o: timeout.c $(HACK_H) ../include/lev.h topten.o: topten.c $(HACK_H) ../include/dlb.h ../include/patchlevel.h track.o: track.c $(HACK_H) trap.o: trap.c $(HACK_H) @@ -1109,16 +1090,14 @@ u_init.o: u_init.c $(HACK_H) uhitm.o: uhitm.c $(HACK_H) vault.o: vault.c $(HACK_H) version.o: version.c $(HACK_H) ../include/dlb.h ../include/date.h \ - ../include/lev.h ../include/integer.h \ - ../include/patchlevel.h + ../include/lev.h ../include/patchlevel.h vision.o: vision.c $(HACK_H) ../include/vis_tab.h weapon.o: weapon.c $(HACK_H) were.o: were.c $(HACK_H) wield.o: wield.c $(HACK_H) windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h wizard.o: wizard.c $(HACK_H) -worm.o: worm.c $(HACK_H) ../include/lev.h \ - ../include/integer.h +worm.o: worm.c $(HACK_H) ../include/lev.h worn.o: worn.c $(HACK_H) write.o: write.c $(HACK_H) zap.o: zap.c $(HACK_H) diff --git a/sys/unix/depend.awk b/sys/unix/depend.awk index d10f48a57..c367f97e0 100644 --- a/sys/unix/depend.awk +++ b/sys/unix/depend.awk @@ -41,13 +41,21 @@ FNR == 1 { output_dep() #finish previous file #[3.4.0: gnomehack headers currently aren't in include] #[3.6.2: Qt4 headers aren't in include either] #[3.6.2: curses headers likewise] + #[3.7.0: Qt headers have moved] if (incl ~ /\.h$/) { if (incl ~ "curses\.h") incl = "" # skip "curses.h"; it should be + + else if (incl ~ /^..\/lib\/lua-.*\/src\/l/) + incl = "" # skip lua headers else if (incl ~ /^curs/) # curses special case incl = "../win/curses/" incl - else if (incl ~ /^qt4/) # Qt v4 special case - incl = "../win/Qt4/" incl + else if (incl ~ /^qtext.h/) # qtext.h special case + incl = "../include/" incl + else if (incl ~ /^qt_xpms.h/) # qt_xpms.h special case + incl = "../include/" incl + else if (incl ~ /^qt/) # Qt v4 special case + incl = "../win/Qt/" incl else if (incl ~ /^gn/) # gnomehack special case incl = "../win/gnome/" incl else From 625bfd1efd1f7632029f92da0b52a24653ba1116 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 8 Dec 2019 10:33:38 -0800 Subject: [PATCH 461/529] questpgr memory bug Pointed out by heaputil: attempt to free null pointer. ANSI C allows that, so no crash, but it still indicates a mistake. --- src/questpgr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/questpgr.c b/src/questpgr.c index 594e4952b..c139a84ac 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 questpgr.c $NHDT-Date: 1574634383 2019/11/24 22:26:23 $ $NHDT-Branch: paxed-quest-lua $:$NHDT-Revision: 1.63 $ */ +/* NetHack 3.6 questpgr.c $NHDT-Date: 1575830005 2019/12/08 18:33:25 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.67 $ */ /* Copyright 1991, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ @@ -489,7 +489,9 @@ const char *msgid; nelems = (int) lua_tointeger(L, -1); lua_pop(L, 1); if (nelems < 2) { - impossible("com_pager: questtext[%s][%s] in %s in not an array of strings", section, msgid, QTEXT_FILE); + impossible( + "com_pager: questtext[%s][%s] in %s in not an array of strings", + section, msgid, QTEXT_FILE); lua_close(L); return FALSE; } @@ -511,12 +513,13 @@ const char *msgid; if (synopsis) { char in_line[BUFSZ], out_line[BUFSZ]; + Strcpy(in_line, synopsis); convert_line(in_line, out_line); putmsghistory(out_line, FALSE); + free(synopsis); } - free(synopsis); free(text); lua_close(L); return TRUE; From d43f8f6f9e59033e9066aed1386cbd0e5fa97c09 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 8 Dec 2019 10:36:52 -0800 Subject: [PATCH 462/529] altar color revisited The issue of mimics masquerading as altars just came up two weeks ago but never entered my mind when I worked on this yesterday. --- include/extern.h | 3 ++- src/mapglyph.c | 16 +++++++++------- src/pager.c | 9 +++------ src/pray.c | 20 +++++++++++++++++++- 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/include/extern.h b/include/extern.h index eaa7d5f3d..02823455c 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1575768406 2019/12/08 01:26:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.766 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1575830178 2019/12/08 18:36:18 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.767 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2045,6 +2045,7 @@ E boolean FDECL(can_pray, (BOOLEAN_P)); E int NDECL(dopray); E const char *NDECL(u_gname); E int NDECL(doturn); +E int FDECL(altarmask_at, (int, int)); E const char *NDECL(a_gname); E const char *FDECL(a_gname_at, (XCHAR_P x, XCHAR_P y)); E const char *FDECL(align_gname, (ALIGNTYP_P)); diff --git a/src/mapglyph.c b/src/mapglyph.c index 7a28091d9..74492cc74 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mapglyph.c $NHDT-Date: 1575755075 2019/12/07 21:44:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.58 $ */ +/* NetHack 3.6 mapglyph.c $NHDT-Date: 1575830186 2019/12/08 18:36:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.60 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -163,22 +163,24 @@ unsigned mgflags; == g.showsyms[S_water + SYM_OFF_P])) { special |= MG_BW_LAVA; } else if (offset == S_altar && iflags.use_color) { + int amsk = altarmask_at(x, y); /* might be a mimic */ + if ((g.glyphmap_perlevel_flags & GMAP_ALTARCOLOR) - && (levl[x][y].altarmask & AM_SHRINE)) { + && (amsk & AM_SHRINE) != 0) { /* high altar */ color = CLR_BRIGHT_MAGENTA; } else { - switch (levl[x][y].altarmask & AM_MASK) { + switch (amsk & AM_MASK) { #if 0 /* - * On OSX with XTERM=xterm-color256 these render as + * On OSX with TERM=xterm-color256 these render as * white -> tty: gray, curses: ok * gray -> both tty and curses: black * black -> both tty and curses: blue * red -> both tty and curses: ok. - * Since the colors have specific associations (mainly with - * the unicorns matched with each alignment), we shouldn't use + * Since the colors have specific associations (with the + * unicorns matched with each alignment), we shouldn't use * scrambled colors and we don't have sufficient information - * to handle platform-specific variations. + * to handle platform-specific color variations. */ case AM_LAWFUL: /* 4 */ color = CLR_WHITE; diff --git a/src/pager.c b/src/pager.c index bf185f64e..f29cedadb 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pager.c $NHDT-Date: 1574722864 2019/11/25 23:01:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.162 $ */ +/* NetHack 3.6 pager.c $NHDT-Date: 1575830188 2019/12/08 18:36:28 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.175 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -483,11 +483,8 @@ char *buf, *monbuf; switch (glyph_to_cmap(glyph)) { case S_altar: - amsk = ((mtmp = m_at(x, y)) != 0 && has_mcorpsenm(mtmp) - && M_AP_TYPE(mtmp) == M_AP_FURNITURE - && mtmp->mappearance == S_altar) ? MCORPSENM(mtmp) - : levl[x][y].altarmask; - algn = Amask2align(amsk & ~AM_SHRINE); + amsk = altarmask_at(x, y); + algn = Amask2align(amsk & AM_MASK); Sprintf(buf, "%s %saltar", /* like endgame high priests, endgame high altars are only recognizable when immediately adjacent */ diff --git a/src/pray.c b/src/pray.c index 0da0c2a23..0562cd7ec 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pray.c $NHDT-Date: 1575755077 2019/12/07 21:44:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.133 $ */ +/* NetHack 3.6 pray.c $NHDT-Date: 1575830189 2019/12/08 18:36:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.134 $ */ /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2077,6 +2077,24 @@ doturn() return 1; } +int +altarmask_at(x, y) +int x, y; +{ + int res = 0; + + if (isok(x, y)) { + struct monst *mon = m_at(x, y); + + if (mon && M_AP_TYPE(mon) == M_AP_FURNITURE + && mon->mappearance == S_altar) + res = has_mcorpsenm(mon) ? MCORPSENM(mon) : 0; + else if (IS_ALTAR(levl[x][y].typ)) + res = levl[x][y].altarmask; + } + return res; +} + const char * a_gname() { From 4a3d5f95d9e724a77cb94ff885b333c8c1c70b0d Mon Sep 17 00:00:00 2001 From: copperwater Date: Tue, 12 Jun 2018 09:03:11 -0400 Subject: [PATCH 463/529] Allow teleportation onto the Vibrating Square It's a minor annoyance when you forget you can't do this in vanilla and then get relocated somewhere random on the level. Since it's not a harmful "trap", just allow the adventurer to teleport directly onto it. --- doc/fixes37.0 | 1 + src/teleport.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index af0bdfaaa..ca87a330a 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -15,6 +15,7 @@ message "your knapsack can't accomodate any more items" when picking stuff up pending; vary the message rather than add more convoluted pickup code function calls made from mapglyph based on dungeon level are now called once per level +allow teleporting onto the vibrating square Fixes to Pre-3.7.0 Problems that Were Exposed Via git Repository diff --git a/src/teleport.c b/src/teleport.c index 50e179cc2..e6c1e120e 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -260,8 +260,13 @@ teleok(x, y, trapok) register int x, y; boolean trapok; { - if (!trapok && t_at(x, y)) - return FALSE; + if (!trapok) { + /* allow teleportation onto vibrating square, it's not a real trap */ + struct trap *trap = t_at(x, y); + if (trap && trap->ttyp != VIBRATING_SQUARE) { + return FALSE; + } + } if (!goodpos(x, y, &g.youmonst, 0)) return FALSE; if (!tele_jump_ok(u.ux, u.uy, x, y)) From 2fe31eec46d8629b25a11f51fc88256c8ef8cf44 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 9 Dec 2019 11:15:49 -0800 Subject: [PATCH 464/529] more Qt rename In order for 'make depend' to be able to handle both Qt4/5 and Qt3, they need to operate on different object file names. renames qt*.o to qt3*.o for Qt3 renames qt*.cpp to qt3*.cpp for Qt3 (not essential but seems worthwhile) moves Qt3's headers from include/qt*.h to win/Qt3/qt3*.h copies include/qt_xpms.h (before rename) or win/Qt3/qt3_xpms.h (after) to win/Qt/qt_xpms.h so that Qt4/5 no longer shares one header file modifies win/Qt3/*.cpp and win/Qt3/qt3_win.h to reflect new header names modifies Makefile.src to have Qt3 'moc' commands use new names updates Makefile.src via re-running 'make depend' 'make depend' was only looking at include/*.h to find nested inclusion. Now it will also look at win/*/*.h. That found a bunch of missing dependencies for the old gnome sources and a few for Qt3. Building without Qt still works. Building with it (any version) has not been tested. --- sys/unix/Makefile.src | 188 ++- sys/unix/depend.awk | 29 +- {include => win/Qt}/qt_xpms.h | 0 win/Qt3/{qt_clust.cpp => qt3_clust.cpp} | 4 +- include/qt_clust.h => win/Qt3/qt3_clust.h | 0 include/qt_kde0.h => win/Qt3/qt3_kde0.h | 0 win/Qt3/{qt_win.cpp => qt3_win.cpp} | 14 +- include/qt_win.h => win/Qt3/qt3_win.h | 6 +- win/Qt3/qt3_xpms.h | 1422 +++++++++++++++++ win/Qt3/{qttableview.cpp => qt3tableview.cpp} | 4 +- .../qttableview.h => win/Qt3/qt3tableview.h | 0 11 files changed, 1576 insertions(+), 91 deletions(-) rename {include => win/Qt}/qt_xpms.h (100%) rename win/Qt3/{qt_clust.cpp => qt3_clust.cpp} (96%) rename include/qt_clust.h => win/Qt3/qt3_clust.h (100%) rename include/qt_kde0.h => win/Qt3/qt3_kde0.h (100%) rename win/Qt3/{qt_win.cpp => qt3_win.cpp} (99%) rename include/qt_win.h => win/Qt3/qt3_win.h (99%) create mode 100644 win/Qt3/qt3_xpms.h rename win/Qt3/{qttableview.cpp => qt3tableview.cpp} (99%) rename include/qttableview.h => win/Qt3/qt3tableview.h (100%) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 3efc6fa7b..8e22fc003 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -1,5 +1,5 @@ # NetHack Makefile. -# NetHack 3.6 Makefile.src $NHDT-Date: 1575767152 2019/12/08 01:05:52 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.83 $ +# NetHack 3.6 Makefile.src $NHDT-Date: 1575917700 2019/12/09 18:55:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.86 $ # Copyright (c) 2018 by Pasi Kallinen # NetHack may be freely redistributed. See license for details. @@ -224,10 +224,11 @@ WINX11SRC = ../win/X11/Window.c ../win/X11/dialogs.c ../win/X11/winX.c \ WINX11OBJ = Window.o dialogs.o winX.o winmap.o winmenu.o winmesg.o \ winmisc.o winstat.o wintext.o winval.o tile.o # -# Files for a Qt port +# Files for a Qt 3 port (renamed since nethack 3.6.x) # -WINQTSRC = ../win/Qt/qt_win.cpp ../win/Qt/qt_clust.cpp ../win/Qt/qttableview.cpp -WINQTOBJ = qt_win.o qt_clust.o qttableview.o tile.o +WINQT3SRC = ../win/Qt3/qt3_win.cpp ../win/Qt3/qt3_clust.cpp \ + ../win/Qt3/qt3tableview.cpp +WINQT3OBJ = qt3_win.o qt3_clust.o qt3tableview.o tile.o # # Files for a Qt 4 or 5 port # @@ -473,7 +474,7 @@ GENCSRC = vis_tab.c #tile.c # all windowing-system-dependent .c (for dependencies and such) WINCSRC = $(WINTTYSRC) $(WINCURSESSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) # all windowing-system-dependent .cpp (for dependencies and such) -WINCXXSRC = $(WINQTSRC) $(WINBESRC) +WINCXXSRC = $(WINQTSRC) $(WINQT3SRC) $(WINBESRC) # Files for window system chaining. Requires SYSCF; include via HINTSRC/HINTOBJ CHAINSRC = ../win/chain/wc_chainin.c ../win/chain/wc_chainout.c \ @@ -601,14 +602,12 @@ objects.o: @rm -f $(MAKEDEFS) # Qt 3 windowport meta-object-compiler output -qt3kde0.moc: ../include/qt_kde0.h - $(QTDIR)/bin/moc -o qt3kde0.moc ../include/qt_kde0.h - -qt3win.moc: ../include/qt_win.h - $(QTDIR)/bin/moc -o qt3win.moc ../include/qt_win.h - -qttableview.moc: ../include/qttableview.h - $(QTDIR)/bin/moc -o qttableview.moc ../include/qttableview.h +qt3_kde0.moc: ../win/Qt3/qt3_kde0.h + $(QTDIR)/bin/moc -o qt3kde0.moc ../win/Qt3/qt3_kde0.h +qt3_win.moc: ../win/Qt3/qt3_win.h + $(QTDIR)/bin/moc -o qt3win.moc ../win/Qt3/qt3_win.h +qt3tableview.moc: ../win/Qt3/qt3tableview.h + $(QTDIR)/bin/moc -o qt3tableview.moc ../win/Qt/qt3tableview.h # Qt 4 windowport meta-object-compiler output qt_kde0.moc : ../win/Qt/qt_kde0.h @@ -709,7 +708,7 @@ spotless: clean depend: ../sys/unix/depend.awk \ $(SYSCSRC) $(WINCSRC) $(SYSCXXSRC) $(WINCXXSRC) \ $(CHAINSRC) $(GENCSRC) $(HACKCSRC) - $(AWK) -f ../sys/unix/depend.awk ../include/*.h \ + $(AWK) -f ../sys/unix/depend.awk ../include/*.h ../win/*/*.h \ $(SYSCSRC) $(WINCSRC) $(SYSCXXSRC) $(WINCXXSRC) \ $(CHAINSRC) $(GENCSRC) $(HACKCSRC) >makedep @echo '/^# DO NOT DELETE THIS LINE OR CHANGE ANYTHING BEYOND IT/+2,$$d' >eddep @@ -841,44 +840,82 @@ tile.o: tile.c $(HACK_H) gnaskstr.o: ../win/gnome/gnaskstr.c ../win/gnome/gnaskstr.h \ ../win/gnome/gnmain.h $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnaskstr.c -gnbind.o: ../win/gnome/gnbind.c ../win/gnome/gnbind.h ../win/gnome/gnmain.h \ - ../win/gnome/gnmenu.h ../win/gnome/gnaskstr.h \ - ../win/gnome/gnyesno.h +gnbind.o: ../win/gnome/gnbind.c ../win/gnome/gnbind.h ../win/gnome/gnomeprv.h \ + $(HACK_H) ../include/dlb.h ../include/patchlevel.h \ + ../include/winGnome.h ../win/gnome/gnmain.h \ + ../win/gnome/gnmap.h ../win/gnome/gnmenu.h \ + ../win/gnome/gnplayer.h ../win/gnome/gnsignal.h \ + ../win/gnome/gnglyph.h ../win/gnome/gnstatus.h \ + ../win/gnome/gntext.h ../win/gnome/gnmesg.h \ + ../win/gnome/gnyesno.h ../win/gnome/gnworn.h \ + ../win/gnome/gnaskstr.h $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnbind.c -gnglyph.o: ../win/gnome/gnglyph.c ../win/gnome/gnglyph.h ../include/tile2x11.h +gnglyph.o: ../win/gnome/gnglyph.c ../win/gnome/gnglyph.h $(CONFIG_H) \ + ../include/tile2x11.h $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnglyph.c gnmain.o: ../win/gnome/gnmain.c ../win/gnome/gnmain.h ../win/gnome/gnsignal.h \ - ../win/gnome/gnbind.h ../win/gnome/gnopts.h $(HACK_H) \ - ../include/date.h + ../win/gnome/gnomeprv.h $(HACK_H) ../include/dlb.h \ + ../include/patchlevel.h ../include/winGnome.h \ + ../win/gnome/gnglyph.h ../win/gnome/gnbind.h \ + ../win/gnome/gnmap.h ../win/gnome/gnmenu.h \ + ../win/gnome/gnplayer.h ../win/gnome/gnstatus.h \ + ../win/gnome/gntext.h ../win/gnome/gnmesg.h \ + ../win/gnome/gnyesno.h ../win/gnome/gnworn.h \ + ../win/gnome/gnopts.h ../include/date.h $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnmain.c -gnmap.o: ../win/gnome/gnmap.c ../win/gnome/gnmap.h ../win/gnome/gnglyph.h \ - ../win/gnome/gnsignal.h $(HACK_H) +gnmap.o: ../win/gnome/gnmap.c ../win/gnome/gnmap.h $(CONFIG_H) \ + ../win/gnome/gnglyph.h ../win/gnome/gnsignal.h \ + ../win/gnome/gnomeprv.h $(HACK_H) ../include/dlb.h \ + ../include/patchlevel.h ../include/winGnome.h $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnmap.c -gnmenu.o: ../win/gnome/gnmenu.c ../win/gnome/gnmenu.h ../win/gnome/gnmain.h \ - ../win/gnome/gnbind.h ../include/func_tab.h +gnmenu.o: ../win/gnome/gnmenu.c ../win/gnome/gnmenu.h $(CONFIG_H) \ + ../win/gnome/gnomeprv.h $(HACK_H) ../include/dlb.h \ + ../include/patchlevel.h ../include/winGnome.h \ + ../win/gnome/gnmain.h ../win/gnome/gnbind.h \ + ../win/gnome/gnmap.h ../win/gnome/gnplayer.h \ + ../win/gnome/gnsignal.h ../win/gnome/gnglyph.h \ + ../win/gnome/gnstatus.h ../win/gnome/gntext.h \ + ../win/gnome/gnmesg.h ../win/gnome/gnyesno.h \ + ../win/gnome/gnworn.h ../include/func_tab.h $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnmenu.c -gnmesg.o: ../win/gnome/gnmesg.c ../win/gnome/gnmesg.h ../win/gnome/gnsignal.h +gnmesg.o: ../win/gnome/gnmesg.c ../win/gnome/gnmesg.h $(CONFIG_H) \ + ../win/gnome/gnsignal.h ../win/gnome/gnomeprv.h $(HACK_H) \ + ../include/dlb.h ../include/patchlevel.h ../include/winGnome.h \ + ../win/gnome/gnglyph.h $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnmesg.c gnopts.o: ../win/gnome/gnopts.c ../win/gnome/gnopts.h ../win/gnome/gnglyph.h \ - ../win/gnome/gnmain.h ../win/gnome/gnmap.h $(HACK_H) + $(CONFIG_H) ../win/gnome/gnmain.h ../win/gnome/gnmap.h $(HACK_H) $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnopts.c gnplayer.o: ../win/gnome/gnplayer.c ../win/gnome/gnplayer.h \ ../win/gnome/gnmain.h $(HACK_H) $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnplayer.c gnsignal.o: ../win/gnome/gnsignal.c ../win/gnome/gnsignal.h \ - ../win/gnome/gnmain.h + ../win/gnome/gnomeprv.h $(HACK_H) ../include/dlb.h \ + ../include/patchlevel.h ../include/winGnome.h \ + ../win/gnome/gnglyph.h ../win/gnome/gnmain.h $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnsignal.c -gnstatus.o: ../win/gnome/gnstatus.c ../win/gnome/gnstatus.h \ - ../win/gnome/gnsignal.h ../win/gnome/gn_xpms.h \ - ../win/gnome/gnomeprv.h +gnstatus.o: ../win/gnome/gnstatus.c ../win/gnome/gnstatus.h $(CONFIG_H) \ + ../win/gnome/gnsignal.h ../win/gnome/gnomeprv.h $(HACK_H) \ + ../include/dlb.h ../include/patchlevel.h ../include/winGnome.h \ + ../win/gnome/gnglyph.h ../win/gnome/gn_xpms.h $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnstatus.c -gntext.o: ../win/gnome/gntext.c ../win/gnome/gntext.h ../win/gnome/gnmain.h \ - ../win/gnome/gn_rip.h +gntext.o: ../win/gnome/gntext.c ../win/gnome/gntext.h $(CONFIG_H) \ + ../win/gnome/gnmain.h ../win/gnome/gn_rip.h $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gntext.c -gnyesno.o: ../win/gnome/gnyesno.c ../win/gnome/gnbind.h ../win/gnome/gnyesno.h +gnyesno.o: ../win/gnome/gnyesno.c ../win/gnome/gnbind.h \ + ../win/gnome/gnomeprv.h $(HACK_H) ../include/dlb.h \ + ../include/patchlevel.h ../include/winGnome.h \ + ../win/gnome/gnmain.h ../win/gnome/gnmap.h \ + ../win/gnome/gnmenu.h ../win/gnome/gnplayer.h \ + ../win/gnome/gnsignal.h ../win/gnome/gnglyph.h \ + ../win/gnome/gnstatus.h ../win/gnome/gntext.h \ + ../win/gnome/gnmesg.h ../win/gnome/gnyesno.h \ + ../win/gnome/gnworn.h $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnyesno.c -gnworn.o: ../win/gnome/gnworn.c ../win/gnome/gnworn.h ../win/gnome/gnglyph.h \ - ../win/gnome/gnsignal.h ../win/gnome/gnomeprv.h +gnworn.o: ../win/gnome/gnworn.c ../win/gnome/gnworn.h $(CONFIG_H) \ + ../win/gnome/gnglyph.h ../win/gnome/gnsignal.h \ + ../win/gnome/gnomeprv.h $(HACK_H) ../include/dlb.h \ + ../include/patchlevel.h ../include/winGnome.h $(CC) $(CFLAGS) $(GNOMEINC) -c -o $@ ../win/gnome/gnworn.c wingem.o: ../win/gem/wingem.c $(HACK_H) ../include/func_tab.h ../include/dlb.h \ ../include/patchlevel.h ../include/wingem.h @@ -894,11 +931,14 @@ tile.o: tile.c $(HACK_H) cppregex.o: ../sys/share/cppregex.cpp $(CXX) $(CXXFLAGS) -c -o $@ ../sys/share/cppregex.cpp qt_bind.o: ../win/Qt/qt_bind.cpp $(HACK_H) ../win/Qt/qt_bind.h \ - ../win/Qt/qt_click.h ../win/Qt/qt_delay.h ../win/Qt/qt_xcmd.h \ - ../win/Qt/qt_key.h ../win/Qt/qt_map.h ../win/Qt/qt_menu.h \ - ../win/Qt/qt_msg.h ../win/Qt/qt_plsel.h ../win/Qt/qt_svsel.h \ - ../win/Qt/qt_set.h ../win/Qt/qt_stat.h ../win/Qt/qt_streq.h \ - ../win/Qt/qt_yndlg.h ../win/Qt/qt_str.h ../include/dlb.h + ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_click.h \ + ../win/Qt/qt_delay.h ../win/Qt/qt_xcmd.h ../win/Qt/qt_key.h \ + ../win/Qt/qt_map.h ../win/Qt/qt_win.h ../win/Qt/qt_clust.h \ + ../win/Qt/qt_menu.h ../win/Qt/qt_rip.h ../win/Qt/qt_msg.h \ + ../win/Qt/qt_plsel.h ../win/Qt/qt_svsel.h ../win/Qt/qt_set.h \ + ../win/Qt/qt_stat.h ../win/Qt/qt_icon.h ../win/Qt/qt_streq.h \ + ../win/Qt/qt_line.h ../win/Qt/qt_yndlg.h ../win/Qt/qt_str.h \ + ../include/dlb.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_bind.cpp qt_click.o: ../win/Qt/qt_click.cpp $(HACK_H) ../win/Qt/qt_click.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_click.cpp @@ -919,56 +959,76 @@ qt_key.o: ../win/Qt/qt_key.cpp $(HACK_H) ../win/Qt/qt_key.h qt_line.o: ../win/Qt/qt_line.cpp $(HACK_H) ../win/Qt/qt_line.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_line.cpp qt_main.o: ../win/Qt/qt_main.cpp $(HACK_H) ../include/patchlevel.h \ - ../win/Qt/qt_main.h qt_main.moc ../win/Qt/qt_bind.h \ - ../win/Qt/qt_glyph.h ../win/Qt/qt_inv.h ../win/Qt/qt_key.h \ - ../win/Qt/qt_map.h ../win/Qt/qt_msg.h ../win/Qt/qt_set.h \ - ../win/Qt/qt_stat.h ../win/Qt/qt_str.h qt_kde0.moc + ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h qt_main.moc \ + ../win/Qt/qt_bind.h ../win/Qt/qt_glyph.h ../win/Qt/qt_inv.h \ + ../win/Qt/qt_key.h ../win/Qt/qt_map.h ../win/Qt/qt_win.h \ + ../win/Qt/qt_clust.h ../win/Qt/qt_msg.h ../win/Qt/qt_set.h \ + ../win/Qt/qt_stat.h ../win/Qt/qt_icon.h ../win/Qt/qt_str.h \ + qt_kde0.moc $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_main.cpp -qt_map.o: ../win/Qt/qt_map.cpp $(HACK_H) ../win/Qt/qt_map.h qt_map.moc \ - ../win/Qt/qt_click.h ../win/Qt/qt_glyph.h ../include/qt_xpms.h \ - ../win/Qt/qt_set.h ../win/Qt/qt_str.h - $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_map.cpp -qt_menu.o: ../win/Qt/qt_menu.cpp $(HACK_H) ../win/Qt/qt_menu.h qt_menu.moc \ - ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h ../win/Qt/qt_streq.h \ +qt_map.o: ../win/Qt/qt_map.cpp $(HACK_H) ../win/Qt/qt_map.h ../win/Qt/qt_win.h \ + ../win/Qt/qt_clust.h qt_map.moc ../win/Qt/qt_click.h \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_xpms.h ../win/Qt/qt_set.h \ ../win/Qt/qt_str.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_map.cpp +qt_menu.o: ../win/Qt/qt_menu.cpp $(HACK_H) ../win/Qt/qt_menu.h \ + ../win/Qt/qt_win.h ../win/Qt/qt_rip.h qt_menu.moc \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h ../win/Qt/qt_streq.h \ + ../win/Qt/qt_line.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_menu.cpp -qt_msg.o: ../win/Qt/qt_msg.cpp $(HACK_H) ../win/Qt/qt_msg.h qt_msg.moc \ - ../win/Qt/qt_map.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h +qt_msg.o: ../win/Qt/qt_msg.cpp $(HACK_H) ../win/Qt/qt_msg.h ../win/Qt/qt_win.h \ + qt_msg.moc ../win/Qt/qt_map.h ../win/Qt/qt_clust.h \ + ../win/Qt/qt_set.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_msg.cpp qt_plsel.o: ../win/Qt/qt_plsel.cpp $(HACK_H) ../win/Qt/qt_plsel.h qt_plsel.moc \ - ../win/Qt/qt_bind.h ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h \ - ../win/Qt/qt_str.h + ../win/Qt/qt_bind.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \ + ../win/Qt/qt_glyph.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_plsel.cpp qt_rip.o: ../win/Qt/qt_rip.cpp $(HACK_H) ../win/Qt/qt_rip.h \ - ../win/Qt/qt_bind.h ../win/Qt/qt_str.h + ../win/Qt/qt_bind.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \ + ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_rip.cpp qt_set.o: ../win/Qt/qt_set.cpp $(HACK_H) ../win/Qt/qt_set.h qt_set.moc \ ../win/Qt/qt_glyph.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_set.cpp -qt_stat.o: ../win/Qt/qt_stat.cpp $(HACK_H) ../win/Qt/qt_stat.h qt_stat.moc \ - ../win/Qt/qt_set.h ../win/Qt/qt_str.h ../include/qt_xpms.h +qt_stat.o: ../win/Qt/qt_stat.cpp $(HACK_H) ../win/Qt/qt_stat.h \ + ../win/Qt/qt_win.h ../win/Qt/qt_icon.h qt_stat.moc \ + ../win/Qt/qt_set.h ../win/Qt/qt_str.h ../win/Qt/qt_xpms.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_stat.cpp qt_str.o: ../win/Qt/qt_str.cpp ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_str.cpp qt_streq.o: ../win/Qt/qt_streq.cpp $(HACK_H) ../win/Qt/qt_streq.h \ - ../win/Qt/qt_str.h + ../win/Qt/qt_line.h ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_streq.cpp qt_svsel.o: ../win/Qt/qt_svsel.cpp $(HACK_H) ../win/Qt/qt_svsel.h \ - ../win/Qt/qt_bind.h ../win/Qt/qt_str.h + ../win/Qt/qt_bind.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \ + ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_svsel.cpp qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../win/Qt/qt_win.h \ - ../win/Qt/qt_bind.h ../win/Qt/qt_click.h ../win/Qt/qt_glyph.h \ - ../win/Qt/qt_inv.h ../win/Qt/qt_key.h ../win/Qt/qt_icon.h \ - ../win/Qt/qt_map.h ../win/Qt/qt_menu.h ../win/Qt/qt_msg.h \ - ../win/Qt/qt_set.h ../win/Qt/qt_clust.h + ../win/Qt/qt_bind.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \ + ../win/Qt/qt_click.h ../win/Qt/qt_glyph.h ../win/Qt/qt_inv.h \ + ../win/Qt/qt_key.h ../win/Qt/qt_icon.h ../win/Qt/qt_map.h \ + ../win/Qt/qt_clust.h ../win/Qt/qt_menu.h ../win/Qt/qt_rip.h \ + ../win/Qt/qt_msg.h ../win/Qt/qt_set.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_win.cpp qt_xcmd.o: ../win/Qt/qt_xcmd.cpp $(HACK_H) ../include/func_tab.h \ ../win/Qt/qt_xcmd.h qt_xcmd.moc ../win/Qt/qt_bind.h \ - ../win/Qt/qt_set.h ../win/Qt/qt_str.h + ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_set.h \ + ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_xcmd.cpp qt_yndlg.o: ../win/Qt/qt_yndlg.cpp $(HACK_H) ../win/Qt/qt_yndlg.h qt_yndlg.moc \ ../win/Qt/qt_str.h $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_yndlg.cpp +qt3_win.o: ../win/Qt3/qt3_win.cpp $(HACK_H) ../include/func_tab.h \ + ../include/dlb.h ../include/patchlevel.h ../include/tile2x11.h \ + ../win/Qt3/qt3_win.h ../win/Qt3/qt3_clust.h \ + ../win/Qt3/qt3_kde0.h ../win/Qt3/qt3_xpms.h qt3_win.moc \ + qt3_kde0.moc qt3tableview.moc + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt3/qt3_win.cpp +qt3_clust.o: ../win/Qt3/qt3_clust.cpp ../win/Qt3/qt3_clust.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt3/qt3_clust.cpp +qt3tableview.o: ../win/Qt3/qt3tableview.cpp ../win/Qt3/qt3tableview.h + $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt3/qt3tableview.cpp wc_chainin.o: ../win/chain/wc_chainin.c $(HACK_H) $(CC) $(CFLAGS) -c -o $@ ../win/chain/wc_chainin.c wc_chainout.o: ../win/chain/wc_chainout.c $(HACK_H) diff --git a/sys/unix/depend.awk b/sys/unix/depend.awk index c367f97e0..ac4416230 100644 --- a/sys/unix/depend.awk +++ b/sys/unix/depend.awk @@ -1,6 +1,6 @@ # depend.awk -- awk script used to construct makefile dependencies # for nethack's source files (`make depend' support for Makefile.src). -# $NHDT-Date: 1546220373 2018/12/31 01:39:33 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.8 $ +# $NHDT-Date: 1575916941 2019/12/09 18:42:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.10 $ # # usage: # cd src ; nawk -f depend.awk ../include/*.h list-of-.c/.cpp-files @@ -43,20 +43,23 @@ FNR == 1 { output_dep() #finish previous file #[3.6.2: curses headers likewise] #[3.7.0: Qt headers have moved] if (incl ~ /\.h$/) { - if (incl ~ "curses\.h") - incl = "" # skip "curses.h"; it should be - + if (incl ~ "curses\.h") + incl = "" # skip "curses.h"; it should be else if (incl ~ /^..\/lib\/lua-.*\/src\/l/) - incl = "" # skip lua headers + incl = "" # skip lua headers else if (incl ~ /^curs/) # curses special case incl = "../win/curses/" incl - else if (incl ~ /^qtext.h/) # qtext.h special case - incl = "../include/" incl - else if (incl ~ /^qt_xpms.h/) # qt_xpms.h special case - incl = "../include/" incl - else if (incl ~ /^qt/) # Qt v4 special case - incl = "../win/Qt/" incl - else if (incl ~ /^gn/) # gnomehack special case + else if (incl ~ /^qt/) { # Qt special cases + # qtext.h is a core header that accidentally matches... + if (incl ~ /^qtext.h/) # ...the Qt exception + incl = "../include/" incl + # Qt v3 headers are in ../win/Qt3 + # Qt v4/v5 headers are in ../win/Qt + else if (FILENAME ~ /^\.\.\/win\/Qt3\/.*/) + incl = "../win/Qt3/" incl + else # Qt v4 + incl = "../win/Qt/" incl + } else if (incl ~ /^gn/) # gnomehack special case incl = "../win/gnome/" incl else incl = "../include/" incl @@ -108,7 +111,7 @@ function output_specials( i, sp, alt_sp) # write a target and its dependency list in pretty-printed format; # if target's primary source file has a path prefix, also write build command # -function format_dep(target, source, n, i, list) +function format_dep(target, source, col, n, i, list) { split("", done) #``for (x in done) delete done[x]'' printf("%s:", target); col = length(target) + 1 diff --git a/include/qt_xpms.h b/win/Qt/qt_xpms.h similarity index 100% rename from include/qt_xpms.h rename to win/Qt/qt_xpms.h diff --git a/win/Qt3/qt_clust.cpp b/win/Qt3/qt3_clust.cpp similarity index 96% rename from win/Qt3/qt_clust.cpp rename to win/Qt3/qt3_clust.cpp index c5063a6a3..6b1039f9b 100644 --- a/win/Qt3/qt_clust.cpp +++ b/win/Qt3/qt3_clust.cpp @@ -1,7 +1,7 @@ -/* NetHack 3.6 qt_clust.cpp $NHDT-Date: 1524684507 2018/04/25 19:28:27 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.8 $ */ +/* NetHack 3.6 qt_clust.cpp $NHDT-Date: 1575917719 2019/12/09 18:55:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ */ /* Copyright (c) Warwick Allison, 1999. */ /* NetHack may be freely redistributed. See license for details. */ -#include "qt_clust.h" +#include "qt3_clust.h" static void include(QRect& r, const QRect& rect) diff --git a/include/qt_clust.h b/win/Qt3/qt3_clust.h similarity index 100% rename from include/qt_clust.h rename to win/Qt3/qt3_clust.h diff --git a/include/qt_kde0.h b/win/Qt3/qt3_kde0.h similarity index 100% rename from include/qt_kde0.h rename to win/Qt3/qt3_kde0.h diff --git a/win/Qt3/qt_win.cpp b/win/Qt3/qt3_win.cpp similarity index 99% rename from win/Qt3/qt_win.cpp rename to win/Qt3/qt3_win.cpp index 919018c41..9fe0e81ab 100644 --- a/win/Qt3/qt_win.cpp +++ b/win/Qt3/qt3_win.cpp @@ -1,4 +1,4 @@ -// NetHack 3.6 qt_win.cpp $NHDT-Date: 1524684508 2018/04/25 19:28:28 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.77 $ +// NetHack 3.6 qt_win.cpp $NHDT-Date: 1575917720 2019/12/09 18:55:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ // Copyright (c) Warwick Allison, 1999. // NetHack may be freely redistributed. See license for details. @@ -74,7 +74,7 @@ extern "C" { } -#include "qt_win.h" +#include "qt3_win.h" #include #include #include @@ -98,8 +98,8 @@ extern "C" { #include -#include "qt_clust.h" -#include "qt_xpms.h" +#include "qt3_clust.h" +#include "qt3_xpms.h" #include #ifdef Q_WS_MACX @@ -5303,10 +5303,10 @@ extern "C" void play_usersound(const char* filename, int volume) #endif } -#include "qt_win.moc" +#include "qt3_win.moc" #ifndef KDE -#include "qt_kde0.moc" +#include "qt3_kde0.moc" #endif #if QT_VERSION >= 300 -#include "qttableview.moc" +#include "qt3tableview.moc" #endif diff --git a/include/qt_win.h b/win/Qt3/qt3_win.h similarity index 99% rename from include/qt_win.h rename to win/Qt3/qt3_win.h index 136e8a6ef..8de29d92f 100644 --- a/include/qt_win.h +++ b/win/Qt3/qt3_win.h @@ -1,4 +1,4 @@ -// NetHack 3.6 qt_win.h $NHDT-Date: 1447755972 2015/11/17 10:26:12 $ $NHDT-Branch: master $:$NHDT-Revision: 1.17 $ +// NetHack 3.6 qt_win.h $NHDT-Date: 1575917700 2019/12/09 18:55:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ // Copyright (c) Warwick Allison, 1999. // NetHack may be freely redistributed. See license for details. // @@ -52,7 +52,7 @@ #include #endif -#include "qt_clust.h" +#include "qt3_clust.h" class QVBox; class QMenuBar; @@ -737,7 +737,7 @@ class NetHackQtInvUsageWindow : public QWidget // note the actual class of the windows. // #ifndef KDE -#include "qt_kde0.h" +#include "qt3_kde0.h" #endif class NetHackQtMainWindow : public KTopLevelWidget diff --git a/win/Qt3/qt3_xpms.h b/win/Qt3/qt3_xpms.h new file mode 100644 index 000000000..5667c13c0 --- /dev/null +++ b/win/Qt3/qt3_xpms.h @@ -0,0 +1,1422 @@ +/* clang-format off */ +/* XPM */ +static const char *blind_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 5 1", +/* colors */ +" c #000000", +". c None", +"X c #909090", +"o c #606060", +"O c #303030", +/* pixels */ +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"....ooooooooooooooooooooooooooooooooX...", +".... o...", +".... o...", +".... o...", +".... o...", +"......o ..o ......", +"......X O..X O......", +"....... o... o......", +".......o ....o .......", +"........O X.....O X.......", +".........O X.......O X........", +"..........o OX.........o OX.........", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................", +"........................................" +}; +/* XPM */ +static const char *cha_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 14 1", +/* colors */ +" c #F85848", +". c #949E9E", +"X c #F8B090", +"o c #E00028", +"O c #D4D4D4", +"+ c None", +"@ c #B0B0B0", +"# c #F82C24", +"$ c #F89E6C", +"% c #FF0000", +"& c #909090", +"* c #FFFFFF", +"= c #CEAA90", +"- c #DADAB6", +/* pixels */ +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"+++++++++++++++=#%#=+=#%% ++++++++++++++", +"++++++++++++++ %O%%%#%$$%o%=++++++++++++", +"+++++++++++++# +#%%o%%o%%%%% +++++++++++", +"+++++++++++ %%%%%%%%%%%%%%%%o#=+++++++++", +"+++++++++ o%%%%%%%%%%%%%%%%%%%%# +++++++", +"++++++ #%%%%%%o%%%o%%o%%o%o%%%%%o%o +++", +"++=#%%o%%%#= =*+**O*+**O*+- = =%%%%#@+++", +"++++ %=++*+*+**O****O****O*O*O*OO%=+++++", +"+++++.%=OO+*O*OO****+****+*O*+O&%=@+++++", +"++++++=%=*OO+**O**O*O**O*O*OO+$%=+++++++", +"+++++++#% +*OOOO****+****@O+*#%=++++++++", +"++++++++#%#*+**+O+OO+O+OOO*O#o#+++++++++", +"+++++++++o% O**+****O****O*#%%=+++++++++", +"+++++++++ %%#O*O****+****+ %o#++++++++++", +"++++++++++o%% XO*O**O*O**#%%%+++++++++++", +"++++++++++ %%%o%$-**+**$%%%%=+++++++++++", +"+++++++++++o%%$X$%%%%%%#= o#++++++++++++", +"++++++++++@ %%%o#O$$+$$$%%%=++++++++++++", +"++++++++++++#o%%%%%%%%o%%%=@++++++++++++", +"+++++++++++++ %%%%%%%%%%o=++++++++++++++", +"+++++++++++++++= & & @++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++" +}; +/* XPM */ +static const char *chaotic_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 9 1", +/* colors */ +" c #000000", +". c #5C7A7A", +"X c None", +"o c #B0B0B0", +"O c #909090", +"+ c #788C8C", +"@ c #606060", +"# c #FFFFFF", +"$ c #303030", +/* pixels */ +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXX@$ @XXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXX$$+#X$ $XXXXXXXXXX", +"XXXXXXXXXXXXXXXXXX@$#o @XXXXXXXXX", +"XXXXXXXXXXXXXXXXXX$XX OXXXXXXXX", +"XXXXXXXXXXXXXXXXX@ # $@$ $XXXXXXXX", +"XXXXXXXXXXXXXXXXX@.+ $XXXO @XXXXXXX", +"XXXXXXXXXXXXXXXXX O@ XXXXX@ @XXXXXXX", +"XXXXXXXXXXXXXXXXX @O $XXXXX@$ @XXXXXXX", +"XXXXXXXXXXXXXXXXX O+ @XXXXO++ @XXXXXXX", +"XXXXXXXXXXXXXXXXX @+ $@OXO$#$ XXXXXXXX", +"XXXXXXXXXXXXXXXXX O@ $ @$Xo $XXXXXXXX", +"XXXXXXXXXXXXXXXXX +O $X##+ $XXXXXXXXX", +"XXXXXXXXXXXXXXXXX +@ $XXXXXXXXXX", +"XXXXXXXXXXXXXXXXX oO $XXXXXXXXXXX", +"XXXXXXXXO@@@@@ +# $XXXXXXXXXXXX", +"XXXXXXO +o########$ $@XXXXXXXXX", +"XXXXXX +#+.$XXXXXXXX", +"XXXXXX @O @XXXXXXX", +"XXXXXX$ $@ $@@$ @XXXXXXX", +"XXXXXXX@@@@XXXXXX + @XXXX@$ OXXXXXXX", +"XXXXXXXXXXXXXXXX@ # @XXXXXXX@@OXXXXXXXX", +"XXXXXXXXXXXXXXXX@.+ @XXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXX$O@ XXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXX @O XXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXX #$ @XXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXX # @XXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXX # @XXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXX@ # @XXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXX@ # OXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXX@.X XXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXX ++ XXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXX @+ XXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXX O@ @XXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXX +O @XXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXX @XXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXX$ OXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXX@@OXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +}; +/* XPM */ +static const char *cns_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 19 1", +/* colors */ +" c #000000", +". c #F85848", +"X c #949E9E", +"o c #F8B090", +"O c #E00028", +"+ c #7C3400", +"@ c None", +"# c #B0B0B0", +"$ c #F82C24", +"% c #F89E6C", +"& c #FF0000", +"* c #B64700", +"= c #909090", +"- c #788C8C", +"; c #606060", +": c #C80050", +"> c #CEAA90", +", c #303030", +"< c #FFB691", +/* pixels */ +"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@.oo.o$ ;@@@@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@>.o.%%O,@@@@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@$oo.o.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@@@", +"@@@@@@@@@@@.o%,:::O&&&O:&O:, @@@@@@@@@", +"@@@@@@@@@@@$o. :::OO&OO&::, ;@@@@@@@@@", +"@@@@@@@@@@@&o%+ ,::O&OO&O:: =@@@@@@@@@", +"@@@@@@@@@@@.oo+ :::OO::: ,@@@@@@@@@@", +"@@@@@@@@@@@..oO +::::: =@@@@@@@@@@", +"@@@@@@@@@@@@.<.+ ,+, ,@@@@@@@@@@@", +"@@@@@@@@@@@@Oo<+ @X, ,@@@@@@@@@@@@", +"@@@@@@@@@@@@.%o$ @@@@@;, ;@@@@@@@@@@@@@", +"@@@@@@@@@@@@@.o., =@@@@@@@@@@@@@@@@@@@@@", +"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" +}; +/* XPM */ +static const char *confused_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 13 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #5C7A7A", +"o c #D4D4D4", +"O c None", +"+ c #B0B0B0", +"@ c #909090", +"# c #788C8C", +"$ c #606060", +"% c #406868", +"& c #FFFFFF", +"* c #303030", +"= c #6C91B6", +/* pixels */ +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOO.=.+OO=.+O.OO+O+OO.+OOOOOO", +"OOOOOOOOOOO++=====O=====+=O+==++=O+OOOOO", +"OOOOOOOOOOO+=.=====.=++++===OO==+O=+OOOO", +"OOOOOOOOOOO=+===.+=o==o===+&OoO======OOO", +"OOOOOOOO+O+====OO+=o&&&&Oo==o&oO+==+=.O.", +"OOOO+.+=+O==+&&o=oooOo&o&ooo=&oooO==O=+=", +"OOOOOOOO++O===oo=oo&=&o&&oo=o==&o+==++==", +"OOOOOOOO=o.=O====o&OO&o&oo&o&&oo=======O", +"OOOOOOOo===+=O=O=ooO=ooooOOo=o&O=====OOO", +"OOOOOOOOO+==+=======O=oo====O=o=O===+OOO", +"OOOOOOOOO.=#=X=+====O========O======OOOO", +"OOOOOOO.#Xo++.=#%====O==========OO==+OOO", +"OOOOOO+Xo#+#+.#=.==X====+====O=+=+==+OOO", +"OOOOO.+.+O===##.#=X.====oX##===o+OO.OOOO", +"OOOOO#+####O#O##o.#+==#X#O#+...=OOo=+OOO", +"OOOO++#o+#+X++++#.#O.#+#X.#+X+==+OO=oOOO", +"OOOO#+.+..X+.##X++#++#..+XX#+##+..OOOOOO", +"OOOO##....O+#++#+.++#+X+#+#X..+#+#OOOOOO", +"OOOO++#+.+.#+#O+X#X#XX#.++##.#++.X$OOOOO", +"OOOOO#+#+.+++#++.+++##+X###+X+X##+**OOOO", +"OOOOO#..#OO#+.##o###.+..++.+#X+#+#* @OOO", +"OOOOO+#.#O+#+#O.+++.###+##++###+.#* $OOO", +"OOOOOOXX+#+#+#o..X##++#+..##.#+### *OOO", +"OOOOOOOX#.#X+#+#+#+.#+..+####%XX%% OOO", +"OOOOOOOO.%%X.#+#+#.++#+#+#+.X++=.% *OOO", +"OOOOOOOOO.* *##+#+.O####.+XX%%%%#% $OOO", +"OOOOOOOOOOO. %X.+.#+++XXX=.+++#X $OOO", +"OOOOOOOOOOOO.* %%X..#X%=.####%X* $OOO", +"OOOOOOOOOOOOOO.$ *XX%%%=.#X%###=* OOOO", +"OOOOOOOOOOOOOOOOOO+%%%=%%#.+.#=* @OOOO", +"OOOOOOOOOOOOOOOOOOo=%%%==X##X%* OOOOO", +"OOOOOOOOOOOOOOOOOOO+X%%%%X=%* @OOOOO", +"OOOOOOOOOOOOOOOOOOOOX%%%%X *@OOOOOO", +"OOOOOOOOOOOOOOOOOOOO=%%%X* *$$OOOOOOOO", +"OOOOOOOOOOOOOOOOOOOO+X%%= .OOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOX%%% OOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOO=%%* $OOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOO=%%% $OOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOO+%%% $OOOOOOOOOOOOO" +}; +/* XPM */ +static const char *dex_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 19 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #F8B090", +"o c #5C7A7A", +"O c #D4D4D4", +"+ c #F87A24", +"@ c #7C3400", +"# c None", +"$ c #B0B0B0", +"% c #F89E6C", +"& c #B64700", +"* c #909090", +"= c #606060", +"- c #CEAA90", +"; c #DADAB6", +": c #303030", +"> c #F86800", +", c #FFB691", +"< c #F88C48", +/* pixels */ +"########################################", +"########################################", +"########################################", +"########################################", +"########################################", +"########################################", +"###############-%-######################", +"##############-%X<-#####################", +"#########-<<-#-%XX+==###################", +"#########%,X< :<,X%@ :##################", +"#########-XX%: @;X%+ *#################", +"##########<,X& :<<%+: :#################", +"######->+#-%%%: <,XX@ #################", +"######%X%@ <,,& @XXX+ :++-#############", +"######-: +XX+ #########", +"#####+%%@@,X%<,XXXXXXX<:@XXX<: =########", +"####$%XX< <,<,XX& ########", +"#####$%<%X@%XXXX<%XX< =#######", +"#######<;X%XXXXX<<,XXXXXX%,XXXXXXXXX%@ #######", +"##########- c #788C8C", +", c #606060", +"< c #406868", +"1 c #C80050", +"2 c #FFFFFF", +"3 c #FFFF00", +"4 c #00B6FF", +"5 c #CEAA90", +"6 c #DADAB6", +"7 c #F86800", +"8 c #FFB691", +"9 c #6C91B6", +"0 c #F88C48", +"q c #0000FF", +/* pixels */ +"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$353333335*$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$*33333333#7@3335$$$$$$$$$$$$", +"$$$$$$$$$65333333333@7777#333*$$$$$$$$$$", +"$$$$$$$$$3333333333377777733333===%$$$$$", +"$$$$$$$533333333333#7777777333%=====$$$$", +"$$$$$$ #3333333333o>7777773330======%$$$", +"$$$$5---O#33333o3944077777333*=======$$$", +"$$$$-----O333333>4444.77333330======%$$$", +"$$$ ---O--;3333344444443333333:====5$$$$", +"$$$ O-----733333444444433333333 ==035$$$", +"$$$3--O--O333333>44444>33333333333333$$$", +"$$533---O33333333944493333#333333333356$", +"$$33867733333o33333:o333333o3333333333$$", +"$532+2233333#333333333333oooo3#3333333%$", +"6522222+33333333333333333oooooo33o3333*$", +"$+22+22263333333o3333333ooooooo333333356", +"662222+2533333333333333#ooooooo33333333$", +"$32+22223333o3#33333o333ooooooo3#333333%", +"$33222233333333333#333333ooooo333333333$", +"$33368333333333333330626*oooo#333333o33%", +"%333335== 33oo333333222223#333333333333$", +"$3333=====:ooooo333+22+2263333333.>o333%", +"$5333=====oooooo33322222223333339444935$", +"$*33 ====>ooooooo3362+222633333.44444>3$", +"$%330====:ooooooo333222+23333334444444$$", +"$$333177 =oooXoo#333*626333333;4444444$$", +"$$53##777&3oooo3333333333333#--,444449$$", +"$$$3;77777#3o333333333333333O---94449$$$", +"$$%*@77777#33333333333333337O----O:o3$$$", +"$$$5777777333 333333333333;---O-O73$$$$", +"$$$$#7777730====#:.,33333333------3$$$$$", +"$$$$$577333=====qqqq<0333333#O---35$$$$$", +"$$$$$%53335====qqqqqq.33o333337735$$$$$$", +"$$$$$$$533 ====qqqqqqq3333333333%$$$$$$$", +"$$$$$$$$%33====qqqqqqq333333333%$$$$$$$$", +"$$$$$$$$$$50===qqqqqq,3333333:$$$$$$$$$$", +"$$$$$$$$$%6%5503,qqq<333#335%$$$$$$$$$$$", +"$$$$$$$$$$$$$%$*53,03335o$%%$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$$$%$$+$$$$$$$$$$$$$$$" +}; +/* XPM */ +static const char *hungry_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 15 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #5C7A7A", +"o c #D4D4D4", +"O c None", +"+ c #B0B0B0", +"@ c #909090", +"# c #788C8C", +"$ c #606060", +"% c #406868", +"& c #FFFFFF", +"* c #CEAA90", +"= c #DADAB6", +"- c #303030", +"; c #6C91B6", +/* pixels */ +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO========OOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOO=============OOOOOOOOOOOOO", +"OO;XX;@OOOOO================OOOOOOOO;XOO", +"OO;%-;$OOOO==================OOOOOOO;XOO", +"OO;-%;$OOO========@$#@========OOOOO+;;$O", +"OO;%-;$OO=======- -*======*OOOO.;;$O", +"OO;-%;$O======* @====.$$&=====@OOO.;;$O", +"OO;X%;$O====== -========*@=====*.OO+;;$O", +"OO;;;X$o====* -==========@======$OO;;;$O", +"OO+;;-+o====- =============o====#@O+;;$O", +"OOO;%$O===== @=============&====*$O;;;$O", +"OOO+%OO====@ ==============&=====-OO;;$O", +"OOo;-Oo====$ ==============o&==== OO;;$O", +"OOO+%OO====@ ==============&===== O+;;#O", +"OOO;-Oo====$-==============&&==== O+;;-O", +"OOO;;+O=====$*============&&====* OO;;%+", +"OOO;;$o=====$.============&&====X-OO;;$O", +"OOO;;$O======*.===&======&&=====-$=O;;$O", +"OOO;;$Oo=====.==========&&=====* @O+;;$O", +"OOO;;$OO=======oo=====&&&======$-OOO;;$O", +"OOO;;$OOo=======&o&&&&&&======$ @OOO;;$O", +"OOO;;$OOOO========&=&========* $OOOO;;$O", +"OO+;;$OOOOo=================* -OOOOO#;$O", +"OOO;;$OOOOO=*==============@ -=OOOOO;;$O", +"OOO;;$OOOOOOO+*==========*- $OOOOOOO;;$O", +"OOOX-$OOOOOOOO@X@*====*#- -.OOOOOOOOX-$O", +"OOOOOOOOOOOOOO=*@$- -$.=OOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOO=O==O=O=OOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO" +}; +/* XPM */ +static const char *hvy_enc_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 13 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #5C7A7A", +"o c #D4D4D4", +"O c None", +"+ c #B0B0B0", +"@ c #909090", +"# c #788C8C", +"$ c #606060", +"% c #406868", +"& c #FFFFFF", +"* c #303030", +"= c #6C91B6", +/* pixels */ +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOoO+OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOoOXX==OOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOoO=OO+==OOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOoXOO.*$=$OOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO=+# *.X *OOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO==.OO=+@ $OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOXO==.OO $OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOO+=@$@* @OOOOOOOOOOOOOO", +"OOOOOOOOOOO&&&&&&&&&&&&&&&.OOOOOOOOOOOOO", +"OOOOOOOOOOOo==============X*OOOOOOOOOOOO", +"OOOOOOOOOOoO===X====X=====X**OOOOOOOOOOO", +"OOOOOOOOOO&============X===% $OOOOOOOOOO", +"OOOOOOOOOoo===*%====***%===%* OOOOOOOOOO", +"OOOOOOOOOoO==% %===* %==X* @OOOOOOOOO", +"OOOOOOOOO&===% *==% X==**===% $OOOOOOOOO", +"OOOOOOOOoo===% %==% ===% ===X OOOOOOOOO", +"OOOOOOOOoO==== *== *==== *==X* @OOOOOOOO", +"OOOOOOOO&===== %== %==== %===% $OOOOOOOO", +"OOOOOOOoo===== *== *==== *===%* OOOOOOOO", +"OOOOOOOoO===== %==% ===* ====X* @OOOOOOO", +"OOOOOOO&===X== *==% X==**=====% $OOOOOOO", +"OOOOOOoo===== *==* %=====X OOOOOOO", +"OOOOOOoO=====*%%X===*%*X======%* @OOOOOO", +"OOOOOOo====================X===* $OOOOOO", +"OOOOOOO=%X%XXXX%XXXXXXXXX%X=%X% OOOOOO", +"OOOOOOO.=********************** OOOOOO", +"OOOOOOOOO OOOOOO", +"OOOOOOOOO. @OOOOOO", +"OOOOOOOOOOOoOOoOoOoOoOoOoOOoOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO" +}; +/* XPM */ +static const char *int_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 12 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #5C7A7A", +"o c #D4D4D4", +"O c None", +"+ c #B0B0B0", +"@ c #909090", +"# c #788C8C", +"$ c #606060", +"% c #406868", +"& c #303030", +"* c #6C91B6", +/* pixels */ +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOO+#.X.##@#OOOOOOOOOOOOOOOOOO", +"OOOOOOOO+##@X#O++.#+#.##OOOOOOOOOOOOOOOO", +"OOOOOO+#Xo++#X#%#+##o#O#.#+OOOOOOOOOOOOO", +"OOOOO.Xo#+#++##+.XX#..+.+..XOOOOOOOOOOOO", +"OOOO++.+O.+O##+#.X###..OX#.+X+OOOOOOOOOO", +"OOOO#+####O#O##o##+###X#+#+.#..OOOOOOOOO", +"OOO.+#o+#+X++++#.#O+#+#X.#+X++X+OOOOOOOO", +"OOO.+.+..X+.##X++#++#..+XX#+#X+..OOOOOOO", +"OOO##....O+#++#+.++#+X+#+#X..+#+#OOOOOOO", +"OOO++#+.+.#+#O+X#X#XX#.++##.#++.X$OOOOOO", +"OOOO#+#+.+++#++.+++##+X###+X+X##+&&OOOOO", +"OOOO#..#OO#+.##o###.+..++.+#X+#+#& @OOOO", +"OOOO.#.#O+#+#O.+++.###+##++###+.# $OOOO", +"OOOOOXX+#+#+#o..X##++#+..##.#+### &OOOO", +"OOOOOOX#.#X+#+#+#+.#+..+####XX%X% OOOO", +"OOOOOOO.%%X.#+#+#.++#+#+#+.%++*+% &OOOO", +"OOOOOOOO@& &##+#+.O####.+XXX%%%#% $OOOO", +"OOOOOOOOOO. %X.+.#+++XXX*.+++#% $OOOO", +"OOOOOOOOOOO@& %%X..#XXX.####%%& $OOOO", +"OOOOOOOOOOOOO@$ &XX%%%*.#X%###*& OOOOO", +"OOOOOOOOOOOOOOOOO+%%%*%%#.+.#*& @OOOOO", +"OOOOOOOOOOOOOOOOOO*%%%*.X##XX& OOOOOO", +"OOOOOOOOOOOOOOOOOOOX%%%%X*%& @OOOOOO", +"OOOOOOOOOOOOOOOOOOOX%%%%% &@OOOOOOO", +"OOOOOOOOOOOOOOOOOOO*%%%X& &$$OOOOOOOOO", +"OOOOOOOOOOOOOOOOOOO+%%%* .OOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOO+*%%% OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOO*%%& $OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOO*%%% $OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOO+%%& $OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOOOOOOO" +}; +/* XPM */ +static const char *lawful_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 10 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #5C7A7A", +"o c #D4D4D4", +"O c None", +"+ c #B0B0B0", +"@ c #909090", +"# c #606060", +"$ c #FFFFFF", +"% c #303030", +/* pixels */ +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOo$$$$$$oOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOO$$o$$o$$$$$OOOOOOOOOO", +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O$$$##OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOo$$$##OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOo$$o%@OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOo$$o OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO$$oo OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO$$$o OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO$$$##OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOo$$##OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO$$o##OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOo$# @OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO.#@OOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO" +}; +/* XPM */ +static const char *mod_enc_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 13 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #5C7A7A", +"o c #D4D4D4", +"O c None", +"+ c #B0B0B0", +"@ c #909090", +"# c #788C8C", +"$ c #606060", +"% c #406868", +"& c #FFFFFF", +"* c #303030", +"= c #6C91B6", +/* pixels */ +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOoO+OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOoOXX==OOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOoO=OO+==OOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOoXOO.*$=$OOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO=+# *.X *OOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO==.OO=+@ $OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOXO==.OO $OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOO+=@$@* @OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOo&&&&&&&&&oXOOOOOOOOOOOOOOO", +"OOOOOOOOOOOO+&=========X%@OOOOOOOOOOOOOO", +"OOOOOOOOOOOOO&=====X====% @OOOOOOOOOOOOO", +"OOOOOOOOOOOOoO==X=======X* OOOOOOOOOOOOO", +"OOOOOOOOOOOO&====*%*%*===* $OOOOOOOOOOOO", +"OOOOOOOOOOO+&===X ===% *OOOOOOOOOOOO", +"OOOOOOOOOOOoO===**=======X* OOOOOOOOOOOO", +"OOOOOOOOOOO&===% %=======X% $OOOOOOOOOOO", +"OOOOOOOOOOO&===% %*%%=====% *OOOOOOOOOOO", +"OOOOOOOOOOoO===* ====X* OOOOOOOOOOO", +"OOOOOOOOOO&=========* X===X% $OOOOOOOOOO", +"OOOOOOOOO+&=========% *====% *OOOOOOOOOO", +"OOOOOOOOOoO===% %=== %====%* OOOOOOOOOO", +"OOOOOOOOO&====* *==X===% $OOOOOOOOO", +"OOOOOOOOO&======*%*%X=======% *OOOOOOOOO", +"OOOOOOOOOo==X===============% OOOOOOOOO", +"OOOOOOOOO=XXXXXXXXXX%X%X%X%%% $OOOOOOOO", +"OOOOOOOOOO=%**************** $OOOOOOOO", +"OOOOOOOOOOO$ $OOOOOOOO", +"OOOOOOOOOOOO* *OOOOOOOOO", +"OOOOOOOOOOOOOoOOoOoOoOoOoOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO" +}; +/* XPM */ +static const char *neutral_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 14 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #5C7A7A", +"o c #D4D4D4", +"O c None", +"+ c #B0B0B0", +"@ c #909090", +"# c #788C8C", +"$ c #606060", +"% c #406868", +"& c #FFFFFF", +"* c #00B6FF", +"= c #303030", +"- c #6C91B6", +/* pixels */ +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOO.------.OOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOO-+O&o.-----OOOOOOOOOO", +"OOOOOOOOOOOOOOOOOO+-&o--------.OOOOOOOOO", +"OOOOOOOOOOOOOOOOOO-oo----------+OOOOOOOO", +"OOOOOOOOOOOOOOOOO+-&--% #-------OOOOOOOO", +"OOOOOOOOOOOOOOOOO-OO-X=OOO.-----+OOOOOOO", +"OOOOOOOOOOOOOOOOO-oO-%#OOOO.-----OOOOOOO", +"OOOOOOOOOOOOOOOOO--O-=OOOOO+---X#OOOOOOO", +"OOOOOOOOOOOOOOOOO-oO-XOOOO+OO--=$OOOOOOO", +"OOOOOOOOOOOOOOOOO-OO--++OO-&--- OOOOOOOO", +"OOOOOOOOOOOOOOOOO-OO-----+oo--%=OOOOOOOO", +"OOOOOOOOOOOOOOOOO--O--+o&&o--%=OOOOOOOOO", +"OOOOOOOOOOOOOOOOO-oo*-------%=OOOOOOOOOO", +"OOOOOOOOOOOOOOOOO-oO------%%=OOOOOOOOOOO", +"OOOOOOOO+.+-+.---O&------= =OOOOOOOOOOOO", +"OOOOOO+-oo&&&&&&&&------------.OOOOOOOOO", +"OOOOOO---------------X-----O&Oo-OOOOOOOO", +"OOOOOO---------%=%---%%=%----OO-.OOOOOOO", +"OOOOOO---== =%---%=%%===----%XOOOOOOO", +"OOOOOOO-#$%OOOOOO-+-%$OOOO%===%=@OOOOOOO", +"OOOOOOOOOOOOOOOO.-&-=%OOOOOOO%%#OOOOOOOO", +"OOOOOOOOOOOOOOOo-O+-%$OOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO-oO- OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO-OO- OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO-&-%%OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO-&-%$OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO-&-=$OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO--o-%$OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO+-&- .OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO-Oo- OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO-OO- OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO-oO- OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO-OO%%OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO-o-%$OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO---%$OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO--% #OOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOX$@OOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO" +}; +/* XPM */ +static const char *ovr_enc_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 13 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #5C7A7A", +"o c #D4D4D4", +"O c None", +"+ c #B0B0B0", +"@ c #909090", +"# c #788C8C", +"$ c #606060", +"% c #406868", +"& c #FFFFFF", +"* c #303030", +"= c #6C91B6", +/* pixels */ +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOoO+=+OOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOo=#===+OOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOo=.OO@X=OOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOo#OO* #X @OOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO+=.XX+=#* @OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO+=O=.=OO $OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOO#.=+OO@ $OOOOOOOOOOOOOO", +"OOOOOOOOOooooooooo&O.#+#XooooOOOOOOOOOOO", +"OOOOOOOOO&OOoOoOoOOOOOOOOOoO%@OOOOOOOOOO", +"OOOOOOOOoO==================X*@OOOOOOOOO", +"OOOOOOOO&===================X% @OOOOOOOO", +"OOOOOOOO&==%*%*%*%*%*%*%*%*==% *OOOOOOOO", +"OOOOOOOoO==%*%%*%%*%%*%*%*%==X* OOOOOOOO", +"OOOOOOO&======================* $OOOOOOO", +"OOOOOO+&=== ===% *OOOOOOO", +"OOOOOOoO======================X* OOOOOOO", +"OOOOOO&=======================X% $OOOOOO", +"OOOOOOo========================% *OOOOOO", +"OOOOOoO===*%X=====%%======%%===X* OOOOOO", +"OOOOO&==% %==% *==== %==* $OOOOO", +"OOOOO&== *==**== **% *=X% %%* ==% *OOOOO", +"OOOOoO==%%==* =* ===% == %=== %=X* OOOOO", +"OOOO&=======% =**===% %X %X==* =X% $OOOO", +"OOOO&======% %= %==== %% ====* ==% *OOOO", +"OOOoO=====% *== *==== %* ====% ==X* OOOO", +"OOO&====XX *===**===% X% X=== *===* $OOO", +"OO+&====X *====* ===% == *=== %===% *OOO", +"OOoO===% %*%*== *** %==% %** ====X* OOO", +"OO&====% ==X *====* %====X% $OO", +"OO&================================% *OO", +"OOo===X============================% OO", +"OO=XXXXXXXXXXXX%XXXX%X%X%XXXXX%X%X%% $O", +"OOO=%****************************** $O", +"OOOO$ $O", +"OOOOO* *OO", +"OOOOOOOOOOoOOoOOoOOoOOoOOoOOoOOoOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO" +}; +/* XPM */ +static const char *pet_mark_xpm[] = { +/* width height ncolors chars_per_pixel */ +"8 7 2 1", +/* colors */ +". c None", +" c #FF0000", +/* pixels */ +"........", +".. . .", +". ", +". ", +".. .", +"... ..", +".... ..." +}; +/* XPM */ +static const char *pet_mark_small_xpm[] = { +/* width height ncolors chars_per_pixel */ +"5 5 2 1", +/* colors */ +". c None", +"X c #FF0000", +/* pixels */ +".X.X.", +"XXXXX", +".XXX.", +"..X.." +}; +/* XPM */ +static const char *pile_mark_xpm[] = { +/* width height ncolors chars_per_pixel */ +"5 5 2 1", +/* colors */ +". c None", +"X c #00FF00", +/* pixels */ +"..X..", +"..X..", +"XXXXX", +"..X..", +"..X.." +}; +/* XPM */ +static const char *satiated_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 23 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #F8B090", +"o c #5C7A7A", +"O c #D4D4D4", +"+ c #F87A24", +"@ c #7C3400", +"# c None", +"$ c #B0B0B0", +"% c #F89E6C", +"& c #914700", +"* c #B64700", +"= c #909090", +"- c #788C8C", +"; c #606060", +": c #406868", +"> c #FFFFFF", +", c #CEAA90", +"< c #DADAB6", +"1 c #303030", +"2 c #FFB691", +"3 c #6C91B6", +"4 c #F88C48", +/* pixels */ +"########################################", +"########################################", +"########################################", +"########################################", +"########################################", +"########################################", +"########################################", +"################<<<<<<<<################", +"##############<<<<<<<<<<$#$$$###########", +"############<<<<<<<<<<$:31:3:###########", +"###########<<<<<<%42<<#:3:133-##########", +"##########<<<<<%<<;;=o$131:33;##########", +"#########<<<<<<,1 ::31:33;,#########", +"########<<<<<<, =<<<<.13:133;<=########", +"########<<<%2, 1<<<<<<#333:33;<,=#######", +"#######<<<3-=<33;<<@o######", +"#######O<<<<<,#<<<<<<<<.3:<3-;<, =######", +"########<<<<2<<<<<<<<<>#31<33o<11#######", +"########O<<<<44<>O>>>>>#3:<3.;- =#######", +"##########<<<4<<<<><><<$3:<331 ;<#######", +"##########<<<<<<<%2<<<<$3:<33 1#########", +"###########O,<<<<<<<<<<#31<331##########", +"#############.<<<<<<<<<$3:133;##########", +"##############=;=,<<<<,o 1;;=##########", +"###############<=;1 1;=##############", +"#################<# c #B64700", +", c #909090", +"< c #788C8C", +"1 c #606060", +"2 c #406868", +"3 c #FFFFFF", +"4 c #CEAA90", +"5 c #DADAB6", +"6 c #303030", +"7 c #F86800", +"8 c #FFB691", +"9 c #6C91B6", +"0 c #F88C48", +"q c #0000FF", +/* pixels */ +"****************************************", +"*************#333333333#****************", +"***********##33333#333333#**************", +"**********#33333#33333#33*==************", +"*********#33##33-;-3#3333399************", +"********#33#33#3-@ 33333#33=.***********", +"********#3*#33-;;;;;-33333#99***********", +"*******#3*3333-;;;;@ 33#333#9=**********", +"*******#333#33#3-;-33#*##33399**********", +"******#3#3333333-@-#333#9933*9=*********", +"******#333#33#3333333#333*9999=*********", +"******#333333333#3#33333333*999*********", +"******#3#33#33333333#33#3333#9=*********", +"******#333334>&&:&&>::44,3#33#9*********", +"******#33*::&41OOO6:4O 0::4433=*********", +"******#3:>,0:O0O1O+O:OXO,O+2+OOo4<+1104:>:#*********", +"******.&:1OOO,14X2O48:O80,440:,*********", +"******4::>OOO%8-X4O4%O,84+O0X&>=********", +"******.::>,O 99*X+<$,+.o*1O4&0:*********", +"******>:0&4O5qq9#10OO3qq9,+X:1:*********", +"****=>,,::,O4qq9X+O>O-qq9O2X0,>*********", +"******4:>OOOO48882OOOO+4OOO07*4*********", +"******4*,4OO+OXX3O5************", +"*********=0%,OO,>:>>O +1OO4*************", +"**********=%+OO:::1:::6+:7**************", +"***********7&OO:O+O,O1OO+1**************", +"***********40OO,O4:OOO11O<5*************", +"**********=4 +O1O2+O2+O0O***************", +"************72O+1+21-OOO%5**************", +"************0%1OOOO+O+174***************", +"*************%%O,OO1407-=***************", +"**************-$>%0%:74*****************", +"****************54044*=*****************", +"*****************=*=********************" +}; +/* XPM */ +static const char *sick_il_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 23 1", +/* colors */ +" c #F85848", +". c #949E9E", +"X c #F8B090", +"o c #E00028", +"O c #D4D4D4", +"+ c #F87A24", +"@ c #7C3400", +"# c None", +"$ c #B0B0B0", +"% c #F89E6C", +"& c #FF0000", +"* c #914700", +"= c #B64700", +"- c #909090", +"; c #606060", +": c #FFFFFF", +"> c #CEAA90", +", c #DADAB6", +"< c #F86800", +"1 c #FFB691", +"2 c #6C91B6", +"3 c #F88C48", +"4 c #0000FF", +/* pixels */ +"########################################", +"#############O:::::::::O################", +"###########OO:::::O::::::O##############", +"##########O:::::O:::::O::#$$############", +"#########O::OO::%&%:O:::::22############", +"########O::O::O:%o :::::O::$.###########", +"########O:#O::%&&&&&%:::::O22###########", +"#######O:#::::%&&&&o ::O:::O2$##########", +"#######O:::O::O:%&%::O#OO:::22##########", +"######O:O:::::::%o%O:::O22::#2$#########", +"######O:::O::O:::::::O:::#2222$#########", +"######O:::::::::O:O::::::::#222#########", +"######O:O::O::::::::O::O::::O2$#########", +"######O:::::>=@@=**=**>>-:O::O2#########", +"######O::#**@3>%* ;=>=3;<@>>::$#########", +"######O:** >=>XXXX1X >>+>%*%*;O#########", +"######O3@*,X%XXXXXXX>X%XX >*=*O#########", +"######.@@3XXXXXXXXXXXXXXX>X>3*-#########", +"######>***>X% >XXXXX3XXXXXX%>*=>########", +"######.***> 22#XXX<%X22#XXX@+;#########", +"######=*3@X>O442OXX==%XX11111O1+%X111XX%<#>#########", +"######.,;XXXXXX1O1X%3XXXXX%+3###########", +"########3=XXXXXX:XXXXXXXXX+<>$##########", +"########>+XXXXXX%-3->XXXX%+<############", +"#########%3XXXXXX>- -%XXX%<%$###########", +"#########$############", +"##########+%XXXXXXXXXXXX%+<#############", +"##########%3XXX>=****3XX%<%#############", +"##########>+XXX**=3-*@3>3+##############", +"###########<%XX >XX%X;%X3+##############", +"###########%3XX>XX++XXXX<%$#############", +"##########$>+XXXXXXXXXXX<###############", +"############<%XXXXXXXXX3+###############", +"###########$%+XXXXXXXX%<>###############", +"#############++XXXXXX%<%$###############", +"#############$%<<3333<%#################", +"#################%3>>$##################", +"#################$#$####################" +}; +/* XPM */ +static const char *slt_enc_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 13 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #5C7A7A", +"o c #D4D4D4", +"O c None", +"+ c #B0B0B0", +"@ c #909090", +"# c #788C8C", +"$ c #606060", +"% c #406868", +"& c #FFFFFF", +"* c #303030", +"= c #6C91B6", +/* pixels */ +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOoO+OOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOoOXX==OOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOoO=OO+==OOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOoXOO.*$=$OOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO=+# *.X *OOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO==.OO=+@ $OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOXO==.OO $OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOO+=@$@* @OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOO&&&&&&&X @OOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOo======X*OOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOoO======X**OOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOO&====X===% $OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOoo==%* %==%* OOOOOOOOOOOOOO", +"OOOOOOOOOOOOOoO=% % =X* @OOOOOOOOOOOOO", +"OOOOOOOOOOOOO&==**==% %=% $OOOOOOOOOOOOO", +"OOOOOOOOOOOOoo==%%==* %=X OOOOOOOOOOOOO", +"OOOOOOOOOOOOoO=====* X==X* @OOOOOOOOOOOO", +"OOOOOOOOOOOO&=====* %====% $OOOOOOOOOOOO", +"OOOOOOOOOOOoo==== X=====%* OOOOOOOOOOOO", +"OOOOOOOOOOOo+===* *%*%%==X* @OOOOOOOOOOO", +"OOOOOOOOOOO&==== %===% $OOOOOOOOOOO", +"OOOOOOOOOOO&==============% OOOOOOOOOOO", +"OOOOOOOOOOO==============X% @OOOOOOOOOO", +"OOOOOOOOOOO+%%%%%%%%%%%%%% $OOOOOOOOOO", +"OOOOOOOOOOOOO% $OOOOOOOOOO", +"OOOOOOOOOOOOO@ @OOOOOOOOOO", +"OOOOOOOOOOOOOO@$$$$$$$$$$$$$@OOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO" +}; +/* XPM */ +static const char *str_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 17 1", +/* colors */ +" c #000000", +". c #F8B090", +"X c #5C7A7A", +"o c #F87A24", +"O c #7C3400", +"+ c None", +"@ c #B0B0B0", +"# c #F89E6C", +"$ c #B64700", +"% c #909090", +"& c #606060", +"* c #CEAA90", +"= c #DADAB6", +"- c #303030", +"; c #F86800", +": c #FFB691", +"> c #F88C48", +/* pixels */ +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"++++++++++++++++++++++++++++++++++++++++", +"+++++++++++++++++++*>*>#++++++++++++++++", +"++++++++++++++++*#o>..*#o*++++++++++++++", +"+++++++++++++++o#.#>.....o++++++++++++++", +"+++++++++++++++;>;#.o.>..#$X++++++++++++", +"+++++++++++++++o#>.o.>:...o %++++++++++", +"++++++++++++++o##>>#o##>..#O -++++++++++", +"++++++++++++++>#.oo#>..>...O ++++++++++", +"++++++++++++++*o##.>>;o#...o ++++++++++", +"+++++++++++++++*;o#........>- &+++++++++", +"+++++++++++++++++#>>;o......O -+++++++++", +"+++++++++++++++++@+@+o>.....$ +++++++++", +"+++++++++++++++++++++*;.#...>- %++++++++", +"++++++++++++++++++++++;>o....$ &++++++++", +"++++++++++++++++++++++#>>....>- %+++++++", +"+++++++++++++++++++++++;#>....; -+++++++", +"+++++++++++++++++++++++o#>....>O %++++++", +"+++++++++++++++++++++++*>o.....; -++++++", +"+++++++++++++#>**+++++++;#.....>O %+++++", +"+o#+++++++*o;>>>>o#+++++o##.....; -+++++", +"+:#o*++++oo#..*..*>;*+++#>#.....>O %++++", +"+:=#o#+*;>.:==:....#;*++@o.......; &++++", +"+::..>;o#.=::::......o*++;.......>O ++++", +"+.....#o.:.=:.........o#+;........$ ++++", +"+......#o..:...........#o;>.......o &+++", +"+........#..............*>o......:o- +++", +"+..................#o>#...#o.......O +++", +"+...............>o>#.......#>......O &++", +"+..................................o -++", +"+..................................> ++", +"+..................................> ++", +"+.................................#$ &+", +"+................................>$ &+", +"+..#>$o>#..............#>;>>>oOOO- ++", +"+...#O OOOOO$>>>>>>>$OO %++", +"+...o -&&++++", +"+..#O -&&%++++++++++", +"++++++++++++++++++++++++++++++++++++++++" +}; +/* XPM */ +static const char *stunned_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 12 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #5C7A7A", +"o c #D4D4D4", +"O c None", +"+ c #B0B0B0", +"@ c #909090", +"# c #788C8C", +"$ c #606060", +"% c #406868", +"& c #303030", +"* c #6C91B6", +/* pixels */ +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOO&$OOOO@OOO@@OO@OOOOOOOOOOOOO", +"OOOOOOOOOOO@& $OO@&&$$@ O@$$OOOOOOOOOOOO", +"OOOOOOOOOOOO$$ @@@$ &&OOO@$OOOOOOOOOOOO", +"OOOOOOOOOOOOO@@&$$$$&O$OO$O &@O@OOOOOOOO", +"OOOOOO@@@@@@OO@$$O$&$@@OO& &&$O&OOOOOOO", +"OOOOOO&&&& & $ &&@$ &O@$& &&&$ & $OOOOOO", +"OOOOOO$&OO &&&$ $$ $& $$&$&&&OOOOOOO", +"OOOOOO@@O@$ &+ # &O$$ $$&O@OOOOO", +"OOOOOOOO@X%$ %& %% & && $$@@@@OOOO", +"OOOOOOO+$$@+ &%%%&%& & &@OOO&&OOO", +"OOOOOO.Xo%+ &&%%%%%&& & OO@$&&OOO", +"OOOOO++ $$&&$ && %&%%& &O@&$&OOOO", +"OOOOO####$ X&&& && &%& & &&OOOO", +"OOOO++#.+## $&# %& & & &$ OOOO", +"OOOO#+++.@&%&& &#&%& & $ @OOOOOO", +"OOOO##....#+$#@%#& $%$&@&$$% & X##$@OOOO", +"OOOO.+#+.+@#+#+$&$X#%&%.+& %&#++.$&OOOOO", +"OOOOO#+#+.+++#$$%&++&X+X#&#+&+&##+ &OOOO", +"OOOOO#..#OO#+@%#o##X.@..++.+$&+#+#& @OOO", +"OOOOO+#.#O+#+#O@++@$$##+##++###+.#& $OOO", +"OOOOOOXX+#+#+#o.@%&$++#+..##.#+### &OOO", +"OOOOOOOX#.#X+#+#+##&#+..+####%XX%% OOO", +"OOOOOOOO+%%X.#+#+#.++#+#+#+.X++*.% &OOO", +"OOOOOOOOO@& &##+#+.O####.+XX%%%%#% $OOO", +"OOOOOOOOOOO. %X.+.#+++XXX*.+++#X $OOO", +"OOOOOOOOOOOO@& %%X..#X%#.####%X& $OOO", +"OOOOOOOOOOOOOO@$ &XX%%%*.#X%###*& OOOO", +"OOOOOOOOOOOOOOOOOO+%%%*%%#.+.#*& @OOOO", +"OOOOOOOOOOOOOOOOOOO*%%%**X##X%& OOOOO", +"OOOOOOOOOOOOOOOOOOOOX%%%%X*X& @OOOOO", +"OOOOOOOOOOOOOOOOOOOOX%%%%X &@OOOOOO", +"OOOOOOOOOOOOOOOOOOOO*%%%X& &$$OOOOOOOO", +"OOOOOOOOOOOOOOOOOOOO+X%%* @OOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOX%%& OOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOO*%%% $OOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOO*%%% $OOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOO.X%& $OOOOOOOOOOOOO" +}; +/* XPM */ +static const char *wis_xpm[] = { +/* width height ncolors chars_per_pixel */ +"40 40 13 1", +/* colors */ +" c #000000", +". c #949E9E", +"X c #5C7A7A", +"o c None", +"O c #B0B0B0", +"+ c #909090", +"@ c #788C8C", +"# c #606060", +"$ c #406868", +"% c #FFFFFF", +"& c #303030", +"* c #6C91B6", +"= c #0000FF", +/* pixels */ +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooo+#& &#oooooooooooooooooooo", +"oooooooooooo+& #oooooooooooooooooo", +"ooooooooooo+ &====&& &ooooooooooooooooo", +"oooooooooo+ &==& ===%& +ooooooooooooooo", +"ooooooooo+&%=== ===%%o&&oooooooooooooo", +"oooooooo.&%%===& ===%o& #+ooooooooooo", +"oooo&###&&%%*=======$#&ooo#& #+oooooooo", +"ooooo###o+&X$=====& #oo##oooo+######oooo", +"oooooooooooo######@oo##ooooooooooooooooo", +"oooooooooooooOoOoOo##ooooooooooooooooooo", +"ooooooooooooooooo+#+ooo+&#oooooooooooooo", +"ooooooooooooooooooooooo#oooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo", +"oooooooooooooooooooooooooooooooooooooooo" +}; +/* clang-format on */ diff --git a/win/Qt3/qttableview.cpp b/win/Qt3/qt3tableview.cpp similarity index 99% rename from win/Qt3/qttableview.cpp rename to win/Qt3/qt3tableview.cpp index b53e8a415..8bbc78cd6 100644 --- a/win/Qt3/qttableview.cpp +++ b/win/Qt3/qt3tableview.cpp @@ -1,5 +1,5 @@ /********************************************************************** -** $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.4 $ $NHDT-Date: 1524684508 2018/04/25 19:28:28 $ +** $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ $NHDT-Date: 1575917720 2019/12/09 18:55:20 $ ** $Id: qttableview.cpp,v 1.2 2002/03/09 03:13:15 jwalz Exp $ ** ** Implementation of QtTableView class @@ -13,7 +13,7 @@ ** **********************************************************************/ -#include "qttableview.h" +#include "qt3tableview.h" #if QT_VERSION >= 300 #ifndef QT_NO_QTTABLEVIEW #include diff --git a/include/qttableview.h b/win/Qt3/qt3tableview.h similarity index 100% rename from include/qttableview.h rename to win/Qt3/qt3tableview.h From 1c30c437c392e96ccf3eadfbc21a23e9ebea1396 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 9 Dec 2019 15:02:30 -0800 Subject: [PATCH 465/529] 'make' => 'make all' In sys/unix/Makefile.{top,src}, move the 'all' target first so that it's the default if no target is specified. Recent lua handling unintentionally broke that for Makefile.top by putting 'lua_support' target in front of 'all'. --- sys/unix/Makefile.src | 8 +++++--- sys/unix/Makefile.top | 17 +++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 8e22fc003..eddc63a86 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -1,5 +1,5 @@ # NetHack Makefile. -# NetHack 3.6 Makefile.src $NHDT-Date: 1575917700 2019/12/09 18:55:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.86 $ +# NetHack 3.6 Makefile.src $NHDT-Date: 1575932543 2019/12/09 23:02:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.87 $ # Copyright (c) 2018 by Pasi Kallinen # NetHack may be freely redistributed. See license for details. @@ -527,6 +527,10 @@ HOBJ = $(FIRSTOBJ) allmain.o alloc.o apply.o artifact.o attrib.o ball.o \ $(REGEXOBJ) $(RANDOBJ) $(SYSOBJ) $(WINOBJ) $(HINTOBJ) version.o # the .o files from the HACKCSRC, SYSSRC, and WINSRC lists +# first target is also the default target for 'make' without any arguments +all: $(GAME) + @echo "" + $(GAME): $(SYSTEM) @echo "$(GAME) is up to date." @@ -582,8 +586,6 @@ DUMB.Setup: ../include/extern.h cp ../include/extern.DUMB ../include/extern.h @touch DUMB.Setup -all: $(GAME) - ../lib/lua/liblua.a ../include/nhlua.h: @( cd .. ; $(MAKE) lua_support ) diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 9d930aaa1..dc7c2bc0b 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -1,5 +1,5 @@ # NetHack Top-level Makefile. -# NetHack 3.6 Makefile.top $NHDT-Date: 1574825215 2019/11/27 03:26:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.43 $ +# NetHack 3.6 Makefile.top $NHDT-Date: 1575932543 2019/12/09 23:02:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.44 $ # Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland # NetHack may be freely redistributed. See license for details. @@ -94,6 +94,14 @@ DATNODLB = $(VARDATND) license symbols DATDLB = $(DATHELP) dungeon.lua tribute $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) DAT = $(DATNODLB) $(DATDLB) +# first target is also the default target for 'make' without any arguments +all: $(GAME) recover Guidebook $(VARDAT) spec_levs check-dlb + true; $(MOREALL) + @echo "Done." + +$(GAME): lua_support + ( cd src ; $(MAKE) $(GAME) ) + lua_support: lib/lua/liblua.a include/nhlua.h @true lib/lua-$(LUA_VERSION)/src/liblua.a: lib/lua-$(LUA_VERSION)/src/lua.h @@ -110,13 +118,6 @@ include/nhlua.h: lib/lua/liblua.a @echo '#include "../lib/lua-$(LUA_VERSION)/src/lauxlib.h"' >> $@ @echo '/*nhlua.h*/' >> $@ -$(GAME): lua_support - ( cd src ; $(MAKE) ) - -all: $(GAME) recover Guidebook $(VARDAT) spec_levs check-dlb - true; $(MOREALL) - @echo "Done." - # Note: many of the dependencies below are here to allow parallel make # to generate valid output From 7043e2134af145fef7b4d86d55aa1793f88e49b3 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 6 Dec 2019 21:29:12 +0200 Subject: [PATCH 466/529] Lua NetHack obj bindings --- include/extern.h | 8 + src/nhlobj.c | 356 ++++++++++++++++++++++++++++++++++++++ src/nhlua.c | 15 ++ sys/msdos/Makefile.GCC | 3 +- sys/msdos/Makefile2.cross | 2 +- sys/unix/Makefile.src | 4 +- sys/winnt/Makefile.gcc | 3 +- sys/winnt/Makefile.msc | 3 +- test/test_obj.lua | 41 +++++ test/testwish.lua | 47 +++++ 10 files changed, 476 insertions(+), 6 deletions(-) create mode 100644 src/nhlobj.c create mode 100644 test/test_obj.lua create mode 100644 test/testwish.lua diff --git a/include/extern.h b/include/extern.h index 02823455c..836784059 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1671,6 +1671,11 @@ E struct selectionvar *FDECL(l_selection_check, (lua_State *, int)); E int FDECL(l_selection_register, (lua_State *)); #endif +/* ### nhlobj.c ### */ +#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET) +E int FDECL(l_obj_register, (lua_State *)); +#endif + /* ### nhlua.c ### */ #if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET) @@ -1681,6 +1686,9 @@ E void FDECL(nhl_error, (lua_State *, const char *)) NORETURN; E void FDECL(lcheck_param_table, (lua_State *)); E schar FDECL(get_table_mapchr, (lua_State *, const char *)); E schar FDECL(get_table_mapchr_opt, (lua_State *, const char *, SCHAR_P)); +E void FDECL(nhl_add_table_entry_int, (lua_State *, const char *, int)); +E void FDECL(nhl_add_table_entry_char, (lua_State *, const char *, CHAR_P)); +E void FDECL(nhl_add_table_entry_str, (lua_State *, const char *, const char *)); E schar FDECL(splev_chr2typ, (CHAR_P)); E schar FDECL(check_mapchr, (const char *)); E int FDECL(get_table_int, (lua_State *, const char *)); diff --git a/src/nhlobj.c b/src/nhlobj.c new file mode 100644 index 000000000..68e64a8dc --- /dev/null +++ b/src/nhlobj.c @@ -0,0 +1,356 @@ +/* NetHack 3.7 nhlobj.c $NHDT-Date: 1574646948 2019/11/25 01:55:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $ */ +/* Copyright (c) 2019 by Pasi Kallinen */ +/* NetHack may be freely redistributed. See license for details. */ + +#include "hack.h" +#include "sp_lev.h" + +struct _lua_obj { + int state; /* UNUSED */ + struct obj *obj; +}; + +struct _lua_obj * +l_obj_check(L, index) +lua_State *L; +int index; +{ + struct _lua_obj *lo; + + luaL_checktype(L, index, LUA_TUSERDATA); + lo = (struct _lua_obj *)luaL_checkudata(L, index, "obj"); + if (!lo) + nhl_error(L, "Obj error"); + return lo; +} + +static int +l_obj_gc(L) +lua_State *L; +{ + struct _lua_obj *lo = l_obj_check(L, 1); + + if (lo && lo->obj) { + /* free-floating objects are deallocated */ + if (lo->obj->where == OBJ_FREE) { + if (Has_contents(lo->obj)) { + struct obj *otmp; + while ((otmp = lo->obj->cobj) != 0) { + obj_extract_self(otmp); + dealloc_obj(otmp); + } + } + dealloc_obj(lo->obj); + } + lo->obj = NULL; + } + + return 0; +} + +static struct _lua_obj * +l_obj_push(L, otmp) +lua_State *L; +struct obj *otmp; +{ + struct _lua_obj *lo = (struct _lua_obj *)lua_newuserdata(L, sizeof(struct _lua_obj)); + luaL_getmetatable(L, "obj"); + lua_setmetatable(L, -2); + + lo->state = 0; + lo->obj = otmp; + + return lo; +} + +/* local o = obj.new("large chest"); + local cobj = o:contents(); */ +static int +l_obj_getcontents(L) +lua_State *L; +{ + struct _lua_obj *lo = l_obj_check(L, 1); + struct obj *obj = lo->obj; + + if (!obj) + nhl_error(L, "l_obj_getcontents: no obj"); + if (!obj->cobj) + nhl_error(L, "l_obj_getcontents: no cobj"); + + (void) l_obj_push(L, obj->cobj); + return 1; +} + +/* local box = obj.new("large chest"); + box.addcontent(obj.new("rock")); +*/ +static int +l_obj_add_to_container(L) +lua_State *L; +{ + struct _lua_obj *lobox = l_obj_check(L, 1); + struct _lua_obj *lo = l_obj_check(L, 2); + struct obj *otmp; + + if (!lo->obj || !lobox->obj) + nhl_error(L, "l_obj_add_to_container: no obj"); + + if (!Is_container(lobox->obj)) + nhl_error(L, "l_obj_add_to_container: not a container"); + + otmp = add_to_container(lobox->obj, lo->obj); + + /* was lo->obj merged? FIXME: causes problems if both lo->obj and + the one it merged with are handled by lua. Use lo->state? */ + if (otmp != lo->obj) + lo->obj = otmp; + + return 0; +} + +/* Create a lua table representation of the object, unpacking all the object fields. + local o = obj.new("rock"); + local otbl = o:totable(); */ +static int +l_obj_to_table(L) +lua_State *L; +{ + struct _lua_obj *lo = l_obj_check(L, 1); + struct obj *obj = lo->obj; + char buf[BUFSZ]; + + lua_newtable(L); + + if (!obj) { + nhl_add_table_entry_int(L, "NO_OBJ", 1); + return 1; + } + + nhl_add_table_entry_int(L, "has_contents", Has_contents(obj)); + nhl_add_table_entry_int(L, "is_container", Is_container(obj)); + nhl_add_table_entry_int(L, "o_id", obj->o_id); + nhl_add_table_entry_int(L, "ox", obj->ox); + nhl_add_table_entry_int(L, "oy", obj->oy); + nhl_add_table_entry_int(L, "otyp", obj->otyp); + if (OBJ_NAME(objects[obj->otyp])) + nhl_add_table_entry_str(L, "otyp_name", OBJ_NAME(objects[obj->otyp])); + if (OBJ_DESCR(objects[obj->otyp])) + nhl_add_table_entry_str(L, "otyp_descr", OBJ_DESCR(objects[obj->otyp])); + nhl_add_table_entry_int(L, "owt", obj->owt); + nhl_add_table_entry_int(L, "quan", obj->quan); + nhl_add_table_entry_int(L, "spe", obj->spe); + nhl_add_table_entry_char(L, "oclass", def_oc_syms[obj->oclass].sym); + nhl_add_table_entry_char(L, "invlet", obj->invlet); + /* TODO: nhl_add_table_entry_char(L, "oartifact", obj->oartifact);*/ + nhl_add_table_entry_int(L, "where", obj->where); + /* TODO: nhl_add_table_entry_int(L, "timed", obj->timed); */ + nhl_add_table_entry_int(L, "cursed", obj->cursed); + nhl_add_table_entry_int(L, "blessed", obj->blessed); + nhl_add_table_entry_int(L, "unpaid", obj->unpaid); + nhl_add_table_entry_int(L, "no_charge", obj->no_charge); + nhl_add_table_entry_int(L, "known", obj->known); + nhl_add_table_entry_int(L, "dknown", obj->dknown); + nhl_add_table_entry_int(L, "bknown", obj->bknown); + nhl_add_table_entry_int(L, "rknown", obj->rknown); + if (obj->oclass == POTION_CLASS) + nhl_add_table_entry_int(L, "odiluted", obj->odiluted); + else + nhl_add_table_entry_int(L, "oeroded", obj->oeroded); + nhl_add_table_entry_int(L, "oeroded2", obj->oeroded2); + /* TODO: orotten, norevive */ + nhl_add_table_entry_int(L, "oerodeproof", obj->oerodeproof); + nhl_add_table_entry_int(L, "olocked", obj->olocked); + nhl_add_table_entry_int(L, "obroken", obj->obroken); + if (is_poisonable(obj)) + nhl_add_table_entry_int(L, "opoisoned", obj->opoisoned); + else + nhl_add_table_entry_int(L, "otrapped", obj->otrapped); + /* TODO: degraded_horn */ + nhl_add_table_entry_int(L, "recharged", obj->recharged); + /* TODO: on_ice */ + nhl_add_table_entry_int(L, "lamplit", obj->lamplit); + nhl_add_table_entry_int(L, "globby", obj->globby); + nhl_add_table_entry_int(L, "greased", obj->greased); + nhl_add_table_entry_int(L, "nomerge", obj->nomerge); + nhl_add_table_entry_int(L, "was_thrown", obj->was_thrown); + nhl_add_table_entry_int(L, "in_use", obj->in_use); + nhl_add_table_entry_int(L, "bypass", obj->bypass); + nhl_add_table_entry_int(L, "cknown", obj->cknown); + nhl_add_table_entry_int(L, "lknown", obj->lknown); + nhl_add_table_entry_int(L, "corpsenm", obj->corpsenm); + if (obj->corpsenm != NON_PM && (obj->otyp == TIN || obj->otyp == CORPSE || obj->otyp == EGG || obj->otyp == FIGURINE || obj->otyp == STATUE)) + nhl_add_table_entry_str(L, "corpsenm_name", mons[obj->corpsenm].mname); + /* TODO: leashmon, fromsink, novelidx, record_achieve_special */ + nhl_add_table_entry_int(L, "usecount", obj->usecount); + /* TODO: spestudied */ + nhl_add_table_entry_int(L, "oeaten", obj->oeaten); + nhl_add_table_entry_int(L, "age", obj->age); + nhl_add_table_entry_int(L, "owornmask", obj->owornmask); + /* TODO: more of oextra */ + nhl_add_table_entry_int(L, "has_oname", has_oname(obj)); + if (has_oname(obj)) + nhl_add_table_entry_str(L, "oname", ONAME(obj)); + + return 1; +} + +/* create a new object via wishing routine */ +/* local o = obj.new("rock"); */ +static int +l_obj_new_readobjnam(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 1) { + char buf[BUFSZ]; + struct obj *otmp; + Sprintf(buf, "%s", luaL_checkstring(L, 1)); + lua_pop(L, 1); + otmp = readobjnam(buf, NULL); + (void) l_obj_push(L, otmp); + return 1; + } else + nhl_error(L, "l_obj_new_readobjname: Wrong args"); + return 0; +} + +/* Get the topmost object on the map at x,y */ +/* local o = obj.at(x, y); */ +static int +l_obj_at(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 2) { + int x, y; + x = luaL_checkinteger(L, 1); + y = luaL_checkinteger(L, 2); + lua_pop(L, 2); + (void) l_obj_push(L, g.level.objects[x][y]); + return 1; + } else + nhl_error(L, "l_obj_at: Wrong args"); + return 0; +} + +/* Place an object on the map at (x,y). + local o = obj.new("rock"); + o:placeobj(u.ux, u.uy); */ +static int +l_obj_placeobj(L) +lua_State *L; +{ + int argc = lua_gettop(L); + struct _lua_obj *lo = l_obj_check(L, 1); + + if (argc != 3) + nhl_error(L, "l_obj_placeobj: Wrong args"); + + if (lo && lo->obj) { + int x, y; + x = luaL_checkinteger(L, 2); + y = luaL_checkinteger(L, 3); + lua_pop(L, 3); + + place_object(lo->obj, x, y); + } else + nhl_error(L, "l_obj_placeobj: Wrong args"); + + return 0; +} + +/* Get the next object in the object chain */ +/* local o = obj.at(x, y); + local o2 = o:next(); +*/ +static int +l_obj_nextobj(L) +lua_State *L; +{ + struct _lua_obj *lo = l_obj_check(L, 1); + + if (lo && lo->obj) + (void) l_obj_push(L, lo->obj->where == OBJ_FLOOR ? lo->obj->nexthere : lo->obj->nobj); + return 1; +} + +/* Get the container object is in */ +/* local box = o:container(); */ +static int +l_obj_container(L) +lua_State *L; +{ + struct _lua_obj *lo = l_obj_check(L, 1); + + if (lo && lo->obj && lo->obj->where == OBJ_CONTAINED) { + (void) l_obj_push(L, lo->obj->ocontainer); + return 1; + } + (void) l_obj_push(L, NULL); + return 1; +} + +/* Is the object a null? */ +/* local badobj = o:isnull(); */ +static int +l_obj_isnull(L) +lua_State *L; +{ + struct _lua_obj *lo = l_obj_check(L, 1); + + lua_pushboolean(L, lo && lo->obj); + return 1; +} + + +static const struct luaL_Reg l_obj_methods[] = { + { "new", l_obj_new_readobjnam }, + { "isnull", l_obj_isnull }, + { "at", l_obj_at }, + { "next", l_obj_nextobj }, + { "totable", l_obj_to_table }, + { "placeobj", l_obj_placeobj }, + { "container", l_obj_container }, + { "contents", l_obj_getcontents }, + { "addcontent", l_obj_add_to_container }, + { NULL, NULL } +}; + +static const luaL_Reg l_obj_meta[] = { + { "__gc", l_obj_gc }, + { NULL, NULL } +}; + +int +l_obj_register(L) +lua_State *L; +{ + int lib_id, meta_id; + + /* newclass = {} */ + lua_createtable(L, 0, 0); + lib_id = lua_gettop(L); + + /* metatable = {} */ + luaL_newmetatable(L, "obj"); + meta_id = lua_gettop(L); + luaL_setfuncs(L, l_obj_meta, 0); + + /* metatable.__index = _methods */ + luaL_newlib(L, l_obj_methods); + lua_setfield(L, meta_id, "__index"); + + /* metatable.__metatable = _meta */ + luaL_newlib(L, l_obj_meta); + lua_setfield(L, meta_id, "__metatable"); + + /* class.__metatable = metatable */ + lua_setmetatable(L, lib_id); + + /* _G["obj"] = newclass */ + lua_setglobal(L, "obj"); + + return 0; +} diff --git a/src/nhlua.c b/src/nhlua.c index eaa8e9758..d5dba8465 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -114,6 +114,19 @@ int value; lua_rawset(L, -3); } +void +nhl_add_table_entry_char(L, name, value) +lua_State *L; +const char *name; +char value; +{ + char buf[2]; + Sprintf(buf, "%c", value); + lua_pushstring(L, name); + lua_pushstring(L, buf); + lua_rawset(L, -3); +} + void nhl_add_table_entry_str(L, name, value) lua_State *L; @@ -874,6 +887,8 @@ nhl_init() l_selection_register(L); l_register_des(L); + l_obj_register(L); + if (!nhl_loadlua(L, "nhlib.lua")) { lua_close(L); return (lua_State *) 0; diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index 253f05490..fa40661c3 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -316,7 +316,7 @@ SOBJ = $(O)msdos.o $(O)pcsys.o $(O)tty.o $(O)unix.o \ VVOBJ = $(O)version.o ifeq "$(ADD_LUA)" "Y" -LUAOBJ = $(O)nhlua.o $(O)nhlsel.o +LUAOBJ = $(O)nhlua.o $(O)nhlsel.o $(O)nhlobj.o LUA_QTEXT_FILE = "quest.lua" endif @@ -1454,6 +1454,7 @@ $(O)muse.o: muse.c $(HACK_H) $(O)music.o: music.c $(HACK_H) #interp.c $(O)nhlua.o: nhlua.c $(HACK_H) $(O)nhlsel.o: nhlsel.c $(HACK_H) +$(O)nhlobj.o: nhlobj.c $(HACK_H) $(O)o_init.o: o_init.c $(HACK_H) $(INCL)/lev.h $(O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 530cefe42..6b0b79632 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -320,7 +320,7 @@ VVOBJ = $(O)version.o MDLIB = $(O)mdlib.o ifeq "$(ADD_LUA)" "Y" -LUAOBJ = $(O)nhlua.o $(O)nhlsel.o +LUAOBJ = $(O)nhlua.o $(O)nhlsel.o $(O)nhlobj.o LUA_QTEXT_FILE = "quest.lua" endif diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index eddc63a86..ee4254ed9 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -449,7 +449,7 @@ HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c ball.c bones.c \ lock.c mail.c makemon.c mapglyph.c mcastu.c mdlib.c mhitm.c \ mhitu.c minion.c mklev.c mkmap.c mkmaze.c mkobj.c mkroom.c mon.c \ mondata.c monmove.c monst.c mplayer.c mthrowu.c muse.c music.c \ - nhlua.c nhlsel.c o_init.c objects.c objnam.c \ + nhlua.c nhlsel.c nhlobj.c o_init.c objects.c objnam.c \ options.c pager.c pickup.c pline.c polyself.c potion.c pray.c \ priest.c quest.c questpgr.c read.c rect.c region.c restore.c \ rip.c rnd.c role.c rumors.c save.c sfstruct.c \ @@ -516,7 +516,7 @@ HOBJ = $(FIRSTOBJ) allmain.o alloc.o apply.o artifact.o attrib.o ball.o \ light.o lock.o mail.o makemon.o mapglyph.o mcastu.o mdlib.o mhitm.o \ mhitu.o minion.o mklev.o mkmap.o mkmaze.o mkobj.o mkroom.o mon.o \ mondata.o monmove.o mplayer.o mthrowu.o muse.o music.o \ - nhlua.o nhlsel.o o_init.o objnam.o options.o \ + nhlua.o nhlsel.o nhlobj.o o_init.o objnam.o options.o \ pager.o pickup.o pline.o polyself.o potion.o pray.o priest.o \ quest.o questpgr.o read.o rect.o region.o restore.o rip.o rnd.o \ role.o rumors.o save.o sfstruct.o \ diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 9b292d737..5ba9ef68a 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -327,7 +327,7 @@ VOBJ28 = $(O)sfstruct.o #VOBJ31 = $(O)win10.o ifeq "$(ADD_LUA)" "Y" -LUAOBJ = $(O)nhlua.o $(O)nhlsel.o +LUAOBJ = $(O)nhlua.o $(O)nhlsel.o $(O)nhlobj.o LUA_QTEXT_FILE = "quest.lua" endif @@ -1593,6 +1593,7 @@ $(O)muse.o: muse.c $(HACK_H) $(O)music.o: music.c $(HACK_H) #interp.c $(O)nhlua.o: nhlua.c $(HACK_H) $(O)nhlsel.o: nhlsel.c $(HACK_H) +$(O)nhlobj.o: nhlobj.c $(HACK_H) $(O)o_init.o: o_init.c $(HACK_H) $(INCL)/lev.h $(O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 08aa27ff5..aff743a53 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -327,7 +327,7 @@ VOBJ26 = $(O)were.o $(O)wield.o $(O)windows.o $(O)wizard.o VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o VOBJ28 = $(O)sfstruct.o -LUAOBJ = $(O)nhlua.o $(O)nhlsel.o +LUAOBJ = $(O)nhlua.o $(O)nhlsel.o $(O)nhlobj.o LUA_QTEXT_FILE = "quest.lua" !IFDEF CROSSCOMPILE_HOST @@ -1882,6 +1882,7 @@ $(O)muse.o: muse.c $(HACK_H) $(O)music.o: music.c $(HACK_H) #interp.c $(O)nhlua.o: nhlua.c $(HACK_H) $(O)nhlsel.o: nhlsel.c $(HACK_H) +$(O)nhlobj.o: nhlobj.c $(HACK_H) $(O)o_init.o: o_init.c $(HACK_H) $(INCL)\lev.h $(O)objnam.o: objnam.c $(HACK_H) $(O)options.o: options.c $(CONFIG_H) $(INCL)\objclass.h $(INCL)\flag.h \ diff --git a/test/test_obj.lua b/test/test_obj.lua new file mode 100644 index 000000000..7bda9bf0c --- /dev/null +++ b/test/test_obj.lua @@ -0,0 +1,41 @@ + +local o = obj.new("rock"); +o:placeobj(u.ux, u.uy); + +local o2 = obj.at(u.ux, u.uy); +local o2tbl = o2:totable(); +if (o2tbl.otyp_name ~= "rock") then + error("no rock under you"); +end + + +local box = obj.new("empty large box"); +local boxtbl = box:totable(); +if (boxtbl.has_contents ~= 0) then + error("empty box has contents"); +end + +box:addcontent(obj.new("diamond")); +boxtbl = box:totable(); +if (boxtbl.has_contents ~= 1) then + error("box has no contents"); +end + +local diamond = box:contents():totable(); +if (diamond.otyp_name ~= "diamond") then + error("box contents is not a diamond"); +end + +box:placeobj(u.ux, u.uy); + +local o3 = obj.at(u.ux, u.uy); +local o3tbl = o3:totable(); +if (o3tbl.otyp_name ~= "large box") then + error("no large box under you"); +end + +local o4 = o3:next(); +local o4tbl = o4:totable(); +if (o4tbl.otyp_name ~= "rock") then + error("no rock under the large box"); +end diff --git a/test/testwish.lua b/test/testwish.lua new file mode 100644 index 000000000..eb7d40b2a --- /dev/null +++ b/test/testwish.lua @@ -0,0 +1,47 @@ + +local wishtest_objects = { + ["a rock"] = { otyp_name = "rock", quan = 1, oclass = "*" }, + ["5 +3 blessed silver daggers"] = { otyp_name = "silver dagger", blessed = 1, cursed = 0, spe = 3, quan = 5 }, + ["an empty locked large box"] = { otyp_name = "large box", is_container = 1, has_contents = 0, olocked = 1 }, + ["potion of holy water"] = { otyp_name = "water", oclass = "!", blessed = 1, cursed = 0 }, + ["potion of unholy water"] = { otyp_name = "water", oclass = "!", blessed = 0, cursed = 1 }, + ["cursed greased +2 grey dragon scale mail"] = { otyp_name = "gray dragon scale mail", oclass = "[", blessed = 0, cursed = 1, spe = 2, greased = 1 }, + ["uncursed magic marker (11)"] = { otyp_name = "magic marker", blessed = 0, cursed = 0, spe = 11 }, + ["lit oil lamp"] = { otyp_name = "oil lamp", lamplit = 1 }, + ["unlit oil lamp"] = { otyp_name = "oil lamp", lamplit = 0 }, + ["2 blank scrolls"] = { otyp_name = "blank paper", quan = 2 }, + ["3 rusty poisoned darts"] = { otyp_name = "dart", quan = 3, opoisoned = 1, oeroded = 1 }, + ["broken empty chest"] = { otyp_name = "chest", obroken = 1 }, + ["4 diluted dark green potions named whisky"] = { otyp_descr = "dark green", oclass = "!", quan = 4, odiluted = 1, has_oname = 1, oname = "whisky" }, + ["poisoned food ration"] = { otyp_name = "food ration", oclass = "%", age = 1 }, + ["empty tin"] = { otyp_name = "tin", oclass = "%", corpsenm = -1, spe = 0 }, + ["blessed tin of spinach"] = { otyp_name = "tin", oclass = "%", corpsenm = -1, spe = 1, blessed = 1 }, + ["trapped tin of floating eye meat"] = { otyp_name = "tin", oclass = "%", otrapped = 1, corpsenm_name = "floating eye" }, + ["hill orc corpse"] = { otyp_name = "corpse", oclass = "%", corpsenm_name = "hill orc" }, + ["destroy armor"] = { otyp_name = "destroy armor", oclass = "?" }, + ["enchant weapon"] = { otyp_name = "enchant weapon", oclass = "?" }, + ["scroll of food detection"] = { otyp_name = "food detection", oclass = "?" }, + ["scroll of detect food"] = { otyp_name = "food detection", oclass = "?" }, + ["spellbook of food detection"] = { otyp_name = "detect food", oclass = "+" }, + ["spell"] = { NO_OBJ = 1 }, + ["-1 ring mail"] = { otyp_name = "ring mail", oclass = "[", spe = -1 }, + ["studded leather armor"] = { otyp_name = "studded leather armor", oclass = "[" }, + ["leather armor"] = { otyp_name = "leather armor", oclass = "[" }, + ["tooled horn"] = { otyp_name = "tooled horn", oclass = "(" }, + ["meat ring"] = { otyp_name = "meat ring", oclass = "%" }, + ["beartrap"] = { otyp_name = "beartrap", oclass = "(" }, + ["bear trap"] = { otyp_name = "beartrap", oclass = "(" }, + ["landmine"] = { otyp_name = "land mine", oclass = "(" }, + ["land mine"] = { otyp_name = "land mine", oclass = "(" }, + -- ["partly eaten orange"] = { otyp_descr = "orange", oclass = "%", oeaten = ... }, +}; + + +for str, tbl in pairs(wishtest_objects) do + local o = obj.new(str):totable(); + for field, value in pairs(tbl) do + if (o[field] ~= value) then + error("wished " .. str .. ", but " .. field .. " is " .. o[field] .. ", not " .. value); + end + end +end From 8a570295035d32465af8228e06adbd9bf706c106 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 11 Dec 2019 12:35:45 -0800 Subject: [PATCH 467/529] spelling and typo fixes Submitted for 3.7.0; all but one also apply to 3.6.3. I rewrote the curses terminal-too-small message instead of just fixing the spelling of "minumum". --- doc/fixes36.4 | 1 + src/bones.c | 2 +- src/hack.c | 2 +- src/options.c | 2 +- src/potion.c | 2 +- src/shk.c | 2 +- src/timeout.c | 4 ++-- src/trap.c | 4 ++-- win/curses/cursmain.c | 7 +++++-- win/curses/curswins.c | 2 +- win/tty/topl.c | 2 +- win/tty/wintty.c | 2 +- 12 files changed, 18 insertions(+), 14 deletions(-) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index e841af4f6..5865224cc 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -10,6 +10,7 @@ GDBPATH and GREPPATH from sysconf or -D... on compilation command line were being processed even if PANICTRACE was disabled but only being freed at end of game when that was enabled fix the article used in the message when your steed encounters a polymorph trap +dozen-ish assorted spelling/typo fixes in messages and source comments Fixes to Post-3.6.3 Problems that Were Exposed Via git Repository diff --git a/src/bones.c b/src/bones.c index d5623fcde..da0de0f41 100644 --- a/src/bones.c +++ b/src/bones.c @@ -598,7 +598,7 @@ getbones() if (validate(fd, bones) != 0) { if (!wizard) - pline("Discarding unuseable bones; no need to panic..."); + pline("Discarding unusable bones; no need to panic..."); ok = FALSE; } else { ok = TRUE; diff --git a/src/hack.c b/src/hack.c index dca467262..a48b92cf5 100644 --- a/src/hack.c +++ b/src/hack.c @@ -2840,7 +2840,7 @@ int x, y; if (!IS_DOOR(lev_p->typ)) return FALSE; /* all rogue level doors are doorless but disallow diagonal access, so - we treat them as if their non-existant doors were actually present */ + we treat them as if their non-existent doors were actually present */ if (Is_rogue_level(&u.uz)) return FALSE; return !(lev_p->doormask & ~(D_NODOOR | D_BROKEN)); diff --git a/src/options.c b/src/options.c index 19f189813..c06be7605 100644 --- a/src/options.c +++ b/src/options.c @@ -395,7 +395,7 @@ static struct Comp_Opt { }, { "statuslines", #ifdef CURSES_GRAPHICS - "2 or 3 lines for horizonal (bottom or top) status display", + "2 or 3 lines for horizontal (bottom or top) status display", 20, SET_IN_GAME #else "2 or 3 lines for status display", diff --git a/src/potion.c b/src/potion.c index 16b2c5dda..c6dffc5f9 100644 --- a/src/potion.c +++ b/src/potion.c @@ -2260,7 +2260,7 @@ dodip() more_than_one ? " that you dipped into" : "", newbuf); else - pline("Somehing happens."); + pline("Something happens."); if (old_dknown && !objects[old_otyp].oc_name_known diff --git a/src/shk.c b/src/shk.c index 815c2e726..6772da453 100644 --- a/src/shk.c +++ b/src/shk.c @@ -4396,7 +4396,7 @@ const char *Izchak_speaks[] = { "%s says: 'These shopping malls give me a headache.'", "%s says: 'Slow down. Think clearly.'", "%s says: 'You need to take things one at a time.'", - "%s says: 'I don't like poofy coffee... give me Columbian Supremo.'", + "%s says: 'I don't like poofy coffee... give me Colombian Supremo.'", "%s says that getting the devteam's agreement on anything is difficult.", "%s says that he has noticed those who serve their deity will prosper.", "%s says: 'Don't try to steal from me - I have friends in high places!'", diff --git a/src/timeout.c b/src/timeout.c index e3125d8a5..f9df132db 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -93,7 +93,7 @@ const struct propname { { UNCHANGING, "unchanging" }, { REFLECTING, "reflecting" }, { FREE_ACTION, "free action" }, - { FIXED_ABIL, "fixed abilites" }, + { FIXED_ABIL, "fixed abilities" }, { LIFESAVED, "life will be saved" }, { 0, 0 }, }; @@ -1398,7 +1398,7 @@ long timeout; break; /* case [otyp ==] candelabrum|tallow_candle|wax_candle */ default: - impossible("burn_object: unexpeced obj %s", xname(obj)); + impossible("burn_object: unexpected obj %s", xname(obj)); break; } if (need_newsym) diff --git a/src/trap.c b/src/trap.c index d1014fafc..51436d47a 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1591,7 +1591,7 @@ struct obj *otmp; switch (tt) { case ARROW_TRAP: if (!otmp) { - impossible("steed hit by non-existant arrow?"); + impossible("steed hit by non-existent arrow?"); return 0; } trapkilled = thitm(8, steed, otmp, 0, FALSE); @@ -1599,7 +1599,7 @@ struct obj *otmp; break; case DART_TRAP: if (!otmp) { - impossible("steed hit by non-existant dart?"); + impossible("steed hit by non-existent dart?"); return 0; } trapkilled = thitm(7, steed, otmp, 0, FALSE); diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index e56f0e3ab..1328a4828 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -211,8 +211,11 @@ curses_init_nhwindows(int *argcp UNUSED, getmaxyx(base_term, term_rows, term_cols); counting = FALSE; curses_init_options(); - if ((term_rows < 15) || (term_cols < 40)) { - panic("Terminal too small. Must be minumum 40 width and 15 height"); + if (term_rows < 15 || term_cols < 40) { + panic("Terminal is too small; must have at least %s%s%s.", + (term_rows < 15) ? "15 rows" : "", + (term_rows < 15 && term_cols < 40) ? " and " : "", + (term_cols < 40) ? "40 columns" : ""); } /* during line input, deletes the most recently typed character */ erase_char = erasechar(); /* / or possibly */ diff --git a/win/curses/curswins.c b/win/curses/curswins.c index 81d8ab435..bd2f505e8 100644 --- a/win/curses/curswins.c +++ b/win/curses/curswins.c @@ -504,7 +504,7 @@ curses_puts(winid wid, int attr, const char *text) if (curses_is_menu(wid) || curses_is_text(wid)) { if (!curses_menu_exists(wid)) { impossible( - "curses_puts: Attempted write to nonexistant window %d!", + "curses_puts: Attempted write to nonexistent window %d!", wid); return; } diff --git a/win/tty/topl.c b/win/tty/topl.c index 62fb3eb53..7156bdbce 100644 --- a/win/tty/topl.c +++ b/win/tty/topl.c @@ -302,7 +302,7 @@ char c; register struct WinDesc *cw = wins[WIN_MESSAGE]; if (cw == (struct WinDesc *) 0) - panic("Putsym window MESSAGE nonexistant"); + panic("Putsym window MESSAGE nonexistent"); switch (c) { case '\b': diff --git a/win/tty/wintty.c b/win/tty/wintty.c index dd1e34009..ea02b631e 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1057,7 +1057,7 @@ reset_role_filtering() add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, "", MENU_UNSELECTED); add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, - "Uncceptable alignments", MENU_UNSELECTED); + "Unacceptable alignments", MENU_UNSELECTED); setup_algnmenu(win, FALSE, ROLE_NONE, ROLE_NONE, ROLE_NONE); end_menu(win, "Pick all that apply"); From f0559065ff97f0f94d6a0f1ff17fe1b9d725dfa8 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 11 Dec 2019 12:43:32 -0800 Subject: [PATCH 468/529] set_savefile_name typo fix The one typo or spelling fix submitted for to-be-3.7.0 that didn't also apply to 3.6.3. --- src/files.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/files.c b/src/files.c index 429195480..d7d1b4e7c 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 files.c $NHDT-Date: 1574116097 2019/11/18 22:28:17 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.272 $ */ +/* NetHack 3.6 files.c $NHDT-Date: 1576096997 2019/12/11 20:43:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.301 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1048,8 +1048,8 @@ boolean regularize_it; } #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) if (overflow) - impossible("set_savefile_name() couldn't complete without overlow %d", - overflow); + impossible("set_savefile_name() couldn't complete without overflow %d", + overflow); #endif } From a28b8e85a2fb8b8e3392c5945444512915cd0f4c Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 11 Dec 2019 12:48:31 -0800 Subject: [PATCH 469/529] fix a couple of nhlobj.c warnings unused: 'buf[]' plain char subscript: [obj->oclass] --- src/nhlobj.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/nhlobj.c b/src/nhlobj.c index 68e64a8dc..54cfa7a18 100644 --- a/src/nhlobj.c +++ b/src/nhlobj.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 nhlobj.c $NHDT-Date: 1574646948 2019/11/25 01:55:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $ */ +/* NetHack 3.7 nhlobj.c $NHDT-Date: 1576097301 2019/12/11 20:48:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ */ /* Copyright (c) 2019 by Pasi Kallinen */ /* NetHack may be freely redistributed. See license for details. */ @@ -108,7 +108,8 @@ lua_State *L; return 0; } -/* Create a lua table representation of the object, unpacking all the object fields. +/* Create a lua table representation of the object, unpacking all the + object fields. local o = obj.new("rock"); local otbl = o:totable(); */ static int @@ -117,7 +118,6 @@ lua_State *L; { struct _lua_obj *lo = l_obj_check(L, 1); struct obj *obj = lo->obj; - char buf[BUFSZ]; lua_newtable(L); @@ -135,11 +135,13 @@ lua_State *L; if (OBJ_NAME(objects[obj->otyp])) nhl_add_table_entry_str(L, "otyp_name", OBJ_NAME(objects[obj->otyp])); if (OBJ_DESCR(objects[obj->otyp])) - nhl_add_table_entry_str(L, "otyp_descr", OBJ_DESCR(objects[obj->otyp])); + nhl_add_table_entry_str(L, "otyp_descr", + OBJ_DESCR(objects[obj->otyp])); nhl_add_table_entry_int(L, "owt", obj->owt); nhl_add_table_entry_int(L, "quan", obj->quan); nhl_add_table_entry_int(L, "spe", obj->spe); - nhl_add_table_entry_char(L, "oclass", def_oc_syms[obj->oclass].sym); + nhl_add_table_entry_char(L, "oclass", + def_oc_syms[(uchar) obj->oclass].sym); nhl_add_table_entry_char(L, "invlet", obj->invlet); /* TODO: nhl_add_table_entry_char(L, "oartifact", obj->oartifact);*/ nhl_add_table_entry_int(L, "where", obj->where); @@ -178,7 +180,9 @@ lua_State *L; nhl_add_table_entry_int(L, "cknown", obj->cknown); nhl_add_table_entry_int(L, "lknown", obj->lknown); nhl_add_table_entry_int(L, "corpsenm", obj->corpsenm); - if (obj->corpsenm != NON_PM && (obj->otyp == TIN || obj->otyp == CORPSE || obj->otyp == EGG || obj->otyp == FIGURINE || obj->otyp == STATUE)) + if (obj->corpsenm != NON_PM + && (obj->otyp == TIN || obj->otyp == CORPSE || obj->otyp == EGG + || obj->otyp == FIGURINE || obj->otyp == STATUE)) nhl_add_table_entry_str(L, "corpsenm_name", mons[obj->corpsenm].mname); /* TODO: leashmon, fromsink, novelidx, record_achieve_special */ nhl_add_table_entry_int(L, "usecount", obj->usecount); From 027024d27f3a3f74d61157824aa6ce1ad4d19925 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 12 Dec 2019 07:58:06 +0200 Subject: [PATCH 470/529] More wish parser tests --- src/nhlobj.c | 7 +++++++ test/testwish.lua | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/nhlobj.c b/src/nhlobj.c index 54cfa7a18..eed6c1b77 100644 --- a/src/nhlobj.c +++ b/src/nhlobj.c @@ -140,6 +140,13 @@ lua_State *L; nhl_add_table_entry_int(L, "owt", obj->owt); nhl_add_table_entry_int(L, "quan", obj->quan); nhl_add_table_entry_int(L, "spe", obj->spe); + + if (obj->otyp == STATUE) { + nhl_add_table_entry_int(L, "historic", (obj->spe & STATUE_HISTORIC)); + nhl_add_table_entry_int(L, "statue_male", (obj->spe & STATUE_MALE)); + nhl_add_table_entry_int(L, "statue_female", (obj->spe & STATUE_FEMALE)); + } + nhl_add_table_entry_char(L, "oclass", def_oc_syms[(uchar) obj->oclass].sym); nhl_add_table_entry_char(L, "invlet", obj->invlet); diff --git a/test/testwish.lua b/test/testwish.lua index eb7d40b2a..b63bb760b 100644 --- a/test/testwish.lua +++ b/test/testwish.lua @@ -3,15 +3,22 @@ local wishtest_objects = { ["a rock"] = { otyp_name = "rock", quan = 1, oclass = "*" }, ["5 +3 blessed silver daggers"] = { otyp_name = "silver dagger", blessed = 1, cursed = 0, spe = 3, quan = 5 }, ["an empty locked large box"] = { otyp_name = "large box", is_container = 1, has_contents = 0, olocked = 1 }, + ["an empty trapped unlocked chest"] = { otyp_name = "chest", is_container = 1, has_contents = 0, olocked = 0, otrapped = 1 }, + ["an empty untrapped locked chest"] = { otyp_name = "chest", is_container = 1, has_contents = 0, olocked = 1, otrapped = 0 }, + ["an empty locked broken chest"] = { otyp_name = "chest", is_container = 1, has_contents = 0, olocked = 0, obroken = 1 }, + ["broken empty chest"] = { otyp_name = "chest", obroken = 1 }, ["potion of holy water"] = { otyp_name = "water", oclass = "!", blessed = 1, cursed = 0 }, ["potion of unholy water"] = { otyp_name = "water", oclass = "!", blessed = 0, cursed = 1 }, ["cursed greased +2 grey dragon scale mail"] = { otyp_name = "gray dragon scale mail", oclass = "[", blessed = 0, cursed = 1, spe = 2, greased = 1 }, ["uncursed magic marker (11)"] = { otyp_name = "magic marker", blessed = 0, cursed = 0, spe = 11 }, ["lit oil lamp"] = { otyp_name = "oil lamp", lamplit = 1 }, + ["6 burning tallow candles"] = { otyp_name = "tallow candle", lamplit = 1, quan = 6 }, ["unlit oil lamp"] = { otyp_name = "oil lamp", lamplit = 0 }, + ["7 extinguished wax candles"] = { otyp_name = "wax candle", lamplit = 0, quan = 7 }, ["2 blank scrolls"] = { otyp_name = "blank paper", quan = 2 }, + ["3 unlabeled scrolls"] = { otyp_name = "blank paper", quan = 3 }, + ["1 unlabelled scroll"] = { otyp_name = "blank paper", quan = 1 }, ["3 rusty poisoned darts"] = { otyp_name = "dart", quan = 3, opoisoned = 1, oeroded = 1 }, - ["broken empty chest"] = { otyp_name = "chest", obroken = 1 }, ["4 diluted dark green potions named whisky"] = { otyp_descr = "dark green", oclass = "!", quan = 4, odiluted = 1, has_oname = 1, oname = "whisky" }, ["poisoned food ration"] = { otyp_name = "food ration", oclass = "%", age = 1 }, ["empty tin"] = { otyp_name = "tin", oclass = "%", corpsenm = -1, spe = 0 }, @@ -33,6 +40,8 @@ local wishtest_objects = { ["bear trap"] = { otyp_name = "beartrap", oclass = "(" }, ["landmine"] = { otyp_name = "land mine", oclass = "(" }, ["land mine"] = { otyp_name = "land mine", oclass = "(" }, + ["blessed historic statue of woodland-elf named Foo"] = { otyp_name = "statue", blessed = 1, historic = 1, corpsenm_name = "Woodland-elf", oname = "Foo" }, + ["blessed figurine of a ki-rin"] = { otyp_name = "figurine", blessed = 1, corpsenm_name = "ki-rin" }, -- ["partly eaten orange"] = { otyp_descr = "orange", oclass = "%", oeaten = ... }, }; From 1d9ba3e2129402b96244d5306fcf171f05f5e456 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 12 Dec 2019 13:39:20 +0200 Subject: [PATCH 471/529] Expose objects array to lua --- src/nhlobj.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++ test/test_obj.lua | 25 ++++++++++++++++ test/testwish.lua | 16 ++++++++--- 3 files changed, 110 insertions(+), 4 deletions(-) diff --git a/src/nhlobj.c b/src/nhlobj.c index eed6c1b77..736c3587e 100644 --- a/src/nhlobj.c +++ b/src/nhlobj.c @@ -108,6 +108,78 @@ lua_State *L; return 0; } +/* Get a table of object class data. */ +/* local odata = obj.class(otbl.otyp); */ +/* local odata = obj.class(obj.new("rock")); */ +static int +l_obj_objects_to_table(L) +lua_State *L; +{ + int argc = lua_gettop(L); + int otyp = -1; + struct objclass *o; + + if (argc != 1) { + nhl_error(L, "l_obj_objects_to_table: Wrong args"); + return 0; + } + + if (lua_type(L, 1) == LUA_TNUMBER) { + otyp = luaL_checkinteger(L, 1); + } else if (lua_type(L, 1) == LUA_TUSERDATA) { + struct _lua_obj *lo = l_obj_check(L, 1); + if (lo && lo->obj) + otyp = lo->obj->otyp; + } + lua_pop(L, 1); + + if (otyp == -1) { + nhl_error(L, "l_obj_objects_to_table: Wrong args"); + return 0; + } + + o = &objects[otyp]; + + lua_newtable(L); + + if (OBJ_NAME(objects[otyp])) + nhl_add_table_entry_str(L, "name", OBJ_NAME(objects[otyp])); + if (OBJ_DESCR(objects[otyp])) + nhl_add_table_entry_str(L, "descr", + OBJ_DESCR(objects[otyp])); + if (o->oc_uname) + nhl_add_table_entry_str(L, "uname", o->oc_uname); + + nhl_add_table_entry_int(L, "name_known", o->oc_name_known); + nhl_add_table_entry_int(L, "merge", o->oc_merge); + nhl_add_table_entry_int(L, "uses_known", o->oc_uses_known); + nhl_add_table_entry_int(L, "pre_discovered", o->oc_pre_discovered); + nhl_add_table_entry_int(L, "magic", o->oc_magic); + nhl_add_table_entry_int(L, "charged", o->oc_charged); + nhl_add_table_entry_int(L, "unique", o->oc_unique); + nhl_add_table_entry_int(L, "nowish", o->oc_nowish); + nhl_add_table_entry_int(L, "big", o->oc_big); + /* TODO: oc_bimanual, oc_bulky */ + nhl_add_table_entry_int(L, "tough", o->oc_tough); + nhl_add_table_entry_int(L, "dir", o->oc_dir); /* TODO: convert to text */ + nhl_add_table_entry_int(L, "material", o->oc_material); /* TODO: convert to text */ + /* TODO: oc_subtyp, oc_skill, oc_armcat */ + nhl_add_table_entry_int(L, "oprop", o->oc_oprop); + nhl_add_table_entry_char(L, "class", + def_oc_syms[(uchar) o->oc_class].sym); + nhl_add_table_entry_int(L, "delay", o->oc_delay); + nhl_add_table_entry_int(L, "color", o->oc_color); /* TODO: text? */ + nhl_add_table_entry_int(L, "prob", o->oc_prob); + nhl_add_table_entry_int(L, "weight", o->oc_weight); + nhl_add_table_entry_int(L, "cost", o->oc_cost); + nhl_add_table_entry_int(L, "damage_small", o->oc_wsdam); + nhl_add_table_entry_int(L, "damage_large", o->oc_wldam); + /* TODO: oc_oc1, oc_oc2, oc_hitbon, a_ac, a_can, oc_level */ + nhl_add_table_entry_int(L, "nutrition", o->oc_nutrition); + + return 1; +} + /* Create a lua table representation of the object, unpacking all the object fields. local o = obj.new("rock"); @@ -322,6 +394,7 @@ static const struct luaL_Reg l_obj_methods[] = { { "at", l_obj_at }, { "next", l_obj_nextobj }, { "totable", l_obj_to_table }, + { "class", l_obj_objects_to_table }, { "placeobj", l_obj_placeobj }, { "container", l_obj_container }, { "contents", l_obj_getcontents }, diff --git a/test/test_obj.lua b/test/test_obj.lua index 7bda9bf0c..a72232465 100644 --- a/test/test_obj.lua +++ b/test/test_obj.lua @@ -39,3 +39,28 @@ local o4tbl = o4:totable(); if (o4tbl.otyp_name ~= "rock") then error("no rock under the large box"); end + + +local oc = obj.class(o4tbl.otyp); +if (oc.name ~= "rock") then + error("object class is not rock, part 1"); +end +if (oc.class ~= "*") then + error("object class is not *, part 1"); +end + +local oc2 = obj.class(o); +if (oc2.name ~= "rock") then + error("object class is not rock, part 2"); +end +if (oc2.class ~= "*") then + error("object class is not *, part 2"); +end + +local oc3 = obj.class(obj.new("rock")); +if (oc3.name ~= "rock") then + error("object class is not rock, part 3"); +end +if (oc3.class ~= "*") then + error("object class is not *, part 3"); +end diff --git a/test/testwish.lua b/test/testwish.lua index b63bb760b..0f301e25f 100644 --- a/test/testwish.lua +++ b/test/testwish.lua @@ -42,15 +42,23 @@ local wishtest_objects = { ["land mine"] = { otyp_name = "land mine", oclass = "(" }, ["blessed historic statue of woodland-elf named Foo"] = { otyp_name = "statue", blessed = 1, historic = 1, corpsenm_name = "Woodland-elf", oname = "Foo" }, ["blessed figurine of a ki-rin"] = { otyp_name = "figurine", blessed = 1, corpsenm_name = "ki-rin" }, - -- ["partly eaten orange"] = { otyp_descr = "orange", oclass = "%", oeaten = ... }, + ["partly eaten orange"] = { otyp_name = "orange", oclass = "%", oeaten = function () + local oc = obj.class(obj.new("orange")); + return (oc.nutrition // 2); + end }, }; - for str, tbl in pairs(wishtest_objects) do local o = obj.new(str):totable(); for field, value in pairs(tbl) do - if (o[field] ~= value) then - error("wished " .. str .. ", but " .. field .. " is " .. o[field] .. ", not " .. value); + local val; + if (type(value) == "function") then + val = value(); + else + val = value; + end + if (o[field] ~= val) then + error("wished " .. str .. ", but " .. field .. " is " .. o[field] .. ", not " .. val); end end end From 49fdd32d4f3463124d6fd68b5504479b2705ec78 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 12 Dec 2019 12:16:50 -0800 Subject: [PATCH 472/529] comment typo --- src/do.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/do.c b/src/do.c index f27d82e6a..b7bb737b9 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do.c $NHDT-Date: 1575245055 2019/12/02 00:04:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.196 $ */ +/* NetHack 3.6 do.c $NHDT-Date: 1576181796 2019/12/12 20:16:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.197 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -338,7 +338,7 @@ polymorph_sink() sym = S_altar; levl[u.ux][u.uy].typ = ALTAR; /* 3.6.3: this used to pass 'rn2(A_LAWFUL + 2) - 1' to - Align2mask() but it evaluates its argument more than once */ + Align2amask() but that evaluates its argument more than once */ algn = rn2(3) - 1; /* -1 (A_Cha) or 0 (A_Neu) or +1 (A_Law) */ levl[u.ux][u.uy].altarmask = ((Inhell && rn2(3)) ? AM_NONE : Align2amask(algn)); From a619ae28796b25f224b1537afcfa7b34a5b12e18 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 12 Dec 2019 17:49:32 -0800 Subject: [PATCH 473/529] EDIT_GETLIN vs #wizload* For #wizloadlua and #wizloaddes, getlin() was using garbage for default answer. --- src/cmd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cmd.c b/src/cmd.c index c49a35959..ee8b15f1b 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1575245052 2019/12/02 00:04:12 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.350 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1576201761 2019/12/13 01:49:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.383 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -946,6 +946,8 @@ wiz_load_lua(VOID_ARGS) { if (wizard) { char buf[BUFSZ]; + + buf[0] = '\0'; getlin("Load which lua file?", buf); if (buf[0] == '\033' || buf[0] == '\0') return 0; @@ -965,6 +967,7 @@ wiz_load_splua(VOID_ARGS) char buf[BUFSZ]; int ridx; + buf[0] = '\0'; getlin("Load which des lua file?", buf); if (buf[0] == '\033' || buf[0] == '\0') return 0; From 40789b7070128d2f31536c0be422bd3032a5fffc Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 13 Dec 2019 13:36:38 -0800 Subject: [PATCH 474/529] fix potential buffer overflow loading config file --- doc/fixes36.4 | 1 + src/files.c | 35 +++++++++++++++++++++++------------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index 5865224cc..aada6c85f 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -11,6 +11,7 @@ GDBPATH and GREPPATH from sysconf or -D... on compilation command line were at end of game when that was enabled fix the article used in the message when your steed encounters a polymorph trap dozen-ish assorted spelling/typo fixes in messages and source comments +fix potential buffer overflow when parsing run-time configuration file Fixes to Post-3.6.3 Problems that Were Exposed Via git Repository diff --git a/src/files.c b/src/files.c index 5f24956b8..e598ced9a 100644 --- a/src/files.c +++ b/src/files.c @@ -2309,10 +2309,14 @@ char *origbuf; int len; boolean retval = TRUE; + while (*origbuf == ' ' || *origbuf == '\t') /* skip leading whitespace */ + ++origbuf; /* (caller probably already did this) */ + (void) strncpy(buf, origbuf, sizeof buf - 1); + buf[sizeof buf - 1] = '\0'; /* strncpy not guaranteed to NUL terminate */ /* convert any tab to space, condense consecutive spaces into one, remove leading and trailing spaces (exception: if there is nothing but spaces, one of them will be kept even though it leads/trails) */ - mungspaces(strcpy(buf, origbuf)); + mungspaces(buf); /* find the '=' or ':' */ bufp = find_optparam(buf); @@ -3028,7 +3032,11 @@ boolean proc_wizkit_line(buf) char *buf; { - struct obj *otmp = readobjnam(buf, (struct obj *) 0); + struct obj *otmp; + + if (strlen(buf) >= BUFSZ) + buf[BUFSZ - 1] = '\0'; + otmp = readobjnam(buf, (struct obj *) 0); if (otmp) { if (otmp != &zeroobj) @@ -3136,22 +3144,23 @@ boolean FDECL((*proc), (char *)); /* merge now read line with previous ones, if necessary */ if (!ignoreline) { - len = (int) strlen(inbuf) + 1; + len = (int) strlen(ep) + 1; /* +1: final '\0' */ if (buf) - len += (int) strlen(buf); + len += (int) strlen(buf) + 1; /* +1: space */ tmpbuf = (char *) alloc(len); + *tmpbuf = '\0'; if (buf) { - Sprintf(tmpbuf, "%s %s", buf, inbuf); + Strcat(strcpy(tmpbuf, buf), " "); free(buf); - } else - Strcpy(tmpbuf, inbuf); - buf = tmpbuf; + } + buf = strcat(tmpbuf, ep); + buf[sizeof inbuf - 1] = '\0'; } if (morelines || (ignoreline && !oldline)) continue; - if (handle_config_section(ep)) { + if (handle_config_section(buf)) { free(buf); buf = (char *) 0; continue; @@ -3173,11 +3182,11 @@ boolean FDECL((*proc), (char *)); } bufp++; if (config_section_chosen) - free(config_section_chosen); + free(config_section_chosen), config_section_chosen = 0; section = choose_random_part(bufp, ','); - if (section) + if (section) { config_section_chosen = dupstr(section); - else { + } else { config_error_add("No config section to choose"); rv = FALSE; } @@ -3294,6 +3303,8 @@ int which_set; struct symparse *symp; char *bufp, *commentp, *altp; + if (strlen(buf) >= BUFSZ) + buf[BUFSZ - 1] = '\0'; /* convert each instance of whitespace (tabs, consecutive spaces) into a single space; leading and trailing spaces are stripped */ mungspaces(buf); From 62c271f21b2aecb926a7ed0ed465cb6404bcddb5 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 13 Dec 2019 14:01:28 -0800 Subject: [PATCH 475/529] polymorphed steed phrasing When you ride your steed into a polymorph trap and it changes into a creature that can still wear the saddle, the message is |You have to adjust youself in the saddle on . which sounds as if the game is telling the player that he or she needs to do something. Simplify it to |You adjust yourself in the saddle on . --- src/trap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/trap.c b/src/trap.c index 51436d47a..941025654 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 trap.c $NHDT-Date: 1569189770 2019/09/22 22:02:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.317 $ */ +/* NetHack 3.6 trap.c $NHDT-Date: 1576274483 2019/12/13 22:01:23 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.325 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1639,7 +1639,7 @@ struct obj *otmp; SUPPRESS_SADDLE, FALSE)); if (mdat != steed->data) (void) strsubst(buf, "your ", "your new "); - You("have to adjust yourself in the saddle on %s.", buf); + You("adjust yourself in the saddle on %s.", buf); } } steedhit = TRUE; From 6a3b9c2f526f1db77e8ca430e159fb1ec9e50661 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 13 Dec 2019 18:37:36 -0500 Subject: [PATCH 476/529] housekeeping updates for 3.6.4 --- README | 80 +++++++++---------------- dat/history | 3 + doc/Guidebook.mn | 7 ++- doc/Guidebook.tex | 7 ++- include/global.h | 2 +- include/patchlevel.h | 11 +++- src/windows.c | 2 +- sys/amiga/.gitattributes | 2 +- sys/atari/.gitattributes | 2 +- sys/be/.gitattributes | 2 +- sys/msdos/.gitattributes | 2 +- sys/os2/.gitattributes | 2 +- sys/share/.gitattributes | 10 ++-- sys/unix/README.linux | 4 +- sys/unix/sysconf | 2 +- sys/vms/Install.vms | 6 +- sys/vms/Makefile.src | 2 +- sys/vms/vmsbuild.com | 2 +- sys/wince/.gitattributes | 2 +- sys/wince/ceinc/.gitattributes | 2 +- sys/wince/winhack.rc | 10 ++-- sys/wince/winhcksp.rc | 10 ++-- sys/winnt/Install.nt | 4 +- sys/winnt/Makefile.gcc | 2 +- sys/winnt/Makefile.msc | 2 +- sys/winnt/nethack.def | 2 +- sys/winnt/sysconf.template | 7 ++- util/makedefs.c | 2 +- win/gem/.gitattributes | 2 +- win/gnome/.gitattributes | 2 +- win/macosx/NetHackGuidebook.applescript | 2 +- win/win32/NetHackW.rc | 8 +-- win/win32/mswproc.c | 2 +- win/win32/nethack.rc | 8 +-- 34 files changed, 107 insertions(+), 108 deletions(-) diff --git a/README b/README index 5cbcb70c4..f21b2f5b8 100644 --- a/README +++ b/README @@ -1,52 +1,26 @@ - NetHack 3.6.3 -- General information December 5, 2019 + NetHack 3.6.4 -- General information December 5, 2019 NetHack 3.6 is an enhancement to the dungeon exploration game NetHack, which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.4 as there was no NetHack 3.5 release. -NetHack 3.6.3 is the official release of NetHack that follows NetHack 3.6.2. -It contains a collection of over 190 bug fixes to NetHack 3.6.2 and over 22 -game enhancements and community contributions. The file doc/fixes36.3 in the -source distribution has a full list of them. The text in there was written for -the development team's own use and is provided "as is", so please do not ask -us to further explain the entries in that file. Some entries might be -considered "spoilers", particularly in the "new features" section. +NetHack 3.6.4 is the official release of NetHack that follows NetHack 3.6.3 +and contains all bug fixes since then, including one security-releated fix. +The file doc/fixes36.4 in the source distribution has a full list of them. The +text in there was written for the development team's own use and is provided +"as is", so please do not ask us to further explain the entries in that file. +Some entries might be considered "spoilers", particularly in the "new features" +section. Below you will find some other general notes that were not considered spoilers: - * Fixed stale 'thrownobj' pointer for returning thrown aklys while engulfed - * Fixed uarmh null pointer dereference if a helm of opposite alignment came - * off due to being polymorphed - * Fixed 'object lost' panic when attempting to crawl of of the water during - * emergency disrobing/dropping - * Running now stops when moving over engravings so you can tell where they - * are - * Fixed detection of unseen/secret doors which failed to find monsters hiding - * under objects and failed to find monsters hiding at trap locations - * Ensured fatal status conditions made it to disclosure and/or dumplog - * Fixed "Bad fruit #N" warnings when saving bones with 'perm_invent' On - * Fixed it so yellow dragons don't have green breath - * Added several grammar corrections - * Improved recognition of deafness for several situations including the - * playing of musical instruments and bribing negotiations with demon lords - * Fixed ignoring of god's wrath when hero injured himself during altar kick - * Fixed several cases where persistent inventory window was not updated - * Fixed temple priests or shopkeepers moving over other monsters - * Fixed a crash-causing bug when putting on levitation boots over a sink - * Ensured that thrown or kicked objects will end up in bones - * Made water go all the way to the edges of level on the Plane of Water - * Made clouds disrupt line of sight along the edges of the Plane of Air - * Improved and expanded usage of status highlighting percentage rules - * Added more than 15 improvements and fixes to the curses window port - * Added and documented significant changes to default directory choices for - * the Windows platform - * Improved the layout and display of the player selection dialog used on the - * Windows graphical implementation - * Improved performance of some tty versions by reducing the number of - * function calls made from mapglyph - * Allowed the msdos implementation to build with curses and PDCurses - * Over 100 other fixes and improvements + * GDBPATH and GREPPATH from sysconf or -D... on compilation command line were + * being processed even if PANICTRACE was disabled but only being freed + * at end of game when that was enabled + * fix the article used in the message when your steed encounters a polymorph trap + * dozen-ish assorted spelling/typo fixes in messages and source comments + * fix potential buffer overflow when parsing run-time configuration file - - - - - - - - - - - @@ -57,13 +31,13 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. call it. 2. Having unpacked, you should have a file called 'Files' in your Top - directory. + directory. This file contains the list of all the files you now SHOULD have in each directory. Please check the files in each directory against this list to make sure that you have a complete set. - This file also contains a list of what files are created during + This file also contains a list of what files are created during the build process. The names of the directories listed should not be changed unless you @@ -88,7 +62,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. 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 (7 through 10) Intel 80386 or greater (or clone) boxes running Linux, or BSDI Mac OS X 10.11 (follow the instructions in sys/unix, not sys/mac) @@ -97,8 +71,8 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. Instructions have been provided by way of community contribution on: msdos protected mode using djgpp - Previous versions of NetHack were tested and known to run on the - following systems, but it is unknown if they can still build and + Previous versions of NetHack were tested and known to run on the + following systems, but it is unknown if they can still build and execute NetHack 3.6: Apple Macintosh running MacOS 7.5 or higher, LinuxPPC, BeOS 4.0 @@ -151,7 +125,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. - - - - - - - - - - - -If you have problems building the game, or you find bugs in it, we recommend +If you have problems building the game, or you find bugs in it, we recommend filing a bug report from our "Contact Us" web page at: https://www.nethack.org/common/contact.html Please include the version information from #version or the command line @@ -165,12 +139,12 @@ available can be obtained via git here: When sending correspondence, please observe the following: o Please be sure to include your machine type, OS, and patchlevel. -o Please avoid sending us binary files (e.g. save files or bones files). +o Please avoid sending us binary files (e.g. save files or bones files). If you have found a bug and think that your save file would aid in solving - the problem, send us a description in words of the problem, your machine - type, your operating system, and the version of NetHack. Tell us that you + the problem, send us a description in words of the problem, your machine + type, your operating system, and the version of NetHack. Tell us that you have a save file, but do not actually send it. - You may then be contacted by a member of the development team with the + You may then be contacted by a member of the development team with the address of a specific person to send the save file to. o Though we make an effort to reply to each bug report, it may take some time before you receive feedback. This is especially true during the @@ -179,16 +153,16 @@ o We don't give hints for playing the game. o Don't bother to ask when the next version will be out or you can expect to receive a stock answer. -If you want to submit a patch for the NetHack source code via email directly, +If you want to submit a patch for the NetHack source code via email directly, you can direct it to this address: nethack-bugs (at) nethack.org -If a feature is not accepted you are free, of course, to post the patches +If a feature is not accepted you are free, of course, to post the patches to the net yourself and let the marketplace decide their worth. All of this amounts to the following: If you decide to apply a free-lanced patch to your 3.6 code, you are welcome to do so, of course, but we won't -be able to provide support or receive bug reports for it. +be able to provide support or receive bug reports for it. In our own patches, we will assume that your code is synchronized with ours. diff --git a/dat/history b/dat/history index 50cb7ca1a..7dcaaca18 100644 --- a/dat/history +++ b/dat/history @@ -223,6 +223,9 @@ for decades, joined the NetHack Development Team in late May 2019. NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug fixes to NetHack 3.6.2. +NetHack 3.6.4 was released on December 17, 2019 containing a security +fix and a few bug fixes. + The official NetHack web site is maintained by Ken Lorber at http://www.nethack.org/. diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 4c4cd5f11..d4556d582 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "December 5, 2019 +.ds f2 "December 17, 2019 . .\" A note on some special characters: .\" \(lq = left double quote @@ -45,6 +45,8 @@ A Guide to the Mazes of Menace .au Original version - Eric S. Raymond (Edited and expanded for 3.6 by Mike Stephenson and others) +.sp 1 +\*(f2 .hn 1 Introduction .pg @@ -5149,6 +5151,9 @@ participant for decades, joined the NetHack Development Team in late May 2019. NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug fixes to NetHack 3.6.2. .pg +NetHack 3.6.4 was released on December 17, 2019 containing a security fix +and a few bug fixes. +.pg The official NetHack web site is maintained by \fBKen Lorber\fP at .UR https://www.nethack.org/ . diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 049aa8598..36d459db0 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{December 5, 2019} +\date{December 17, 2019} \maketitle @@ -5753,6 +5753,11 @@ for decades, joined the {\it NetHack Development Team} in late May 2019. NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug fixes to NetHack 3.6.2. +%.pg +\medskip +NetHack 3.6.4 was released on December 17, 2019 containing a security fix and +a few bug fixes. + %.pg \medskip \nd The official {\it NetHack\/} web site is maintained by {\it Ken Lorber} at diff --git a/include/global.h b/include/global.h index 5c02491c3..a2b70d258 100644 --- a/include/global.h +++ b/include/global.h @@ -19,7 +19,7 @@ /* * Development status of this NetHack version. */ -#define NH_DEVEL_STATUS NH_STATUS_POSTRELEASE +#define NH_DEVEL_STATUS NH_STATUS_RELEASED #ifndef DEBUG /* allow tool chains to define without causing warnings */ #define DEBUG diff --git a/include/patchlevel.h b/include/patchlevel.h index c945e68b5..01e1c3438 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -9,7 +9,7 @@ /* * PATCHLEVEL is updated for each release. */ -#define PATCHLEVEL 3 +#define PATCHLEVEL 4 /* * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. @@ -36,6 +36,15 @@ /****************************************************************************/ /* Version 3.6.x */ +/* Patch 4, December 17, 2019 + * GDBPATH and GREPPATH from sysconf or -D... on compilation command line were + * being processed even if PANICTRACE was disabled but only being freed + * at end of game when that was enabled + * fix the article used in the message when your steed encounters a polymorph trap + * dozen-ish assorted spelling/typo fixes in messages and source comments + * fix potential buffer overflow when parsing run-time configuration file + */ + /* Patch 3, December 5, 2019 * * Fixed stale 'thrownobj' pointer for returning thrown aklys while engulfed diff --git a/src/windows.c b/src/windows.c index 0f0ccb4ed..974479187 100644 --- a/src/windows.c +++ b/src/windows.c @@ -1157,7 +1157,7 @@ boolean fullsubs; /* True -> full substitution for file name, False -> else Strcpy(tmpbuf, "{current date+time}"); break; - case 'v': /* version, eg. "3.6.3-0" */ + case 'v': /* version, eg. "3.6.4-0" */ Sprintf(tmpbuf, "%s", version_string(verbuf)); break; case 'u': /* UID */ diff --git a/sys/amiga/.gitattributes b/sys/amiga/.gitattributes index 5df6a5f30..f969b5ebc 100644 --- a/sys/amiga/.gitattributes +++ b/sys/amiga/.gitattributes @@ -1,2 +1,2 @@ *.p NHSUBST -* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.4) diff --git a/sys/atari/.gitattributes b/sys/atari/.gitattributes index 66c510f6c..ff75d0637 100644 --- a/sys/atari/.gitattributes +++ b/sys/atari/.gitattributes @@ -1 +1 @@ -* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.4) diff --git a/sys/be/.gitattributes b/sys/be/.gitattributes index 9d9a35874..76b400189 100644 --- a/sys/be/.gitattributes +++ b/sys/be/.gitattributes @@ -1 +1 @@ -* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.4) diff --git a/sys/msdos/.gitattributes b/sys/msdos/.gitattributes index 77cd3847b..a0b35794c 100644 --- a/sys/msdos/.gitattributes +++ b/sys/msdos/.gitattributes @@ -4,6 +4,6 @@ Makefile.* NHSUBST Install.* NHSUBST moveinit.pat NH_header=no vesa.h NH_header=no -* NH_filestag=(file%s_for_MSDOS_version_-_tested_for_3.6.3_via_cross-compile_only) +* NH_filestag=(file%s_for_MSDOS_version_-_tested_for_3.6.4_via_partial_cross-compile_only) nhico.uu NH_filestag=(file%s_for_running_MSDOS_binary_under_Windows) nhpif.uu NH_filestag=>nhico.uu diff --git a/sys/os2/.gitattributes b/sys/os2/.gitattributes index 0537d04f5..d3d1c307d 100644 --- a/sys/os2/.gitattributes +++ b/sys/os2/.gitattributes @@ -1,2 +1,2 @@ Makefile.* NHSUBST -* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.4) diff --git a/sys/share/.gitattributes b/sys/share/.gitattributes index a34fbc350..271c3c59f 100644 --- a/sys/share/.gitattributes +++ b/sys/share/.gitattributes @@ -5,16 +5,16 @@ dgn_comp.h NH_header=no lev_comp.h NH_header=no Makefile.lib NH_header=no -Makefile.lib NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.3) -#termcap.uu NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.3) +Makefile.lib NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.4) +#termcap.uu NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.4) termcap.uu NH_filestag=>Makefile.lib -pcmain.c NH_filestag=(file_for_MSDOS,_OS/2,_Amiga,_and_Atari_versions_-_untested_for_3.6.3) +pcmain.c NH_filestag=(file_for_MSDOS,_OS/2,_Amiga,_and_Atari_versions_-_untested_for_3.6.4) -pcsys.c NH_filestag=(file%s_for_MSDOS,_OS/2_and_Atari_versions_-_tested_on_MSDOS_for_3.6.3_via_cross-compile_only) +pcsys.c NH_filestag=(file%s_for_MSDOS,_OS/2_and_Atari_versions_-_tested_on_MSDOS_for_3.6.4_via_partial_cross-compile_only) pcunix.c NH_filestag=>pcsys.c -NetHack.cnf NH_filestag=(file_for_MSDOS,_OS/2,_and_Atari_versions_-_untested_for_3.6.3) +NetHack.cnf NH_filestag=(file_for_MSDOS,_OS/2,_and_Atari_versions_-_untested_for_3.6.4) pctty.c NH_filestag=>NetHack.cnf ioctl.c NH_filestag=(file%s_for_UNIX_and_Be_versions) diff --git a/sys/unix/README.linux b/sys/unix/README.linux index b98d4cc7c..e96be77cd 100644 --- a/sys/unix/README.linux +++ b/sys/unix/README.linux @@ -26,8 +26,8 @@ home directory you might perform these steps. If you have old record and logfile entries from a previous NetHack version, you might want to save copies before they get overwritten by the new empty -files; old saved games and bones files from 3.6.0 through to 3.6.2 should -work with 3.6.3 but even older saved games and bones files from 3.4.3 will +files; old saved games and bones files from 3.6.0 through to 3.6.3 should +work with 3.6.4 but even older saved games and bones files from 3.4.3 will not. If you are installing from the RPM, there is no need to save the old record and logfile; they are automatically preserved. diff --git a/sys/unix/sysconf b/sys/unix/sysconf index 7a5c8a1c4..b8bfbcb9a 100644 --- a/sys/unix/sysconf +++ b/sys/unix/sysconf @@ -95,7 +95,7 @@ MAXPLAYERS=10 # Only available if NetHack was compiled with DUMPLOG # Allows following placeholders: # %% literal '%' -# %v version (eg. "3.6.3-0") +# %v version (eg. "3.6.4-0") # %u game UID # %t game start time, UNIX timestamp format # %T current time, UNIX timestamp format diff --git a/sys/vms/Install.vms b/sys/vms/Install.vms index 8c4bb2ee2..37418f261 100644 --- a/sys/vms/Install.vms +++ b/sys/vms/Install.vms @@ -1,4 +1,4 @@ - Instructions for Building and Installing NetHack 3.6.3 + Instructions for Building and Installing NetHack 3.6.4 on a VMS (aka OpenVMS) system ========================================= @@ -146,8 +146,8 @@ Notes: 0. Version 3.5.x was never publicly released. 1. Save files and bones files from 3.4.x and earlier versions - will not work with 3.6.3, but save files and bones file from 3.6.0, - through 3.6.2 should work. The scoreboard file (RECORD) from 3.6.x + will not work with 3.6.4, but save files and bones file from 3.6.0, + through 3.6.4 should work. The scoreboard file (RECORD) from 3.6.x or 3.4.x or 3.3.x will work. 2. To specify user-preference options in your environment, define the diff --git a/sys/vms/Makefile.src b/sys/vms/Makefile.src index 194a27fc8..566f129d4 100644 --- a/sys/vms/Makefile.src +++ b/sys/vms/Makefile.src @@ -133,7 +133,7 @@ RANDOBJ = isaac64.obj,random.obj # Other things that have to be reconfigured are in vmsconf.h, # and config.h -VERSION = 3.6.3 +VERSION = 3.6.4 MAKEDEFS = $(UTL)makedefs.exe; diff --git a/sys/vms/vmsbuild.com b/sys/vms/vmsbuild.com index 6a9e50f36..50dd41fc2 100755 --- a/sys/vms/vmsbuild.com +++ b/sys/vms/vmsbuild.com @@ -1,5 +1,5 @@ $ ! vms/vmsbuild.com -- compile and link NetHack 3.6.* [pr] -$ version_number = "3.6.3" +$ version_number = "3.6.4" $ ! $NHDT-Date: 1557701518 2019/05/12 22:51:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.23 $ $ ! Copyright (c) 2018 by Robert Patrick Rankin $ ! NetHack may be freely redistributed. See license for details. diff --git a/sys/wince/.gitattributes b/sys/wince/.gitattributes index 8e28791ce..70924b994 100644 --- a/sys/wince/.gitattributes +++ b/sys/wince/.gitattributes @@ -1,4 +1,4 @@ *.ce NHSUBST *.mak NHSUBST *.bat NHSUBST -* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.4) diff --git a/sys/wince/ceinc/.gitattributes b/sys/wince/ceinc/.gitattributes index 8e72b80f0..e95fe9840 100644 --- a/sys/wince/ceinc/.gitattributes +++ b/sys/wince/ceinc/.gitattributes @@ -1 +1 @@ -* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.3) +* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.4) diff --git a/sys/wince/winhack.rc b/sys/wince/winhack.rc index c85fdec67..b928c3b04 100644 --- a/sys/wince/winhack.rc +++ b/sys/wince/winhack.rc @@ -284,8 +284,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,3,0 - PRODUCTVERSION 3,6,3,0 + FILEVERSION 3,6,4,0 + PRODUCTVERSION 3,6,4,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x9L @@ -300,17 +300,17 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "NetHack 3.6.3 for Windows CE\0" + VALUE "Comments", "NetHack 3.6.4 for Windows CE\0" VALUE "CompanyName", " \0" VALUE "FileDescription", "nethackm\0" - VALUE "FileVersion", "3, 6, 3, 0\0" + VALUE "FileVersion", "3, 6, 4, 0\0" VALUE "InternalName", "nethackm\0" VALUE "LegalCopyright", "Copyright © 1985-2019\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "nethackm.exe\0" VALUE "PrivateBuild", "090914\0" VALUE "ProductName", "NetHack\0" - VALUE "ProductVersion", "3, 6, 3, 0\0" + VALUE "ProductVersion", "3, 6, 4, 0\0" VALUE "SpecialBuild", "\0" END END diff --git a/sys/wince/winhcksp.rc b/sys/wince/winhcksp.rc index 04f7aec40..3e5373a2f 100644 --- a/sys/wince/winhcksp.rc +++ b/sys/wince/winhcksp.rc @@ -260,8 +260,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,3,0 - PRODUCTVERSION 3,6,3,0 + FILEVERSION 3,6,4,0 + PRODUCTVERSION 3,6,4,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x9L @@ -276,17 +276,17 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "NetHack 3.6.3 for Smartphone 2002\0" + VALUE "Comments", "NetHack 3.6.4 for Smartphone 2002\0" VALUE "CompanyName", " \0" VALUE "FileDescription", "nethackm\0" - VALUE "FileVersion", "3, 6, 3, 0\0" + VALUE "FileVersion", "3, 6, 4, 0\0" VALUE "InternalName", "nethackm\0" VALUE "LegalCopyright", "Copyright © 1985-2019\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "nethackm.exe\0" VALUE "PrivateBuild", "090914\0" VALUE "ProductName", "NetHack For Smartphone\0" - VALUE "ProductVersion", "3, 6, 3, 0\0" + VALUE "ProductVersion", "3, 6, 4, 0\0" VALUE "SpecialBuild", "\0" END END diff --git a/sys/winnt/Install.nt b/sys/winnt/Install.nt index 5b87226c1..7ef199034 100644 --- a/sys/winnt/Install.nt +++ b/sys/winnt/Install.nt @@ -16,7 +16,7 @@ contributed the port. Alex Kompel, Dion Nicolaas, Yitzhak Sapir, Derek S. Ray, Michael Allison, Pasi Kallinen, Bart House, and Janet Walz contributed to the maintainance -of the tty and graphical windows versions of NetHack 3.6.3. +of the tty and graphical windows versions of NetHack 3.6.4. You can build a TTY version of NetHack and a Windows Graphical version. You can use one of the following build environments: @@ -151,7 +151,7 @@ a 32-bit x86 version, or a 64-bit x64 version. The default Makefile is set up for a 32-bit x86 version, but that's only because it will run on the most number of existing Windows environments. -NetHack's save files and bones files in the 3.6.3 release have not yet +NetHack's save files and bones files in the 3.6.4 release have not yet evolved enough to allow them to interchange between the 32-bit version and the 64-bit version (or between different platforms). Hopefully that will change in an upcoming release. diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index d19532369..a1eead86f 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -139,7 +139,7 @@ SKIP_NETHACKW=Y #============================================================================== # The version of the game this Makefile was designed for -NETHACK_VERSION="3.6.3" +NETHACK_VERSION="3.6.4" # A brief version for use in macros NHV1=$(subst .,,$(NETHACK_VERSION)) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 550c71fc0..2ecca426b 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -93,7 +93,7 @@ DEBUGINFO = Y #============================================================================== # # The version of the game this Makefile was designed for -NETHACK_VERSION="3.6.3" +NETHACK_VERSION="3.6.4" # A brief version for use in macros NHV=$(NETHACK_VERSION:.=) diff --git a/sys/winnt/nethack.def b/sys/winnt/nethack.def index bc08347a1..67f372a46 100644 --- a/sys/winnt/nethack.def +++ b/sys/winnt/nethack.def @@ -1,5 +1,5 @@ NAME NETHACK -DESCRIPTION 'NetHack 3.6.3 for Windows' +DESCRIPTION 'NetHack 3.6.4 for Windows' EXETYPE WINDOWS STUB 'WINSTUB.EXE' CODE PRELOAD MOVEABLE DISCARDABLE diff --git a/sys/winnt/sysconf.template b/sys/winnt/sysconf.template index fccec7fe6..e8b70015f 100644 --- a/sys/winnt/sysconf.template +++ b/sys/winnt/sysconf.template @@ -24,7 +24,7 @@ WIZARDS=* # Only available if NetHack was compiled with DUMPLOG # Allows following placeholders: # %% literal '%' -# %v version (eg. "3.6.3-0") +# %v version (eg. "3.6.4-0") # %u game UID # %t game start time, UNIX timestamp format # %T current time, UNIX timestamp format @@ -77,6 +77,9 @@ WIZARDS=* # IMPORTANT: If you change any of these locations, the directories they # point at must exist. NetHack will not create them for you. # +# Before adjusting, you can verify the default locations for files with: +# nethack --showpaths +# # The location that users can adjust their config file startup options #CONFIGDIR=%USERPROFILE%\NetHack # @@ -88,7 +91,7 @@ WIZARDS=* #HACKDIR=%USERPROFILE%\NetHack\3.6 # # The location that level files in progress are stored (writeable) -LEVELDIR=%USERPROFILE%\AppData\Local\NetHack\3.6 +#LEVELDIR=%USERPROFILE%\AppData\Local\NetHack\3.6 # # The location where saved games are kept (writeable) #SAVEDIR=%USERPROFILE%\AppData\Local\NetHack\3.6 diff --git a/util/makedefs.c b/util/makedefs.c index 6b0ef9cc6..ff8ac2f52 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -53,7 +53,7 @@ #endif #if defined(UNIX) && !defined(LINT) && !defined(GCC_WARN) -static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.6\t2019/12/05"; +static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.6\t2019/12/17"; #endif /* names of files to be generated */ diff --git a/win/gem/.gitattributes b/win/gem/.gitattributes index e108c78d7..3c4d1eef1 100644 --- a/win/gem/.gitattributes +++ b/win/gem/.gitattributes @@ -1 +1 @@ -* NH_filestag=(file%s_for_GEM_versions_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_GEM_versions_-_untested_for_3.6.4) diff --git a/win/gnome/.gitattributes b/win/gnome/.gitattributes index 013227bc8..6f8e9f364 100644 --- a/win/gnome/.gitattributes +++ b/win/gnome/.gitattributes @@ -1 +1 @@ -* NH_filestag=(file%s_for_GNOME_versions_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_GNOME_versions_-_untested_for_3.6.4) diff --git a/win/macosx/NetHackGuidebook.applescript b/win/macosx/NetHackGuidebook.applescript index dd05a3a8f..977d4d713 100644 --- a/win/macosx/NetHackGuidebook.applescript +++ b/win/macosx/NetHackGuidebook.applescript @@ -1,5 +1,5 @@ #!/usr/bin/osascript -# NetHack 3.6.3 NetHackGuidebook.applescript $NHDT-Date: 1575245175 2019/12/02 00:06:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.10 $ +# NetHack 3.6 NetHackGuidebook.applescript $NHDT-Date: 1575245175 2019/12/02 00:06:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.10 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011 # NetHack may be freely redistributed. See license for details. diff --git a/win/win32/NetHackW.rc b/win/win32/NetHackW.rc index 59381dd90..a98f6f021 100644 --- a/win/win32/NetHackW.rc +++ b/win/win32/NetHackW.rc @@ -320,8 +320,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,3,0 - PRODUCTVERSION 3,6,3,0 + FILEVERSION 3,6,4,0 + PRODUCTVERSION 3,6,4,0 FILEFLAGSMASK 0x1fL #ifdef _DEBUG FILEFLAGS 0x9L @@ -337,13 +337,13 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "NetHack for Windows - Graphical Interface" - VALUE "FileVersion", "3.6.3" + VALUE "FileVersion", "3.6.4" VALUE "InternalName", "NetHackW" VALUE "LegalCopyright", "Copyright (C) 1985 - 2019. By Stichting Mathematisch Centrum and M. Stephenson. See license for details." VALUE "OriginalFilename", "NetHackW.exe" VALUE "PrivateBuild", "140606" VALUE "ProductName", "NetHack" - VALUE "ProductVersion", "3.6.3" + VALUE "ProductVersion", "3.6.4" END END BLOCK "VarFileInfo" diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 324418f0c..f117fc3ce 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -2316,7 +2316,7 @@ logDebug(const char *fmt, ...) /* Reading and writing settings from the registry. */ #define CATEGORYKEY "Software" #define COMPANYKEY "NetHack" -#define PRODUCTKEY "NetHack 3.6.3" +#define PRODUCTKEY "NetHack 3.6.4" #define SETTINGSKEY "Settings" #define MAINSHOWSTATEKEY "MainShowState" #define MAINMINXKEY "MainMinX" diff --git a/win/win32/nethack.rc b/win/win32/nethack.rc index c7ee38399..3f30ae2c4 100644 --- a/win/win32/nethack.rc +++ b/win/win32/nethack.rc @@ -60,8 +60,8 @@ IDI_ICON1 ICON "nethack.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,3,0 - PRODUCTVERSION 3,6,3,0 + FILEVERSION 3,6,4,0 + PRODUCTVERSION 3,6,4,0 FILEFLAGSMASK 0x1fL #ifdef _DEBUG FILEFLAGS 0x9L @@ -77,12 +77,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "NetHack for Windows - TTY Interface" - VALUE "FileVersion", "3.6.3" + VALUE "FileVersion", "3.6.4" VALUE "InternalName", "NetHack" VALUE "LegalCopyright", "Copyright (C) 1985 - 2019. By Stichting Mathematisch Centrum and M. Stephenson. See license for details." VALUE "OriginalFilename", "NetHack.exe" VALUE "ProductName", "NetHack" - VALUE "ProductVersion", "3.6.3" + VALUE "ProductVersion", "3.6.4" END END BLOCK "VarFileInfo" From dacf0252626e7ae46429890dd4018f6a61aaf77a Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 13 Dec 2019 18:39:31 -0500 Subject: [PATCH 477/529] typos --- README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index f21b2f5b8..d608a997b 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ - NetHack 3.6.4 -- General information December 5, 2019 + NetHack 3.6.4 -- General information December 17, 2019 NetHack 3.6 is an enhancement to the dungeon exploration game NetHack, which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.4 as there was no NetHack 3.5 release. NetHack 3.6.4 is the official release of NetHack that follows NetHack 3.6.3 -and contains all bug fixes since then, including one security-releated fix. +and contains all bug fixes since then, including one security-related fix. The file doc/fixes36.4 in the source distribution has a full list of them. The text in there was written for the development team's own use and is provided "as is", so please do not ask us to further explain the entries in that file. From f8fbe4e9893955fbbae7382249f55e6482aaba41 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 13 Dec 2019 15:58:56 -0800 Subject: [PATCH 478/529] allow teleport onto the vibrating square Cherry-pick 3.7.0's 4a3d5f95d9e724a77cb94ff885b333c8c1c70b0d (github pull request #252). Slightly tricky because the fix entry nowgoes into a different file. fixes37.0 will need fixing up. --- doc/fixes36.4 | 3 ++- src/teleport.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index 5865224cc..c49854d28 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.0 $ $NHDT-Date: 1575665952 2019/12/06 20:59:12 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.2 $ $NHDT-Date: 1576281514 2019/12/13 23:58:34 $ This fixes36.4 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.3 in December 2019. Hypothetical version @@ -10,6 +10,7 @@ GDBPATH and GREPPATH from sysconf or -D... on compilation command line were being processed even if PANICTRACE was disabled but only being freed at end of game when that was enabled fix the article used in the message when your steed encounters a polymorph trap +alloc teleporting onto the vibrating square dozen-ish assorted spelling/typo fixes in messages and source comments diff --git a/src/teleport.c b/src/teleport.c index ab1e67c65..23af60aa2 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 teleport.c $NHDT-Date: 1575245091 2019/12/02 00:04:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.94 $ */ +/* NetHack 3.6 teleport.c $NHDT-Date: 1576281515 2019/12/13 23:58:35 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.95 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -263,8 +263,13 @@ teleok(x, y, trapok) register int x, y; boolean trapok; { - if (!trapok && t_at(x, y)) - return FALSE; + if (!trapok) { + /* allow teleportation onto vibrating square, it's not a real trap */ + struct trap *trap = t_at(x, y); + + if (trap && trap->ttyp != VIBRATING_SQUARE) + return FALSE; + } if (!goodpos(x, y, &youmonst, 0)) return FALSE; if (!tele_jump_ok(u.ux, u.uy, x, y)) From 84bdff69767df06bb64b2445a7c228b2f7d83e38 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 5 Dec 2019 02:33:47 -0800 Subject: [PATCH 479/529] kinda/sorta fix github issue #246 Cherry-pick 3.7.0's 565e020573d56afb3eefafa4e8975d24b677c80d. Again, conflict because the fixes entry goes into a different file. When picking up from floor or removing from container fails because there aren't any inventory slots available, pickup/take-out stops. But the message |Your knapsack can't accomodate any more items. is inaccurate if there is gold beyond the stopping point. Actually continuing in order to pickup/take-out gold would require substantial changes, but varying the message to be |Your knapsack can't accomodate any more items (except gold). when stopping is a one line fix. The parenthesized remark is only added if there is actually some gold after the current object and is given regardless of whether autopickup happens to be targetting it. Fixes #246 --- doc/fixes36.4 | 5 ++++- src/pickup.c | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index c49854d28..d42e88c86 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.2 $ $NHDT-Date: 1576281514 2019/12/13 23:58:34 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.3 $ $NHDT-Date: 1576282492 2019/12/14 00:14:52 $ This fixes36.4 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.3 in December 2019. Hypothetical version @@ -11,6 +11,9 @@ GDBPATH and GREPPATH from sysconf or -D... on compilation command line were at end of game when that was enabled fix the article used in the message when your steed encounters a polymorph trap alloc teleporting onto the vibrating square +message "your knapsack can't accomodate any more items" when picking stuff up + or removing such from container was inaccurate if there was some gold + pending; vary the message rather than add more convoluted pickup code dozen-ish assorted spelling/typo fixes in messages and source comments diff --git a/src/pickup.c b/src/pickup.c index cd0fd118b..76f35aa8b 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pickup.c $NHDT-Date: 1570566381 2019/10/08 20:26:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.235 $ */ +/* NetHack 3.6 pickup.c $NHDT-Date: 1576282488 2019/12/14 00:14:48 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.237 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1424,7 +1424,14 @@ boolean telekinesis; /* [exception for gold coins will have to change if silver/copper ones ever get implemented] */ && inv_cnt(FALSE) >= 52 && !merge_choice(invent, obj)) { - Your("knapsack cannot accommodate any more items."); + /* if there is some gold here (and we haven't already skipped it), + we aren't limited by the 52 item limit for it, but caller and + "grandcaller" aren't prepared to skip stuff and then pickup + just gold, so the best we can do here is vary the message */ + Your("knapsack cannot accommodate any more items%s.", + /* floor follows by nexthere, otherwise container so by nobj */ + nxtobj(obj, GOLD_PIECE, (boolean) (obj->where == OBJ_FLOOR)) + ? " (except gold)" : ""); result = -1; /* nothing lifted */ } else { result = 1; From c0b74f6ba42292cbff4ae7cfadc22c55bea9c0ba Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 13 Dec 2019 17:39:39 -0800 Subject: [PATCH 480/529] fixes typo --- doc/fixes36.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index d42e88c86..8d466e096 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.3 $ $NHDT-Date: 1576282492 2019/12/14 00:14:52 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.4 $ $NHDT-Date: 1576287569 2019/12/14 01:39:29 $ This fixes36.4 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.3 in December 2019. Hypothetical version @@ -10,7 +10,7 @@ GDBPATH and GREPPATH from sysconf or -D... on compilation command line were being processed even if PANICTRACE was disabled but only being freed at end of game when that was enabled fix the article used in the message when your steed encounters a polymorph trap -alloc teleporting onto the vibrating square +allow teleporting onto the vibrating square message "your knapsack can't accomodate any more items" when picking stuff up or removing such from container was inaccurate if there was some gold pending; vary the message rather than add more convoluted pickup code From 80f52d5d53852a2775e34c8d6f6cd5d4a39e923f Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 13 Dec 2019 17:54:00 -0800 Subject: [PATCH 481/529] finish moving a couple of short patches to 3.6.4 And make the revised teleport portion match. --- doc/fixes37.0 | 6 +----- src/teleport.c | 5 ++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index ca87a330a..37627fafa 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.19 $ $NHDT-Date: 1575755075 2019/12/07 21:44:35 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ $NHDT-Date: 1576288434 2019/12/14 01:53:54 $ General Fixes and Modified Features ----------------------------------- @@ -10,12 +10,8 @@ hero polymorphed into a vampire can use #monster to shape-shift rather than adjust bones filename buffer sizes to accommodate suffix fix internal self-recover to work with recent fields added to checkpoint file improvements to pronoun usage when hallucinating -message "your knapsack can't accomodate any more items" when picking stuff up - or removing such from container was inaccurate if there was some gold - pending; vary the message rather than add more convoluted pickup code function calls made from mapglyph based on dungeon level are now called once per level -allow teleporting onto the vibrating square Fixes to Pre-3.7.0 Problems that Were Exposed Via git Repository diff --git a/src/teleport.c b/src/teleport.c index c6093038e..8c6af94b6 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 teleport.c $NHDT-Date: 1576281515 2019/12/13 23:58:35 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.95 $ */ +/* NetHack 3.6 teleport.c $NHDT-Date: 1576288434 2019/12/14 01:53:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.106 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -264,9 +264,8 @@ boolean trapok; /* allow teleportation onto vibrating square, it's not a real trap */ struct trap *trap = t_at(x, y); - if (trap && trap->ttyp != VIBRATING_SQUARE) { + if (trap && trap->ttyp != VIBRATING_SQUARE) return FALSE; - } } if (!goodpos(x, y, &g.youmonst, 0)) return FALSE; From 2dad98d55ec1337209a233adfd53f116e08f8e3a Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 14 Dec 2019 10:53:12 -0500 Subject: [PATCH 482/529] Xcode updates --- src/bones.c | 2 +- src/dungeon.c | 6 +++--- src/o_init.c | 4 ++-- src/rumors.c | 3 --- sys/unix/NetHack.xcodeproj/project.pbxproj | 4 ++++ 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/bones.c b/src/bones.c index f04c4d932..0d56edd48 100644 --- a/src/bones.c +++ b/src/bones.c @@ -587,7 +587,7 @@ struct obj *corpse; int getbones() { - int ok, i; + int ok; NHFILE *nhfp = (NHFILE *) 0; char c = 0, *bonesid, oldbonesid[40]; /* was [10]; more should be safer */ diff --git a/src/dungeon.c b/src/dungeon.c index 58d52227a..5d34f76b7 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -135,7 +135,7 @@ save_dungeon(nhfp, perform_write, free_data) NHFILE *nhfp; boolean perform_write, free_data; { - int i, count; + int count; branch *curr, *next; mapseen *curr_ms, *next_ms; @@ -2396,7 +2396,7 @@ NHFILE *nhfp; mapseen *mptr; { branch *curr; - int i, brindx; + int brindx; for (brindx = 0, curr = g.branches; curr; curr = curr->next, ++brindx) if (curr == mptr->br) @@ -2426,7 +2426,7 @@ static mapseen * load_mapseen(nhfp) NHFILE *nhfp; { - int i, branchnum = 0, brindx; + int branchnum = 0, brindx; mapseen *load; branch *curr; diff --git a/src/o_init.c b/src/o_init.c index cc63fd7cc..467b9079d 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -289,7 +289,7 @@ void savenames(nhfp) NHFILE *nhfp; { - int i, j; + int i; unsigned int len; if (perform_bwrite(nhfp)) { @@ -323,7 +323,7 @@ void restnames(nhfp) NHFILE *nhfp; { - int i, j; + int i; unsigned int len = 0; if (nhfp->structlevel) { diff --git a/src/rumors.c b/src/rumors.c index 4b4e7236f..2236de102 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -386,8 +386,6 @@ void save_oracles(nhfp) NHFILE *nhfp; { - int i; - if (perform_bwrite(nhfp)) { if (nhfp->structlevel) bwrite(nhfp->fd, (genericptr_t) &g.oracle_cnt, sizeof g.oracle_cnt); @@ -409,7 +407,6 @@ void restore_oracles(nhfp) NHFILE *nhfp; { - int i; if (nhfp->structlevel) mread(nhfp->fd, (genericptr_t) &g.oracle_cnt, sizeof g.oracle_cnt); diff --git a/sys/unix/NetHack.xcodeproj/project.pbxproj b/sys/unix/NetHack.xcodeproj/project.pbxproj index ee85f2590..d0658d0a8 100644 --- a/sys/unix/NetHack.xcodeproj/project.pbxproj +++ b/sys/unix/NetHack.xcodeproj/project.pbxproj @@ -147,6 +147,7 @@ 544768AF23994A17004B9739 /* nhlua.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768AD23994A17004B9739 /* nhlua.c */; }; 544768B123994A2C004B9739 /* mdlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768B023994A2C004B9739 /* mdlib.c */; }; 544768BA23995BB7004B9739 /* liblua.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 544768B923995BB7004B9739 /* liblua.a */; }; + 544768BC23A53C9F004B9739 /* nhlobj.c in Sources */ = {isa = PBXBuildFile; fileRef = 544768BB23A53C9F004B9739 /* nhlobj.c */; }; 54FCE8292223261F00F393C8 /* isaac64.c in Sources */ = {isa = PBXBuildFile; fileRef = 54FCE8282223261F00F393C8 /* isaac64.c */; }; /* End PBXBuildFile section */ @@ -489,6 +490,7 @@ 544768B423995447004B9739 /* isaac64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = isaac64.h; path = ../../include/isaac64.h; sourceTree = ""; }; 544768B523995488004B9739 /* nhlua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = nhlua.h; path = ../../include/nhlua.h; sourceTree = ""; }; 544768B923995BB7004B9739 /* liblua.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblua.a; path = ../../lib/lua/liblua.a; sourceTree = ""; }; + 544768BB23A53C9F004B9739 /* nhlobj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nhlobj.c; path = ../../src/nhlobj.c; sourceTree = ""; }; 54FCE8282223261F00F393C8 /* isaac64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = isaac64.c; path = ../../src/isaac64.c; sourceTree = ""; }; /* End PBXFileReference section */ @@ -530,6 +532,7 @@ isa = PBXGroup; children = ( 2A953FB221A3F404007906E5 /* XCode.xcconfig */, + 544768BB23A53C9F004B9739 /* nhlobj.c */, 31B8A3F821A23E490055BD01 /* win */, 31B8A3E921A23CC40055BD01 /* sys */, 3189579621A2046700FB2ABE /* include */, @@ -1484,6 +1487,7 @@ 31B8A3C821A238060055BD01 /* options.c in Sources */, 31B8A3CD21A238060055BD01 /* write.c in Sources */, 31B8A40F21A23EEC0055BD01 /* cursmesg.c in Sources */, + 544768BC23A53C9F004B9739 /* nhlobj.c in Sources */, 31B8A3DF21A238060055BD01 /* end.c in Sources */, 31B8A38921A238060055BD01 /* mklev.c in Sources */, 31B8A3D721A238060055BD01 /* muse.c in Sources */, From f4720edfbf55560ec34baf48ced6c258efede08a Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 14 Dec 2019 12:31:29 -0500 Subject: [PATCH 483/529] include/qtext.h is an empty header so just get rid of it --- include/hack.h | 1 - include/qtext.h | 8 - src/quest.c | 1 - src/questpgr.c | 2 - src/wizard.c | 1 - sys/amiga/Makefile.agc | 8 +- sys/amiga/Makefile.ami | 8 +- sys/msdos/Makefile.BC | 11 +- sys/msdos/Makefile.GCC | 8 +- sys/msdos/Makefile.MSC | 8 +- sys/msdos/Makefile1.cross | 43 ++- sys/msdos/Makefile2.cross | 39 +- sys/os2/Makefile.os2 | 8 +- sys/unix/Makefile.src | 4 +- sys/unix/Makefile.utl | 2 +- sys/unix/NetHack.xcodeproj/project.pbxproj | 2 - sys/vms/Makefile.src | 8 +- sys/vms/Makefile.utl | 2 +- sys/wince/bootstrp.mak | 8 +- sys/winnt/Makefile.gcc | 8 +- sys/winnt/Makefile.msc | 428 +++++++++++++++------ win/win32/vs2017/NetHack.vcxproj | 1 - win/win32/vs2017/makedefs.vcxproj | 1 - 23 files changed, 406 insertions(+), 204 deletions(-) delete mode 100644 include/qtext.h diff --git a/include/hack.h b/include/hack.h index 57600414f..d22197b61 100644 --- a/include/hack.h +++ b/include/hack.h @@ -202,7 +202,6 @@ typedef struct { #include "context.h" #include "rm.h" #include "botl.h" -#include "qtext.h" /* Symbol offsets */ #define SYM_OFF_P (0) diff --git a/include/qtext.h b/include/qtext.h deleted file mode 100644 index 38c535f1f..000000000 --- a/include/qtext.h +++ /dev/null @@ -1,8 +0,0 @@ -/* NetHack 3.6 qtext.h $NHDT-Date: 1505170347 2017/09/11 22:52:27 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.18 $ */ -/* Copyright (c) Mike Stephenson 1991. */ -/* NetHack may be freely redistributed. See license for details. */ - -#ifndef QTEXT_H -#define QTEXT_H - -#endif /* QTEXT_H */ diff --git a/src/quest.c b/src/quest.c index 9813a9ddb..a74cdf41b 100644 --- a/src/quest.c +++ b/src/quest.c @@ -7,7 +7,6 @@ /* quest dungeon branch routines. */ #include "quest.h" -#include "qtext.h" #define Not_firsttime (on_level(&u.uz0, &u.uz)) #define Qstat(x) (g.quest_status.x) diff --git a/src/questpgr.c b/src/questpgr.c index c139a84ac..85c272557 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -7,8 +7,6 @@ /* quest-specific pager routines. */ -#include "qtext.h" - #define QTEXT_FILE "quest.lua" #ifdef TTY_GRAPHICS diff --git a/src/wizard.c b/src/wizard.c index 4201b3812..0cf531ea8 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -9,7 +9,6 @@ /* - generalized for 3.1 (mike@bullns.on01.bull.ca) */ #include "hack.h" -#include "qtext.h" static short FDECL(which_arti, (int)); static boolean FDECL(mon_has_arti, (struct monst *, SHORT_P)); diff --git a/sys/amiga/Makefile.agc b/sys/amiga/Makefile.agc index 6f3c11ecf..e57e18698 100644 --- a/sys/amiga/Makefile.agc +++ b/sys/amiga/Makefile.agc @@ -422,7 +422,7 @@ $(SBIN)makedefs: $(MAKEOBJS) $(LINK) $(LNSPEC) $(SBIN)makedefs $(LIN) $(MAKEOBJS) $(LLIB) $(OO)makedefs.o: $(UTIL)makedefs.c $(I)config.h $(I)permonst.h $(I)monsym.h \ - $(I)objclass.h $(I)patchlevel.h $(I)qtext.h $(I)artilist.h + $(I)objclass.h $(I)patchlevel.h $(I)artilist.h $(CC) $(DEFSPEC)MAKEDEFS_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)makedefs.c $(SBIN)lev_comp: $(SPLEVOBJS) @@ -1071,9 +1071,9 @@ $(O)pray.o: $(NHS)pray.c $(HDEP) $(O)priest.o: $(NHS)priest.c $(HDEP) $(I)mfndpos.h -$(O)quest.o: $(NHS)quest.c $(HDEP) $(I)quest.h $(I)qtext.h +$(O)quest.o: $(NHS)quest.c $(HDEP) $(I)quest.h -$(O)questpgr.o: $(NHS)questpgr.c $(HDEP) $(I)qtext.h $(I)dlb.h +$(O)questpgr.o: $(NHS)questpgr.c $(HDEP) $(I)dlb.h $(O)read.o: $(NHS)read.c $(HDEP) @@ -1140,7 +1140,7 @@ $(O)wield.o: $(NHS)wield.c $(HDEP) $(O)windows.o: $(NHS)windows.c $(HDEP) $(I)wintty.h -$(O)wizard.o: $(NHS)wizard.c $(HDEP) $(I)qtext.h +$(O)wizard.o: $(NHS)wizard.c $(HDEP) $(O)worm.o: $(NHS)worm.c $(HDEP) $(I)lev.h diff --git a/sys/amiga/Makefile.ami b/sys/amiga/Makefile.ami index 43e8dbe98..3ad97af5e 100644 --- a/sys/amiga/Makefile.ami +++ b/sys/amiga/Makefile.ami @@ -690,7 +690,7 @@ $(SBIN)makedefs: $(MAKEOBJS) $(LINK) $(LNSPEC) $(SBIN)makedefs $(LIN) $(MAKEOBJS) $(LLIB) $(OO)makedefs.o: $(UTIL)makedefs.c $(I)config.h $(I)permonst.h $(I)monsym.h \ - $(I)objclass.h $(I)patchlevel.h $(I)qtext.h $(I)artilist.h + $(I)objclass.h $(I)patchlevel.h $(I)artilist.h $(CC) $(DEFSPEC)MAKEDEFS_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)makedefs.c $(SBIN)lev_comp: $(SPLEVOBJS) @@ -1403,9 +1403,9 @@ $(O)pray.o: $(NHS)pray.c $(HDEP) $(O)priest.o: $(NHS)priest.c $(HDEP) $(I)mfndpos.h -$(O)quest.o: $(NHS)quest.c $(HDEP) $(I)quest.h $(I)qtext.h +$(O)quest.o: $(NHS)quest.c $(HDEP) $(I)quest.h -$(O)questpgr.o: $(NHS)questpgr.c $(HDEP) $(I)qtext.h $(I)dlb.h +$(O)questpgr.o: $(NHS)questpgr.c $(HDEP) $(I)dlb.h $(O)read.o: $(NHS)read.c $(HDEP) @@ -1476,7 +1476,7 @@ $(O)wield.o: $(NHS)wield.c $(HDEP) $(O)windows.o: $(NHS)windows.c $(HDEP) $(I)wintty.h -$(O)wizard.o: $(NHS)wizard.c $(HDEP) $(I)qtext.h +$(O)wizard.o: $(NHS)wizard.c $(HDEP) $(O)worm.o: $(NHS)worm.c $(HDEP) $(I)lev.h diff --git a/sys/msdos/Makefile.BC b/sys/msdos/Makefile.BC index b537ad0e7..c68df0593 100644 --- a/sys/msdos/Makefile.BC +++ b/sys/msdos/Makefile.BC @@ -888,7 +888,6 @@ OBJ_H = $(INCL)\obj.h OBJCLASS_H = $(INCL)\objclass.h OBJECTS_H = $(INCL)\objects.h PROP_H = $(INCL)\prop.h -QTEXT_H = $(INCL)\qtext.h QUEST_H = $(INCL)\quest.h SP_LEV_H = $(INCL)\sp_lev.h TERMCAP_H = $(INCL)\tcap.h @@ -1025,7 +1024,7 @@ $(U)makedefs.exe: $(MAKEOBJS) @$(LINK) $(LFLAGSU) $(MAKEOBJS), $@,, $(CLIB) $(BCMDL); $(O)makedefs.o: $(CONFIG_H) $(PERMONST_H) $(OBJCLASS_H) \ - $(MONSYM_H) $(QTEXT_H) $(PATCHLEVEL_H) \ + $(MONSYM_H) $(PATCHLEVEL_H) \ $(U)makedefs.c @echo $(BCOPTS1) > $(VROOMMCFG) @echo $(BCOPTS2) >> $(VROOMMCFG) @@ -1854,8 +1853,8 @@ $(O)pager.o: $(SRC)\pager.c $(HACK_H) $(DLB_H) $(CC) $(CFLAGNO) $(COBJNAM)$@ $(SRC)\pager.c $(O)pickup.o: $(PCHO) $(SRC)\pickup.c $(HACK_H) $(O)pray.o: $(PCHO) $(SRC)\pray.c $(HACK_H) -$(O)quest.o: $(PCHO) $(SRC)\quest.c $(HACK_H) $(QUEST_H) $(QTEXT_H) -$(O)questpgr.o: $(PCHO) $(SRC)\questpgr.c $(HACK_H) $(QTEXT_H) $(DLB_H) +$(O)quest.o: $(PCHO) $(SRC)\quest.c $(HACK_H) $(QUEST_H) +$(O)questpgr.o: $(PCHO) $(SRC)\questpgr.c $(HACK_H) $(DLB_H) $(O)rect.o: $(PCHO) $(SRC)\rect.c $(HACK_H) $(O)region.o: $(PCHO) $(SRC)\region.c $(HACK_H) $(O)restore.o: $(PCHO) $(SRC)\restore.c $(HACK_H) $(LEV_H) $(TERMCAP_H) \ @@ -1938,7 +1937,7 @@ $(O)trap.0: $(PCH0) $(SRC)\trap.c $(HACK_H) $(O)vault.0: $(PCH0) $(SRC)\vault.c $(HACK_H) $(O)weapon.0: $(PCH0) $(SRC)\weapon.c $(HACK_H) $(O)were.0: $(PCH0) $(SRC)\were.c $(HACK_H) -$(O)wizard.0: $(PCH0) $(SRC)\wizard.c $(HACK_H) $(QTEXT_H) +$(O)wizard.0: $(PCH0) $(SRC)\wizard.c $(HACK_H) $(O)zap.0: $(PCH0) $(SRC)\zap.c $(HACK_H) # @@ -2067,7 +2066,7 @@ $(O)trap.B: $(PCHB) $(SRC)\trap.c $(HACK_H) $(O)vault.B: $(PCHB) $(SRC)\vault.c $(HACK_H) $(O)weapon.B: $(PCHB) $(SRC)\weapon.c $(HACK_H) $(O)were.B: $(PCHB) $(SRC)\were.c $(HACK_H) -$(O)wizard.B: $(PCHB) $(SRC)\wizard.c $(HACK_H) $(QTEXT_H) +$(O)wizard.B: $(PCHB) $(SRC)\wizard.c $(HACK_H) $(O)zap.B: $(PCHB) $(SRC)\zap.c $(HACK_H) # end of file diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index fa40661c3..b924f8019 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -749,7 +749,7 @@ $(U)makedefs.exe: $(MAKEDEFSOBJS) $(LINK) $(LFLAGS) -o$@ $(MAKEDEFSOBJS) $(O)makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/objclass.h \ - $(INCL)/monsym.h $(INCL)/qtext.h $(U)makedefs.c + $(INCL)/monsym.h $(U)makedefs.c ifneq "$(ADD_LUA)" "Y" #========================================== @@ -1468,8 +1468,8 @@ $(O)polyself.o: polyself.c $(HACK_H) $(O)potion.o: potion.c $(HACK_H) $(O)pray.o: pray.c $(HACK_H) $(O)priest.o: priest.c $(HACK_H) $(INCL)/mfndpos.h -$(O)quest.o: quest.c $(HACK_H) $(INCL)/qtext.h -$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(INCL)/qtext.h +$(O)quest.o: quest.c $(HACK_H) +$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(O)read.o: read.c $(HACK_H) $(O)rect.o: rect.c $(HACK_H) $(O)region.o: region.c $(HACK_H) $(INCL)/lev.h @@ -1502,7 +1502,7 @@ $(O)weapon.o: weapon.c $(HACK_H) $(O)were.o: were.c $(HACK_H) $(O)wield.o: wield.c $(HACK_H) $(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h -$(O)wizard.o: wizard.c $(HACK_H) $(INCL)/qtext.h +$(O)wizard.o: wizard.c $(HACK_H) $(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h $(O)worn.o: worn.c $(HACK_H) $(O)write.o: write.c $(HACK_H) diff --git a/sys/msdos/Makefile.MSC b/sys/msdos/Makefile.MSC index 488382a7a..90c9462d6 100644 --- a/sys/msdos/Makefile.MSC +++ b/sys/msdos/Makefile.MSC @@ -583,7 +583,7 @@ $(U)makedefs.exe: $(MAKEOBJS) << makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)\objclass.h \ - $(INCL)\monsym.h $(INCL)\qtext.h $(UTIL)\makedefs.c + $(INCL)\monsym.h $(UTIL)\makedefs.c # The following include files depend on makedefs to be created. # @@ -1181,8 +1181,8 @@ polyself.o: polyself.c $(HACK_H) potion.o: potion.c $(HACK_H) pray.o: pray.c $(HACK_H) priest.o: priest.c $(HACK_H) $(INCL)\mfndpos.h -quest.o: quest.c $(HACK_H) $(INCL)\qtext.h -questpgr.o: questpgr.c $(HACK_H) $(INCL)\dlb.h $(INCL)\qtext.h +quest.o: quest.c $(HACK_H) +questpgr.o: questpgr.c $(HACK_H) $(INCL)\dlb.h read.o: read.c $(HACK_H) rect.o: rect.c $(HACK_H) region.o: region.c $(HACK_H) @@ -1215,7 +1215,7 @@ weapon.o: weapon.c $(HACK_H) were.o: were.c $(HACK_H) wield.o: wield.c $(HACK_H) windows.o: windows.c $(HACK_H) $(INCL)\wingem.h -wizard.o: wizard.c $(HACK_H) $(INCL)\qtext.h +wizard.o: wizard.c $(HACK_H) worm.o: worm.c $(HACK_H) $(INCL)\lev.h worn.o: worn.c $(HACK_H) write.o: write.c $(HACK_H) diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index 1cdc6d287..a2af8b1fb 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -192,19 +192,34 @@ YOU_H = $(MONST_H) $(YOUPROP_H) $(INCL)/align.h \ DISPLAY_H = $(MONDATA_H) $(INCL)/vision.h $(INCL)/display.h PCCONF_H = $(INCL)/micro.h $(INCL)/system.h $(INCL)/pcconf.h \ $(MSYS)/pcvideo.h -CONFIG_H = $(GLOBAL_H) $(INCL)/tradstdc.h $(INCL)/config1.h \ - $(INCL)/config.h DECL_H = $(YOU_H) $(INCL)/spell.h $(INCL)/color.h \ $(INCL)/obj.h $(INCL)/onames.h $(INCL)/pm.h \ $(INCL)/decl.h GLOBAL_H = $(PCCONF_H) $(INCL)/coord.h $(INCL)/global.h -HACK_H = $(CONFIG_H) $(INCL)/context.h $(DUNGEON_H) \ - $(DECL_H) $(DISPLAY_H) $(INCL)/monsym.h \ - $(INCL)/mkroom.h $(INCL)/objclass.h $(INCL)/trap.h \ - $(INCL)/flag.h $(RM_H) $(INCL)/vision.h \ - $(INCL)/wintype.h $(INCL)/engrave.h $(INCL)/rect.h \ - $(INCL)/trampoli.h $(INCL)/hack.h $(REGION_H) \ - $(INCL)/sys.h + +CONFIG_H = $(INCL)/config.h $(INCL)/config1.h $(INCL)/tradstdc.h \ + $(INCL)/global.h $(INCL)/coord.h $(INCL)/vmsconf.h \ + $(INCL)/system.h $(INCL)/nhlua.h $(INCL)/unixconf.h \ + $(INCL)/os2conf.h $(INCL)/micro.h $(INCL)/pcconf.h \ + $(INCL)/tosconf.h $(INCL)/amiconf.h $(INCL)/macconf.h \ + $(INCL)/beconf.h $(INCL)/wceconf.h $(INCL)/ntconf.h + +HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/lint.h $(INCL)/align.h \ + $(INCL)/dungeon.h $(INCL)/monsym.h $(INCL)/mkroom.h \ + $(INCL)/objclass.h $(INCL)/youprop.h $(INCL)/prop.h \ + $(INCL)/permonst.h $(INCL)/monattk.h \ + $(INCL)/monflag.h $(INCL)/mondata.h $(INCL)/pm.h \ + $(INCL)/wintype.h $(INCL)/context.h $(INCL)/rm.h \ + $(INCL)/botl.h $(INCL)/rect.h \ + $(INCL)/region.h $(INCL)/decl.h $(INCL)/quest.h \ + $(INCL)/spell.h $(INCL)/color.h $(INCL)/obj.h \ + $(INCL)/you.h $(INCL)/attrib.h $(INCL)/monst.h \ + $(INCL)/mextra.h $(INCL)/skills.h $(INCL)/onames.h \ + $(INCL)/timeout.h $(INCL)/trap.h $(INCL)/flag.h \ + $(INCL)/vision.h $(INCL)/display.h $(INCL)/engrave.h \ + $(INCL)/winprocs.h $(INCL)/sys.h $(INCL)/wintty.h \ + $(INCL)/trampoli.h + DLB_H = $(INCL)/dlb.h ifeq ($(SUPPRESS_GRAPHICS),Y) @@ -396,9 +411,13 @@ hobj.tag: $(U)makedefs: $(MAKEDEFSOBJS) $(HOST_LINK) $(LFLAGS) -o$@ $(MAKEDEFSOBJS) -$(HOST_O)makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/objclass.h \ - $(INCL)/monsym.h $(INCL)/qtext.h $(U)makedefs.c - $(HOST_CC) $(cflags) -o$@ $(U)makedefs.c +$(O)makedefs$(HOST).o: + +$(HOST_O)makedefs.o: $(U)makedefs.c $(SRC)/mdlib.c $(CONFIG_H) $(INCL)/permonst.h \ + $(INCL)/objclass.h $(INCL)/monsym.h \ + $(INCL)/artilist.h $(INCL)/dungeon.h $(INCL)/obj.h \ + $(INCL)/monst.h $(INCL)/you.h $(INCL)/flag.h \ + $(INCL)/dlb.h $(INCL)/patchlevel.h #============================================= # Header file moves required for tile support diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 6b0b79632..978c013a3 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -440,19 +440,34 @@ YOU_H = $(MONST_H) $(YOUPROP_H) $(INCL)/align.h \ DISPLAY_H = $(MONDATA_H) $(INCL)/vision.h $(INCL)/display.h PCCONF_H = $(INCL)/micro.h $(INCL)/system.h $(INCL)/pcconf.h \ $(MSYS)/pcvideo.h -CONFIG_H = $(GLOBAL_H) $(INCL)/tradstdc.h $(INCL)/config1.h \ - $(INCL)/config.h DECL_H = $(YOU_H) $(INCL)/spell.h $(INCL)/color.h \ $(INCL)/obj.h $(INCL)/onames.h $(INCL)/pm.h \ $(INCL)/decl.h GLOBAL_H = $(PCCONF_H) $(INCL)/coord.h $(INCL)/global.h -HACK_H = $(CONFIG_H) $(INCL)/context.h $(DUNGEON_H) \ - $(DECL_H) $(DISPLAY_H) $(INCL)/monsym.h \ - $(INCL)/mkroom.h $(INCL)/objclass.h $(INCL)/trap.h \ - $(INCL)/flag.h $(RM_H) $(INCL)/vision.h \ - $(INCL)/wintype.h $(INCL)/engrave.h $(INCL)/rect.h \ - $(INCL)/trampoli.h $(INCL)/hack.h $(REGION_H) \ - $(INCL)/sys.h + +CONFIG_H = $(INCL)/config.h $(INCL)/config1.h $(INCL)/tradstdc.h \ + $(INCL)/global.h $(INCL)/coord.h $(INCL)/vmsconf.h \ + $(INCL)/system.h $(INCL)/nhlua.h $(INCL)/unixconf.h \ + $(INCL)/os2conf.h $(INCL)/micro.h $(INCL)/pcconf.h \ + $(INCL)/tosconf.h $(INCL)/amiconf.h $(INCL)/macconf.h \ + $(INCL)/beconf.h $(INCL)/wceconf.h $(INCL)/ntconf.h + +HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/lint.h $(INCL)/align.h \ + $(INCL)/dungeon.h $(INCL)/monsym.h $(INCL)/mkroom.h \ + $(INCL)/objclass.h $(INCL)/youprop.h $(INCL)/prop.h \ + $(INCL)/permonst.h $(INCL)/monattk.h \ + $(INCL)/monflag.h $(INCL)/mondata.h $(INCL)/pm.h \ + $(INCL)/wintype.h $(INCL)/context.h $(INCL)/rm.h \ + $(INCL)/botl.h $(INCL)/rect.h \ + $(INCL)/region.h $(INCL)/decl.h $(INCL)/quest.h \ + $(INCL)/spell.h $(INCL)/color.h $(INCL)/obj.h \ + $(INCL)/you.h $(INCL)/attrib.h $(INCL)/monst.h \ + $(INCL)/mextra.h $(INCL)/skills.h $(INCL)/onames.h \ + $(INCL)/timeout.h $(INCL)/trap.h $(INCL)/flag.h \ + $(INCL)/vision.h $(INCL)/display.h $(INCL)/engrave.h \ + $(INCL)/winprocs.h $(INCL)/sys.h $(INCL)/wintty.h \ + $(INCL)/trampoli.h + DLB_H = $(INCL)/dlb.h ifeq ($(SUPPRESS_GRAPHICS),Y) @@ -1104,8 +1119,8 @@ $(O)polyself.o: polyself.c $(HACK_H) $(O)potion.o: potion.c $(HACK_H) $(O)pray.o: pray.c $(HACK_H) $(O)priest.o: priest.c $(HACK_H) $(INCL)/mfndpos.h -$(O)quest.o: quest.c $(HACK_H) $(INCL)/qtext.h -$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(INCL)/qtext.h +$(O)quest.o: quest.c $(HACK_H) +$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(O)read.o: read.c $(HACK_H) $(O)rect.o: rect.c $(HACK_H) $(O)region.o: region.c $(HACK_H) $(INCL)/lev.h @@ -1138,7 +1153,7 @@ $(O)weapon.o: weapon.c $(HACK_H) $(O)were.o: were.c $(HACK_H) $(O)wield.o: wield.c $(HACK_H) $(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h -$(O)wizard.o: wizard.c $(HACK_H) $(INCL)/qtext.h +$(O)wizard.o: wizard.c $(HACK_H) $(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h $(O)worn.o: worn.c $(HACK_H) $(O)write.o: write.c $(HACK_H) diff --git a/sys/os2/Makefile.os2 b/sys/os2/Makefile.os2 index 4afcf0fdf..2c1045a4c 100644 --- a/sys/os2/Makefile.os2 +++ b/sys/os2/Makefile.os2 @@ -950,7 +950,7 @@ $(TEMP)\makedefs.rsp : $(MAKEOBJS) $(TEMP)\$(MKDFDEF) $(ECHO) $(MKDFMD) $(LFLAGS);>> $@ $(OBJ)\makedefs.o : $(UTIL)\$(CB) $(CONFIG_H) $(INCL)\permonst.h $(INCL)\objclass.h \ - $(INCL)\monsym.h $(INCL)\artilist.h $(INCL)\qtext.h + $(INCL)\monsym.h $(INCL)\artilist.h $(UTILCC) # @@ -1643,9 +1643,9 @@ $(OBJ)\pray.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) $(OBJ)\priest.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\mfndpos.h $(SRCCC) -$(OBJ)\quest.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\quest.h $(INCL)\qtext.h +$(OBJ)\quest.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\quest.h $(SRCCC) -$(OBJ)\questpgr.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\qtext.h +$(OBJ)\questpgr.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) $(OBJ)\read.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) @@ -1711,7 +1711,7 @@ $(OBJ)\wield.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) $(OBJ)\windows.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) -$(OBJ)\wizard.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\qtext.h +$(OBJ)\wizard.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) $(OBJ)\worm.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\lev.h $(SRCCC) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index ee4254ed9..9f981a72b 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -640,7 +640,7 @@ $(MAKEDEFS): $(FIRSTOBJ) \ ../include/objclass.h ../include/monsym.h \ ../include/artilist.h ../include/dungeon.h ../include/obj.h \ ../include/monst.h ../include/you.h ../include/flag.h \ - ../include/dlb.h ../include/patchlevel.h ../include/qtext.h + ../include/dlb.h ../include/patchlevel.h @( cd ../util ; $(MAKE) makedefs ) # Source files created by 'makedefs' at build time. @@ -742,7 +742,7 @@ $(HACK_H): ../include/hack.h $(CONFIG_H) ../include/lint.h ../include/align.h \ ../include/permonst.h ../include/monattk.h \ ../include/monflag.h ../include/mondata.h ../include/pm.h \ ../include/wintype.h ../include/context.h ../include/rm.h \ - ../include/botl.h ../include/qtext.h ../include/rect.h \ + ../include/botl.h ../include/rect.h \ ../include/region.h ../include/decl.h ../include/quest.h \ ../include/spell.h ../include/color.h ../include/obj.h \ ../include/you.h ../include/attrib.h ../include/monst.h \ diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl index b27e91ded..53a0805fb 100644 --- a/sys/unix/Makefile.utl +++ b/sys/unix/Makefile.utl @@ -226,7 +226,7 @@ makedefs.o: makedefs.c ../src/mdlib.c $(CONFIG_H) ../include/permonst.h \ ../include/objclass.h ../include/monsym.h \ ../include/artilist.h ../include/dungeon.h ../include/obj.h \ ../include/monst.h ../include/you.h ../include/flag.h \ - ../include/dlb.h ../include/patchlevel.h ../include/qtext.h + ../include/dlb.h ../include/patchlevel.h # Don't require perl to build; that is why mdgrep.h is spelled wrong below. mdgreph: mdgrep.pl diff --git a/sys/unix/NetHack.xcodeproj/project.pbxproj b/sys/unix/NetHack.xcodeproj/project.pbxproj index d0658d0a8..f0088d4fd 100644 --- a/sys/unix/NetHack.xcodeproj/project.pbxproj +++ b/sys/unix/NetHack.xcodeproj/project.pbxproj @@ -267,7 +267,6 @@ 3186A38F21A4B0FC0052BF02 /* monflag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = monflag.h; path = ../../include/monflag.h; sourceTree = ""; }; 3186A39021A4B0FC0052BF02 /* lev_comp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lev_comp.h; path = ../../include/lev_comp.h; sourceTree = ""; }; 3186A39121A4B0FC0052BF02 /* micro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = micro.h; path = ../../include/micro.h; sourceTree = ""; }; - 3186A39221A4B0FC0052BF02 /* qtext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = qtext.h; path = ../../include/qtext.h; sourceTree = ""; }; 3186A39321A4B0FC0052BF02 /* xwindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xwindow.h; path = ../../include/xwindow.h; sourceTree = ""; }; 3186A39421A4B0FC0052BF02 /* tileset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tileset.h; path = ../../include/tileset.h; sourceTree = ""; }; 3186A39521A4B0FC0052BF02 /* obj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = obj.h; path = ../../include/obj.h; sourceTree = ""; }; @@ -765,7 +764,6 @@ 3186A37821A4B0FA0052BF02 /* qt_kde0.h */, 3186A3B421A4B0FD0052BF02 /* qt_win.h */, 3186A3BD21A4B0FD0052BF02 /* qt_xpms.h */, - 3186A39221A4B0FC0052BF02 /* qtext.h */, 3186A3C421A4B0FE0052BF02 /* qttableview.h */, 3186A39E21A4B0FD0052BF02 /* quest.h */, 3186A37C21A4B0FA0052BF02 /* rect.h */, diff --git a/sys/vms/Makefile.src b/sys/vms/Makefile.src index 957335710..0908ba590 100644 --- a/sys/vms/Makefile.src +++ b/sys/vms/Makefile.src @@ -313,7 +313,7 @@ $(MAKEDEFS) : $(FIRSTOBJ) $(UTL)makedefs.c \ $(CONFIG_H) $(INC)permonst.h $(INC)objclass.h \ $(INC)monsym.h $(INC)artilist.h $(INC)dungeon.h \ $(INC)obj.h $(INC)monst.h $(INC)you.h $(INC)flag.h \ - $(INC)dlb.h $(INC)patchlevel.h $(INC)qtext.h \ + $(INC)dlb.h $(INC)patchlevel.h \ $(LIBOPT) $(ID_OPT) $(CD) $(UTL) $(MAKE)$(MAKEFLAGS) $(MAKEDEFS) @@ -557,8 +557,8 @@ polyself.obj : polyself.c $(HACK_H) potion.obj : potion.c $(HACK_H) pray.obj : pray.c $(HACK_H) priest.obj : priest.c $(HACK_H) $(INC)mfndpos.h -quest.obj : quest.c $(HACK_H) $(INC)qtext.h -questpgr.obj : questpgr.c $(HACK_H) $(INC)dlb.h $(INC)qtext.h +quest.obj : quest.c $(HACK_H) +questpgr.obj : questpgr.c $(HACK_H) $(INC)dlb.h read.obj : read.c $(HACK_H) rect.obj : rect.c $(HACK_H) region.obj : region.c $(HACK_H) $(INC)lev.h @@ -591,7 +591,7 @@ weapon.obj : weapon.c $(HACK_H) were.obj : were.c $(HACK_H) wield.obj : wield.c $(HACK_H) windows.obj : windows.c $(HACK_H) $(INC)wingem.h $(INC)winGnome.h -wizard.obj : wizard.c $(HACK_H) $(INC)qtext.h +wizard.obj : wizard.c $(HACK_H) worm.obj : worm.c $(HACK_H) $(INC)lev.h worn.obj : worn.c $(HACK_H) write.obj : write.c $(HACK_H) diff --git a/sys/vms/Makefile.utl b/sys/vms/Makefile.utl index 0766930c8..713a37995 100644 --- a/sys/vms/Makefile.utl +++ b/sys/vms/Makefile.utl @@ -167,7 +167,7 @@ makedefs.obj : makedefs.c \ $(CONFIG_H) $(INC)permonst.h $(INC)objclass.h \ $(INC)monsym.h $(INC)artilist.h $(INC)dungeon.h \ $(INC)obj.h $(INC)monst.h $(INC)you.h $(INC)flag.h \ - $(INC)dlb.h $(INC)patchlevel.h $(INC)qtext.h + $(INC)dlb.h $(INC)patchlevel.h $(INC)onames.h : $(MAKEDEFS) $(RUN) $(MAKEDEFS) -o diff --git a/sys/wince/bootstrp.mak b/sys/wince/bootstrp.mak index 5d92dc760..7fe11616a 100644 --- a/sys/wince/bootstrp.mak +++ b/sys/wince/bootstrp.mak @@ -291,7 +291,7 @@ $(U)makedefs.exe: $(MAKEOBJS) $(link) $(LFLAGSU) -out:$@ $(MAKEOBJS) $(O)makedefs.o: $(CONFIG_H) $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\objclass.h \ - $(INCL)\monsym.h $(INCL)\qtext.h $(INCL)\patchlevel.h \ + $(INCL)\monsym.h $(INCL)\patchlevel.h \ $(U)makedefs.c if not exist $(OBJ)\*.* echo creating directory $(OBJ) if not exist $(OBJ)\*.* mkdir $(OBJ) @@ -834,8 +834,8 @@ $(O)polyself.o: $(SRC)\polyself.c $(HACK_H) $(O)potion.o: $(SRC)\potion.c $(HACK_H) $(O)pray.o: $(SRC)\pray.c $(HACK_H) $(O)priest.o: $(SRC)\priest.c $(HACK_H) $(INCL)\mfndpos.h -$(O)quest.o: $(SRC)\quest.c $(HACK_H) $(INCL)\qtext.h -$(O)questpgr.o: $(SRC)\questpgr.c $(HACK_H) $(INCL)\dlb.h $(INCL)\qtext.h +$(O)quest.o: $(SRC)\quest.c $(HACK_H) +$(O)questpgr.o: $(SRC)\questpgr.c $(HACK_H) $(INCL)\dlb.h $(O)read.o: $(SRC)\read.c $(HACK_H) $(O)rect.o: $(SRC)\rect.c $(HACK_H) $(O)region.o: $(SRC)\region.c $(HACK_H) $(INCL)\lev.h @@ -867,7 +867,7 @@ $(O)weapon.o: $(SRC)\weapon.c $(HACK_H) $(O)were.o: $(SRC)\were.c $(HACK_H) $(O)wield.o: $(SRC)\wield.c $(HACK_H) $(O)windows.o: $(SRC)\windows.c $(HACK_H) $(INCL)\wingem.h $(INCL)\winGnome.h -$(O)wizard.o: $(SRC)\wizard.c $(HACK_H) $(INCL)\qtext.h +$(O)wizard.o: $(SRC)\wizard.c $(HACK_H) $(O)worm.o: $(SRC)\worm.c $(HACK_H) $(INCL)\lev.h $(O)worn.o: $(SRC)\worn.c $(HACK_H) $(O)write.o: $(SRC)\write.c $(HACK_H) diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 5ba9ef68a..5119d3eec 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -899,7 +899,7 @@ $(U)makedefs.exe: $(MAKEOBJS) $(link) $(LFLAGSU) -o$@ $(MAKEOBJS) $(O)makedefs.o: $(CONFIG_H) $(INCL)/monattk.h $(INCL)/monflag.h \ - $(INCL)/objclass.h $(INCL)/monsym.h $(INCL)/qtext.h \ + $(INCL)/objclass.h $(INCL)/monsym.h \ $(INCL)/patchlevel.h $(U)makedefs.c $(cc) $(CFLAGSU) -o$@ $(U)makedefs.c @@ -1607,8 +1607,8 @@ $(O)polyself.o: polyself.c $(HACK_H) $(O)potion.o: potion.c $(HACK_H) $(O)pray.o: pray.c $(HACK_H) $(O)priest.o: priest.c $(HACK_H) $(INCL)/mfndpos.h -$(O)quest.o: quest.c $(HACK_H) $(INCL)/qtext.h -$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(INCL)/qtext.h +$(O)quest.o: quest.c $(HACK_H) +$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(O)read.o: read.c $(HACK_H) $(O)rect.o: rect.c $(HACK_H) $(O)region.o: region.c $(HACK_H) $(INCL)/lev.h @@ -1642,7 +1642,7 @@ $(O)were.o: were.c $(HACK_H) $(O)wield.o: wield.c $(HACK_H) $(O)windmain.o: $(MSWSYS)/windmain.c $(HACK_H) $(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h -$(O)wizard.o: wizard.c $(HACK_H) $(INCL)/qtext.h +$(O)wizard.o: wizard.c $(HACK_H) $(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h $(O)worn.o: worn.c $(HACK_H) $(O)write.o: write.c $(HACK_H) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index aff743a53..e11078f64 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -486,28 +486,27 @@ PDCLIB = CONFIG_H = $(INCL)\config.h $(INCL)\config1.h $(INCL)\tradstdc.h \ $(INCL)\global.h $(INCL)\coord.h $(INCL)\vmsconf.h \ - $(INCL)\system.h $(INCL)\unixconf.h $(INCL)\os2conf.h \ - $(INCL)\micro.h $(INCL)\pcconf.h $(INCL)\tosconf.h \ - $(INCL)\amiconf.h $(INCL)\macconf.h $(INCL)\beconf.h \ - $(INCL)\ntconf.h + $(INCL)\system.h $(INCL)\nhlua.h $(INCL)\unixconf.h \ + $(INCL)\os2conf.h $(INCL)\micro.h $(INCL)\pcconf.h \ + $(INCL)\tosconf.h $(INCL)\amiconf.h $(INCL)\macconf.h \ + $(INCL)\beconf.h $(INCL)\wceconf.h $(INCL)\ntconf.h -HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\align.h $(INCL)\context.h \ +HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\lint.h $(INCL)\align.h \ $(INCL)\dungeon.h $(INCL)\monsym.h $(INCL)\mkroom.h \ $(INCL)\objclass.h $(INCL)\youprop.h $(INCL)\prop.h \ $(INCL)\permonst.h $(INCL)\monattk.h \ $(INCL)\monflag.h $(INCL)\mondata.h $(INCL)\pm.h \ - $(INCL)\wintype.h $(INCL)\decl.h $(INCL)\quest.h \ + $(INCL)\wintype.h $(INCL)\context.h $(INCL)\rm.h \ + $(INCL)\botl.h $(INCL)\rect.h \ + $(INCL)\region.h $(INCL)\decl.h $(INCL)\quest.h \ $(INCL)\spell.h $(INCL)\color.h $(INCL)\obj.h \ - $(INCL)\you.h $(INCL)\attrib.h $(INCL)\monst.h $(INCL)\lint.h \ + $(INCL)\you.h $(INCL)\attrib.h $(INCL)\monst.h \ $(INCL)\mextra.h $(INCL)\skills.h $(INCL)\onames.h \ - $(INCL)\timeout.h $(INCL)\trap.h $(INCL)\flag.h $(INCL)\rm.h \ + $(INCL)\timeout.h $(INCL)\trap.h $(INCL)\flag.h \ $(INCL)\vision.h $(INCL)\display.h $(INCL)\engrave.h \ - $(INCL)\rect.h $(INCL)\region.h $(INCL)\winprocs.h $(INCL)\botl.h \ - $(INCL)\wintty.h $(INCL)\sys.h $(INCL)\trampoli.h + $(INCL)\winprocs.h $(INCL)\sys.h $(INCL)\wintty.h \ + $(INCL)\trampoli.h -LEV_H = $(INCL)\lev.h -DGN_FILE_H = $(INCL)\dgn_file.h -SP_LEV_H = $(INCL)\sp_lev.h TILE_H = ..\win\share\tile.h #========================================== @@ -793,7 +792,7 @@ DLB = #========================================== {$(TTY)}.c{$(OBJ)}.o: - $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< #========================================== @@ -801,7 +800,7 @@ DLB = #========================================== {$(MSWIN)}.c{$(OBJ)}.o: - $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< #========================================== # Rules for files in win\curses @@ -1077,13 +1076,15 @@ $(U)makedefs.exe: $(MAKEDEFSOBJS) @echo Linking $(@:\=/) @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(MAKEDEFSOBJS) -$(O)makedefs$(HOST).o: $(CONFIG_H) $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\objclass.h \ - $(INCL)\monsym.h $(INCL)\qtext.h $(INCL)\patchlevel.h \ - $(U)makedefs.c +$(O)makedefs$(HOST).o: $(U)makedefs.c $(SRC)\mdlib.c $(CONFIG_H) $(INCL)\permonst.h \ + $(INCL)\objclass.h $(INCL)\monsym.h \ + $(INCL)\artilist.h $(INCL)\dungeon.h $(INCL)\obj.h \ + $(INCL)\monst.h $(INCL)\you.h $(INCL)\flag.h \ + $(INCL)\dlb.h $(INCL)\patchlevel.h @if not exist $(OBJ)\*.* echo creating directory $(OBJ:\=/) @if not exist $(OBJ)\*.* mkdir $(OBJ) - $(cc) -DENUM_PM $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ $(U)makedefs.c -# $(cc) -DENUM_PM $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /EP -Fo$@ $(U)makedefs.c >makedefs.c.preprocessed + @$(cc) -DENUM_PM $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ $(U)makedefs.c +# @$(cc) -DENUM_PM $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /EP -Fo$@ $(U)makedefs.c >makedefs.c.preprocessed # # date.h should be remade every time any of the source or include @@ -1383,7 +1384,7 @@ $(O)pdcurses.lib : $(PDCLIBOBJS) $(PDCOBJS) lib -nologo /out:$@ $(PDCLIBOBJS) $(PDCOBJS) $(O)pdcscrn.o : $(PDCURSES_HEADERS) $(PDCWINCON)\pdcscrn.c $(MSWSYS)\stub-pdcscrn.c - $(cc) $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $(MSWSYS)\stub-pdcscrn.c + @$(cc) $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $(MSWSYS)\stub-pdcscrn.c #=============================================================================== # LUA @@ -1422,12 +1423,12 @@ $(O)lapi.o: $(LUASRC)\lapi.c !IFDEF CROSSCOMPILE_HOST $(O)mdlib$(HOST).o: $(SRC)\mdlib.c - $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_HOST) -Fo$@ $(SRC)\mdlib.c + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSDEFINE_HOST) -Fo$@ $(SRC)\mdlib.c !ENDIF $(O)mdlib.o: $(SRC)\mdlib.c - $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $(SRC)\mdlib.c -# $(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) /EP -Fo$@ $(SRC)\mdlib.c >mdlib.c.preprocessed + @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $(SRC)\mdlib.c +# @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) /EP -Fo$@ $(SRC)\mdlib.c >mdlib.c.preprocessed #=============================================================================== # Housekeeping @@ -1698,148 +1699,315 @@ $(O)curswins.o: $(WCURSES)\curswins.c $(WCURSES)\curswins.h $(INCL)\wincurs.h # * slashes changed to back-slashes # * -c (which is included in CFLAGS) substituted with -Fo$@ # * $(CFLAGS) replaced with $(cflagsBuild) -# * $(CC) replaced with @$(CC) +# * $(CC) replaced with @$(cc) # * targets prefixed with $(O) +# * win/X11/Window.o commented due to conflict with pdcurses +# * most recipes below are commented out because the flags are incorrect +# and probably a different variant is used above # but otherwise untouched. # That means that there is some irrelevant stuff # in here, but maintenance should be easier. # - $(O)tos.o: ..\sys\atari\tos.c $(HACK_H) $(INCL)\tcap.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\atari\tos.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\atari\tos.c +$(O)pcmain.o: ..\sys\share\pcmain.c $(HACK_H) $(INCL)\dlb.h +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\share\pcmain.c +$(O)pcsys.o: ..\sys\share\pcsys.c $(HACK_H) +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\share\pcsys.c $(O)pctty.o: ..\sys\share\pctty.c $(HACK_H) -# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\pctty.c -$(O)isaac64.o: ..\src\isaac64.c $(HACK_H) $(INCL)\isaac64.h $(INCL)\integer.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\src\isaac64.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\share\pctty.c +$(O)pcunix.o: ..\sys\share\pcunix.c $(HACK_H) +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\share\pcunix.c +$(O)pmatchregex.o: ..\sys\share\pmatchregex.c $(HACK_H) +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\share\pmatchregex.c +$(O)posixregex.o: ..\sys\share\posixregex.c $(HACK_H) +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\share\posixregex.c $(O)random.o: ..\sys\share\random.c $(HACK_H) -# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\random.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\share\random.c $(O)ioctl.o: ..\sys\share\ioctl.c $(HACK_H) $(INCL)\tcap.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\ioctl.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\share\ioctl.c $(O)unixtty.o: ..\sys\share\unixtty.c $(HACK_H) -# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\unixtty.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\share\unixtty.c $(O)unixmain.o: ..\sys\unix\unixmain.c $(HACK_H) $(INCL)\dlb.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixmain.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\unix\unixmain.c $(O)unixunix.o: ..\sys\unix\unixunix.c $(HACK_H) -# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixunix.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\unix\unixunix.c $(O)unixres.o: ..\sys\unix\unixres.c $(CONFIG_H) -# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixres.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\unix\unixres.c $(O)bemain.o: ..\sys\be\bemain.c $(HACK_H) $(INCL)\dlb.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\sys\be\bemain.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\sys\be\bemain.c $(O)getline.o: ..\win\tty\getline.c $(HACK_H) $(INCL)\func_tab.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\getline.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\tty\getline.c $(O)termcap.o: ..\win\tty\termcap.c $(HACK_H) $(INCL)\tcap.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\termcap.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\tty\termcap.c $(O)topl.o: ..\win\tty\topl.c $(HACK_H) $(INCL)\tcap.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\topl.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\tty\topl.c $(O)wintty.o: ..\win\tty\wintty.c $(HACK_H) $(INCL)\dlb.h $(INCL)\tcap.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\wintty.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\tty\wintty.c +$(O)cursmain.o: ..\win\curses\cursmain.c $(HACK_H) $(INCL)\patchlevel.h \ + $(INCL)\wincurs.h +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\curses\cursmain.c +$(O)curswins.o: ..\win\curses\curswins.c $(HACK_H) $(INCL)\wincurs.h \ + ..\win\curses\curswins.h +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\curses\curswins.c +$(O)cursmisc.o: ..\win\curses\cursmisc.c $(HACK_H) $(INCL)\wincurs.h \ + ..\win\curses\cursmisc.h $(INCL)\func_tab.h $(INCL)\dlb.h +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\curses\cursmisc.c +$(O)cursdial.o: ..\win\curses\cursdial.c $(HACK_H) $(INCL)\wincurs.h \ + ..\win\curses\cursdial.h $(INCL)\func_tab.h +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\curses\cursdial.c +$(O)cursstat.o: ..\win\curses\cursstat.c $(HACK_H) $(INCL)\wincurs.h \ + ..\win\curses\cursstat.h +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\curses\cursstat.c +$(O)cursinit.o: ..\win\curses\cursinit.c $(HACK_H) $(INCL)\wincurs.h \ + ..\win\curses\cursinit.h +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\curses\cursinit.c +$(O)cursmesg.o: ..\win\curses\cursmesg.c $(HACK_H) $(INCL)\wincurs.h \ + ..\win\curses\cursmesg.h +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\curses\cursmesg.c +$(O)cursinvt.o: ..\win\curses\cursinvt.c $(HACK_H) $(INCL)\wincurs.h \ + ..\win\curses\cursinvt.h +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\curses\cursinvt.c #$(O)Window.o: ..\win\X11\Window.c $(INCL)\xwindowp.h $(INCL)\xwindow.h \ -# $(CONFIG_H) -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\Window.c -$(O)dialogs.o: ..\win\X11\dialogs.c $(CONFIG_H) -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\dialogs.c +# $(CONFIG_H) $(INCL)\lint.h +# @$(cc) $(cflagsBuild) $(X11CFLAGS) -Fo$@ ..\win\X11\Window.c +$(O)dialogs.o: ..\win\X11\dialogs.c $(CONFIG_H) $(INCL)\lint.h +# @$(cc) $(cflagsBuild) $(X11CFLAGS) -Fo$@ ..\win\X11\dialogs.c $(O)winX.o: ..\win\X11\winX.c $(HACK_H) $(INCL)\winX.h $(INCL)\dlb.h \ - ..\win\X11\nh72icon ..\win\X11\nh56icon ..\win\X11\nh32icon -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winX.c + $(INCL)\xwindow.h ..\win\X11\nh72icon ..\win\X11\nh56icon \ + ..\win\X11\nh32icon +# @$(cc) $(cflagsBuild) $(X11CFLAGS) -Fo$@ ..\win\X11\winX.c $(O)winmap.o: ..\win\X11\winmap.c $(INCL)\xwindow.h $(HACK_H) $(INCL)\dlb.h \ $(INCL)\winX.h $(INCL)\tile2x11.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmap.c +# @$(cc) $(cflagsBuild) $(X11CFLAGS) -Fo$@ ..\win\X11\winmap.c $(O)winmenu.o: ..\win\X11\winmenu.c $(HACK_H) $(INCL)\winX.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmenu.c +# @$(cc) $(cflagsBuild) $(X11CFLAGS) -Fo$@ ..\win\X11\winmenu.c $(O)winmesg.o: ..\win\X11\winmesg.c $(INCL)\xwindow.h $(HACK_H) $(INCL)\winX.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmesg.c +# @$(cc) $(cflagsBuild) $(X11CFLAGS) -Fo$@ ..\win\X11\winmesg.c $(O)winmisc.o: ..\win\X11\winmisc.c $(HACK_H) $(INCL)\func_tab.h \ $(INCL)\winX.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmisc.c -$(O)winstat.o: ..\win\X11\winstat.c $(HACK_H) $(INCL)\winX.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winstat.c +# @$(cc) $(cflagsBuild) $(X11CFLAGS) -Fo$@ ..\win\X11\winmisc.c +$(O)winstat.o: ..\win\X11\winstat.c $(HACK_H) $(INCL)\winX.h $(INCL)\xwindow.h +# @$(cc) $(cflagsBuild) $(X11CFLAGS) -Fo$@ ..\win\X11\winstat.c $(O)wintext.o: ..\win\X11\wintext.c $(HACK_H) $(INCL)\winX.h $(INCL)\xwindow.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\wintext.c +# @$(cc) $(cflagsBuild) $(X11CFLAGS) -Fo$@ ..\win\X11\wintext.c $(O)winval.o: ..\win\X11\winval.c $(HACK_H) $(INCL)\winX.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winval.c -$(O)tile.o: $(SRC)\tile.c $(HACK_H) +# @$(cc) $(cflagsBuild) $(X11CFLAGS) -Fo$@ ..\win\X11\winval.c +$(O)tile.o: tile.c $(HACK_H) $(O)gnaskstr.o: ..\win\gnome\gnaskstr.c ..\win\gnome\gnaskstr.h \ ..\win\gnome\gnmain.h -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnaskstr.c -$(O)gnbind.o: ..\win\gnome\gnbind.c ..\win\gnome\gnbind.h ..\win\gnome\gnmain.h \ - ..\win\gnome\gnmenu.h ..\win\gnome\gnaskstr.h \ - ..\win\gnome\gnyesno.h -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnbind.c -$(O)gnglyph.o: ..\win\gnome\gnglyph.c ..\win\gnome\gnglyph.h $(INCL)\tile2x11.h -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnglyph.c +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnaskstr.c +$(O)gnbind.o: ..\win\gnome\gnbind.c ..\win\gnome\gnbind.h ..\win\gnome\gnomeprv.h \ + $(HACK_H) $(INCL)\dlb.h $(INCL)\patchlevel.h \ + $(INCL)\winGnome.h ..\win\gnome\gnmain.h \ + ..\win\gnome\gnmap.h ..\win\gnome\gnmenu.h \ + ..\win\gnome\gnplayer.h ..\win\gnome\gnsignal.h \ + ..\win\gnome\gnglyph.h ..\win\gnome\gnstatus.h \ + ..\win\gnome\gntext.h ..\win\gnome\gnmesg.h \ + ..\win\gnome\gnyesno.h ..\win\gnome\gnworn.h \ + ..\win\gnome\gnaskstr.h +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnbind.c +$(O)gnglyph.o: ..\win\gnome\gnglyph.c ..\win\gnome\gnglyph.h $(CONFIG_H) \ + $(INCL)\tile2x11.h +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnglyph.c $(O)gnmain.o: ..\win\gnome\gnmain.c ..\win\gnome\gnmain.h ..\win\gnome\gnsignal.h \ - ..\win\gnome\gnbind.h ..\win\gnome\gnopts.h $(HACK_H) \ - $(INCL)\date.h -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmain.c -$(O)gnmap.o: ..\win\gnome\gnmap.c ..\win\gnome\gnmap.h ..\win\gnome\gnglyph.h \ - ..\win\gnome\gnsignal.h $(HACK_H) -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmap.c -$(O)gnmenu.o: ..\win\gnome\gnmenu.c ..\win\gnome\gnmenu.h ..\win\gnome\gnmain.h \ - ..\win\gnome\gnbind.h $(INCL)\func_tab.h -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmenu.c -$(O)gnmesg.o: ..\win\gnome\gnmesg.c ..\win\gnome\gnmesg.h ..\win\gnome\gnsignal.h -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmesg.c + ..\win\gnome\gnomeprv.h $(HACK_H) $(INCL)\dlb.h \ + $(INCL)\patchlevel.h $(INCL)\winGnome.h \ + ..\win\gnome\gnglyph.h ..\win\gnome\gnbind.h \ + ..\win\gnome\gnmap.h ..\win\gnome\gnmenu.h \ + ..\win\gnome\gnplayer.h ..\win\gnome\gnstatus.h \ + ..\win\gnome\gntext.h ..\win\gnome\gnmesg.h \ + ..\win\gnome\gnyesno.h ..\win\gnome\gnworn.h \ + ..\win\gnome\gnopts.h $(INCL)\date.h +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmain.c +$(O)gnmap.o: ..\win\gnome\gnmap.c ..\win\gnome\gnmap.h $(CONFIG_H) \ + ..\win\gnome\gnglyph.h ..\win\gnome\gnsignal.h \ + ..\win\gnome\gnomeprv.h $(HACK_H) $(INCL)\dlb.h \ + $(INCL)\patchlevel.h $(INCL)\winGnome.h +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmap.c +$(O)gnmenu.o: ..\win\gnome\gnmenu.c ..\win\gnome\gnmenu.h $(CONFIG_H) \ + ..\win\gnome\gnomeprv.h $(HACK_H) $(INCL)\dlb.h \ + $(INCL)\patchlevel.h $(INCL)\winGnome.h \ + ..\win\gnome\gnmain.h ..\win\gnome\gnbind.h \ + ..\win\gnome\gnmap.h ..\win\gnome\gnplayer.h \ + ..\win\gnome\gnsignal.h ..\win\gnome\gnglyph.h \ + ..\win\gnome\gnstatus.h ..\win\gnome\gntext.h \ + ..\win\gnome\gnmesg.h ..\win\gnome\gnyesno.h \ + ..\win\gnome\gnworn.h $(INCL)\func_tab.h +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmenu.c +$(O)gnmesg.o: ..\win\gnome\gnmesg.c ..\win\gnome\gnmesg.h $(CONFIG_H) \ + ..\win\gnome\gnsignal.h ..\win\gnome\gnomeprv.h $(HACK_H) \ + $(INCL)\dlb.h $(INCL)\patchlevel.h $(INCL)\winGnome.h \ + ..\win\gnome\gnglyph.h +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmesg.c $(O)gnopts.o: ..\win\gnome\gnopts.c ..\win\gnome\gnopts.h ..\win\gnome\gnglyph.h \ - ..\win\gnome\gnmain.h ..\win\gnome\gnmap.h $(HACK_H) -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnopts.c + $(CONFIG_H) ..\win\gnome\gnmain.h ..\win\gnome\gnmap.h $(HACK_H) +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnopts.c $(O)gnplayer.o: ..\win\gnome\gnplayer.c ..\win\gnome\gnplayer.h \ ..\win\gnome\gnmain.h $(HACK_H) -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnplayer.c +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnplayer.c $(O)gnsignal.o: ..\win\gnome\gnsignal.c ..\win\gnome\gnsignal.h \ - ..\win\gnome\gnmain.h -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnsignal.c -$(O)gnstatus.o: ..\win\gnome\gnstatus.c ..\win\gnome\gnstatus.h \ - ..\win\gnome\gnsignal.h ..\win\gnome\gn_xpms.h \ - ..\win\gnome\gnomeprv.h -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnstatus.c -$(O)gntext.o: ..\win\gnome\gntext.c ..\win\gnome\gntext.h ..\win\gnome\gnmain.h \ - ..\win\gnome\gn_rip.h -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gntext.c -$(O)gnyesno.o: ..\win\gnome\gnyesno.c ..\win\gnome\gnbind.h ..\win\gnome\gnyesno.h -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnyesno.c -$(O)gnworn.o: ..\win\gnome\gnworn.c ..\win\gnome\gnworn.h ..\win\gnome\gnglyph.h \ - ..\win\gnome\gnsignal.h ..\win\gnome\gnomeprv.h -# @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnworn.c + ..\win\gnome\gnomeprv.h $(HACK_H) $(INCL)\dlb.h \ + $(INCL)\patchlevel.h $(INCL)\winGnome.h \ + ..\win\gnome\gnglyph.h ..\win\gnome\gnmain.h +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnsignal.c +$(O)gnstatus.o: ..\win\gnome\gnstatus.c ..\win\gnome\gnstatus.h $(CONFIG_H) \ + ..\win\gnome\gnsignal.h ..\win\gnome\gnomeprv.h $(HACK_H) \ + $(INCL)\dlb.h $(INCL)\patchlevel.h $(INCL)\winGnome.h \ + ..\win\gnome\gnglyph.h ..\win\gnome\gn_xpms.h +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnstatus.c +$(O)gntext.o: ..\win\gnome\gntext.c ..\win\gnome\gntext.h $(CONFIG_H) \ + ..\win\gnome\gnmain.h ..\win\gnome\gn_rip.h +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gntext.c +$(O)gnyesno.o: ..\win\gnome\gnyesno.c ..\win\gnome\gnbind.h \ + ..\win\gnome\gnomeprv.h $(HACK_H) $(INCL)\dlb.h \ + $(INCL)\patchlevel.h $(INCL)\winGnome.h \ + ..\win\gnome\gnmain.h ..\win\gnome\gnmap.h \ + ..\win\gnome\gnmenu.h ..\win\gnome\gnplayer.h \ + ..\win\gnome\gnsignal.h ..\win\gnome\gnglyph.h \ + ..\win\gnome\gnstatus.h ..\win\gnome\gntext.h \ + ..\win\gnome\gnmesg.h ..\win\gnome\gnyesno.h \ + ..\win\gnome\gnworn.h +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnyesno.c +$(O)gnworn.o: ..\win\gnome\gnworn.c ..\win\gnome\gnworn.h $(CONFIG_H) \ + ..\win\gnome\gnglyph.h ..\win\gnome\gnsignal.h \ + ..\win\gnome\gnomeprv.h $(HACK_H) $(INCL)\dlb.h \ + $(INCL)\patchlevel.h $(INCL)\winGnome.h +# @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnworn.c $(O)wingem.o: ..\win\gem\wingem.c $(HACK_H) $(INCL)\func_tab.h $(INCL)\dlb.h \ $(INCL)\patchlevel.h $(INCL)\wingem.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\wingem.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\gem\wingem.c $(O)wingem1.o: ..\win\gem\wingem1.c $(INCL)\gem_rsc.h $(INCL)\load_img.h \ $(INCL)\gr_rect.h $(INCL)\wintype.h $(INCL)\wingem.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\wingem1.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\gem\wingem1.c $(O)load_img.o: ..\win\gem\load_img.c $(INCL)\load_img.h - @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\load_img.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\gem\load_img.c $(O)gr_rect.o: ..\win\gem\gr_rect.c $(INCL)\gr_rect.h -# @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\gr_rect.c -$(O)tile.o: $(SRC)\tile.c $(HACK_H) -$(O)qt_win.o: ..\win\Qt\qt_win.cpp $(HACK_H) $(INCL)\func_tab.h \ +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\gem\gr_rect.c +$(O)tile.o: tile.c $(HACK_H) +#cppregex.o: ..\sys\share\cppregex.cpp +# $(CXX) $(CXXFLAGS) -Fo$@ ..\sys\share\cppregex.cpp +$(O)qt_bind.o: ..\win\Qt\qt_bind.cpp $(HACK_H) ..\win\Qt\qt_bind.h \ + ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h ..\win\Qt\qt_click.h \ + ..\win\Qt\qt_delay.h ..\win\Qt\qt_xcmd.h ..\win\Qt\qt_key.h \ + ..\win\Qt\qt_map.h ..\win\Qt\qt_win.h ..\win\Qt\qt_clust.h \ + ..\win\Qt\qt_menu.h ..\win\Qt\qt_rip.h ..\win\Qt\qt_msg.h \ + ..\win\Qt\qt_plsel.h ..\win\Qt\qt_svsel.h ..\win\Qt\qt_set.h \ + ..\win\Qt\qt_stat.h ..\win\Qt\qt_icon.h ..\win\Qt\qt_streq.h \ + ..\win\Qt\qt_line.h ..\win\Qt\qt_yndlg.h ..\win\Qt\qt_str.h \ + $(INCL)\dlb.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_bind.cpp +$(O)qt_click.o: ..\win\Qt\qt_click.cpp $(HACK_H) ..\win\Qt\qt_click.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_click.cpp +$(O)qt_clust.o: ..\win\Qt\qt_clust.cpp ..\win\Qt\qt_clust.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_clust.cpp +$(O)qt_delay.o: ..\win\Qt\qt_delay.cpp $(HACK_H) ..\win\Qt\qt_delay.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_delay.cpp +$(O)qt_glyph.o: ..\win\Qt\qt_glyph.cpp $(HACK_H) $(INCL)\tile2x11.h \ + ..\win\Qt\qt_glyph.h ..\win\Qt\qt_set.h ..\win\Qt\qt_str.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_glyph.cpp +$(O)qt_icon.o: ..\win\Qt\qt_icon.cpp $(HACK_H) ..\win\Qt\qt_icon.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_icon.cpp +$(O)qt_inv.o: ..\win\Qt\qt_inv.cpp $(HACK_H) ..\win\Qt\qt_inv.h \ + ..\win\Qt\qt_glyph.h ..\win\Qt\qt_set.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_inv.cpp +$(O)qt_key.o: ..\win\Qt\qt_key.cpp $(HACK_H) ..\win\Qt\qt_key.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_key.cpp +$(O)qt_line.o: ..\win\Qt\qt_line.cpp $(HACK_H) ..\win\Qt\qt_line.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_line.cpp +$(O)qt_main.o: ..\win\Qt\qt_main.cpp $(HACK_H) $(INCL)\patchlevel.h \ + ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h qt_main.moc \ + ..\win\Qt\qt_bind.h ..\win\Qt\qt_glyph.h ..\win\Qt\qt_inv.h \ + ..\win\Qt\qt_key.h ..\win\Qt\qt_map.h ..\win\Qt\qt_win.h \ + ..\win\Qt\qt_clust.h ..\win\Qt\qt_msg.h ..\win\Qt\qt_set.h \ + ..\win\Qt\qt_stat.h ..\win\Qt\qt_icon.h ..\win\Qt\qt_str.h \ + qt_kde0.moc + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_main.cpp +$(O)qt_map.o: ..\win\Qt\qt_map.cpp $(HACK_H) ..\win\Qt\qt_map.h ..\win\Qt\qt_win.h \ + ..\win\Qt\qt_clust.h qt_map.moc ..\win\Qt\qt_click.h \ + ..\win\Qt\qt_glyph.h ..\win\Qt\qt_xpms.h ..\win\Qt\qt_set.h \ + ..\win\Qt\qt_str.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_map.cpp +$(O)qt_menu.o: ..\win\Qt\qt_menu.cpp $(HACK_H) ..\win\Qt\qt_menu.h \ + ..\win\Qt\qt_win.h ..\win\Qt\qt_rip.h qt_menu.moc \ + ..\win\Qt\qt_glyph.h ..\win\Qt\qt_set.h ..\win\Qt\qt_streq.h \ + ..\win\Qt\qt_line.h ..\win\Qt\qt_str.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_menu.cpp +$(O)qt_msg.o: ..\win\Qt\qt_msg.cpp $(HACK_H) ..\win\Qt\qt_msg.h ..\win\Qt\qt_win.h \ + qt_msg.moc ..\win\Qt\qt_map.h ..\win\Qt\qt_clust.h \ + ..\win\Qt\qt_set.h ..\win\Qt\qt_str.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_msg.cpp +$(O)qt_plsel.o: ..\win\Qt\qt_plsel.cpp $(HACK_H) ..\win\Qt\qt_plsel.h qt_plsel.moc \ + ..\win\Qt\qt_bind.h ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h \ + ..\win\Qt\qt_glyph.h ..\win\Qt\qt_set.h ..\win\Qt\qt_str.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_plsel.cpp +$(O)qt_rip.o: ..\win\Qt\qt_rip.cpp $(HACK_H) ..\win\Qt\qt_rip.h \ + ..\win\Qt\qt_bind.h ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h \ + ..\win\Qt\qt_str.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_rip.cpp +$(O)qt_set.o: ..\win\Qt\qt_set.cpp $(HACK_H) ..\win\Qt\qt_set.h qt_set.moc \ + ..\win\Qt\qt_glyph.h ..\win\Qt\qt_str.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_set.cpp +$(O)qt_stat.o: ..\win\Qt\qt_stat.cpp $(HACK_H) ..\win\Qt\qt_stat.h \ + ..\win\Qt\qt_win.h ..\win\Qt\qt_icon.h qt_stat.moc \ + ..\win\Qt\qt_set.h ..\win\Qt\qt_str.h ..\win\Qt\qt_xpms.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_stat.cpp +$(O)qt_str.o: ..\win\Qt\qt_str.cpp ..\win\Qt\qt_str.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_str.cpp +$(O)qt_streq.o: ..\win\Qt\qt_streq.cpp $(HACK_H) ..\win\Qt\qt_streq.h \ + ..\win\Qt\qt_line.h ..\win\Qt\qt_str.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_streq.cpp +$(O)qt_svsel.o: ..\win\Qt\qt_svsel.cpp $(HACK_H) ..\win\Qt\qt_svsel.h \ + ..\win\Qt\qt_bind.h ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h \ + ..\win\Qt\qt_str.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_svsel.cpp +$(O)qt_win.o: ..\win\Qt\qt_win.cpp $(HACK_H) ..\win\Qt\qt_win.h \ + ..\win\Qt\qt_bind.h ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h \ + ..\win\Qt\qt_click.h ..\win\Qt\qt_glyph.h ..\win\Qt\qt_inv.h \ + ..\win\Qt\qt_key.h ..\win\Qt\qt_icon.h ..\win\Qt\qt_map.h \ + ..\win\Qt\qt_clust.h ..\win\Qt\qt_menu.h ..\win\Qt\qt_rip.h \ + ..\win\Qt\qt_msg.h ..\win\Qt\qt_set.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_win.cpp +$(O)qt_xcmd.o: ..\win\Qt\qt_xcmd.cpp $(HACK_H) $(INCL)\func_tab.h \ + ..\win\Qt\qt_xcmd.h qt_xcmd.moc ..\win\Qt\qt_bind.h \ + ..\win\Qt\qt_main.h ..\win\Qt\qt_kde0.h ..\win\Qt\qt_set.h \ + ..\win\Qt\qt_str.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_xcmd.cpp +$(O)qt_yndlg.o: ..\win\Qt\qt_yndlg.cpp $(HACK_H) ..\win\Qt\qt_yndlg.h qt_yndlg.moc \ + ..\win\Qt\qt_str.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_yndlg.cpp +$(O)qt3_win.o: ..\win\Qt3\qt3_win.cpp $(HACK_H) $(INCL)\func_tab.h \ $(INCL)\dlb.h $(INCL)\patchlevel.h $(INCL)\tile2x11.h \ - $(INCL)\qt_win.h $(INCL)\qt_clust.h $(INCL)\qt_kde0.h \ - $(INCL)\qt_xpms.h qt_win.moc qt_kde0.moc qttableview.moc -# $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_win.cpp -$(O)qt_clust.o: ..\win\Qt\qt_clust.cpp $(INCL)\qt_clust.h -# $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_clust.cpp -$(O)qttableview.o: ..\win\Qt\qttableview.cpp $(INCL)\qttableview.h -# $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qttableview.cpp + ..\win\Qt3\qt3_win.h ..\win\Qt3\qt3_clust.h \ + ..\win\Qt3\qt3_kde0.h ..\win\Qt3\qt3_xpms.h qt3_win.moc \ + qt3_kde0.moc qt3tableview.moc + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt3\qt3_win.cpp +$(O)qt3_clust.o: ..\win\Qt3\qt3_clust.cpp ..\win\Qt3\qt3_clust.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt3\qt3_clust.cpp +$(O)qt3tableview.o: ..\win\Qt3\qt3tableview.cpp ..\win\Qt3\qt3tableview.h + $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt3\qt3tableview.cpp $(O)wc_chainin.o: ..\win\chain\wc_chainin.c $(HACK_H) -# @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_chainin.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_chainin.c $(O)wc_chainout.o: ..\win\chain\wc_chainout.c $(HACK_H) -# @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_chainout.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_chainout.c $(O)wc_trace.o: ..\win\chain\wc_trace.c $(HACK_H) $(INCL)\func_tab.h -# @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_trace.c +# @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_trace.c $(O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)\vis_tab.h $(O)allmain.o: allmain.c $(HACK_H) +$(O)alloc.o: alloc.c $(CONFIG_H) $(O)apply.o: apply.c $(HACK_H) $(O)artifact.o: artifact.c $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h $(O)attrib.o: attrib.c $(HACK_H) $(O)ball.o: ball.c $(HACK_H) $(O)bones.o: bones.c $(HACK_H) $(INCL)\lev.h $(O)botl.o: botl.c $(HACK_H) -$(O)cmd.o: cmd.c $(HACK_H) $(INCL)\func_tab.h +$(O)cmd.o: cmd.c $(HACK_H) $(INCL)\lev.h $(INCL)\func_tab.h $(O)dbridge.o: dbridge.c $(HACK_H) +$(O)decl.o: decl.c $(HACK_H) $(O)detect.o: detect.c $(HACK_H) $(INCL)\artifact.h $(O)dig.o: dig.c $(HACK_H) $(O)display.o: display.c $(HACK_H) -$(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)\dlb.h +$(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)\dlb.h $(INCL)\patchlevel.h $(O)do.o: do.c $(HACK_H) $(INCL)\lev.h $(O)do_name.o: do_name.c $(HACK_H) $(O)do_wear.o: do_wear.c $(HACK_H) @@ -1847,24 +2015,35 @@ $(O)dog.o: dog.c $(HACK_H) $(O)dogmove.o: dogmove.c $(HACK_H) $(INCL)\mfndpos.h $(O)dokick.o: dokick.c $(HACK_H) $(O)dothrow.o: dothrow.c $(HACK_H) -$(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)\dgn_file.h $(INCL)\dlb.h +$(O)drawing.o: drawing.c $(HACK_H) $(INCL)\tcap.h +$(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)\dgn_file.h $(INCL)\dlb.h \ + $(INCL)\lev.h $(O)eat.o: eat.c $(HACK_H) $(O)end.o: end.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h $(O)engrave.o: engrave.c $(HACK_H) $(INCL)\lev.h $(O)exper.o: exper.c $(HACK_H) $(O)explode.o: explode.c $(HACK_H) $(O)extralev.o: extralev.c $(HACK_H) -$(O)files.o: files.c $(HACK_H) $(INCL)\dlb.h #zlib.h +$(O)files.o: files.c $(HACK_H) $(INCL)\dlb.h $(INCL)\lev.h #zlib.h $(O)fountain.o: fountain.c $(HACK_H) $(O)hack.o: hack.c $(HACK_H) $(O)hacklib.o: hacklib.c $(HACK_H) $(O)invent.o: invent.c $(HACK_H) +$(O)isaac64.o: isaac64.c $(CONFIG_H) $(INCL)\isaac64.h $(O)light.o: light.c $(HACK_H) $(INCL)\lev.h $(O)lock.o: lock.c $(HACK_H) $(O)mail.o: mail.c $(HACK_H) $(INCL)\mail.h $(O)makemon.o: makemon.c $(HACK_H) $(O)mapglyph.o: mapglyph.c $(HACK_H) $(O)mcastu.o: mcastu.c $(HACK_H) +$(O)mdlib.o: mdlib.c $(CONFIG_H) $(INCL)\permonst.h $(INCL)\align.h \ + $(INCL)\monattk.h $(INCL)\monflag.h \ + $(INCL)\objclass.h $(INCL)\monsym.h \ + $(INCL)\artilist.h $(INCL)\dungeon.h $(INCL)\obj.h \ + $(INCL)\monst.h $(INCL)\mextra.h $(INCL)\you.h \ + $(INCL)\attrib.h $(INCL)\prop.h $(INCL)\skills.h \ + $(INCL)\context.h $(INCL)\flag.h $(INCL)\dlb.h \ + $(INCL)\patchlevel.h $(O)mhitm.o: mhitm.c $(HACK_H) $(INCL)\artifact.h $(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)\artifact.h $(O)minion.o: minion.c $(HACK_H) @@ -1876,14 +2055,18 @@ $(O)mkroom.o: mkroom.c $(HACK_H) $(O)mon.o: mon.c $(HACK_H) $(INCL)\mfndpos.h $(O)mondata.o: mondata.c $(HACK_H) $(O)monmove.o: monmove.c $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h +$(O)monst.o: monst.c $(CONFIG_H) $(INCL)\permonst.h $(INCL)\align.h \ + $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\monsym.h \ + $(INCL)\color.h $(O)mplayer.o: mplayer.c $(HACK_H) $(O)mthrowu.o: mthrowu.c $(HACK_H) $(O)muse.o: muse.c $(HACK_H) -$(O)music.o: music.c $(HACK_H) #interp.c -$(O)nhlua.o: nhlua.c $(HACK_H) -$(O)nhlsel.o: nhlsel.c $(HACK_H) -$(O)nhlobj.o: nhlobj.c $(HACK_H) +$(O)music.o: music.c $(HACK_H) +$(O)nhlua.o: nhlua.c $(HACK_H) $(INCL)\dlb.h +$(O)nhlsel.o: nhlsel.c $(HACK_H) $(INCL)\sp_lev.h $(O)o_init.o: o_init.c $(HACK_H) $(INCL)\lev.h +$(O)objects.o: objects.c $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ + $(INCL)\prop.h $(INCL)\skills.h $(INCL)\color.h $(O)objnam.o: objnam.c $(HACK_H) $(O)options.o: options.c $(CONFIG_H) $(INCL)\objclass.h $(INCL)\flag.h \ $(HACK_H) $(INCL)\tcap.h @@ -1894,22 +2077,23 @@ $(O)polyself.o: polyself.c $(HACK_H) $(O)potion.o: potion.c $(HACK_H) $(O)pray.o: pray.c $(HACK_H) $(O)priest.o: priest.c $(HACK_H) $(INCL)\mfndpos.h -$(O)quest.o: quest.c $(HACK_H) $(INCL)\qtext.h -$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)\dlb.h $(INCL)\qtext.h +$(O)quest.o: quest.c $(HACK_H) +$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)\dlb.h $(O)read.o: read.c $(HACK_H) $(O)rect.o: rect.c $(HACK_H) $(O)region.o: region.c $(HACK_H) $(INCL)\lev.h $(O)restore.o: restore.c $(HACK_H) $(INCL)\lev.h $(INCL)\tcap.h $(O)rip.o: rip.c $(HACK_H) -$(O)rnd.o: rnd.c $(HACK_H) +$(O)rnd.o: rnd.c $(HACK_H) $(INCL)\isaac64.h $(O)role.o: role.c $(HACK_H) $(O)rumors.o: rumors.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h $(O)save.o: save.c $(HACK_H) $(INCL)\lev.h +$(O)sfstruct.o: sfstruct.c $(HACK_H) $(O)shk.o: shk.c $(HACK_H) $(O)shknam.o: shknam.c $(HACK_H) $(O)sit.o: sit.c $(HACK_H) $(INCL)\artifact.h $(O)sounds.o: sounds.c $(HACK_H) -$(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)\dlb.h $(INCL)\sp_lev.h +$(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)\sp_lev.h $(O)spell.o: spell.c $(HACK_H) $(O)steal.o: steal.c $(HACK_H) $(O)steed.o: steed.c $(HACK_H) @@ -1922,12 +2106,14 @@ $(O)trap.o: trap.c $(HACK_H) $(O)u_init.o: u_init.c $(HACK_H) $(O)uhitm.o: uhitm.c $(HACK_H) $(O)vault.o: vault.c $(HACK_H) +$(O)version.o: version.c $(HACK_H) $(INCL)\dlb.h $(INCL)\date.h \ + $(INCL)\lev.h $(INCL)\patchlevel.h $(O)vision.o: vision.c $(HACK_H) $(INCL)\vis_tab.h $(O)weapon.o: weapon.c $(HACK_H) $(O)were.o: were.c $(HACK_H) $(O)wield.o: wield.c $(HACK_H) -#$(O)windows.o: windows.c $(HACK_H) $(INCL)\wingem.h $(INCL)\winGnome.h -$(O)wizard.o: wizard.c $(HACK_H) $(INCL)\qtext.h +$(O)windows.o: windows.c $(HACK_H) $(INCL)\wingem.h $(INCL)\winGnome.h +$(O)wizard.o: wizard.c $(HACK_H) $(O)worm.o: worm.c $(HACK_H) $(INCL)\lev.h $(O)worn.o: worn.c $(HACK_H) $(O)write.o: write.c $(HACK_H) diff --git a/win/win32/vs2017/NetHack.vcxproj b/win/win32/vs2017/NetHack.vcxproj index 5f539114f..a95e3d8d5 100644 --- a/win/win32/vs2017/NetHack.vcxproj +++ b/win/win32/vs2017/NetHack.vcxproj @@ -262,7 +262,6 @@ - diff --git a/win/win32/vs2017/makedefs.vcxproj b/win/win32/vs2017/makedefs.vcxproj index accc0f964..00dab103c 100644 --- a/win/win32/vs2017/makedefs.vcxproj +++ b/win/win32/vs2017/makedefs.vcxproj @@ -46,7 +46,6 @@ - From 65e89507f1c0dd70e2b18ec4687a937ba6c592d3 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 14 Dec 2019 13:41:29 -0500 Subject: [PATCH 484/529] cron-daily Files --- Files | 68 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/Files b/Files index b04f5f544..0e9645ce5 100644 --- a/Files +++ b/Files @@ -82,9 +82,6 @@ bitmfile.h gem_rsc.h load_img.h wingem.h (file for GNOME versions) winGnome.h -(files for Qt versions) -qt_clust.h qt_kde0.h qt_win.h qt_xpms.h qttableview.h - (files for X versions) tile2x11.h winX.h xwindow.h xwindowp.h @@ -98,12 +95,12 @@ isaac64.h lev.h lint.h mail.h mextra.h mfndpos.h micro.h mkroom.h monattk.h mondata.h monflag.h monst.h monsym.h ntconf.h obj.h objclass.h os2conf.h patchlevel.h pcconf.h permonst.h -prop.h qtext.h quest.h rect.h region.h -rm.h sfprocs.h sfproto.h skills.h sp_lev.h -spell.h sys.h system.h tcap.h tileset.h -timeout.h tosconf.h tradstdc.h trampoli.h trap.h -unixconf.h vision.h vmsconf.h wceconf.h winami.h -wincurs.h winprocs.h wintype.h you.h youprop.h +prop.h quest.h rect.h region.h rm.h +skills.h sp_lev.h spell.h sys.h system.h +tcap.h tileset.h timeout.h tosconf.h tradstdc.h +trampoli.h trap.h unixconf.h vision.h vmsconf.h +wceconf.h winami.h wincurs.h winprocs.h wintype.h +you.h youprop.h (file for tty versions) wintty.h @@ -114,26 +111,25 @@ mactty.h macwin.h mttypriv.h src: (files for all versions) -allmain.c alloc.c apply.c artifact.c attrib.c ball.c -bones.c botl.c cmd.c dbridge.c decl.c detect.c -dig.c display.c dlb.c do.c do_name.c do_wear.c -dog.c dogmove.c dokick.c dothrow.c drawing.c dungeon.c -eat.c end.c engrave.c exper.c explode.c extralev.c -files.c fountain.c hack.c hacklib.c invent.c isaac64.c -light.c lock.c mail.c makemon.c mapglyph.c mcastu.c -mdlib.c mhitm.c mhitu.c minion.c mklev.c mkmap.c -mkmaze.c mkobj.c mkroom.c mon.c mondata.c monmove.c -monst.c mplayer.c mthrowu.c muse.c music.c nhlsel.c -nhlua.c o_init.c objects.c objnam.c options.c pager.c -pickup.c pline.c polyself.c potion.c pray.c priest.c -quest.c questpgr.c read.c rect.c region.c restore.c -rip.c rnd.c role.c rumors.c save.c sfascii.c -sfbase.c sfdata.c sflendian.c sfstruct.c shk.c shknam.c -sit.c sounds.c sp_lev.c spell.c steal.c steed.c -sys.c teleport.c timeout.c topten.c track.c trap.c -u_init.c uhitm.c vault.c version.c vision.c weapon.c -were.c wield.c windows.c wizard.c worm.c worn.c -write.c zap.c +allmain.c alloc.c apply.c artifact.c attrib.c ball.c +bones.c botl.c cmd.c dbridge.c decl.c detect.c +dig.c display.c dlb.c do.c do_name.c do_wear.c +dog.c dogmove.c dokick.c dothrow.c drawing.c dungeon.c +eat.c end.c engrave.c exper.c explode.c extralev.c +files.c fountain.c hack.c hacklib.c invent.c isaac64.c +light.c lock.c mail.c makemon.c mapglyph.c mcastu.c +mdlib.c mhitm.c mhitu.c minion.c mklev.c mkmap.c +mkmaze.c mkobj.c mkroom.c mon.c mondata.c monmove.c +monst.c mplayer.c mthrowu.c muse.c music.c nhlobj.c +nhlsel.c nhlua.c o_init.c objects.c objnam.c options.c +pager.c pickup.c pline.c polyself.c potion.c pray.c +priest.c quest.c questpgr.c read.c rect.c region.c +restore.c rip.c rnd.c role.c rumors.c save.c +sfstruct.c shk.c shknam.c sit.c sounds.c sp_lev.c +spell.c steal.c steed.c sys.c teleport.c timeout.c +topten.c track.c trap.c u_init.c uhitm.c vault.c +version.c vision.c weapon.c were.c wield.c windows.c +wizard.c worm.c worn.c write.c zap.c sys/amiga: (files for Amiga versions - untested for 3.6.3) @@ -299,12 +295,12 @@ winnt.c winos.h test: (files in top directory) -test_des.lua test_lev.lua test_sel.lua test_src.lua +test_des.lua test_lev.lua test_obj.lua test_sel.lua test_src.lua +testwish.lua util: (files for all versions) -dlb_main.c makedefs.c mdgrep.h mdgrep.pl panic.c readtags.c -recover.c +dlb_main.c makedefs.c mdgrep.h mdgrep.pl panic.c recover.c win/Qt: (files for the Qt 4 or 5 widget library - X11, Windows, Mac OS X) @@ -317,14 +313,16 @@ qt_msg.cpp qt_msg.h qt_plsel.cpp qt_plsel.h qt_rip.cpp qt_rip.h qt_set.cpp qt_set.h qt_stat.cpp qt_stat.h qt_str.cpp qt_str.h qt_streq.cpp qt_streq.h qt_svsel.cpp qt_svsel.h qt_win.cpp qt_win.h qt_xcmd.cpp qt_xcmd.h -qt_yndlg.cpp qt_yndlg.h +qt_xpms.h qt_yndlg.cpp qt_yndlg.h win/Qt3: (files for the Qt 3 widget library - X11, Windows, Mac OS X, or Qtopia) Info.plist Install.Qt knethack.lnk knh-mini.xpm knh.xpm qpe-nethack.control -qt_clust.cpp qt_win.cpp qttableview.cpp -tileedit.cpp tileedit.h +qt3_clust.cpp qt3_clust.h qt3_kde0.h +qt3_win.cpp qt3_win.h qt3_xpms.h +qt3tableview.cpp qt3tableview.h tileedit.cpp +tileedit.h win/X11: (files for X versions) From 480c3eb6e0f2a7f5628c2d46dc894e288f1ed091 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 14 Dec 2019 17:18:48 -0500 Subject: [PATCH 485/529] include/lev.h is an empty header file so just get rid of it --- include/lev.h | 12 ------- src/bones.c | 2 -- src/cmd.c | 1 - src/do.c | 1 - src/dungeon.c | 1 - src/end.c | 1 - src/engrave.c | 1 - src/files.c | 1 - src/light.c | 1 - src/mkmaze.c | 1 - src/o_init.c | 1 - src/region.c | 1 - src/restore.c | 1 - src/rumors.c | 1 - src/save.c | 1 - src/timeout.c | 1 - src/version.c | 1 - src/worm.c | 1 - sys/amiga/Makefile.agc | 22 ++++++------ sys/amiga/Makefile.ami | 24 ++++++------- sys/msdos/Makefile.BC | 39 +++++++++++----------- sys/msdos/Makefile.GCC | 26 +++++++-------- sys/msdos/Makefile.MSC | 24 ++++++------- sys/msdos/Makefile2.cross | 26 +++++++-------- sys/os2/Makefile.os2 | 14 ++++---- sys/unix/Makefile.src | 37 ++++++++++---------- sys/unix/NetHack.xcodeproj/project.pbxproj | 2 -- sys/vms/Makefile.src | 32 +++++++++--------- sys/wince/bootstrp.mak | 27 ++++++++------- sys/winnt/Makefile.gcc | 27 ++++++++------- sys/winnt/Makefile.msc | 35 ++++++++++--------- win/win32/vs2017/NetHack.vcxproj | 1 - 32 files changed, 164 insertions(+), 202 deletions(-) delete mode 100644 include/lev.h diff --git a/include/lev.h b/include/lev.h deleted file mode 100644 index 731944702..000000000 --- a/include/lev.h +++ /dev/null @@ -1,12 +0,0 @@ -/* NetHack 3.6 lev.h $NHDT-Date: 1432512781 2015/05/25 00:13:01 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */ -/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ -/*-Copyright (c) Michael Allison, 2006. */ -/* NetHack may be freely redistributed. See license for details. */ - -/* Common include file for save and restore routines */ - -#ifndef LEV_H -#define LEV_H - - -#endif /* LEV_H */ diff --git a/src/bones.c b/src/bones.c index 0d56edd48..8ebe47cea 100644 --- a/src/bones.c +++ b/src/bones.c @@ -4,8 +4,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#include "lev.h" - #ifdef MFLOPPY extern long bytes_counted; diff --git a/src/cmd.c b/src/cmd.c index ee8b15f1b..b2d93f624 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -4,7 +4,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#include "lev.h" #include "func_tab.h" /* Macros for meta and ctrl modifiers: diff --git a/src/do.c b/src/do.c index f4d2e57af..65913f1dc 100644 --- a/src/do.c +++ b/src/do.c @@ -6,7 +6,6 @@ /* Contains code for 'd', 'D' (drop), '>', '<' (up, down) */ #include "hack.h" -#include "lev.h" static void FDECL(trycall, (struct obj *)); static void NDECL(polymorph_sink); diff --git a/src/dungeon.c b/src/dungeon.c index 5d34f76b7..54a13c9ae 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -6,7 +6,6 @@ #include "hack.h" #include "dgn_file.h" #include "dlb.h" -#include "lev.h" #define DUNGEON_FILE "dungeon.lua" diff --git a/src/end.c b/src/end.c index bc8cc7ead..c35677ed2 100644 --- a/src/end.c +++ b/src/end.c @@ -6,7 +6,6 @@ #define NEED_VARARGS /* comment line for pre-compiled headers */ #include "hack.h" -#include "lev.h" #ifndef NO_SIGNAL #include #endif diff --git a/src/engrave.c b/src/engrave.c index 35dcb5896..8d37b0027 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -4,7 +4,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#include "lev.h" static NEARDATA struct engr *head_engr; static const char *NDECL(blengr); diff --git a/src/files.c b/src/files.c index d7d1b4e7c..d0e55445a 100644 --- a/src/files.c +++ b/src/files.c @@ -8,7 +8,6 @@ #include "hack.h" #include "dlb.h" #include -#include "lev.h" #ifdef TTY_GRAPHICS #include "wintty.h" /* more() */ diff --git a/src/light.c b/src/light.c index f1341a78d..243282bfe 100644 --- a/src/light.c +++ b/src/light.c @@ -3,7 +3,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#include "lev.h" /* for checking save modes */ /* * Mobile light sources. diff --git a/src/mkmaze.c b/src/mkmaze.c index 275836466..27c5ee490 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -5,7 +5,6 @@ #include "hack.h" #include "sp_lev.h" -#include "lev.h" /* save & restore info */ static int FDECL(iswall, (int, int)); static int FDECL(iswall_or_stone, (int, int)); diff --git a/src/o_init.c b/src/o_init.c index 467b9079d..7f9931ae8 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -4,7 +4,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#include "lev.h" /* save & restore info */ static void FDECL(setgemprobs, (d_level *)); static void FDECL(shuffle, (int, int, BOOLEAN_P)); diff --git a/src/region.c b/src/region.c index 0432b5d13..cc2215e7e 100644 --- a/src/region.c +++ b/src/region.c @@ -3,7 +3,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#include "lev.h" /* * This should really go into the level structure, but diff --git a/src/restore.c b/src/restore.c index 84eef5ee1..635286cc0 100644 --- a/src/restore.c +++ b/src/restore.c @@ -4,7 +4,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#include "lev.h" #include "tcap.h" /* for TERMLIB and ASCIIGRAPH */ #if defined(MICRO) diff --git a/src/rumors.c b/src/rumors.c index 2236de102..b11c39d31 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -4,7 +4,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#include "lev.h" #include "dlb.h" /* [note: this comment is fairly old, but still accurate for 3.1] diff --git a/src/save.c b/src/save.c index 3cb7e1a8d..aff484987 100644 --- a/src/save.c +++ b/src/save.c @@ -4,7 +4,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#include "lev.h" #ifndef NO_SIGNAL #include diff --git a/src/timeout.c b/src/timeout.c index 585924528..5ded81904 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -4,7 +4,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#include "lev.h" /* for checking save modes */ static void NDECL(stoned_dialogue); static void NDECL(vomiting_dialogue); diff --git a/src/version.c b/src/version.c index 8af580ec4..c2b5ab416 100644 --- a/src/version.c +++ b/src/version.c @@ -6,7 +6,6 @@ #include "hack.h" #include "dlb.h" #include "date.h" -#include "lev.h" /* * All the references to the contents of patchlevel.h have been moved diff --git a/src/worm.c b/src/worm.c index 6c139581f..3d7fb3f93 100644 --- a/src/worm.c +++ b/src/worm.c @@ -4,7 +4,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#include "lev.h" #define newseg() (struct wseg *) alloc(sizeof (struct wseg)) #define dealloc_seg(wseg) free((genericptr_t) (wseg)) diff --git a/sys/amiga/Makefile.agc b/sys/amiga/Makefile.agc index e57e18698..da5b38567 100644 --- a/sys/amiga/Makefile.agc +++ b/sys/amiga/Makefile.agc @@ -938,7 +938,7 @@ $(O)attrib.o: $(NHS)attrib.c $(HDEP) $(I)artifact.h $(O)ball.o: $(NHS)ball.c $(HDEP) -$(O)bones.o: $(NHS)bones.c $(HDEP) $(I)lev.h +$(O)bones.o: $(NHS)bones.c $(HDEP) $(O)botl.o: $(NHS)botl.c $(HDEP) @@ -956,7 +956,7 @@ $(O)display.o: $(NHS)display.c $(HDEP) $(O)dlb.o: $(NHS)dlb.c $(HDEP) $(I)dlb.h -$(O)do.o: $(NHS)do.c $(HDEP) $(I)lev.h +$(O)do.o: $(NHS)do.c $(HDEP) $(O)do_name.o: $(NHS)do_name.c $(HDEP) @@ -977,9 +977,9 @@ $(O)dungeon.o: $(NHS)dungeon.c $(HDEP) $(I)dgn_file.h $(I)dlb.h $(O)eat.o: $(NHS)eat.c $(HDEP) -$(O)end.o: $(NHS)end.c $(HDEP) $(I)lev.h $(I)dlb.h +$(O)end.o: $(NHS)end.c $(HDEP) $(I)dlb.h -$(O)engrave.o: $(NHS)engrave.c $(HDEP) $(I)lev.h +$(O)engrave.o: $(NHS)engrave.c $(HDEP) $(O)exper.o: $(NHS)exper.c $(HDEP) @@ -997,7 +997,7 @@ $(O)hacklib.o: $(NHS)hacklib.c $(HDEP) $(O)invent.o: $(NHS)invent.c $(HDEP) $(I)artifact.h -$(O)light.o: $(NHS)light.c $(HDEP) $(I)lev.h +$(O)light.o: $(NHS)light.c $(HDEP) $(O)lock.o: $(NHS)lock.c $(HDEP) @@ -1020,7 +1020,7 @@ $(O)mklev.o: $(NHS)mklev.c $(HDEP) $(O)mkmap.o: $(NHS)mkmap.c $(HDEP) $(I)sp_lev.h -$(O)mkmaze.o: $(NHS)mkmaze.c $(HDEP) $(I)sp_lev.h $(I)lev.h +$(O)mkmaze.o: $(NHS)mkmaze.c $(HDEP) $(I)sp_lev.h $(O)mkobj.o: $(NHS)mkobj.c $(HDEP) $(I)artifact.h $(I)prop.h @@ -1046,7 +1046,7 @@ $(O)muse.o: $(NHS)muse.c $(HDEP) $(O)music.o: $(NHS)music.c $(HDEP) #interp.c -$(O)o_init.o: $(NHS)o_init.c $(HDEP) $(I)lev.h +$(O)o_init.o: $(NHS)o_init.c $(HDEP) $(O)objects.o: $(NHS)objects.c $(I)config.h $(I)obj.h $(I)objclass.h \ $(I)prop.h $(I)skills.h $(I)color.h @@ -1081,7 +1081,7 @@ $(O)rect.o: $(NHS)rect.c $(HDEP) $(O)region.o: $(NHS)region.c $(HDEP) -$(O)restore.o: $(NHS)restore.c $(HDEP) $(I)lev.h $(I)tcap.h $(I)quest.h +$(O)restore.o: $(NHS)restore.c $(HDEP) $(I)tcap.h $(I)quest.h $(O)rnd.o: $(NHS)rnd.c $(HDEP) @@ -1089,7 +1089,7 @@ $(O)role.o: $(NHS)role.c $(HDEP) $(O)rumors.o: $(NHS)rumors.c $(HDEP) $(I)dlb.h -$(O)save.o: $(NHS)save.c $(HDEP) $(I)lev.h $(I)quest.h +$(O)save.o: $(NHS)save.c $(HDEP) $(I)quest.h $(O)shk.o: $(NHS)shk.c $(HDEP) $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)shk.c @@ -1112,7 +1112,7 @@ $(O)sys.o: $(NHS)sys.c $(HDEP) $(O)teleport.o: $(NHS)teleport.c $(HDEP) -$(O)timeout.o: $(NHS)timeout.c $(HDEP) $(I)lev.h +$(O)timeout.o: $(NHS)timeout.c $(HDEP) $(O)topten.o: $(NHS)topten.c $(HDEP) $(I)dlb.h @@ -1142,7 +1142,7 @@ $(O)windows.o: $(NHS)windows.c $(HDEP) $(I)wintty.h $(O)wizard.o: $(NHS)wizard.c $(HDEP) -$(O)worm.o: $(NHS)worm.c $(HDEP) $(I)lev.h +$(O)worm.o: $(NHS)worm.c $(HDEP) $(O)worn.o: $(NHS)worn.c $(HDEP) diff --git a/sys/amiga/Makefile.ami b/sys/amiga/Makefile.ami index 3ad97af5e..b1b8691c3 100644 --- a/sys/amiga/Makefile.ami +++ b/sys/amiga/Makefile.ami @@ -699,7 +699,7 @@ $(SBIN)lev_comp: $(SPLEVOBJS) $(SBIN)dgn_comp: $(DGNCOMPOBJS) $(LINK) $(LNSPEC) $(SBIN)dgn_comp $(LIN) $(DGNCOMPOBJS) $(FBFIL) $(FLLIB) -$(OO)lev_yacc.o: $(UTIL)lev_yacc.c $(HDEP) $(I)sp_lev.h $(I)pm.h $(I)onames.h +$(OO)lev_yacc.o: $(UTIL)lev_yacc.c $(HDEP) $(I)pm.h $(I)onames.h # setdate $(UTIL)lev_yacc.c $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)PREFIX="NH:slib/" $(CFLAGS) \ $(DEFSPEC)alloca=malloc $(OBJSPEC)$@ $(UTIL)lev_yacc.c @@ -1268,7 +1268,7 @@ $(O)attrib.o: $(NHS)attrib.c $(HDEP) $(I)artifact.h $(O)ball.o: $(NHS)ball.c $(HDEP) -$(O)bones.o: $(NHS)bones.c $(HDEP) $(I)lev.h +$(O)bones.o: $(NHS)bones.c $(HDEP) $(O)botl.o: $(NHS)botl.c $(HDEP) @@ -1286,7 +1286,7 @@ $(O)display.o: $(NHS)display.c $(HDEP) $(O)dlb.o: $(NHS)dlb.c $(HDEP) $(I)dlb.h -$(O)do.o: $(NHS)do.c $(HDEP) $(I)lev.h +$(O)do.o: $(NHS)do.c $(HDEP) $(O)do_name.o: $(NHS)do_name.c $(HDEP) @@ -1307,9 +1307,9 @@ $(O)dungeon.o: $(NHS)dungeon.c $(HDEP) $(I)dgn_file.h $(I)dlb.h $(O)eat.o: $(NHS)eat.c $(HDEP) -$(O)end.o: $(NHS)end.c $(HDEP) $(I)lev.h $(I)dlb.h +$(O)end.o: $(NHS)end.c $(HDEP) $(I)dlb.h -$(O)engrave.o: $(NHS)engrave.c $(HDEP) $(I)lev.h +$(O)engrave.o: $(NHS)engrave.c $(HDEP) $(O)exper.o: $(NHS)exper.c $(HDEP) @@ -1327,7 +1327,7 @@ $(O)hacklib.o: $(NHS)hacklib.c $(HDEP) $(O)invent.o: $(NHS)invent.c $(HDEP) $(I)artifact.h -$(O)light.o: $(NHS)light.c $(HDEP) $(I)lev.h +$(O)light.o: $(NHS)light.c $(HDEP) $(O)lock.o: $(NHS)lock.c $(HDEP) @@ -1350,7 +1350,7 @@ $(O)mklev.o: $(NHS)mklev.c $(HDEP) $(O)mkmap.o: $(NHS)mkmap.c $(HDEP) $(I)sp_lev.h -$(O)mkmaze.o: $(NHS)mkmaze.c $(HDEP) $(I)sp_lev.h $(I)lev.h +$(O)mkmaze.o: $(NHS)mkmaze.c $(HDEP) $(I)sp_lev.h $(O)mkobj.o: $(NHS)mkobj.c $(HDEP) $(I)artifact.h $(I)prop.h @@ -1377,7 +1377,7 @@ $(O)muse.o: $(NHS)muse.c $(HDEP) $(O)music.o: $(NHS)music.c $(HDEP) #interp.c -$(O)o_init.o: $(NHS)o_init.c $(HDEP) $(I)lev.h +$(O)o_init.o: $(NHS)o_init.c $(HDEP) $(O)objects.o: $(NHS)objects.c $(I)config.h $(I)obj.h $(I)objclass.h \ $(I)prop.h $(I)skills.h $(I)color.h @@ -1413,7 +1413,7 @@ $(O)rect.o: $(NHS)rect.c $(HDEP) $(O)region.o: $(NHS)region.c $(HDEP) -$(O)restore.o: $(NHS)restore.c $(HDEP) $(I)lev.h $(I)tcap.h $(I)quest.h +$(O)restore.o: $(NHS)restore.c $(HDEP) $(I)tcap.h $(I)quest.h $(O)rnd.o: $(NHS)rnd.c $(HDEP) @@ -1421,7 +1421,7 @@ $(O)role.o: $(NHS)role.c $(HDEP) $(O)rumors.o: $(NHS)rumors.c $(HDEP) $(I)dlb.h -$(O)save.o: $(NHS)save.c $(HDEP) $(I)lev.h $(I)quest.h +$(O)save.o: $(NHS)save.c $(HDEP) $(I)quest.h $(O)shk.o: $(NHS)shk.c $(HDEP) #SFD_INSTEAD #none @@ -1445,7 +1445,7 @@ $(O)sys.o: $(NHS)sys.c $(HDEP) $(O)teleport.o: $(NHS)teleport.c $(HDEP) -$(O)timeout.o: $(NHS)timeout.c $(HDEP) $(I)lev.h +$(O)timeout.o: $(NHS)timeout.c $(HDEP) $(O)topten.o: $(NHS)topten.c $(HDEP) $(I)dlb.h @@ -1478,7 +1478,7 @@ $(O)windows.o: $(NHS)windows.c $(HDEP) $(I)wintty.h $(O)wizard.o: $(NHS)wizard.c $(HDEP) -$(O)worm.o: $(NHS)worm.c $(HDEP) $(I)lev.h +$(O)worm.o: $(NHS)worm.c $(HDEP) $(O)worn.o: $(NHS)worn.c $(HDEP) diff --git a/sys/msdos/Makefile.BC b/sys/msdos/Makefile.BC index c68df0593..beb4b9758 100644 --- a/sys/msdos/Makefile.BC +++ b/sys/msdos/Makefile.BC @@ -879,7 +879,6 @@ DATE_H = $(INCL)\date.h DGN_FILE_H = $(INCL)\dgn_file.h DLB_H = $(INCL)\dlb.h FUNC_TAB_H = $(INCL)\func_tab.h -LEV_H = $(INCL)\lev.h LEV_COMP_H = $(INCL)\lev_comp.h MAIL_H = $(INCL)\mail.h MFNDPOS_H = $(INCL)\mfndpos.h @@ -1789,7 +1788,7 @@ $(O)alloc.o: $(SRC)\alloc.c $(CONFIG_H) @echo $(BCOPTS2) >> $(VROOMMCFG) $(CC) $(CFLAGSN) $(COBJNAM)$@ $(SRC)\alloc.c $(O)ball.o: $(PCHO) $(SRC)\ball.c $(HACK_H) -$(O)bones.o: $(PCHO) $(SRC)\bones.c $(HACK_H) $(LEV_H) +$(O)bones.o: $(PCHO) $(SRC)\bones.c $(HACK_H) $(O)decl.o: $(PCHO) $(SRC)\decl.c $(HACK_H) $(QUEST_H) $(O)detect.o: $(PCHO) $(SRC)\detect.c $(HACK_H) $(ARTIFACT_H) $(O)dig.o: $(PCHO) $(SRC)\dig.c $(HACK_H) # check dep @@ -1806,7 +1805,7 @@ $(O)drawing.o: $(SRC)\drawing.c $(HACK_H) $(TERMCAP_H) @echo $(BCOPTS1) >> $(VROOMMCFG) @echo $(BCOPTS2) >> $(VROOMMCFG) $(CC) $(CFLAGSN) $(COBJNAM)$@ $(SRC)\drawing.c -$(O)end.o: $(SRC)\end.c $(HACK_H) $(LEV_H) $(DLB_H) +$(O)end.o: $(SRC)\end.c $(HACK_H) $(DLB_H) @type schema$(SCHEMA).bc | find "$(@B)_o" > $(VROOMMCFG) @echo $(BCOPTS1) >> $(VROOMMCFG) @echo $(BCOPTS2) >> $(VROOMMCFG) @@ -1819,7 +1818,7 @@ $(O)mapglyph.o: $(PCHO) $(SRC)\mapglyph.c $(HACK_H) $(O)minion.o: $(PCHO) $(SRC)\minion.c $(HACK_H) $(O)mklev.o: $(PCHO) $(SRC)\mklev.c $(HACK_H) $(O)mkmap.o: $(PCHO) $(SRC)\mkmap.c $(HACK_H) $(SP_LEV_H) -$(O)mkmaze.o: $(PCHO) $(SRC)\mkmaze.c $(HACK_H) $(SP_LEV_H) $(LEV_H) +$(O)mkmaze.o: $(PCHO) $(SRC)\mkmaze.c $(HACK_H) $(SP_LEV_H) $(O)monst.o: $(SRC)\monst.c $(CONFIG_H) $(PERMONST_H) $(MONSYM_H) \ $(COLOR_H) $(ALIGN_H) @type schema$(SCHEMA).bc | find "$(@B)_o" > $(VROOMMCFG) @@ -1834,7 +1833,7 @@ $(O)monstr.o: $(SRC)\monstr.c $(CONFIG_H) $(O)mplayer.o: $(PCHO) $(SRC)\mplayer.c $(HACK_H) $(O)muse.o: $(PCHO) $(SRC)\muse.c $(HACK_H) $(O)music.o: $(PCHO) $(SRC)\music.c $(HACK_H) -$(O)o_init.o: $(PCHO) $(SRC)\o_init.c $(HACK_H) $(LEV_H) +$(O)o_init.o: $(PCHO) $(SRC)\o_init.c $(HACK_H) $(O)objects.o: $(SRC)\objects.c $(CONFIG_H) $(OBJ_H) $(OBJCLASS_H) \ $(PROP_H) $(COLOR_H) @type schema$(SCHEMA).bc | find "$(@B)_o" > $(VROOMMCFG) @@ -1857,12 +1856,12 @@ $(O)quest.o: $(PCHO) $(SRC)\quest.c $(HACK_H) $(QUEST_H) $(O)questpgr.o: $(PCHO) $(SRC)\questpgr.c $(HACK_H) $(DLB_H) $(O)rect.o: $(PCHO) $(SRC)\rect.c $(HACK_H) $(O)region.o: $(PCHO) $(SRC)\region.c $(HACK_H) -$(O)restore.o: $(PCHO) $(SRC)\restore.c $(HACK_H) $(LEV_H) $(TERMCAP_H) \ +$(O)restore.o: $(PCHO) $(SRC)\restore.c $(HACK_H) $(TERMCAP_H) \ $(QUEST_H) $(O)rip.o: $(PCHO) $(SRC)\rip.c $(HACK_H) $(O)role.o: $(PCHO) $(SRC)\role.c $(HACK_H) $(O)rumors.o: $(PCHO) $(SRC)\rumors.c $(HACK_H) $(DLB_H) -$(O)save.o: $(PCHO) $(SRC)\save.c $(HACK_H) $(LEV_H) $(QUEST_H) +$(O)save.o: $(PCHO) $(SRC)\save.c $(HACK_H) $(QUEST_H) $(O)sit.o: $(PCHO) $(SRC)\sit.c $(HACK_H) $(ARTIFACT_H) $(O)steed.o: $(PCHO) $(SRC)\steed.c $(HACK_H) $(O)sys.o: $(PCHO) $(SRC)\sys.c $(HACK_H) @@ -1882,7 +1881,7 @@ $(O)vis_tab.o: $(SRC)\vis_tab.c $(HACK_H) $(VIS_TAB_H) $(CC) $(CFLAGSN) $(COBJNAM)$@ $(SRC)\vis_tab.c $(O)wield.o: $(PCHO) $(SRC)\wield.c $(HACK_H) $(O)windows.o: $(PCHO) $(SRC)\windows.c $(HACK_H) $(WINTTY_H) -$(O)worm.o: $(PCHO) $(SRC)\worm.c $(HACK_H) $(LEV_H) +$(O)worm.o: $(PCHO) $(SRC)\worm.c $(HACK_H) $(O)worn.o: $(PCHO) $(SRC)\worn.c $(HACK_H) $(O)write.o: $(PCHO) $(SRC)\write.c $(HACK_H) @@ -1900,14 +1899,14 @@ $(O)attrib.0: $(PCH0) $(SRC)\attrib.c $(HACK_H) $(O)botl.0: $(PCH0) $(SRC)\botl.c $(HACK_H) $(O)cmd.0: $(PCH0) $(SRC)\cmd.c $(HACK_H) $(FUNC_TAB_H) $(O)dbridge.0: $(PCH0) $(SRC)\dbridge.c $(HACK_H) -$(O)do.0: $(PCH0) $(SRC)\do.c $(HACK_H) $(LEV_H) +$(O)do.0: $(PCH0) $(SRC)\do.c $(HACK_H) $(O)do_name.0: $(PCH0) $(SRC)\do_name.c $(HACK_H) $(O)do_wear.0: $(PCH0) $(SRC)\do_wear.c $(HACK_H) $(O)dogmove.0: $(PCH0) $(SRC)\dogmove.c $(HACK_H) $(MFNDPOS_H) $(O)dungeon.0: $(PCH0) $(SRC)\dungeon.c $(HACK_H) $(ALIGN_H) $(DGN_FILE_H) \ $(DLB_H) $(O)eat.0: $(PCH0) $(SRC)\eat.c $(HACK_H) -$(O)engrave.0: $(PCH0) $(SRC)\engrave.c $(HACK_H) $(LEV_H) +$(O)engrave.0: $(PCH0) $(SRC)\engrave.c $(HACK_H) $(O)explode.0: $(PCH0) $(SRC)\explode.c $(HACK_H) $(O)hacklib.0: $(PCH0) $(SRC)\hacklib.c $(HACK_H) $(O)invent.0: $(PCH0) $(SRC)\invent.c $(HACK_H) $(ARTIFACT_H) @@ -1931,7 +1930,7 @@ $(O)shk.0: $(PCH0) $(SRC)\shk.c $(HACK_H) $(O)shknam.0: $(PCH0) $(SRC)\shknam.c $(HACK_H) $(O)sounds.0: $(PCH0) $(SRC)\sounds.c $(HACK_H) $(O)steal.0: $(PCH0) $(SRC)\steal.c $(HACK_H) -$(O)timeout.0: $(PCH0) $(SRC)\timeout.c $(HACK_H) $(LEV_H) +$(O)timeout.0: $(PCH0) $(SRC)\timeout.c $(HACK_H) $(O)track.0: $(PCH0) $(SRC)\track.c $(HACK_H) $(O)trap.0: $(PCH0) $(SRC)\trap.c $(HACK_H) $(O)vault.0: $(PCH0) $(SRC)\vault.c $(HACK_H) @@ -1951,12 +1950,12 @@ $(O)attrib.1: $(PCH1) $(SRC)\attrib.c $(HACK_H) $(O)botl.1: $(PCH1) $(SRC)\botl.c $(HACK_H) $(O)cmd.1: $(PCH1) $(SRC)\cmd.c $(HACK_H) $(FUNC_TAB_H) $(O)dbridge.1: $(PCH1) $(SRC)\dbridge.c $(HACK_H) -$(O)do.1: $(PCH1) $(SRC)\do.c $(HACK_H) $(LEV_H) +$(O)do.1: $(PCH1) $(SRC)\do.c $(HACK_H) $(O)do_wear.1: $(PCH1) $(SRC)\do_wear.c $(HACK_H) $(O)dog.1: $(PCH1) $(SRC)\dog.c $(HACK_H) $(O)dungeon.1: $(PCH1) $(SRC)\dungeon.c $(HACK_H) $(ALIGN_H) $(DGN_FILE_H) $(DLB_H) $(O)eat.1: $(PCH1) $(SRC)\eat.c $(HACK_H) -$(O)engrave.1: $(PCH1) $(SRC)\engrave.c $(HACK_H) $(LEV_H) +$(O)engrave.1: $(PCH1) $(SRC)\engrave.c $(HACK_H) $(O)explode.1: $(PCH1) $(SRC)\explode.c $(HACK_H) $(O)hack.1: $(PCH1) $(SRC)\hack.c $(HACK_H) $(O)hacklib.1: $(PCH1) $(SRC)\hacklib.c $(HACK_H) @@ -1973,7 +1972,7 @@ $(O)polyself.1: $(PCH1) $(SRC)\polyself.c $(HACK_H) $(O)rnd.1: $(PCH1) $(SRC)\rnd.c $(HACK_H) $(O)shk.1: $(PCH1) $(SRC)\shk.c $(HACK_H) $(O)steal.1: $(PCH1) $(SRC)\steal.c $(HACK_H) -$(O)timeout.1: $(PCH1) $(SRC)\timeout.c $(HACK_H) $(LEV_H) +$(O)timeout.1: $(PCH1) $(SRC)\timeout.c $(HACK_H) $(O)track.1: $(PCH1) $(SRC)\track.c $(HACK_H) $(O)trap.1: $(PCH1) $(SRC)\trap.c $(HACK_H) $(O)weapon.1: $(PCH1) $(SRC)\weapon.c $(HACK_H) @@ -1984,11 +1983,11 @@ $(O)zap.1: $(PCH1) $(SRC)\zap.c $(HACK_H) # $(O)attrib.2: $(PCH2) $(SRC)\attrib.c $(HACK_H) -$(O)do.2: $(PCH2) $(SRC)\do.c $(HACK_H) $(LEV_H) +$(O)do.2: $(PCH2) $(SRC)\do.c $(HACK_H) $(O)do_name.2: $(PCH2) $(SRC)\do_name.c $(HACK_H) $(O)do_wear.2: $(PCH2) $(SRC)\do_wear.c $(HACK_H) $(O)dog.2: $(PCH2) $(SRC)\dog.c $(HACK_H) -$(O)engrave.2: $(PCH2) $(SRC)\engrave.c $(HACK_H) $(LEV_H) +$(O)engrave.2: $(PCH2) $(SRC)\engrave.c $(HACK_H) $(O)hack.2: $(PCH2) $(SRC)\hack.c $(HACK_H) $(O)hacklib.2: $(PCH2) $(SRC)\hacklib.c $(HACK_H) $(O)invent.2: $(PCH2) $(SRC)\invent.c $(HACK_H) $(ARTIFACT_H) @@ -2004,7 +2003,7 @@ $(O)zap.2: $(PCH2) $(SRC)\zap.c $(HACK_H) # OVL3 # -$(O)do.3: $(PCH3) $(SRC)\do.c $(HACK_H) $(LEV_H) +$(O)do.3: $(PCH3) $(SRC)\do.c $(HACK_H) $(O)hack.3: $(PCH3) $(SRC)\hack.c $(HACK_H) $(O)invent.3: $(PCH3) $(SRC)\invent.c $(HACK_H) $(ARTIFACT_H) $(O)light.3: $(PCH3) $(SRC)\light.c $(HACK_H) @@ -2023,13 +2022,13 @@ $(O)attrib.B: $(PCHB) $(SRC)\attrib.c $(HACK_H) $(O)botl.B: $(PCHB) $(SRC)\botl.c $(HACK_H) $(O)cmd.B: $(PCHB) $(SRC)\cmd.c $(HACK_H) $(FUNC_TAB_H) $(O)dbridge.B: $(PCHB) $(SRC)\dbridge.c $(HACK_H) -$(O)do.B: $(PCHB) $(SRC)\do.c $(HACK_H) $(LEV_H) +$(O)do.B: $(PCHB) $(SRC)\do.c $(HACK_H) $(O)do_name.B: $(PCHB) $(SRC)\do_name.c $(HACK_H) $(O)do_wear.B: $(PCHB) $(SRC)\do_wear.c $(HACK_H) $(O)dog.B: $(PCHB) $(SRC)\dog.c $(HACK_H) $(O)dogmove.B: $(PCHB) $(SRC)\dogmove.c $(HACK_H) $(MFNDPOS_H) $(O)eat.B: $(PCHB) $(SRC)\eat.c $(HACK_H) -$(O)engrave.B: $(PCHB) $(SRC)\engrave.c $(HACK_H) $(LEV_H) +$(O)engrave.B: $(PCHB) $(SRC)\engrave.c $(HACK_H) $(O)hack.B: $(PCHB) $(SRC)\hack.c $(HACK_H) $(O)hacklib.B: $(PCHB) $(SRC)\hacklib.c $(HACK_H) $(O)invent.B: $(PCHB) $(SRC)\invent.c $(HACK_H) $(ARTIFACT_H) @@ -2060,7 +2059,7 @@ $(O)shk.B: $(PCHB) $(SRC)\shk.c $(HACK_H) $(O)shknam.B: $(PCHB) $(SRC)\shknam.c $(HACK_H) $(O)sounds.B: $(PCHB) $(SRC)\sounds.c $(HACK_H) $(O)steal.B: $(PCHB) $(SRC)\steal.c $(HACK_H) -$(O)timeout.B: $(PCHB) $(SRC)\timeout.c $(HACK_H) $(LEV_H) +$(O)timeout.B: $(PCHB) $(SRC)\timeout.c $(HACK_H) $(O)track.B: $(PCHB) $(SRC)\track.c $(HACK_H) $(O)trap.B: $(PCHB) $(SRC)\trap.c $(HACK_H) $(O)vault.B: $(PCHB) $(SRC)\vault.c $(HACK_H) diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index b924f8019..cfe9b28d3 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -1398,7 +1398,7 @@ $(O)apply.o: apply.c $(HACK_H) $(O)artifact.o: artifact.c $(HACK_H) $(INCL)/artifact.h $(INCL)/artilist.h $(O)attrib.o: attrib.c $(HACK_H) $(O)ball.o: ball.c $(HACK_H) -$(O)bones.o: bones.c $(HACK_H) $(INCL)/lev.h +$(O)bones.o: bones.c $(HACK_H) $(O)botl.o: botl.c $(HACK_H) $(O)cmd.o: cmd.c $(HACK_H) $(INCL)/func_tab.h $(O)dbridge.o: dbridge.c $(HACK_H) @@ -1408,7 +1408,7 @@ $(O)dig.o: dig.c $(HACK_H) $(O)display.o: display.c $(HACK_H) $(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h $(CC) $(cflags) -I../sys/msdos -o$@ dlb.c -$(O)do.o: do.c $(HACK_H) $(INCL)/lev.h +$(O)do.o: do.c $(HACK_H) $(O)do_name.o: do_name.c $(HACK_H) $(O)do_wear.o: do_wear.c $(HACK_H) $(O)dog.o: dog.c $(HACK_H) @@ -1418,8 +1418,8 @@ $(O)dothrow.o: dothrow.c $(HACK_H) $(O)drawing.o: drawing.c $(HACK_H) $(INCL)/tcap.h $(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)/dgn_file.h $(INCL)/dlb.h $(O)eat.o: eat.c $(HACK_H) -$(O)end.o: end.c $(HACK_H) $(INCL)/lev.h $(INCL)/dlb.h -$(O)engrave.o: engrave.c $(HACK_H) $(INCL)/lev.h +$(O)end.o: end.c $(HACK_H) $(INCL)/dlb.h +$(O)engrave.o: engrave.c $(HACK_H) $(O)exper.o: exper.c $(HACK_H) $(O)explode.o: explode.c $(HACK_H) $(O)extralev.o: extralev.c $(HACK_H) @@ -1428,7 +1428,7 @@ $(O)fountain.o: fountain.c $(HACK_H) $(O)hack.o: hack.c $(HACK_H) $(O)hacklib.o: hacklib.c $(HACK_H) $(O)invent.o: invent.c $(HACK_H) -$(O)light.o: light.c $(HACK_H) $(INCL)/lev.h +$(O)light.o: light.c $(HACK_H) $(O)lock.o: lock.c $(HACK_H) $(O)mail.o: mail.c $(HACK_H) $(INCL)/mail.h $(O)makemon.o: makemon.c $(HACK_H) @@ -1439,7 +1439,7 @@ $(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)/artifact.h $(O)minion.o: minion.c $(HACK_H) $(O)mklev.o: mklev.c $(HACK_H) $(O)mkmap.o: mkmap.c $(HACK_H) $(INCL)/sp_lev.h -$(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)/sp_lev.h $(INCL)/lev.h +$(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)/sp_lev.h $(O)mkobj.o: mkobj.c $(HACK_H) $(O)mkroom.o: mkroom.c $(HACK_H) $(O)mon.o: mon.c $(HACK_H) $(INCL)/mfndpos.h @@ -1455,7 +1455,7 @@ $(O)music.o: music.c $(HACK_H) #interp.c $(O)nhlua.o: nhlua.c $(HACK_H) $(O)nhlsel.o: nhlsel.c $(HACK_H) $(O)nhlobj.o: nhlobj.c $(HACK_H) -$(O)o_init.o: o_init.c $(HACK_H) $(INCL)/lev.h +$(O)o_init.o: o_init.c $(HACK_H) $(O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h $(O)objnam.o: objnam.c $(HACK_H) @@ -1472,13 +1472,13 @@ $(O)quest.o: quest.c $(HACK_H) $(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(O)read.o: read.c $(HACK_H) $(O)rect.o: rect.c $(HACK_H) -$(O)region.o: region.c $(HACK_H) $(INCL)/lev.h -$(O)restore.o: restore.c $(HACK_H) $(INCL)/lev.h $(INCL)/tcap.h +$(O)region.o: region.c $(HACK_H) +$(O)restore.o: restore.c $(HACK_H) $(INCL)/tcap.h $(O)rip.o: rip.c $(HACK_H) $(O)rnd.o: rnd.c $(HACK_H) $(O)role.o: role.c $(HACK_H) -$(O)rumors.o: rumors.c $(HACK_H) $(INCL)/lev.h $(INCL)/dlb.h -$(O)save.o: save.c $(HACK_H) $(INCL)/lev.h +$(O)rumors.o: rumors.c $(HACK_H) $(INCL)/dlb.h +$(O)save.o: save.c $(HACK_H) $(O)shk.o: shk.c $(HACK_H) $(O)shknam.o: shknam.c $(HACK_H) $(O)sit.o: sit.c $(HACK_H) $(INCL)/artifact.h @@ -1489,7 +1489,7 @@ $(O)steal.o: steal.c $(HACK_H) $(O)steed.o: steed.c $(HACK_H) $(O)sys.o: sys.c $(HACK_H) $(O)teleport.o: teleport.c $(HACK_H) -$(O)timeout.o: timeout.c $(HACK_H) $(INCL)/lev.h +$(O)timeout.o: timeout.c $(HACK_H) $(O)topten.o: topten.c $(HACK_H) $(INCL)/dlb.h $(PATCHLEV_H) $(O)track.o: track.c $(HACK_H) $(O)trap.o: trap.c $(HACK_H) @@ -1503,7 +1503,7 @@ $(O)were.o: were.c $(HACK_H) $(O)wield.o: wield.c $(HACK_H) $(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h $(O)wizard.o: wizard.c $(HACK_H) -$(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h +$(O)worm.o: worm.c $(HACK_H) $(O)worn.o: worn.c $(HACK_H) $(O)write.o: write.c $(HACK_H) $(O)zap.o: zap.c $(HACK_H) diff --git a/sys/msdos/Makefile.MSC b/sys/msdos/Makefile.MSC index 90c9462d6..60ef58d9d 100644 --- a/sys/msdos/Makefile.MSC +++ b/sys/msdos/Makefile.MSC @@ -1114,7 +1114,7 @@ apply.o: apply.c $(HACK_H) artifact.o: artifact.c $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h attrib.o: attrib.c $(HACK_H) $(INCL)\artifact.h ball.o: ball.c $(HACK_H) -bones.o: bones.c $(HACK_H) $(INCL)\lev.h +bones.o: bones.c $(HACK_H) botl.o: botl.c $(HACK_H) cmd.o: cmd.c $(HACK_H) $(INCL)\func_tab.h dbridge.o: dbridge.c $(HACK_H) @@ -1123,7 +1123,7 @@ detect.o: detect.c $(HACK_H) $(INCL)\artifact.h dig.o: dig.c $(HACK_H) display.o: display.c $(HACK_H) dlb.o: dlb.c $(CONFIG_H) $(INCL)\dlb.h -do.o: do.c $(HACK_H) $(INCL)\lev.h +do.o: do.c $(HACK_H) do_name.o: do_name.c $(HACK_H) do_wear.o: do_wear.c $(HACK_H) dog.o: dog.c $(HACK_H) @@ -1133,8 +1133,8 @@ dothrow.o: dothrow.c $(HACK_H) drawing.o: drawing.c $(HACK_H) $(INCL)\tcap.h dungeon.o: dungeon.c $(HACK_H) $(INCL)\dgn_file.h $(INCL)\dlb.h eat.o: eat.c $(HACK_H) -end.o: end.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h -engrave.o: engrave.c $(HACK_H) $(INCL)\lev.h +end.o: end.c $(HACK_H) $(INCL)\dlb.h +engrave.o: engrave.c $(HACK_H) exper.o: exper.c $(HACK_H) explode.o: explode.c $(HACK_H) extralev.o: extralev.c $(HACK_H) @@ -1143,7 +1143,7 @@ fountain.o: fountain.c $(HACK_H) hack.o: hack.c $(HACK_H) hacklib.o: hacklib.c $(HACK_H) invent.o: invent.c $(HACK_H) $(INCL)\artifact.h -light.o: light.c $(HACK_H) $(INCL)\lev.h +light.o: light.c $(HACK_H) lock.o: lock.c $(HACK_H) mail.o: mail.c $(HACK_H) $(INCL)\mail.h makemon.o: makemon.c $(HACK_H) @@ -1154,7 +1154,7 @@ mhitu.o: mhitu.c $(HACK_H) $(INCL)\artifact.h minion.o: minion.c $(HACK_H) mklev.o: mklev.c $(HACK_H) mkmap.o: mkmap.c $(HACK_H) $(INCL)\sp_lev.h -mkmaze.o: mkmaze.c $(HACK_H) $(INCL)\sp_lev.h $(INCL)\lev.h +mkmaze.o: mkmaze.c $(HACK_H) $(INCL)\sp_lev.h mkobj.o: mkobj.c $(HACK_H) $(INCL)\artifact.h mkroom.o: mkroom.c $(HACK_H) mon.o: mon.c $(HACK_H) $(INCL)\mfndpos.h @@ -1167,7 +1167,7 @@ mplayer.o: mplayer.c $(HACK_H) mthrowu.o: mthrowu.c $(HACK_H) muse.o: muse.c $(HACK_H) music.o: music.c $(HACK_H) #interp.c -o_init.o: o_init.c $(HACK_H) $(INCL)\lev.h +o_init.o: o_init.c $(HACK_H) objects.o: objects.c $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ $(INCL)\prop.h $(INCL)\skills.h $(INCL)\color.h objnam.o: objnam.c $(HACK_H) @@ -1186,12 +1186,12 @@ questpgr.o: questpgr.c $(HACK_H) $(INCL)\dlb.h read.o: read.c $(HACK_H) rect.o: rect.c $(HACK_H) region.o: region.c $(HACK_H) -restore.o: restore.c $(HACK_H) $(INCL)\lev.h $(INCL)\tcap.h +restore.o: restore.c $(HACK_H) $(INCL)\tcap.h rip.o: rip.c $(HACK_H) rnd.o: rnd.c $(HACK_H) role.o: role.c $(HACK_H) -rumors.o: rumors.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h -save.o: save.c $(HACK_H) $(INCL)\lev.h +rumors.o: rumors.c $(HACK_H) $(INCL)\dlb.h +save.o: save.c $(HACK_H) shk.o: shk.c $(HACK_H) shknam.o: shknam.c $(HACK_H) sit.o: sit.c $(HACK_H) $(INCL)\artifact.h @@ -1202,7 +1202,7 @@ steal.o: steal.c $(HACK_H) steed.o: steed.c $(HACK_H) sys.o: sys.c $(HACK_H) teleport.o: teleport.c $(HACK_H) -timeout.o: timeout.c $(HACK_H) $(INCL)\lev.h +timeout.o: timeout.c $(HACK_H) topten.o: topten.c $(HACK_H) $(INCL)\dlb.h $(INCL)\patchlev.h track.o: track.c $(HACK_H) trap.o: trap.c $(HACK_H) @@ -1216,7 +1216,7 @@ were.o: were.c $(HACK_H) wield.o: wield.c $(HACK_H) windows.o: windows.c $(HACK_H) $(INCL)\wingem.h wizard.o: wizard.c $(HACK_H) -worm.o: worm.c $(HACK_H) $(INCL)\lev.h +worm.o: worm.c $(HACK_H) worn.o: worn.c $(HACK_H) write.o: write.c $(HACK_H) zap.o: zap.c $(HACK_H) diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 978c013a3..0b42d58fa 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -1052,7 +1052,7 @@ $(O)apply.o: apply.c $(HACK_H) $(O)artifact.o: artifact.c $(HACK_H) $(INCL)/artifact.h $(INCL)/artilist.h $(O)attrib.o: attrib.c $(HACK_H) $(O)ball.o: ball.c $(HACK_H) -$(O)bones.o: bones.c $(HACK_H) $(INCL)/lev.h +$(O)bones.o: bones.c $(HACK_H) $(O)botl.o: botl.c $(HACK_H) $(O)cmd.o: cmd.c $(HACK_H) $(INCL)/func_tab.h $(O)dbridge.o: dbridge.c $(HACK_H) @@ -1062,7 +1062,7 @@ $(O)dig.o: dig.c $(HACK_H) $(O)display.o: display.c $(HACK_H) $(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h $(TARGET_CC) $(cflags) -I../sys/msdos -o$@ dlb.c -$(O)do.o: do.c $(HACK_H) $(INCL)/lev.h +$(O)do.o: do.c $(HACK_H) $(O)do_name.o: do_name.c $(HACK_H) $(O)do_wear.o: do_wear.c $(HACK_H) $(O)dog.o: dog.c $(HACK_H) @@ -1072,8 +1072,8 @@ $(O)dothrow.o: dothrow.c $(HACK_H) $(O)drawing.o: drawing.c $(HACK_H) $(INCL)/tcap.h $(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)/dgn_file.h $(INCL)/dlb.h $(O)eat.o: eat.c $(HACK_H) -$(O)end.o: end.c $(HACK_H) $(INCL)/lev.h $(INCL)/dlb.h -$(O)engrave.o: engrave.c $(HACK_H) $(INCL)/lev.h +$(O)end.o: end.c $(HACK_H) $(INCL)/dlb.h +$(O)engrave.o: engrave.c $(HACK_H) $(O)exper.o: exper.c $(HACK_H) $(O)explode.o: explode.c $(HACK_H) $(O)extralev.o: extralev.c $(HACK_H) @@ -1082,7 +1082,7 @@ $(O)fountain.o: fountain.c $(HACK_H) $(O)hack.o: hack.c $(HACK_H) $(O)hacklib.o: hacklib.c $(HACK_H) $(O)invent.o: invent.c $(HACK_H) -$(O)light.o: light.c $(HACK_H) $(INCL)/lev.h +$(O)light.o: light.c $(HACK_H) $(O)lock.o: lock.c $(HACK_H) $(O)mail.o: mail.c $(HACK_H) $(INCL)/mail.h $(O)makemon.o: makemon.c $(HACK_H) @@ -1093,7 +1093,7 @@ $(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)/artifact.h $(O)minion.o: minion.c $(HACK_H) $(O)mklev.o: mklev.c $(HACK_H) $(O)mkmap.o: mkmap.c $(HACK_H) $(INCL)/sp_lev.h -$(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)/sp_lev.h $(INCL)/lev.h +$(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)/sp_lev.h $(O)mkobj.o: mkobj.c $(HACK_H) $(O)mkroom.o: mkroom.c $(HACK_H) $(O)mon.o: mon.c $(HACK_H) $(INCL)/mfndpos.h @@ -1106,7 +1106,7 @@ $(O)mplayer.o: mplayer.c $(HACK_H) $(O)mthrowu.o: mthrowu.c $(HACK_H) $(O)muse.o: muse.c $(HACK_H) $(O)music.o: music.c $(HACK_H) #interp.c -$(O)o_init.o: o_init.c $(HACK_H) $(INCL)/lev.h +$(O)o_init.o: o_init.c $(HACK_H) $(O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h $(O)objnam.o: objnam.c $(HACK_H) @@ -1123,13 +1123,13 @@ $(O)quest.o: quest.c $(HACK_H) $(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(O)read.o: read.c $(HACK_H) $(O)rect.o: rect.c $(HACK_H) -$(O)region.o: region.c $(HACK_H) $(INCL)/lev.h -$(O)restore.o: restore.c $(HACK_H) $(INCL)/lev.h $(INCL)/tcap.h +$(O)region.o: region.c $(HACK_H) +$(O)restore.o: restore.c $(HACK_H) $(INCL)/tcap.h $(O)rip.o: rip.c $(HACK_H) $(O)rnd.o: rnd.c $(HACK_H) $(O)role.o: role.c $(HACK_H) -$(O)rumors.o: rumors.c $(HACK_H) $(INCL)/lev.h $(INCL)/dlb.h -$(O)save.o: save.c $(HACK_H) $(INCL)/lev.h +$(O)rumors.o: rumors.c $(HACK_H) $(INCL)/dlb.h +$(O)save.o: save.c $(HACK_H) $(O)shk.o: shk.c $(HACK_H) $(O)shknam.o: shknam.c $(HACK_H) $(O)sit.o: sit.c $(HACK_H) $(INCL)/artifact.h @@ -1140,7 +1140,7 @@ $(O)steal.o: steal.c $(HACK_H) $(O)steed.o: steed.c $(HACK_H) $(O)sys.o: sys.c $(HACK_H) $(O)teleport.o: teleport.c $(HACK_H) -$(O)timeout.o: timeout.c $(HACK_H) $(INCL)/lev.h +$(O)timeout.o: timeout.c $(HACK_H) $(O)topten.o: topten.c $(HACK_H) $(INCL)/dlb.h $(PATCHLEV_H) $(O)track.o: track.c $(HACK_H) $(O)trap.o: trap.c $(HACK_H) @@ -1154,7 +1154,7 @@ $(O)were.o: were.c $(HACK_H) $(O)wield.o: wield.c $(HACK_H) $(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h $(O)wizard.o: wizard.c $(HACK_H) -$(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h +$(O)worm.o: worm.c $(HACK_H) $(O)worn.o: worn.c $(HACK_H) $(O)write.o: write.c $(HACK_H) $(O)zap.o: zap.c $(HACK_H) diff --git a/sys/os2/Makefile.os2 b/sys/os2/Makefile.os2 index 2c1045a4c..545c91b87 100644 --- a/sys/os2/Makefile.os2 +++ b/sys/os2/Makefile.os2 @@ -1519,7 +1519,7 @@ $(OBJ)\attrib.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\artifact.h $(SRCCC) $(OBJ)\ball.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) -$(OBJ)\bones.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\lev.h +$(OBJ)\bones.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) $(OBJ)\botl.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) @@ -1537,7 +1537,7 @@ $(OBJ)\display.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) $(OBJ)\dlb.o : $(SRC)\$(CB) $(CONFIG_H) $(INCL)\dlb.h $(SRCCC) -$(OBJ)\do.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\lev.h +$(OBJ)\do.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) $(OBJ)\do_name.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) @@ -1557,9 +1557,9 @@ $(OBJ)\dungeon.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\dgn_file.h $(SRCCC) $(OBJ)\eat.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) -$(OBJ)\end.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\lev.h +$(OBJ)\end.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) -$(OBJ)\engrave.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\lev.h +$(OBJ)\engrave.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) $(OBJ)\exper.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) @@ -1653,7 +1653,7 @@ $(OBJ)\region.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) $(OBJ)\rect.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) -$(OBJ)\restore.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\lev.h $(INCL)\tcap.h $(INCL)\quest.h +$(OBJ)\restore.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\tcap.h $(INCL)\quest.h $(SRCCC) $(OBJ)\rip.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) @@ -1663,7 +1663,7 @@ $(OBJ)\role.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) $(OBJ)\rumors.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) -$(OBJ)\save.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\lev.h $(INCL)\quest.h +$(OBJ)\save.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\quest.h $(SRCCC) $(OBJ)\shk.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) @@ -1713,7 +1713,7 @@ $(OBJ)\windows.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) $(OBJ)\wizard.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) -$(OBJ)\worm.o : $(SRC)\$(CB) $(HACK_H) $(INCL)\lev.h +$(OBJ)\worm.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) $(OBJ)\worn.o : $(SRC)\$(CB) $(HACK_H) $(SRCCC) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 9f981a72b..7af0bba60 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -495,7 +495,7 @@ CSOURCES = $(HACKCSRC) $(SYSCSRC) $(WINCSRC) $(CHAINSRC) $(GENCSRC) HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h botl.h \ color.h config.h config1.h context.h coord.h decl.h def_os2.h \ display.h dlb.h dungeon.h engrave.h extern.h flag.h func_tab.h \ - global.h hack.h lev.h lint.h macconf.h mextra.h mfndpos.h micro.h \ + global.h hack.h lint.h macconf.h mextra.h mfndpos.h micro.h \ mkroom.h \ monattk.h mondata.h monflag.h monst.h monsym.h obj.h objclass.h \ os2conf.h patchlevel.h pcconf.h permonst.h prop.h rect.h region.h \ @@ -1044,16 +1044,16 @@ apply.o: apply.c $(HACK_H) artifact.o: artifact.c $(HACK_H) ../include/artifact.h ../include/artilist.h attrib.o: attrib.c $(HACK_H) ball.o: ball.c $(HACK_H) -bones.o: bones.c $(HACK_H) ../include/lev.h +bones.o: bones.c $(HACK_H) botl.o: botl.c $(HACK_H) -cmd.o: cmd.c $(HACK_H) ../include/lev.h ../include/func_tab.h +cmd.o: cmd.c $(HACK_H) ../include/func_tab.h dbridge.o: dbridge.c $(HACK_H) decl.o: decl.c $(HACK_H) detect.o: detect.c $(HACK_H) ../include/artifact.h dig.o: dig.c $(HACK_H) display.o: display.c $(HACK_H) dlb.o: dlb.c $(CONFIG_H) ../include/dlb.h ../include/patchlevel.h -do.o: do.c $(HACK_H) ../include/lev.h +do.o: do.c $(HACK_H) do_name.o: do_name.c $(HACK_H) do_wear.o: do_wear.c $(HACK_H) dog.o: dog.c $(HACK_H) @@ -1061,21 +1061,20 @@ dogmove.o: dogmove.c $(HACK_H) ../include/mfndpos.h dokick.o: dokick.c $(HACK_H) dothrow.o: dothrow.c $(HACK_H) drawing.o: drawing.c $(HACK_H) ../include/tcap.h -dungeon.o: dungeon.c $(HACK_H) ../include/dgn_file.h ../include/dlb.h \ - ../include/lev.h +dungeon.o: dungeon.c $(HACK_H) ../include/dgn_file.h ../include/dlb.h eat.o: eat.c $(HACK_H) -end.o: end.c $(HACK_H) ../include/lev.h ../include/dlb.h -engrave.o: engrave.c $(HACK_H) ../include/lev.h +end.o: end.c $(HACK_H) ../include/dlb.h +engrave.o: engrave.c $(HACK_H) exper.o: exper.c $(HACK_H) explode.o: explode.c $(HACK_H) extralev.o: extralev.c $(HACK_H) -files.o: files.c $(HACK_H) ../include/dlb.h ../include/lev.h #zlib.h +files.o: files.c $(HACK_H) ../include/dlb.h #zlib.h fountain.o: fountain.c $(HACK_H) hack.o: hack.c $(HACK_H) hacklib.o: hacklib.c $(HACK_H) invent.o: invent.c $(HACK_H) isaac64.o: isaac64.c $(CONFIG_H) ../include/isaac64.h -light.o: light.c $(HACK_H) ../include/lev.h +light.o: light.c $(HACK_H) lock.o: lock.c $(HACK_H) mail.o: mail.c $(HACK_H) ../include/mail.h makemon.o: makemon.c $(HACK_H) @@ -1094,7 +1093,7 @@ mhitu.o: mhitu.c $(HACK_H) ../include/artifact.h minion.o: minion.c $(HACK_H) mklev.o: mklev.c $(HACK_H) mkmap.o: mkmap.c $(HACK_H) ../include/sp_lev.h -mkmaze.o: mkmaze.c $(HACK_H) ../include/sp_lev.h ../include/lev.h +mkmaze.o: mkmaze.c $(HACK_H) ../include/sp_lev.h mkobj.o: mkobj.c $(HACK_H) mkroom.o: mkroom.c $(HACK_H) mon.o: mon.c $(HACK_H) ../include/mfndpos.h @@ -1109,7 +1108,7 @@ muse.o: muse.c $(HACK_H) music.o: music.c $(HACK_H) nhlua.o: nhlua.c $(HACK_H) ../include/dlb.h nhlsel.o: nhlsel.c $(HACK_H) ../include/sp_lev.h -o_init.o: o_init.c $(HACK_H) ../include/lev.h +o_init.o: o_init.c $(HACK_H) objects.o: objects.c $(CONFIG_H) ../include/obj.h ../include/objclass.h \ ../include/prop.h ../include/skills.h ../include/color.h objnam.o: objnam.c $(HACK_H) @@ -1126,13 +1125,13 @@ quest.o: quest.c $(HACK_H) questpgr.o: questpgr.c $(HACK_H) ../include/dlb.h read.o: read.c $(HACK_H) rect.o: rect.c $(HACK_H) -region.o: region.c $(HACK_H) ../include/lev.h -restore.o: restore.c $(HACK_H) ../include/lev.h ../include/tcap.h +region.o: region.c $(HACK_H) +restore.o: restore.c $(HACK_H) ../include/tcap.h rip.o: rip.c $(HACK_H) rnd.o: rnd.c $(HACK_H) ../include/isaac64.h role.o: role.c $(HACK_H) -rumors.o: rumors.c $(HACK_H) ../include/lev.h ../include/dlb.h -save.o: save.c $(HACK_H) ../include/lev.h +rumors.o: rumors.c $(HACK_H) ../include/dlb.h +save.o: save.c $(HACK_H) sfstruct.o: sfstruct.c $(HACK_H) shk.o: shk.c $(HACK_H) shknam.o: shknam.c $(HACK_H) @@ -1144,7 +1143,7 @@ steal.o: steal.c $(HACK_H) steed.o: steed.c $(HACK_H) sys.o: sys.c $(HACK_H) teleport.o: teleport.c $(HACK_H) -timeout.o: timeout.c $(HACK_H) ../include/lev.h +timeout.o: timeout.c $(HACK_H) topten.o: topten.c $(HACK_H) ../include/dlb.h ../include/patchlevel.h track.o: track.c $(HACK_H) trap.o: trap.c $(HACK_H) @@ -1152,14 +1151,14 @@ u_init.o: u_init.c $(HACK_H) uhitm.o: uhitm.c $(HACK_H) vault.o: vault.c $(HACK_H) version.o: version.c $(HACK_H) ../include/dlb.h ../include/date.h \ - ../include/lev.h ../include/patchlevel.h + ../include/patchlevel.h vision.o: vision.c $(HACK_H) ../include/vis_tab.h weapon.o: weapon.c $(HACK_H) were.o: were.c $(HACK_H) wield.o: wield.c $(HACK_H) windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h wizard.o: wizard.c $(HACK_H) -worm.o: worm.c $(HACK_H) ../include/lev.h +worm.o: worm.c $(HACK_H) worn.o: worn.c $(HACK_H) write.o: write.c $(HACK_H) zap.o: zap.c $(HACK_H) diff --git a/sys/unix/NetHack.xcodeproj/project.pbxproj b/sys/unix/NetHack.xcodeproj/project.pbxproj index f0088d4fd..c09de805f 100644 --- a/sys/unix/NetHack.xcodeproj/project.pbxproj +++ b/sys/unix/NetHack.xcodeproj/project.pbxproj @@ -327,7 +327,6 @@ 3186A3CC21A4B0FE0052BF02 /* gem_rsc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gem_rsc.h; path = ../../include/gem_rsc.h; sourceTree = ""; }; 3186A3CD21A4B0FE0052BF02 /* trap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = trap.h; path = ../../include/trap.h; sourceTree = ""; }; 3186A3CE21A4B0FE0052BF02 /* winGnome.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = winGnome.h; path = ../../include/winGnome.h; sourceTree = ""; }; - 3186A3CF21A4B0FE0052BF02 /* lev.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lev.h; path = ../../include/lev.h; sourceTree = ""; }; 3186A3D021A4B0FE0052BF02 /* decl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = decl.h; path = ../../include/decl.h; sourceTree = ""; }; 3186A3D321A4B14B0052BF02 /* cursstat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cursstat.h; path = ../../win/curses/cursstat.h; sourceTree = ""; }; 3186A3D421A4B14B0052BF02 /* cursdial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cursdial.h; path = ../../win/curses/cursdial.h; sourceTree = ""; }; @@ -729,7 +728,6 @@ 3186A3A521A4B0FD0052BF02 /* hack.h */, 3186A37A21A4B0FA0052BF02 /* integer.h */, 3186A39021A4B0FC0052BF02 /* lev_comp.h */, - 3186A3CF21A4B0FE0052BF02 /* lev.h */, 3186A3BC21A4B0FD0052BF02 /* lint.h */, 3186A39921A4B0FD0052BF02 /* load_img.h */, 3186A3A421A4B0FD0052BF02 /* mac-carbon.h */, diff --git a/sys/vms/Makefile.src b/sys/vms/Makefile.src index 0908ba590..559f974c0 100644 --- a/sys/vms/Makefile.src +++ b/sys/vms/Makefile.src @@ -175,7 +175,7 @@ VERSOURCES = $(HACKCSRC) $(SYSSRC) $(WINSRC) $(RANDSRC) $(GENCSRC) HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h color.h \ config.h config1.h context.h coord.h decl.h def_os2.h display.h \ dlb.h dungeon.h engrave.h extern.h flag.h func_tab.h global.h \ - hack.h lev.h macconf.h mextra.h mfndpos.h micro.h mkroom.h \ + hack.h macconf.h mextra.h mfndpos.h micro.h mkroom.h \ monattk.h mondata.h monflag.h monst.h monsym.h obj.h objclass.h \ os2conf.h patchlevel.h pcconf.h permonst.h prop.h rect.h \ region.h rm.h sp_lev.h spell.h sys.h system.h tcap.h timeout.h \ @@ -491,16 +491,16 @@ apply.obj : apply.c $(HACK_H) artifact.obj : artifact.c $(HACK_H) $(INC)artifact.h $(INC)artilist.h attrib.obj : attrib.c $(HACK_H) ball.obj : ball.c $(HACK_H) -bones.obj : bones.c $(HACK_H) $(INC)lev.h +bones.obj : bones.c $(HACK_H) botl.obj : botl.c $(HACK_H) -cmd.obj : cmd.c $(HACK_H) $(INC)lev.h $(INC)func_tab.h +cmd.obj : cmd.c $(HACK_H) $(INC)func_tab.h dbridge.obj : dbridge.c $(HACK_H) decl.obj : decl.c $(HACK_H) detect.obj : detect.c $(HACK_H) $(INC)artifact.h dig.obj : dig.c $(HACK_H) display.obj : display.c $(HACK_H) dlb.obj : dlb.c $(CONFIG_H) $(INC)dlb.h -do.obj : do.c $(HACK_H) $(INC)lev.h +do.obj : do.c $(HACK_H) do_name.obj : do_name.c $(HACK_H) do_wear.obj : do_wear.c $(HACK_H) dog.obj : dog.c $(HACK_H) @@ -508,10 +508,10 @@ dogmove.obj : dogmove.c $(HACK_H) $(INC)mfndpos.h dokick.obj : dokick.c $(HACK_H) dothrow.obj : dothrow.c $(HACK_H) drawing.obj : drawing.c $(HACK_H) $(INC)tcap.h -dungeon.obj : dungeon.c $(HACK_H) $(INC)dgn_file.h $(INC)dlb.h $(INC)lev.h +dungeon.obj : dungeon.c $(HACK_H) $(INC)dgn_file.h $(INC)dlb.h eat.obj : eat.c $(HACK_H) -end.obj : end.c $(HACK_H) $(INC)lev.h $(INC)dlb.h -engrave.obj : engrave.c $(HACK_H) $(INC)lev.h +end.obj : end.c $(HACK_H) $(INC)dlb.h +engrave.obj : engrave.c $(HACK_H) exper.obj : exper.c $(HACK_H) explode.obj : explode.c $(HACK_H) extralev.obj : extralev.c $(HACK_H) @@ -520,7 +520,7 @@ fountain.obj : fountain.c $(HACK_H) hack.obj : hack.c $(HACK_H) hacklib.obj : hacklib.c $(HACK_H) invent.obj : invent.c $(HACK_H) -light.obj : light.c $(HACK_H) $(INC)lev.h +light.obj : light.c $(HACK_H) lock.obj : lock.c $(HACK_H) mail.obj : mail.c $(HACK_H) $(INC)mail.h makemon.obj : makemon.c $(HACK_H) @@ -531,7 +531,7 @@ mhitu.obj : mhitu.c $(HACK_H) $(INC)artifact.h minion.obj : minion.c $(HACK_H) mklev.obj : mklev.c $(HACK_H) mkmap.obj : mkmap.c $(HACK_H) $(INC)sp_lev.h -mkmaze.obj : mkmaze.c $(HACK_H) $(INC)sp_lev.h $(INC)lev.h +mkmaze.obj : mkmaze.c $(HACK_H) $(INC)sp_lev.h mkobj.obj : mkobj.c $(HACK_H) mkroom.obj : mkroom.c $(HACK_H) mon.obj : mon.c $(HACK_H) $(INC)mfndpos.h @@ -544,7 +544,7 @@ mplayer.obj : mplayer.c $(HACK_H) mthrowu.obj : mthrowu.c $(HACK_H) muse.obj : muse.c $(HACK_H) music.obj : music.c $(HACK_H) #interp.c -o_init.obj : o_init.c $(HACK_H) $(INC)lev.h +o_init.obj : o_init.c $(HACK_H) objects.obj : objects.c $(CONFIG_H) $(INC)obj.h $(INC)objclass.h \ $(INC)prop.h $(INC)skills.h $(INC)color.h objnam.obj : objnam.c $(HACK_H) @@ -561,13 +561,13 @@ quest.obj : quest.c $(HACK_H) questpgr.obj : questpgr.c $(HACK_H) $(INC)dlb.h read.obj : read.c $(HACK_H) rect.obj : rect.c $(HACK_H) -region.obj : region.c $(HACK_H) $(INC)lev.h -restore.obj : restore.c $(HACK_H) $(INC)lev.h $(INC)tcap.h +region.obj : region.c $(HACK_H) +restore.obj : restore.c $(HACK_H) $(INC)tcap.h rip.obj : rip.c $(HACK_H) rnd.obj : rnd.c $(HACK_H) role.obj : role.c $(HACK_H) -rumors.obj : rumors.c $(HACK_H) $(INC)lev.h $(INC)dlb.h -save.obj : save.c $(HACK_H) $(INC)lev.h +rumors.obj : rumors.c $(HACK_H) $(INC)dlb.h +save.obj : save.c $(HACK_H) shk.obj : shk.c $(HACK_H) shknam.obj : shknam.c $(HACK_H) sit.obj : sit.c $(HACK_H) $(INC)artifact.h @@ -578,7 +578,7 @@ steal.obj : steal.c $(HACK_H) steed.obj : steed.c $(HACK_H) sys.obj : sys.c $(HACK_H) teleport.obj : teleport.c $(HACK_H) -timeout.obj : timeout.c $(HACK_H) $(INC)lev.h +timeout.obj : timeout.c $(HACK_H) topten.obj : topten.c $(HACK_H) $(INC)dlb.h $(INC)patchlevel.h track.obj : track.c $(HACK_H) trap.obj : trap.c $(HACK_H) @@ -592,7 +592,7 @@ were.obj : were.c $(HACK_H) wield.obj : wield.c $(HACK_H) windows.obj : windows.c $(HACK_H) $(INC)wingem.h $(INC)winGnome.h wizard.obj : wizard.c $(HACK_H) -worm.obj : worm.c $(HACK_H) $(INC)lev.h +worm.obj : worm.c $(HACK_H) worn.obj : worn.c $(HACK_H) write.obj : write.c $(HACK_H) zap.obj : zap.c $(HACK_H) diff --git a/sys/wince/bootstrp.mak b/sys/wince/bootstrp.mak index 7fe11616a..35cb62595 100644 --- a/sys/wince/bootstrp.mak +++ b/sys/wince/bootstrp.mak @@ -202,7 +202,6 @@ HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\align.h \ $(INCL)\rect.h $(INCL)\region.h $(INCL)\winprocs.h \ $(INCL)\wintty.h $(INCL)\trampoli.h -LEV_H = $(INCL)\lev.h DGN_FILE_H = $(INCL)\dgn_file.h LEV_COMP_H = $(INCL)\lev_comp.h SP_LEV_H = $(INCL)\sp_lev.h @@ -768,7 +767,7 @@ $(O)apply.o: $(SRC)\apply.c $(HACK_H) $(O)artifact.o: $(SRC)\artifact.c $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h $(O)attrib.o: $(SRC)\attrib.c $(HACK_H) $(INCL)\artifact.h $(O)ball.o: $(SRC)\ball.c $(HACK_H) -$(O)bones.o: $(SRC)\bones.c $(HACK_H) $(INCL)\lev.h +$(O)bones.o: $(SRC)\bones.c $(HACK_H) $(O)botl.o: $(SRC)\botl.c $(HACK_H) $(O)cmd.o: $(SRC)\cmd.c $(HACK_H) $(INCL)\func_tab.h $(O)dbridge.o: $(SRC)\dbridge.c $(HACK_H) @@ -777,7 +776,7 @@ $(O)detect.o: $(SRC)\detect.c $(HACK_H) $(INCL)\artifact.h $(O)dig.o: $(SRC)\dig.c $(HACK_H) $(O)display.o: $(SRC)\display.c $(HACK_H) $(O)dlb.o: $(SRC)\dlb.c $(CONFIG_H) $(INCL)\dlb.h -$(O)do.o: $(SRC)\do.c $(HACK_H) $(INCL)\lev.h +$(O)do.o: $(SRC)\do.c $(HACK_H) $(O)do_name.o: $(SRC)\do_name.c $(HACK_H) $(O)do_wear.o: $(SRC)\do_wear.c $(HACK_H) $(O)dog.o: $(SRC)\dog.c $(HACK_H) @@ -787,8 +786,8 @@ $(O)dothrow.o: $(SRC)\dothrow.c $(HACK_H) $(O)drawing.o: $(SRC)\drawing.c $(HACK_H) $(INCL)\tcap.h $(O)dungeon.o: $(SRC)\dungeon.c $(HACK_H) $(INCL)\dgn_file.h $(INCL)\dlb.h $(O)eat.o: $(SRC)\eat.c $(HACK_H) -$(O)end.o: $(SRC)\end.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h -$(O)engrave.o: $(SRC)\engrave.c $(HACK_H) $(INCL)\lev.h +$(O)end.o: $(SRC)\end.c $(HACK_H) $(INCL)\dlb.h +$(O)engrave.o: $(SRC)\engrave.c $(HACK_H) $(O)exper.o: $(SRC)\exper.c $(HACK_H) $(O)explode.o: $(SRC)\explode.c $(HACK_H) $(O)extralev.o: $(SRC)\extralev.c $(HACK_H) @@ -797,7 +796,7 @@ $(O)fountain.o: $(SRC)\fountain.c $(HACK_H) $(O)hack.o: $(SRC)\hack.c $(HACK_H) $(O)hacklib.o: $(SRC)\hacklib.c $(HACK_H) $(O)invent.o: $(SRC)\invent.c $(HACK_H) $(INCL)\artifact.h -$(O)light.o: $(SRC)\light.c $(HACK_H) $(INCL)\lev.h +$(O)light.o: $(SRC)\light.c $(HACK_H) $(O)lock.o: $(SRC)\lock.c $(HACK_H) $(O)mail.o: $(SRC)\mail.c $(HACK_H) $(INCL)\mail.h $(O)makemon.o: $(SRC)\makemon.c $(HACK_H) @@ -808,7 +807,7 @@ $(O)mhitu.o: $(SRC)\mhitu.c $(HACK_H) $(INCL)\artifact.h $(O)minion.o: $(SRC)\minion.c $(HACK_H) $(O)mklev.o: $(SRC)\mklev.c $(HACK_H) $(O)mkmap.o: $(SRC)\mkmap.c $(HACK_H) $(INCL)\sp_lev.h -$(O)mkmaze.o: $(SRC)\mkmaze.c $(HACK_H) $(INCL)\sp_lev.h $(INCL)\lev.h +$(O)mkmaze.o: $(SRC)\mkmaze.c $(HACK_H) $(INCL)\sp_lev.h $(O)mkobj.o: $(SRC)\mkobj.c $(HACK_H) $(INCL)\artifact.h $(O)mkroom.o: $(SRC)\mkroom.c $(HACK_H) $(O)mon.o: $(SRC)\mon.c $(HACK_H) $(INCL)\mfndpos.h @@ -821,7 +820,7 @@ $(O)mplayer.o: $(SRC)\mplayer.c $(HACK_H) $(O)mthrowu.o: $(SRC)\mthrowu.c $(HACK_H) $(O)muse.o: $(SRC)\muse.c $(HACK_H) $(O)music.o: $(SRC)\music.c $(HACK_H) #interp.c -$(O)o_init.o: $(SRC)\o_init.c $(HACK_H) $(INCL)\lev.h +$(O)o_init.o: $(SRC)\o_init.c $(HACK_H) $(O)objects.o: $(SRC)\objects.c $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ $(INCL)\prop.h $(INCL)\skills.h $(INCL)\color.h $(O)objnam.o: $(SRC)\objnam.c $(HACK_H) @@ -838,13 +837,13 @@ $(O)quest.o: $(SRC)\quest.c $(HACK_H) $(O)questpgr.o: $(SRC)\questpgr.c $(HACK_H) $(INCL)\dlb.h $(O)read.o: $(SRC)\read.c $(HACK_H) $(O)rect.o: $(SRC)\rect.c $(HACK_H) -$(O)region.o: $(SRC)\region.c $(HACK_H) $(INCL)\lev.h -$(O)restore.o: $(SRC)\restore.c $(HACK_H) $(INCL)\lev.h $(INCL)\tcap.h +$(O)region.o: $(SRC)\region.c $(HACK_H) +$(O)restore.o: $(SRC)\restore.c $(HACK_H) $(INCL)\tcap.h $(O)rip.o: $(SRC)\rip.c $(HACK_H) $(O)rnd.o: $(SRC)\rnd.c $(HACK_H) $(O)role.o: $(SRC)\role.c $(HACK_H) -$(O)rumors.o: $(SRC)\rumors.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h -$(O)save.o: $(SRC)\save.c $(HACK_H) $(INCL)\lev.h +$(O)rumors.o: $(SRC)\rumors.c $(HACK_H) $(INCL)\dlb.h +$(O)save.o: $(SRC)\save.c $(HACK_H) $(O)shk.o: $(SRC)\shk.c $(HACK_H) $(O)shknam.o: $(SRC)\shknam.c $(HACK_H) $(O)sit.o: $(SRC)\sit.c $(HACK_H) $(INCL)\artifact.h @@ -854,7 +853,7 @@ $(O)spell.o: $(SRC)\spell.c $(HACK_H) $(O)steal.o: $(SRC)\steal.c $(HACK_H) $(O)steed.o: $(SRC)\steed.c $(HACK_H) $(O)teleport.o: $(SRC)\teleport.c $(HACK_H) -$(O)timeout.o: $(SRC)\timeout.c $(HACK_H) $(INCL)\lev.h +$(O)timeout.o: $(SRC)\timeout.c $(HACK_H) $(O)topten.o: $(SRC)\topten.c $(HACK_H) $(INCL)\dlb.h $(INCL)\patchlevel.h $(O)track.o: $(SRC)\track.c $(HACK_H) $(O)trap.o: $(SRC)\trap.c $(HACK_H) @@ -868,7 +867,7 @@ $(O)were.o: $(SRC)\were.c $(HACK_H) $(O)wield.o: $(SRC)\wield.c $(HACK_H) $(O)windows.o: $(SRC)\windows.c $(HACK_H) $(INCL)\wingem.h $(INCL)\winGnome.h $(O)wizard.o: $(SRC)\wizard.c $(HACK_H) -$(O)worm.o: $(SRC)\worm.c $(HACK_H) $(INCL)\lev.h +$(O)worm.o: $(SRC)\worm.c $(HACK_H) $(O)worn.o: $(SRC)\worn.c $(HACK_H) $(O)write.o: $(SRC)\write.c $(HACK_H) $(O)zap.o: $(SRC)\zap.c $(HACK_H) diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 5119d3eec..fbfd11000 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -491,7 +491,6 @@ HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/align.h $(INCL)/context.h \ $(INCL)/rect.h $(INCL)/region.h $(INCL)/winprocs.h \ $(INCL)/wintty.h $(INCL)/sys.h $(INCL)/trampoli.h -LEV_H = $(INCL)/lev.h DGN_FILE_H = $(INCL)/dgn_file.h SP_LEV_H = $(INCL)/sp_lev.h TILE_H = ../win/share/tile.h @@ -1538,7 +1537,7 @@ $(O)apply.o: apply.c $(HACK_H) $(O)artifact.o: artifact.c $(HACK_H) $(INCL)/artifact.h $(INCL)/artilist.h $(O)attrib.o: attrib.c $(HACK_H) $(O)ball.o: ball.c $(HACK_H) -$(O)bones.o: bones.c $(HACK_H) $(INCL)/lev.h +$(O)bones.o: bones.c $(HACK_H) $(O)botl.o: botl.c $(HACK_H) $(O)cmd.o: cmd.c $(HACK_H) $(INCL)/func_tab.h $(O)dbridge.o: dbridge.c $(HACK_H) @@ -1547,7 +1546,7 @@ $(O)detect.o: detect.c $(HACK_H) $(INCL)/artifact.h $(O)dig.o: dig.c $(HACK_H) $(O)display.o: display.c $(HACK_H) $(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h -$(O)do.o: do.c $(HACK_H) $(INCL)/lev.h +$(O)do.o: do.c $(HACK_H) $(O)do_name.o: do_name.c $(HACK_H) $(O)do_wear.o: do_wear.c $(HACK_H) $(O)dog.o: dog.c $(HACK_H) @@ -1557,8 +1556,8 @@ $(O)dothrow.o: dothrow.c $(HACK_H) $(O)drawing.o: drawing.c $(HACK_H) $(INCL)/tcap.h $(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)/dgn_file.h $(INCL)/dlb.h $(O)eat.o: eat.c $(HACK_H) -$(O)end.o: end.c $(HACK_H) $(INCL)/lev.h $(INCL)/dlb.h -$(O)engrave.o: engrave.c $(HACK_H) $(INCL)/lev.h +$(O)end.o: end.c $(HACK_H) $(INCL)/dlb.h +$(O)engrave.o: engrave.c $(HACK_H) $(O)exper.o: exper.c $(HACK_H) $(O)explode.o: explode.c $(HACK_H) $(O)extralev.o: extralev.c $(HACK_H) @@ -1567,7 +1566,7 @@ $(O)fountain.o: fountain.c $(HACK_H) $(O)hack.o: hack.c $(HACK_H) $(O)hacklib.o: hacklib.c $(HACK_H) $(O)invent.o: invent.c $(HACK_H) -$(O)light.o: light.c $(HACK_H) $(INCL)/lev.h +$(O)light.o: light.c $(HACK_H) $(O)lock.o: lock.c $(HACK_H) $(O)mail.o: mail.c $(HACK_H) $(INCL)/mail.h $(O)makemon.o: makemon.c $(HACK_H) @@ -1578,7 +1577,7 @@ $(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)/artifact.h $(O)minion.o: minion.c $(HACK_H) $(O)mklev.o: mklev.c $(HACK_H) $(O)mkmap.o: mkmap.c $(HACK_H) $(INCL)/sp_lev.h -$(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)/sp_lev.h $(INCL)/lev.h +$(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)/sp_lev.h $(O)mkobj.o: mkobj.c $(HACK_H) $(O)mkroom.o: mkroom.c $(HACK_H) $(O)mon.o: mon.c $(HACK_H) $(INCL)/mfndpos.h @@ -1594,7 +1593,7 @@ $(O)music.o: music.c $(HACK_H) #interp.c $(O)nhlua.o: nhlua.c $(HACK_H) $(O)nhlsel.o: nhlsel.c $(HACK_H) $(O)nhlobj.o: nhlobj.c $(HACK_H) -$(O)o_init.o: o_init.c $(HACK_H) $(INCL)/lev.h +$(O)o_init.o: o_init.c $(HACK_H) $(O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h $(O)objnam.o: objnam.c $(HACK_H) @@ -1611,13 +1610,13 @@ $(O)quest.o: quest.c $(HACK_H) $(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(O)read.o: read.c $(HACK_H) $(O)rect.o: rect.c $(HACK_H) -$(O)region.o: region.c $(HACK_H) $(INCL)/lev.h -$(O)restore.o: restore.c $(HACK_H) $(INCL)/lev.h $(INCL)/tcap.h +$(O)region.o: region.c $(HACK_H) +$(O)restore.o: restore.c $(HACK_H) $(INCL)/tcap.h $(O)rip.o: rip.c $(HACK_H) $(O)rnd.o: rnd.c $(HACK_H) $(O)role.o: role.c $(HACK_H) -$(O)rumors.o: rumors.c $(HACK_H) $(INCL)/lev.h $(INCL)/dlb.h -$(O)save.o: save.c $(HACK_H) $(INCL)/lev.h +$(O)rumors.o: rumors.c $(HACK_H) $(INCL)/dlb.h +$(O)save.o: save.c $(HACK_H) $(O)shk.o: shk.c $(HACK_H) $(O)shknam.o: shknam.c $(HACK_H) $(O)sit.o: sit.c $(HACK_H) $(INCL)/artifact.h @@ -1628,7 +1627,7 @@ $(O)steal.o: steal.c $(HACK_H) $(O)steed.o: steed.c $(HACK_H) $(O)sys.o: sys.c $(HACK_H) $(O)teleport.o: teleport.c $(HACK_H) -$(O)timeout.o: timeout.c $(HACK_H) $(INCL)/lev.h +$(O)timeout.o: timeout.c $(HACK_H) $(O)topten.o: topten.c $(HACK_H) $(INCL)/dlb.h $(INCL)/patchlevel.h $(O)track.o: track.c $(HACK_H) $(O)trap.o: trap.c $(HACK_H) @@ -1643,7 +1642,7 @@ $(O)wield.o: wield.c $(HACK_H) $(O)windmain.o: $(MSWSYS)/windmain.c $(HACK_H) $(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h $(O)wizard.o: wizard.c $(HACK_H) -$(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h +$(O)worm.o: worm.c $(HACK_H) $(O)worn.o: worn.c $(HACK_H) $(O)write.o: write.c $(HACK_H) $(O)zap.o: zap.c $(HACK_H) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index e11078f64..3143e8c20 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -1999,16 +1999,16 @@ $(O)apply.o: apply.c $(HACK_H) $(O)artifact.o: artifact.c $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h $(O)attrib.o: attrib.c $(HACK_H) $(O)ball.o: ball.c $(HACK_H) -$(O)bones.o: bones.c $(HACK_H) $(INCL)\lev.h +$(O)bones.o: bones.c $(HACK_H) $(O)botl.o: botl.c $(HACK_H) -$(O)cmd.o: cmd.c $(HACK_H) $(INCL)\lev.h $(INCL)\func_tab.h +$(O)cmd.o: cmd.c $(HACK_H) $(INCL)\func_tab.h $(O)dbridge.o: dbridge.c $(HACK_H) $(O)decl.o: decl.c $(HACK_H) $(O)detect.o: detect.c $(HACK_H) $(INCL)\artifact.h $(O)dig.o: dig.c $(HACK_H) $(O)display.o: display.c $(HACK_H) $(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)\dlb.h $(INCL)\patchlevel.h -$(O)do.o: do.c $(HACK_H) $(INCL)\lev.h +$(O)do.o: do.c $(HACK_H) $(O)do_name.o: do_name.c $(HACK_H) $(O)do_wear.o: do_wear.c $(HACK_H) $(O)dog.o: dog.c $(HACK_H) @@ -2016,21 +2016,20 @@ $(O)dogmove.o: dogmove.c $(HACK_H) $(INCL)\mfndpos.h $(O)dokick.o: dokick.c $(HACK_H) $(O)dothrow.o: dothrow.c $(HACK_H) $(O)drawing.o: drawing.c $(HACK_H) $(INCL)\tcap.h -$(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)\dgn_file.h $(INCL)\dlb.h \ - $(INCL)\lev.h +$(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)\dgn_file.h $(INCL)\dlb.h $(O)eat.o: eat.c $(HACK_H) -$(O)end.o: end.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h -$(O)engrave.o: engrave.c $(HACK_H) $(INCL)\lev.h +$(O)end.o: end.c $(HACK_H) $(INCL)\dlb.h +$(O)engrave.o: engrave.c $(HACK_H) $(O)exper.o: exper.c $(HACK_H) $(O)explode.o: explode.c $(HACK_H) $(O)extralev.o: extralev.c $(HACK_H) -$(O)files.o: files.c $(HACK_H) $(INCL)\dlb.h $(INCL)\lev.h #zlib.h +$(O)files.o: files.c $(HACK_H) $(INCL)\dlb.h #zlib.h $(O)fountain.o: fountain.c $(HACK_H) $(O)hack.o: hack.c $(HACK_H) $(O)hacklib.o: hacklib.c $(HACK_H) $(O)invent.o: invent.c $(HACK_H) $(O)isaac64.o: isaac64.c $(CONFIG_H) $(INCL)\isaac64.h -$(O)light.o: light.c $(HACK_H) $(INCL)\lev.h +$(O)light.o: light.c $(HACK_H) $(O)lock.o: lock.c $(HACK_H) $(O)mail.o: mail.c $(HACK_H) $(INCL)\mail.h $(O)makemon.o: makemon.c $(HACK_H) @@ -2049,7 +2048,7 @@ $(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)\artifact.h $(O)minion.o: minion.c $(HACK_H) $(O)mklev.o: mklev.c $(HACK_H) $(O)mkmap.o: mkmap.c $(HACK_H) $(INCL)\sp_lev.h -$(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)\sp_lev.h $(INCL)\lev.h +$(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)\sp_lev.h $(O)mkobj.o: mkobj.c $(HACK_H) $(O)mkroom.o: mkroom.c $(HACK_H) $(O)mon.o: mon.c $(HACK_H) $(INCL)\mfndpos.h @@ -2064,7 +2063,7 @@ $(O)muse.o: muse.c $(HACK_H) $(O)music.o: music.c $(HACK_H) $(O)nhlua.o: nhlua.c $(HACK_H) $(INCL)\dlb.h $(O)nhlsel.o: nhlsel.c $(HACK_H) $(INCL)\sp_lev.h -$(O)o_init.o: o_init.c $(HACK_H) $(INCL)\lev.h +$(O)o_init.o: o_init.c $(HACK_H) $(O)objects.o: objects.c $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ $(INCL)\prop.h $(INCL)\skills.h $(INCL)\color.h $(O)objnam.o: objnam.c $(HACK_H) @@ -2081,13 +2080,13 @@ $(O)quest.o: quest.c $(HACK_H) $(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)\dlb.h $(O)read.o: read.c $(HACK_H) $(O)rect.o: rect.c $(HACK_H) -$(O)region.o: region.c $(HACK_H) $(INCL)\lev.h -$(O)restore.o: restore.c $(HACK_H) $(INCL)\lev.h $(INCL)\tcap.h +$(O)region.o: region.c $(HACK_H) +$(O)restore.o: restore.c $(HACK_H) $(INCL)\tcap.h $(O)rip.o: rip.c $(HACK_H) $(O)rnd.o: rnd.c $(HACK_H) $(INCL)\isaac64.h $(O)role.o: role.c $(HACK_H) -$(O)rumors.o: rumors.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h -$(O)save.o: save.c $(HACK_H) $(INCL)\lev.h +$(O)rumors.o: rumors.c $(HACK_H) $(INCL)\dlb.h +$(O)save.o: save.c $(HACK_H) $(O)sfstruct.o: sfstruct.c $(HACK_H) $(O)shk.o: shk.c $(HACK_H) $(O)shknam.o: shknam.c $(HACK_H) @@ -2099,7 +2098,7 @@ $(O)steal.o: steal.c $(HACK_H) $(O)steed.o: steed.c $(HACK_H) $(O)sys.o: sys.c $(HACK_H) $(O)teleport.o: teleport.c $(HACK_H) -$(O)timeout.o: timeout.c $(HACK_H) $(INCL)\lev.h +$(O)timeout.o: timeout.c $(HACK_H) $(O)topten.o: topten.c $(HACK_H) $(INCL)\dlb.h $(INCL)\patchlevel.h $(O)track.o: track.c $(HACK_H) $(O)trap.o: trap.c $(HACK_H) @@ -2107,14 +2106,14 @@ $(O)u_init.o: u_init.c $(HACK_H) $(O)uhitm.o: uhitm.c $(HACK_H) $(O)vault.o: vault.c $(HACK_H) $(O)version.o: version.c $(HACK_H) $(INCL)\dlb.h $(INCL)\date.h \ - $(INCL)\lev.h $(INCL)\patchlevel.h + $(INCL)\patchlevel.h $(O)vision.o: vision.c $(HACK_H) $(INCL)\vis_tab.h $(O)weapon.o: weapon.c $(HACK_H) $(O)were.o: were.c $(HACK_H) $(O)wield.o: wield.c $(HACK_H) $(O)windows.o: windows.c $(HACK_H) $(INCL)\wingem.h $(INCL)\winGnome.h $(O)wizard.o: wizard.c $(HACK_H) -$(O)worm.o: worm.c $(HACK_H) $(INCL)\lev.h +$(O)worm.o: worm.c $(HACK_H) $(O)worn.o: worn.c $(HACK_H) $(O)write.o: write.c $(HACK_H) $(O)zap.o: zap.c $(HACK_H) diff --git a/win/win32/vs2017/NetHack.vcxproj b/win/win32/vs2017/NetHack.vcxproj index a95e3d8d5..924900537 100644 --- a/win/win32/vs2017/NetHack.vcxproj +++ b/win/win32/vs2017/NetHack.vcxproj @@ -244,7 +244,6 @@ - From 5cdc5a00079793fa2bfca8fb73707f0c80146d6f Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 14 Dec 2019 17:21:10 -0500 Subject: [PATCH 486/529] Windows Makefile bit --- sys/winnt/Makefile.msc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 3143e8c20..11bbbadb2 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -1793,7 +1793,7 @@ $(O)wintext.o: ..\win\X11\wintext.c $(HACK_H) $(INCL)\winX.h $(INCL)\xwindow.h # @$(cc) $(cflagsBuild) $(X11CFLAGS) -Fo$@ ..\win\X11\wintext.c $(O)winval.o: ..\win\X11\winval.c $(HACK_H) $(INCL)\winX.h # @$(cc) $(cflagsBuild) $(X11CFLAGS) -Fo$@ ..\win\X11\winval.c -$(O)tile.o: tile.c $(HACK_H) +$(O)tile.o: $(SRC)\tile.c $(HACK_H) $(O)gnaskstr.o: ..\win\gnome\gnaskstr.c ..\win\gnome\gnaskstr.h \ ..\win\gnome\gnmain.h # @$(cc) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnaskstr.c @@ -1884,7 +1884,7 @@ $(O)load_img.o: ..\win\gem\load_img.c $(INCL)\load_img.h # @$(cc) $(cflagsBuild) -Fo$@ ..\win\gem\load_img.c $(O)gr_rect.o: ..\win\gem\gr_rect.c $(INCL)\gr_rect.h # @$(cc) $(cflagsBuild) -Fo$@ ..\win\gem\gr_rect.c -$(O)tile.o: tile.c $(HACK_H) +$(O)tile.o: $(SRC)\tile.c $(HACK_H) #cppregex.o: ..\sys\share\cppregex.cpp # $(CXX) $(CXXFLAGS) -Fo$@ ..\sys\share\cppregex.cpp $(O)qt_bind.o: ..\win\Qt\qt_bind.cpp $(HACK_H) ..\win\Qt\qt_bind.h \ From 0569f2b24a8f98551c6bda122aeeec24cc66f2dd Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 14 Dec 2019 17:28:31 -0500 Subject: [PATCH 487/529] dependency in an old amiga file picked the wrong file however, the file with the dependency no longer exists in the repo anyway so there's a lot more that would be in need of repair --- sys/amiga/Makefile.ami | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amiga/Makefile.ami b/sys/amiga/Makefile.ami index b1b8691c3..7d7f676e4 100644 --- a/sys/amiga/Makefile.ami +++ b/sys/amiga/Makefile.ami @@ -699,7 +699,7 @@ $(SBIN)lev_comp: $(SPLEVOBJS) $(SBIN)dgn_comp: $(DGNCOMPOBJS) $(LINK) $(LNSPEC) $(SBIN)dgn_comp $(LIN) $(DGNCOMPOBJS) $(FBFIL) $(FLLIB) -$(OO)lev_yacc.o: $(UTIL)lev_yacc.c $(HDEP) $(I)pm.h $(I)onames.h +$(OO)lev_yacc.o: $(UTIL)lev_yacc.c $(HDEP) $(I)sp_lev.h $(I)pm.h $(I)onames.h # setdate $(UTIL)lev_yacc.c $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)PREFIX="NH:slib/" $(CFLAGS) \ $(DEFSPEC)alloca=malloc $(OBJSPEC)$@ $(UTIL)lev_yacc.c From 6a71759797d26148f0c3ce99af5ea662505ad54a Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Sat, 14 Dec 2019 18:12:15 -0500 Subject: [PATCH 488/529] This is cron-daily v1-Dec-12-2019. files updated: Files --- Files | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Files b/Files index 0e9645ce5..490514e94 100644 --- a/Files +++ b/Files @@ -91,16 +91,16 @@ beconf.h botl.h color.h config.h config1.h context.h coord.h decl.h def_os2.h dgn_file.h display.h dlb.h dungeon.h engrave.h extern.h flag.h func_tab.h global.h hack.h integer.h -isaac64.h lev.h lint.h mail.h mextra.h -mfndpos.h micro.h mkroom.h monattk.h mondata.h -monflag.h monst.h monsym.h ntconf.h obj.h -objclass.h os2conf.h patchlevel.h pcconf.h permonst.h -prop.h quest.h rect.h region.h rm.h -skills.h sp_lev.h spell.h sys.h system.h -tcap.h tileset.h timeout.h tosconf.h tradstdc.h -trampoli.h trap.h unixconf.h vision.h vmsconf.h -wceconf.h winami.h wincurs.h winprocs.h wintype.h -you.h youprop.h +isaac64.h lint.h mail.h mextra.h mfndpos.h +micro.h mkroom.h monattk.h mondata.h monflag.h +monst.h monsym.h ntconf.h obj.h objclass.h +os2conf.h patchlevel.h pcconf.h permonst.h prop.h +quest.h rect.h region.h rm.h skills.h +sp_lev.h spell.h sys.h system.h tcap.h +tileset.h timeout.h tosconf.h tradstdc.h trampoli.h +trap.h unixconf.h vision.h vmsconf.h wceconf.h +winami.h wincurs.h winprocs.h wintype.h you.h +youprop.h (file for tty versions) wintty.h From 3f457b664b9df0c572b474cac9e5c52bdfde9065 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 14 Dec 2019 16:06:07 -0800 Subject: [PATCH 489/529] finalize fixes36.4 --- doc/fixes36.4 | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index 8d1b2e240..decfdb976 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -1,8 +1,8 @@ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.4 $ $NHDT-Date: 1576287569 2019/12/14 01:39:29 $ -This fixes36.4 file is here to capture information about updates in the 3.6.x -lineage following the release of 3.6.3 in December 2019. Hypothetical version -3.6.4 may not be released, in which case these fixes will appear in 3.7.0. +fixes36.4 contains a terse summary of changes made to 3.6.3 in order to +produce 3.6.4. + General Fixes and Modified Features ----------------------------------- @@ -18,23 +18,12 @@ dozen-ish assorted spelling/typo fixes in messages and source comments fix potential buffer overflow when parsing run-time configuration file -Fixes to Post-3.6.3 Problems that Were Exposed Via git Repository ------------------------------------------------------------------- - - Platform- and/or Interface-Specific Fixes or Features ----------------------------------------------------- General New Features -------------------- - - -NetHack Community Patches (or Variation) Included -------------------------------------------------- - - -Code Cleanup and Reorganization -------------------------------- +none From b24f4c5929b1f90ce43b934723fea188407460b1 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 15 Dec 2019 18:16:41 +0200 Subject: [PATCH 490/529] Expose traps to lua --- include/extern.h | 2 ++ src/cmd.c | 11 ++++++- src/nhlua.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++ src/sp_lev.c | 13 ++++++++ test/test_des.lua | 38 ++++++++++++++++++++++-- 5 files changed, 136 insertions(+), 3 deletions(-) diff --git a/include/extern.h b/include/extern.h index 836784059..a73ba5821 100644 --- a/include/extern.h +++ b/include/extern.h @@ -202,6 +202,7 @@ E int NDECL(doconduct); E int NDECL(domonability); E char FDECL(cmd_from_func, (int NDECL((*)))); E boolean FDECL(redraw_cmd, (CHAR_P)); +E const char *FDECL(levltyp_to_name, (int)); #ifdef USE_TRAMPOLI E int NDECL(doextcmd); E int NDECL(domonability); @@ -2462,6 +2463,7 @@ E struct selectionvar *FDECL(selection_filter_mapchar, (struct selectionvar *, X E void FDECL(set_floodfillchk_match_under, (XCHAR_P)); E void FDECL(selection_do_ellipse, (struct selectionvar *, int, int, int, int, int)); E void NDECL(update_croom); +E const char *FDECL(get_trapname_bytype, (int)); E void FDECL(l_register_des, (lua_State *)); #endif /* !CROSSCOMPILE || CROSSCOMPILE_TARGET */ diff --git a/src/cmd.c b/src/cmd.c index b2d93f624..31b3397c7 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1350,7 +1350,7 @@ wiz_map_levltyp(VOID_ARGS) /* temporary? hack, since level type codes aren't the same as screen symbols and only the latter have easily accessible descriptions */ -static const char *levltyp[] = { +const char *levltyp[] = { "stone", "vertical wall", "horizontal wall", "top-left corner wall", "top-right corner wall", "bottom-left corner wall", "bottom-right corner wall", "cross wall", "tee-up wall", "tee-down wall", @@ -1366,6 +1366,15 @@ static const char *levltyp[] = { "" }; +const char * +levltyp_to_name(typ) +int typ; +{ + if (typ >= 0 && typ < MAX_TYPE) + return levltyp[typ]; + return NULL; +} + /* explanation of base-36 output from wiz_map_levltyp() */ static void wiz_levltyp_legend(VOID_ARGS) diff --git a/src/nhlua.c b/src/nhlua.c index d5dba8465..c47c8db96 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -222,6 +222,75 @@ schar typ; return 'x'; } +/* local t = gettrap(x,y); */ +static int +nhl_gettrap(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 2) { + int x = (int) lua_tointeger(L, 1); + int y = (int) lua_tointeger(L, 2); + + if (x >= 0 && x < COLNO && y >= 0 && y < ROWNO) { + struct trap *ttmp = t_at(x,y); + + if (ttmp) { + lua_newtable(L); + + nhl_add_table_entry_int(L, "tx", ttmp->tx); + nhl_add_table_entry_int(L, "ty", ttmp->ty); + nhl_add_table_entry_int(L, "ttyp", ttmp->ttyp); + nhl_add_table_entry_str(L, "ttyp_name", get_trapname_bytype(ttmp->ttyp)); + nhl_add_table_entry_int(L, "tseen", ttmp->tseen); + nhl_add_table_entry_int(L, "madeby_u", ttmp->madeby_u); + switch (ttmp->ttyp) { + case SQKY_BOARD: + nhl_add_table_entry_int(L, "tnote", ttmp->tnote); + break; + case ROLLING_BOULDER_TRAP: + nhl_add_table_entry_int(L, "launchx", ttmp->launch.x); + nhl_add_table_entry_int(L, "launchy", ttmp->launch.y); + nhl_add_table_entry_int(L, "launch2x", ttmp->launch2.x); + nhl_add_table_entry_int(L, "launch2y", ttmp->launch2.y); + break; + case PIT: + case SPIKED_PIT: + nhl_add_table_entry_int(L, "conjoined", ttmp->conjoined); + break; + } + return 1; + } else + nhl_error(L, "No trap at location"); + } else + nhl_error(L, "Coordinates out of range"); + } else + nhl_error(L, "Wrong args"); + return 0; +} + +/* deltrap(x,y); */ +static int +nhl_deltrap(L) +lua_State *L; +{ + int argc = lua_gettop(L); + + if (argc == 2) { + int x = (int) lua_tointeger(L, 1); + int y = (int) lua_tointeger(L, 2); + + if (x >= 0 && x < COLNO && y >= 0 && y < ROWNO) { + struct trap *ttmp = t_at(x,y); + + if (ttmp) + deltrap(ttmp); + } + } + return 0; +} + /* local loc = getmap(x,y) */ static int nhl_getmap(L) @@ -240,6 +309,7 @@ lua_State *L; /* FIXME: some should be boolean values */ nhl_add_table_entry_int(L, "glyph", levl[x][y].glyph); nhl_add_table_entry_int(L, "typ", levl[x][y].typ); + nhl_add_table_entry_str(L, "typ_name", levltyp_to_name(levl[x][y].typ)); Sprintf(buf, "%c", splev_typ2chr(levl[x][y].typ)); nhl_add_table_entry_str(L, "mapchr", buf); nhl_add_table_entry_int(L, "seenv", levl[x][y].seenv); @@ -250,6 +320,8 @@ lua_State *L; nhl_add_table_entry_bool(L, "edge", levl[x][y].edge); nhl_add_table_entry_bool(L, "candig", levl[x][y].candig); + nhl_add_table_entry_int(L, "has_trap", t_at(x,y) ? 1 : 0); + /* TODO: FIXME: levl[x][y].flags */ lua_pushliteral(L, "flags"); @@ -670,6 +742,9 @@ static const struct luaL_Reg nhl_functions[] = { #if 0 {"setmap", nhl_setmap}, #endif + {"gettrap", nhl_gettrap}, + {"deltrap", nhl_deltrap}, + {"pline", nhl_pline}, {"verbalize", nhl_verbalize}, {"menu", nhl_menu}, diff --git a/src/sp_lev.c b/src/sp_lev.c index 5f0fcda92..68c6f3ac6 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -3351,6 +3351,19 @@ int defval; return defval; } +const char * +get_trapname_bytype(ttyp) +int ttyp; +{ + int i; + + for (i = 0; trap_types[i].name; i++) + if (ttyp == trap_types[i].type) + return trap_types[i].name; + + return NULL; +} + int get_traptype_byname(trapname) const char *trapname; diff --git a/test/test_des.lua b/test/test_des.lua index 5a82efb1d..1e8487530 100644 --- a/test/test_des.lua +++ b/test/test_des.lua @@ -14,6 +14,20 @@ function is_map_at(x,y, mapch, lit) end end +function check_loc_name(x, y, name) + local loc = nh.getmap(x,y); + if (loc.typ_name ~= name) then + error("No " .. name .. " at " .. x .. "," .. y .. " (" .. loc.typ_name .. ")"); + end +end + +function check_trap_at(x,y, name) + local t = nh.gettrap(x + 1, y); -- + 1 == g.xstart + if (t.ttyp_name ~= name) then + error("Trap at " .. x .. "," .. y .. " is " .. t.ttyp_name .. ", not " .. name); + end +end + function test_level_init() des.reset_level(); des.level_init(); @@ -171,6 +185,15 @@ LTL]]) FFF F.F FFF]] }) + for x = 60, 62 do + for y = 5, 7 do + local nam = "iron bars"; + if (x == 61 and y == 6) then + nam = "room"; + end + check_loc_name(x, y, nam); + end + end des.map({ halign = "left", valign = "bottom", map = [[ III .I. @@ -179,8 +202,11 @@ end function test_feature() des.feature("fountain", 40, 08); + check_loc_name(40 + 1, 08, "fountain"); des.feature("sink", {41, 08}); + check_loc_name(41 + 1, 08, "sink"); des.feature({ type = "pool", x = 42, y = 08 }); + check_loc_name(42 + 1, 08, "pool"); end function test_gold() @@ -189,9 +215,17 @@ end function test_trap() des.trap("pit", 41, 06); + check_trap_at(41, 06, "pit"); + des.trap("level teleport", {42, 06}); - des.trap({ type = "hole", x = 43, y = 06 }); - des.trap({ type = "hole", coord = {44, 06} }); + check_trap_at(42, 06, "level teleport"); + + des.trap({ type = "falling rock", x = 43, y = 06 }); + check_trap_at(43, 06, "falling rock"); + + des.trap({ type = "dart", coord = {44, 06} }); + check_trap_at(44, 06, "dart"); + des.trap(); des.trap("rust"); end From be01fba97ac5c33feb16b6e1a88781296e2abb56 Mon Sep 17 00:00:00 2001 From: keni Date: Sun, 15 Dec 2019 12:38:42 -0500 Subject: [PATCH 491/529] add date to Guidebook.mn title page --- doc/Guidebook.mn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 4c4cd5f11..35ecfa425 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.334 $ $NHDT-Date: 1575245028 2019/12/02 00:03:48 $ +.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.337 $ $NHDT-Date: 1576431522 2019/12/15 17:38:42 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -45,6 +45,8 @@ A Guide to the Mazes of Menace .au Original version - Eric S. Raymond (Edited and expanded for 3.6 by Mike Stephenson and others) +.sp 1 +\*(f2 .hn 1 Introduction .pg From d654a4f5d1a82d39e51d563e8e8eab1407e7827c Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Sun, 15 Dec 2019 13:16:00 -0500 Subject: [PATCH 492/529] This is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt --- doc/Guidebook.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index 60ccbdf68..c0587373a 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -15,6 +15,8 @@ Original version - Eric S. Raymond (Edited and expanded for 3.6 by Mike Stephenson and others) + December 5, 2019 + 1. Introduction @@ -58,8 +60,6 @@ posted on the inn's walls getting lower and lower. - - NetHack Guidebook 1 From b956e1a205d279e552592633272e5775922a59a9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 15 Dec 2019 14:03:25 -0500 Subject: [PATCH 493/529] silence some compiler warnings that showed up recently --- src/nhlobj.c | 32 +++++++++++++++++++++++++++----- src/nhlua.c | 2 ++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/nhlobj.c b/src/nhlobj.c index 736c3587e..1ce9cd710 100644 --- a/src/nhlobj.c +++ b/src/nhlobj.c @@ -5,6 +5,26 @@ #include "hack.h" #include "sp_lev.h" +static int FDECL(l_obj_add_to_container, (lua_State *)); +static int FDECL(l_obj_addcontent, (lua_State *)); +static int FDECL(l_obj_at, (lua_State *)); +static int FDECL(l_obj_class, (lua_State *)); +static int FDECL(l_obj_container, (lua_State *)); +static int FDECL(l_obj_contents, (lua_State *)); +static int FDECL(l_obj_gc, (lua_State *)); +static int FDECL(l_obj_getcontents, (lua_State *)); +static int FDECL(l_obj_isnull, (lua_State *)); +static int FDECL(l_obj_new_readobjnam, (lua_State *)); +static int FDECL(l_obj_next, (lua_State *)); +static int FDECL(l_obj_nextobj, (lua_State *)); +static int FDECL(l_obj_obj_add_to_container, (lua_State *)); +static int FDECL(l_obj_obj_getcontents, (lua_State *)); +static int FDECL(l_obj_obj_objects_to_table, (lua_State *)); +static int FDECL(l_obj_objects_to_table, (lua_State *)); +static int FDECL(l_obj_placeobj, (lua_State *)); +static int FDECL(l_obj_to_table, (lua_State *)); +static int FDECL(l_obj_totable, (lua_State *)); + struct _lua_obj { int state; /* UNUSED */ struct obj *obj; @@ -125,7 +145,7 @@ lua_State *L; } if (lua_type(L, 1) == LUA_TNUMBER) { - otyp = luaL_checkinteger(L, 1); + otyp = (int) luaL_checkinteger(L, 1); } else if (lua_type(L, 1) == LUA_TUSERDATA) { struct _lua_obj *lo = l_obj_check(L, 1); if (lo && lo->obj) @@ -308,8 +328,9 @@ lua_State *L; if (argc == 2) { int x, y; - x = luaL_checkinteger(L, 1); - y = luaL_checkinteger(L, 2); + + x = (int) luaL_checkinteger(L, 1); + y = (int) luaL_checkinteger(L, 2); lua_pop(L, 2); (void) l_obj_push(L, g.level.objects[x][y]); return 1; @@ -333,8 +354,9 @@ lua_State *L; if (lo && lo->obj) { int x, y; - x = luaL_checkinteger(L, 2); - y = luaL_checkinteger(L, 3); + + x = (int) luaL_checkinteger(L, 2); + y = (int) luaL_checkinteger(L, 3); lua_pop(L, 3); place_object(lo->obj, x, y); diff --git a/src/nhlua.c b/src/nhlua.c index c47c8db96..edbde987e 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -16,6 +16,8 @@ /* lua_CFunction prototypes */ static int FDECL(nhl_test, (lua_State *)); static int FDECL(nhl_getmap, (lua_State *)); +static int FDECL(nhl_gettrap, (lua_State *)); +static int FDECL(nhl_deltrap, (lua_State *)); #if 0 static int FDECL(nhl_setmap, (lua_State *)); #endif From 90850933387ac16030053561250d85f9a6d29e51 Mon Sep 17 00:00:00 2001 From: Patric Mueller Date: Sun, 15 Dec 2019 20:38:44 +0100 Subject: [PATCH 494/529] Fix compilation on platforms that split the ncurses and tinfo libraries Some platforms compile ncurses in such a way that the tinfo library needs to be separately linked in (e.g. Gentoo). The tinfo library is a low-level library being used by and bundled with ncurses. Adding '-ltinfo' to WINTTYLIB in the hint files was considered the most robust solution to this problem. This still works on systems with ncurses 5.9. Using pkg-config was ruled out as the default build of ncurses doesn't install the necessary files. --- doc/fixes36.4 | 1 + sys/unix/hints/linux | 2 +- sys/unix/hints/linux-chroot | 2 +- sys/unix/hints/linux-minimal | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index 8d466e096..693eebc5c 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -23,6 +23,7 @@ Fixes to Post-3.6.3 Problems that Were Exposed Via git Repository Platform- and/or Interface-Specific Fixes or Features ----------------------------------------------------- +fix compilation on platforms that split the ncurses and tinfo libraries General New Features diff --git a/sys/unix/hints/linux b/sys/unix/hints/linux index dcdee332d..862915053 100644 --- a/sys/unix/hints/linux +++ b/sys/unix/hints/linux @@ -47,7 +47,7 @@ WINLIB = $(WINTTYLIB) $(WINCURSESLIB) #WINSRC += tile.c #WINOBJ += tile.o -WINTTYLIB=-lcurses +WINTTYLIB=-lncurses -ltinfo CHOWN=true CHGRP=true diff --git a/sys/unix/hints/linux-chroot b/sys/unix/hints/linux-chroot index eb4fc2733..e5bb767fb 100644 --- a/sys/unix/hints/linux-chroot +++ b/sys/unix/hints/linux-chroot @@ -39,7 +39,7 @@ WINSRC = $(WINTTYSRC) WINOBJ = $(WINTTYOBJ) WINLIB = $(WINTTYLIB) -WINTTYLIB=-lcurses +WINTTYLIB=-lncurses -ltinfo CHOWN=true CHGRP=true diff --git a/sys/unix/hints/linux-minimal b/sys/unix/hints/linux-minimal index 6c2638ae3..256332cc7 100644 --- a/sys/unix/hints/linux-minimal +++ b/sys/unix/hints/linux-minimal @@ -21,7 +21,7 @@ WINSRC = $(WINTTYSRC) WINOBJ = $(WINTTYOBJ) WINLIB = $(WINTTYLIB) -WINTTYLIB=-lcurses +WINTTYLIB=-lncurses -ltinfo CHOWN=true CHGRP=true From c201c5608bb280069f02ac67c7e7c427c31ef577 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 15 Dec 2019 17:22:11 -0500 Subject: [PATCH 495/529] report post-release in makedefs if someone happens to build post-release code --- util/dlb_main | Bin 0 -> 23400 bytes util/makedefs.c | 4 ++++ 2 files changed, 4 insertions(+) create mode 100755 util/dlb_main diff --git a/util/dlb_main b/util/dlb_main new file mode 100755 index 0000000000000000000000000000000000000000..acca116296a02aa20d2e396ad46f4697212ab2a5 GIT binary patch literal 23400 zcmeHvdwf*Ywf~tsVB|3~DAOGt%xgph#G}knPQm}* zRL)XHAYH^Tp6}rVxjY;fswK4xybzS+<`i%smrfFVl1dAS7K^;$NZCw|N~$O-14xc+ zbycw>sLCRes$>j82{Eytvj53Ef=nT23OPxS2*V_m^&@rkw@B14m->)LK~mzS&~Qj^ zqPSMhk|)urqC82Z+|`iFn9fE2?*A^4yHJ#uuU(E%Ma{x=)V3^T45do&68*OBX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!N*}CCO^ro?^(cwDcm6O|7_sY{thv&g}W$si+X)} z9%mHIty~8FbF(z?#9GFG^8Wlr@DF!iPCF}i7)7C|9@FE^&E+9w=*pO&-WJ4tH|_Z4 zJQ!^12riFwENhGeoA4%2EZ7+DQt)~O-bvE&meA~3m9vLuqKj@?gN@N>{$_wgzL?Mb(+wi`4%d{D*_8@yn*0?dGoHRTNGU6tqIhTR#YPt z48`KClNEM15@FO8?7||CN8VV(ZY0XO2WcpeZZ2Y%FAYKe=mH~t%~Li%-RhK$uq&8y zpf){-MpJ@eypq$X@Q%%9VQ)ueL%DZF4du?@7efsJWI5{uCEP(bNQH1URCX@Ai7H6N zGjC-VPGxhPbo*0wHgkb&2;&p__=QgF4y?A$YzB7mRW_7+2~@Bt))B-@Y)u$KLH`0M zYiex|#$#c+%_`H=%vt&USJ~?L1zgz}q}ceOci@E6@=LX{*;sq6z#DQXXjv>Ks==phBt#x#xnXN4W41y=Y{&;GHIz$zLzjVNBmCa3Y%CbWeOYqw&_!Cq-j3B2?}Q`5 z66=Lt*^2lTVcA&LjbB4qR4JuAwz>^3F@ow*PFrLQ_nC#Gok}@gYYLZpYy8vn#^oZl zyggpNEZ&NH4O^R(a!R!{;xe@Irq%7x$0-bDIe1NtUggY61d$gFM;b{$#5yCoQqDTN z9MSUS9Z0gb<;rP72U7;fdYX}h*I%D#?6A=;&O^_lt<6^4xp`c&MGE zJa*tL(0Kv2iWzx%{wS$D_vhSPhl~@w1%Gs=F3Xqal#Q%gBSE?A Date: Sun, 15 Dec 2019 17:41:27 -0500 Subject: [PATCH 496/529] more makedefs --- util/makedefs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util/makedefs.c b/util/makedefs.c index 23ff7d7e8..22194eafa 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1245,7 +1245,11 @@ const char *build_date; #if (NH_DEVEL_STATUS == NH_STATUS_BETA) Strcat(subbuf, " Beta"); #else +#if (NH_DEVEL_STATUS == NH_STATUS_WIP) Strcat(subbuf, " Work-in-progress"); +#else + Strcat(subbuf, " post-release"); +#endif #endif #endif From a2a000656f48a4f020bb9cfe8027da9e89af71bc Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 15 Dec 2019 17:59:48 -0500 Subject: [PATCH 497/529] mistake file --- util/.gitignore | 1 + util/dlb_main | Bin 23400 -> 0 bytes 2 files changed, 1 insertion(+) delete mode 100755 util/dlb_main diff --git a/util/.gitignore b/util/.gitignore index c211d0a77..9a54f6f2e 100644 --- a/util/.gitignore +++ b/util/.gitignore @@ -9,6 +9,7 @@ makedefs dgn_comp lev_comp dlb +dlb_main recover tilemap tileedit diff --git a/util/dlb_main b/util/dlb_main deleted file mode 100755 index acca116296a02aa20d2e396ad46f4697212ab2a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23400 zcmeHvdwf*Ywf~tsVB|3~DAOGt%xgph#G}knPQm}* zRL)XHAYH^Tp6}rVxjY;fswK4xybzS+<`i%smrfFVl1dAS7K^;$NZCw|N~$O-14xc+ zbycw>sLCRes$>j82{Eytvj53Ef=nT23OPxS2*V_m^&@rkw@B14m->)LK~mzS&~Qj^ zqPSMhk|)urqC82Z+|`iFn9fE2?*A^4yHJ#uuU(E%Ma{x=)V3^T45do&68*OBX-5 zxAM-V3yAkz{E-e;FJ3THL3riI3F#V0og4-Moq95?JeUWs&x21wx#}=_NcV91XXnAc zlLz0J2fr;39?pZ4dk$yMiahxGJU9*W;q*lF;P>Xi|C|TEArHPk4?aB)J||DVbmie6 zod*x*!OzHp-=7Dcng^ef2R}a#p3H+^k*B`D0Y8n0+^`eCaQ%2E@Nvo+ipQfe5jkHe z7|$UZzO$6(=14r&qQvxQsB^Uv40c9a+x6yPsAYu`?rPPQ=8n#AyV9(OBN3%DuE)R< z(;Gu8h$GnC*cwq9mvuzJw>+$e*#9x5ITjADP(m$Dtx+Yy;?1E*M=Y$gHAW&GAr#gW zjz+;2YHV*-npZ_z^{~<$4L3GHJEN@pU~px##h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=QgF4y?A$YzB7mRW_7+2~@Bt))B-@Y)u$KLH`0M zYiex|#$#c+%_`H=%vt&USJ~?L1zgz}q}ceOci@E6@=LX{*;sq6z#DQXXjv>Ks==phBt#x#xnXN4W41y=Y{&;GHIz$zLzjVNBmCa3Y%CbWeOYqw&_!Cq-j3B2?}Q`5 z66=Lt*^2lTVcA&LjbB4qR4JuAwz>^3F@ow*PFrLQ_nC#Gok}@gYYLZpYy8vn#^oZl zyggpNEZ&NH4O^R(a!R!{;xe@Irq%7x$0-bDIe1NtUggY61d$gFM;b{$#5yCoQqDTN z9MSUS9Z0gb<;rP72U7;fdYX}h*I%D#?6A=;&O^_lt<6^4xp`c&MGE zJa*tL(0Kv2iWzx%{wS$D_vhSPhl~@w1%Gs=F3Xqal#Q%gBSE?A Date: Mon, 16 Dec 2019 00:25:20 -0500 Subject: [PATCH 498/529] flying hero should be able to pass through a hole using '>' --- doc/fixes37.0 | 1 + include/extern.h | 2 +- src/dokick.c | 2 +- src/trap.c | 17 +++++++++++------ 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 37627fafa..0ad5b6201 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -12,6 +12,7 @@ fix internal self-recover to work with recent fields added to checkpoint file improvements to pronoun usage when hallucinating function calls made from mapglyph based on dungeon level are now called once per level +flying hero could not use a hole deliberately with '>' Fixes to Pre-3.7.0 Problems that Were Exposed Via git Repository diff --git a/include/extern.h b/include/extern.h index a73ba5821..ed0a65cf5 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2603,7 +2603,7 @@ E boolean FDECL(burnarmor, (struct monst *)); E int FDECL(erode_obj, (struct obj *, const char *, int, int)); E boolean FDECL(grease_protect, (struct obj *, const char *, struct monst *)); E struct trap *FDECL(maketrap, (int, int, int)); -E void FDECL(fall_through, (BOOLEAN_P)); +E void FDECL(fall_through, (BOOLEAN_P, unsigned)); E struct monst *FDECL(animate_statue, (struct obj *, XCHAR_P, XCHAR_P, int, int *)); E struct monst *FDECL(activate_statue_trap, diff --git a/src/dokick.c b/src/dokick.c index 924aeccee..1260f87b6 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1042,7 +1042,7 @@ dokick() return 1; } else if (!rn2(4)) { if (dunlev(&u.uz) < dunlevs_in_dungeon(&u.uz)) { - fall_through(FALSE); + fall_through(FALSE, 0); return 1; } else goto ouch; diff --git a/src/trap.c b/src/trap.c index ca59b2069..0639421ba 100644 --- a/src/trap.c +++ b/src/trap.c @@ -440,13 +440,15 @@ int x, y, typ; } void -fall_through(td) +fall_through(td, ftflags) boolean td; /* td == TRUE : trap door or hole */ +unsigned ftflags; { d_level dtmp; char msgbuf[BUFSZ]; const char *dont_fall = 0; int newlevel, bottom; + struct trap *t = (struct trap *) 0; /* we'll fall even while levitating in Sokoban; otherwise, if we won't fall and won't be told that we aren't falling, give up now */ @@ -469,10 +471,9 @@ boolean td; /* td == TRUE : trap door or hole */ } while (!rn2(4) && newlevel < bottom); if (td) { - struct trap *t = t_at(u.ux, u.uy); - + t = t_at(u.ux, u.uy); feeltrap(t); - if (!Sokoban) { + if (!Sokoban && !(ftflags & TOOKPLUNGE)) { if (t->ttyp == TRAPDOOR) pline("A trap door opens up under you!"); else @@ -484,7 +485,8 @@ boolean td; /* td == TRUE : trap door or hole */ if (Sokoban && Can_fall_thru(&u.uz)) ; /* KMH -- You can't escape the Sokoban level traps */ else if (Levitation || u.ustuck - || (!Can_fall_thru(&u.uz) && !levl[u.ux][u.uy].candig) || Flying + || (!Can_fall_thru(&u.uz) && !levl[u.ux][u.uy].candig) + || (Flying && !(ftflags & TOOKPLUNGE)) || is_clinger(g.youmonst.data) || (Inhell && !u.uevent.invoked && newlevel == bottom)) { dont_fall = "don't fall in."; @@ -503,6 +505,9 @@ boolean td; /* td == TRUE : trap door or hole */ } return; } + if (Flying && (ftflags & TOOKPLUNGE) && td && t) + You("swoop down %s!", (t->ttyp == TRAPDOOR) + ? "through the trap door" : "into the gaping hole"); if (*u.ushops) shopdig(1); @@ -1283,7 +1288,7 @@ unsigned trflags; defsyms[trap_to_defsym(ttype)].explanation); break; /* don't activate it after all */ } - fall_through(TRUE); + fall_through(TRUE, (trflags & TOOKPLUNGE)); break; case TELEP_TRAP: From ac6e13fd7abc1bdc9b4ae9aa7b3f3f173aa4d031 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 17 Dec 2019 00:41:55 -0500 Subject: [PATCH 499/529] allow run-from-removable-device configuration on Windows Allow a way to configure NetHack to run entirely from a USB stick or other removable device in a way that allows everything to reside entirely on the USB stick, and nothing on the computer's hard drive. That could be done in versions prior to 3.6.3. Sample: i: is a USB stick i:\nhdist contains the NetHack Windows distribution and a sysconf file dropped into that distribution with the following entry in it: portable_device_top = nethack No device is included in the portable_device_top entry, the device is always the device that the nethack exe resides on. If you try to specify a device in the portable_device_top path, the device portion will be ignored. portable_device_top specifies the folder on the device that is writable by NetHack and as such it cannot be the same folder that the executable resides in. i:\nhdist\nethack --showpaths Variable playground locations: [hackdir ]="i:\nethack\" [leveldir ]="i:\nethack\" [savedir ]="i:\nethack\" [bonesdir ]="i:\nethack\" [datadir ]="i:\nhdist\" [scoredir ]="i:\nethack\" [lockdir ]="i:\nethack\" [sysconfdir]="i:\nhdist\" [configdir ]="i:\nethack\" [troubledir]="i:\nethack\" NetHack's system configuration file (in sysconfdir): "i:\nhdist\sysconf" The loadable symbols file (in sysconfdir): "i:\nhdist\symbols" Basic data files (in datadir) are collected inside: "i:\nhdist\nhdat363" No end-of-game disclosure file (disabled). Writable folder for portable device config (sysconf portable_device_top): "i:\nethack\" Your personal configuration file (in configdir): "i:\nethack\.nethackrc" Without that sysconf file in the NetHack distribution folder on the USB stick with the 'portable_device_top = ' entry, the paths return to the default locations for 3.6.3 on Windows: i:\nhdist\nethack --showpaths Variable playground locations: [hackdir ]="C:\Users\JaneDoe\NetHack\3.6\" [leveldir ]="C:\Users\JaneDoe\AppData\Local\NetHack\3.6\" [savedir ]="C:\Users\JaneDoe\AppData\Local\NetHack\3.6\" [bonesdir ]="C:\ProgramData\NetHack\3.6\" [datadir ]="i:\nhdist\" [scoredir ]="C:\ProgramData\NetHack\3.6\" [lockdir ]="C:\ProgramData\NetHack\3.6\" [sysconfdir]="C:\ProgramData\NetHack\3.6\" [configdir ]="C:\Users\JaneDoe\NetHack\" [troubledir]="C:\Users\JaneDoe\NetHack\3.6\" NetHack's system configuration file (in sysconfdir): "C:\ProgramData\NetHack\3.6\sysconf" The loadable symbols file (in sysconfdir): "C:\ProgramData\NetHack\3.6\symbols" Basic data files (in datadir) are collected inside: "i:\nhdist\nhdat363" No end-of-game disclosure file (disabled). Your personal configuration file (in configdir): "C:\Users\JaneDoe\NetHack\.nethackrc" --- doc/fixes36.4 | 1 + include/extern.h | 1 + include/sys.h | 3 + src/files.c | 16 ++++ src/sys.c | 9 ++ sys/winnt/windmain.c | 207 +++++++++++++++++++++++++++++++++++++------ 6 files changed, 209 insertions(+), 28 deletions(-) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index 693eebc5c..9a4d40dba 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -24,6 +24,7 @@ Fixes to Post-3.6.3 Problems that Were Exposed Via git Repository Platform- and/or Interface-Specific Fixes or Features ----------------------------------------------------- fix compilation on platforms that split the ncurses and tinfo libraries +allow run-from-removable-device on Windows General New Features diff --git a/include/extern.h b/include/extern.h index 0ac10abee..26a82612b 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1833,6 +1833,7 @@ E boolean NDECL(authorize_wizard_mode); #endif /* MICRO || WIN32 */ #if defined(WIN32) E int NDECL(getlock); +E const char *NDECL(get_portable_device); #endif /* ### pcsys.c ### */ diff --git a/include/sys.h b/include/sys.h index bf039cf77..392987660 100644 --- a/include/sys.h +++ b/include/sys.h @@ -17,6 +17,9 @@ struct sysopt { char *debugfiles; /* files to show debugplines in. '*' is all. */ #ifdef DUMPLOG char *dumplogfile; /* where the dump file is saved */ +#endif +#ifdef WIN32 + char *portable_device_top; /* nethack configuration for a portable drive */ #endif int env_dbgfl; /* 1: debugfiles comes from getenv("DEBUGFILES") * so sysconf's DEBUGFILES shouldn't override it; diff --git a/src/files.c b/src/files.c index 5f24956b8..7f9cf65b0 100644 --- a/src/files.c +++ b/src/files.c @@ -2462,6 +2462,12 @@ char *origbuf; if (sysopt.dumplogfile) free((genericptr_t) sysopt.dumplogfile); sysopt.dumplogfile = dupstr(bufp); +#endif +#ifdef WIN32 + } else if (src == SET_IN_SYS && match_varname(buf, "portable_device_top", 8)) { + if (sysopt.portable_device_top) + free((genericptr_t) sysopt.portable_device_top); + sysopt.portable_device_top = dupstr(bufp); #endif } else if (src == SET_IN_SYS && match_varname(buf, "GENERICUSERS", 12)) { if (sysopt.genericusers) @@ -4141,6 +4147,16 @@ reveal_paths(VOID_ARGS) #endif /* ?DUMPLOG */ raw_printf("No end-of-game disclosure file (%s).", nodumpreason); +#ifdef WIN32 + if (sysopt.portable_device_top) { + const char *pd = get_portable_device(); + + raw_printf("Writable folder for portable device config (sysconf %s):", + "portable_device_top"); + raw_printf(" \"%s\"", pd); + } +#endif + /* personal configuration file */ buf[0] = '\0'; diff --git a/src/sys.c b/src/sys.c index a72a87b4b..ad7a811fa 100644 --- a/src/sys.c +++ b/src/sys.c @@ -34,6 +34,9 @@ sys_early_init() #endif #ifdef DUMPLOG sysopt.dumplogfile = (char *) 0; +#endif +#ifdef WIN32 + char *portable_device_top = (char *) 0; #endif sysopt.env_dbgfl = 0; /* haven't checked getenv("DEBUGFILES") yet */ sysopt.shellers = (char *) 0; @@ -103,6 +106,12 @@ sysopt_release() #ifdef DUMPLOG if (sysopt.dumplogfile) free((genericptr_t)sysopt.dumplogfile), sysopt.dumplogfile=(char *)0; +#endif +#ifdef WIN32 + if (sysopt.portable_device_top) { + free((genericptr_t) sysopt.portable_device_top); + sysopt.portable_device_top = (char *) 0; + } #endif if (sysopt.genericusers) free((genericptr_t) sysopt.genericusers), diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 317d4657e..b447ffcbd 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -62,6 +62,9 @@ int NDECL(other_self_recover_prompt); char orgdir[PATHLEN]; boolean getreturn_enabled; +int windows_startup_state = 0; /* we flag whether to continue with this */ + /* 0 = keep starting up, everything is good */ + extern int redirect_stdout; /* from sys/share/pcsys.c */ extern int GUILaunched; HANDLE hStdOut; @@ -162,6 +165,134 @@ folder_file_exists(const char * folder, const char * file_name) return file_exists(path); } +boolean +test_portable_config( + const char *executable_path, + char *portable_device_top_path, + size_t portable_device_top_path_size) +{ + boolean retval = FALSE, + save_initoptions_noterminate = iflags.initoptions_noterminate; + char tmppath[MAX_PATH], *toppath, *sysconftop; +#ifdef UNICODE + TCHAR wdrive[_MAX_DRIVE]; + TCHAR wthisdir[_MAX_DIR]; + TCHAR wfname[_MAX_FNAME]; + TCHAR wext[_MAX_EXT]; +#endif + char drive[_MAX_DRIVE]; + char thisdir[_MAX_DIR]; + char fname[_MAX_FNAME]; + char ext[_MAX_EXT]; + errno_t err; + + if (portable_device_top_path && folder_file_exists(executable_path, "sysconf")) { + /* + There is a sysconf file (not just sysconf.template) present in + the exe path, which is not the way NetHack is initially distributed, + so assume it means that the admin/installer wants to override + something, perhaps set up for a fully-portable configuration that + leaves no traces behind elsewhere on this computer's hard drive - + delve into that... + */ + + *portable_device_top_path = '\0'; + (void) strncpy(tmppath, executable_path, sizeof tmppath - 1); + tmppath[sizeof tmppath - 1] = '\0'; + (void) strcat(tmppath, "sysconf"); + /* split the path up */ +#ifdef UNICODE + { + int sz, wchars_num = MultiByteToWideChar( CP_ACP, 0, tmppath, -1, NULL, 0); + wchar_t *wstr; + + if (wchars_num) { + wstr = (wchar_t *) alloc(wchars_num * sizeof(wchar_t)); + MultiByteToWideChar( CP_ACP, 0, tmppath, -1, wstr, wchars_num); + err = _wsplitpath_s(wstr, wdrive, _MAX_DRIVE, wthisdir, _MAX_DIR, + wfname, _MAX_FNAME, wext, _MAX_EXT); + free(wstr); + } + sz = WideCharToMultiByte(CP_ACP, 0, wdrive, -1, drive, + 0, NULL, NULL); + if (sz <= sizeof drive) + WideCharToMultiByte(CP_ACP, 0, wdrive, -1, drive, + sz, NULL, NULL); + + } +#else + err = _splitpath_s(tmppath, drive, _MAX_DRIVE, thisdir, _MAX_DIR, + fname, _MAX_FNAME, ext, _MAX_EXT); +#endif + if (err != 0) + goto done_test; + + toppath = (char *) alloc(portable_device_top_path_size); + *toppath = '\0'; + /* -2 because we need to append the path separator */ + (void) strncpy(toppath, drive, portable_device_top_path_size - 2); + toppath[portable_device_top_path_size - 2] = '\0'; + (void) strcat(toppath, "\\"); + + iflags.initoptions_noterminate = 1; + /* assure_syscf_file(); */ + config_error_init(TRUE, tmppath, FALSE); + /* ... and _must_ parse correctly. */ + if (read_config_file(tmppath, SET_IN_SYS) + && sysopt.portable_device_top + && (strlen(sysopt.portable_device_top) + strlen(toppath) + < portable_device_top_path_size - 3)) { + sysconftop = sysopt.portable_device_top; + if (sysconftop[1] == ':') + sysconftop += 2; /* skip the device if specified */ + if (*sysconftop == '\\') + sysconftop += 1; /* skip the root folder if specified */ + (void) strcat(toppath, sysconftop); + append_slash(toppath); + retval = TRUE; + } else { + if (config_error_done()) + retval = FALSE; + } + iflags.initoptions_noterminate = save_initoptions_noterminate; + sysopt_release(); + if (retval) + Strcpy(portable_device_top_path, toppath); + free(toppath); + } + done_test: + + return retval; +} + +static char portable_device_top_path[MAX_PATH]; + +const char *get_portable_device() +{ + return (const char *) portable_device_top_path; +} + +boolean illegal_dir(const char *d1, const char *d2) +{ + int i; + char tmpbuf[MAX_PATH]; + + if (!strcmpi(d1, d2)) { + (void) strncpy(tmpbuf, &portable_device_top_path[3], + sizeof tmpbuf - 1); + tmpbuf[sizeof tmpbuf - 1] = '\0'; + i = (int) strlen(tmpbuf) - 1; + if (tmpbuf[i] == '\\') + tmpbuf[i] = '\0'; + raw_printf("Illegal \"portable_device_top = %s\" in your sysconf file", + tmpbuf); + raw_printf("because the exe is running from that folder."); + raw_printf("Point 'portable_device_top' to a different folder."); + return TRUE; + } + return FALSE; +} + void set_default_prefix_locations(const char *programPath) { @@ -178,29 +309,43 @@ set_default_prefix_locations(const char *programPath) strcpy(executable_path, get_executable_path()); append_slash(executable_path); - build_known_folder_path(&FOLDERID_Profile, profile_path, - sizeof(profile_path), FALSE); + if (test_portable_config(executable_path, portable_device_top_path, + sizeof portable_device_top_path)) { + if (illegal_dir(portable_device_top_path, executable_path)) + windows_startup_state = 2; + fqn_prefix[SYSCONFPREFIX] = executable_path; + fqn_prefix[CONFIGPREFIX] = portable_device_top_path; + fqn_prefix[HACKPREFIX] = portable_device_top_path; + fqn_prefix[SAVEPREFIX] = portable_device_top_path; + fqn_prefix[LEVELPREFIX] = portable_device_top_path; + fqn_prefix[BONESPREFIX] = portable_device_top_path; + fqn_prefix[SCOREPREFIX] = portable_device_top_path; + fqn_prefix[LOCKPREFIX] = portable_device_top_path; + fqn_prefix[TROUBLEPREFIX] = portable_device_top_path; + fqn_prefix[DATAPREFIX] = executable_path; + } else { + build_known_folder_path(&FOLDERID_Profile, profile_path, + sizeof(profile_path), FALSE); - build_known_folder_path(&FOLDERID_Profile, versioned_profile_path, - sizeof(profile_path), TRUE); + build_known_folder_path(&FOLDERID_Profile, versioned_profile_path, + sizeof(profile_path), TRUE); - build_known_folder_path(&FOLDERID_LocalAppData, - versioned_user_data_path, sizeof(versioned_user_data_path), TRUE); - - build_known_folder_path(&FOLDERID_ProgramData, - versioned_global_data_path, sizeof(versioned_global_data_path), TRUE); - - fqn_prefix[SYSCONFPREFIX] = versioned_global_data_path; - fqn_prefix[CONFIGPREFIX] = profile_path; - fqn_prefix[HACKPREFIX] = versioned_profile_path; - fqn_prefix[SAVEPREFIX] = versioned_user_data_path; - fqn_prefix[LEVELPREFIX] = versioned_user_data_path; - fqn_prefix[BONESPREFIX] = versioned_global_data_path; - fqn_prefix[SCOREPREFIX] = versioned_global_data_path; - fqn_prefix[LOCKPREFIX] = versioned_global_data_path; - fqn_prefix[TROUBLEPREFIX] = versioned_profile_path; - fqn_prefix[DATAPREFIX] = executable_path; + build_known_folder_path(&FOLDERID_LocalAppData, + versioned_user_data_path, sizeof(versioned_user_data_path), TRUE); + build_known_folder_path(&FOLDERID_ProgramData, + versioned_global_data_path, sizeof(versioned_global_data_path), TRUE); + fqn_prefix[SYSCONFPREFIX] = versioned_global_data_path; + fqn_prefix[CONFIGPREFIX] = profile_path; + fqn_prefix[HACKPREFIX] = versioned_profile_path; + fqn_prefix[SAVEPREFIX] = versioned_user_data_path; + fqn_prefix[LEVELPREFIX] = versioned_user_data_path; + fqn_prefix[BONESPREFIX] = versioned_global_data_path; + fqn_prefix[SCOREPREFIX] = versioned_global_data_path; + fqn_prefix[LOCKPREFIX] = versioned_global_data_path; + fqn_prefix[TROUBLEPREFIX] = versioned_profile_path; + fqn_prefix[DATAPREFIX] = executable_path; + } } /* copy file if destination does not exist */ @@ -394,6 +539,12 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ copy_config_content(); process_options(argc, argv); + /* did something earlier flag a need to exit without starting a game? */ + if (windows_startup_state > 0) { + raw_printf("Exiting."); + nethack_exit(EXIT_FAILURE); + } + /* Finished processing options, lock all directory paths */ for(int i = 0; i < PREFIX_COUNT; i++) fqn_prefix_locked[i] = TRUE; @@ -535,9 +686,9 @@ attempt_restore: You("are in non-scoring discovery mode."); } - // iflags.debug_fuzzer = TRUE; + // iflags.debug_fuzzer = TRUE; - moveloop(resuming); + moveloop(resuming); nethack_exit(EXIT_SUCCESS); /*NOTREACHED*/ return 0; @@ -563,15 +714,15 @@ char *argv[]; iflags.initoptions_noterminate = FALSE; reveal_paths(); nethack_exit(EXIT_SUCCESS); - } + } if (argcheck(argc, argv, ARG_DEBUG) == 1) { argc--; argv++; - } - if (argcheck(argc, argv, ARG_WINDOWS) == 1) { - argc--; - argv++; - } + } + if (argcheck(argc, argv, ARG_WINDOWS) == 1) { + argc--; + argv++; + } if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') { /* avoid matching "-dec" for DECgraphics; since the man page * says -d directory, hope nobody's using -desomething_else From 51b02a758400d253eecfc37a5b3ae1ea3ace0f23 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 17 Dec 2019 01:07:53 -0500 Subject: [PATCH 500/529] correct revision of one file on the commit --- src/sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sys.c b/src/sys.c index ad7a811fa..f8c0a91c5 100644 --- a/src/sys.c +++ b/src/sys.c @@ -36,7 +36,7 @@ sys_early_init() sysopt.dumplogfile = (char *) 0; #endif #ifdef WIN32 - char *portable_device_top = (char *) 0; + sysopt.portable_device_top = (char *) 0; #endif sysopt.env_dbgfl = 0; /* haven't checked getenv("DEBUGFILES") yet */ sysopt.shellers = (char *) 0; From 05df5dfbf2e663f95ffdcea6b31d94c68c6d1cde Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 17 Dec 2019 01:17:49 -0500 Subject: [PATCH 501/529] buffer bit --- sys/winnt/windmain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index b447ffcbd..010c11eda 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -197,8 +197,8 @@ test_portable_config( */ *portable_device_top_path = '\0'; - (void) strncpy(tmppath, executable_path, sizeof tmppath - 1); - tmppath[sizeof tmppath - 1] = '\0'; + (void) strncpy(tmppath, executable_path, sizeof tmppath - (1 + sizeof "sysconf")); + tmppath[sizeof tmppath - (1 + sizeof "sysconf")] = '\0'; (void) strcat(tmppath, "sysconf"); /* split the path up */ #ifdef UNICODE From 90e4ffc0a0466d2fae058110233ccc03d60e1086 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 16 Dec 2019 00:25:20 -0500 Subject: [PATCH 502/529] flying hero should be able to pass through a hole using '>' --- include/extern.h | 2 +- src/dokick.c | 2 +- src/trap.c | 19 ++++++++++++------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/include/extern.h b/include/extern.h index 26a82612b..a1b32f76a 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2508,7 +2508,7 @@ E boolean FDECL(burnarmor, (struct monst *)); E int FDECL(erode_obj, (struct obj *, const char *, int, int)); E boolean FDECL(grease_protect, (struct obj *, const char *, struct monst *)); E struct trap *FDECL(maketrap, (int, int, int)); -E void FDECL(fall_through, (BOOLEAN_P)); +E void FDECL(fall_through, (BOOLEAN_P, unsigned)); E struct monst *FDECL(animate_statue, (struct obj *, XCHAR_P, XCHAR_P, int, int *)); E struct monst *FDECL(activate_statue_trap, diff --git a/src/dokick.c b/src/dokick.c index e86a313ec..d9e275fbd 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1047,7 +1047,7 @@ dokick() return 1; } else if (!rn2(4)) { if (dunlev(&u.uz) < dunlevs_in_dungeon(&u.uz)) { - fall_through(FALSE); + fall_through(FALSE, 0); return 1; } else goto ouch; diff --git a/src/trap.c b/src/trap.c index 941025654..9403358ec 100644 --- a/src/trap.c +++ b/src/trap.c @@ -443,13 +443,15 @@ int x, y, typ; } void -fall_through(td) +fall_through(td, ftflags) boolean td; /* td == TRUE : trap door or hole */ +unsigned ftflags; { d_level dtmp; char msgbuf[BUFSZ]; const char *dont_fall = 0; int newlevel, bottom; + struct trap *t = (struct trap *) 0; /* we'll fall even while levitating in Sokoban; otherwise, if we won't fall and won't be told that we aren't falling, give up now */ @@ -472,10 +474,9 @@ boolean td; /* td == TRUE : trap door or hole */ } while (!rn2(4) && newlevel < bottom); if (td) { - struct trap *t = t_at(u.ux, u.uy); - + t = t_at(u.ux, u.uy); feeltrap(t); - if (!Sokoban) { + if (!Sokoban && !(ftflags & TOOKPLUNGE)) { if (t->ttyp == TRAPDOOR) pline("A trap door opens up under you!"); else @@ -487,8 +488,9 @@ boolean td; /* td == TRUE : trap door or hole */ if (Sokoban && Can_fall_thru(&u.uz)) ; /* KMH -- You can't escape the Sokoban level traps */ else if (Levitation || u.ustuck - || (!Can_fall_thru(&u.uz) && !levl[u.ux][u.uy].candig) || Flying - || is_clinger(youmonst.data) + || (!Can_fall_thru(&u.uz) && !levl[u.ux][u.uy].candig) + || ((Flying || is_clinger(youmonst.data)) + && !(ftflags & TOOKPLUNGE)) || (Inhell && !u.uevent.invoked && newlevel == bottom)) { dont_fall = "don't fall in."; } else if (youmonst.data->msize >= MZ_HUGE) { @@ -506,6 +508,9 @@ boolean td; /* td == TRUE : trap door or hole */ } return; } + if (Flying && (ftflags & TOOKPLUNGE) && td && t) + You("swoop down %s!", (t->ttyp == TRAPDOOR) + ? "through the trap door" : "into the gaping hole"); if (*u.ushops) shopdig(1); @@ -1286,7 +1291,7 @@ unsigned trflags; defsyms[trap_to_defsym(ttype)].explanation); break; /* don't activate it after all */ } - fall_through(TRUE); + fall_through(TRUE, (trflags & TOOKPLUNGE)); break; case TELEP_TRAP: From 2cff164c42dd060c2bf4a7affb0d467884c10bdb Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 17 Dec 2019 11:47:25 -0500 Subject: [PATCH 503/529] clinger messaging --- src/trap.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/trap.c b/src/trap.c index 9403358ec..cc15f22cc 100644 --- a/src/trap.c +++ b/src/trap.c @@ -508,9 +508,13 @@ unsigned ftflags; } return; } - if (Flying && (ftflags & TOOKPLUNGE) && td && t) - You("swoop down %s!", (t->ttyp == TRAPDOOR) - ? "through the trap door" : "into the gaping hole"); + if ((Flying || is_clinger(youmonst.data)) + && (ftflags & TOOKPLUNGE) && td && t) + You("%s down %s!", + Flying ? "swoop" : "deliberately drop", + (t->ttyp == TRAPDOOR) + ? "through the trap door" + : "into the gaping hole"); if (*u.ushops) shopdig(1); From 58241fdaf386061180c64bba955374a6816eb95b Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 17 Dec 2019 12:17:46 -0500 Subject: [PATCH 504/529] put original 3.7 fixes entry into 3.6 fixes file --- doc/fixes36.4 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index 9a4d40dba..f1ec65af0 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -15,6 +15,7 @@ message "your knapsack can't accomodate any more items" when picking stuff up or removing such from container was inaccurate if there was some gold pending; vary the message rather than add more convoluted pickup code dozen-ish assorted spelling/typo fixes in messages and source comments +flying hero could not use a hole deliberately with '>' Fixes to Post-3.6.3 Problems that Were Exposed Via git Repository From 7c359f9dc866bf662268fb0655fe720e3c58ffee Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 17 Dec 2019 12:19:27 -0500 Subject: [PATCH 505/529] remove fixes entry from 3.7 fixes for recent change back-ported to 3.6 lineage --- doc/fixes37.0 | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 0ad5b6201..37627fafa 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -12,7 +12,6 @@ fix internal self-recover to work with recent fields added to checkpoint file improvements to pronoun usage when hallucinating function calls made from mapglyph based on dungeon level are now called once per level -flying hero could not use a hole deliberately with '>' Fixes to Pre-3.7.0 Problems that Were Exposed Via git Repository From 2b0040975ba7de817c46a8a1cc23e61701b3d5d7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 17 Dec 2019 14:00:28 -0500 Subject: [PATCH 506/529] README update --- README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index d608a997b..b252f7833 100644 --- a/README +++ b/README @@ -5,7 +5,8 @@ which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.4 as there was no NetHack 3.5 release. NetHack 3.6.4 is the official release of NetHack that follows NetHack 3.6.3 -and contains all bug fixes since then, including one security-related fix. +and contains all bug fixes since then, including one security-related +fix for a vulnerability potentially impacting 3.6.0, 3.6.1, 3.6.2, and 3.6.3. The file doc/fixes36.4 in the source distribution has a full list of them. The text in there was written for the development team's own use and is provided "as is", so please do not ask us to further explain the entries in that file. From 74a5339a5ed58f7cb738e0390f57b965380cced6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 13 Dec 2019 18:37:36 -0500 Subject: [PATCH 507/529] housekeeping updates for 3.6.4 typos README update --- README | 81 +++++++++---------------- dat/history | 3 + doc/Guidebook.mn | 5 +- doc/Guidebook.tex | 7 ++- include/global.h | 2 +- include/patchlevel.h | 11 +++- src/windows.c | 2 +- sys/amiga/.gitattributes | 2 +- sys/atari/.gitattributes | 2 +- sys/be/.gitattributes | 2 +- sys/msdos/.gitattributes | 2 +- sys/os2/.gitattributes | 2 +- sys/share/.gitattributes | 10 +-- sys/unix/README.linux | 4 +- sys/unix/sysconf | 2 +- sys/vms/Install.vms | 6 +- sys/vms/Makefile.src | 2 +- sys/vms/vmsbuild.com | 2 +- sys/wince/.gitattributes | 2 +- sys/wince/ceinc/.gitattributes | 2 +- sys/wince/winhack.rc | 10 +-- sys/wince/winhcksp.rc | 10 +-- sys/winnt/Install.nt | 4 +- sys/winnt/Makefile.gcc | 2 +- sys/winnt/Makefile.msc | 2 +- sys/winnt/nethack.def | 2 +- sys/winnt/sysconf.template | 7 ++- util/makedefs.c | 2 +- win/gem/.gitattributes | 2 +- win/gnome/.gitattributes | 2 +- win/macosx/NetHackGuidebook.applescript | 2 +- win/win32/NetHackW.rc | 8 +-- win/win32/mswproc.c | 2 +- win/win32/nethack.rc | 8 +-- 34 files changed, 106 insertions(+), 108 deletions(-) diff --git a/README b/README index 5cbcb70c4..b252f7833 100644 --- a/README +++ b/README @@ -1,52 +1,27 @@ - NetHack 3.6.3 -- General information December 5, 2019 + NetHack 3.6.4 -- General information December 17, 2019 NetHack 3.6 is an enhancement to the dungeon exploration game NetHack, which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.4 as there was no NetHack 3.5 release. -NetHack 3.6.3 is the official release of NetHack that follows NetHack 3.6.2. -It contains a collection of over 190 bug fixes to NetHack 3.6.2 and over 22 -game enhancements and community contributions. The file doc/fixes36.3 in the -source distribution has a full list of them. The text in there was written for -the development team's own use and is provided "as is", so please do not ask -us to further explain the entries in that file. Some entries might be -considered "spoilers", particularly in the "new features" section. +NetHack 3.6.4 is the official release of NetHack that follows NetHack 3.6.3 +and contains all bug fixes since then, including one security-related +fix for a vulnerability potentially impacting 3.6.0, 3.6.1, 3.6.2, and 3.6.3. +The file doc/fixes36.4 in the source distribution has a full list of them. The +text in there was written for the development team's own use and is provided +"as is", so please do not ask us to further explain the entries in that file. +Some entries might be considered "spoilers", particularly in the "new features" +section. Below you will find some other general notes that were not considered spoilers: - * Fixed stale 'thrownobj' pointer for returning thrown aklys while engulfed - * Fixed uarmh null pointer dereference if a helm of opposite alignment came - * off due to being polymorphed - * Fixed 'object lost' panic when attempting to crawl of of the water during - * emergency disrobing/dropping - * Running now stops when moving over engravings so you can tell where they - * are - * Fixed detection of unseen/secret doors which failed to find monsters hiding - * under objects and failed to find monsters hiding at trap locations - * Ensured fatal status conditions made it to disclosure and/or dumplog - * Fixed "Bad fruit #N" warnings when saving bones with 'perm_invent' On - * Fixed it so yellow dragons don't have green breath - * Added several grammar corrections - * Improved recognition of deafness for several situations including the - * playing of musical instruments and bribing negotiations with demon lords - * Fixed ignoring of god's wrath when hero injured himself during altar kick - * Fixed several cases where persistent inventory window was not updated - * Fixed temple priests or shopkeepers moving over other monsters - * Fixed a crash-causing bug when putting on levitation boots over a sink - * Ensured that thrown or kicked objects will end up in bones - * Made water go all the way to the edges of level on the Plane of Water - * Made clouds disrupt line of sight along the edges of the Plane of Air - * Improved and expanded usage of status highlighting percentage rules - * Added more than 15 improvements and fixes to the curses window port - * Added and documented significant changes to default directory choices for - * the Windows platform - * Improved the layout and display of the player selection dialog used on the - * Windows graphical implementation - * Improved performance of some tty versions by reducing the number of - * function calls made from mapglyph - * Allowed the msdos implementation to build with curses and PDCurses - * Over 100 other fixes and improvements + * GDBPATH and GREPPATH from sysconf or -D... on compilation command line were + * being processed even if PANICTRACE was disabled but only being freed + * at end of game when that was enabled + * fix the article used in the message when your steed encounters a polymorph trap + * dozen-ish assorted spelling/typo fixes in messages and source comments + * fix potential buffer overflow when parsing run-time configuration file - - - - - - - - - - - @@ -57,13 +32,13 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. call it. 2. Having unpacked, you should have a file called 'Files' in your Top - directory. + directory. This file contains the list of all the files you now SHOULD have in each directory. Please check the files in each directory against this list to make sure that you have a complete set. - This file also contains a list of what files are created during + This file also contains a list of what files are created during the build process. The names of the directories listed should not be changed unless you @@ -88,7 +63,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. 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 (7 through 10) Intel 80386 or greater (or clone) boxes running Linux, or BSDI Mac OS X 10.11 (follow the instructions in sys/unix, not sys/mac) @@ -97,8 +72,8 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. Instructions have been provided by way of community contribution on: msdos protected mode using djgpp - Previous versions of NetHack were tested and known to run on the - following systems, but it is unknown if they can still build and + Previous versions of NetHack were tested and known to run on the + following systems, but it is unknown if they can still build and execute NetHack 3.6: Apple Macintosh running MacOS 7.5 or higher, LinuxPPC, BeOS 4.0 @@ -151,7 +126,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. - - - - - - - - - - - -If you have problems building the game, or you find bugs in it, we recommend +If you have problems building the game, or you find bugs in it, we recommend filing a bug report from our "Contact Us" web page at: https://www.nethack.org/common/contact.html Please include the version information from #version or the command line @@ -165,12 +140,12 @@ available can be obtained via git here: When sending correspondence, please observe the following: o Please be sure to include your machine type, OS, and patchlevel. -o Please avoid sending us binary files (e.g. save files or bones files). +o Please avoid sending us binary files (e.g. save files or bones files). If you have found a bug and think that your save file would aid in solving - the problem, send us a description in words of the problem, your machine - type, your operating system, and the version of NetHack. Tell us that you + the problem, send us a description in words of the problem, your machine + type, your operating system, and the version of NetHack. Tell us that you have a save file, but do not actually send it. - You may then be contacted by a member of the development team with the + You may then be contacted by a member of the development team with the address of a specific person to send the save file to. o Though we make an effort to reply to each bug report, it may take some time before you receive feedback. This is especially true during the @@ -179,16 +154,16 @@ o We don't give hints for playing the game. o Don't bother to ask when the next version will be out or you can expect to receive a stock answer. -If you want to submit a patch for the NetHack source code via email directly, +If you want to submit a patch for the NetHack source code via email directly, you can direct it to this address: nethack-bugs (at) nethack.org -If a feature is not accepted you are free, of course, to post the patches +If a feature is not accepted you are free, of course, to post the patches to the net yourself and let the marketplace decide their worth. All of this amounts to the following: If you decide to apply a free-lanced patch to your 3.6 code, you are welcome to do so, of course, but we won't -be able to provide support or receive bug reports for it. +be able to provide support or receive bug reports for it. In our own patches, we will assume that your code is synchronized with ours. diff --git a/dat/history b/dat/history index 50cb7ca1a..7dcaaca18 100644 --- a/dat/history +++ b/dat/history @@ -223,6 +223,9 @@ for decades, joined the NetHack Development Team in late May 2019. NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug fixes to NetHack 3.6.2. +NetHack 3.6.4 was released on December 17, 2019 containing a security +fix and a few bug fixes. + The official NetHack web site is maintained by Ken Lorber at http://www.nethack.org/. diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 35ecfa425..8d753d9f8 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "December 5, 2019 +.ds f2 "December 17, 2019 . .\" A note on some special characters: .\" \(lq = left double quote @@ -5151,6 +5151,9 @@ participant for decades, joined the NetHack Development Team in late May 2019. NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug fixes to NetHack 3.6.2. .pg +NetHack 3.6.4 was released on December 17, 2019 containing a security fix +and a few bug fixes. +.pg The official NetHack web site is maintained by \fBKen Lorber\fP at .UR https://www.nethack.org/ . diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 049aa8598..36d459db0 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{December 5, 2019} +\date{December 17, 2019} \maketitle @@ -5753,6 +5753,11 @@ for decades, joined the {\it NetHack Development Team} in late May 2019. NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug fixes to NetHack 3.6.2. +%.pg +\medskip +NetHack 3.6.4 was released on December 17, 2019 containing a security fix and +a few bug fixes. + %.pg \medskip \nd The official {\it NetHack\/} web site is maintained by {\it Ken Lorber} at diff --git a/include/global.h b/include/global.h index 5c02491c3..a2b70d258 100644 --- a/include/global.h +++ b/include/global.h @@ -19,7 +19,7 @@ /* * Development status of this NetHack version. */ -#define NH_DEVEL_STATUS NH_STATUS_POSTRELEASE +#define NH_DEVEL_STATUS NH_STATUS_RELEASED #ifndef DEBUG /* allow tool chains to define without causing warnings */ #define DEBUG diff --git a/include/patchlevel.h b/include/patchlevel.h index c945e68b5..01e1c3438 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -9,7 +9,7 @@ /* * PATCHLEVEL is updated for each release. */ -#define PATCHLEVEL 3 +#define PATCHLEVEL 4 /* * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. @@ -36,6 +36,15 @@ /****************************************************************************/ /* Version 3.6.x */ +/* Patch 4, December 17, 2019 + * GDBPATH and GREPPATH from sysconf or -D... on compilation command line were + * being processed even if PANICTRACE was disabled but only being freed + * at end of game when that was enabled + * fix the article used in the message when your steed encounters a polymorph trap + * dozen-ish assorted spelling/typo fixes in messages and source comments + * fix potential buffer overflow when parsing run-time configuration file + */ + /* Patch 3, December 5, 2019 * * Fixed stale 'thrownobj' pointer for returning thrown aklys while engulfed diff --git a/src/windows.c b/src/windows.c index 0f0ccb4ed..974479187 100644 --- a/src/windows.c +++ b/src/windows.c @@ -1157,7 +1157,7 @@ boolean fullsubs; /* True -> full substitution for file name, False -> else Strcpy(tmpbuf, "{current date+time}"); break; - case 'v': /* version, eg. "3.6.3-0" */ + case 'v': /* version, eg. "3.6.4-0" */ Sprintf(tmpbuf, "%s", version_string(verbuf)); break; case 'u': /* UID */ diff --git a/sys/amiga/.gitattributes b/sys/amiga/.gitattributes index 5df6a5f30..f969b5ebc 100644 --- a/sys/amiga/.gitattributes +++ b/sys/amiga/.gitattributes @@ -1,2 +1,2 @@ *.p NHSUBST -* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.4) diff --git a/sys/atari/.gitattributes b/sys/atari/.gitattributes index 66c510f6c..ff75d0637 100644 --- a/sys/atari/.gitattributes +++ b/sys/atari/.gitattributes @@ -1 +1 @@ -* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.4) diff --git a/sys/be/.gitattributes b/sys/be/.gitattributes index 9d9a35874..76b400189 100644 --- a/sys/be/.gitattributes +++ b/sys/be/.gitattributes @@ -1 +1 @@ -* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.4) diff --git a/sys/msdos/.gitattributes b/sys/msdos/.gitattributes index 77cd3847b..a0b35794c 100644 --- a/sys/msdos/.gitattributes +++ b/sys/msdos/.gitattributes @@ -4,6 +4,6 @@ Makefile.* NHSUBST Install.* NHSUBST moveinit.pat NH_header=no vesa.h NH_header=no -* NH_filestag=(file%s_for_MSDOS_version_-_tested_for_3.6.3_via_cross-compile_only) +* NH_filestag=(file%s_for_MSDOS_version_-_tested_for_3.6.4_via_partial_cross-compile_only) nhico.uu NH_filestag=(file%s_for_running_MSDOS_binary_under_Windows) nhpif.uu NH_filestag=>nhico.uu diff --git a/sys/os2/.gitattributes b/sys/os2/.gitattributes index 0537d04f5..d3d1c307d 100644 --- a/sys/os2/.gitattributes +++ b/sys/os2/.gitattributes @@ -1,2 +1,2 @@ Makefile.* NHSUBST -* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.4) diff --git a/sys/share/.gitattributes b/sys/share/.gitattributes index a34fbc350..271c3c59f 100644 --- a/sys/share/.gitattributes +++ b/sys/share/.gitattributes @@ -5,16 +5,16 @@ dgn_comp.h NH_header=no lev_comp.h NH_header=no Makefile.lib NH_header=no -Makefile.lib NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.3) -#termcap.uu NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.3) +Makefile.lib NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.4) +#termcap.uu NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.4) termcap.uu NH_filestag=>Makefile.lib -pcmain.c NH_filestag=(file_for_MSDOS,_OS/2,_Amiga,_and_Atari_versions_-_untested_for_3.6.3) +pcmain.c NH_filestag=(file_for_MSDOS,_OS/2,_Amiga,_and_Atari_versions_-_untested_for_3.6.4) -pcsys.c NH_filestag=(file%s_for_MSDOS,_OS/2_and_Atari_versions_-_tested_on_MSDOS_for_3.6.3_via_cross-compile_only) +pcsys.c NH_filestag=(file%s_for_MSDOS,_OS/2_and_Atari_versions_-_tested_on_MSDOS_for_3.6.4_via_partial_cross-compile_only) pcunix.c NH_filestag=>pcsys.c -NetHack.cnf NH_filestag=(file_for_MSDOS,_OS/2,_and_Atari_versions_-_untested_for_3.6.3) +NetHack.cnf NH_filestag=(file_for_MSDOS,_OS/2,_and_Atari_versions_-_untested_for_3.6.4) pctty.c NH_filestag=>NetHack.cnf ioctl.c NH_filestag=(file%s_for_UNIX_and_Be_versions) diff --git a/sys/unix/README.linux b/sys/unix/README.linux index b98d4cc7c..e96be77cd 100644 --- a/sys/unix/README.linux +++ b/sys/unix/README.linux @@ -26,8 +26,8 @@ home directory you might perform these steps. If you have old record and logfile entries from a previous NetHack version, you might want to save copies before they get overwritten by the new empty -files; old saved games and bones files from 3.6.0 through to 3.6.2 should -work with 3.6.3 but even older saved games and bones files from 3.4.3 will +files; old saved games and bones files from 3.6.0 through to 3.6.3 should +work with 3.6.4 but even older saved games and bones files from 3.4.3 will not. If you are installing from the RPM, there is no need to save the old record and logfile; they are automatically preserved. diff --git a/sys/unix/sysconf b/sys/unix/sysconf index 7a5c8a1c4..b8bfbcb9a 100644 --- a/sys/unix/sysconf +++ b/sys/unix/sysconf @@ -95,7 +95,7 @@ MAXPLAYERS=10 # Only available if NetHack was compiled with DUMPLOG # Allows following placeholders: # %% literal '%' -# %v version (eg. "3.6.3-0") +# %v version (eg. "3.6.4-0") # %u game UID # %t game start time, UNIX timestamp format # %T current time, UNIX timestamp format diff --git a/sys/vms/Install.vms b/sys/vms/Install.vms index 8c4bb2ee2..37418f261 100644 --- a/sys/vms/Install.vms +++ b/sys/vms/Install.vms @@ -1,4 +1,4 @@ - Instructions for Building and Installing NetHack 3.6.3 + Instructions for Building and Installing NetHack 3.6.4 on a VMS (aka OpenVMS) system ========================================= @@ -146,8 +146,8 @@ Notes: 0. Version 3.5.x was never publicly released. 1. Save files and bones files from 3.4.x and earlier versions - will not work with 3.6.3, but save files and bones file from 3.6.0, - through 3.6.2 should work. The scoreboard file (RECORD) from 3.6.x + will not work with 3.6.4, but save files and bones file from 3.6.0, + through 3.6.4 should work. The scoreboard file (RECORD) from 3.6.x or 3.4.x or 3.3.x will work. 2. To specify user-preference options in your environment, define the diff --git a/sys/vms/Makefile.src b/sys/vms/Makefile.src index 194a27fc8..566f129d4 100644 --- a/sys/vms/Makefile.src +++ b/sys/vms/Makefile.src @@ -133,7 +133,7 @@ RANDOBJ = isaac64.obj,random.obj # Other things that have to be reconfigured are in vmsconf.h, # and config.h -VERSION = 3.6.3 +VERSION = 3.6.4 MAKEDEFS = $(UTL)makedefs.exe; diff --git a/sys/vms/vmsbuild.com b/sys/vms/vmsbuild.com index 6a9e50f36..50dd41fc2 100755 --- a/sys/vms/vmsbuild.com +++ b/sys/vms/vmsbuild.com @@ -1,5 +1,5 @@ $ ! vms/vmsbuild.com -- compile and link NetHack 3.6.* [pr] -$ version_number = "3.6.3" +$ version_number = "3.6.4" $ ! $NHDT-Date: 1557701518 2019/05/12 22:51:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.23 $ $ ! Copyright (c) 2018 by Robert Patrick Rankin $ ! NetHack may be freely redistributed. See license for details. diff --git a/sys/wince/.gitattributes b/sys/wince/.gitattributes index 8e28791ce..70924b994 100644 --- a/sys/wince/.gitattributes +++ b/sys/wince/.gitattributes @@ -1,4 +1,4 @@ *.ce NHSUBST *.mak NHSUBST *.bat NHSUBST -* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.4) diff --git a/sys/wince/ceinc/.gitattributes b/sys/wince/ceinc/.gitattributes index 8e72b80f0..e95fe9840 100644 --- a/sys/wince/ceinc/.gitattributes +++ b/sys/wince/ceinc/.gitattributes @@ -1 +1 @@ -* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.3) +* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.4) diff --git a/sys/wince/winhack.rc b/sys/wince/winhack.rc index c85fdec67..b928c3b04 100644 --- a/sys/wince/winhack.rc +++ b/sys/wince/winhack.rc @@ -284,8 +284,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,3,0 - PRODUCTVERSION 3,6,3,0 + FILEVERSION 3,6,4,0 + PRODUCTVERSION 3,6,4,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x9L @@ -300,17 +300,17 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "NetHack 3.6.3 for Windows CE\0" + VALUE "Comments", "NetHack 3.6.4 for Windows CE\0" VALUE "CompanyName", " \0" VALUE "FileDescription", "nethackm\0" - VALUE "FileVersion", "3, 6, 3, 0\0" + VALUE "FileVersion", "3, 6, 4, 0\0" VALUE "InternalName", "nethackm\0" VALUE "LegalCopyright", "Copyright © 1985-2019\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "nethackm.exe\0" VALUE "PrivateBuild", "090914\0" VALUE "ProductName", "NetHack\0" - VALUE "ProductVersion", "3, 6, 3, 0\0" + VALUE "ProductVersion", "3, 6, 4, 0\0" VALUE "SpecialBuild", "\0" END END diff --git a/sys/wince/winhcksp.rc b/sys/wince/winhcksp.rc index 04f7aec40..3e5373a2f 100644 --- a/sys/wince/winhcksp.rc +++ b/sys/wince/winhcksp.rc @@ -260,8 +260,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,3,0 - PRODUCTVERSION 3,6,3,0 + FILEVERSION 3,6,4,0 + PRODUCTVERSION 3,6,4,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x9L @@ -276,17 +276,17 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "NetHack 3.6.3 for Smartphone 2002\0" + VALUE "Comments", "NetHack 3.6.4 for Smartphone 2002\0" VALUE "CompanyName", " \0" VALUE "FileDescription", "nethackm\0" - VALUE "FileVersion", "3, 6, 3, 0\0" + VALUE "FileVersion", "3, 6, 4, 0\0" VALUE "InternalName", "nethackm\0" VALUE "LegalCopyright", "Copyright © 1985-2019\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "nethackm.exe\0" VALUE "PrivateBuild", "090914\0" VALUE "ProductName", "NetHack For Smartphone\0" - VALUE "ProductVersion", "3, 6, 3, 0\0" + VALUE "ProductVersion", "3, 6, 4, 0\0" VALUE "SpecialBuild", "\0" END END diff --git a/sys/winnt/Install.nt b/sys/winnt/Install.nt index 5b87226c1..7ef199034 100644 --- a/sys/winnt/Install.nt +++ b/sys/winnt/Install.nt @@ -16,7 +16,7 @@ contributed the port. Alex Kompel, Dion Nicolaas, Yitzhak Sapir, Derek S. Ray, Michael Allison, Pasi Kallinen, Bart House, and Janet Walz contributed to the maintainance -of the tty and graphical windows versions of NetHack 3.6.3. +of the tty and graphical windows versions of NetHack 3.6.4. You can build a TTY version of NetHack and a Windows Graphical version. You can use one of the following build environments: @@ -151,7 +151,7 @@ a 32-bit x86 version, or a 64-bit x64 version. The default Makefile is set up for a 32-bit x86 version, but that's only because it will run on the most number of existing Windows environments. -NetHack's save files and bones files in the 3.6.3 release have not yet +NetHack's save files and bones files in the 3.6.4 release have not yet evolved enough to allow them to interchange between the 32-bit version and the 64-bit version (or between different platforms). Hopefully that will change in an upcoming release. diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index d19532369..a1eead86f 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -139,7 +139,7 @@ SKIP_NETHACKW=Y #============================================================================== # The version of the game this Makefile was designed for -NETHACK_VERSION="3.6.3" +NETHACK_VERSION="3.6.4" # A brief version for use in macros NHV1=$(subst .,,$(NETHACK_VERSION)) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 550c71fc0..2ecca426b 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -93,7 +93,7 @@ DEBUGINFO = Y #============================================================================== # # The version of the game this Makefile was designed for -NETHACK_VERSION="3.6.3" +NETHACK_VERSION="3.6.4" # A brief version for use in macros NHV=$(NETHACK_VERSION:.=) diff --git a/sys/winnt/nethack.def b/sys/winnt/nethack.def index bc08347a1..67f372a46 100644 --- a/sys/winnt/nethack.def +++ b/sys/winnt/nethack.def @@ -1,5 +1,5 @@ NAME NETHACK -DESCRIPTION 'NetHack 3.6.3 for Windows' +DESCRIPTION 'NetHack 3.6.4 for Windows' EXETYPE WINDOWS STUB 'WINSTUB.EXE' CODE PRELOAD MOVEABLE DISCARDABLE diff --git a/sys/winnt/sysconf.template b/sys/winnt/sysconf.template index fccec7fe6..e8b70015f 100644 --- a/sys/winnt/sysconf.template +++ b/sys/winnt/sysconf.template @@ -24,7 +24,7 @@ WIZARDS=* # Only available if NetHack was compiled with DUMPLOG # Allows following placeholders: # %% literal '%' -# %v version (eg. "3.6.3-0") +# %v version (eg. "3.6.4-0") # %u game UID # %t game start time, UNIX timestamp format # %T current time, UNIX timestamp format @@ -77,6 +77,9 @@ WIZARDS=* # IMPORTANT: If you change any of these locations, the directories they # point at must exist. NetHack will not create them for you. # +# Before adjusting, you can verify the default locations for files with: +# nethack --showpaths +# # The location that users can adjust their config file startup options #CONFIGDIR=%USERPROFILE%\NetHack # @@ -88,7 +91,7 @@ WIZARDS=* #HACKDIR=%USERPROFILE%\NetHack\3.6 # # The location that level files in progress are stored (writeable) -LEVELDIR=%USERPROFILE%\AppData\Local\NetHack\3.6 +#LEVELDIR=%USERPROFILE%\AppData\Local\NetHack\3.6 # # The location where saved games are kept (writeable) #SAVEDIR=%USERPROFILE%\AppData\Local\NetHack\3.6 diff --git a/util/makedefs.c b/util/makedefs.c index 22194eafa..2bb521b70 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -53,7 +53,7 @@ #endif #if defined(UNIX) && !defined(LINT) && !defined(GCC_WARN) -static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.6\t2019/12/05"; +static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.6\t2019/12/17"; #endif /* names of files to be generated */ diff --git a/win/gem/.gitattributes b/win/gem/.gitattributes index e108c78d7..3c4d1eef1 100644 --- a/win/gem/.gitattributes +++ b/win/gem/.gitattributes @@ -1 +1 @@ -* NH_filestag=(file%s_for_GEM_versions_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_GEM_versions_-_untested_for_3.6.4) diff --git a/win/gnome/.gitattributes b/win/gnome/.gitattributes index 013227bc8..6f8e9f364 100644 --- a/win/gnome/.gitattributes +++ b/win/gnome/.gitattributes @@ -1 +1 @@ -* NH_filestag=(file%s_for_GNOME_versions_-_untested_for_3.6.3) +* NH_filestag=(file%s_for_GNOME_versions_-_untested_for_3.6.4) diff --git a/win/macosx/NetHackGuidebook.applescript b/win/macosx/NetHackGuidebook.applescript index dd05a3a8f..977d4d713 100644 --- a/win/macosx/NetHackGuidebook.applescript +++ b/win/macosx/NetHackGuidebook.applescript @@ -1,5 +1,5 @@ #!/usr/bin/osascript -# NetHack 3.6.3 NetHackGuidebook.applescript $NHDT-Date: 1575245175 2019/12/02 00:06:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.10 $ +# NetHack 3.6 NetHackGuidebook.applescript $NHDT-Date: 1575245175 2019/12/02 00:06:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.10 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011 # NetHack may be freely redistributed. See license for details. diff --git a/win/win32/NetHackW.rc b/win/win32/NetHackW.rc index 59381dd90..a98f6f021 100644 --- a/win/win32/NetHackW.rc +++ b/win/win32/NetHackW.rc @@ -320,8 +320,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,3,0 - PRODUCTVERSION 3,6,3,0 + FILEVERSION 3,6,4,0 + PRODUCTVERSION 3,6,4,0 FILEFLAGSMASK 0x1fL #ifdef _DEBUG FILEFLAGS 0x9L @@ -337,13 +337,13 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "NetHack for Windows - Graphical Interface" - VALUE "FileVersion", "3.6.3" + VALUE "FileVersion", "3.6.4" VALUE "InternalName", "NetHackW" VALUE "LegalCopyright", "Copyright (C) 1985 - 2019. By Stichting Mathematisch Centrum and M. Stephenson. See license for details." VALUE "OriginalFilename", "NetHackW.exe" VALUE "PrivateBuild", "140606" VALUE "ProductName", "NetHack" - VALUE "ProductVersion", "3.6.3" + VALUE "ProductVersion", "3.6.4" END END BLOCK "VarFileInfo" diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 324418f0c..f117fc3ce 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -2316,7 +2316,7 @@ logDebug(const char *fmt, ...) /* Reading and writing settings from the registry. */ #define CATEGORYKEY "Software" #define COMPANYKEY "NetHack" -#define PRODUCTKEY "NetHack 3.6.3" +#define PRODUCTKEY "NetHack 3.6.4" #define SETTINGSKEY "Settings" #define MAINSHOWSTATEKEY "MainShowState" #define MAINMINXKEY "MainMinX" diff --git a/win/win32/nethack.rc b/win/win32/nethack.rc index c7ee38399..3f30ae2c4 100644 --- a/win/win32/nethack.rc +++ b/win/win32/nethack.rc @@ -60,8 +60,8 @@ IDI_ICON1 ICON "nethack.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,3,0 - PRODUCTVERSION 3,6,3,0 + FILEVERSION 3,6,4,0 + PRODUCTVERSION 3,6,4,0 FILEFLAGSMASK 0x1fL #ifdef _DEBUG FILEFLAGS 0x9L @@ -77,12 +77,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "NetHack for Windows - TTY Interface" - VALUE "FileVersion", "3.6.3" + VALUE "FileVersion", "3.6.4" VALUE "InternalName", "NetHack" VALUE "LegalCopyright", "Copyright (C) 1985 - 2019. By Stichting Mathematisch Centrum and M. Stephenson. See license for details." VALUE "OriginalFilename", "NetHack.exe" VALUE "ProductName", "NetHack" - VALUE "ProductVersion", "3.6.3" + VALUE "ProductVersion", "3.6.4" END END BLOCK "VarFileInfo" From f4a840a48f4bcf11757b3d859e9d53cc9d5ef226 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 13 Dec 2019 13:36:38 -0800 Subject: [PATCH 508/529] fix potential buffer overflow loading config file --- doc/fixes36.4 | 21 +++++---------------- src/files.c | 35 +++++++++++++++++++++++------------ 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index f1ec65af0..441dd7770 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -1,8 +1,8 @@ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.4 $ $NHDT-Date: 1576287569 2019/12/14 01:39:29 $ -This fixes36.4 file is here to capture information about updates in the 3.6.x -lineage following the release of 3.6.3 in December 2019. Hypothetical version -3.6.4 may not be released, in which case these fixes will appear in 3.7.0. +fixes36.4 contains a terse summary of changes made to 3.6.3 in order to +produce 3.6.4. + General Fixes and Modified Features ----------------------------------- @@ -15,11 +15,7 @@ message "your knapsack can't accomodate any more items" when picking stuff up or removing such from container was inaccurate if there was some gold pending; vary the message rather than add more convoluted pickup code dozen-ish assorted spelling/typo fixes in messages and source comments -flying hero could not use a hole deliberately with '>' - - -Fixes to Post-3.6.3 Problems that Were Exposed Via git Repository ------------------------------------------------------------------- +fix potential buffer overflow when parsing run-time configuration file Platform- and/or Interface-Specific Fixes or Features @@ -30,13 +26,6 @@ allow run-from-removable-device on Windows General New Features -------------------- - - -NetHack Community Patches (or Variation) Included -------------------------------------------------- - - -Code Cleanup and Reorganization -------------------------------- +none diff --git a/src/files.c b/src/files.c index 7f9cf65b0..5e500ae3a 100644 --- a/src/files.c +++ b/src/files.c @@ -2309,10 +2309,14 @@ char *origbuf; int len; boolean retval = TRUE; + while (*origbuf == ' ' || *origbuf == '\t') /* skip leading whitespace */ + ++origbuf; /* (caller probably already did this) */ + (void) strncpy(buf, origbuf, sizeof buf - 1); + buf[sizeof buf - 1] = '\0'; /* strncpy not guaranteed to NUL terminate */ /* convert any tab to space, condense consecutive spaces into one, remove leading and trailing spaces (exception: if there is nothing but spaces, one of them will be kept even though it leads/trails) */ - mungspaces(strcpy(buf, origbuf)); + mungspaces(buf); /* find the '=' or ':' */ bufp = find_optparam(buf); @@ -3034,7 +3038,11 @@ boolean proc_wizkit_line(buf) char *buf; { - struct obj *otmp = readobjnam(buf, (struct obj *) 0); + struct obj *otmp; + + if (strlen(buf) >= BUFSZ) + buf[BUFSZ - 1] = '\0'; + otmp = readobjnam(buf, (struct obj *) 0); if (otmp) { if (otmp != &zeroobj) @@ -3142,22 +3150,23 @@ boolean FDECL((*proc), (char *)); /* merge now read line with previous ones, if necessary */ if (!ignoreline) { - len = (int) strlen(inbuf) + 1; + len = (int) strlen(ep) + 1; /* +1: final '\0' */ if (buf) - len += (int) strlen(buf); + len += (int) strlen(buf) + 1; /* +1: space */ tmpbuf = (char *) alloc(len); + *tmpbuf = '\0'; if (buf) { - Sprintf(tmpbuf, "%s %s", buf, inbuf); + Strcat(strcpy(tmpbuf, buf), " "); free(buf); - } else - Strcpy(tmpbuf, inbuf); - buf = tmpbuf; + } + buf = strcat(tmpbuf, ep); + buf[sizeof inbuf - 1] = '\0'; } if (morelines || (ignoreline && !oldline)) continue; - if (handle_config_section(ep)) { + if (handle_config_section(buf)) { free(buf); buf = (char *) 0; continue; @@ -3179,11 +3188,11 @@ boolean FDECL((*proc), (char *)); } bufp++; if (config_section_chosen) - free(config_section_chosen); + free(config_section_chosen), config_section_chosen = 0; section = choose_random_part(bufp, ','); - if (section) + if (section) { config_section_chosen = dupstr(section); - else { + } else { config_error_add("No config section to choose"); rv = FALSE; } @@ -3300,6 +3309,8 @@ int which_set; struct symparse *symp; char *bufp, *commentp, *altp; + if (strlen(buf) >= BUFSZ) + buf[BUFSZ - 1] = '\0'; /* convert each instance of whitespace (tabs, consecutive spaces) into a single space; leading and trailing spaces are stripped */ mungspaces(buf); From fccdd2bb547a6b4ff5c43777f41a91380dec0aeb Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Tue, 17 Dec 2019 14:49:35 -0500 Subject: [PATCH 509/529] This is cron-daily v1-Dec-12-2019. files updated: Files --- Files | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Files b/Files index 984a357dd..ae6a62679 100644 --- a/Files +++ b/Files @@ -113,7 +113,7 @@ vault.c version.c vision.c weapon.c were.c wield.c windows.c wizard.c worm.c worn.c write.c zap.c sys/amiga: -(files for Amiga versions - untested for 3.6.3) +(files for Amiga versions - untested for 3.6.4) Build.ami Install.ami Makefile.agc Makefile.ami NetHack.cnf amidos.c amidos.p amifont.uu amifont8.uu amigst.c amii.hlp amimenu.c amirip.c amisnd.c amistack.c @@ -124,12 +124,12 @@ winfuncs.c winkey.c winmenu.c winproto.h winreq.c winstr.c xpm2iff.c sys/atari: -(files for Atari version - untested for 3.6.3) +(files for Atari version - untested for 3.6.4) Install.tos atarifnt.uue nethack.mnu setup.g tos.c unx2atar.sed sys/be: -(files for BeOS version - untested for 3.6.3) +(files for BeOS version - untested for 3.6.4) README bemain.c sys/mac: @@ -142,7 +142,7 @@ macwin.c mgetline.c mmodal.c mrecover.c mrecover.hqx mttymain.c sys/msdos: -(files for MSDOS version - tested for 3.6.3 via cross-compile only) +(files for MSDOS version - tested for 3.6.4 via partial cross-compile only) Install.dos Makefile.BC Makefile.GCC Makefile.MSC Makefile1.cross Makefile2.cross SCHEMA35.MSC moveinit.pat msdos.c msdoshlp.txt ovlinit.c pckeys.c @@ -155,7 +155,7 @@ vidtxt.c vidvesa.c vidvga.c nhico.uu nhpif.uu sys/os2: -(files for OS/2 version - untested for 3.6.3) +(files for OS/2 version - untested for 3.6.4) Install.os2 Makefile.os2 nhpmico.uu os2.c sys/share: @@ -165,10 +165,10 @@ random.c (Berkeley uudecode file, which may be used in build process of any version) uudecode.c -(file for MSDOS, OS/2, Amiga, and Atari versions - untested for 3.6.3) +(file for MSDOS, OS/2, Amiga, and Atari versions - untested for 3.6.4) pcmain.c -(file for MSDOS, OS/2, and Atari versions - untested for 3.6.3) +(file for MSDOS, OS/2, and Atari versions - untested for 3.6.4) NetHack.cnf pctty.c (file for MSDOS, OS/2, and VMS versions) @@ -180,10 +180,10 @@ nhlan.c (file for VMS version) tclib.c -(files for MSDOS and OS/2 versions - untested for 3.6.3) +(files for MSDOS and OS/2 versions - untested for 3.6.4) Makefile.lib termcap.uu -(files for MSDOS, OS/2 and Atari versions - tested on MSDOS for 3.6.3 via cross-compile only) +(files for MSDOS, OS/2 and Atari versions - tested on MSDOS for 3.6.4 via partial cross-compile only) pcsys.c pcunix.c (files for UNIX and Be versions) @@ -253,7 +253,7 @@ spec_lev.com sysconf vmsbuild.com vmsfiles.c vmsmail.c vmsmain.c vmsmisc.c vmstty.c vmsunix.c sys/wince: -(files for Windows CE and PocketPC - untested for 3.6.3) +(files for Windows CE and PocketPC - untested for 3.6.4) Install.ce bootstrp.mak celib.c cesetup.bat cesound.c defaults.nh keypad.uu menubar.uu mhaskyn.c mhaskyn.h mhcmd.c mhcmd.h mhcolor.c mhcolor.h mhdlg.c @@ -266,7 +266,7 @@ resource.h winMS.h winhack.c winhack.rc winhcksp.rc winmain.c sys/wince/ceinc: -(header files for Windows CE and PocketPC - untested for 3.6.3) +(header files for Windows CE and PocketPC - untested for 3.6.4) assert.h errno.h fcntl.h sys/wince/ceinc/sys: @@ -332,12 +332,12 @@ cursinit.h cursinvt.c cursinvt.h cursmain.c cursmesg.c cursmesg.h cursmisc.c cursmisc.h cursstat.c cursstat.h curswins.c curswins.h win/gem: -(files for GEM versions - untested for 3.6.3) +(files for GEM versions - untested for 3.6.4) Install.gem bitmfile.c gem_rsc.uu gem_rso.uu gr_rect.c gr_rect.h load_img.c tile2img.c title.uu wingem.c wingem1.c xpm2img.c win/gnome: -(files for GNOME versions - untested for 3.6.3) +(files for GNOME versions - untested for 3.6.4) README gn_xpms.h gnaskstr.c gnaskstr.h gnbind.c gnbind.h gnglyph.c gnglyph.h gnmain.c gnmain.h gnmap.c gnmap.h gnmenu.c gnmenu.h gnmesg.c gnmesg.h gnomeprv.h gnopts.c From 71b7d6299c35781fd903e8e8d1da161ea8941ef5 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Tue, 17 Dec 2019 14:49:36 -0500 Subject: [PATCH 510/529] This is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt --- doc/Guidebook.txt | 214 +++++++++++++++++++++++----------------------- 1 file changed, 107 insertions(+), 107 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index c0587373a..86672da0d 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -15,7 +15,7 @@ Original version - Eric S. Raymond (Edited and expanded for 3.6 by Mike Stephenson and others) - December 5, 2019 + December 17, 2019 @@ -126,7 +126,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -192,7 +192,7 @@ you have seen on the current dungeon level; as you explore more - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -258,7 +258,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -324,7 +324,7 @@ Intelligence affects your ability to cast spells and read - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -456,7 +456,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -588,7 +588,7 @@ symbol at the chosen location, conditionally check for "More - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -720,7 +720,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -786,7 +786,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -852,7 +852,7 @@ once you've closed this menu. The available options are - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -918,7 +918,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -984,7 +984,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1050,7 +1050,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1116,7 +1116,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1248,7 +1248,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1314,7 +1314,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1380,7 +1380,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1446,7 +1446,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1512,7 +1512,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1578,7 +1578,7 @@ When picking a target with cursor and the autodescribe - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1644,7 +1644,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1710,7 +1710,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1776,7 +1776,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1842,7 +1842,7 @@ the `^D' (kick) command. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1908,7 +1908,7 @@ on the corresponding staircase at your destination. However, - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -1974,7 +1974,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2040,7 +2040,7 @@ member a monster but want to try fighting anyway, you can use the - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2106,7 +2106,7 @@ ers (or even former incarnations of yourself!) and their personal - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2172,7 +2172,7 @@ ter. Many commands that operate on objects must ask you to find - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2238,7 +2238,7 @@ In some cases "uncursed" will be omitted as being redundant when - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2304,7 +2304,7 @@ to taking off other worn items. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2370,7 +2370,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2436,7 +2436,7 @@ ondary is just an item in your inventory that's been designated - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2502,7 +2502,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2568,7 +2568,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2634,7 +2634,7 @@ the wall, you might decide to go for broke and break your wand. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2700,7 +2700,7 @@ cation rather than just specify a particular direction. Other - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2766,7 +2766,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2832,7 +2832,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2898,7 +2898,7 @@ brains while polymorphed into a mind flayer, is considered eating - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -2964,7 +2964,7 @@ type ("polypiling") or the form of your own body into another - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3030,7 +3030,7 @@ tion, and are ignored unless a CHOOSE statement was used to - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3096,7 +3096,7 @@ pletion has no effect for the X11 windowport. You can specify - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3162,7 +3162,7 @@ "Configuring User Sounds" section. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3228,7 +3228,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3294,7 +3294,7 @@ tion controls whether the description includes map coordinates. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3360,7 +3360,7 @@ was defined during compilation. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3426,7 +3426,7 @@ display for end-of-game disclosure follows a set sequence. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3492,7 +3492,7 @@ "no", you will exclude that gender from being picked randomly. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3558,7 +3558,7 @@ sistent. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3624,7 +3624,7 @@ fault `\'. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3690,7 +3690,7 @@ Prompt for new form whenever any monster changes shape (default - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3756,7 +3756,7 @@ Valid settings are: - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3822,7 +3822,7 @@ item. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3888,7 +3888,7 @@ (Default `S'). Persistent. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -3954,7 +3954,7 @@ be set with the `O' command. Persistent. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4020,7 +4020,7 @@ off). Persistent. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4086,7 +4086,7 @@ only; "X11" interface always uses a timer based delay. The - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4152,7 +4152,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4218,7 +4218,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4284,7 +4284,7 @@ If NetHack can, it should use this size font for text windows. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4350,7 +4350,7 @@ Number of lines for traditional below-the-map status display. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4416,7 +4416,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4482,7 +4482,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4548,7 +4548,7 @@ pressions. It is possible to compile NetHack without regular - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4614,7 +4614,7 @@ key can be a single character ("x"), a control key ("^X", "C-x"), - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4680,7 +4680,7 @@ When asked for a location, the key to toggle autodescribe. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4746,7 +4746,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4812,7 +4812,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4878,7 +4878,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -4944,7 +4944,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5010,7 +5010,7 @@ cyan, gray, orange, light-green, yellow, light-blue, light- - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5076,7 +5076,7 @@ value changes upwards or downwards. This attribute times - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5142,7 +5142,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5208,7 +5208,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5274,7 +5274,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5340,7 +5340,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5406,7 +5406,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5472,7 +5472,7 @@ may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5538,7 +5538,7 @@ - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5604,7 +5604,7 @@ spectively, to identify unique people for the score file. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5670,7 +5670,7 @@ mode:explore option. The other is to issue the "#exploremode" - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5736,7 +5736,7 @@ incorporating many of the added features, and produced NetHack - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5802,7 +5802,7 @@ forms. - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5868,7 +5868,7 @@ bugs that had been discovered. Despite that constantly growing - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -5934,7 +5934,7 @@ velopment was released publicly by other parties. Since that code - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -6000,7 +6000,7 @@ Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -6024,25 +6024,28 @@ NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug fixes to NetHack 3.6.2. + NetHack 3.6.4 was released on December 17, 2019 containing a + security fix and a few bug fixes. + The official NetHack web site is maintained by Ken Lorber at https://www.nethack.org/. 12.1. SPECIAL THANKS On behalf of the NetHack community, thank you very much once - again to M. Drew Streib and Pasi Kallinen for providing a public - NetHack server at nethack.alt.org. Thanks to Keith Simpson and + again to M. Drew Streib and Pasi Kallinen for providing a public + NetHack server at nethack.alt.org. Thanks to Keith Simpson and Andy Thomson for hardfought.org. Thanks to all those unnamed dun- - geoneers who invest their time and effort into annual NetHack - tournaments such as Junethack, The November NetHack Tournament + geoneers who invest their time and effort into annual NetHack + tournaments such as Junethack, The November NetHack Tournament and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list + of the names of the worst of these miscreants in this, the list of Dungeoneers: Adam Aronow J. Ali Harlow Mikko Juola Alex Kompel Janet Walz Nathan Eady @@ -6060,13 +6063,10 @@ Bruce Holloway Karl Garrison Richard P. Hughey Bruce Mewborne Keizo Yamamoto Rob Menke Carl Schelin Keith Simpson Robin Bandy - Chris Russo Ken Arnold Robin Johnson - David Cohrs Ken Arromdee Roderick Schertler - David Damerell Ken Lorber Roland McGrath - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 @@ -6076,6 +6076,9 @@ + Chris Russo Ken Arnold Robin Johnson + David Cohrs Ken Arromdee Roderick Schertler + David Damerell Ken Lorber Roland McGrath David Gentzel Ken Washikita Ron Van Iwaarden David Hairston Kevin Darcy Ronnen Miller Dean Luick Kevin Hugo Ross Brown @@ -6100,7 +6103,7 @@ Irina Rempt-Drijfhout Mike Passaretti Izchak Miller Mike Stephenson - Brand and product names are trademarks or registered trade- + Brand and product names are trademarks or registered trade- marks of their respective holders. @@ -6129,10 +6132,7 @@ - - - - NetHack 3.6 December 5, 2019 + NetHack 3.6 December 17, 2019 From c7f070bf22e2c7af4b0e23f74e690928588b6274 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 17 Dec 2019 14:58:00 -0500 Subject: [PATCH 511/529] Merge branch 'NetHack-3.6' part 2 --- doc/Guidebook.txt | 207 +++++++++++++++++++++++----------------------- 1 file changed, 102 insertions(+), 105 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index bc5989693..df6454bbb 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -126,7 +126,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -192,7 +192,7 @@ you have seen on the current dungeon level; as you explore more - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -258,7 +258,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -324,7 +324,7 @@ Intelligence affects your ability to cast spells and read - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -456,7 +456,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -588,7 +588,7 @@ symbol at the chosen location, conditionally check for "More - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -720,7 +720,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -786,7 +786,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -852,7 +852,7 @@ once you've closed this menu. The available options are - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -918,7 +918,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -984,7 +984,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1050,7 +1050,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1116,7 +1116,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1248,7 +1248,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1314,7 +1314,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1380,7 +1380,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1446,7 +1446,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1512,7 +1512,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1578,7 +1578,7 @@ When picking a target with cursor and the autodescribe - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1644,7 +1644,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1710,7 +1710,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1776,7 +1776,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1842,7 +1842,7 @@ the `^D' (kick) command. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1908,7 +1908,7 @@ on the corresponding staircase at your destination. However, - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -1974,7 +1974,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2040,7 +2040,7 @@ member a monster but want to try fighting anyway, you can use the - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2106,7 +2106,7 @@ ers (or even former incarnations of yourself!) and their personal - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2172,7 +2172,7 @@ ter. Many commands that operate on objects must ask you to find - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2238,7 +2238,7 @@ In some cases "uncursed" will be omitted as being redundant when - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2304,7 +2304,7 @@ to taking off other worn items. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2370,7 +2370,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2436,7 +2436,7 @@ ondary is just an item in your inventory that's been designated - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2502,7 +2502,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2568,7 +2568,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2634,7 +2634,7 @@ the wall, you might decide to go for broke and break your wand. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2700,7 +2700,7 @@ cation rather than just specify a particular direction. Other - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2766,7 +2766,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2832,7 +2832,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2898,7 +2898,7 @@ brains while polymorphed into a mind flayer, is considered eating - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -2964,7 +2964,7 @@ type ("polypiling") or the form of your own body into another - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3030,7 +3030,7 @@ tion, and are ignored unless a CHOOSE statement was used to - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3096,7 +3096,7 @@ pletion has no effect for the X11 windowport. You can specify - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3162,7 +3162,7 @@ "Configuring User Sounds" section. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3228,7 +3228,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3294,7 +3294,7 @@ tion controls whether the description includes map coordinates. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3360,7 +3360,7 @@ was defined during compilation. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3426,7 +3426,7 @@ display for end-of-game disclosure follows a set sequence. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3492,7 +3492,7 @@ "no", you will exclude that gender from being picked randomly. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3558,7 +3558,7 @@ sistent. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3624,7 +3624,7 @@ fault `\'. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3690,7 +3690,7 @@ Prompt for new form whenever any monster changes shape (default - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3756,7 +3756,7 @@ Valid settings are: - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3822,7 +3822,7 @@ item. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3888,7 +3888,7 @@ (Default `S'). Persistent. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -3954,7 +3954,7 @@ be set with the `O' command. Persistent. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4020,7 +4020,7 @@ off). Persistent. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4086,7 +4086,7 @@ only; "X11" interface always uses a timer based delay. The - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4152,7 +4152,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4218,7 +4218,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4284,7 +4284,7 @@ If NetHack can, it should use this size font for text windows. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4350,7 +4350,7 @@ Number of lines for traditional below-the-map status display. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4416,7 +4416,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4482,7 +4482,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4548,7 +4548,7 @@ terns. This applies to Autopickup exceptions, Message types, Menu - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4614,7 +4614,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4680,7 +4680,7 @@ When asked for a location, the key to go to next closest - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4746,7 +4746,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4812,7 +4812,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4878,7 +4878,7 @@ tty, curses, win32tty and win32gui interfaces support this. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -4944,7 +4944,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5010,7 +5010,7 @@ be used in combination with any of the other attributes. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5076,7 +5076,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5142,7 +5142,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5208,7 +5208,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5274,7 +5274,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5340,7 +5340,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5406,7 +5406,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5472,7 +5472,7 @@ may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5538,7 +5538,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5604,7 +5604,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5670,7 +5670,7 @@ whatever you have. If you quit, you keep all your gold, but if - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5736,7 +5736,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5802,7 +5802,7 @@ NetHack 3.1 to the PC. - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5868,7 +5868,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -5934,7 +5934,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -6000,7 +6000,7 @@ - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -6051,25 +6051,22 @@ 12.1. SPECIAL THANKS On behalf of the NetHack community, thank you very much once - again to M. Drew Streib and Pasi Kallinen for providing a public - NetHack server at nethack.alt.org. Thanks to Keith Simpson and + again to M. Drew Streib and Pasi Kallinen for providing a public + NetHack server at nethack.alt.org. Thanks to Keith Simpson and Andy Thomson for hardfought.org. Thanks to all those unnamed dun- - geoneers who invest their time and effort into annual NetHack - tournaments such as Junethack, The November NetHack Tournament + geoneers who invest their time and effort into annual NetHack + tournaments such as Junethack, The November NetHack Tournament and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list - of Dungeoneers: - Adam Aronow J. Ali Harlow Mikko Juola + of the names of the worst of these miscreants in this, the list - - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 @@ -6079,6 +6076,8 @@ + of Dungeoneers: + Adam Aronow J. Ali Harlow Mikko Juola Alex Kompel Janet Walz Nathan Eady Alex Smith Janne Salmijarvi Norm Meluch Andreas Dorn Jean-Christophe Collet Olaf Seibert @@ -6121,7 +6120,7 @@ Irina Rempt-Drijfhout Mike Passaretti Izchak Miller Mike Stephenson - Brand and product names are trademarks or registered trade- + Brand and product names are trademarks or registered trade- marks of their respective holders. @@ -6133,9 +6132,7 @@ - - - NetHack 3.7 December 5, 2019 + NetHack 3.7 December 17, 2019 From 089b2410104511147c247b6398b9f5bc56dbc1a0 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 17 Dec 2019 15:32:10 -0500 Subject: [PATCH 512/529] Windows portable_device support: skip the "illegal folder" check for now --- sys/winnt/windmain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 010c11eda..29c12ffbc 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -311,8 +311,10 @@ set_default_prefix_locations(const char *programPath) if (test_portable_config(executable_path, portable_device_top_path, sizeof portable_device_top_path)) { +#if 0 if (illegal_dir(portable_device_top_path, executable_path)) windows_startup_state = 2; +#endif fqn_prefix[SYSCONFPREFIX] = executable_path; fqn_prefix[CONFIGPREFIX] = portable_device_top_path; fqn_prefix[HACKPREFIX] = portable_device_top_path; From f001de79542b8c38b1f8e6d7eaefbbd28ab94b47 Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 17 Dec 2019 15:41:58 -0800 Subject: [PATCH 513/529] parse_conf_file fix fix --- src/files.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/files.c b/src/files.c index 5e500ae3a..a25a038e6 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 files.c $NHDT-Date: 1574116097 2019/11/18 22:28:17 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.272 $ */ +/* NetHack 3.6 files.c $NHDT-Date: 1576626110 2019/12/17 23:41:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.276 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3160,7 +3160,8 @@ boolean FDECL((*proc), (char *)); free(buf); } buf = strcat(tmpbuf, ep); - buf[sizeof inbuf - 1] = '\0'; + if (strlen(buf) >= sizeof inbuf) + buf[sizeof inbuf - 1] = '\0'; } if (morelines || (ignoreline && !oldline)) From 0ee445ce0bc35ce7744d1e630d0d6d0d409f5f90 Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 17 Dec 2019 15:48:37 -0800 Subject: [PATCH 514/529] ceiling_hider() Just groundwork so far; no change in game play. --- include/mondata.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/include/mondata.h b/include/mondata.h index 41b5f70f4..155ebfa5b 100644 --- a/include/mondata.h +++ b/include/mondata.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 mondata.h $NHDT-Date: 1550524558 2019/02/18 21:15:58 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.37 $ */ +/* NetHack 3.6 mondata.h $NHDT-Date: 1576626512 2019/12/17 23:48:32 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.39 $ */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ @@ -31,6 +31,7 @@ (is_minion((mon)->data) && mon_aligntyp(mon) == A_LAWFUL) #define is_flyer(ptr) (((ptr)->mflags1 & M1_FLY) != 0L) #define is_floater(ptr) ((ptr)->mlet == S_EYE || (ptr)->mlet == S_LIGHT) +/* clinger: piercers, mimics, wumpus -- generally don't fall down holes */ #define is_clinger(ptr) (((ptr)->mflags1 & M1_CLING) != 0L) #define is_swimmer(ptr) (((ptr)->mflags1 & M1_SWIM) != 0L) #define breathless(ptr) (((ptr)->mflags1 & M1_BREATHLESS) != 0L) @@ -41,14 +42,24 @@ #define noncorporeal(ptr) ((ptr)->mlet == S_GHOST) #define tunnels(ptr) (((ptr)->mflags1 & M1_TUNNEL) != 0L) #define needspick(ptr) (((ptr)->mflags1 & M1_NEEDPICK) != 0L) +/* hides_under() requires an object at the location in order to hide */ #define hides_under(ptr) (((ptr)->mflags1 & M1_CONCEAL) != 0L) +/* is_hider() is True for mimics but when hiding they appear as something + else rather than become mon->mundetected, so use is_hider() with care */ #define is_hider(ptr) (((ptr)->mflags1 & M1_HIDE) != 0L) +/* piercers cling to the ceiling; lurkers above are hiders but they fly + so aren't classified as clingers; unfortunately mimics are classified + as both hiders and clingers but have nothing to do with ceilings; + wumpuses (not wumpi :-) cling but aren't hiders */ +#define ceiling_hider(ptr) \ + (is_hider(ptr) && ((is_clinger(ptr) && (ptr)->mlet != S_MIMIC) \ + || is_flyer(ptr))) /* lurker above */ #define haseyes(ptr) (((ptr)->mflags1 & M1_NOEYES) == 0L) -#define eyecount(ptr) \ - (!haseyes(ptr) ? 0 : ((ptr) == &mons[PM_CYCLOPS] \ - || (ptr) == &mons[PM_FLOATING_EYE]) \ - ? 1 \ - : 2) +/* used to decide whether plural applies so no need for 'more than 2' */ +#define eyecount(ptr) \ + (!haseyes(ptr) ? 0 \ + : ((ptr) == &mons[PM_CYCLOPS] || (ptr) == &mons[PM_FLOATING_EYE]) ? 1 \ + : 2) #define nohands(ptr) (((ptr)->mflags1 & M1_NOHANDS) != 0L) #define nolimbs(ptr) (((ptr)->mflags1 & M1_NOLIMBS) == M1_NOLIMBS) #define notake(ptr) (((ptr)->mflags1 & M1_NOTAKE) != 0L) From 512f886ca66943e2d5dbba77a743cd8eee7af834 Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 17 Dec 2019 18:14:08 -0800 Subject: [PATCH 515/529] wizard mode wishing for terrain Fix some issues noticed when experimenting with ceiling hiders. They're all blind (at least without the monks' Eyes) and some of the behavior while blind seemed to be incorrect (though some that I thought was wrong turned out to be ok; feel_newsym() won't update the map if the hero can't reach the floor). Fixing that made me notice that some terrain side-effects (being underwater or stuck in lava) weren't getting disabled when the underlying terrain wasn't the corresponding type anymore. --- doc/fixes36.4 | 5 ++- src/objnam.c | 94 +++++++++++++++++++++++++-------------------------- src/trap.c | 4 ++- 3 files changed, 54 insertions(+), 49 deletions(-) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index 441dd7770..25dd5bc0a 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.4 $ $NHDT-Date: 1576287569 2019/12/14 01:39:29 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.11 $ $NHDT-Date: 1576635242 2019/12/18 02:14:02 $ fixes36.4 contains a terse summary of changes made to 3.6.3 in order to produce 3.6.4. @@ -16,6 +16,9 @@ message "your knapsack can't accomodate any more items" when picking stuff up pending; vary the message rather than add more convoluted pickup code dozen-ish assorted spelling/typo fixes in messages and source comments fix potential buffer overflow when parsing run-time configuration file +wizard mode wishing for terrain would leave it unmapped if done while blind +wizard mode terrain wish could leave hero in water (severe vision limits) or + in lava (trapped, sinking) which wasn't there any more Platform- and/or Interface-Specific Fixes or Features diff --git a/src/objnam.c b/src/objnam.c index e54b20732..4e7e3e2c6 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 objnam.c $NHDT-Date: 1575245076 2019/12/02 00:04:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.255 $ */ +/* NetHack 3.6 objnam.c $NHDT-Date: 1576635242 2019/12/18 02:14:02 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.256 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3663,14 +3663,17 @@ struct obj *no_wish; goto typfnd; } } -/* Let wizards wish for traps and furniture. - * Must come after objects check so wizards can still wish for - * trap objects like beartraps. - * Disallow such topology tweaks for WIZKIT startup wishes. - */ + + /* + * Let wizards wish for traps and furniture. + * Must come after objects check so wizards can still wish for + * trap objects like beartraps. + * Disallow such topology tweaks for WIZKIT startup wishes. + */ wiztrap: if (wizard && !program_state.wizkit_wishing) { struct rm *lev; + boolean madeterrain = FALSE; int trap, x = u.ux, y = u.uy; for (trap = NO_TRAP + 1; trap < TRAPNUM; trap++) { @@ -3693,7 +3696,8 @@ struct obj *no_wish; return (struct obj *) &zeroobj; } - /* furniture and terrain */ + /* furniture and terrain (use at your own risk; can clobber stairs + or place furniture on existing traps which shouldn't be allowed) */ lev = &levl[x][y]; p = eos(bp); if (!BSTRCMPI(bp, p - 8, "fountain")) { @@ -3702,43 +3706,36 @@ struct obj *no_wish; if (!strncmpi(bp, "magic ", 6)) lev->blessedftn = 1; pline("A %sfountain.", lev->blessedftn ? "magic " : ""); - newsym(x, y); - return (struct obj *) &zeroobj; - } - if (!BSTRCMPI(bp, p - 6, "throne")) { + madeterrain = TRUE; + } else if (!BSTRCMPI(bp, p - 6, "throne")) { lev->typ = THRONE; pline("A throne."); - newsym(x, y); - return (struct obj *) &zeroobj; - } - if (!BSTRCMPI(bp, p - 4, "sink")) { + madeterrain = TRUE; + } else if (!BSTRCMPI(bp, p - 4, "sink")) { lev->typ = SINK; level.flags.nsinks++; pline("A sink."); - newsym(x, y); - return (struct obj *) &zeroobj; - } + madeterrain = TRUE; + /* ("water" matches "potion of water" rather than terrain) */ - if (!BSTRCMPI(bp, p - 4, "pool") || !BSTRCMPI(bp, p - 4, "moat")) { + } else if (!BSTRCMPI(bp, p - 4, "pool") + || !BSTRCMPI(bp, p - 4, "moat")) { lev->typ = !BSTRCMPI(bp, p - 4, "pool") ? POOL : MOAT; del_engr_at(x, y); pline("A %s.", (lev->typ == POOL) ? "pool" : "moat"); /* Must manually make kelp! */ water_damage_chain(level.objects[x][y], TRUE); - newsym(x, y); - return (struct obj *) &zeroobj; - } - if (!BSTRCMPI(bp, p - 4, "lava")) { /* also matches "molten lava" */ + madeterrain = TRUE; + + /* also matches "molten lava" */ + } else if (!BSTRCMPI(bp, p - 4, "lava")) { lev->typ = LAVAPOOL; del_engr_at(x, y); pline("A pool of molten lava."); if (!(Levitation || Flying)) (void) lava_effects(); - newsym(x, y); - return (struct obj *) &zeroobj; - } - - if (!BSTRCMPI(bp, p - 5, "altar")) { + madeterrain = TRUE; + } else if (!BSTRCMPI(bp, p - 5, "altar")) { aligntyp al; lev->typ = ALTAR; @@ -3751,37 +3748,40 @@ struct obj *no_wish; else if (!strncmpi(bp, "unaligned ", 10)) al = A_NONE; else /* -1 - A_CHAOTIC, 0 - A_NEUTRAL, 1 - A_LAWFUL */ - al = (!rn2(6)) ? A_NONE : rn2((int) A_LAWFUL + 2) - 1; + al = !rn2(6) ? A_NONE : (rn2((int) A_LAWFUL + 2) - 1); lev->altarmask = Align2amask(al); pline("%s altar.", An(align_str(al))); - newsym(x, y); - return (struct obj *) &zeroobj; - } - - if (!BSTRCMPI(bp, p - 5, "grave") - || !BSTRCMPI(bp, p - 9, "headstone")) { + madeterrain = TRUE; + } else if (!BSTRCMPI(bp, p - 5, "grave") + || !BSTRCMPI(bp, p - 9, "headstone")) { make_grave(x, y, (char *) 0); pline("%s.", IS_GRAVE(lev->typ) ? "A grave" : "Can't place a grave here"); - newsym(x, y); - return (struct obj *) &zeroobj; - } - - if (!BSTRCMPI(bp, p - 4, "tree")) { + madeterrain = TRUE; + } else if (!BSTRCMPI(bp, p - 4, "tree")) { lev->typ = TREE; pline("A tree."); - newsym(x, y); block_point(x, y); - return (struct obj *) &zeroobj; - } - - if (!BSTRCMPI(bp, p - 4, "bars")) { + madeterrain = TRUE; + } else if (!BSTRCMPI(bp, p - 4, "bars")) { lev->typ = IRONBARS; pline("Iron bars."); - newsym(x, y); + madeterrain = TRUE; + } + + if (madeterrain) { + feel_newsym(x, y); + if (u.uinwater && !is_pool(x, y)) { + u.uinwater = 0; /* leave the water */ + docrt(); + vision_full_recalc = 1; + } else if (u.utrap && u.utraptype == TT_LAVA && !is_lava(x, y)) { + reset_utrap(FALSE); + } + /* cast 'const' away; caller won't modify this */ return (struct obj *) &zeroobj; } - } + } /* end of wizard mode traps and terrain */ if (!oclass && !typ) { if (!strncmpi(bp, "polearm", 7)) { diff --git a/src/trap.c b/src/trap.c index cc15f22cc..ea7336336 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 trap.c $NHDT-Date: 1576274483 2019/12/13 22:01:23 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.325 $ */ +/* NetHack 3.6 trap.c $NHDT-Date: 1576635243 2019/12/18 02:14:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.328 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3746,6 +3746,7 @@ drown() boolean inpool_ok = FALSE, crawl_ok; int i, x, y; + feel_newsym(u.ux, u.uy); /* in case Blind, map the water here */ /* happily wading in the same contiguous pool */ if (u.uinwater && is_pool(u.ux - u.dx, u.uy - u.dy) && (Swimming || Amphibious)) { @@ -5262,6 +5263,7 @@ lava_effects() int dmg = d(6, 6); /* only applicable for water walking */ boolean usurvive, boil_away; + feel_newsym(u.ux, u.uy); /* in case Blind, map the lava here */ burn_away_slime(); if (likes_lava(youmonst.data)) return FALSE; From 8349d959921723b8758920af28ea7516d6391c68 Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 17 Dec 2019 19:08:26 -0800 Subject: [PATCH 516/529] ceiling hiders vs '>' Poly'd hero hiding on the ceiling was told "you can't go down here" if using '>' at a spot that didn't have down stairs, trap door, hole, or pit. Let '>' bring a ceiling hider out of hiding; lurker above resumes flying, piercer falls to floor or whatever is underneath it. --- doc/fixes36.4 | 5 ++++- src/do.c | 20 +++++++++++++++++++- src/hack.c | 6 +++++- src/objnam.c | 13 ++++++++----- src/trap.c | 12 ++++++++---- 5 files changed, 44 insertions(+), 12 deletions(-) diff --git a/doc/fixes36.4 b/doc/fixes36.4 index 25dd5bc0a..0cd176e40 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.11 $ $NHDT-Date: 1576635242 2019/12/18 02:14:02 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.12 $ $NHDT-Date: 1576638499 2019/12/18 03:08:19 $ fixes36.4 contains a terse summary of changes made to 3.6.3 in order to produce 3.6.4. @@ -19,6 +19,9 @@ fix potential buffer overflow when parsing run-time configuration file wizard mode wishing for terrain would leave it unmapped if done while blind wizard mode terrain wish could leave hero in water (severe vision limits) or in lava (trapped, sinking) which wasn't there any more +flying hero can go down (via '>') holes or trap doors instead of escaping trap +polymorphed hero hiding on the ceiling can now use '>' to unhide instead of + being told "you can't go down here" Platform- and/or Interface-Specific Fixes or Features diff --git a/src/do.c b/src/do.c index b7bb737b9..8bbed39de 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do.c $NHDT-Date: 1576181796 2019/12/12 20:16:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.197 $ */ +/* NetHack 3.6 do.c $NHDT-Date: 1576638499 2019/12/18 03:08:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.198 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1000,6 +1000,24 @@ dodown() : surface(u.ux, u.uy)); return 0; /* didn't move */ } + + if (Upolyd && ceiling_hider(&mons[u.umonnum]) && u.uundetected) { + u.uundetected = 0; + if (Flying) { /* lurker above */ + You("fly out of hiding."); + } else { /* piercer */ + You("drop to the %s.", surface(u.ux, u.uy)); + if (is_pool_or_lava(u.ux, u.uy)) { + pooleffects(FALSE); + } else { + (void) pickup(1); + if ((trap = t_at(u.ux, u.uy)) != 0) + dotrap(trap, TOOKPLUNGE); + } + } + return 1; /* came out of hiding; might need '>' again to go down */ + } + if (!stairs_down && !ladder_down) { trap = t_at(u.ux, u.uy); if (trap && (uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) { diff --git a/src/hack.c b/src/hack.c index a48b92cf5..79fe7408c 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 hack.c $NHDT-Date: 1568509227 2019/09/15 01:00:27 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.216 $ */ +/* NetHack 3.6 hack.c $NHDT-Date: 1576638500 2019/12/18 03:08:20 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.220 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2124,6 +2124,10 @@ boolean newspot; /* true if called by spoteffects */ } /* not mounted */ + /* if hiding on ceiling then don't automatically enter pool */ + if (Upolyd && ceiling_hider(&mons[u.umonnum]) && u.uundetected) + return FALSE; + /* drown(),lava_effects() return true if hero changes location while surviving the problem */ if (is_lava(u.ux, u.uy)) { diff --git a/src/objnam.c b/src/objnam.c index 4e7e3e2c6..aa5d7713d 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 objnam.c $NHDT-Date: 1576635242 2019/12/18 02:14:02 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.256 $ */ +/* NetHack 3.6 objnam.c $NHDT-Date: 1576638500 2019/12/18 03:08:20 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.257 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3733,7 +3733,7 @@ struct obj *no_wish; del_engr_at(x, y); pline("A pool of molten lava."); if (!(Levitation || Flying)) - (void) lava_effects(); + pooleffects(FALSE); madeterrain = TRUE; } else if (!BSTRCMPI(bp, p - 5, "altar")) { aligntyp al; @@ -3770,12 +3770,15 @@ struct obj *no_wish; } if (madeterrain) { - feel_newsym(x, y); - if (u.uinwater && !is_pool(x, y)) { + feel_newsym(x, y); /* map the spot where the wish occurred */ + /* hero started at but might not be there anymore (create + lava, decline to die, and get teleported away to safety) */ + if (u.uinwater && !is_pool(u.ux, u.uy)) { u.uinwater = 0; /* leave the water */ docrt(); vision_full_recalc = 1; - } else if (u.utrap && u.utraptype == TT_LAVA && !is_lava(x, y)) { + } else if (u.utrap && u.utraptype == TT_LAVA + && !is_lava(u.ux, u.uy)) { reset_utrap(FALSE); } /* cast 'const' away; caller won't modify this */ diff --git a/src/trap.c b/src/trap.c index ea7336336..b6db81148 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 trap.c $NHDT-Date: 1576635243 2019/12/18 02:14:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.328 $ */ +/* NetHack 3.6 trap.c $NHDT-Date: 1576638501 2019/12/18 03:08:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.329 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -489,8 +489,9 @@ unsigned ftflags; ; /* KMH -- You can't escape the Sokoban level traps */ else if (Levitation || u.ustuck || (!Can_fall_thru(&u.uz) && !levl[u.ux][u.uy].candig) - || ((Flying || is_clinger(youmonst.data)) - && !(ftflags & TOOKPLUNGE)) + || ((Flying || is_clinger(youmonst.data) + || (ceiling_hider(youmonst.data) && u.uundetected)) + && !(ftflags & TOOKPLUNGE)) || (Inhell && !u.uevent.invoked && newlevel == bottom)) { dont_fall = "don't fall in."; } else if (youmonst.data->msize >= MZ_HUGE) { @@ -5388,7 +5389,10 @@ sink_into_lava() static const char sink_deeper[] = "You sink deeper into the lava."; if (!u.utrap || u.utraptype != TT_LAVA) { - ; /* do nothing; this shouldn't happen */ + ; /* do nothing; this usually won't happen but could after + * polymorphing from a flier into a ceiling hider and then hiding; + * allmain() only checks whether the hero is at a lava location, + * not whether he or she is currently sinking */ } else if (!is_lava(u.ux, u.uy)) { reset_utrap(FALSE); /* this shouldn't happen either */ } else if (!u.uinvulnerable) { From 5f0d06fb80ac4945a863b11ff06a2481b2254af0 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 17 Dec 2019 23:16:44 -0500 Subject: [PATCH 517/529] update and simplify the windows portable_device_paths sysconf option Requires a sysconf file in the windows executable directory in order to work --- doc/Guidebook.mn | 7 +++ doc/Guidebook.tex | 10 +++ doc/fixes36.4 | 3 +- include/sys.h | 6 +- src/files.c | 21 ++++--- src/sys.c | 12 +--- sys/winnt/windmain.c | 142 ++++++++++--------------------------------- 7 files changed, 70 insertions(+), 131 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 8d753d9f8..7466911c4 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -4789,6 +4789,13 @@ to identify unique people for the score file. MAX_STATUENAME_RANK\ =\ Maximum number of score file entries to use for random statue names (default is 10). .lp +ACCESSIBILITY\ =\ 0 or 1 to disable or enable, respectively, the ability for players +to set S_pet_override and S_hero_override symbols in their configuration file. +.lp +PORTABLE_DEVICE_PATHS\ =\ 0 or 1 Windows OS only, the game will look +for all of its external files, and write to all of its output files in one place +rather than at the standard locations. +.lp DUMPLOGFILE\ =\ A filename where the end-of-game dumplog is saved. Not defining this will prevent dumplog from being created. Only available if your game is compiled with DUMPLOG. Allows the following placeholders: diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 36d459db0..8c6214a57 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -5297,6 +5297,16 @@ Minimum number of points to get an entry in the score file. 0 or 1 to use user names or numeric userids, respectively, to identify unique people for the score file %.lp +\item[\ib{ACCESSIBILITY}] +0 or 1 to disable or enable, respectively, the ability for players +to set S\verb+_+pet\verb+_+override and S\verb+_+hero\verb+_+override +symbols in their configuration file. +%.lp +\item[\ib{PORTABLE\verb+_+DEVICE\verb+_+PATHS}] +0 or 1 Windows OS only, the game will look for all of its external +files, and write to all of its output files in one place +rather than at the standard locations. +%.lp \item[\ib{DUMPLOGFILE}] A filename where the end-of-game dumplog is saved. Not defining this will prevent dumplog from being created. Only available diff --git a/doc/fixes36.4 b/doc/fixes36.4 index 441dd7770..529cbfeca 100644 --- a/doc/fixes36.4 +++ b/doc/fixes36.4 @@ -21,7 +21,8 @@ fix potential buffer overflow when parsing run-time configuration file Platform- and/or Interface-Specific Fixes or Features ----------------------------------------------------- fix compilation on platforms that split the ncurses and tinfo libraries -allow run-from-removable-device on Windows +Windows: allow all game files to be on a portable device via the sysconf + option 'portable_device_paths' General New Features diff --git a/include/sys.h b/include/sys.h index 392987660..ed2f57859 100644 --- a/include/sys.h +++ b/include/sys.h @@ -17,9 +17,6 @@ struct sysopt { char *debugfiles; /* files to show debugplines in. '*' is all. */ #ifdef DUMPLOG char *dumplogfile; /* where the dump file is saved */ -#endif -#ifdef WIN32 - char *portable_device_top; /* nethack configuration for a portable drive */ #endif int env_dbgfl; /* 1: debugfiles comes from getenv("DEBUGFILES") * so sysconf's DEBUGFILES shouldn't override it; @@ -47,6 +44,9 @@ struct sysopt { /* enable accessibility options */ int accessibility; +#ifdef WIN32 + int portable_device_paths; /* nethack configuration for a portable device */ +#endif }; extern struct sysopt sysopt; diff --git a/src/files.c b/src/files.c index a25a038e6..44413f230 100644 --- a/src/files.c +++ b/src/files.c @@ -2466,12 +2466,6 @@ char *origbuf; if (sysopt.dumplogfile) free((genericptr_t) sysopt.dumplogfile); sysopt.dumplogfile = dupstr(bufp); -#endif -#ifdef WIN32 - } else if (src == SET_IN_SYS && match_varname(buf, "portable_device_top", 8)) { - if (sysopt.portable_device_top) - free((genericptr_t) sysopt.portable_device_top); - sysopt.portable_device_top = dupstr(bufp); #endif } else if (src == SET_IN_SYS && match_varname(buf, "GENERICUSERS", 12)) { if (sysopt.genericusers) @@ -2605,6 +2599,16 @@ char *origbuf; return FALSE; } sysopt.accessibility = n; +#ifdef WIN32 + } else if (src == SET_IN_SYS + && match_varname(buf, "portable_device_paths", 8)) { + n = atoi(bufp); + if (n < 0 || n > 1) { + config_error_add("Illegal value in portable_device_paths (not 0,1)."); + return FALSE; + } + sysopt.portable_device_paths = n; +#endif #endif /* SYSCF */ } else if (match_varname(buf, "BOULDER", 3)) { @@ -4160,11 +4164,10 @@ reveal_paths(VOID_ARGS) raw_printf("No end-of-game disclosure file (%s).", nodumpreason); #ifdef WIN32 - if (sysopt.portable_device_top) { + if (sysopt.portable_device_paths) { const char *pd = get_portable_device(); - raw_printf("Writable folder for portable device config (sysconf %s):", - "portable_device_top"); + raw_printf("portable_device_paths (set in sysconf):"); raw_printf(" \"%s\"", pd); } #endif diff --git a/src/sys.c b/src/sys.c index f8c0a91c5..6a0c52da8 100644 --- a/src/sys.c +++ b/src/sys.c @@ -34,9 +34,6 @@ sys_early_init() #endif #ifdef DUMPLOG sysopt.dumplogfile = (char *) 0; -#endif -#ifdef WIN32 - sysopt.portable_device_top = (char *) 0; #endif sysopt.env_dbgfl = 0; /* haven't checked getenv("DEBUGFILES") yet */ sysopt.shellers = (char *) 0; @@ -84,6 +81,9 @@ sys_early_init() sysopt.seduce = 1; /* if it's compiled in, default to on */ sysopt_seduce_set(sysopt.seduce); sysopt.accessibility = 0; +#ifdef WIN32 + sysopt.portable_device_paths = 0; +#endif return; } @@ -106,12 +106,6 @@ sysopt_release() #ifdef DUMPLOG if (sysopt.dumplogfile) free((genericptr_t)sysopt.dumplogfile), sysopt.dumplogfile=(char *)0; -#endif -#ifdef WIN32 - if (sysopt.portable_device_top) { - free((genericptr_t) sysopt.portable_device_top); - sysopt.portable_device_top = (char *) 0; - } #endif if (sysopt.genericusers) free((genericptr_t) sysopt.genericusers), diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 29c12ffbc..4ca0c6bfc 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -168,25 +168,16 @@ folder_file_exists(const char * folder, const char * file_name) boolean test_portable_config( const char *executable_path, - char *portable_device_top_path, - size_t portable_device_top_path_size) + char *portable_device_path, + size_t portable_device_path_size) { + int lth = 0; + const char *sysconf = "sysconf"; + char tmppath[MAX_PATH]; boolean retval = FALSE, save_initoptions_noterminate = iflags.initoptions_noterminate; - char tmppath[MAX_PATH], *toppath, *sysconftop; -#ifdef UNICODE - TCHAR wdrive[_MAX_DRIVE]; - TCHAR wthisdir[_MAX_DIR]; - TCHAR wfname[_MAX_FNAME]; - TCHAR wext[_MAX_EXT]; -#endif - char drive[_MAX_DRIVE]; - char thisdir[_MAX_DIR]; - char fname[_MAX_FNAME]; - char ext[_MAX_EXT]; - errno_t err; - if (portable_device_top_path && folder_file_exists(executable_path, "sysconf")) { + if (portable_device_path && folder_file_exists(executable_path, "sysconf")) { /* There is a sysconf file (not just sysconf.template) present in the exe path, which is not the way NetHack is initially distributed, @@ -196,101 +187,38 @@ test_portable_config( delve into that... */ - *portable_device_top_path = '\0'; - (void) strncpy(tmppath, executable_path, sizeof tmppath - (1 + sizeof "sysconf")); - tmppath[sizeof tmppath - (1 + sizeof "sysconf")] = '\0'; - (void) strcat(tmppath, "sysconf"); - /* split the path up */ -#ifdef UNICODE - { - int sz, wchars_num = MultiByteToWideChar( CP_ACP, 0, tmppath, -1, NULL, 0); - wchar_t *wstr; - - if (wchars_num) { - wstr = (wchar_t *) alloc(wchars_num * sizeof(wchar_t)); - MultiByteToWideChar( CP_ACP, 0, tmppath, -1, wstr, wchars_num); - err = _wsplitpath_s(wstr, wdrive, _MAX_DRIVE, wthisdir, _MAX_DIR, - wfname, _MAX_FNAME, wext, _MAX_EXT); - free(wstr); - } - sz = WideCharToMultiByte(CP_ACP, 0, wdrive, -1, drive, - 0, NULL, NULL); - if (sz <= sizeof drive) - WideCharToMultiByte(CP_ACP, 0, wdrive, -1, drive, - sz, NULL, NULL); - - } -#else - err = _splitpath_s(tmppath, drive, _MAX_DRIVE, thisdir, _MAX_DIR, - fname, _MAX_FNAME, ext, _MAX_EXT); -#endif - if (err != 0) - goto done_test; - - toppath = (char *) alloc(portable_device_top_path_size); - *toppath = '\0'; - /* -2 because we need to append the path separator */ - (void) strncpy(toppath, drive, portable_device_top_path_size - 2); - toppath[portable_device_top_path_size - 2] = '\0'; - (void) strcat(toppath, "\\"); + *portable_device_path = '\0'; + lth = sizeof tmppath - strlen(sysconf); + (void) strncpy(tmppath, executable_path, lth - 1); + tmppath[lth - 1] = '\0'; + (void) strcat(tmppath, sysconf); iflags.initoptions_noterminate = 1; /* assure_syscf_file(); */ config_error_init(TRUE, tmppath, FALSE); /* ... and _must_ parse correctly. */ if (read_config_file(tmppath, SET_IN_SYS) - && sysopt.portable_device_top - && (strlen(sysopt.portable_device_top) + strlen(toppath) - < portable_device_top_path_size - 3)) { - sysconftop = sysopt.portable_device_top; - if (sysconftop[1] == ':') - sysconftop += 2; /* skip the device if specified */ - if (*sysconftop == '\\') - sysconftop += 1; /* skip the root folder if specified */ - (void) strcat(toppath, sysconftop); - append_slash(toppath); + && sysopt.portable_device_paths) retval = TRUE; - } else { - if (config_error_done()) - retval = FALSE; - } + (void) config_error_done(); iflags.initoptions_noterminate = save_initoptions_noterminate; - sysopt_release(); - if (retval) - Strcpy(portable_device_top_path, toppath); - free(toppath); + sysopt_release(); /* the real sysconf processing comes later */ + } + if (retval) { + lth = strlen(executable_path); + if (lth <= (int) portable_device_path_size - 1) + Strcpy(portable_device_path, executable_path); + else + retval = FALSE; } - done_test: - return retval; } -static char portable_device_top_path[MAX_PATH]; +static char portable_device_path[MAX_PATH]; const char *get_portable_device() { - return (const char *) portable_device_top_path; -} - -boolean illegal_dir(const char *d1, const char *d2) -{ - int i; - char tmpbuf[MAX_PATH]; - - if (!strcmpi(d1, d2)) { - (void) strncpy(tmpbuf, &portable_device_top_path[3], - sizeof tmpbuf - 1); - tmpbuf[sizeof tmpbuf - 1] = '\0'; - i = (int) strlen(tmpbuf) - 1; - if (tmpbuf[i] == '\\') - tmpbuf[i] = '\0'; - raw_printf("Illegal \"portable_device_top = %s\" in your sysconf file", - tmpbuf); - raw_printf("because the exe is running from that folder."); - raw_printf("Point 'portable_device_top' to a different folder."); - return TRUE; - } - return FALSE; + return (const char *) portable_device_path; } void @@ -309,21 +237,17 @@ set_default_prefix_locations(const char *programPath) strcpy(executable_path, get_executable_path()); append_slash(executable_path); - if (test_portable_config(executable_path, portable_device_top_path, - sizeof portable_device_top_path)) { -#if 0 - if (illegal_dir(portable_device_top_path, executable_path)) - windows_startup_state = 2; -#endif + if (test_portable_config(executable_path, + portable_device_path, sizeof portable_device_path)) { fqn_prefix[SYSCONFPREFIX] = executable_path; - fqn_prefix[CONFIGPREFIX] = portable_device_top_path; - fqn_prefix[HACKPREFIX] = portable_device_top_path; - fqn_prefix[SAVEPREFIX] = portable_device_top_path; - fqn_prefix[LEVELPREFIX] = portable_device_top_path; - fqn_prefix[BONESPREFIX] = portable_device_top_path; - fqn_prefix[SCOREPREFIX] = portable_device_top_path; - fqn_prefix[LOCKPREFIX] = portable_device_top_path; - fqn_prefix[TROUBLEPREFIX] = portable_device_top_path; + fqn_prefix[CONFIGPREFIX] = portable_device_path; + fqn_prefix[HACKPREFIX] = portable_device_path; + fqn_prefix[SAVEPREFIX] = portable_device_path; + fqn_prefix[LEVELPREFIX] = portable_device_path; + fqn_prefix[BONESPREFIX] = portable_device_path; + fqn_prefix[SCOREPREFIX] = portable_device_path; + fqn_prefix[LOCKPREFIX] = portable_device_path; + fqn_prefix[TROUBLEPREFIX] = portable_device_path; fqn_prefix[DATAPREFIX] = executable_path; } else { build_known_folder_path(&FOLDERID_Profile, profile_path, From 96155c7e02599bfa9b7e9ee2c0274e3580e54204 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 17 Dec 2019 23:38:06 -0500 Subject: [PATCH 518/529] housekeeping updates --- README | 22 +++++++++++++++++++--- dat/history | 2 +- doc/Guidebook.mn | 4 ++-- doc/Guidebook.tex | 4 ++-- include/patchlevel.h | 29 +++++++++++++++++++++++------ 5 files changed, 47 insertions(+), 14 deletions(-) diff --git a/README b/README index b252f7833..ae5eab50f 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ - NetHack 3.6.4 -- General information December 17, 2019 + NetHack 3.6.4 -- General information December 18, 2019 NetHack 3.6 is an enhancement to the dungeon exploration game NetHack, which is a distant descendent of Rogue and Hack, and a direct descendent of @@ -16,12 +16,28 @@ section. Below you will find some other general notes that were not considered spoilers: + * fix potential buffer overflow when parsing run-time configuration file * GDBPATH and GREPPATH from sysconf or -D... on compilation command line were * being processed even if PANICTRACE was disabled but only being freed * at end of game when that was enabled - * fix the article used in the message when your steed encounters a polymorph trap + * fix the article used in the message when your steed encounters a polymorph + * trap + * allow teleporting onto the vibrating square + * message "your knapsack can't accomodate any more items" when picking stuff + * up or removing such from container was inaccurate if there was some + * gold pending; vary the message rather than add more convoluted pickup + * code * dozen-ish assorted spelling/typo fixes in messages and source comments - * fix potential buffer overflow when parsing run-time configuration file + * wizard mode wishing for terrain would leave it unmapped if done while blind + * wizard mode terrain wish could leave hero in water (severe vision limits) + * or in lava (trapped, sinking) which wasn't there any more + * flying hero can go down (via '>') holes or trap doors instead of escaping + * trap + * polymorphed hero hiding on the ceiling can now use '>' to unhide instead of + * being told "you can't go down here" + * fix compilation on platforms that split the ncurses and tinfo libraries + * Windows: allow all game files to be on a portable device via the sysconf + * option 'portable_device_paths' - - - - - - - - - - - diff --git a/dat/history b/dat/history index 7dcaaca18..9e5979862 100644 --- a/dat/history +++ b/dat/history @@ -223,7 +223,7 @@ for decades, joined the NetHack Development Team in late May 2019. NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug fixes to NetHack 3.6.2. -NetHack 3.6.4 was released on December 17, 2019 containing a security +NetHack 3.6.4 was released on December 18, 2019 containing a security fix and a few bug fixes. The official NetHack web site is maintained by Ken Lorber at diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 7466911c4..47d4f84c1 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "December 17, 2019 +.ds f2 "December 18, 2019 . .\" A note on some special characters: .\" \(lq = left double quote @@ -5158,7 +5158,7 @@ participant for decades, joined the NetHack Development Team in late May 2019. NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug fixes to NetHack 3.6.2. .pg -NetHack 3.6.4 was released on December 17, 2019 containing a security fix +NetHack 3.6.4 was released on December 18, 2019 containing a security fix and a few bug fixes. .pg The official NetHack web site is maintained by \fBKen Lorber\fP diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 8c6214a57..d90873480 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{December 17, 2019} +\date{December 18, 2019} \maketitle @@ -5765,7 +5765,7 @@ fixes to NetHack 3.6.2. %.pg \medskip -NetHack 3.6.4 was released on December 17, 2019 containing a security fix and +NetHack 3.6.4 was released on December 18, 2019 containing a security fix and a few bug fixes. %.pg diff --git a/include/patchlevel.h b/include/patchlevel.h index 01e1c3438..b2188ab09 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -36,13 +36,30 @@ /****************************************************************************/ /* Version 3.6.x */ -/* Patch 4, December 17, 2019 +/* Patch 4, December 18, 2019 + * + * fix potential buffer overflow when parsing run-time configuration file * GDBPATH and GREPPATH from sysconf or -D... on compilation command line were * being processed even if PANICTRACE was disabled but only being freed * at end of game when that was enabled - * fix the article used in the message when your steed encounters a polymorph trap + * fix the article used in the message when your steed encounters a polymorph + * trap + * allow teleporting onto the vibrating square + * message "your knapsack can't accomodate any more items" when picking stuff + * up or removing such from container was inaccurate if there was some + * gold pending; vary the message rather than add more convoluted pickup + * code * dozen-ish assorted spelling/typo fixes in messages and source comments - * fix potential buffer overflow when parsing run-time configuration file + * wizard mode wishing for terrain would leave it unmapped if done while blind + * wizard mode terrain wish could leave hero in water (severe vision limits) + * or in lava (trapped, sinking) which wasn't there any more + * flying hero can go down (via '>') holes or trap doors instead of escaping + * trap + * polymorphed hero hiding on the ceiling can now use '>' to unhide instead of + * being told "you can't go down here" + * fix compilation on platforms that split the ncurses and tinfo libraries + * Windows: allow all game files to be on a portable device via the sysconf + * option 'portable_device_paths' */ /* Patch 3, December 5, 2019 @@ -61,7 +78,7 @@ * Added several grammar corrections * Improved recognition of deafness for several situations including the * playing of musical instruments and bribing negotiations with demon lords - * Fixed ignoring of god's wrath when hero injured himself during altar kick + * Fixed ignoring of god's wrath when hero injured himself during altar kick * Fixed several cases where persistent inventory window was not updated * Fixed temple priests or shopkeepers moving over other monsters * Fixed a crash-causing bug when putting on levitation boots over a sink @@ -74,14 +91,14 @@ * the Windows platform * Improved the layout and display of the player selection dialog used on the * Windows graphical implementation - * Improved performance of some tty versions by reducing the number of + * Improved performance of some tty versions by reducing the number of * function calls made from mapglyph * Allowed the msdos implementation to build with curses and PDCurses * Included over 100 other fixes and improvements as outlined in doc/fixes36.3 */ /* Patch 2, May 7, 2019 - * + * * Over 320 bug fixes including a couple of crash bug fixes as outlined in * doc/fixes36.2 * More than 15 enhancements or improvements From 7348621e41df53b51116f0ed03b2e8fc5b48c56a Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Wed, 18 Dec 2019 04:17:25 -0500 Subject: [PATCH 519/529] This is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt --- doc/Guidebook.txt | 636 +++++++++++++++++++++++----------------------- 1 file changed, 318 insertions(+), 318 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index 86672da0d..4d50ed951 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -15,7 +15,7 @@ Original version - Eric S. Raymond (Edited and expanded for 3.6 by Mike Stephenson and others) - December 17, 2019 + December 18, 2019 @@ -126,7 +126,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -192,7 +192,7 @@ you have seen on the current dungeon level; as you explore more - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -258,7 +258,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -324,7 +324,7 @@ Intelligence affects your ability to cast spells and read - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -456,7 +456,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -588,7 +588,7 @@ symbol at the chosen location, conditionally check for "More - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -720,7 +720,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -786,7 +786,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -852,7 +852,7 @@ once you've closed this menu. The available options are - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -918,7 +918,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -984,7 +984,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1050,7 +1050,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1116,7 +1116,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1248,7 +1248,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1314,7 +1314,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1380,7 +1380,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1446,7 +1446,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1512,7 +1512,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1578,7 +1578,7 @@ When picking a target with cursor and the autodescribe - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1644,7 +1644,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1710,7 +1710,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1776,7 +1776,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1842,7 +1842,7 @@ the `^D' (kick) command. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1908,7 +1908,7 @@ on the corresponding staircase at your destination. However, - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -1974,7 +1974,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2040,7 +2040,7 @@ member a monster but want to try fighting anyway, you can use the - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2106,7 +2106,7 @@ ers (or even former incarnations of yourself!) and their personal - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2172,7 +2172,7 @@ ter. Many commands that operate on objects must ask you to find - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2238,7 +2238,7 @@ In some cases "uncursed" will be omitted as being redundant when - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2304,7 +2304,7 @@ to taking off other worn items. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2370,7 +2370,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2436,7 +2436,7 @@ ondary is just an item in your inventory that's been designated - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2502,7 +2502,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2568,7 +2568,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2634,7 +2634,7 @@ the wall, you might decide to go for broke and break your wand. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2700,7 +2700,7 @@ cation rather than just specify a particular direction. Other - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2766,7 +2766,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2832,7 +2832,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2898,7 +2898,7 @@ brains while polymorphed into a mind flayer, is considered eating - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -2964,7 +2964,7 @@ type ("polypiling") or the form of your own body into another - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3030,7 +3030,7 @@ tion, and are ignored unless a CHOOSE statement was used to - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3096,7 +3096,7 @@ pletion has no effect for the X11 windowport. You can specify - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3162,7 +3162,7 @@ "Configuring User Sounds" section. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3228,7 +3228,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3294,7 +3294,7 @@ tion controls whether the description includes map coordinates. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3360,7 +3360,7 @@ was defined during compilation. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3426,7 +3426,7 @@ display for end-of-game disclosure follows a set sequence. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3492,7 +3492,7 @@ "no", you will exclude that gender from being picked randomly. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3558,7 +3558,7 @@ sistent. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3624,7 +3624,7 @@ fault `\'. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3690,7 +3690,7 @@ Prompt for new form whenever any monster changes shape (default - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3756,7 +3756,7 @@ Valid settings are: - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3822,7 +3822,7 @@ item. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3888,7 +3888,7 @@ (Default `S'). Persistent. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -3954,7 +3954,7 @@ be set with the `O' command. Persistent. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4020,7 +4020,7 @@ off). Persistent. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4086,7 +4086,7 @@ only; "X11" interface always uses a timer based delay. The - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4152,7 +4152,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4218,7 +4218,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4284,7 +4284,7 @@ If NetHack can, it should use this size font for text windows. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4350,7 +4350,7 @@ Number of lines for traditional below-the-map status display. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4416,7 +4416,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4482,7 +4482,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4548,7 +4548,7 @@ pressions. It is possible to compile NetHack without regular - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4614,7 +4614,7 @@ key can be a single character ("x"), a control key ("^X", "C-x"), - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4680,7 +4680,7 @@ When asked for a location, the key to toggle autodescribe. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4746,7 +4746,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4812,7 +4812,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4878,7 +4878,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -4944,7 +4944,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5010,7 +5010,7 @@ cyan, gray, orange, light-green, yellow, light-blue, light- - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5076,7 +5076,7 @@ value changes upwards or downwards. This attribute times - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5142,7 +5142,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5208,7 +5208,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5274,7 +5274,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5340,7 +5340,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5406,7 +5406,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5472,7 +5472,7 @@ may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5538,7 +5538,7 @@ - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5604,7 +5604,7 @@ spectively, to identify unique people for the score file. - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5617,8 +5617,17 @@ MAX_STATUENAME_RANK = Maximum number of score file entries to use for random statue names (default is 10). + ACCESSIBILITY = 0 or 1 to disable or enable, respectively, the + ability for players to set S_pet_override and S_hero_override + symbols in their configuration file. + + PORTABLE_DEVICE_PATHS = 0 or 1 Windows OS only, the game will + look for all of its external files, and write to all of its + output files in one place rather than at the standard loca- + tions. + DUMPLOGFILE = A filename where the end-of-game dumplog is - saved. Not defining this will prevent dumplog from being cre- + saved. Not defining this will prevent dumplog from being cre- ated. Only available if your game is compiled with DUMPLOG. Al- lows the following placeholders: @@ -5634,43 +5643,34 @@ 10. Scoring - NetHack maintains a list of the top scores or scorers on + NetHack maintains a list of the top scores or scorers on your machine, depending on how it is set up. In the latter case, - each account on the machine can post only one non-winning score - on this list. If you score higher than someone else on this - list, or better your previous score, you will be inserted in the - proper place under your current name. How many scores are kept + each account on the machine can post only one non-winning score + on this list. If you score higher than someone else on this + list, or better your previous score, you will be inserted in the + proper place under your current name. How many scores are kept can also be set up when NetHack is compiled. - Your score is chiefly based upon how much experience you + Your score is chiefly based upon how much experience you gained, how much loot you accumulated, how deep you explored, and how the game ended. If you quit the game, you escape with all of - your gold intact. If, however, you get killed in the Mazes of + your gold intact. If, however, you get killed in the Mazes of Menace, the guild will only hear about 90% of your gold when your - corpse is discovered (adventurers have been known to collect - finder's fees). So, consider whether you want to take one last - hit at that monster and possibly live, or quit and stop with - whatever you have. If you quit, you keep all your gold, but if + corpse is discovered (adventurers have been known to collect + finder's fees). So, consider whether you want to take one last + hit at that monster and possibly live, or quit and stop with + whatever you have. If you quit, you keep all your gold, but if you swing and live, you might find more. - If you just want to see what the current top players/games + If you just want to see what the current top players/games list is, you can type nethack -s all on most versions. - 11. Explore mode - - NetHack is an intricate and difficult game. Novices might - falter in fear, aware of their ignorance of the means to survive. - Well, fear not. Your dungeon comes equipped with an "explore" or - "discovery" mode that enables you to keep old save files and - cheat death, at the paltry cost of not getting on the high score - list. - - There are two ways of enabling explore mode. One is to - start the game with the -X command-line switch or with the play- - mode:explore option. The other is to issue the "#exploremode" - NetHack 3.6 December 17, 2019 + + + + NetHack 3.6 December 18, 2019 @@ -5680,63 +5680,63 @@ - extended command while already playing the game. Starting a new + 11. Explore mode + + NetHack is an intricate and difficult game. Novices might + falter in fear, aware of their ignorance of the means to survive. + Well, fear not. Your dungeon comes equipped with an "explore" or + "discovery" mode that enables you to keep old save files and + cheat death, at the paltry cost of not getting on the high score + list. + + There are two ways of enabling explore mode. One is to + start the game with the -X command-line switch or with the play- + mode:explore option. The other is to issue the "#exploremode" + extended command while already playing the game. Starting a new game in explore mode provides your character with a wand of wish- - ing in initial inventory; switching during play does not. The - other benefits of explore mode are left for the trepid reader to + ing in initial inventory; switching during play does not. The + other benefits of explore mode are left for the trepid reader to discover. 11.1. Debug mode Debug mode, also known as wizard mode, is undocumented aside - from this brief description and the various "debug mode only" - commands listed among the command descriptions. It is intended + from this brief description and the various "debug mode only" + commands listed among the command descriptions. It is intended for tracking down problems within the program rather than to pro- - vide god-like powers to your character, and players who attempt - debugging are expected to figure out how to use it themselves. - It is initiated by starting the game with the -D command-line + vide god-like powers to your character, and players who attempt + debugging are expected to figure out how to use it themselves. + It is initiated by starting the game with the -D command-line switch or with the playmode:debug option. - For some systems, the player must be logged in under a par- - ticular user name to be allowed to use debug mode; for others, - the hero must be given a particular character name (but may be - any role; there's no connection between "wizard mode" and the - Wizard role). Attempting to start a game in debug mode when not - allowed or not available will result in falling back to explore + For some systems, the player must be logged in under a par- + ticular user name to be allowed to use debug mode; for others, + the hero must be given a particular character name (but may be + any role; there's no connection between "wizard mode" and the + Wizard role). Attempting to start a game in debug mode when not + allowed or not available will result in falling back to explore mode instead. 12. Credits - The original hack game was modeled on the Berkeley UNIX - rogue game. Large portions of this paper were shamelessly - cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy - and Kenneth C. R. C. Arnold. Small portions were adapted from + The original hack game was modeled on the Berkeley UNIX + rogue game. Large portions of this paper were shamelessly + cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy + and Kenneth C. R. C. Arnold. Small portions were adapted from Further Exploration of the Dungeons of Doom, by Ken Arromdee. NetHack is the product of literally dozens of people's work. - Main events in the course of the game development are described + Main events in the course of the game development are described below: - Jay Fenlason wrote the original Hack, with help from Kenny + Jay Fenlason wrote the original Hack, with help from Kenny Woodland, Mike Thome and Jon Payne. Andries Brouwer did a major re-write, transforming Hack into - a very different game, and published (at least) three versions - (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. - - Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, - producing PC HACK 1.01e, added support for DEC Rainbow graphics - in version 1.03g, and went on to produce at least four more ver- - sions (3.0, 3.2, 3.51, and 3.6). - - R. Black ported PC HACK 3.51 to Lattice C and the Atari - 520/1040ST, producing ST Hack 1.03. - - Mike Stephenson merged these various versions back together, - incorporating many of the added features, and produced NetHack + a very different game, and published (at least) three versions - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5746,7 +5746,19 @@ - 1.4. He then coordinated a cast of thousands in enhancing and + (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. + + Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, + producing PC HACK 1.01e, added support for DEC Rainbow graphics + in version 1.03g, and went on to produce at least four more ver- + sions (3.0, 3.2, 3.51, and 3.6). + + R. Black ported PC HACK 3.51 to Lattice C and the Atari + 520/1040ST, producing ST Hack 1.03. + + Mike Stephenson merged these various versions back together, + incorporating many of the added features, and produced NetHack + 1.4. He then coordinated a cast of thousands in enhancing and debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. Later, Mike coordinated a major rewrite of the game, heading @@ -5754,55 +5766,43 @@ Creps, Eric Hendrickson, Izchak Miller, John Rupley, Mike Threep- oint, and Janet Walz, to produce NetHack 3.0c. - NetHack 3.0 was ported to the Atari by Eric R. Smith, to - OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three + NetHack 3.0 was ported to the Atari by Eric R. Smith, to + OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three of them and Kevin Darcy later joined the main NetHack Development Team to produce subsequent revisions of 3.0. - Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm - Meluch, Stephen Spackman and Pierre Martineau designed overlay - code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the - Macintosh. Along with various other Dungeoneers, they continued - to enhance the PC, Macintosh, and Amiga ports through the later + Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm + Meluch, Stephen Spackman and Pierre Martineau designed overlay + code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the + Macintosh. Along with various other Dungeoneers, they continued + to enhance the PC, Macintosh, and Amiga ports through the later revisions of 3.0. - Headed by Mike Stephenson and coordinated by Izchak Miller - and Janet Walz, the NetHack Development Team which now included - Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, - Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, + Headed by Mike Stephenson and coordinated by Izchak Miller + and Janet Walz, the NetHack Development Team which now included + Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, + Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Eric Raymond, and Eric Smith undertook a radical revision of 3.0. They re-structured the game's design, and re-wrote major parts of - the code. They added multiple dungeons, a new display, special - individual character quests, a new endgame and many other new + the code. They added multiple dungeons, a new display, special + individual character quests, a new endgame and many other new features, and produced NetHack 3.1. - Ken Lorber, Gregg Wonderly and Greg Olson, with help from - Richard Addison, Mike Passaretti, and Olaf Seibert, developed + Ken Lorber, Gregg Wonderly and Greg Olson, with help from + Richard Addison, Mike Passaretti, and Olaf Seibert, developed NetHack 3.1 for the Amiga. - Norm Meluch and Kevin Smolkowski, with help from Carl Sche- + Norm Meluch and Kevin Smolkowski, with help from Carl Sche- lin, Stephen Spackman, Steve VanDevender, and Paul Winner, ported NetHack 3.1 to the PC. Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike - Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny - Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack - 3.1 for the Macintosh, porting it for MPW. Building on their de- - velopment, Bart House added a Think C port. - - Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith port- - ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua - Delahunty, was responsible for the VMS version of NetHack 3.1. - Michael Allison ported NetHack 3.1 to Windows NT. - - Dean Luick, with help from David Cohrs, developed NetHack - 3.1 for X11. Warwick Allison wrote a tiled version of NetHack - for the Atari; he later contributed the tiles to the NetHack De- - velopment Team and tile support was then added to other plat- - forms. + Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny + Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack + 3.1 for the Macintosh, porting it for MPW. Building on their - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5812,63 +5812,63 @@ + development, Bart House added a Think C port. + + Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith port- + ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua + Delahunty, was responsible for the VMS version of NetHack 3.1. + Michael Allison ported NetHack 3.1 to Windows NT. + + Dean Luick, with help from David Cohrs, developed NetHack + 3.1 for X11. Warwick Allison wrote a tiled version of NetHack + for the Atari; he later contributed the tiles to the NetHack De- + velopment Team and tile support was then added to other plat- + forms. + The 3.2 NetHack Development Team, comprised of Michael Alli- son, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Er- - ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released + ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released version 3.2 in April of 1996. Version 3.2 marked the tenth anniversary of the formation of - the development team. In a testament to their dedication to the - game, all thirteen members of the original NetHack Development - Team remained on the team at the start of work on that release. - During the interval between the release of 3.1.3 and 3.2, one of - the founding members of the NetHack Development Team, Dr. Izchak - Miller, was diagnosed with cancer and passed away. That release - of the game was dedicated to him by the development and porting + the development team. In a testament to their dedication to the + game, all thirteen members of the original NetHack Development + Team remained on the team at the start of work on that release. + During the interval between the release of 3.1.3 and 3.2, one of + the founding members of the NetHack Development Team, Dr. Izchak + Miller, was diagnosed with cancer and passed away. That release + of the game was dedicated to him by the development and porting teams. During the lifespan of NetHack 3.1 and 3.2, several enthusi- - asts of the game added their own modifications to the game and + asts of the game added their own modifications to the game and made these "variants" publicly available: - Tom Proudfoot and Yuval Oren created NetHack++, which was - quickly renamed NetHack--. Working independently, Stephen White - wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and + Tom Proudfoot and Yuval Oren created NetHack++, which was + quickly renamed NetHack--. Working independently, Stephen White + wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and his own NetHack-- to produce SLASH. Larry Stewart-Zerba and War- - wick Allison improved the spell casting system with the Wizard - Patch. Warwick Allison also ported NetHack to use the Qt inter- + wick Allison improved the spell casting system with the Wizard + Patch. Warwick Allison also ported NetHack to use the Qt inter- face. - Warren Cheung combined SLASH with the Wizard Patch to pro- - duce Slash'EM, and with the help of Kevin Hugo, added more fea- - tures. Kevin later joined the NetHack Development Team and in- + Warren Cheung combined SLASH with the Wizard Patch to pro- + duce Slash'EM, and with the help of Kevin Hugo, added more fea- + tures. Kevin later joined the NetHack Development Team and in- corporated the best of these ideas in NetHack 3.3. The final update to 3.2 was the bug fix release 3.2.3, which - was released simultaneously with 3.3.0 in December 1999 just in + was released simultaneously with 3.3.0 in December 1999 just in time for the Year 2000. - The 3.3 NetHack Development Team, consisting of Michael Al- - lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, - Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- - ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet - Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 - in August of 2000. - - Version 3.3 offered many firsts. It was the first version to - separate race and profession. The Elf class was removed in pref- - erence to an elf race, and the races of dwarves, gnomes, and orcs - made their first appearance in the game alongside the familiar - human race. Monk and Ranger roles joined Archeologists, Barbar- - ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, - Tourists, Valkyries and of course, Wizards. It was also the - first version to allow you to ride a steed, and was the first - version to have a publicly available web-site listing all the - bugs that had been discovered. Despite that constantly growing + The 3.3 NetHack Development Team, consisting of Michael Al- + lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, + Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- + ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5878,40 +5878,53 @@ - bug list, 3.3 proved stable enough to last for more than a year + Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 + in August of 2000. + + Version 3.3 offered many firsts. It was the first version to + separate race and profession. The Elf class was removed in pref- + erence to an elf race, and the races of dwarves, gnomes, and orcs + made their first appearance in the game alongside the familiar + human race. Monk and Ranger roles joined Archeologists, Barbar- + ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, + Tourists, Valkyries and of course, Wizards. It was also the + first version to allow you to ride a steed, and was the first + version to have a publicly available web-site listing all the + bugs that had been discovered. Despite that constantly growing + bug list, 3.3 proved stable enough to last for more than a year and a half. - The 3.4 NetHack Development Team initially consisted of - Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin - Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet - Walz, and Paul Winner, with Warwick Allison joining just before + The 3.4 NetHack Development Team initially consisted of + Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin + Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet + Walz, and Paul Winner, with Warwick Allison joining just before the release of NetHack 3.4.0 in March 2002. - As with version 3.3, various people contributed to the game + As with version 3.3, various people contributed to the game as a whole as well as supporting ports on the different platforms that NetHack runs on: Pat Rankin maintained 3.4 for VMS. - Michael Allison maintained NetHack 3.4 for the MS-DOS plat- + Michael Allison maintained NetHack 3.4 for the MS-DOS plat- form. Paul Winner and Yitzhak Sapir provided encouragement. - Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- + Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- hanced the Macintosh port of 3.4. - Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, - and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft + Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, + and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft Windows platform. Alex Kompel contributed a new graphical inter- - face for the Windows port. Alex Kompel also contributed a Win- + face for the Windows port. Alex Kompel also contributed a Win- dows CE port for 3.4.1. Ron Van Iwaarden was the sole maintainer of NetHack for OS/2 - the past several releases. Unfortunately Ron's last OS/2 machine - stopped working in early 2006. A great many thanks to Ron for + the past several releases. Unfortunately Ron's last OS/2 machine + stopped working in early 2006. A great many thanks to Ron for keeping NetHack alive on OS/2 all these years. - Janne Salmijarvi and Teemu Suikki maintained and enhanced - the Amiga port of 3.4 after Janne Salmijarvi resurrected it for + Janne Salmijarvi and Teemu Suikki maintained and enhanced + the Amiga port of 3.4 after Janne Salmijarvi resurrected it for 3.3.1. Christian "Marvin" Bressler maintained 3.4 for the Atari af- @@ -5919,22 +5932,9 @@ The release of NetHack 3.4.3 in December 2003 marked the be- ginning of a long release hiatus. 3.4.3 proved to be a remarkably - stable version that provided continued enjoyment by the community - for more than a decade. The NetHack Development Team slowly and - quietly continued to work on the game behind the scenes during - the tenure of 3.4.3. It was during that same period that several - new variants emerged within the NetHack community. Notably - sporkhack by Derek S. Ray, unnethack by Patric Mueller, nitrohack - and its successors originally by Daniel Thaler and then by Alex - Smith, and Dynahack by Tung Nguyen. Some of those variants con- - tinue to be developed, maintained, and enjoyed by the community - to this day. - - In September 2014, an interim snapshot of the code under de- - velopment was released publicly by other parties. Since that code - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 @@ -5944,63 +5944,63 @@ - was a work-in-progress and had not gone through the process of - debugging it as a suitable release, it was decided that the ver- - sion numbers present on that code snapshot would be retired and - never used in an official NetHack release. An announcement was - posted on the NetHack Development Team's official nethack.org - website to that effect, stating that there would never be a + stable version that provided continued enjoyment by the community + for more than a decade. The NetHack Development Team slowly and + quietly continued to work on the game behind the scenes during + the tenure of 3.4.3. It was during that same period that several + new variants emerged within the NetHack community. Notably + sporkhack by Derek S. Ray, unnethack by Patric Mueller, nitrohack + and its successors originally by Daniel Thaler and then by Alex + Smith, and Dynahack by Tung Nguyen. Some of those variants con- + tinue to be developed, maintained, and enjoyed by the community + to this day. + + In September 2014, an interim snapshot of the code under de- + velopment was released publicly by other parties. Since that code + was a work-in-progress and had not gone through the process of + debugging it as a suitable release, it was decided that the ver- + sion numbers present on that code snapshot would be retired and + never used in an official NetHack release. An announcement was + posted on the NetHack Development Team's official nethack.org + website to that effect, stating that there would never be a 3.4.4, 3.5, or 3.5.0 official release version. - In January 2015, preparation began for the release of + In January 2015, preparation began for the release of NetHack 3.6. - At the beginning of development for what would eventually - get released as 3.6.0, the NetHack Development Team consisted of - Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, - Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- - son, Janet Walz, and Paul Winner. In early 2015, ahead of the + At the beginning of development for what would eventually + get released as 3.6.0, the NetHack Development Team consisted of + Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, + Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- + son, Janet Walz, and Paul Winner. In early 2015, ahead of the release of 3.6.0, new members Sean Hunt, Pasi Kallinen, and Derek S. Ray joined the NetHack Development Team. Near the end of the development of 3.6.0, one of the signif- - icant inspirations for many of the humorous and fun features - found in the game, author Terry Pratchett, passed away. NetHack + icant inspirations for many of the humorous and fun features + found in the game, author Terry Pratchett, passed away. NetHack 3.6.0 introduced a tribute to him. 3.6.0 was released in December 2015, and merged work done by - the development team since the release of 3.4.3 with some of the + the development team since the release of 3.4.3 with some of the beloved community patches. Many bugs were fixed and some code was restructured. - The NetHack Development Team, as well as Steve VanDevender + The NetHack Development Team, as well as Steve VanDevender and Kevin Smolkowski, ensured that NetHack 3.6 continued to oper- ate on various UNIX flavors and maintained the X11 interface. - Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- + Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- tained the port of NetHack 3.6 for Mac OSX. - Michael Allison, David Cohrs, Bart House, Pasi Kallinen, - Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- + Michael Allison, David Cohrs, Bart House, Pasi Kallinen, + Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- tained the port of NetHack 3.6 for Microsoft Windows. - Pat Rankin attempted to keep the VMS port running for - NetHack 3.6, hindered by limited access. Kevin Smolkowski has up- - dated 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. - - Ray Chason resurrected the msdos port for 3.6 and contrib- - uted the necessary updates to the community at large. - - In late April 2018, several hundred bug fixes for 3.6.0 and - some new features were assembled and released as NetHack 3.6.1. - The NetHack Development Team at the time of release of 3.6.1 con- - sisted of Warwick Allison, Michael Allison, Ken Arromdee, David - Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, - NetHack 3.6 December 17, 2019 + + NetHack 3.6 December 18, 2019 @@ -6010,21 +6010,35 @@ - Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike + Pat Rankin attempted to keep the VMS port running for + NetHack 3.6, hindered by limited access. Kevin Smolkowski has up- + dated 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. + + Ray Chason resurrected the msdos port for 3.6 and contrib- + uted the necessary updates to the community at large. + + In late April 2018, several hundred bug fixes for 3.6.0 and + some new features were assembled and released as NetHack 3.6.1. + The NetHack Development Team at the time of release of 3.6.1 con- + sisted of Warwick Allison, Michael Allison, Ken Arromdee, David + Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, + Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz, and Paul Winner. In early May 2019, another 320 bug fixes along with some en- - hancements and the adopted curses window port, were released as + hancements and the adopted curses window port, were released as 3.6.2. - Bart House, who had contributed to the game as a porting + Bart House, who had contributed to the game as a porting team participant for decades, joined the NetHack Development Team in late May 2019. - NetHack 3.6.3 was released on December 5, 2019 containing + NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug fixes to NetHack 3.6.2. - NetHack 3.6.4 was released on December 17, 2019 containing a + NetHack 3.6.4 was released on December 18, 2019 containing a security fix and a few bug fixes. The official NetHack web site is maintained by Ken Lorber at @@ -6033,22 +6047,35 @@ 12.1. SPECIAL THANKS On behalf of the NetHack community, thank you very much once - again to M. Drew Streib and Pasi Kallinen for providing a public - NetHack server at nethack.alt.org. Thanks to Keith Simpson and + again to M. Drew Streib and Pasi Kallinen for providing a public + NetHack server at nethack.alt.org. Thanks to Keith Simpson and Andy Thomson for hardfought.org. Thanks to all those unnamed dun- - geoneers who invest their time and effort into annual NetHack - tournaments such as Junethack, The November NetHack Tournament + geoneers who invest their time and effort into annual NetHack + tournaments such as Junethack, The November NetHack Tournament and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list + of the names of the worst of these miscreants in this, the list of Dungeoneers: Adam Aronow J. Ali Harlow Mikko Juola Alex Kompel Janet Walz Nathan Eady + + + + NetHack 3.6 December 18, 2019 + + + + + + NetHack Guidebook 93 + + + Alex Smith Janne Salmijarvi Norm Meluch Andreas Dorn Jean-Christophe Collet Olaf Seibert Andy Church Jeff Bailey Pasi Kallinen @@ -6063,19 +6090,6 @@ Bruce Holloway Karl Garrison Richard P. Hughey Bruce Mewborne Keizo Yamamoto Rob Menke Carl Schelin Keith Simpson Robin Bandy - - - - NetHack 3.6 December 17, 2019 - - - - - - NetHack Guidebook 93 - - - Chris Russo Ken Arnold Robin Johnson David Cohrs Ken Arromdee Roderick Schertler David Damerell Ken Lorber Roland McGrath @@ -6103,7 +6117,7 @@ Irina Rempt-Drijfhout Mike Passaretti Izchak Miller Mike Stephenson - Brand and product names are trademarks or registered trade- + Brand and product names are trademarks or registered trade- marks of their respective holders. @@ -6118,21 +6132,7 @@ - - - - - - - - - - - - - - - NetHack 3.6 December 17, 2019 + NetHack 3.6 December 18, 2019 From d6189cb43aa94663acb6d3d2c1a278e395a023a8 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Wed, 18 Dec 2019 08:17:31 -0500 Subject: [PATCH 520/529] This is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt --- doc/Guidebook.txt | 789 +++++++++++++++++++++++----------------------- 1 file changed, 387 insertions(+), 402 deletions(-) diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index e6d62d1d3..9abbba24b 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -126,7 +126,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -192,7 +192,7 @@ you have seen on the current dungeon level; as you explore more - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -258,7 +258,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -324,7 +324,7 @@ Intelligence affects your ability to cast spells and read - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -390,7 +390,7 @@ ical attacks. Many dungeons show only your experience level - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -456,7 +456,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -522,7 +522,7 @@ nasty and vicious. Sometimes, however, they can be helpful. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -588,7 +588,7 @@ symbol at the chosen location, conditionally check for "More - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -654,7 +654,7 @@ if you remember a monster there). - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -720,7 +720,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -786,7 +786,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -852,7 +852,7 @@ once you've closed this menu. The available options are - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -918,7 +918,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -984,7 +984,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1050,7 +1050,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1116,7 +1116,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1182,7 +1182,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1248,7 +1248,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1314,7 +1314,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1380,7 +1380,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1446,7 +1446,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1512,7 +1512,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1578,7 +1578,7 @@ When picking a target with cursor and the autodescribe - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1644,7 +1644,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1710,7 +1710,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1776,7 +1776,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1842,7 +1842,7 @@ the `^D' (kick) command. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1908,7 +1908,7 @@ on the corresponding staircase at your destination. However, - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -1974,7 +1974,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2040,7 +2040,7 @@ member a monster but want to try fighting anyway, you can use the - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2106,7 +2106,7 @@ ers (or even former incarnations of yourself!) and their personal - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2172,7 +2172,7 @@ ter. Many commands that operate on objects must ask you to find - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2238,7 +2238,7 @@ In some cases "uncursed" will be omitted as being redundant when - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2304,7 +2304,7 @@ to taking off other worn items. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2370,7 +2370,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2436,7 +2436,7 @@ ondary is just an item in your inventory that's been designated - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2502,7 +2502,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2568,7 +2568,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2634,7 +2634,7 @@ the wall, you might decide to go for broke and break your wand. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2700,7 +2700,7 @@ cation rather than just specify a particular direction. Other - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2766,7 +2766,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2832,7 +2832,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2898,7 +2898,7 @@ brains while polymorphed into a mind flayer, is considered eating - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -2964,7 +2964,7 @@ type ("polypiling") or the form of your own body into another - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3030,7 +3030,7 @@ tion, and are ignored unless a CHOOSE statement was used to - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3096,7 +3096,7 @@ pletion has no effect for the X11 windowport. You can specify - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3162,7 +3162,7 @@ "Configuring User Sounds" section. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3228,7 +3228,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3294,7 +3294,7 @@ tion controls whether the description includes map coordinates. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3360,7 +3360,7 @@ was defined during compilation. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3426,7 +3426,7 @@ display for end-of-game disclosure follows a set sequence. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3492,7 +3492,7 @@ "no", you will exclude that gender from being picked randomly. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3558,7 +3558,7 @@ sistent. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3624,7 +3624,7 @@ fault `\'. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3690,7 +3690,7 @@ Prompt for new form whenever any monster changes shape (default - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3756,7 +3756,7 @@ Valid settings are: - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3822,7 +3822,7 @@ item. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3888,7 +3888,7 @@ (Default `S'). Persistent. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -3954,7 +3954,7 @@ be set with the `O' command. Persistent. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4020,7 +4020,7 @@ off). Persistent. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4086,7 +4086,7 @@ only; "X11" interface always uses a timer based delay. The - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4152,7 +4152,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4218,7 +4218,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4284,7 +4284,7 @@ If NetHack can, it should use this size font for text windows. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4350,7 +4350,7 @@ Number of lines for traditional below-the-map status display. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4416,7 +4416,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4482,7 +4482,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4548,7 +4548,7 @@ terns. This applies to Autopickup exceptions, Message types, Menu - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4614,7 +4614,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4680,7 +4680,7 @@ When asked for a location, the key to go to next closest - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4746,7 +4746,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4812,7 +4812,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4878,7 +4878,7 @@ tty, curses, win32tty and win32gui interfaces support this. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -4944,7 +4944,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5010,7 +5010,7 @@ be used in combination with any of the other attributes. - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5076,7 +5076,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5142,7 +5142,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5208,7 +5208,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5274,7 +5274,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5340,7 +5340,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5406,7 +5406,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5472,7 +5472,7 @@ may want to alter settings via SYMBOLS= and ROGUESYMBOLS= in your - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5538,7 +5538,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5604,7 +5604,7 @@ - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5634,17 +5634,17 @@ MAX_STATUENAME_RANK = Maximum number of score file entries to use for random statue names (default is 10). - ACCESSIBILITY = 0 or 1 to disable or enable, respectively, the - ability for players to set S_pet_override and S_hero_override + ACCESSIBILITY = 0 or 1 to disable or enable, respectively, the + ability for players to set S_pet_override and S_hero_override symbols in their configuration file. - PORTABLE_DEVICE_PATHS = 0 or 1 Windows OS only, the game will - look for all of its external files, and write to all of its - output files in one place rather than at the standard loca- + PORTABLE_DEVICE_PATHS = 0 or 1 Windows OS only, the game will + look for all of its external files, and write to all of its + output files in one place rather than at the standard loca- tions. DUMPLOGFILE = A filename where the end-of-game dumplog is - saved. Not defining this will prevent dumplog from being cre- + saved. Not defining this will prevent dumplog from being cre- ated. Only available if your game is compiled with DUMPLOG. Al- lows the following placeholders: @@ -5660,26 +5660,17 @@ 10. Scoring - NetHack maintains a list of the top scores or scorers on + NetHack maintains a list of the top scores or scorers on your machine, depending on how it is set up. In the latter case, - each account on the machine can post only one non-winning score - on this list. If you score higher than someone else on this - list, or better your previous score, you will be inserted in the - proper place under your current name. How many scores are kept + each account on the machine can post only one non-winning score + on this list. If you score higher than someone else on this + list, or better your previous score, you will be inserted in the + proper place under your current name. How many scores are kept can also be set up when NetHack is compiled. - Your score is chiefly based upon how much experience you - gained, how much loot you accumulated, how deep you explored, and - how the game ended. If you quit the game, you escape with all of - your gold intact. If, however, you get killed in the Mazes of - Menace, the guild will only hear about 90% of your gold when your - corpse is discovered (adventurers have been known to collect - finder's fees). So, consider whether you want to take one last - hit at that monster and possibly live, or quit and stop with - whatever you have. If you quit, you keep all your gold, but if - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5689,104 +5680,102 @@ + Your score is chiefly based upon how much experience you + gained, how much loot you accumulated, how deep you explored, and + how the game ended. If you quit the game, you escape with all of + your gold intact. If, however, you get killed in the Mazes of + Menace, the guild will only hear about 90% of your gold when your + corpse is discovered (adventurers have been known to collect + finder's fees). So, consider whether you want to take one last + hit at that monster and possibly live, or quit and stop with + whatever you have. If you quit, you keep all your gold, but if you swing and live, you might find more. - If you just want to see what the current top players/games + If you just want to see what the current top players/games list is, you can type nethack -s all on most versions. - - NetHack is an intricate and difficult game. Novices might - "discovery" mode that enables you to keep old save files and - cheat death, at the paltry cost of not getting on the high score - - There are two ways of enabling explore mode. One is to - start the game with the -X command-line switch or with the play- - mode:explore option. The other is to issue the "#exploremode" - NetHack 3.6 December 18, 2019 11. Explore mode - NetHack is an intricate and difficult game. Novices might + NetHack is an intricate and difficult game. Novices might falter in fear, aware of their ignorance of the means to survive. Well, fear not. Your dungeon comes equipped with an "explore" or - "discovery" mode that enables you to keep old save files and - cheat death, at the paltry cost of not getting on the high score + "discovery" mode that enables you to keep old save files and + cheat death, at the paltry cost of not getting on the high score list. - There are two ways of enabling explore mode. One is to - start the game with the -X command-line switch or with the play- - mode:explore option. The other is to issue the "#exploremode" - extended command while already playing the game. Starting a new + There are two ways of enabling explore mode. One is to + start the game with the -X command-line switch or with the play- + mode:explore option. The other is to issue the "#exploremode" + extended command while already playing the game. Starting a new game in explore mode provides your character with a wand of wish- - ing in initial inventory; switching during play does not. The - other benefits of explore mode are left for the trepid reader to + ing in initial inventory; switching during play does not. The + other benefits of explore mode are left for the trepid reader to discover. 11.1. Debug mode Debug mode, also known as wizard mode, is undocumented aside - from this brief description and the various "debug mode only" - commands listed among the command descriptions. It is intended + from this brief description and the various "debug mode only" + commands listed among the command descriptions. It is intended for tracking down problems within the program rather than to pro- - vide god-like powers to your character, and players who attempt - debugging are expected to figure out how to use it themselves. - It is initiated by starting the game with the -D command-line + vide god-like powers to your character, and players who attempt + debugging are expected to figure out how to use it themselves. + It is initiated by starting the game with the -D command-line switch or with the playmode:debug option. - For some systems, the player must be logged in under a par- - ticular user name to be allowed to use debug mode; for others, - the hero must be given a particular character name (but may be - any role; there's no connection between "wizard mode" and the - Wizard role). Attempting to start a game in debug mode when not - allowed or not available will result in falling back to explore + For some systems, the player must be logged in under a par- + ticular user name to be allowed to use debug mode; for others, + the hero must be given a particular character name (but may be + any role; there's no connection between "wizard mode" and the + Wizard role). Attempting to start a game in debug mode when not + allowed or not available will result in falling back to explore mode instead. + + + + + + NetHack 3.7 December 18, 2019 + + + + + + NetHack Guidebook 88 + + + 12. Credits - The original hack game was modeled on the Berkeley UNIX - rogue game. Large portions of this paper were shamelessly - cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy - and Kenneth C. R. C. Arnold. Small portions were adapted from + The original hack game was modeled on the Berkeley UNIX + rogue game. Large portions of this paper were shamelessly + cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy + and Kenneth C. R. C. Arnold. Small portions were adapted from Further Exploration of the Dungeons of Doom, by Ken Arromdee. NetHack is the product of literally dozens of people's work. - Main events in the course of the game development are described + Main events in the course of the game development are described below: - - - NetHack 3.7 December 17, 2019 - - - - - - NetHack Guidebook 88 - - - - Jay Fenlason wrote the original Hack, with help from Kenny + Jay Fenlason wrote the original Hack, with help from Kenny Woodland, Mike Thome and Jon Payne. Andries Brouwer did a major re-write, transforming Hack into - a very different game, and published (at least) three versions + a very different game, and published (at least) three versions + (1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet. - Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, - producing PC HACK 1.01e, added support for DEC Rainbow graphics - in version 1.03g, and went on to produce at least four more ver- - - R. Black ported PC HACK 3.51 to Lattice C and the Atari - - incorporating many of the added features, and produced NetHack - NetHack Guidebook 88 - Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, - producing PC HACK 1.01e, added support for DEC Rainbow graphics - in version 1.03g, and went on to produce at least four more ver- + Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS, + producing PC HACK 1.01e, added support for DEC Rainbow graphics + in version 1.03g, and went on to produce at least four more ver- sions (3.0, 3.2, 3.51, and 3.6). - R. Black ported PC HACK 3.51 to Lattice C and the Atari + + R. Black ported PC HACK 3.51 to Lattice C and the Atari 520/1040ST, producing ST Hack 1.03. + Mike Stephenson merged these various versions back together, - incorporating many of the added features, and produced NetHack - 1.4. He then coordinated a cast of thousands in enhancing and + incorporating many of the added features, and produced NetHack + 1.4. He then coordinated a cast of thousands in enhancing and debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3. Later, Mike coordinated a major rewrite of the game, heading @@ -5794,190 +5783,158 @@ Creps, Eric Hendrickson, Izchak Miller, John Rupley, Mike Threep- oint, and Janet Walz, to produce NetHack 3.0c. - NetHack 3.0 was ported to the Atari by Eric R. Smith, to - OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three + NetHack 3.0 was ported to the Atari by Eric R. Smith, to + OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three of them and Kevin Darcy later joined the main NetHack Development Team to produce subsequent revisions of 3.0. - Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm - Meluch, Stephen Spackman and Pierre Martineau designed overlay - code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the - Macintosh. Along with various other Dungeoneers, they continued - to enhance the PC, Macintosh, and Amiga ports through the later + Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm + Meluch, Stephen Spackman and Pierre Martineau designed overlay + code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the + Macintosh. Along with various other Dungeoneers, they continued + to enhance the PC, Macintosh, and Amiga ports through the later revisions of 3.0. - Headed by Mike Stephenson and coordinated by Izchak Miller - and Janet Walz, the NetHack Development Team which now included - Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, - Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, + Headed by Mike Stephenson and coordinated by Izchak Miller + and Janet Walz, the NetHack Development Team which now included + Ken Arromdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, + Matt Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Eric Raymond, and Eric Smith undertook a radical revision of 3.0. + + + NetHack 3.7 December 18, 2019 + + + + + + NetHack Guidebook 89 + + + They re-structured the game's design, and re-wrote major parts of - the code. They added multiple dungeons, a new display, special - individual character quests, a new endgame and many other new + the code. They added multiple dungeons, a new display, special + individual character quests, a new endgame and many other new features, and produced NetHack 3.1. - Ken Lorber, Gregg Wonderly and Greg Olson, with help from - Richard Addison, Mike Passaretti, and Olaf Seibert, developed + Ken Lorber, Gregg Wonderly and Greg Olson, with help from + Richard Addison, Mike Passaretti, and Olaf Seibert, developed NetHack 3.1 for the Amiga. - Norm Meluch and Kevin Smolkowski, with help from Carl Sche- + Norm Meluch and Kevin Smolkowski, with help from Carl Sche- lin, Stephen Spackman, Steve VanDevender, and Paul Winner, ported NetHack 3.1 to the PC. - - NetHack 3.7 December 17, 2019 - - - - - - NetHack Guidebook 89 - - - Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike - Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny - Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack - 3.1 for the Macintosh, porting it for MPW. Building on their + Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny + Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack + 3.1 for the Macintosh, porting it for MPW. Building on their de- + velopment, Bart House added a Think C port. - ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua - Delahunty, was responsible for the VMS version of NetHack 3.1. - - Dean Luick, with help from David Cohrs, developed NetHack - 3.1 for X11. Warwick Allison wrote a tiled version of NetHack - for the Atari; he later contributed the tiles to the NetHack De- - velopment Team and tile support was then added to other plat- - - NetHack Guidebook 89 - development, Bart House added a Think C port. Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith port- - ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua - Delahunty, was responsible for the VMS version of NetHack 3.1. + ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua + Delahunty, was responsible for the VMS version of NetHack 3.1. Michael Allison ported NetHack 3.1 to Windows NT. - Dean Luick, with help from David Cohrs, developed NetHack - 3.1 for X11. Warwick Allison wrote a tiled version of NetHack - for the Atari; he later contributed the tiles to the NetHack De- - velopment Team and tile support was then added to other plat- + Dean Luick, with help from David Cohrs, developed NetHack + 3.1 for X11. Warwick Allison wrote a tiled version of NetHack + for the Atari; he later contributed the tiles to the NetHack De- + velopment Team and tile support was then added to other plat- forms. + The 3.2 NetHack Development Team, comprised of Michael Alli- son, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Er- - ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released + ic Smith, Mike Stephenson, Janet Walz, and Paul Winner, released version 3.2 in April of 1996. Version 3.2 marked the tenth anniversary of the formation of - the development team. In a testament to their dedication to the - game, all thirteen members of the original NetHack Development - Team remained on the team at the start of work on that release. - During the interval between the release of 3.1.3 and 3.2, one of - the founding members of the NetHack Development Team, Dr. Izchak - Miller, was diagnosed with cancer and passed away. That release - of the game was dedicated to him by the development and porting + the development team. In a testament to their dedication to the + game, all thirteen members of the original NetHack Development + Team remained on the team at the start of work on that release. + During the interval between the release of 3.1.3 and 3.2, one of + the founding members of the NetHack Development Team, Dr. Izchak + Miller, was diagnosed with cancer and passed away. That release + of the game was dedicated to him by the development and porting teams. During the lifespan of NetHack 3.1 and 3.2, several enthusi- - asts of the game added their own modifications to the game and + asts of the game added their own modifications to the game and made these "variants" publicly available: - Tom Proudfoot and Yuval Oren created NetHack++, which was - quickly renamed NetHack--. Working independently, Stephen White - wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and - his own NetHack-- to produce SLASH. Larry Stewart-Zerba and War- - wick Allison improved the spell casting system with the Wizard - Patch. Warwick Allison also ported NetHack to use the Qt inter- + Tom Proudfoot and Yuval Oren created NetHack++, which was + quickly renamed NetHack--. Working independently, Stephen White + wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and + his own NetHack-- to produce SLASH. Larry Stewart-Zerba and + + + NetHack 3.7 December 18, 2019 + + + + + + NetHack Guidebook 90 + + + + Warwick Allison improved the spell casting system with the Wizard + Patch. Warwick Allison also ported NetHack to use the Qt inter- face. - Warren Cheung combined SLASH with the Wizard Patch to pro- - duce Slash'EM, and with the help of Kevin Hugo, added more fea- - tures. Kevin later joined the NetHack Development Team and in- + Warren Cheung combined SLASH with the Wizard Patch to pro- + duce Slash'EM, and with the help of Kevin Hugo, added more fea- + tures. Kevin later joined the NetHack Development Team and in- corporated the best of these ideas in NetHack 3.3. The final update to 3.2 was the bug fix release 3.2.3, which - was released simultaneously with 3.3.0 in December 1999 just in + was released simultaneously with 3.3.0 in December 1999 just in time for the Year 2000. - - - NetHack 3.7 December 17, 2019 - - - - - - NetHack Guidebook 90 - - - - The 3.3 NetHack Development Team, consisting of Michael Al- - lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, - Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- - ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet - - - NetHack 3.6 December 18, 2019 - - - - - - NetHack Guidebook 90 - - - - Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 + The 3.3 NetHack Development Team, consisting of Michael Al- + lison, Ken Arromdee, David Cohrs, Jessie Collet, Steve Creps, + Kevin Darcy, Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lor- + ber, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet + Walz, and Paul Winner, released 3.3.0 in December 1999 and 3.3.1 in August of 2000. Version 3.3 offered many firsts. It was the first version to - separate race and profession. The Elf class was removed in pref- + separate race and profession. The Elf class was removed in pref- erence to an elf race, and the races of dwarves, gnomes, and orcs - made their first appearance in the game alongside the familiar - human race. Monk and Ranger roles joined Archeologists, Barbar- - ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, - Tourists, Valkyries and of course, Wizards. It was also the - first version to allow you to ride a steed, and was the first - version to have a publicly available web-site listing all the - bugs that had been discovered. Despite that constantly growing - bug list, 3.3 proved stable enough to last for more than a year + made their first appearance in the game alongside the familiar + human race. Monk and Ranger roles joined Archeologists, Barbar- + ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai, + Tourists, Valkyries and of course, Wizards. It was also the + first version to allow you to ride a steed, and was the first + version to have a publicly available web-site listing all the + bugs that had been discovered. Despite that constantly growing + bug list, 3.3 proved stable enough to last for more than a year and a half. - The 3.4 NetHack Development Team initially consisted of - Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin - Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet - Walz, and Paul Winner, with Warwick Allison joining just before + The 3.4 NetHack Development Team initially consisted of + Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin + Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet + Walz, and Paul Winner, with Warwick Allison joining just before the release of NetHack 3.4.0 in March 2002. - As with version 3.3, various people contributed to the game + As with version 3.3, various people contributed to the game as a whole as well as supporting ports on the different platforms that NetHack runs on: Pat Rankin maintained 3.4 for VMS. - Michael Allison maintained NetHack 3.4 for the MS-DOS plat- + Michael Allison maintained NetHack 3.4 for the MS-DOS plat- form. Paul Winner and Yitzhak Sapir provided encouragement. - Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- + Dean Luick, Mark Modrall, and Kevin Hugo maintained and en- hanced the Macintosh port of 3.4. - Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, - and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft - Windows platform. Alex Kompel contributed a new graphical inter- - face for the Windows port. Alex Kompel also contributed a Win- - dows CE port for 3.4.1. - - Ron Van Iwaarden was the sole maintainer of NetHack for OS/2 - the past several releases. Unfortunately Ron's last OS/2 machine - stopped working in early 2006. A great many thanks to Ron for - keeping NetHack alive on OS/2 all these years. - - Janne Salmijarvi and Teemu Suikki maintained and enhanced - the Amiga port of 3.4 after Janne Salmijarvi resurrected it for - 3.3.1. + Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, + and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft + Windows platform. Alex Kompel contributed a new graphical - - - NetHack 3.7 December 17, 2019 + NetHack 3.7 December 18, 2019 @@ -5987,127 +5944,114 @@ + interface for the Windows port. Alex Kompel also contributed a + Windows CE port for 3.4.1. + + Ron Van Iwaarden was the sole maintainer of NetHack for OS/2 + the past several releases. Unfortunately Ron's last OS/2 machine + stopped working in early 2006. A great many thanks to Ron for + keeping NetHack alive on OS/2 all these years. + + Janne Salmijarvi and Teemu Suikki maintained and enhanced + the Amiga port of 3.4 after Janne Salmijarvi resurrected it for + 3.3.1. + Christian "Marvin" Bressler maintained 3.4 for the Atari af- ter he resurrected it for 3.3.1. The release of NetHack 3.4.3 in December 2003 marked the be- ginning of a long release hiatus. 3.4.3 proved to be a remarkably - - - NetHack 3.6 December 18, 2019 - - - - - - NetHack Guidebook 91 - - - stable version that provided continued enjoyment by the community - for more than a decade. The NetHack Development Team 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 + for more than a decade. The NetHack Development Team slowly and + quietly continued to work on the game behind the scenes during + the tenure of 3.4.3. It was during that same period that several new variants emerged within the NetHack community. Notably sporkhack by Derek S. Ray, unnethack by Patric Mueller, nitrohack - and its successors originally by Daniel Thaler and then by Alex - Smith, and Dynahack by Tung Nguyen. Some of those variants con- - tinue to be developed, maintained, and enjoyed by the community + and its successors originally by Daniel Thaler and then by Alex + Smith, and Dynahack by Tung Nguyen. Some of those variants con- + tinue to be developed, maintained, and enjoyed by the community to this day. In September 2014, an interim snapshot of the code under de- velopment was released publicly by other parties. Since that code - was a work-in-progress and had not gone through the process of - debugging it as a suitable release, it was decided that the ver- - sion numbers present on that code snapshot would be retired and - never used in an official NetHack release. An announcement was - posted on the NetHack Development Team's official nethack.org - website to that effect, stating that there would never be a + was a work-in-progress and had not gone through the process of + debugging it as a suitable release, it was decided that the ver- + sion numbers present on that code snapshot would be retired and + never used in an official NetHack release. An announcement was + posted on the NetHack Development Team's official nethack.org + website to that effect, stating that there would never be a 3.4.4, 3.5, or 3.5.0 official release version. - In January 2015, preparation began for the release of + In January 2015, preparation began for the release of NetHack 3.6. - At the beginning of development for what would eventually - get released as 3.6.0, the NetHack Development Team consisted of - Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, - Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- - son, Janet Walz, and Paul Winner. In early 2015, ahead of the + At the beginning of development for what would eventually + get released as 3.6.0, the NetHack Development Team consisted of + Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, + Jessie Collet, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephen- + son, Janet Walz, and Paul Winner. In early 2015, ahead of the release of 3.6.0, new members Sean Hunt, Pasi Kallinen, and Derek S. Ray joined the NetHack Development Team. Near the end of the development of 3.6.0, one of the signif- - icant inspirations for many of the humorous and fun features - found in the game, author Terry Pratchett, passed away. NetHack + icant inspirations for many of the humorous and fun features + found in the game, author Terry Pratchett, passed away. NetHack 3.6.0 introduced a tribute to him. + + + NetHack 3.7 December 18, 2019 + + + + + + NetHack Guidebook 92 + + + 3.6.0 was released in December 2015, and merged work done by - the development team since the release of 3.4.3 with some of the + the development team since the release of 3.4.3 with some of the beloved community patches. Many bugs were fixed and some code was restructured. - The NetHack Development Team, as well as Steve VanDevender + The NetHack Development Team, as well as Steve VanDevender and Kevin Smolkowski, ensured that NetHack 3.6 continued to oper- ate on various UNIX flavors and maintained the X11 interface. - Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- + Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick main- tained the port of NetHack 3.6 for Mac OSX. - - - NetHack 3.7 December 17, 2019 - - - - - - NetHack Guidebook 92 - - - - Michael Allison, David Cohrs, Bart House, Pasi Kallinen, - Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- + Michael Allison, David Cohrs, Bart House, Pasi Kallinen, + Alex Kompel, Dion Nicolaas, Derek S. Ray and Yitzhak Sapir main- tained the port of NetHack 3.6 for Microsoft Windows. - - - - NetHack 3.6 December 18, 2019 - - - - - - NetHack Guidebook 92 - - - - Pat Rankin attempted to keep the VMS port running for + Pat Rankin attempted to keep the VMS port running for NetHack 3.6, hindered by limited access. Kevin Smolkowski has up- - dated and tested it for the most recent version of OpenVMS (V8.4 + dated 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. - Ray Chason resurrected the msdos port for 3.6 and contrib- + Ray Chason resurrected the msdos port for 3.6 and contrib- uted the necessary updates to the community at large. - In late April 2018, several hundred bug fixes for 3.6.0 and - some new features were assembled and released as NetHack 3.6.1. + In late April 2018, several hundred bug fixes for 3.6.0 and + some new features were assembled and released as NetHack 3.6.1. The NetHack Development Team at the time of release of 3.6.1 con- - sisted of Warwick Allison, Michael Allison, Ken Arromdee, David - Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, - Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike + sisted of Warwick Allison, Michael Allison, Ken Arromdee, David + Cohrs, Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, + Patric Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz, and Paul Winner. In early May 2019, another 320 bug fixes along with some en- - hancements and the adopted curses window port, were released as + hancements and the adopted curses window port, were released as 3.6.2. - Bart House, who had contributed to the game as a porting + Bart House, who had contributed to the game as a porting team participant for decades, joined the NetHack Development Team in late May 2019. - NetHack 3.6.3 was released on December 5, 2019 containing + NetHack 3.6.3 was released on December 5, 2019 containing over 190 bug fixes to NetHack 3.6.2. NetHack 3.6.4 was released on December 18, 2019 containing a @@ -6119,47 +6063,34 @@ 12.1. SPECIAL THANKS On behalf of the NetHack community, thank you very much once - again to M. Drew Streib and Pasi Kallinen for providing a public - NetHack server at nethack.alt.org. Thanks to Keith Simpson and + again to M. Drew Streib and Pasi Kallinen for providing a public + + + NetHack 3.7 December 18, 2019 + + + + + + NetHack Guidebook 93 + + + + NetHack server at nethack.alt.org. Thanks to Keith Simpson and Andy Thomson for hardfought.org. Thanks to all those unnamed dun- - geoneers who invest their time and effort into annual NetHack - tournaments such as Junethack, The November NetHack Tournament + geoneers who invest their time and effort into annual NetHack + tournaments such as Junethack, The November NetHack Tournament and in days past, devnull.net (gone for now, but not forgotten). - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list - - - NetHack 3.7 December 17, 2019 - - - - - - NetHack Guidebook 93 - - - + of the names of the worst of these miscreants in this, the list of Dungeoneers: Adam Aronow J. Ali Harlow Mikko Juola Alex Kompel Janet Walz Nathan Eady - - - - NetHack 3.6 December 18, 2019 - - - - - - NetHack Guidebook 93 - - - Alex Smith Janne Salmijarvi Norm Meluch Andreas Dorn Jean-Christophe Collet Olaf Seibert Andy Church Jeff Bailey Pasi Kallinen @@ -6198,10 +6129,23 @@ Gregg Wonderly Michael Sokolov Warren Cheung Hao-yang Wang Mike Engber Warwick Allison Helge Hafting Mike Gallop Yitzhak Sapir + + + + NetHack 3.7 December 18, 2019 + + + + + + NetHack Guidebook 94 + + + Irina Rempt-Drijfhout Mike Passaretti Izchak Miller Mike Stephenson - Brand and product names are trademarks or registered trade- + Brand and product names are trademarks or registered trade- marks of their respective holders. @@ -6213,7 +6157,48 @@ - NetHack 3.7 December 17, 2019 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NetHack 3.7 December 18, 2019 From 8cbed3877d17e8fcad15050721db4593db27c4da Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 18 Dec 2019 10:01:54 -0500 Subject: [PATCH 521/529] README bit --- README | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README b/README index ae5eab50f..92214e246 100644 --- a/README +++ b/README @@ -5,9 +5,10 @@ which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.4 as there was no NetHack 3.5 release. NetHack 3.6.4 is the official release of NetHack that follows NetHack 3.6.3 -and contains all bug fixes since then, including one security-related -fix for a vulnerability potentially impacting 3.6.0, 3.6.1, 3.6.2, and 3.6.3. -The file doc/fixes36.4 in the source distribution has a full list of them. The +and contains all bug fixes since 3.6.3, including one security-related fix for +a vulnerability that affects NetHack versions 3.6.0, 3.6.1, 3.6.2, and 3.6.3. + +The file doc/fixes36.4 in the source distribution has a full list of fixes. The text in there was written for the development team's own use and is provided "as is", so please do not ask us to further explain the entries in that file. Some entries might be considered "spoilers", particularly in the "new features" From cf9e92677a18d1bc66c040068b2e666c651c7522 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 18 Dec 2019 15:29:40 -0500 Subject: [PATCH 522/529] update version --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e2522cfa9..38bdbc8dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -113,6 +113,6 @@ deploy: on: tags: true prerelease: true - name: "Pre-release build of NetHack 3.6.3" - body: "This is an auto generated pre-release build of NetHack 3.6.3." + name: "Release build of NetHack 3.6.4" + body: "This is an auto generated Release build of NetHack 3.6.4." From cbfa58fe25c59148e3df23dea616ca7eb298ef87 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 18 Dec 2019 16:46:30 -0500 Subject: [PATCH 523/529] post-release --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/global.h b/include/global.h index a2b70d258..5c02491c3 100644 --- a/include/global.h +++ b/include/global.h @@ -19,7 +19,7 @@ /* * Development status of this NetHack version. */ -#define NH_DEVEL_STATUS NH_STATUS_RELEASED +#define NH_DEVEL_STATUS NH_STATUS_POSTRELEASE #ifndef DEBUG /* allow tool chains to define without causing warnings */ #define DEBUG From 843bb5cfc9d542e75d2bd50f67945b0a2ab4ca7d Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 18 Dec 2019 16:49:55 -0500 Subject: [PATCH 524/529] landing spot for post-3.6.4 patches if needed This is a landing spot. --- doc/fixes36.5 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 doc/fixes36.5 diff --git a/doc/fixes36.5 b/doc/fixes36.5 new file mode 100644 index 000000000..d3e45ff39 --- /dev/null +++ b/doc/fixes36.5 @@ -0,0 +1,30 @@ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.0 $ $NHDT-Date: 1576705788 2019/12/18 21:49:48 $ + +This fixes36.5 file is here to capture information about updates in the 3.6.x +lineage following the release of 3.6.4 in December 2019. Please note, however, +that another 3.6.x release is not anticipated, and most developer +focus will shift to the next major release. + +General Fixes and Modified Features +----------------------------------- + + +Fixes to Post-3.6.4 Problems that Were Exposed Via git Repository +------------------------------------------------------------------ + + +Platform- and/or Interface-Specific Fixes or Features +----------------------------------------------------- + + +General New Features +-------------------- + + +NetHack Community Patches (or Variation) Included +------------------------------------------------- + + +Code Cleanup and Reorganization +------------------------------- + From 27b4df6b185ede0e95e95b6795f38b3064cc9303 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 18 Dec 2019 17:23:17 -0500 Subject: [PATCH 525/529] .travis.yml update post-3.6.4 --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 38bdbc8dd..31b52c922 100644 --- a/.travis.yml +++ b/.travis.yml @@ -113,6 +113,5 @@ deploy: on: tags: true prerelease: true - name: "Release build of NetHack 3.6.4" - body: "This is an auto generated Release build of NetHack 3.6.4." - + name: "Pre-Release build of NetHack 3.6" + body: "This is an auto generated Pre-Release build of NetHack 3.6" From c122985a5122ecac2a0d67771131dd95d796d34c Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 18 Dec 2019 17:24:40 -0500 Subject: [PATCH 526/529] .travis.yml update --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8bc277977..cc707bb88 100644 --- a/.travis.yml +++ b/.travis.yml @@ -122,5 +122,5 @@ deploy: on: tags: true prerelease: true - name: "Pre-Release build of NetHack 3.6" - body: "This is an auto generated Pre-Release build of NetHack 3.6" + name: "Pre-Release build of NetHack 3.7.0" + body: "This is an auto generated Pre-Release build of NetHack 3.7.0" From 82cda4fb0db87a81ed8634218d4c308a549ca171 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 19 Dec 2019 15:40:53 -0500 Subject: [PATCH 527/529] fix file name in README --- README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index 8115122d0..25bb89638 100644 --- a/README +++ b/README @@ -7,7 +7,8 @@ NetHack 3.6. NetHack 3.7.0 work-in-progress is not a release of NetHack. As a .0 version, and still very early in its development cycle, there has already been changes made, and there will continue to be many more prior to an eventual release. -The file doc/fixes36.4 in the source distribution has a full list of fixes. +The file doc/fixes37.0 in the source distribution will be updated with a list +of fixes as they are committed. In short -- there are likely to be bugs. Don't treat NetHack-3.7 branch as released code, and if stability is paramount, then the most recent From 7f4842d35d060dfd51f5d2336b8a775be2b0c0ca Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 19 Dec 2019 15:44:23 -0500 Subject: [PATCH 528/529] another version reference update --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 25bb89638..2597748e0 100644 --- a/README +++ b/README @@ -12,7 +12,7 @@ of fixes as they are committed. In short -- there are likely to be bugs. Don't treat NetHack-3.7 branch as released code, and if stability is paramount, then the most recent -NetHack 3.6.3 release is safest for you. +NetHack 3.6.4 release is safest for you. We're making the .0 work-in-progress available so that you can observe, test out, and contribute to its development. Constructive suggestions, GitHub pull From 7db034321d4c7851b60c1e7a650c7b12dd7b6f49 Mon Sep 17 00:00:00 2001 From: nhw_cron Date: Thu, 19 Dec 2019 17:17:40 -0500 Subject: [PATCH 529/529] This is cron-daily v1-Dec-12-2019. files updated: Files --- Files | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Files b/Files index ae6a62679..794a57090 100644 --- a/Files +++ b/Files @@ -50,9 +50,10 @@ fixes30.pl08 fixes30.pl09 fixes30.pl10 fixes31.1 fixes31.2 fixes31.3 fixes32.0 fixes32.1 fixes32.2 fixes32.3 fixes33.0 fixes33.1 fixes34.0 fixes34.1 fixes34.2 fixes34.3 fixes35.0 fixes36.0 fixes36.1 fixes36.2 -fixes36.3 fixes36.4 lev_comp.6 lev_comp.txt makedefs.6 -makedefs.txt mn.7 mnh.7 nethack.6 nethack.txt -recover.6 recover.txt tmac.n tmac.nh window.doc +fixes36.3 fixes36.4 fixes36.5 lev_comp.6 lev_comp.txt +makedefs.6 makedefs.txt mn.7 mnh.7 nethack.6 +nethack.txt recover.6 recover.txt tmac.n tmac.nh +window.doc include: (files for GEM versions)